Detection Method, Program Product, Electronic Device, and Storage Medium of Indicator Light
By obtaining multimodal data of the indicator light, calculating information entropy, deviation degree and conflict information, and comprehensively rating, the problem of high misjudgment rate of indicator light detection method under environmental changes is solved, and the detection accuracy is improved.
Patent Information
- Application Number
- CN202510660796.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-05-21
AI Technical Summary
In the prior art, the indicator light detection method cannot adapt to environmental changes and the misjudgment rate is high.
By obtaining one or more frames of image data, electrical data and coded data of the target indicator, the information entropy, deviation degree and conflict information are calculated, and the detection score is comprehensively determined to improve detection accuracy.
It has achieved improved accuracy of indicator light detection results, adapted to environmental changes, and reduced the rate of misjudgment.
Smart Images

Figure CN120195578B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of indicator light detection, and particularly to a method for detecting an indicator light, a program product, an electronic device, and a storage medium. Background Art
[0002] The detection of indicator lights has long relied on manual visual judgment, which has problems of low efficiency and high misjudgment rate. In related technologies, the indicator lights are mainly detected by single-modal detection and static fusion. The above methods monitor the operating state of the indicator lights through safety decision-making, brightness uniformity analysis, and stability analysis, and combine with the user terminal for fault feedback. However, the above methods cannot adapt to environmental changes and have a relatively high misjudgment rate. Summary of the Invention
[0003] This application provides a method for detecting an indicator light, a program product, an electronic device, and a storage medium, so as to at least solve the problem that the detection method in related technologies cannot adapt to environmental changes and has a relatively high misjudgment rate.
[0004] This application provides a method for detecting an indicator light, including:
[0005] Obtaining at least one frame of image data, electrical data, and coding data corresponding to a target indicator light;
[0006] Based on the at least one frame of image data, the electrical data, and the coding data, respectively calculating the information entropy corresponding to the at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data;
[0007] Based on the information entropy, the deviation degree, and the conflict information, determining a detection score corresponding to the target indicator light;
[0008] Based on the detection score, determining a detection result corresponding to the target indicator light.
[0009] This application also provides a computer program product, including:
[0010] A first processing module, configured to obtain at least one frame of image data, electrical data, and coding data corresponding to a target indicator light;
[0011] A second processing module, configured to respectively calculate the information entropy corresponding to the at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data based on the at least one frame of image data, the electrical data, and the coding data;
[0012] A third processing module, configured to determine a detection score corresponding to the target indicator light based on the information entropy, the deviation degree, and the conflict information;
[0013] A fourth processing module, configured to determine a detection result corresponding to the target indicator light based on the detection score.
[0014] The present application further provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above-mentioned indicator light detection methods when executing the computer program.
[0015] The present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of any of the above-mentioned indicator light detection methods when executed by a processor.
[0016] The present application further provides a computer program product including a computer program, which implements the steps of any of the above-mentioned indicator light detection methods when executed by a processor.
[0017] Through the present application, by obtaining one or more frames of image data, electrical data, and coding data of the target indicator light, more comprehensive multi-modal data of the target indicator light is obtained, enabling a better understanding of the operating conditions of the target indicator light. By calculating the information entropy of one or more frames of images carrying the environmental information of the target indicator light, the confidence of the image data is determined, enabling the obtained image data to adapt to environmental changes. By calculating the deviation degree of the electrical data, it is determined whether there is an abnormal situation with the target indicator light. By determining the conflict information corresponding to the coding data, it is determined whether there is a problem with inconsistent operating states of the target indicator light. Through multiple types of data, the target indicator light is jointly detected, and a detection score is calculated. Therefore, the technical problem that the detection method cannot adapt to environmental changes and has a high false positive rate can be solved, achieving the technical effect of improving the accuracy of the detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 One of the schematic flowcharts of a method for detecting an indicator light provided by an embodiment of the present application;
[0020] Figure 2 One of the schematic diagrams of the principle of a method for detecting an indicator light provided by an embodiment of the present application;
[0021] Figure 3 Another schematic diagram of the principle of a method for detecting an indicator light provided by an embodiment of the present application;
[0022] Figure 4 The second flowchart of a method for detecting an indicator light provided by an embodiment of the present application;
[0023] Figure 5 The structural schematic diagram of a computer program product provided by an embodiment of the present application. Detailed implementation manners
[0024] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to 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 of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0025] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0026] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0027] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the method for detecting an indicator light depends, the specific application environment architecture or specific hardware architecture will be described herein.
[0028] An embodiment of the present application provides a method for detecting an indicator light. The method will be described in detail in combination with the execution process of the method for detecting an indicator light.
[0029] Specifically, Figure 1 is a flowchart of a method for detecting an indicator light provided by an embodiment of the present application.
[0030] As Figure 1 shown, the method for detecting an indicator light includes: step 110, step 120, step 130, and step 140.
[0031] Step 110: Obtain at least one frame of image data, electrical data, and coding data corresponding to the target indicator light;
[0032] In this step, the target indicator light is the LED light to be detected.
[0033] The target indicator light can be different types of indicator lights such as server LEDs, indicator lights in industrial equipment status monitoring scenarios, indicator lights in smart home scenarios, and indicator lights in in-vehicle electronics scenarios.
[0034] For example, in an industrial equipment status monitoring scenario, the motor indicator light is detected by fusing vibration sensor data.
[0035] In a smart home scenario, the lamp status diagnosis is optimized by combining user habit data.
[0036] In an in-vehicle electronics scenario, the temperature mode is added to enhance the detection of dashboard LEDs.
[0037] The image data is the image of the target indicator light collected.
[0038] The electrical data is the relevant data such as voltage, current, and power of the target indicator light collected.
[0039] The encoded data is the preset code obtained from the register, representing the working state of the target indicator light.
[0040] For example, the preset code is 0b101, indicating that the target indicator light blinks red.
[0041] During the actual execution process, one or more frames of image data can be collected through an image sensor. For example, image data is collected through a Basler ace2 2440-120uc industrial camera.
[0042] It should be noted that the Basler ace2 2440-120uc industrial camera (120fps, global shutter) can take high-speed pictures without smear and eliminate the interference of ambient light color temperature.
[0043] Of course, during the actual execution process, other different types of image sensors can also be used.
[0044] The electrical data can be collected through measuring devices such as a voltage meter, an ammeter, a multimeter, and an electrical sensor.
[0045] The encoded data can be read from the status register.
[0046] As Figure 2 shown, during the actual execution process, image data, electrical data, and encoded data can be obtained through the data acquisition layer. That is, through an industrial camera, an RGB image stream is collected to obtain one or more frames of video streams; electrical data such as voltage and current is collected through an electrical sensor, and the preset code (i.e., encoded data) is obtained through the status register.
[0047] Step 120: Based on at least one frame of image data, electrical data, and coding data, calculate the information entropy corresponding to at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data respectively.
[0048] In this step, the information entropy is a value quantifying the confidence of the image data.
[0049] The information entropy can be expressed as .
[0050] It should be noted that the information entropy is the core index for measuring uncertainty in information theory. The larger the value of the information entropy, the higher the uncertainty (degree of chaos) of the system and the lower the confidence.
[0051] In the actual execution process, image processing can be performed on one or more frames of images first, the pixel information in the image data is statistically analyzed, and based on the statistically obtained pixel information and the calculation formula of the information entropy, the information entropy of the image data is calculated.
[0052] It should be noted that the information entropy has the advantages of strong probability sensitivity, excellent mathematical properties, and wide applicability.
[0053] Specifically, entropy is highly sensitive to the uniformity of the probability distribution and can intuitively reflect the "hesitation degree" of the model.
[0054] The entropy function performs well in terms of convexity, differentiability, etc.
[0055] Entropy is the standard method for measuring uncertainty in multi-classification problems (such as decision trees, Bayesian models).
[0056] The deviation degree characterizes the difference between the electrical data of the target indicator light at the current acquisition moment and the normal operating state.
[0057] The deviation degree is information that can quantify the degree of abnormality of the electrical data.
[0058] The deviation degree can be expressed as .
[0059] It should be noted that in the case where the electrical data includes various different types of data, such as data including current and voltage, etc., the deviation degree is an index that fuses voltage and current anomalies.
[0060] In the actual execution process, the different electrical data of the target indicator light can be compared with the electrical data in the normal operating state to obtain the deviation degree.
[0061] For example, compare the current of the collected target indicator light with the voltage in the preset normal operating state of the target indicator light to obtain the deviation degree of the current.
[0062] For another example, the voltage of the collected target indicator light is compared with the voltage of the target indicator light under the preset normal operating state to obtain the deviation degree of the voltage.
[0063] The conflict information is whether the actual working state of the target indicator light is consistent with the encoded data.
[0064] The conflict information includes: conflict or no conflict.
[0065] The conflict information can be obtained by comparing the actual working state of the target indicator light and the encoded data read from the status register.
[0066] For example, when the actual working state of the target indicator light is flashing red and the encoded data indicates flashing green, the conflict information is conflict.
[0067] During the actual execution process, the electrical signal of the target indicator light working can be captured by an oscilloscope to determine the actual working state of the target indicator light.
[0068] Step 130: Based on the information entropy, deviation degree, and conflict information, determine the detection score corresponding to the target indicator light;
[0069] In this step, the detection score is a credibility score obtained by fusing the multi-modal data of the target indicator light.
[0070] The detection score of the target indicator light can be calculated by adding the information entropy, deviation degree, and conflict information.
[0071] During the actual execution process, the information entropy, deviation degree, and conflict information can also be normalized to obtain the detection score.
[0072] Step 140: Based on the detection score, determine the detection result corresponding to the target indicator light.
[0073] In this step, during the actual execution process, the detection score can be compared with the first threshold to determine the detection result corresponding to the target indicator light.
[0074] When the detection score is less than the first threshold, it is determined that the detection result is detection anomaly and an alarm is triggered;
[0075] When the detection score is greater than or equal to the first threshold, the detection result is passing the detection.
[0076] The first threshold is a preset value for determining whether early warning is needed.
[0077] The specific value of the first threshold can be user-defined or determined based on the actual situation. For example, the first threshold can be 0.8 or 0.7; this application does not make a limitation.
[0078] During the actual execution process, taking the detection score of 0.62 as an example, an alarm can be triggered to timely remind the maintenance personnel to pay attention to abnormal situations.
[0079] During the R & D process, the inventors found that in the related technologies, the indicator lights are mainly detected through single-modal detection and static fusion. The above method monitors the operating status of the indicator lights through safety decision-making, brightness uniformity analysis, and stability analysis, and combines with the user terminal for fault feedback. However, the above method cannot adapt to environmental changes and has a high false positive rate.
[0080] This application obtains one or more frames of image data, electrical data, and coding data of the target indicator light to obtain more comprehensive multi-modal data of the target indicator light, and can better understand the operating conditions of the target indicator light. By calculating the information entropy of one or more frames of images carrying the environmental information of the target indicator light, the confidence of the image data is determined, so that the obtained image data can adapt to environmental changes. By calculating the deviation of the electrical data, it is determined whether there is an abnormal situation with the target indicator light. By determining the conflict information corresponding to the coding data, it is determined whether there is a problem with the inconsistent operating status of the target indicator light. Through multiple data, the target indicator light is jointly detected, and the detection score is calculated to improve the accuracy of the detection result.
[0081] According to the indicator light detection method provided by the embodiments of the present application, by obtaining one or more frames of image data, electrical data, and coding data of the target indicator light, and respectively processing the image data, electrical data, and coding data to obtain information entropy, deviation, and conflict information, through multiple data, the target indicator light is jointly detected, and the detection score is calculated to improve the accuracy of the detection result.
[0082] In some embodiments, step 120 may further include:
[0083] Based on at least one frame of image data, determine the color probability distribution and lighting state corresponding to the target indicator light;
[0084] Based on the color probability distribution, calculate the information entropy corresponding to at least one frame of image data;
[0085] Based on the electrical data and the preset standard electrical data, calculate the deviation corresponding to the electrical data;
[0086] Based on at least one frame of image data and the coding data, determine the conflict information corresponding to the coding data.
[0087] In this embodiment, the color probability distribution is the RGB color distribution of the image data.
[0088] The lighting state is the lighting condition of the target indicator light.
[0089] The lighting state includes: lighting color, lighting frequency, etc.
[0090] The lighting colors include: red, green, and blue light colors.
[0091] The lighting frequencies include: constant lighting, flashing, and other frequencies.
[0092] For example, the lighting state can be: green light constantly on and red light flashing, etc.
[0093] During the actual execution process, the pixel colors of each pixel point can be counted. Based on the total number of pixel points and the number of pixels of different colors, the color probability distribution is calculated, and the lighting state is determined based on the change situation of multi-frame image data.
[0094] After obtaining the color probability distribution, the information entropy corresponding to the image data is calculated through the information entropy calculation formula.
[0095] During the actual execution process, the information entropy can be calculated based on the following formula:
[0096]
[0097] Among them, is the information entropy; is the probability distribution corresponding to color i.
[0098] can be (red probability), (green probability), and (blue probability).
[0099] .
[0100] During the process of detecting the target indicator light, when the color judgment is very certain, the red probability = 0.95, the green probability = 0.03, the blue probability = 0.02, then (low uncertainty).
[0101] In the case where the colors cannot be distinguished, such as the red probability = 0.34, the green probability = 0.33, the blue probability = 0.33, then (high uncertainty).
[0102] The preset standard electrical data is the standard working electrical data of the target indicator light.
[0103] In the actual execution process, after obtaining the electrical data, the deviation degree can be calculated based on the following formula:
[0104]
[0105] Wherein, is the deviation degree; is the voltage value collected in real time (unit: volt, V); is the standard working voltage of the nominal voltage target indicator light); is the standard deviation of the current (unit: ampere, A); is the average value of the current (unit: ampere, A).
[0106] Among them, the deviation degree of the voltage is , and the current fluctuation coefficient is .
[0107] Taking = 4.0V, = 3.3V, = 3mA, = 20mA as an example, the calculation is as follows:
[0108]
[0109] Deviation degree > 0.3, it can be determined that there is an electrical abnormality; ≤ 0.1, it can be determined that the electrical parameters are normal; when ∈ (0.1, 0.3) indicates that there are controllable deviations in the electrical parameters.
[0110] In the actual execution process, the conflict information can be determined by comparing the actual working state corresponding to multiple image data and the working state represented by the encoded data.
[0111] The actual working state can be obtained by analyzing the changes between multiple images.
[0112] According to the detection method of the indicator light provided by the embodiments of the present application, by obtaining the color probability distribution and the lighting state corresponding to the target indicator light from one frame or multiple frames of image data, the color and flashing conditions of the target indicator light can be effectively identified through the image data. Based on the color probability distribution, the information entropy of the image data is calculated, and the accuracy of the calculated information entropy is improved. By comparing the electrical data with the preset standard electrical data, the deviation degree of the electrical data is calculated, providing a clear comparison standard, making the calculated deviation degree more in line with the actual usage scenario. Through one frame or multiple frames of image data and the encoded data, the conflict information can be directly compared to improve the efficiency of determining the conflict information.
[0113] In some embodiments, based on at least one frame of image data, determining the color probability distribution and the lighting state corresponding to the target indicator light may further include:
[0114] Input at least one frame of image data into the target recognition model to obtain the color probability distribution output by the target recognition model;
[0115] Based on the brightness change of consecutive frames of images of the target quantity in at least one frame of image data, determine the lighting state.
[0116] In this embodiment, the target recognition model is a model for image recognition of one or more frames of image data.
[0117] The target recognition model can be a neural network model, a machine learning model, etc.
[0118] For example, the target recognition model can be a YOLO-Lite model, NanoDet, etc.
[0119] Of course, in the actual execution process, the target recognition model can also be any other model that can recognize image data, and the present application does not make a limitation.
[0120] The target quantity is a preset value of the quantity of image data required to judge the lighting state of the target indicator light.
[0121] The specific value of the target quantity can be determined based on user definition or based on the actual situation. For example, the target quantity can be 5 or 7; the present application does not make a limitation.
[0122] In the actual execution process, after obtaining one or more frames of image data, the image data can be input into the YOLO-Lite model. The YOLO-Lite model recognizes the image data to obtain the LED color, that is, the RGB probability distribution of the image, and outputs the color probability distribution: red probability ( ), green probability ( ), blue probability ( ).
[0123] After obtaining multiple frames of images, screen out consecutive frames of images of the target quantity. For example, screen out consecutive 5 frames of image data from multiple frames of images, compare the magnitude relationship between the brightness change of the consecutive 5 frames of image data and the brightness change threshold, and based on the magnitude relationship, determine the lighting state.
[0124] The brightness change threshold is a preset value for judging whether the target indicator light flashes or is constantly on.
[0125] The specific value of the brightness change threshold can be determined based on the actual situation. For example, the brightness change threshold can be 30% or 40%; the present application does not make a limitation.
[0126] Taking the brightness change threshold of 30% as an example, when the brightness change of five consecutive frames of image data is ≥ 30%, the lit state can be determined as flashing.
[0127] When the brightness change of five consecutive frames of image data is < 30%, the lit state can be determined as constantly lit.
[0128] According to the detection method of the indicator light provided by the embodiments of the present application, by processing one or more frames of image data through a target recognition model, the color probability distribution of the image data is obtained, improving the efficiency of obtaining the color probability distribution. By the brightness change of consecutive frames of images of the target quantity, the brightness change situation of the target indicator light during the image acquisition period is determined, so as to determine the lit situation of the target indicator light, improving the accuracy of the determined lit state.
[0129] In some embodiments, based on at least one frame of image data and encoded data, determining the conflict information corresponding to the encoded data may further include:
[0130] Performing visual recognition on at least one frame of image to obtain a recognition result; the recognition result is the lit result corresponding to the target indicator light;
[0131] When the recognition result is consistent with the indicator light state corresponding to the encoded data, determining that the conflict information is non-conflicting;
[0132] When the recognition result is inconsistent with the indicator light state corresponding to the encoded data, determining that the conflict information is conflicting.
[0133] In this embodiment, after obtaining one or more frames of image data, the image data can be subjected to image recognition through an image recognition model to obtain the recognition result output by the image recognition model. For example, the recognition result is that the red light is constantly lit, or the green light is flashing, etc.
[0134] After obtaining the recognition result, compare the recognition result with the lit state corresponding to the encoded data.
[0135] For example, the recognition result is "the green light is constantly lit", and the encoded data is 0b101, indicating that the red light is flashing, and the conflict information is conflicting, that is = 1;
[0136] Another example, the recognition result is "the red light is flashing", and the encoded data is 0b101, indicating that the red light flashing code is consistent with the recognition result, and the conflict information is non-conflicting, that is = 0.
[0137] According to the detection method of the indicator light provided by the embodiments of the present application, by performing visual recognition on the image data to obtain the recognition result, effectively determining the actual lit situation of the target indicator light, comparing the recognition result with the encoded data to obtain the conflict information, the judgment logic is simple and easy to operate.
[0138] In some embodiments, determining the detection score corresponding to the target indicator light based on information entropy, deviation degree, and conflict information may further include:
[0139] Calculating the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data respectively based on information entropy, deviation degree, and conflict information;
[0140] Determining the detection score corresponding to the target indicator light by weighting information entropy with the first weight, weighting the deviation degree with the second weight, and weighting the conflict information with the third weight.
[0141] In this embodiment, after obtaining the information entropy, deviation degree, and conflict information, the first weight, the second weight, and the third weight can be calculated based on the actual values of the information entropy, deviation degree, and conflict information.
[0142] During the actual execution process, the first weight, the second weight, and the third weight can be calculated respectively based on the following formulas:
[0143]
[0144] Wherein, is the weight; and are the basic weights; and are the deviation degrees of the data; is the dynamic attenuation factor; .
[0145] The basic weights can be optimized through grid search (range: 0.1 - 0.8) to determine the value with the highest comprehensive accuracy.
[0146] can be (visual basic weight), (electrical basic weight), and (flag bit basic weight, that is, the weight corresponding to the encoded data).
[0147] The specific values of the basic weights can be determined based on user-defined or based on the actual situation, and this application does not make any limitations.
[0148] For example, the visual basic weight is 0.6; the electrical basic weight is 0.3; the flag bit basic weight is 0.1.
[0149] Another example, the visual basic weight is 0.4; the electrical basic weight is 0.4; the flag bit basic weight is 0.2.
[0150] The dynamic attenuation factor can control the influence intensity of uncertainty on the weight.
[0151] The specific value of the dynamic decay factor can be determined based on the actual situation and is not limited in this application. Experiments show that when the value is 2.0, it can effectively balance the weight sensitivity and stability.
[0152] including (information entropy), (deviation degree), and (conflict information).
[0153] is the confidence fluctuation of the visual recognition result (such as color misjudgment caused by illumination change and occlusion).
[0154] is the electrical parameter anomaly (such as voltage deviation from the nominal value and current fluctuation, etc.).
[0155] is the conflict identification between the hardware preset state and the real-time detection result (such as the register coding is inconsistent with the actual LED state), that is .
[0156] Taking = 0.4, = 0.2, = 0 as an example, the calculated first weight, second weight, and third weight can be respectively:
[0157]
[0158]
[0159]
[0160] Among them, is the first weight; is the second weight; is the third weight.
[0161] is the core control parameter of multi-modal fusion, which can reflect the reliability of each modal data in real time. Through the exponential decay function exp(-β ), the uncertainty is mapped to the weight adjustment coefficient.
[0162] The smaller it is, the higher the visual confidence and the larger the overall weight ; The larger it is, the less reliable the visual result and the lower its impact on the decision-making.
[0163] Deviation degree > 0.3, it is determined as an electrical anomaly and the electrical weight is reduced ; ≤0.1 The electrical parameters are normal, maintaining a high weight. When ∈ (0.1, 0.3) indicates that there are controllable deviations in the electrical parameters, but it has not reached the emergency failure level. The second weight is adaptively adjusted through the weight calculation formula.
[0164] When the conflict information is in conflict, that is = 1, the flag bit weight decreases from 0.1 to 0.05 to reduce its impact on the decision-making; when the conflict information is not in conflict, that is = 0, the flag bit is credible and the basic weight can be maintained.
[0165] It should be noted that through the above formula, the visual basic weight, the electrical basic weight, and the flag bit basic weight can be dynamically adjusted to obtain the first weight, the second weight, and the third weight, which can automatically reduce the decision-making weight of unreliable data in a complex environment, improve the robustness of the detection process, and achieve dynamic adaptability.
[0166] During the process of dynamically adjusting the weight, if the vision is interfered (such as causing to become larger), it will cause the weight to become smaller, relying on electrical and flag bit compensation, that is, increasing one or more of the second weight and the third weight.
[0167] Electrical anomaly (such as causing to become larger), it will cause the weight to become smaller and increase the vision weight.
[0168] Flag bit conflict (such as = 1), it will cause the weight to become smaller and reduce the impact of the conflict mode.
[0169] As shown in Table 1, it describes the relevant data during the weight dynamic adjustment process.
[0170] Table 1
[0171]
[0172] Such as Figure 3 shown, it describes the change process of the weight value during the weight dynamic adjustment process.
[0173] Vision weight (the top curve):
[0174] t = 0~10s: The initial weight is 0.6, and the confidence of the vision data is high.
[0175] t = 10s: The voltage exceeds the limit, and the vision weight rises to 0.7 (the electrical weight decreases, and the vision compensates).
[0176] t = 30s: Visual occlusion causes the confidence level to decrease, and the weight drops to 0.4.
[0177] Electrical weight (middle curve):
[0178] t = 10s: Voltage overlimit triggers a deviation degree Ue = 0.262, and the weight drops suddenly from 0.3 to 0.15.
[0179] t = 30s: When there is visual occlusion, the electrical parameter is stable (Ue = 0.05), and the weight is compensated to 0.4.
[0180] Flag bit weight (lower curve):
[0181] t = 10s: Due to voltage anomaly conflicting with the flag bit, the weight rises from 0.1 to 0.15.
[0182] t = 30s: When there is no conflict in the flag bit during visual occlusion, the weight is restored to 0.2.
[0183] Key event annotation:
[0184] Voltage overlimit (t = 10s): The electrical weight decreases, and the visual weight is compensated.
[0185] Visual occlusion (t = 30s): The visual weight decreases, and the electrical weight is compensated.
[0186] After obtaining the first weight, the second weight, and the third weight, the information entropy is weighted by the first weight, the deviation degree is weighted by the second weight, and the conflict information is weighted by the third weight to determine the detection score corresponding to the target indicator light.
[0187] During the actual execution process, the detection score can be calculated based on the following formula:
[0188]
[0189] Where, is the detection score; is the first weight; is the information entropy; is the second weight; is the deviation degree; is the third weight; is the conflict information.
[0190] When the calculated detection score is less than the first threshold, an alarm is triggered.
[0191] For example, the nominal voltage is 3.3V, and the measured voltage is 4V, =(|4.0 - 3.3|) / 3.3 + 0.05 = 0.262,
[0192] Weight adjustment: The electrical weight (second weight) is reduced from 0.3 to 0.15, and the visual weight (first weight) is increased to 0.7.
[0193] Result: The detection score is 0.62, triggering an alarm.
[0194] For another example, electrical parameters: The current is stable ( = 1 mA), = 0.05.
[0195] Weight adjustment: The electrical weight (second weight) is compensated to 0.4, and the comprehensive score is 0.82, passing the detection.
[0196] According to the detection method of the indicator light provided by the embodiments of the present application, by calculating the first weight, the second weight, and the third weight respectively through information entropy, deviation degree, and conflict information, it is possible to automatically reduce the decision weight of unreliable data in a complex environment, improve the robustness of the detection process, achieve dynamic adaptability, and thus calculate the detection score based on the weights adapted to the dynamic environment, improving the accuracy of the calculated detection score.
[0197] As Figure 4 shown, in some embodiments, calculating the first weight corresponding to visual data, the second weight corresponding to electrical data, and the third weight corresponding to encoded data respectively based on information entropy, deviation degree, and conflict information includes:
[0198] When the change degrees of at least one frame of image data, electrical data, and encoded data within the target time period are all less than the first change threshold, calculating the first weight corresponding to visual data, the second weight corresponding to electrical data, and the third weight corresponding to encoded data respectively based on information entropy, deviation degree, and conflict information.
[0199] In this embodiment, the target time period is a preset value for determining whether there is a mutation in the acquired data.
[0200] The specific value of the target time period can be determined based on the actual situation. For example, the target time period can be 3 seconds or 5 seconds, etc., which is not limited in the present application.
[0201] The change degree is the fluctuation degree of the data.
[0202] The first change threshold is a preset value for determining the fluctuation situation of the acquired data.
[0203] The first change threshold may include a color change threshold, an electrical data change threshold, and an encoded data change threshold.
[0204] During the actual execution process, multiple frames of image data, electrical data, and coding data within the target time period can be collected, the change degrees of various types of data within the target time period can be calculated, the change degrees of various types of data are respectively compared with their corresponding thresholds, and in the case where the change degrees are all less than the first change threshold, it is determined that the multiple frames of image data, electrical data, and coding data within the collected target time period are data without mutations. At this time, based on information entropy, deviation degree, and conflict information, the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the coding data can be calculated.
[0205] According to the detection method of the indicator light provided by the embodiments of the present application, by comparing the magnitude relationship between the change degrees of at least one frame of image data, electrical data, and coding data within the target time period and the first change threshold, it is determined whether there are mutations in the data within the target time period, effectively judging the accuracy of the acquired image data, electrical data, and coding data. Thus, based on the information entropy, deviation degree, and conflict information calculated from the accurate data, the first weight, the second weight, and the third weight are calculated, improving the accuracy and usability of the calculated weights.
[0206] Continue to refer to Figure 4 , in some embodiments, in the case where the change degrees of at least one frame of image data, electrical data, and coding data within the target time period are all less than the first change threshold, respectively calculating the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the coding data based on information entropy, deviation degree, and conflict information may further include:
[0207] In the case where at least one of the information entropy is greater than the information entropy threshold, the deviation degree is greater than the deviation degree threshold, and the conflict information is a conflict, and the change degrees of at least one frame of image data, electrical data, and coding data within the target time period are all less than the first change threshold, respectively calculating the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the coding data based on information entropy, deviation degree, and conflict information.
[0208] In this embodiment, the information entropy threshold is a preset value for judging the confidence level of the image data.
[0209] The deviation degree threshold is a preset value for judging whether the electrical data is abnormal.
[0210] During the actual execution process, the specific values of the information entropy threshold and the deviation degree threshold can be determined based on the actual situation, and the present application does not make any limitations.
[0211] During the actual execution process, in the case where the information entropy is greater than the information entropy, it indicates that the confidence level of the image data is low, and it can be determined that a multimodal conflict is detected.
[0212] When the deviation degree is greater than the deviation degree threshold, it can characterize the electrical anomaly of the electrical data, and it can be determined that a multimodal conflict is detected.
[0213] When the conflict information is a conflict, it can also be determined that a multimodal conflict is detected.
[0214] Such as Figure 4 As shown, when a multimodal conflict is detected, primary arbitration can be performed. For example, the consistency of the data collected within the first 3 seconds is checked.
[0215] When the data collected within 3 seconds is consistent, based on the information entropy, deviation degree, and conflict information, calculate the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data.
[0216] According to the indicator light detection method provided by the embodiments of the present application, by comparing the change degree of the collected data with the first change threshold when a multimodal conflict is detected to calculate the corresponding weights, and performing primary arbitration when a conflict is found, the occurrence of invalid arbitration is reduced.
[0217] In some embodiments, calculating the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data respectively based on the information entropy, deviation degree, and conflict information includes:
[0218] When there is at least one change degree among the change degrees of at least one frame of image data, electrical data, and encoded data within the target time period that is not less than the first change threshold, match the at least one frame of image data, electrical data, and encoded data with the preset standard mode information;
[0219] Calculate the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data respectively based on the information entropy, deviation degree, and conflict information;
[0220] When the at least one frame of image data, electrical data, and encoded data match the preset standard mode information, replace the first weight, the second weight, and the third weight with the preset weights.
[0221] In this embodiment, the preset standard mode information is the state combination of the indicator lights collected in advance.
[0222] The preset standard mode information is used for mode matching during conflict arbitration.
[0223] The preset standard mode information is the recorded historical fault cases and the information under normal operating conditions, such as the LED state sequences corresponding to voltage overlimit and communication interruption, etc.
[0224] Each state sequence in the preset standard mode information also corresponds to weighted information, that is, the preset weight corresponding to each state sequence.
[0225] The preset weight is the weight corresponding to the state sequence that matches the actual data of the target indicator light in the preset standard mode information.
[0226] It may include electrical anomalies: voltage exceeding the limit (such as the actual 4.0V and the nominal 3.3V), current fluctuation (such as >0.1); visual anomalies: color deviation, abnormal flicker frequency; state flag bit conflict: the register encoding is inconsistent with the actual LED state (such as the encoding 0b101 corresponding to "red light flashing", but actually the green light is always on).
[0227] Under normal operating conditions, the LED states include standard states such as LED startup self-check, running, and sleeping. Collect the RGB distribution of colors in the normal state (such as red: >0.9), stable current value, and flag bit consistency.
[0228] During the actual execution process, time-domain features can be extracted for each state sequence: color probability distribution, flicker determination (i.e., the lit state), electrical deviation degree, and state flag bit features.
[0229] After obtaining the historical fault cases and the information in the normal operating state, the data is marked in a manual annotation manner, such as "fault A", "normal B", to obtain the preset standard mode information.
[0230] When it is determined that there is one or more change degrees in the change degrees of the image data, electrical data, and coding data within the target time period that are not less than the first change threshold, the collected image data, electrical data, and coding data can be matched with the preset standard mode information to obtain a matching result.
[0231] During the actual execution process, the weighted Euclidean distance can be used to measure the matching degree between the real-time data and the pattern library, that is, the image data, electrical data, and coding data are matched with the preset standard mode information through the following formula:
[0232]
[0233] Among them, is the matching degree, , and are the visual weight, electrical weight, and flag bit weight respectively, , and are the clustering centers of various types of data respectively; is the information entropy, is the deviation degree, is conflict information.
[0234] In the case where the calculated matching degree is less than the matching degree threshold, it can be determined that the image data, electrical data, and coding data match the preset standard mode information.
[0235] The specific value of the matching degree threshold can be user-defined or determined based on the actual situation. For example, the matching degree threshold can be 0.1 or 0.2; this application does not make a limitation.
[0236] Taking the matching degree threshold of 0.1 as an example, in the case where the calculated D < 0.1, it can be determined that the matching is successful, and the preset weight override strategy is triggered, that is, the preset weight overrides the first weight, the second weight, and the third weight.
[0237] As Figure 4 shown, in the case of inconsistent primary arbitration, further intermediate arbitration is performed, and the collected data is matched with the pre-stored LED mode library (i.e., the preset standard mode information). In the case of a match, the calculated weight is overridden.
[0238] According to the detection method of the indicator light provided by the embodiments of the present application, by determining that there is one or more change degrees in the collected data that are not less than the first change threshold, the collected image data, electrical data, and coding data are further matched with the preset standard mode information. In the case where the corresponding data is matched from the preset standard mode information, the first weight, the second weight, and the third weight calculated based on the information entropy, the deviation degree, and the conflict information are overridden by the preset weight, improving the usability of the replaced first weight, second weight, and third weight.
[0239] Continue to refer to Figure 4 , in some embodiments, calculating the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the coding data respectively based on the information entropy, the deviation degree, and the conflict information may further include:
[0240] In the case where there is at least one change degree among the change degrees of at least one frame of image data, electrical data, and coding data within the target time period that is not less than the first change threshold, the at least one frame of image data, electrical data, and coding data is matched with the preset standard mode information;
[0241] In the case where the target data among the at least one frame of image data, electrical data, and coding data does not match the preset standard mode information, obtain the abnormal information confirmed by the user;
[0242] Based on the abnormal information, adjust the first weight, the second weight, and the third weight to obtain a new first weight, a new second weight, and a new third weight indicator light.
[0243] In this embodiment, the abnormal information is the type of abnormality confirmed manually.
[0244] The abnormal information may include: information such as hardware failures and environmental interferences.
[0245] The new first weight is the new first weight obtained after adjusting the first weight based on the abnormal information.
[0246] The new second weight is the new second weight obtained after adjusting the second weight based on the abnormal information.
[0247] The new third weight is the new third weight obtained after adjusting the third weight based on the abnormal information.
[0248] As Figure 4 shown, when both the primary arbitration and the intermediate arbitration fail, the ultimate arbitration is further triggered. By means of manual intervention, the abnormal information is confirmed, and based on the abnormal information, the first weight, the second weight, and the third weight are adjusted.
[0249] Taking the scenarios of color mixing and communication interruption as an example, the detection process of the target indicator light will be described.
[0250] The LED flashes alternately between red and green (hardware preset to "red light always on"), and at the same time the flag bit fails ( = 1).
[0251] The processing flow is as follows:
[0252] Primary arbitration: It is detected that the conflict between vision and the flag bit lasts for 3 seconds, triggering the intermediate arbitration.
[0253] Intermediate arbitration: Match the pattern library. If the match is successful, overwrite the current weight (the vision weight is increased to 0.7); if the match fails, enter the ultimate arbitration.
[0254] Ultimate arbitration: Manually confirm the communication failure, update the pattern library and correct the flag bit weight formula (αf is adjusted from 0.1 to 0.05).
[0255] According to the detection method of the indicator light provided by the embodiment of the present application, when it is determined that the degree of change of the collected data is not less than the first change threshold and the collected data does not match the preset standard pattern information, through manual intervention, the abnormal information confirmed by the user is obtained, and the abnormal situation of the target indicator light is obtained. Thus, based on the abnormal information, the first weight, the second weight, and the third weight are adjusted, improving the accuracy of the obtained new first weight, new second weight, and new third weight.
[0256] In some embodiments, based on the exception information, adjusting the first weight, the second weight, and the third weight to obtain new first, second, and third weights may further include:
[0257] Adjusting the dynamic attenuation factor, the visual base weight corresponding to the first weight, the electrical base weight corresponding to the second weight, and the flag bit base weight corresponding to the third weight respectively;
[0258] Based on the adjusted dynamic attenuation factor, the adjusted visual base weight, the adjusted electrical base weight, and the adjusted flag bit base weight, determining new first, second, and third weights.
[0259] In this embodiment, during the actual execution process, after obtaining the exception information, based on the actual situation of the exception information, the dynamic attenuation factor, the visual base weight corresponding to the first weight, the electrical base weight corresponding to the second weight, and the flag bit base weight corresponding to the third weight can be adjusted. Thus, based on the adjusted dynamic attenuation factor, the adjusted visual base weight, the adjusted electrical base weight, the adjusted flag bit base weight, as well as the information entropy, the deviation degree, and the conflict information, new first, second, and third weights are calculated.
[0260] In some embodiments, different image data, electrical data, and coding data can be pre-collected and the features of the collected different data are learned through a machine learning model, so as to learn the adjustment ranges of the dynamic attenuation factor, the visual base weight, the electrical base weight, and the flag bit base weight.
[0261] In some other embodiments, adjustment data input by a user can also be received to adjust the dynamic attenuation factor, the visual base weight corresponding to the first weight, the electrical base weight corresponding to the second weight, and the flag bit base weight corresponding to the third weight.
[0262] According to the detection method of the indicator light provided by the embodiments of the present application, by adjusting the dynamic attenuation factor, the visual base weight, the electrical base weight, and the flag bit base weight, the calculation methods of the new first, second, and third weights are effectively adjusted, the fitness of the calculated new weights to the actual situation is improved, it is more in line with the actual situation, and the accuracy of the new weights is improved.
[0263] Continue to refer to Figure 4 In some embodiments, after obtaining the exception information confirmed by the user, the method may further include:
[0264] Storing the exception information into a circular buffer;
[0265] Train an object detection model based on the data in the circular buffer, where the object detection model is used to detect target indicator lights.
[0266] In this embodiment, the circular buffer is an area for storing sample data.
[0267] After obtaining the abnormal information confirmed by the user, the abnormal information and its related abnormal data can be added to the circular buffer for training the user model.
[0268] During the actual execution process, the abnormal data can be used as sample data, and the abnormal information can be used as sample labels to train the object detection model for online learning and continuously optimize the object detection model.
[0269] Taking the scenarios of LED surface contamination and current signal fluctuation as examples, the detection process of the target indicator light will be described.
[0270] Dust covers the LED lamp shade (light transmittance decreases), and the current signal fluctuates.
[0271] Vision: Recognized as weak red light (Pr = 0.7), but the flicker detection fails.
[0272] Electricity: The current signal contains high-frequency noise.
[0273] Final arbitration: Manually recheck and confirm "constant red light", update the pattern library (store the manual recheck result in the circular buffer) and reset the flag bit weight.
[0274] According to the detection method of the indicator light provided by the embodiment of the present application, by continuously storing the obtained abnormal information in the circular buffer and optimizing the object detection model based on the data in the circular buffer, the detection accuracy and detection efficiency of the object detection model are optimized.
[0275] In some embodiments, training the object detection model based on the data in the circular buffer may further include:
[0276] When the data volume in the circular buffer is greater than the target data volume, obtain the old task dataset and the new task dataset based on the acquisition time of each data in the circular buffer;
[0277] Train the object detection model based on the old task dataset and the new task dataset.
[0278] In this embodiment, the target data volume is to determine whether the data volume of the circular buffer reaches the preset value for training the object detection model.
[0279] The specific value of the target data volume can be user-defined or determined based on the actual situation. For example, the target data volume can be 1000 or 1500, etc.; the present application does not make a limitation.
[0280] The old task dataset is a dataset composed of data with relatively early acquisition times in the circular buffer.
[0281] The new task dataset is a dataset composed of data with relatively late acquisition times in the circular buffer.
[0282] During the actual execution process, based on the acquisition times of the data in the circular buffer, the data in the circular buffer is divided into an old task dataset and a new task dataset. First, the target price detection model is trained through the old task dataset. Based on the training results of the old task dataset and the new task dataset, the target detection model is trained, so that the target detection model can protect the key information in the old task data during the training process based on the new task dataset.
[0283] According to the detection method of the indicator light provided by the embodiments of the present application, by dividing the data in the circular buffer into an old task dataset and a new task dataset, and training the target detection model through the old and new task datasets, the target detection model can save the key information in the old task data, protect historical knowledge, improve the detection accuracy of the target detection model, and expand the usage scenarios.
[0284] In some embodiments, training the target detection model based on the old task dataset and the new task dataset may further include:
[0285] Training the target detection model based on the old task dataset to obtain old data model parameters;
[0286] Calculating the information content of the old data model parameters on the old task dataset;
[0287] Training the target detection model based on the old data model parameters, the information content, and the new task dataset.
[0288] In this embodiment, the old data model parameters are the model parameters obtained by training the target detection model through the old task dataset.
[0289] The information content is the information reflecting the sensitivity of the old data model parameters to the prediction results of the old tasks.
[0290] The information content can be obtained based on the following steps:
[0291] Data sampling: Randomly sample a batch of data from the old task dataset.
[0292] Gradient calculation: Calculate the gradient of the loss function with respect to the parameter for each sample.
[0293] Square and average: Take the square of the gradient and average it over all samples.
[0294] The calculation formula is as follows:
[0295]
[0296] Among them, is the amount of information; is the amount of data; is the feature vector of the nth old data; is the label of the nth old data; are the old data model parameters; is the loss function.
[0297] In the actual execution process, after obtaining the old data model parameters and the amount of information, the object detection model can be further trained based on the old data model parameters, the amount of information, and the new task dataset.
[0298] In the actual execution process, the object detection model can be trained by means of the continual learning algorithm of Elastic Weight Consolidation (EWC).
[0299] The continual learning algorithm of Elastic Weight Consolidation can prevent the neural network from forgetting the knowledge of the old task when learning a new task.
[0300] The core idea of the continual learning algorithm of Elastic Weight Consolidation is to protect the key information of historical tasks by restricting the update of important parameters.
[0301] The total EWC loss function can be determined based on the following formula:
[0302]
[0303] Among them, is the loss function of the new task (such as cross-entropy and mean square error, etc.); is the regularization strength coefficient, which controls the strength of the old task constraint (it can take values from 100 to 1000); is the amount of information, measuring the importance to the old task; are the old task model parameters, is the parameter value (historical optimal value) after the old task training is completed.
[0304] It should be noted that for the parameter the gradient fluctuates greatly in the old task, indicating that it is sensitive to the task, and the value is high. If the gradient is close to zero, it means that the parameter has little impact on the task, and the value is low.
[0305] The following describes the training steps of the object detection model.
[0306] 1. Train the old task
[0307] Train the normal model until convergence and save the parameters .
[0308] Output: Model parameters , the accuracy of Task A.
[0309] 2. Calculate the Fisher information matrix
[0310] Calculate the .
[0311] Store: Save and (usually only store the diagonal elements).
[0312] 3. Train the new task
[0313] Define the total loss:
[0314]
[0315] Backpropagation: Optimize , update the parameters .
[0316] 4. Effect verification
[0317] Check whether the accuracy of the old task remains stable (the detection accuracy of the old task remains above 95%), and whether the accuracy of the new task reaches the expectation (the detection accuracy of the new task is improved to 80%). Through EWC, the multi-modal LED detection system can continuously learn new tasks (such as green LED detection) without forgetting historical tasks (such as red LED detection), realizing true lifelong learning (Lifelong Learning).
[0318] According to the detection method of the indicator light provided by the embodiments of the present application, through preliminary training on the old task dataset, the old task model parameters are obtained, and the information amount corresponding to the old task model parameters is calculated. Based on the old task model parameters, information amount and new task dataset, catastrophic forgetting is alleviated, and the object detection model is dynamically optimized through an online learning mechanism, so that the trained object detection model can adapt to various environments.
[0319] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0320] The detection method of the indicator light provided by the embodiment of the present application may be executed by a computer program product. In the embodiment of the present application, taking the computer program product executing the detection method of the indicator light as an example, the computer program product provided by the embodiment of the present application is described.
[0321] As Figure 5 shown, the computer program product includes: a first processing module 510, a second processing module 520, a third processing module 530, and a fourth processing module 540.
[0322] The first processing module 510 is configured to obtain at least one frame of image data, electrical data, and coding data corresponding to the target indicator light;
[0323] The second processing module 520 is configured to calculate the information entropy corresponding to at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data respectively based on the at least one frame of image data, the electrical data, and the coding data;
[0324] The third processing module 530 is configured to determine a detection score corresponding to the target indicator light based on the information entropy, the deviation degree, and the conflict information;
[0325] The fourth processing module 540 is configured to determine a detection result corresponding to the target indicator light based on the detection score.
[0326] According to the computer program product provided by the embodiment of the present application, by obtaining one or more frames of image data, electrical data, and coding data of the target indicator light, and processing the image data, electrical data, and coding data respectively, the information entropy, the deviation degree, and the conflict information are obtained, and the target indicator light is detected jointly through multiple data, and the detection score is calculated to improve the accuracy of the detection result.
[0327] In some embodiments, the second processing module 520 may further be configured to:
[0328] Determine the color probability distribution and the lighting state corresponding to the target indicator light based on at least one frame of image data;
[0329] Calculate the information entropy corresponding to at least one frame of image data based on the color probability distribution;
[0330] Calculate the deviation degree corresponding to the electrical data based on the electrical data and the preset standard electrical data;
[0331] Determine the conflict information corresponding to the coding data based on at least one frame of image data and the coding data.
[0332] In some embodiments, the second processing module 520 may further be configured to:
[0333] Input at least one frame of image data into the target recognition model to obtain the color probability distribution output by the target recognition model;
[0334] Determine the lighting state based on the brightness change of consecutive frames of images of the target quantity in at least one frame of image data.
[0335] In some embodiments, the second processing module 520 can also be used for:
[0336] Perform visual recognition on at least one frame of image to obtain a recognition result; the recognition result is the lighting result corresponding to the target indicator light;
[0337] When the recognition result is consistent with the indicator light state corresponding to the encoded data, determine that the conflict information is non-conflicting;
[0338] When the recognition result is inconsistent with the indicator light state corresponding to the encoded data, determine that the conflict information is conflicting.
[0339] In some embodiments, the third processing module 530 can also be used for:
[0340] Calculate the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information;
[0341] Determine the detection score corresponding to the target indicator light by weighting the information entropy with the first weight, the deviation degree with the second weight, and the conflict information with the third weight.
[0342] In some embodiments, the third processing module 530 can also be used for:
[0343] When the change degrees of at least one frame of image data, electrical data, and encoded data within the target time period are all less than the first change threshold, calculate the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information.
[0344] In some embodiments, the third processing module 530 can also be used for:
[0345] When at least one of the change degrees of at least one frame of image data, electrical data, and encoded data within the target time period is not less than the first change threshold, match the at least one frame of image data, electrical data, and encoded data with the preset standard mode information;
[0346] Calculate the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information;
[0347] When at least one frame of image data, electrical data, and encoded data match the preset standard mode information, replace the first weight, the second weight, and the third weight with preset weights.
[0348] In some embodiments, the third processing module 530 may also be configured to:
[0349] When at least one of the degrees of change of at least one frame of image data, electrical data, and encoded data within the target time period is not less than a first change threshold, match the at least one frame of image data, electrical data, and encoded data with the preset standard mode information;
[0350] When the target data among at least one frame of image data, electrical data, and encoded data does not match the preset standard mode information, obtain the abnormal information confirmed by the user;
[0351] Based on the abnormal information, adjust the first weight, the second weight, and the third weight to obtain a new first weight, a new second weight, and a new third weight.
[0352] In some embodiments, the third processing module 530 may also be configured to:
[0353] Adjust the dynamic decay factor, the visual base weight corresponding to the first weight, the electrical base weight corresponding to the second weight, and the flag bit base weight corresponding to the third weight respectively;
[0354] Based on the adjusted dynamic decay factor, the adjusted visual base weight, the adjusted electrical base weight, and the adjusted flag bit base weight, determine a new first weight, a new second weight, and a new third weight.
[0355] In some embodiments, the computer program product may further include a fourth processing module, configured to
[0356] Store the abnormal information into a circular buffer;
[0357] Based on the data in the circular buffer, train a target detection model, where the target detection model is used to detect a target indicator light.
[0358] In some embodiments, the computer program product may further include a fifth processing module, configured to:
[0359] When the amount of data in the circular buffer is greater than the target amount of data, obtain an old task data set and a new task data set based on the acquisition times of the respective data in the circular buffer;
[0360] Based on the old task data set and the new task data set, train the target detection model.
[0361] In some embodiments, the computer program product may further include a sixth processing module for:
[0362] Based on the old task dataset, train an object detection model to obtain old data model parameters;
[0363] Calculate the information content of the old data model parameters on the old task dataset;
[0364] Based on the old data model parameters, the information content, and the new task dataset, train the object detection model.
[0365] In the embodiment of the present application, the execution subject of the detection method of the indicator light may be a detection device for the indicator light. In the embodiment of the present application, taking the detection device for the indicator light to execute the detection method of the indicator light as an example, the detection device for the indicator light provided by the embodiment of the present application is described.
[0366] For the description of the features in the corresponding embodiment of the detection device for the indicator light, reference may be made to the relevant description in the corresponding embodiment of the detection method of the indicator light, which will not be elaborated here one by one.
[0367] The embodiment of the present application further provides an indicator light detection system.
[0368] As Figure 2 shown, the indicator light detection system includes: a data acquisition layer, a core processing layer, and a feedback loop.
[0369] In this embodiment, the industrial camera, current probe, and status register in the data acquisition layer respectively provide visual, electrical, and register coding data.
[0370] The core processing layer can calculate weights by a dynamic fusion engine and output decisions, and an online learning optimizer can update model parameters in real time.
[0371] The feedback loop can optimize the object detection model based on the manual re-inspection results and historical data.
[0372] Among them, the visual recognition module can be used for the LED color and status (constant on / flashing).
[0373] The electrical analysis module is used to monitor parameters such as voltage and current, analyze electrical parameter anomalies, and output a deviation score.
[0374] The flag bit parsing module is used to read the LED register coding in the hardware, verify the consistency between the register coding and the real-time data, and mark conflict events.
[0375] The dynamic fusion engine is used to synthesize multi-modal data, dynamically calculate weights, and output a comprehensive score.
[0376] The online learning optimizer is used to incrementally update model parameters based on manual feedback and historical data.
[0377] The alarm module is used to trigger an audible and visual alarm when the comprehensive score is < 0.8.
[0378] The detection report generation is used to record the detection results (pass / fail) and detailed parameters.
[0379] The manual re-inspection result is used for the corrected label confirmed manually and is used to optimize the model.
[0380] The device log is used to store historical detection data and supports the long-term learning of the model.
[0381] According to the detection system of the indicator light provided by the embodiment of the present application, by acquiring one or more frames of image data, electrical data, and coding data of the target indicator light, and respectively processing the image data, electrical data, and coding data to obtain the information entropy, deviation degree, and conflict information, and jointly detecting the target indicator light through multiple types of data, the detection score is calculated, improving the accuracy of the detection result.
[0382] The embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the detection method of the indicator light.
[0383] The embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the detection method of the indicator light when running.
[0384] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (abbreviated as ROM), random access memory (abbreviated as RAM), mobile hard disk, magnetic disk, or optical disc and other various media that can store computer programs.
[0385] The embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the detection method of the indicator light.
[0386] The embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the detection method of the indicator light.
[0387] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered as exceeding the scope of this application.
[0388] The above has introduced in detail a method for detecting an indicator light provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A detection method for an indicator light, characterized in that, Including: Obtaining at least one frame of image data, electrical data, and coding data corresponding to a target indicator light; Based on the at least one frame of image data, the electrical data, and the coding data, respectively calculating the information entropy corresponding to the at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data; Based on the information entropy, the deviation degree, and the conflict information, determining a detection score corresponding to the target indicator light; Based on the detection score, determining a detection result corresponding to the target indicator light; The step of respectively calculating the information entropy corresponding to the at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data based on the at least one frame of image data, the electrical data, and the coding data includes: Based on the at least one frame of image data, determining the color probability distribution and the lighting state corresponding to the target indicator light; Based on the color probability distribution, calculating the information entropy corresponding to the at least one frame of image data; Based on the electrical data and preset standard electrical data, calculating the deviation degree corresponding to the electrical data; Based on the at least one frame of image data and the coding data, determining the conflict information corresponding to the coding data; The step of determining the detection score corresponding to the target indicator light based on the information entropy, the deviation degree, and the conflict information includes: Based on the information entropy, the deviation degree, and the conflict information respectively, calculating a first weight corresponding to visual data, a second weight corresponding to the electrical data, and a third weight corresponding to the coding data; Determining the detection score corresponding to the target indicator light by weighting the information entropy with the first weight, weighting the deviation degree with the second weight, and weighting the conflict information with the third weight.
2. The detection method of the indicating lamp according to claim 1, wherein The step of determining the color probability distribution and the lighting state corresponding to the target indicator light based on the at least one frame of image data includes: Inputting the at least one frame of image data into a target recognition model to obtain the color probability distribution output by the target recognition model; Based on the brightness change of consecutive frames of images of the target quantity in the at least one frame of image data, determining the lighting state.
3. The detection method of the indicating lamp according to claim 1, wherein The step of determining the conflict information corresponding to the coding data based on the at least one frame of image data and the coding data includes: Performing visual recognition on the at least one frame of image to obtain a recognition result; the recognition result is the lighting result corresponding to the target indicator light; When the recognition result is consistent with the indicator light state corresponding to the coding data, determining that the conflict information is non-conflicting; When the recognition result is inconsistent with the indicator light state corresponding to the coding data, determining that the conflict information is conflicting.
4. The detection method of the indicator light according to claim 1, characterized in that, The step of respectively calculating a first weight corresponding to visual data, a second weight corresponding to the electrical data, and a third weight corresponding to the coding data based on the information entropy, the deviation degree, and the conflict information includes: When the degrees of change of the at least one frame of image data, the electrical data, and the encoded data within the target time period are all less than a first change threshold, calculate a first weight corresponding to the visual data, a second weight corresponding to the electrical data, and a third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information.
5. The detection method of the indicator light according to claim 1, characterized in that The calculating a first weight corresponding to the visual data, a second weight corresponding to the electrical data, and a third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information includes: When at least one of the degrees of change of the at least one frame of image data, the electrical data, and the encoded data within the target time period is not less than the first change threshold, match the at least one frame of image data, the electrical data, and the encoded data with preset standard pattern information; Calculate a first weight corresponding to the visual data, a second weight corresponding to the electrical data, and a third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information; When the at least one frame of image data, the electrical data, and the encoded data match the preset standard pattern information, replace the first weight, the second weight, and the third weight with preset weights.
6. The detection method of the indicating lamp according to claim 1, characterized in that The calculating a first weight corresponding to the visual data, a second weight corresponding to the electrical data, and a third weight corresponding to the encoded data respectively based on the information entropy, the deviation degree, and the conflict information includes: When at least one of the degrees of change of the at least one frame of image data, the electrical data, and the encoded data within the target time period is not less than the first change threshold, match the at least one frame of image data, the electrical data, and the encoded data with preset standard pattern information; When the target data among the at least one frame of image data, the electrical data, and the encoded data does not match the preset standard pattern information, obtain the abnormal information confirmed by the user; Based on the abnormal information, adjust the first weight, the second weight, and the third weight to obtain a new first weight, a new second weight, and a new third weight.
7. The detection method of the indicator light according to claim 6, characterized in that, The adjusting the first weight, the second weight, and the third weight based on the abnormal information to obtain a new first weight, a new second weight, and a new third weight includes: Adjust the dynamic decay factor, the visual base weight corresponding to the first weight, the electrical base weight corresponding to the second weight, and the flag bit base weight corresponding to the third weight respectively; Based on the adjusted dynamic decay factor, the adjusted visual base weight, the adjusted electrical base weight, and the adjusted flag bit base weight, determine a new first weight, a new second weight, and a new third weight.
8. The detection method of the indicating lamp according to claim 6, wherein After obtaining the abnormal information confirmed by the user, the method further includes: Store the abnormal information in a circular buffer; Based on the data in the circular buffer, train an object detection model for detecting the target indicator light.
9. The detection method of the indicating lamp according to claim 8, characterized in that, The training of the object detection model based on the data in the circular buffer includes: When the amount of data in the circular buffer is greater than the target amount of data, obtain an old task dataset and a new task dataset based on the acquisition times of the data in the circular buffer; Train the object detection model based on the old task dataset and the new task dataset.
10. The detection method of the indicating lamp according to claim 9, characterized in that, The training of the object detection model based on the old task dataset and the new task dataset includes: Train the object detection model based on the old task dataset to obtain old data model parameters; Calculate the information amount of the old data model parameters on the old task dataset; Train the object detection model based on the old data model parameters, the information amount, and the new task dataset.
11. A computer program product, characterized in that, It includes: A first processing module for obtaining at least one frame of image data, electrical data, and coding data corresponding to the target indicator light; A second processing module for calculating the information entropy corresponding to the at least one frame of image data, the deviation degree corresponding to the electrical data, and the conflict information corresponding to the coding data respectively based on the at least one frame of image data, the electrical data, and the coding data; A third processing module for determining the detection score corresponding to the target indicator light based on the information entropy, the deviation degree, and the conflict information; A fourth processing module for determining the detection result corresponding to the target indicator light based on the detection score; The second processing module is used to determine the color probability distribution and the lighting state corresponding to the target indicator light based on the at least one frame of image data; Calculate the information entropy corresponding to the at least one frame of image data based on the color probability distribution; Calculate the deviation degree corresponding to the electrical data based on the electrical data and the preset standard electrical data; Determine the conflict information corresponding to the coding data based on the at least one frame of image data and the coding data; The third processing module is used to calculate the first weight corresponding to the visual data, the second weight corresponding to the electrical data, and the third weight corresponding to the coding data respectively based on the information entropy, the deviation degree, and the conflict information; Determine the detection score corresponding to the target indicator light by weighting the information entropy with the first weight, the deviation degree with the second weight, and the conflict information with the third weight.
12. An electronic device, characterized in that, It includes: A memory for storing a computer program; A processor for implementing the steps of the detection method of the indicator light according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the detection method of the indicator light according to any one of claims 1 to 10 when executed by a processor.
Citation Information
Patent Citations
Video coding method and device, video decoding method and device, electronic equipment and storage medium
CN113422959A
OLED display screen detection method, device and system and storage medium
CN117877398A