Door lock detection method and device, electronic equipment and storage medium
By using two independent detection methods for series detection in the door lock detection system, the problem that the existing door lock detection technology is susceptible to external interference and electromagnetic interference is solved, and higher detection accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510016353.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-23
AI Technical Summary
The existing door lock detection technology is easily affected by external factors, resulting in errors in judgment, and electronic detection is easily affected by electromagnetic interference and false alarms, and lacks the problem of avoiding the failure of a single detection method.
Two independent detection methods (Hall sensing element, photoelectric sensing element, micro switch) are used for series detection, and the door lock status is comprehensively judged through the results of the first and second detection elements, ensuring that the door lock detection result is determined only when both methods verify the door lock status.
It improves the accuracy and reliability of door lock detection, avoids the problem of failure of a single detection method, reduces the possibility of misjudgment, and enhances the overall reliability of the system.
Smart Images

Figure CN120026793A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart door locks, and in particular to a door lock detection method, device, electronic equipment and storage medium. Background Art
[0002] With the continuous development of science and technology, door lock detection technology provides users with a safer and more convenient home experience. As an important part of home security, door locks have undergone many technological innovations and are developing in the direction of intelligence, networking and integration.
[0003] At present, door lock detection technologies mainly include mechanical and electronic types. The mechanical detection method mainly relies on the mechanical structure of the door lock, and judges whether the door is locked by observing the position of the lock tongue. Mechanical detection is easily affected by external factors, resulting in misjudgment. The electronic detection method uses electromagnetic principles to judge the state of the door lock by detecting changes in parameters such as current and voltage. For example, the door lock state is judged by detecting the electromagnetic induction intensity between the lock tongue and the lock body, or the change in the position of the lock tongue is detected by the Hall effect. The opening and closing of the micro switch can also be judged by the conduction of the line. However, electronic detection is susceptible to electromagnetic interference, which affects the detection results. In harsh environments, electronic detection equipment is prone to false alarms.
[0004] Therefore, it is particularly important to develop a door lock detection method, device, electronic device and storage medium that can avoid the failure problem of a single door lock detection method and improve the accuracy and reliability of door lock detection. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a door lock detection method, device, electronic device and storage medium, which can solve the current problem of lack of door lock detection method that can avoid the failure of a single door lock detection method and improve the accuracy and reliability of door lock detection.
[0006] The technical solutions provided by this application are as follows:
[0007] In one aspect, the present application provides a door lock detection method, the door lock detection method comprising:
[0008] Acquire a detection result detected by a first detection element, and determine an opening and closing result of the first door lock according to the detection result detected by the first detection element, wherein the first detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch; when the first detection element is the Hall sensor element, the detection result is a change in the magnetic field of the magnetic material; when the first detection element is the photoelectric sensor element, the detection result is a change in light intensity; when the first detection element is the micro switch, the detection result is an opening and closing condition of the micro switch;
[0009] Obtaining a detection result detected by a second detection element, and determining an opening and closing result of the second door lock according to the detection result detected by the second detection element, wherein the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element;
[0010] The door lock detection result is determined according to the first door lock opening and closing result and the second door lock opening and closing result.
[0011] In some optional implementations, the acquiring the detection result detected by the first detection element, and determining the opening and closing result of the first door lock according to the detection result detected by the first detection element, includes:
[0012] In the case where the first detection element is the Hall sensor element, obtaining a change in the magnetic field of the magnetic material detected by the Hall sensor element;
[0013] When the magnetic field change of the magnetic material is greater than the magnetic field change threshold, the first door lock opening and closing result is determined to be the result of the door lock being closed; when the magnetic field change of the magnetic material is less than or equal to the magnetic field change threshold, the first door lock opening and closing result is determined to be the result of the door lock being opened.
[0014] In some optional implementations, the acquiring the detection result detected by the first detection element, and determining the opening and closing result of the first door lock according to the detection result detected by the first detection element, includes:
[0015] In the case where the first detection element is the photoelectric sensor element, obtaining the light intensity change detected by the photoelectric sensor element;
[0016] When the light intensity change is greater than the light intensity change threshold, the first door lock opening and closing result is determined to be the result of the door lock being opened; when the light intensity change is less than or equal to the light intensity change threshold, the first door lock opening and closing result is determined to be the result of the door lock being closed.
[0017] In some optional implementations, the acquiring the detection result detected by the first detection element, and determining the opening and closing result of the first door lock according to the detection result detected by the first detection element, includes:
[0018] When the first detection element is the micro switch, obtaining the opening and closing status of the micro switch;
[0019] When the micro switch is on, the first door lock opening and closing result is determined to be the result of the door lock being opened; when the micro switch is off, the first door lock opening and closing result is determined to be the result of the door lock being closed.
[0020] In some optional implementations, determining the door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result includes:
[0021] When the first door lock opening and closing result is an opening result, and the second door lock opening and closing result is an opening result, determining that the door lock detection result is a door lock opening result;
[0022] When the first door lock opening and closing result is a closed result, and the second door lock opening and closing result is a closed result, determining that the door lock detection result is a door lock closed result;
[0023] When the first door lock opening and closing result is an opening result, and the second door lock opening and closing result is a closing result, determining that the door lock detection result is a door lock abnormality result;
[0024] When the first door lock opening and closing result is a closed result and the second door lock opening and closing result is an open result, it is determined that the door lock detection result is a result of door lock abnormality.
[0025] In some optional embodiments, the magnetic material is spring steel.
[0026] In some optional implementations, the photoelectric sensor element includes a light emitting end and a light receiving end, and when the first detection element is the photoelectric sensor element, obtaining the light intensity change detected by the photoelectric sensor element includes:
[0027] In the case where the first detection element is the photoelectric sensor element, obtaining a first light intensity emitted by a light emitting end, and obtaining a second light intensity received by a light receiving end;
[0028] The difference between the first light intensity and the second light intensity is calculated, and the difference is determined as the light intensity variation.
[0029] In some optional implementations, after determining the door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result, the method further includes:
[0030] When the number of times that the door lock detection result is a result of door lock abnormality reaches a preset number, it is determined that the door lock detection result is a detection result of door lock failure.
[0031] In some alternative embodiments, the door lock detection device includes a detection module and a main control module;
[0032] The detection module is configured to obtain a first detection result detected by a first detection element, where the first detection element is any one of a Hall sensing element, an optoelectronic sensing element, and a micro switch; and is configured to obtain a second detection result of a second detection element, where the second detection element is any one of a Hall sensing element, an optoelectronic sensing element, and a micro switch other than the first detection element;
[0033] The main control module is configured to determine a first door lock opening / closing result according to the detection result detected by the first detection element, and is configured to determine a second door lock opening / closing result according to the detection result detected by the second detection element. When the first detection element is the Hall sensing element, the detection result is the magnetic field change amount of the magnetic material; when the first detection element is the optoelectronic sensing element, the detection result is the light intensity change amount; when the first detection element is the micro switch, the detection result is the opening / closing condition of the micro switch.
[0034] On the other hand, the present application provides an electronic device, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the door lock detection method according to any one of the above embodiments.
[0035] On the other hand, the present application provides a computer-readable storage medium, in which at least one instruction or at least one program segment is stored, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the door lock detection method according to any one of the above embodiments.
[0036] The door lock detection method provided by the present application obtains the detection result detected by the first detection element, and determines the opening and closing result of the first door lock according to the detection result detected by the first detection element, wherein the first detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch; when the first detection element is the Hall sensor element, the detection result is the magnetic field change of the magnetic material; when the first detection element is the photoelectric sensor element, the detection result is the light intensity change; when the first detection element is the micro switch, the detection result is the opening and closing condition of the micro switch; obtains the detection result detected by the second detection element, and determines the opening and closing result of the second door lock according to the detection result detected by the second detection element, wherein the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element; determines the door lock detection result according to the opening and closing result of the first door lock and the opening and closing result of the second door lock. Through the serial detection of the two detection methods, the failure problem of a single door lock detection method is avoided, and the accuracy and reliability of door lock detection are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 is a flow chart of a door lock detection method proposed according to an embodiment of the present invention;
[0039] Figure 2 is a schematic diagram of a Hall sensor element in a door lock detection method proposed according to an embodiment of the present invention;
[0040] Figure 3 Schematic diagram of a photoelectric sensor element in a door lock detection method according to an embodiment of the present invention.
[0041] The following is a supplementary description of the attached drawings:
[0042] 1-Dishwasher; 2-Spring steel; 3-Hall sensor element; 4-Roller;
[0043] 5-photoelectric sensor element; 51-light emitting end; 52-light receiving end. DETAILED DESCRIPTION
[0044] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] The term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present application. In the description of the present application, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "top", "bottom", etc. is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may include one or more of the features explicitly or implicitly. Moreover, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0046] When a numerical range is disclosed herein, the above range is deemed to be continuous and includes the minimum and maximum values of the range, as well as each value between such minimum and maximum values. Further, when a range refers to an integer, each integer between the minimum and maximum values of the range is included. In addition, when multiple ranges are provided to describe features or characteristics, the ranges can be merged. In other words, unless otherwise indicated, all ranges disclosed herein should be understood to include any and all sub-ranges included therein. For example, a specified range from "1 to 10" should be deemed to include any and all sub-ranges between a minimum of 1 and a maximum of 10. Exemplary sub-ranges of ranges 1 to 10 include, but are not limited to, 1 to 6.1, 3.5 to 7.8, 5.5 to 10, etc.
[0047] Since there is currently a lack of a door lock detection method that can avoid the failure problem of a single door lock detection method and improve the accuracy and reliability of door lock detection, therefore, in order to avoid the failure problem of a single door lock detection method and improve the accuracy and reliability of door lock detection, the present application provides a door lock detection method.
[0048] See also Figure 1 , Figure 11 is a flow chart of a door lock detection method proposed according to an embodiment of the present invention. The present application provides a door lock detection method, the door lock detection method comprising:
[0049] S101. Obtain the detection result detected by the first detection element, and determine the opening and closing result of the first door lock according to the detection result detected by the first detection element, wherein the first detection element is any one of the Hall sensor element 3, the photoelectric sensor element 5, and the micro switch; when the first detection element is the Hall sensor element 3, the detection result is the change in the magnetic field of the magnetic material; when the first detection element is the photoelectric sensor element 5, the detection result is the change in light intensity; when the first detection element is the micro switch, the detection result is the opening and closing status of the micro switch.
[0050] Optionally, any one of the Hall sensor element 3, the photoelectric sensor element 5, and the micro switch is set as the first detection element, and the opening and closing results of the first door lock are determined according to the detection results detected by the first detection element. The Hall sensor element 3 is used to detect the change in the magnetic field of the magnetic material, the photoelectric sensor element 5 is used to detect the change in light intensity, and the micro switch is used to directly determine the conduction status of the circuit.
[0051] In an optional embodiment, the acquiring the detection result detected by the first detection element and determining the opening and closing result of the first door lock according to the detection result detected by the first detection element includes:
[0052] In the case where the first detection element is the Hall sensor element 3, obtaining a change in the magnetic field of the magnetic material detected by the Hall sensor element 3;
[0053] When the magnetic field change of the magnetic material is greater than the magnetic field change threshold, the first door lock opening and closing result is determined to be the result of the door lock being closed; when the magnetic field change of the magnetic material is less than or equal to the magnetic field change threshold, the first door lock opening and closing result is determined to be the result of the door lock being opened.
[0054] In an optional embodiment, the magnetic material is spring steel 2.
[0055] See also Figure 2 , Figure 2It is a schematic diagram of the Hall sensor element in the door lock detection method proposed according to an embodiment of the present invention. Optionally, the detection element can be a Hall sensor element 3, which is arranged above the spring steel 2. The center of the Hall sensor element 3 and the center of the spring steel 2 are on a vertical line. The spring steel 2 is arranged on the outer edge of the dishwasher shape 1 through a roller 4 and a pull rope. The door opening force and the rebound force are maintained by the pull rope, the roller 4 and the spring steel 2. The distance between the Hall sensor element 3 and the spring steel 2 can be set according to actual business needs and is not limited here.
[0056] Optionally, during the door opening process, the pull rope will move toward the door body, and the length of the pull rope will not change, so the movement of the pull rope will cause the spring steel 2 to stretch and generate a rebound force; during the door closing process, the pull rope will move toward the spring steel, and the spring steel will shrink until the door is completely closed and the spring steel shrinks to a natural state, that is, during the door opening and closing process, the spring steel 2 will be stretched or contracted with the opening and closing angle of the door body. At the same time, the spring steel 2 is a magnetic material, and its internal magnetic field will change during the stretching and contraction process.
[0057] Optionally, the Hall sensor element 3 can detect the change of the magnetic field of the spring steel 2, and will generate a voltage signal at the output end. The magnitude of this voltage signal is proportional to the magnetic field strength of the spring steel 2. When the spring steel 2 is stretched, the magnetic field may become sparse, and when the spring steel 2 is contracted, the magnetic field may become denser. When the door lock is closed, the spring steel 2 is in its original state, the Hall sensor element 3 detects a reference magnetic field strength, and outputs a corresponding reference voltage signal. When the door lock is opened, the spring steel 2 is stretched or contracted, causing the magnetic field strength to change. The Hall sensor element 3 detects the changed magnetic field and outputs a voltage signal corresponding to the changed magnetic field.
[0058] Optionally, through prior calibration, a corresponding relationship between magnetic field strength and door opening angle can be established. When the door is opened or closed, the deformation degree of spring steel 2 can be calculated based on the voltage signal output by Hall sensor element 3, and then the door opening angle can be deduced. When the door is completely closed, the spring steel should return to an unstressed state, and the magnetic field detected by Hall sensor 3 should return to a reference state. If the voltage signal output by Hall sensor element 3 is consistent with the reference voltage signal or within a very small error range, it can be determined that the door is completely closed. If there is a significant difference in the signal, it means that the door is not completely closed. The error range can be set according to actual business needs and is not limited here.
[0059] The Hall sensor element 3 can provide high-precision magnetic field change data, so that the door opening angle can be accurately measured and the door status can be accurately monitored. The Hall sensor element 3 does not need to be in direct contact with the spring steel 2, so it will not be affected by wear and mechanical fatigue, thereby improving the reliability and life of the system.
[0060] In an optional embodiment, the acquiring the detection result detected by the first detection element and determining the opening and closing result of the first door lock according to the detection result detected by the first detection element includes:
[0061] In the case where the first detection element is the photoelectric sensor element, obtaining the light intensity change detected by the photoelectric sensor element;
[0062] When the light intensity change is greater than the light intensity change threshold, the first door lock opening and closing result is determined to be the result of the door lock being opened; when the light intensity change is less than or equal to the light intensity change threshold, the first door lock opening and closing result is determined to be the result of the door lock being closed.
[0063] See also Figure 3 , Figure 3 It is a schematic diagram of the photoelectric sensor element in the door lock detection method proposed according to an embodiment of the present invention. Optionally, the detection element can be a photoelectric sensor element 5. The photoelectric sensor element 5 is arranged on both sides of the pull rope of the dishwasher in the vertical direction, and the photoelectric sensor element 5 is arranged on one side of the spring steel 2 in the horizontal direction. The distance between the photoelectric sensor element 5 and the pull rope can be set according to actual business needs and is not limited here. The distance between one side of the photoelectric sensor element 5 and one side of the spring steel 2 is the distance that the door lock device is disengaged from the corresponding spring steel 2.
[0064] In an optional embodiment, the photoelectric sensor element 5 includes a light emitting end 51 and a light receiving end 52. When the first detection element is the photoelectric sensor element 5, obtaining the light intensity change detected by the photoelectric sensor element 5 includes:
[0065] In the case where the first detection element is the photoelectric sensor element 5, a first light intensity emitted by the light emitting end 51 is obtained, and a second light intensity received by the light receiving end 52 is obtained;
[0066] The difference between the first light intensity and the second light intensity is calculated, and the difference is determined as the light intensity variation.
[0067] Optionally, a light emitting end 51 of the photoelectric sensor element 5 is installed at the upper end of the pull rope, and a light receiving end 52 of the photoelectric sensor element 5 is installed at the lower end of the pull rope. When the door is closed, the photoelectric sensor element 5 detects the pull rope and determines that the door lock is closed. When the door is opened, the photoelectric sensor element 5 detects spring steel and determines that the door lock is open.
[0068] Optionally, when the door lock state changes, it will affect the light passing between the light emitting end 51 and the light receiving end 52, thereby changing the light intensity received by the light receiving end 52.
[0069] Optionally, the difference between the first light intensity and the second light intensity is calculated and determined as the light intensity change. When the light intensity change is less than a threshold value, it indicates that the light intensity change is caused by the obstruction of the pull rope, and the door lock is judged to be closed. When the light intensity change is greater than or equal to the threshold value, it indicates that the light intensity change is caused by the obstruction of the spring steel 2, and the door lock is judged to be open. The threshold can be set according to actual business needs and is not limited here.
[0070] The open or closed state of the door lock is determined by the photoelectric sensor element 5 emitting and receiving changes in light intensity. The response time of the photoelectric sensor 5 is usually very short, and the changes in the door lock state can be monitored in real time and respond quickly. The installation of the photoelectric sensor is usually simple, does not require complicated wiring, and can be deployed quickly.
[0071] In an optional embodiment, the acquiring the detection result detected by the first detection element and determining the opening and closing result of the first door lock according to the detection result detected by the first detection element includes:
[0072] When the first detection element is the micro switch, obtaining the opening and closing status of the micro switch;
[0073] When the micro switch is on, the first door lock opening and closing result is determined to be the result of the door lock being opened; when the micro switch is off, the first door lock opening and closing result is determined to be the result of the door lock being closed.
[0074] Optionally, the detection element can be a micro switch, which is a mechanical switch. When the door lock buckle presses the micro switch when the door is closed, the contacts inside the switch will close, thereby turning on the circuit, and this signal will be transmitted to the main control module; the main control module detects the signal from the micro switch. If the door is closed and the lock buckle correctly presses the micro switch, the main control module will receive a low-level or high-level signal, depending on the specific design of the circuit, and judge whether the door has been correctly closed and locked based on the received signal.
[0075] The conduction status of the circuit is determined by the micro switch, thereby judging whether the door lock is open or closed. The micro switch is an electronic component with simple structure and high reliability. Its mechanical action is intuitive and easy to understand, so the failure rate is low. It can provide direct physical contact feedback. When the door lock is closed correctly, the main control module can immediately receive a clear signal, providing the user with intuitive operation feedback.
[0076] S102. Obtaining a detection result detected by a second detection element, and determining an opening and closing result of the second door lock according to the detection result detected by the second detection element, wherein the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element;
[0077] Optionally, any one of the Hall sensor element 3, the photoelectric sensor element 5, and the micro switch that is different from the first detection element is set as the second detection element, and the second detection element is set and detected according to the above setting method and detection method.
[0078] S103. Determine a door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result.
[0079] Optionally, two methods are used to detect the door lock, and the two detection methods are connected in series. The main control module determines the door lock detection result according to the detection results of the first detection element and the second detection element.
[0080] In an optional embodiment, determining the door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result includes:
[0081] When the first door lock opening and closing result is an opening result, and the second door lock opening and closing result is an opening result, determining that the door lock detection result is a door lock opening result;
[0082] When the first door lock opening and closing result is a closed result, and the second door lock opening and closing result is a closed result, determining that the door lock detection result is a door lock closed result;
[0083] When the first door lock opening and closing result is an opening result, and the second door lock opening and closing result is a closing result, determining that the door lock detection result is a door lock abnormality result;
[0084] When the first door lock opening and closing result is a closed result and the second door lock opening and closing result is an open result, it is determined that the door lock detection result is a result of door lock abnormality.
[0085] Optionally, the door lock detection result of the detection element is determined by a main control module, which is arranged at the bottom of the dishwasher. The main control module and the detection element are electrically connected, and the detection result of the detection element is sent to the main control module, which determines the door lock detection result.
[0086] Optionally, when the detection results of the first detection element and the second detection element are both open results, the main control module determines that the door lock detection result is a result that the door lock is open.
[0087] Optionally, when the detection results of the first detection element and the second detection element are both closed results, the main control module determines that the door lock detection result is a result that the door lock is closed.
[0088] Optionally, when one of the detection results of the first detection element and the second detection element is an open result and the other is a closed result, the main control module determines that the door lock detection result is a result of door lock abnormality.
[0089] By connecting two independent detection methods in series for joint detection, higher security is ensured. Only when both methods verify the door lock status can the door lock detection result be determined, which can reduce the possibility of misjudgment and improve the accuracy of detection, thereby improving the reliability of the overall system and avoiding the problem of failure of a single detection method.
[0090] In an optional embodiment, after determining the door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result, the method further includes:
[0091] When the number of times that the door lock detection result is a result of door lock abnormality reaches a preset number, it is determined that the door lock detection result is a detection result of door lock failure.
[0092] Optionally, when one of the detection results of the first detection element and the second detection element is an open result and the other is a closed result, the main control module determines that the door lock detection result is a door lock abnormality, and the main control module issues an alarm.
[0093] Optionally, the preset number of times can be set according to actual business needs and is not limited here. For example, the preset number of times can be 2 times. When the door lock detection result is that the door lock is abnormal and the main control module sends out an alarm twice, it is determined that the door lock detection result is a door lock failure detection result, and the user needs to wait for technicians to come to the door for inspection and repair.
[0094] By using a preset number of abnormal detection results to finally determine the door lock failure, we can reduce the situation where a single abnormal detection is judged as a failure, ensure the accuracy of fault judgment, and at the same time improve the intelligence level of the system, reduce human intervention, and improve the overall performance of the system and user satisfaction.
[0095] In an optional embodiment, the present application provides a door lock detection device, the door lock detection device comprising a detection module and a main control module;
[0096] The detection module is used to obtain a first detection result detected by a first detection element, where the first detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch; and to obtain a second detection result of a second detection element, where the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element;
[0097] The main control module is used to determine the opening and closing results of the first door lock according to the detection results detected by the first detection element, and is used to determine the opening and closing results of the second door lock according to the detection results detected by the second detection element. When the first detection element is the Hall sensor element, the detection result is the change in magnetic field of the magnetic material; when the first detection element is the photoelectric sensor element, the detection result is the change in light intensity; when the first detection element is the micro switch, the detection result is the opening and closing status of the micro switch.
[0098] In an optional embodiment, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement a door lock detection method as described in any one of the above embodiments.
[0099] In an optional embodiment, the present application provides a computer-readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by a processor to implement a door lock detection method as described in any one of the above embodiments.
[0100] The door lock detection method provided by the present application obtains the detection result detected by the first detection element, and determines the opening and closing result of the first door lock according to the detection result detected by the first detection element, wherein the first detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch; when the first detection element is the Hall sensor element, the detection result is the magnetic field change of the magnetic material; when the first detection element is the photoelectric sensor element, the detection result is the light intensity change; when the first detection element is the micro switch, the detection result is the opening and closing condition of the micro switch; obtains the detection result detected by the second detection element, and determines the opening and closing result of the second door lock according to the detection result detected by the second detection element, wherein the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element; determines the door lock detection result according to the opening and closing result of the first door lock and the opening and closing result of the second door lock. The door lock detection method provided by the present application avoids the failure problem of a single door lock detection method through the series detection of two detection methods, and improves the accuracy and reliability of door lock detection.
[0101] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A door lock detection method, characterized in that: The door lock detection method comprises: Acquire a detection result detected by a first detection element, and determine an opening and closing result of the first door lock according to the detection result detected by the first detection element, wherein the first detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch; when the first detection element is the Hall sensor element, the detection result is a change in the magnetic field of the magnetic material; when the first detection element is the photoelectric sensor element, the detection result is a change in light intensity; when the first detection element is the micro switch, the detection result is an opening and closing condition of the micro switch; Obtaining a detection result detected by a second detection element, and determining an opening and closing result of the second door lock according to the detection result detected by the second detection element, wherein the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element; The door lock detection result is determined according to the first door lock opening and closing result and the second door lock opening and closing result.
2. The door lock detection method according to claim 1, characterized in that: The step of obtaining a detection result detected by the first detection element and determining an opening and closing result of the first door lock according to the detection result detected by the first detection element includes: In the case where the first detection element is the Hall sensor element, obtaining a change in the magnetic field of the magnetic material detected by the Hall sensor element; When the magnetic field change of the magnetic material is greater than the magnetic field change threshold, the first door lock opening and closing result is determined to be the result of the door lock being closed; when the magnetic field change of the magnetic material is less than or equal to the magnetic field change threshold, the first door lock opening and closing result is determined to be the result of the door lock being opened.
3. The door lock detection method according to claim 1, characterized in that: The step of obtaining a detection result detected by the first detection element and determining an opening and closing result of the first door lock according to the detection result detected by the first detection element includes: In the case where the first detection element is the photoelectric sensor element, obtaining the light intensity change detected by the photoelectric sensor element; When the light intensity change is greater than the light intensity change threshold, the first door lock opening and closing result is determined to be the result of the door lock being opened; when the light intensity change is less than or equal to the light intensity change threshold, the first door lock opening and closing result is determined to be the result of the door lock being closed.
4. The door lock detection method according to claim 1, characterized in that: The step of obtaining a detection result detected by the first detection element and determining an opening and closing result of the first door lock according to the detection result detected by the first detection element includes: When the first detection element is the micro switch, obtaining the opening and closing status of the micro switch; When the micro switch is on, the first door lock opening and closing result is determined to be the result of the door lock being opened; when the micro switch is off, the first door lock opening and closing result is determined to be the result of the door lock being closed.
5. The door lock detection method according to claim 1, characterized in that: The determining the door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result includes: When the first door lock opening and closing result is an opening result, and the second door lock opening and closing result is an opening result, determining that the door lock detection result is a door lock opening result; When the first door lock opening and closing result is a closed result, and the second door lock opening and closing result is a closed result, determining that the door lock detection result is a door lock closed result; When the first door lock opening and closing result is an opening result, and the second door lock opening and closing result is a closing result, determining that the door lock detection result is a door lock abnormality result; When the first door lock opening and closing result is a closed result and the second door lock opening and closing result is an open result, it is determined that the door lock detection result is a result of door lock abnormality.
6. The door lock detection method according to claim 3, characterized in that: The magnetic material is spring steel.
7. The door lock detection method according to claim 3, characterized in that: The photoelectric sensor element includes a light emitting end and a light receiving end. When the first detection element is the photoelectric sensor element, obtaining the light intensity change detected by the photoelectric sensor element includes: In the case where the first detection element is the photoelectric sensor element, obtaining a first light intensity emitted by a light emitting end, and obtaining a second light intensity received by a light receiving end; The difference between the first light intensity and the second light intensity is calculated, and the difference is determined as the light intensity variation.
8. The door lock detection method according to claim 5, characterized in that: After determining the door lock detection result according to the first door lock opening and closing result and the second door lock opening and closing result, the method further includes: When the number of times that the door lock detection result is a result of door lock abnormality reaches a preset number, it is determined that the door lock detection result is a detection result of door lock failure.
9. A door lock detection device, characterized in that: The door lock detection device includes a detection module and a main control module; The detection module is used to obtain a first detection result detected by a first detection element, where the first detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch; and for obtaining a second detection result of a second detection element, where the second detection element is any one of a Hall sensor element, a photoelectric sensor element, and a micro switch except the first detection element; The main control module is used to determine the opening and closing results of the first door lock according to the detection results detected by the first detection element, and is used to determine the opening and closing results of the second door lock according to the detection results detected by the second detection element. When the first detection element is the Hall sensor element, the detection result is the change in the magnetic field of the magnetic material; when the first detection element is the photoelectric sensor element, the detection result is the change in light intensity; when the first detection element is the micro switch, the detection result is the opening and closing status of the micro switch.
10. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and the at least one instruction or at least one program is loaded and executed by the processor to implement the door lock detection method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the door lock detection method according to any one of claims 1 to 8.
Citation Information
Cited By
Monitoring method and system for outdoor cabinet door of converter station
CN120802384A