Fault processing method and device, equipment and medium

By identifying the PI level abnormality of the stepper motor and obtaining the correction step length, controlling the stepper motor to move to the correct PI position, the virtual focus problem caused by PI failure in the prior art is solved, and the accurate zooming or focusing of the camera is achieved.

CN119603445AInactive Publication Date: 2025-03-11ZHEJIANG DAHUA TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510114269.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-03-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when the optical shutter (PI) fails, it is impossible to accurately determine the position of the stepper motor, resulting in a false focus problem of the camera, which seriously affects normal use.

Method used

By identifying the PI level abnormality corresponding to the target stepper motor of the target lens, obtain the saved correction step length, control the stepper motor to move to the preset position, and move in the preset direction according to the correction step length, update the position of the stepper motor to be the PI position, and determine it as the reference point.

Benefits of technology

Fast and reliably move the stepper motor to the correct PI position according to the correct step length, improving the dummy focus problem caused by PI abnormalities, allowing the camera to acquire clear images and achieve accurate zoom or focus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603445A_ABST
    Figure CN119603445A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cameras, in particular to a fault processing method and device, equipment and a medium. In the embodiment of the invention, if a PI level corresponding to a target stepping motor of a target lens is identified to be abnormal, a stored correction step length corresponding to the target stepping motor is acquired; controlling the target stepping motor to move to a preset position, and controlling the target stepping motor to move in a preset direction according to the corrected step length; and updating the position of the moved target stepping motor to the PI position corresponding to the target stepping motor. When the PI abnormity exists, the stepping motor can be rapidly and reliably moved to the correct PI position according to the correction step length, so that the virtual focus problem caused by the PI abnormity is improved, a camera can obtain a clear image through the PI position corresponding to the adjusted motor, and accurate zooming or focusing is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera technology, and in particular to a fault handling method, device, equipment and medium. Background Art

[0002] Most zoom lenses used in cameras are precisely controlled by stepper motors driving the zoom optical group and the focus optical group. The photo interrupter (PI) in the lens provides a reference point for position control for the stepper motor. When the lens is powered on for self-test, the position of the reference point can be determined by checking the level jumps on both sides of the PI.

[0003] However, in actual application, PI abnormality is a common fault of zoom lenses, that is, the electrical levels on both sides of the PI position corresponding to the stepper motor are consistent. When this fault occurs, the position of the stepper motor cannot be accurately determined, which leads to the camera out-of-focus problem, seriously affecting the normal use of the camera. Summary of the invention

[0004] The present application provides a fault handling method, device, equipment and medium to solve the problem in the prior art that when a PI fails, the position of the stepper motor cannot be accurately determined, which leads to a camera out-of-focus problem and seriously affects the normal use of the camera.

[0005] In a first aspect, an embodiment of the present application provides a fault handling method, the method comprising: If it is identified that the PI level corresponding to the target stepping motor of the target lens is abnormal, the saved correction step length corresponding to the target stepping motor is obtained; wherein the correction step length is used to determine the correct PI position; Controlling the target stepper motor to move to a first preset position, and controlling the target stepper motor to move in a preset direction according to the corrected step length; The position of the target stepper motor after movement is updated as the PI position corresponding to the target stepper motor, and the PI position is determined as the reference point corresponding to the target stepper motor.

[0006] Further, if it is identified that the PI level corresponding to the target stepping motor of the target lens is normal, the method further includes: Controlling the target stepping motor to move to the first preset position; Controlling the target stepper motor to move along the preset direction and detecting the PI level corresponding to the target stepper motor until the PI level changes; The step length that the target stepping motor has currently moved is determined, and the saved correction step length is updated using the moved step length.

[0007] Further, controlling the target stepper motor to move to a first preset position includes: Controlling the target stepper motor to move from a current PI position to a second preset position at a first speed; wherein the first preset position is a boundary of an optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; The target stepping motor is controlled to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0008] Further, the identifying that the PI level corresponding to the target stepping motor of the target lens is abnormal includes: The reference point corresponding to each stepping motor of the target lens is determined by using a lens self-check method; wherein the reference point is a position where the level of the stepping motor jumps; If the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

[0009] Furthermore, the target stepping motor includes a variable magnification motor and / or a focusing motor.

[0010] In a second aspect, an embodiment of the present application further provides a fault handling device, the device comprising: A processing module, configured to obtain a saved correction step length corresponding to the target step motor if it is identified that the PI level corresponding to the target step motor of the target lens is abnormal; wherein the correction step length is used to determine the correct PI position; A control module, used for controlling the target stepper motor to move to a first preset position, and controlling the target stepper motor to move in a preset direction according to the modified step length; The processing module is further used to update the position of the target stepper motor after movement to a PI position corresponding to the target stepper motor, and determine the PI position as a reference point corresponding to the target stepper motor.

[0011] Further, the control module is further configured to control the target stepper motor to move to the first preset position if it is identified that the PI level corresponding to the target stepper motor of the target lens is normal; control the target stepper motor to move along the preset direction and detect the PI level corresponding to the target stepper motor until the PI level changes; The processing module is further used to determine the step length that the target stepping motor has currently moved, and use the moved step length to update the saved correction step length.

[0012] Furthermore, the control module is specifically used to control the target stepper motor to move from the current PI position to the second preset position at a first speed; wherein the first preset position is the boundary of the optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; control the target stepper motor to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0013] In a third aspect, an embodiment of the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned fault handling methods when executing a computer program stored in the memory.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the steps of any of the above-mentioned fault handling methods when executed by a processor.

[0015] In the embodiment of the present application, if the PI level corresponding to the target stepper motor of the target lens is identified to be abnormal, the correction step length corresponding to the saved target stepper motor is obtained; the target stepper motor is controlled to move to a preset position, and the target stepper motor is controlled to move in a preset direction according to the correction step length; the position of the target stepper motor after the movement is updated to the PI position corresponding to the target stepper motor. When there is a PI abnormality, the stepper motor can be quickly and reliably moved to the correct PI position according to the correction step length, thereby improving the defocus problem caused by the PI abnormality, so that the camera can obtain a clear image through the PI position corresponding to the adjusted motor, and achieve accurate zoom or focus. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the embodiments are 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. Figure 1 A schematic diagram of a fault handling process provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a group of cameras provided in an embodiment of the present application; Figure 3 A flowchart of troubleshooting provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a fault handling device provided in an embodiment of the present application; Figure 5A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0018] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.

[0019] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0020] The embodiment of the present application provides a fault handling method, device, equipment and medium. In the embodiment of the present application, if the PI level corresponding to the target stepper motor of the target lens is identified to be abnormal, the correction step length corresponding to the saved target stepper motor is obtained; wherein the correction step length is used to determine the correct PI position; the target stepper motor is controlled to move to a first preset position, and the target stepper motor is controlled to move in a preset direction according to the correction step length; the position of the target stepper motor after the movement is updated to the PI position corresponding to the target stepper motor, and the PI position is determined as the reference point corresponding to the target stepper motor. Embodiment 1:

[0021] Figure 1 A schematic diagram of a fault handling process provided in an embodiment of the present application, the process includes: S101: If it is identified that the PI level corresponding to the target stepping motor of the target lens is abnormal, then the saved correction step length corresponding to the target stepping motor is obtained; wherein the correction step length is used to determine the correct PI position.

[0022] A fault handling method provided in an embodiment of the present application is applied to an electronic device, which may be a camera, a server, etc.

[0023] In the embodiment of the present application, the camera is powered on and a routine lens self-check is performed. If an abnormal PI level corresponding to the target stepper motor of the target lens of the camera is identified, it means that a PI abnormality has occurred in the camera and the camera needs to be troubleshooted to avoid problems such as camera out-of-focus that affect normal use.

[0024] Among them, the PI level is abnormal but not limited to the level on both sides of the PI position corresponding to the stepper motor being consistent. For example, if the level on one side of the PI position is high, the other side is also high; or, if the level on one side of the PI position is low, the other side is also low.

[0025] Based on this, in an embodiment of the present application, a correction step length corresponding to each stepper motor is pre-stored in the electronic device, and the correction step length is used to adjust the PI position of the target lens so that the target lens has a correct PI position.

[0026] In a possible implementation, if the electronic device recognizes that the PI level corresponding to the target stepper motor of the target lens is abnormal, the electronic device obtains the saved correction step length corresponding to the target stepper motor, and adjusts the PI position in the target lens based on the correction step length.

[0027] S102: Control the target stepper motor to move to a first preset position, and control the target stepper motor to move in a preset direction according to the correction step length; update the position of the target stepper motor after movement to the PI position corresponding to the target stepper motor, and determine the PI position as the reference point corresponding to the target stepper motor.

[0028] In an embodiment of the present application, the electronic device first controls the target stepper motor to move to a first preset position, and then controls the stepper motor to move from the first preset position to a preset direction, and the moving step length is the acquired repair step length.

[0029] In a possible implementation, the camera includes one or more stepper motors, each stepper motor controls a group, and the electronic device drives the lens in the group controlled by the stepper motor to move to the first preset position by controlling the rotation of the target stepper motor.

[0030] Generally, the first preset position is the mechanism end of the group controlled by the target stepper motor, and the mechanism end is a physical boundary, that is, the first preset position is the boundary of the group controlled by the target stepper motor.

[0031] After the electronic device controls the target stepper motor to move to the first preset position, the electronic device controls the target stepper motor to move the correction step length in a preset manner, and updates the position of the target stepper motor after the movement to the PI position corresponding to the target stepper motor. The electronic device determines the PI position as the reference point corresponding to the target stepper motor.

[0032] In the embodiment of the present application, if the PI level corresponding to the target stepper motor of the target lens is identified to be abnormal, the correction step length corresponding to the saved target stepper motor is obtained; the target stepper motor is controlled to move to a preset position, and the target stepper motor is controlled to move in a preset direction according to the correction step length; the position of the target stepper motor after the movement is updated to the PI position corresponding to the target stepper motor. When there is a PI abnormality, the stepper motor can be quickly and reliably moved to the correct PI position according to the correction step length, thereby improving the defocus problem caused by the PI abnormality, so that the camera can obtain a clear image through the PI position corresponding to the adjusted motor, and achieve accurate zoom or focus.

[0033] Embodiment 2:

[0034] In order to avoid the camera out-of-focus problem caused by PI abnormality, so that the camera can capture clear images and achieve accurate zooming or focusing, based on the above embodiment, in the embodiment of the present application, if it is identified that the PI level corresponding to the target stepping motor of the target lens is normal, the method further includes: Controlling the target stepping motor to move to the first preset position; Controlling the target stepper motor to move along the preset direction and detecting the PI level corresponding to the target stepper motor until the PI level changes; The step length that the target stepping motor has currently moved is determined, and the saved correction step length is updated using the moved step length.

[0035] In the embodiment of the present application, when the electronic device recognizes that the PI level corresponding to the target motor of the target lens of the camera is normal, the electronic device can update the correction step length corresponding to the target stepping motor.

[0036] The corrected step length is used to determine the correct PI position, and the PI position is the position where the high and low levels jump. Based on this, the electronic device can control the target stepper motor to move from a fixed position, and query the PI level jump corresponding to the target stepper motor in real time during the movement. When the PI level jump is detected, the electronic device counts the step length of the target stepper motor and updates the moved step length to the corrected step length.

[0037] It should be noted that after the electronic device updates the correction step size, if the target stepper motor needs to adjust the PI position based on the updated correction step size, the starting moving position of the target stepper motor during adjustment needs to be consistent with the starting moving position when the correction step size is updated.

[0038] Generally, the initial moving position of the electronic device when updating the correction step length is the first preset position.

[0039] In one possible implementation, the electronic device controls the target stepper motor to move to a first preset position; controls the target stepper motor to move along a preset direction and detects a PI level corresponding to the target stepper motor until the PI level changes; determines the step length that the current target stepper motor has moved, and uses the moved step length to update the saved corrected step length.

[0040] In the embodiment of the present application, if there is no PI abnormality in the target stepper motor, the current PI position of the target stepper motor is the position where the PI level changes. Based on this, in order to improve the efficiency of updating the corrected step size, the electronic device can control the target stepper motor to move to the left side of the PI position at a faster speed, and then control the target stepper motor to move at a slower speed until the PI level changes.

[0041] In addition, in an embodiment of the present application, when the electronic device updates the correction step size corresponding to the target stepper motor, it can repeat the above-mentioned steps of determining the position from the first preset position to the position where the PI level changes, determine multiple moved step sizes, and determine the average value of the multiple moved step sizes. The electronic device uses the average value to update the saved correction step size corresponding to the target stepper motor.

[0042] Embodiment 3:

[0043] In order to avoid the camera out-of-focus problem caused by PI abnormality, so that the camera can capture a clear image and achieve accurate zoom or focus, based on the above embodiments, in the embodiment of the present application, controlling the target stepper motor to move to the first preset position includes: Controlling the target stepper motor to move from a current PI position to a second preset position at a first speed; wherein the first preset position is a boundary of an optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; The target stepping motor is controlled to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0044] In order to control the target stepper motor to move quickly and accurately to the first preset position and to avoid collision, in an embodiment of the present application, the electronic device can first control the target stepper motor to move to a position close to the first preset position at a faster speed and then slowly move to the first preset position.

[0045] Specifically, the electronic device controls the target stepper motor to move from the current PI position to the second preset position at a first speed; wherein the first preset position is the boundary of the optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position. After the target stepper motor moves to the second preset position, the electronic device controls the target stepper motor to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0046] Generally, the second preset position is the optical end of the group controlled by the target stepper motor, and the optical end is the effective stroke boundary of the software control. That is, the first preset position is the boundary that can be reached by the software control.

[0047] In a possible implementation, the electronic device controls the target stepper motor to rotate at a first speed, driving the lens in the group controlled by the target stepper motor to move to the optical end, and after the electronic device recognizes that the lens has moved to the optical end, the electronic device controls the target stepper motor to rotate at a second speed, driving the lens from the optical end to the mechanism end. Wherein, the optical end and the mechanism end are located on the same side of the PI position, if the optical end is the left optical end, the mechanism end is the left mechanism end; if the optical end is the right optical end, the mechanism end is the right mechanism end.

[0048] In another possible implementation, when the electronic device updates the corrected step length of the target stepper motor, the electronic device may also control the target stepper motor to rotate to the left of the PI position at a first speed, and then control the target stepper motor to rotate at a second speed until the PI level changes. When the electronic device controls the target stepper motor to rotate to the left of the PI position at a faster speed, the step length of the target stepper motor may be the distance from the second preset position to the current PI position.

[0049] Figure 2 A schematic diagram of the structure of a group of cameras provided in an embodiment of the present application, such as the Figure 2 As shown, the PI high level direction is defined as the left mechanism end A and the left optical end B, and the PI low level direction is defined as the right mechanism end D and the right optical end C. The number of steps from the left mechanism end A to the PI position O is recorded as m, and the number of steps from the left optical end B to the PI position O is recorded as n.

[0050] exist Figure 2 On the basis of, if the electronic device determines that the PI level of the target stepper motor corresponding to the group is normal, the electronic device updates the corrected step length corresponding to the target stepper motor in the following manner: 1. Control the zoom motor to rotate to the left, and the moving steps are, where is an empirical value, which can be adjusted according to the individual differences of the lens, and the value range is ≥1.5.

[0051] It should be noted that in the embodiment of the present application, the number of steps m from the left optical end B to the left mechanism end A stored in the electronic device is considered to be inaccurate, and therefore increased.

[0052] 2. Control the target stepper motor to rotate to the right, using a large step length and a fast moving step number n; that is, control the target stepper motor to rotate to the right at a first speed, n steps.

[0053] 3. Adjust the step length of the target stepper motor and continue to move rightward with the minimum step length, that is, control the target stepper motor to rotate to the right at the second speed. During the movement, query the PI level jump corresponding to the target stepper motor in real time, and stop immediately when the PI level becomes a low level, and record the number of steps m' of this movement.

[0054] 4. Determine the modified step size of the target stepper motor after update as X zoom =n+m'.

[0055] On this basis, if the electronic device determines that the PI level of the target stepper motor corresponding to the group is abnormal, the electronic device updates the PI position based on the correction step length in the following manner: 1. Control the target stepper motor to rotate to the left, and the number of steps is, where is an empirical value with a value range of ≥1.5.

[0056] 2. Control the target stepper motor to rotate to the right, and the number of steps is the correction step length X of the target stepper motor. zoom .

[0057] 3. After the target stepper motor rotates to the right position, update the current position to the PI position of the target stepper motor.

[0058] Embodiment 4: In order to avoid the camera out-of-focus problem caused by PI abnormality, so that the camera can capture clear images and achieve accurate zoom or focus, based on the above embodiments, in the embodiment of the present application, the PI level abnormality corresponding to the target stepping motor of the target lens is identified, including: The reference point corresponding to each stepping motor of the target lens is determined by using a lens self-check method; wherein the reference point is a position where the level of the stepping motor jumps; If the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

[0059] In the embodiment of the present application, the electronic device uses a lens self-check method to determine whether there is a PI abnormality.

[0060] Specifically, a lens self-check method is used to determine the reference point corresponding to each stepper motor of the target lens; wherein the reference point is the position where the level of the stepper motor jumps; if the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

[0061] In order to avoid the camera out-of-focus problem caused by PI abnormality, so that the camera can capture clear images and achieve accurate magnification or focusing, based on the above embodiments, in the embodiment of the present application, the target stepper motor includes a magnification motor and / or a focusing motor.

[0062] In the embodiment of the present application, the target stepper motor is a motor installed in a camera, including but not limited to a zoom motor and a focus motor.

[0063] In actual application, only the zoom motor may have PI abnormality, the focus motor may have PI abnormality, or both motors may have PI abnormality. Based on this, for each motor with PI abnormality, the fault handling method provided in the embodiment of the present application can be used to handle the fault.

[0064] Figure 3 The fault handling flow chart provided in the embodiment of the present application is as follows: Figure 3 As shown, the process includes: Perform a routine power-on self-check based on the PI level; determine whether the PI levels of the zoom and focus motors are normal. If the PI levels of the zoom and focus motors are normal, control the zoom and focus motors to rotate to the left mechanism end position; then, control the zoom and focus motors to quickly move to the left side of the PI position at a first speed, and then control the zoom and focus motors to slowly move to the right at a second speed, and stop at the PI level jump position, and calculate the number of steps from the left mechanism end of the zoom and focus motor to the PI position as the correction step length. If there is at least one abnormality in the PI level of the zoom and focus motors, control the motor with the abnormal PI level to rotate to the corresponding left mechanism end, control the motor with the abnormal PI level to move to the right by its corresponding correction step length, and update the current position to the PI position of the motor with the abnormal PI level. In an embodiment of the present application, by calculating the correction step length from the lens PI position to the mechanism end, the PI position of the motor can be quickly and reliably corrected in the event of a PI failure, thereby improving the out-of-focus problem caused by the inability to accurately determine the position of the stepper motor.

[0065] Embodiment 5: Based on the above embodiments, the embodiment of the present application also provides a fault handling device. Figure 4 A schematic diagram of a fault handling device provided in an embodiment of the present application, the device comprising: The processing module 401 is used for obtaining a saved correction step length corresponding to the target step motor if it is identified that the PI level corresponding to the target step motor of the target lens is abnormal; wherein the correction step length is used to determine the correct PI position; A control module 402, configured to control the target stepping motor to move to a first preset position, and control the target stepping motor to move in a preset direction according to the modified step length; The processing module 401 is further configured to update the position of the target stepper motor after movement to a PI position corresponding to the target stepper motor, and determine the PI position as a reference point corresponding to the target stepper motor.

[0066] In a possible implementation manner, the control module 402 is further configured to, if it is identified that the PI level corresponding to the target stepping motor of the target lens is normal, control the target stepping motor to move to the first preset position; control the target stepping motor to move along the preset direction and detect the PI level corresponding to the target stepping motor until the PI level changes; The processing module 401 is further used to determine the step length that the target stepping motor has currently moved, and use the moved step length to update the saved correction step length.

[0067] In a possible implementation, the control module 402 is specifically used to control the target stepper motor to move from the current PI position to the second preset position at a first speed; wherein the first preset position is the boundary of the optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; control the target stepper motor to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0068] In a possible implementation, the processing module 401 is specifically used to determine the reference point corresponding to each stepper motor of the target lens by means of lens self-check; wherein the reference point is the position where the level of the stepper motor jumps; if the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

[0069] Embodiment 6: Based on the above embodiments, the present application also provides an electronic device, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, it includes: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504; The memory 503 stores a computer program. When the program is executed by the processor 501, the processor 501 performs the following steps: If it is identified that the PI level corresponding to the target stepping motor of the target lens is abnormal, the saved correction step length corresponding to the target stepping motor is obtained; wherein the correction step length is used to determine the correct PI position; Controlling the target stepper motor to move to a first preset position, and controlling the target stepper motor to move in a preset direction according to the corrected step length; The position of the target stepper motor after movement is updated as the PI position corresponding to the target stepper motor, and the PI position is determined as the reference point corresponding to the target stepper motor.

[0070] In a possible implementation manner, if it is identified that the PI level corresponding to the target stepping motor of the target lens is normal, the method further includes: Controlling the target stepping motor to move to the first preset position; Controlling the target stepper motor to move along the preset direction and detecting the PI level corresponding to the target stepper motor until the PI level changes; The step length that the target stepping motor has currently moved is determined, and the saved correction step length is updated using the moved step length.

[0071] In a possible implementation manner, controlling the target stepper motor to move to the first preset position includes: Controlling the target stepper motor to move from a current PI position to a second preset position at a first speed; wherein the first preset position is a boundary of an optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; The target stepping motor is controlled to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0072] In a possible implementation manner, identifying that the PI level corresponding to the target stepping motor of the target lens is abnormal includes: The reference point corresponding to each stepping motor of the target lens is determined by using a lens self-check method; wherein the reference point is a position where the level of the stepping motor jumps; If the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

[0073] In a possible implementation, the target stepping motor includes a variable magnification motor and / or a focusing motor.

[0074] Since the principle of solving the problem by the above electronic device is similar to the fault handling method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0075] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 502 is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0076] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0077] Embodiment 7: On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor implements the following steps when executing: If it is identified that the PI level corresponding to the target stepping motor of the target lens is abnormal, the saved correction step length corresponding to the target stepping motor is obtained; wherein the correction step length is used to determine the correct PI position; Controlling the target stepper motor to move to a first preset position, and controlling the target stepper motor to move in a preset direction according to the corrected step length; The position of the target stepper motor after movement is updated as the PI position corresponding to the target stepper motor, and the PI position is determined as the reference point corresponding to the target stepper motor.

[0078] In a possible implementation manner, if it is identified that the PI level corresponding to the target stepping motor of the target lens is normal, the method further includes: Controlling the target stepping motor to move to the first preset position; Controlling the target stepper motor to move along the preset direction and detecting the PI level corresponding to the target stepper motor until the PI level changes; The step length that the target stepping motor has currently moved is determined, and the saved correction step length is updated using the moved step length.

[0079] In a possible implementation manner, controlling the target stepper motor to move to the first preset position includes: Controlling the target stepper motor to move from a current PI position to a second preset position at a first speed; wherein the first preset position is a boundary of an optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; The target stepping motor is controlled to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

[0080] In a possible implementation manner, identifying that the PI level corresponding to the target stepping motor of the target lens is abnormal includes: The reference point corresponding to each stepping motor of the target lens is determined by using a lens self-check method; wherein the reference point is a position where the level of the stepping motor jumps; If the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

[0081] In a possible implementation, the target stepping motor includes a variable magnification motor and / or a focusing motor.

[0082] Since the principle of solving the problem by the above-mentioned computer program product is similar to that of the fault handling method, the implementation of the above-mentioned computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0083] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0084] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A fault handling method, characterized in that: The method comprises: If it is identified that the PI level corresponding to the target stepping motor of the target lens is abnormal, the saved correction step length corresponding to the target stepping motor is obtained; wherein the correction step length is used to determine the correct PI position; Controlling the target stepper motor to move to a first preset position, and controlling the target stepper motor to move in a preset direction according to the corrected step length; The position of the target stepper motor after movement is updated as the PI position corresponding to the target stepper motor, and the PI position is determined as the reference point corresponding to the target stepper motor.

2. The method according to claim 1, characterized in that If it is identified that the PI level corresponding to the target stepping motor of the target lens is normal, the method further includes: Controlling the target stepping motor to move to the first preset position; Controlling the target stepper motor to move along the preset direction and detecting the PI level corresponding to the target stepper motor until the PI level changes; The step length that the target stepping motor has currently moved is determined, and the saved correction step length is updated using the moved step length.

3. The method according to claim 1 or 2, characterized in that: The controlling the target stepper motor to move to a first preset position comprises: Controlling the target stepper motor to move from a current PI position to a second preset position at a first speed; wherein the first preset position is a boundary of an optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; The target stepping motor is controlled to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

4. The method according to claim 2, characterized in that: The PI level abnormality corresponding to the target stepping motor of the target lens is identified as follows: The reference point corresponding to each stepping motor of the target lens is determined by using a lens self-check method; wherein the reference point is a position where the level of the stepping motor jumps; If the reference point corresponding to the target stepper motor is not obtained, it is determined that the PI level corresponding to the target stepper motor is abnormal.

5. The method according to claim 1, characterized in that: The target stepping motor includes a variable magnification motor and / or a focusing motor.

6. A fault handling device, characterized in that: The device comprises: A processing module, configured to obtain a saved correction step length corresponding to the target step motor if it is identified that the PI level corresponding to the target step motor of the target lens is abnormal; wherein the correction step length is used to determine the correct PI position; A control module, used for controlling the target stepper motor to move to a first preset position, and controlling the target stepper motor to move in a preset direction according to the modified step length; The processing module is further used to update the position of the target stepper motor after movement to a PI position corresponding to the target stepper motor, and determine the PI position as a reference point corresponding to the target stepper motor.

7. The device according to claim 6, characterized in that The control module is further configured to control the target stepping motor to move to the first preset position if it is identified that the PI level corresponding to the target stepping motor of the target lens is normal; control the target stepping motor to move along the preset direction and detect the PI level corresponding to the target stepping motor until the PI level changes; The processing module is further used to determine the step length that the target stepping motor has currently moved, and use the moved step length to update the saved correction step length.

8. The device according to claim 6 or 7, characterized in that The control module is specifically used to control the target stepper motor to move from the current PI position to the second preset position at a first speed; wherein the first preset position is the boundary of the optical group controlled by the target stepper motor, and the second preset position is located between the current PI position and the first preset position; control the target stepper motor to move from the second preset position to the first preset position at a second speed; wherein the second speed is less than the first speed.

9. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the fault handling method according to any one of claims 1 to 5 when executing a computer program stored in the memory.

10. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the fault handling method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for adjusting the precision of zooming camera

    CN107105132A

  • Focusing method and device, storage medium and electronic equipment

    CN111711759A

  • Robot control method and device, equipment and medium

    CN114012732A

  • Position adjustment method and device, electronic equipment and storage medium

    CN114640792A

  • Multi-motor control method, control device and storage medium

    CN115967307A