A method for identifying short circuits in elevator door locks, electronic equipment, media, and software products.
By constructing an elevator door lock short-circuit recognition method, utilizing video stream label time series and deep learning models, and combining the probability fusion of physical and deep branches, the real-time and robust recognition problem of elevator door lock short-circuit under complex working conditions is solved, and the elevator status is accurately determined.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING SPECIAL EQUIP TESTING & RES INST (CHONGQING SPECIAL EQUIP ACCIDENT EMERGENCY INVESTIGATION & PROCESSING CENT)
- Filing Date
- 2026-03-13
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies lack real-time and robust identification solutions for elevator door lock short circuits under complex working conditions. Computer vision methods struggle to stably identify elevator door lock status under complex lighting, occlusion, and camera shake conditions.
By acquiring the video stream of the indicator light area, adding labels to each frame of the image based on a preset strategy, constructing a time series, and combining a deep learning model and physical branches, the prior probabilities are fused using ambiguity and confidence to filter out false anomalies and achieve the identification of elevator door lock short circuits.
It improves the real-time performance and robustness of elevator door lock short-circuit identification, reduces the probability of misjudgment in complex environments, and enhances the safety monitoring and fault early warning capabilities of elevator operation.
Smart Images

Figure CN121837801B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of special equipment technology, and more specifically, to an elevator door lock short-circuit identification method, electronic equipment, medium, and program product. Background Technology
[0002] Elevator door locks are critical safety protection devices ensuring the safe operation of elevators, and their circuit integrity is explicitly required in relevant standards GB / T7588.1, GB / T7588.2, and the ISO / TS8100 series. A short circuit in the door lock can lead to a serious shearing accident, making specialized inspections of elevator door locks a key focus of elevator safety supervision. Unlike traditional methods that combine door lock opening / closing with operational status for short circuit detection, this method uses changes in indicator lights caused by the elevator door lock's operation to determine if a short circuit has occurred. The core of this method is to use computer vision to identify the door lock status lights on the mainboard in the control cabinet and transmit signals to the inspection personnel on the car top. This, combined with the door lock's opening and closing, allows for rapid detection of a short circuit. In computer vision, methods relying on simple thresholds are difficult to achieve stable recognition under complex lighting, occlusion, and camera shake conditions.
[0003] In recent years, computer vision and deep learning have developed rapidly in industrial inspection, providing new solutions for small target detection, indicator light recognition, and equipment status assessment. Related research includes lightweight target detection, meter and signal light recognition, multi-scale and attention-based small target detection methods, and temporal smoothing using Hidden Markov Models (HMMs) and uncertainty modeling. In the elevator field, cross-modal methods such as digital twins and graph neural networks have also been used to improve the stability of fault diagnosis. However, specific research on elevator door lock short circuits remains limited, lacking solutions that combine real-time performance and robustness under complex operating conditions. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide an elevator door lock short-circuit identification method, electronic device, medium and program product, which can improve the problem that the prior art lacks a solution that has both real-time performance and robustness under complex working conditions.
[0005] To achieve the above technical objectives, the technical solution adopted in this application is as follows:
[0006] In a first aspect, embodiments of this application provide an elevator door lock short-circuit identification method, the method comprising:
[0007] Acquire a video stream obtained by capturing the indicator light area, the video stream comprising multiple consecutive frame images, each frame image having all the indicator lights arranged in the indicator light area;
[0008] Based on a preset strategy, a label is added to each frame image. When the number of indicator lights in the lit state is a first preset number, the label indicates that the elevator state corresponding to the timestamp of the frame image is the closed state. When the number of indicator lights in the lit state is a second preset number, the label indicates that the elevator state corresponding to the timestamp of the frame image is the open state. When the number of indicator lights in the lit state is any other number, the label indicates that the elevator state corresponding to the timestamp of the frame image is the abnormal state.
[0009] Based on the timestamp of each frame image in the video stream, the tags are arranged according to the timestamps to obtain the time sequence of the tags;
[0010] The labels representing anomalies in the time series that conform to preset rules are corrected to labels representing closed or open states, resulting in a corrected time series.
[0011] Based on the corrected time series, an identification result is output, which is used to characterize whether the elevator door lock has a short circuit.
[0012] According to the first aspect, between acquiring the video stream and adding a label to each frame image based on a preset strategy, the method further includes:
[0013] Obtain a pre-defined standard template for a designated area of the elevator;
[0014] Based on the standard template, the frame image is corrected to obtain the corrected frame image;
[0015] Obtain the center point coordinates of each indicator light that has been pre-calibrated on the corrected frame image;
[0016] On the corrected frame image, a first pixel region and a second pixel region centered on the center point coordinates are obtained. The pixel areas of the first pixel region and the second pixel region are respectively a first specified value and a second specified value. The first pixel region is used to characterize the light-emitting core of the indicator light. The area between the edge of the first pixel region and the edge of the second pixel region is used to characterize the background core of the indicator light. The first pixel region is located within the second pixel region.
[0017] The edges of the second pixel region corresponding to each indicator light are cropped to obtain the total pixel region of each indicator light, so that the step of adding a label to each frame image based on a preset strategy is performed according to the total pixel region.
[0018] According to the first aspect, adding tags to each frame image based on a preset strategy includes:
[0019] The blurriness of the corresponding indicator light emission is obtained based on the average brightness of the first pixel region and the average brightness of the second pixel region;
[0020] Calculate the first sum of all the aforementioned ambiguities;
[0021] Based on the first sum, the first prior probability is obtained when the number of indicator lights in the lit state is either a first preset number or a second preset number;
[0022] The total pixel area is input into a deep learning model, and the confidence level of the corresponding indicator light is obtained through the deep learning model.
[0023] Calculate the second sum of all the stated confidence levels;
[0024] Based on the second sum, the second prior probability is obtained when the number of indicator lights in the lit state is either a first preset number or a second preset number;
[0025] Based on the ambiguity, a first weight of the first prior probability is determined, and based on the confidence level, a second weight of the second prior probability is determined;
[0026] Based on the first weight and the second weight, the first prior probability and the second prior probability are fused to obtain the fused prior probability;
[0027] The label of the corresponding frame image is determined based on the fused prior probability of each frame image.
[0028] According to the first aspect, the first prior probability and the second prior probability are fused based on the first weight and the second weight to obtain the fused prior probability.
[0029] Both the first prior probability and the second prior probability are transformed using the logit method to obtain the first transformed probability and the second transformed probability, respectively.
[0030] Based on the first weight and the second weight, the first transformed probability and the second transformed probability are fused using a logit method to obtain the initial probability;
[0031] The scaled probability is obtained by scaling the initial probability using a pre-set temperature parameter.
[0032] The scaled probabilities are mapped using a Sigmoid algorithm to obtain the fused prior probabilities.
[0033] According to the first aspect, determining the label corresponding to each frame image based on the fused prior probability of each frame image includes:
[0034] The first and second sums are weighted and averaged to obtain the weighted sum.
[0035] When the fused prior probability is greater than a pre-obtained probability threshold and the weighted sum is within a first preset range, the number of indicator lights in the corresponding frame image used to represent the lit state is a first preset number.
[0036] When the fused prior probability is less than a pre-obtained probability threshold and the weighted sum is within a second preset range, the number of indicator lights in the corresponding frame image used to represent the lit state is the second preset number.
[0037] When the fused prior probability is greater than a pre-obtained probability threshold and the weighted sum is not within a first preset interval, or when the fused prior probability is less than a pre-obtained probability threshold and the weighted sum is not within a second preset interval, the label of the corresponding frame image is used to characterize the abnormal state.
[0038] The first preset quantity is less than the second preset quantity, and the maximum value of the first preset interval is less than the minimum value of the second preset interval.
[0039] According to the first aspect, the step of outputting the recognition result based on the corrected time series includes:
[0040] Obtain the number of labels representing abnormal states in the corrected time series, or elevator operation data with the same timestamp as the frame image, wherein all the labels of the abnormal states are consecutive in time;
[0041] When the number of tags representing abnormal states exceeds a first threshold, or when the number of tags that do not correspond to elevator operation data with the same timestamp exceeds a second threshold, the identification result is that a short circuit exists.
[0042] According to the first aspect, correcting the labels representing anomalies in the time series that conform to preset rules to labels representing a closed or open state, to obtain a corrected time series, includes:
[0043] Within a preset sliding time window, if the number of tags representing anomalies is less than a third quantity threshold, and other tags within the sliding time window represent an open or closed state, then the tags representing anomalies are corrected to be the same as other tags. The third quantity threshold is less than a first quantity threshold, and the length of the sliding time window is less than the length of the video stream.
[0044] Secondly, embodiments of this application also provide an electronic device, which includes a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the above-described method.
[0045] Thirdly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the above-described method.
[0046] Fourthly, embodiments of this application also provide a program product, including a computer program, which, when executed by a processor, implements the above-described method.
[0047] The invention employing the above technical solution has the following advantages:
[0048] In the technical solution provided in this application, a continuous frame image video stream containing all indicator lights is acquired. According to a preset strategy, labels representing the door closing state, door opening state, or abnormal state are added to all frame images. The labels are arranged by timestamp to form a time series with temporal characteristics. Abnormal labels that meet the preset rules are temporally corrected to eliminate false abnormal interference. Finally, the door lock short-circuit recognition result is output based on the characteristics of the corrected time series. Therefore, this solution associates the elevator status with the visual characteristics of the indicator lights and uses temporal filtering to filter single-frame misjudgments, realizing continuous and accurate recognition of elevator door lock short circuits. It reduces the possibility of misjudgments caused by factors such as reflection, improves the safety monitoring and fault early warning capabilities of elevator operation, and enhances the real-time performance and robustness of short-circuit recognition.
[0049] In the technical solution provided in this application, the ambiguity of the indicator light emission is calculated by the average brightness of the light emission kernel and the background kernel. The ambiguity is summed to obtain a first sum value and generate a first prior probability. The total pixel area is input into the deep learning model to obtain the confidence of the indicator light emission. The confidence is summed to obtain a second sum value and generate a second prior probability. Based on the ambiguity and confidence, the weights of the two branches are determined. The weights are fused with the prior probabilities of the two branches to construct a physical branch and a deep branch. The physical branch quantifies the on / off state of the indicator light from the perspective of brightness features, while the deep branch learns to determine the state of the indicator light from the perspective of visual features. Then, the weights are adaptively allocated according to the ambiguity and confidence output by the two branches and the prior probabilities of the two branches are fused. This allows the determination result to take into account both physical rules and deep visual learning, realizing a dual-dimensional determination of the elevator state. This effectively improves the robustness and anti-interference ability of the determination of the on / off state of the indicator light and the corresponding elevator state, and reduces the probability of misjudgment in single-branch determination. Attached Figure Description
[0050] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.
[0051] Figure 1 A flowchart of the elevator door lock short circuit identification method provided in this application embodiment.
[0052] Figure 2 This is a sub-flowchart of S120 provided in an embodiment of this application.
[0053] Figure 3 This is a sub-flowchart of S128 provided in an embodiment of this application.
[0054] Figure 4 A schematic diagram illustrating the preset strategy provided in the embodiments of this application.
[0055] Figure 5 This is a sub-flowchart of S150. Detailed Implementation
[0056] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0057] This application provides an electronic device that may include a processing module and a storage module. The storage module stores a computer program, which, when executed by the processing module, enables the electronic device to perform the corresponding steps in the elevator door lock short-circuit identification method described below.
[0058] Please refer to Figure 1 This application also provides a method for identifying short circuits in elevator door locks, which can be applied to electronic devices and can be executed or implemented by the electronic devices. The electronic devices can be, but are not limited to, personal computers, smartphones, and other electronic devices. The elevator door lock short circuit identification method may include the following steps:
[0059] S110, acquire a video stream obtained by shooting a designated area of the elevator, the video stream including multiple consecutive frame images, each of the frame images having all the indicator lights arranged in the designated area of the elevator;
[0060] S120, based on a preset strategy, add a label to each frame image. When the number of indicator lights in the lit state is a first preset number, the label indicates that the elevator state corresponding to the timestamp of the frame image is a closed state. When the number of indicator lights in the lit state is a second preset number, the label indicates that the elevator state corresponding to the timestamp of the frame image is an open state. When the number of indicator lights in the lit state is any other number, the label indicates that the elevator state corresponding to the timestamp of the frame image is an abnormal state.
[0061] S130, based on the timestamp of each frame image in the video stream, arrange the tags according to the timestamp to obtain the time sequence of the tags;
[0062] S140, the labels representing anomalies in the time series that conform to preset rules are corrected to labels representing closed or open states, to obtain the corrected time series.
[0063] S150, based on the corrected time series, output the identification result, which is used to characterize whether the elevator door lock has a short circuit.
[0064] In this embodiment, the process first involves capturing a video stream containing all indicator lights in a designated area of the elevator. Each frame of the video stream is labeled with a tag indicating whether the door is closed, open, or in an abnormal state. The tags are then arranged by timestamp to construct a tag time series, reconstructing the temporal changes in the door lock status. Next, by embedding preset rules based on the elevator's physical operation rules, abnormal tags in the sequence caused by environmental interference are corrected, filtering out non-fault noise and restoring the true door status. Finally, based on the corrected noise-free tag time series, the system determines whether the elevator door lock is short-circuited and outputs the identification result.
[0065] This embodiment improves robustness by using preset rules to eliminate interference from environmental factors and camera shake. The label correction employs a conditional design, correcting only false anomalies that conform to preset rules while retaining persistent and regular true anomalies. This avoids missed fault detections and ensures detection accuracy in complex field environments.
[0066] This solution meets the real-time requirements of short-circuit identification while ensuring robustness. In terms of visual processing, only lightweight features such as the number and brightness of indicator lights are extracted. The entire process of video stream acquisition, frame processing, tag sequence construction, timing correction, and short-circuit determination is designed as a pipelined parallel architecture. This allows for simultaneous acquisition, processing, correction, and determination, with overlapping processing times at each stage, ensuring that the end-to-end processing latency meets the real-time requirements of industrial environments.
[0067] Therefore, this embodiment provides a detailed description of each step, specifically:
[0068] In S110, video data is captured by a dedicated embedded high-definition smart camera for elevators. This camera is installed on the top inner wall of the elevator control cabinet or in a pre-reserved mounting position next to the main board, with the lens facing the indicator light area on the main board. The camera can simultaneously acquire frame data and perform timestamp calibration with the door lock circuit status detection terminal inside the control cabinet, ensuring the continuity and validity of N frames of video images and complete synchronization with the timestamps of the physical sensor data, meeting the multimodal data timing alignment requirements of the solution. In this embodiment, the indicator light area is located on the elevator's control panel.
[0069] In this embodiment, each video stream may include N frames. To ensure the accuracy of subsequent short-circuit identification, the number of frames cannot be too low; in this embodiment, each video stream includes 8 frames. That is, after acquiring a video stream, it is input to the aforementioned electronic device. The electronic device determines whether a short circuit exists based on the elevator door lock short-circuit identification method. It is understood that since the lens is focused on the indicator light area, each frame contains all the indicator lights, and the on / off state of each indicator light can be obtained from the frame image.
[0070] Between steps S110 and S120, this embodiment also requires preprocessing for each frame image. This is because the LED indicator area in elevator control panel images is often small and easily affected by lighting, reflection, and background interference from components. Therefore, a stable and accurate positioning method is a prerequisite for subsequent recognition. This paper employs a two-stage method of "board-level detection + template registration + ROI extraction" to achieve robust positioning of the LED area. Therefore, the preprocessing steps are as follows:
[0071] Obtain a pre-defined standard template for a designated area of the elevator. Based on the standard template, correct the frame image to obtain a corrected frame image; obtain the center point coordinates of each indicator light pre-marked on the corrected frame image. On the corrected frame image, obtain a first pixel region and a second pixel region centered on the center point coordinates. The pixel areas of the first pixel region and the second pixel region are respectively a first specified value and a second specified value. The first pixel region is used to represent the light-emitting core of the indicator light, and the area between the edge of the first pixel region and the edge of the second pixel region is used to represent the background core of the indicator light. The first pixel region is located within the second pixel region. Crop the edge of the second pixel region corresponding to each indicator light to obtain the total pixel region of each indicator light, so that S130 is executed according to the total pixel region.
[0072] The standard template is a reference image established for the designated indicator light area of the elevator, characterized by no angular offset, uniform lighting, no obstruction, and clear pixels. It serves as the core reference for subsequent correction of on-site captured frame images, eliminating camera installation deviations / shakes / viewpoint changes, calibrating the indicator light center point, and dividing pixel regions. Its resolution is completely consistent with the frame image resolution of the on-site captured video stream, containing only the designated indicator light area of the elevator and necessary surrounding background, without any irrelevant or redundant areas. For example, the standard template is established as follows:
[0073] Capture the baseline image: Under ideal conditions, with the elevator stationary and in standby mode, uniform ambient lighting (no strong light reflections / weak light dark fields), and the camera fixed at the preset detection position (consistent with the actual installation position during detection), capture a clear color image of the designated indicator light area of the elevator, ensuring that all indicator lights appear completely in the image, and that the on / off state of the indicator lights is clear with no blurring at the edges;
[0074] Image preprocessing: The captured reference image is subjected to grayscale conversion, Gaussian denoising, and contrast equalization to eliminate image noise and uneven brightness, and ensure the stability of image pixel features.
[0075] Region cropping and normalization: Cropping irrelevant background areas from the image, retaining only the specified valid area containing all indicator lights, while performing pixel normalization on the image, fixing the image resolution (consistent with the on-site captured frame image), and finally obtaining a standard template and saving it (in png / jpg format, with accompanying metadata such as image size and pixel coordinates).
[0076] The first pixel region is a regular pixel region (usually square / circular) centered on the center point coordinates of the indicator light and with a pixel area of a first specified value. It is completely located inside the second pixel region and is the core region specifically used to characterize the light-emitting core of the indicator light. This region accurately covers the core light-emitting part when the indicator light is normally lit. Its pixel area is calibrated according to the actual physical size of the indicator light and the image resolution. It is a fixed value and only reflects the pixel range of the light-emitting body of the indicator light, excluding interference from the surrounding background.
[0077] The second pixel region is a regular pixel region (usually square / circular, with the same shape as the first pixel region) centered on the center point of the indicator light and with a pixel area of a second specified value. The first specified value is much smaller than the second specified value, so the first pixel region is completely nested within the second pixel region. This region is the overall coverage area of the indicator light, including both the internal light-emitting core (the first pixel region) and the annular pixel region between the edge of the light-emitting core and the edge of the second pixel region. It forms the basis for subsequent division of the light-emitting core and background core, and for cropping the total pixel region.
[0078] The light-emitting core is the pixel representation corresponding to the core light-emitting part of the indicator light. It is uniquely defined by the first pixel area, which is the part with the highest brightness and the most stable pixel features when the indicator light is lit. It is also the core basis for judging the on / off state of the indicator light. Its pixel area (first specified value) is calibrated according to the mapping relationship between the physical size of the actual light-emitting core of the indicator light and the image pixels to ensure that the area accurately matches the actual light-emitting part of the indicator light and does not include the surrounding background pixels.
[0079] The background kernel is a pixel region specifically used to characterize the background surrounding the indicator light core. Its range is a ring-shaped pixel region between the edge of the first pixel region and the edge of the second pixel region. This region is distributed around the light core and belongs to the background region surrounding the indicator light. There are no indicator light pixels. It is mainly used to extract the background brightness features of the indicator light and provide a background reference for subsequent on / off determination (such as eliminating background light interference and calculating the brightness difference between the light core and the background kernel). Its pixel area is the difference between the second specified value and the first specified value, which is a fixed value.
[0080] The center point coordinates of each indicator light are manually calibrated based on the corrected frame image (the image registered with the standard template). This manual calibration is used to accurately locate the center pixel coordinates of each indicator light in the pixel coordinate system. For example, the manual calibration steps may include:
[0081] Load a clear image of the elevator indicator area that has been corrected based on the standard template, and import the image into a visualization calibration tool (such as LabelImg, OpenCV mouse callback tool, Matlab calibration toolbox). The tool can display the pixel coordinates (x, y) of the mouse click position in real time.
[0082] Manually move the mouse cursor to the visual center of each indicator light (the geometric center of the physical light-emitting part of the indicator light; if the indicator light is round, it is the center of the circle; if it is square, it is the intersection of the diagonals).
[0083] Click the mouse to pick the pixel coordinates (x, y) of the position. Then, mark the center point coordinates of all indicator lights in sequence according to their indicator light numbers (e.g., 1#, 2#, 3#, 4#). Save the calibration results as a JSON / TXT format file (including the indicator light number and the corresponding center point x / y coordinates) as a fixed reference parameter for subsequent frame image processing. After the calibration is completed, there is no need to repeat the operation. The coordinate data can be directly called after the frame image is collected and corrected on site.
[0084] In this embodiment, the method for correcting the frame image according to the standard template can be as follows:
[0085] Non-luminous points with fixed physical shapes and stable pixel features on the elevator indicator light circuit board are selected as feature anchor points. These anchor points are unaffected by the indicator light's on / off state or changes in ambient lighting. Specifically, feature points such as pads, pins, screw holes, PCB etching textures, and the indicator light's metal frame can be selected. Anchor points must be evenly distributed within the circuit board area containing all indicator lights, and the number of anchor points extracted from a single image must be no less than four (meeting the minimum requirement for solving the homography matrix) to ensure the uniqueness and stability of the mapping relationship.
[0086] Homography Matrix Solution: The homography matrix H is a 3×3 real matrix (H∈R3×3), which is the core parameter for the pixel coordinate mapping between the frame image and the standard template image. It is obtained through anchor point feature point matching and parameter estimation. The specific steps are as follows: ① For the standard template image and the frame image, use feature extraction algorithms such as ORB and SIFT to extract the coordinates and corresponding feature descriptors of the stable feature anchor points of the circuit board in the two types of images respectively; ② Complete the preliminary matching of the anchor point feature descriptors of the two images through Hamming distance to obtain feature point pairs between the original image and the standard template image; ③ Use the RANSAC robust estimation algorithm to remove mismatched feature point pairs and retain the valid anchor point pairs that only have a real spatial correspondence; ④ Based on the valid anchor point pairs, use the least squares method to solve for the homography matrix H from the original image to the standard template image.
[0087] Using the homography matrix H obtained from the solution as the core, a pixel coordinate mapping relationship between the original image and the standard template image is established to realize the transformation of the pixels of the original image to the coordinate system of the standard template. The mapping relationship is in homogeneous coordinate form:
[0088]
[0089] Where (x,y) are the two-dimensional planar coordinates of any pixel in the frame image, and (x′,y′) are the two-dimensional planar coordinates of the pixel in the standard template coordinate system after correction. Through this matrix multiplication operation, the coordinates of all pixels in the original image can be mapped to the standard template coordinate system one by one, thus completing the alignment of the pixel space.
[0090] Original image correction: Based on the above coordinate mapping relationship, a homography transformation operation is performed on the original frame image. Using the resolution and pixel size of the standard template image as the target, a perspective transformation is performed on the original image, rearranging all pixels in the original image according to the mapped coordinates to generate the corrected frame image. The corrected frame image completely overlaps with the standard template image in terms of circuit board features and pixel coordinate system. The pixel position of the elevator indicator light in the corrected frame image is completely consistent with the position marked in the standard template, completely eliminating positional offset problems caused by factors such as camera shooting angle, equipment micro-shake, and installation deviation.
[0091] Post-processing of the corrected image: To ensure the consistency of subsequent indicator light detection, basic post-processing is performed on the corrected image after homography transformation, retaining only the effective area containing the elevator indicator light circuit board and removing irrelevant background; at the same time, grayscale value normalization is performed on the image to ensure that the brightness and contrast characteristics of the corrected frame image are consistent with the standard template, without destroying the pixel information of the indicator light's on / off state, and providing a unified image benchmark for subsequently obtaining the center point coordinates of the indicator light and dividing the pixel region.
[0092] In this embodiment, based on the above scheme, the total pixel area can be obtained as follows:
[0093] ① First, retrieve the center coordinates (xi', yi') of the i-th indicator light that was manually calibrated beforehand in the standard template;
[0094] ②The initial region of interest of the LED is cut according to a fixed cutting rule. The formula is:
[0095]
[0096] Among them This represents the cutting area for the i-th LED. The redundant range at the trimming boundary is used to ensure that the LED area completely covers the light-emitting part. The trimmed area is... This is a rectangular pixel area, which serves as the basis for subsequent division of the light-emitting kernel and background kernel. Its size is larger than the final second pixel area.
[0097] “,” indicates the image dimension separator, used to distinguish the cropping range in the x direction (column) and y direction (row). The left side is the x-direction interval and the right side is the y-direction interval.
[0098] “:” indicates the interval slicing symbol, which is used to represent a continuous range of pixels. The format is start coordinates:end coordinates, which represents all continuous pixels from the start coordinates to the end coordinates.
[0099] The calculation process of the above formula is as follows: from the corrected image In the middle, the range of the x-direction (column) is truncated. to The range of the y-direction (row) is to The rectangular pixel region is the clipping region for the i-th LED. .
[0100] ③ Within the ROI, local edge detection and brightness center correction are used to perform secondary fine-tuning of the cropping results.
[0101] ④ Using the precise center point coordinates after secondary fine-tuning Centered on the ROI, within the finely tuned ROI area, the first pixel region (light-emitting kernel) and the second pixel region are defined according to the preset pixel area and nesting rules. Then, the range of the background kernel is determined by the nesting relationship of the regions, ensuring that the first pixel region is completely located within the second pixel region, and that both regions are geometrically centered on the precise center point.
[0102] ⑤ Using the precise center point coordinates of the LED obtained from the secondary fine-tuning as the unified geometric center, firstly, based on the first specified value, delineate a square or circular regular pixel area matching the physical shape of the LED as the light-emitting core. This area will precisely cover the core light-emitting part of the LED. If it is a square, match the corresponding side length according to the first specified value; if it is a circle, match the corresponding radius according to the first specified value. The range is defined with the precise center point as the center. Then, based on a second specified value much larger than the first specified value, delineate a regular pixel area of the same shape as the light-emitting core as the second pixel area, ensuring that the light-emitting core is completely nested within the second pixel area. If it is a square, match the corresponding longer side length according to the second specified value; if it is a circle, match the corresponding longer side length. The circle is matched with a larger radius according to the second specified value, and the range is also defined with this precise center point as the center. The boundary of the second pixel area will not exceed the ROI range of the previous cropping. Finally, the pixel area between the edge of the light-emitting core and the edge of the second pixel area is determined as the background core. In the case of square nesting, it is the border-shaped area between the outer square and the inner square. In the case of circular nesting, it is the annular area between the outer circle and the inner circle. This background core has no LED light-emitting pixels and is only the background area around the light-emitting core. Its pixel area is the difference between the second specified value and the first specified value, which can be used as the background brightness reference for subsequent LED on / off determination, effectively eliminating the interference caused by ambient light and panel reflection.
[0103] After each frame image completes preprocessing, step S120 is performed to add labels to each frame image according to a preset strategy, such as... Figure 2 As shown, S120 may specifically include the following steps:
[0104] S121: Based on the average brightness of the first pixel region and the average brightness of the second pixel region, obtain the blurring degree of the corresponding indicator light emission;
[0105] S122: Calculate the first sum of all the ambiguities;
[0106] S123: Based on the first sum, obtain the first prior probability when the number of indicator lights in the lit state is a first preset number or a second preset number;
[0107] S124: Input the total pixel area into the deep learning model, and obtain the confidence level of the corresponding indicator light emitting light through the deep learning model;
[0108] S125: Calculate the second sum of all the stated confidence levels;
[0109] S126: Based on the second sum, obtain the second prior probability when the number of indicator lights in the lit state is either a first preset number or a second preset number;
[0110] S127: Determine a first weight for the first prior probability based on the ambiguity, and determine a second weight for the second prior probability based on the confidence level;
[0111] S128: Based on the first weight and the second weight, fuse the first prior probability and the second prior probability to obtain the fused prior probability;
[0112] S129: Determine the label corresponding to the frame image based on the fused prior probability of each frame image.
[0113] In this embodiment, after obtaining the total pixel area corresponding to all indicator lights, the total pixel area is used as the ROI and input to the physical branch and the deep learning branch respectively. After obtaining the results of the two branches, the two are fused together, and the type of label is determined according to the final fusion result.
[0114] In this embodiment, there are four indicator lights. Two lights illuminate when the elevator door is closed, and four lights illuminate when the elevator door is open. Therefore, the first preset number and the second preset number in this embodiment are 2 and 4, respectively. It is understood that the number of indicator lights, and the number of lights that illuminate when the elevator door opens and closes, can also be set according to actual conditions.
[0115] In this embodiment, S121-S123 are the first prior probabilities obtained based on the physical branch. The specific steps are as follows:
[0116] After calculating and obtaining the average brightness of the first pixel region and the average brightness of the second pixel region, the brightness difference between the two is obtained based on the following formula.
[0117]
[0118] This represents the average brightness of the first pixel region. This represents the average brightness of the second pixel region. The value represents the brightness difference, and i represents the i-th indicator light, i = 1, 2, 3, 4.
[0119] Then, by mapping the probability of a sigmoid soft threshold to 0-1, the ambiguity of each indicator light being in the lit state is obtained. The ambiguity is determined by the following formula:
[0120]
[0121] in, The closer to 0 or 1, the clearer the single-lamp judgment; the closer to 0.5, the more ambiguous it becomes.
[0122] This refers to the Sigmoid function, which calculates the difference in brightness between the luminous kernel and the background kernel. After transformation, the probability value mapped to the interval (0, 1) is used to represent the ambiguity of the indicator light being on.
[0123] The baseline threshold representing the brightness difference is an empirically set offset. It is used to define the baseline brightness difference level for the indicator light to turn on or off.
[0124] represents the sensitivity coefficient, a hyperparameter greater than 0. It controls the steepness of the sigmoid function. The larger the value, the steeper the function curve, the more sensitive it is to changes in brightness difference, and the easier it is for the judgment result to approach 0 or 1. The smaller the value, the flatter the curve, and the more ambiguous the judgment result.
[0125] Soft-count the "brightness" blur of the four lights. , This represents the first sum value, and distance scoring and normalization are performed on "target light count = 2 or 4" to obtain the panel-level physical prior. The specific method can be obtained by calculating the prior probability using the formula in the physical branch below:
[0126]
[0127] This represents the prior probability score when the target number of lit lights is 2. It is achieved through... The distance from the target value 2 is scored using a negative exponent.
[0128] This represents the prior probability score when the target number of lit lights is 4. It is achieved through... The distance from the target value of 4 is scored using a negative exponent.
[0129] This represents the distance penalty coefficient, a hyperparameter greater than 0. It controls the rate at which the score decays with distance. The larger, when The faster the score drops when deviating from the target value; The smaller the value, the less sensitive the score is to distance.
[0130]
[0131] in, This represents the first prior probability when there are two indicator lights in the lit state.
[0132] This represents the first prior probability when there are 4 indicator lights in the lit state.
[0133] S124-S126 are used for deep learning-based branches, taking the total pixel region as input to obtain the second prior probability and the second sum. Specifically, after receiving the total pixel region corresponding to each indicator light, the deep learning model outputs the confidence level that the light is "on".
[0134] In this embodiment, the backbone network of the deep learning model adopts a lightweight convolutional network, with a structure of "Backbone → GAP → Fully Connected (BN + ReLU + Dropout 0.2) → Linear Classifier Head". The classifier head outputs the log-odds z, which is mapped to a probability. .
[0135]
[0136] The deep learning model is initialized by first loading ImageNet pre-trained parameters and then fine-tuning them in stages; if no pre-training is available, Kaiming normal kernels are used for convolutional kernels and Xavier kernels are used for fully connected components. To improve stability, EMA is enabled during training, and EMA shadow weights are used for both validation and testing.
[0137] After the deep learning model receives the total pixel area, it outputs the confidence level of the corresponding indicator light being "on". It can be understood that the closer the confidence level is to 0 / 1, the clearer the indicator light is on and off; the closer the confidence level is to 0.5, the more blurred the indicator light is on and off.
[0138] Calculate the sum of the confidence levels corresponding to the four indicator lights as the second sum, which represents the soft count of the confidence levels. Then, using the formula for calculating the prior probability by physical branch, calculate the second prior probability when the number of indicator lights is 2 and the second prior probability when the number of indicator lights is 4.
[0139] After the physical branch and the deep learning branch are calculated, the output results of the physical branch and the deep learning branch are fused based on S126-S129 to obtain the fused prior probability. Finally, based on the fused prior probability, the label corresponding to each frame image is obtained.
[0140] In S127, the branch fusion weights are calculated using ambiguity as the inverse confidence level, as follows:
[0141]
[0142] in, Indicates the first sum value. Indicates the second sum. The value is 1e-6 to prevent the denominator from being 0. The smaller the ambiguity, the larger the weight and the higher the branch contribution. As the first weight, This indicates the second weight.
[0143] In S128, such as Figure 3 As shown, the specific steps include the following:
[0144] S1281: Perform a logit transformation on both the first prior probability and the second prior probability to obtain the first transformed probability and the second transformed probability, respectively;
[0145] S1282: Based on the first weight and the second weight, the first transformed probability and the second transformed probability are fused using logit to obtain the initial probability;
[0146] S1283: The initial probability is scaled using a pre-set temperature parameter to obtain the scaled probability;
[0147] S1284: Perform a Sigmoid mapping on the scaled probabilities to obtain the fused prior probabilities.
[0148] In S1281, the logit transformation is used to map the probability of two LEDs on at the panel level from the probability domain to the linearly unbounded logit domain, avoiding nonlinear fusion bias in the probability domain. Specifically, it is implemented based on the following formula:
[0149]
[0150] The two lights tend to be on. Inclined to have all four lights on. The image is deemed blurry.
[0151] Let represent the first and second prior probabilities, respectively. The first and second prior probabilities are inherently in the 0-1 range. Directly weighting and fusing these probabilities can lead to decreased sensitivity to changes as the probability values approach 0 or 1, resulting in over-compression of the fused values and an inability to accurately reflect the decision confidence of each branch. The logit transformation, as a bidirectional mapping between probability and logarithmic advantage ratio, can transform the 0-1 probability values into unbounded logarithmic advantage ratios, eliminating the fusion bias caused by range limitations. Furthermore, after weighted fusion based on the first and second weights in the logit space, subsequent temperature parameter scaling and sigmoid mapping restore the probabilities to the 0-1 range. This preserves the adaptive weight allocation effect of the two branches while avoiding the loss of decision information caused by direct probability fusion, making the initial probability fusion result more closely match the actual decision characteristics of the two branches.
[0152] In S1282, the initial probability is calculated based on the following formula.
[0153]
[0154] This represents the initial probability.
[0155] In S1283, the scaling of the initial probability is achieved based on the following formula, and finally the fused prior probability is obtained. .
[0156]
[0157] This represents the prior probability after fusion;
[0158] The temperature parameter is pre-defined based on the temperature that minimizes the NLL on the validation set. The probability distribution is flat when T>1, steep when T<1, and standard Sigmoid when T=1.
[0159] For example, temperature parameters It can be established in the following way, specifically:
[0160] Prepare an independent validation set: First, construct an independent validation set for evaluation. The validation set should contain samples consistent with the actual application scenario (e.g., in the elevator LED status determination scenario, it should include LED status samples with different lighting conditions and different elevator models, with each sample labeled with a real label, such as "open / closed / abnormal"). The validation set must be completely independent of the model training set to avoid overfitting and ensure the objective and effective evaluation of the temperature parameter T. Simultaneously, extract the original probability value predicted by the base model (e.g., the original probability model output by the Sigmoid algorithm) for each sample in the validation set as the basic input for temperature adjustment.
[0161] Define the probability output form with temperature parameter: Introduce temperature parameter T based on the standard Sigmoid function to adjust the original probability distribution form: Substitute the original probability value (denoted as p) of the standard Sigmoid output into the probability transformation logic with temperature, and T acts as a scaling factor on the logarithmic space of the original probability (the core logic is: the higher the temperature, the more even the probability distribution; the lower the temperature, the more concentrated the probability distribution), ensuring that the transformed probability output can be used for NLL calculation.
[0162] The NLL loss calculation rule is defined as follows: Negative log-likelihood (NLL) measures the degree of match between the "temperature-adjusted probability distribution" and the "true labels of the validation set." The smaller the NLL value, the closer the adjusted probability distribution is to the distribution pattern of the true labels. For each sample in the validation set, the log-likelihood value is calculated for each sample, taking its negative value, based on its true label (e.g., positive / negative examples) and the predicted probability adjusted for temperature T. The average of the results for all samples is then calculated to obtain the overall NLL value of the validation set corresponding to that T value.
[0163] Set the search range and step size for T: Based on the distribution characteristics of Sigmoid, set a reasonable search range for T values (exemplary range: 0.1-5.0) to cover all scenarios of T<1 (steep distribution), T=1 (standard Sigmoid), and T>1 (flat distribution); at the same time, set the search step size (exemplary step size: 0.1). The smaller the step size, the more accurate the results. Computational efficiency must also be taken into account (e.g., with a step size of 0.1, there are 49 candidate T values in the 0.1-5.0 range).
[0164] Traverse candidate T values and calculate NLL: Select each candidate T value in turn according to the set search range and step size, substitute it into the temperature-controlled probability transformation logic, adjust the original probability of all samples in the validation set, and then calculate the overall NLL value of the validation set corresponding to the T value. Record the mapping relationship between each candidate T value and the corresponding NLL value (e.g., T=0.8 corresponds to NLL=1.2, T=1.0 corresponds to NLL=1.5, and T=1.2 corresponds to NLL=1.1).
[0165] Determine the optimal temperature parameter T: From the NLL mapping results of all candidate T values, select the T value that minimizes the NLL value as the final temperature parameter. For example, if after traversal it is found that T=1.2 has the smallest NLL value in the validation set, then T=1.2 is determined as the final temperature parameter to be used. At this time, the distribution characteristics of this T value can be verified: T=1.2>1, which corresponds to a smoother probability distribution, adapting to the requirement of reducing single-frame noise interference in elevator LED status determination.
[0166] In S129, the first and second sums are first weighted and averaged to obtain a weighted sum. Then, based on the weighted sum and the fused prior probability calculated in the above steps, the fusion is performed. To obtain the label for each frame image, specifically:
[0167] When the fused prior probability is greater than a pre-obtained probability threshold and the weighted sum is within a first preset range, the number of indicator lights in the corresponding frame image used to represent the lit state is a first preset number.
[0168] When the fused prior probability is less than a pre-obtained probability threshold and the weighted sum is within a second preset range, the number of indicator lights in the corresponding frame image used to represent the lit state is the second preset number.
[0169] When the fused prior probability is greater than a pre-obtained probability threshold and the weighted sum is not within a first preset interval, or when the fused prior probability is less than a pre-obtained probability threshold and the weighted sum is not within a second preset interval, the label of the corresponding frame image is used to characterize the abnormal state.
[0170] The first preset quantity is less than the second preset quantity, and the maximum value of the first preset interval is less than the minimum value of the second preset interval. For example,
[0171] And non∈[1.5,2.5]→it is determined that two lights are on, and the code St=1;
[0172] like If ≤τ and non∈[3.5,4.5], then all four lights are on, and the code St=3.
[0173] like >τ, but non [1.5, 2.5], or >τ, but non [3.5,4.5] → is determined to be an abnormal combination, and the abnormal code St=2 (simplified in engineering as one / three lights on), τ represents the pre-set probability threshold.
[0174] The probability threshold in this embodiment can be set based on expert experience, or it can be determined based on ROC and PR curve analysis on the validation set. Specifically:
[0175] First, temperature calibration is performed on the bi-branch fusion results of all samples in the validation set to obtain the calibrated fusion probabilities, which are then mapped one-to-one with the true labels. Next, candidate thresholds are generated by traversing the range of fusion probabilities, and the true positive rate, false positive rate, precision, and recall corresponding to each threshold are calculated, and ROC curves and PR curves are plotted respectively. Then, the point closest to the top left corner on the ROC curve, or the corresponding probability value under the constraint of false positive risk, is selected as the first candidate threshold, and the point closest to the top right corner on the PR curve, or the corresponding probability value under the constraint of false negative risk, is selected as the second candidate threshold. Finally, the results of the two candidate thresholds are fused based on the safety priority of the elevator scenario, and the optimal balance point that can balance the risks of false positives and false negatives is selected as the final threshold τ. Dynamic calibration can be achieved by periodically updating the validation set to adapt to changes in the on-site operation scenario.
[0176] Based on this, such as Figure 4 As shown, the preset strategy can be defined as follows: taking the registered and finely tuned LED area image containing the indicator light core and the background core as input, the physical branch executes a single light on / off determination and light count strategy based on the brightness comparison between the light core and the background core; the depth branch executes a state determination strategy based on the visual feature learning of the LED area by the depth model; the weighted fusion layer executes a fusion strategy that combines the temperature parameter set in advance based on minimizing the negative log-likelihood of the validation set to adjust the probability distribution shape and performs adaptive weighting based on the confidence of each branch; the threshold discrimination stage executes a precise matching and label output strategy based on the inherent physical operation law of the elevator, which sets the number of lights and the door closing, opening, and abnormal states. Finally, a complete preset determination logic is formed from single-frame visual feature extraction to elevator state label labeling.
[0177] In S130, after obtaining the label for each frame image, it is aligned with the video frames and a time series is generated according to the consecutive timestamps of the frame images. For example, if each video stream includes 8 frame images, and the label is represented by St, with two lights on, St=1; four lights on, St=3; and anomaly, St=2 (simplified to one / three lights on in engineering), then the generated time series can be... .
[0178] In S140, the preset rule can be expressed as follows: within a preset sliding time window, when the number of tags representing anomalies is less than a third quantity threshold, and other tags within the sliding time window represent an open or closed state, the tags representing anomalies are corrected to be the same as other tags, the third quantity threshold is less than a first quantity threshold, and the length of the sliding time window is less than the length of the video stream.
[0179] By limiting the time series analysis range through a preset sliding time window, and defining the boundary of the number of correctable pseudo-anomaly labels with a third quantity threshold (which is less than the first quantity threshold), it is ensured that only a small number of isolated anomaly labels within the window are corrected. At the same time, the remaining labels within the window are required to be in a uniform open or closed normal state, ensuring that the corrected labels are consistent with the actual time series operation state of the elevator. This approach eliminates single-frame judgment errors caused by environmental interference by removing a small number of pseudo-anomaly labels, and avoids miscorrection of persistent anomaly labels caused by faults such as door lock short circuits through the dual constraints of quantity threshold and window length. In addition, the sliding time window length is less than the video stream length, enabling real-time window-by-window correction of the label time series, balancing the robustness of time series judgment with the real-time performance of detection.
[0180] For example, a sliding time window with a preset length of less than 8 frames (e.g., 3 frames) is set, and a third quantity threshold (e.g., 1) is set that is much smaller than the threshold for determining the number of lights on. When only one label indicating an anomaly appears in the sliding time window, and the other two labels are uniform labels indicating normal door opening or closing, the abnormal label is determined to be an isolated pseudo-anomaly caused by non-fault factors such as environmental interference or registration deviation, and it is corrected to be consistent with the state of the other normal labels in the window. Since the third quantity threshold is 1, if the number of abnormal labels in the window exceeds 1, no correction is performed, which can avoid the continuous abnormality miscorrection caused by faults such as door lock short circuit.
[0181] In this embodiment, the preset rules can be deployed in the Hidden Markov Model. After obtaining the time series, the time series can be input into the Hidden Markov Model to achieve the correction of the time series.
[0182] Let the result of the indicator light at time t be: ,in This represents the on / off state of the i-th indicator light. To model its temporal dependencies, the basic form of the Hidden Markov Model is:
[0183]
[0184] in This represents the gate state at time t. This indicates the observed combination of indicator light states.
[0185] The optimal gate state sequence can be obtained using the Viterbi decoding algorithm:
[0186]
[0187] This process effectively eliminates local jitter or misjudgments, ensuring the temporal consistency of door state discrimination. This is because the Viterbi algorithm is based on the Hidden Markov Model (HMM), which assumes that the current door state depends only on the previous door state, and that the door state switching probability conforms to the physical operating laws of the elevator—that is, the door state has continuous stability (e.g., the open state will persist for a period of time without frequent instantaneous switching). This constraint filters out isolated misjudgments that violate the elevator's operating laws. Instead of performing independent single-frame judgments on each frame's LED observation results, the algorithm finds the globally optimal path from all possible door state sequences that is "most likely to generate the current entire LED observation sequence." When a local jitter occurs in a frame (such as a single-frame abnormal label), the algorithm combines the normal states of the preceding and following frames to correct the abnormality to a state consistent with the global temporal sequence, thereby eliminating the influence of local noise. Since the algorithm's output is a complete, globally optimal door state sequence, its result naturally satisfies the temporal continuity of elevator door states, avoiding isolated, physically illogical state jumps, thus effectively ensuring the temporal consistency of door state discrimination.
[0188] In some embodiments, time series correction based on a rule base can be implemented. For example, a rule base containing time series correction rules is pre-constructed. The rule base stores correction rules with sliding time windows and quantity thresholds as the core. For an elevator status label time series composed of 8 frame image labels, a sliding time window with a preset length of 3 frames and a third quantity threshold of 1 are set. The third quantity threshold is less than the first quantity threshold for determining whether the indicator light is on or off. The 3-frame sliding time window is slid frame by frame in the 8-frame label time series. When the number of labels representing an anomaly in any sliding time window is 1, and the other 2 labels in the window are in a uniform normal state of opening or closing the door, the correction rule in the rule base is triggered, and the 1 abnormal label in the window is corrected to a state consistent with the other normal labels. If the number of abnormal labels in the sliding time window exceeds 1, the correction rule is not triggered, and the original abnormal label is retained. Through the preset rules of the rule base, only a small number of isolated pseudo-abnormal labels in the time series are corrected in time series, while the persistent abnormal labels caused by the fault are retained, thereby achieving accurate time series correction of the 8-frame label time series.
[0189] In S150, after obtaining the corrected time series, the existence of a short circuit is identified based on the corrected time series. Therefore, as... Figure 5 As shown, S150 may specifically include the following steps.
[0190] S151: Obtain the number of labels representing abnormal states in the corrected time series, or elevator operation data with the same timestamp as the frame image, wherein all the labels of the abnormal states are consecutive in time;
[0191] S152: When the number of tags representing abnormal states exceeds a first quantity threshold, or the number of tags that do not correspond to elevator operation data with the same timestamp exceeds a second quantity threshold, the identification result is that a short circuit exists.
[0192] For example:
[0193] Suppose we have a time series of elevator status labels containing 8 frames, as well as synchronized elevator operation data.
[0194] The corrected time series labels (8 frames in total) are as follows: Closed-Closed-Abnormal-Abnormal-Abnormal-Abnormal-Closed-Closed. Here, the number of consecutive abnormal labels is 4. If we set the first threshold to 3, then the number of consecutive abnormal labels of 4 exceeds the first threshold of 3.
[0195] The comparison between the revised time series data and elevator operation data is shown in the table below:
[0196]
[0197] Frames 6-8 should show the door closed, but the corrected time series shows the door open, which indicates a discrepancy with the elevator operation data and suggests a short circuit.
[0198] In this embodiment, the processing module can be an integrated circuit chip with signal processing capabilities. The processing module can be a general-purpose processor. For example, the processor can be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0199] The storage module can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding steps in the aforementioned method, and will not be elaborated further here.
[0200] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the elevator door lock short-circuit identification method as described in the above embodiments.
[0201] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the elevator door lock short-circuit identification method described above. The computer program product may exist in a computer-readable storage medium in forms including, but not limited to, source files, executable files, and installation package files.
[0202] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, electronic device, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.
[0203] In the embodiments provided in this application, it should be understood that the disclosed methods can also be implemented in other ways. The method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0204] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for identifying short circuits in elevator door locks, characterized in that, The method includes: Acquire a video stream obtained by capturing the indicator light area, the video stream comprising multiple consecutive frame images, each frame image having all the indicator lights arranged in the indicator light area; Based on a preset strategy, a label is added to each frame image. When the number of indicator lights in the lit state is a first preset number, the label indicates that the elevator state corresponding to the timestamp of the frame image is the closed state. When the number of indicator lights in the lit state is a second preset number, the label indicates that the elevator state corresponding to the timestamp of the frame image is the open state. When the number of indicator lights in the lit state is any other number, the label indicates that the elevator state corresponding to the timestamp of the frame image is the abnormal state. Based on the timestamp of each frame image in the video stream, the tags are arranged according to the timestamps to obtain the time sequence of the tags; The labels representing anomalies in the time series that conform to preset rules are corrected to labels representing closed or open states, resulting in a corrected time series. Based on the corrected time series, the identification result is output, which is used to characterize whether the elevator door lock has a short circuit; Between acquiring the video stream and adding labels to each frame image based on a preset strategy, the method further includes: Obtain a pre-defined standard template for a designated area of the elevator; Based on the standard template, the frame image is corrected to obtain the corrected frame image; Obtain the center point coordinates of each indicator light that has been pre-calibrated on the corrected frame image; On the corrected frame image, a first pixel region and a second pixel region centered on the center point coordinates are obtained. The pixel areas of the first pixel region and the second pixel region are respectively a first specified value and a second specified value. The first pixel region is used to characterize the light-emitting core of the indicator light. The area between the edge of the first pixel region and the edge of the second pixel region is used to characterize the background core of the indicator light. The first pixel region is located within the second pixel region. The edges of the second pixel region corresponding to each indicator light are cropped to obtain the total pixel region of each indicator light, so that the step of adding a label to each frame image based on a preset strategy is performed according to the total pixel region; The step of adding tags to each frame image based on a preset strategy includes: The blurriness of the corresponding indicator light emission is obtained based on the average brightness of the first pixel region and the average brightness of the second pixel region; Calculate the first sum of all the aforementioned ambiguities; Based on the first sum, the first prior probability is obtained when the number of indicator lights in the lit state is either a first preset number or a second preset number; The total pixel area is input into a deep learning model, and the confidence level of the corresponding indicator light is obtained through the deep learning model. Calculate the second sum of all the stated confidence levels; Based on the second sum, the second prior probability is obtained when the number of indicator lights in the lit state is either a first preset number or a second preset number; Based on the ambiguity, a first weight of the first prior probability is determined, and based on the confidence level, a second weight of the second prior probability is determined; Based on the first weight and the second weight, the first prior probability and the second prior probability are fused to obtain the fused prior probability; The label of the corresponding frame image is determined based on the fused prior probability of each frame image.
2. The method according to claim 1, characterized in that, The first prior probability and the second prior probability are fused based on the first weight and the second weight to obtain the fused prior probability. Both the first prior probability and the second prior probability are transformed using the logit method to obtain the first transformed probability and the second transformed probability, respectively. Based on the first weight and the second weight, the first transformed probability and the second transformed probability are fused using a logit method to obtain the initial probability; The scaled probability is obtained by scaling the initial probability using a pre-set temperature parameter. The scaled probabilities are mapped using a Sigmoid algorithm to obtain the fused prior probabilities.
3. The method according to claim 1, characterized in that, Based on the fused prior probability of each frame image, the label corresponding to the frame image is determined, including: The first and second sums are weighted and averaged to obtain the weighted sum. When the fused prior probability is greater than a pre-obtained probability threshold and the weighted sum is within a first preset range, the number of indicator lights in the corresponding frame image used to represent the lit state is a first preset number. When the fused prior probability is less than a pre-obtained probability threshold and the weighted sum is within a second preset range, the number of indicator lights in the corresponding frame image used to represent the lit state is the second preset number. When the fused prior probability is greater than a pre-obtained probability threshold and the weighted sum is not within a first preset interval, or when the fused prior probability is less than a pre-obtained probability threshold and the weighted sum is not within a second preset interval, the label of the corresponding frame image is used to characterize the abnormal state. The first preset quantity is less than the second preset quantity, and the maximum value of the first preset interval is less than the minimum value of the second preset interval.
4. The method according to claim 1, characterized in that, The step of outputting the recognition result based on the corrected time series includes: Obtain the number of labels representing abnormal states in the corrected time series, or elevator operation data with the same timestamp as the frame image, wherein all the labels of the abnormal states are consecutive in time; When the number of tags representing abnormal states exceeds a first threshold, or when the number of tags that do not correspond to elevator operation data with the same timestamp exceeds a second threshold, the identification result is that a short circuit exists.
5. The method according to claim 4, characterized in that, The step of correcting the labels representing anomalies in the time series that conform to preset rules to labels representing a closed or open state, to obtain a corrected time series, includes: Within a preset sliding time window, if the number of tags representing anomalies is less than a third quantity threshold, and other tags within the sliding time window represent an open or closed state, then the tags representing anomalies are corrected to be the same as other tags. The third quantity threshold is less than a first quantity threshold, and the length of the sliding time window is less than the length of the video stream.
6. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled together, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-5.
8. A program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-5.