Camera module, chip and electronic device and control method of camera module

By introducing a decoupled design between the locking component and the autofocus motor in the camera module, the problem of lens tremor in moving or vibrating scenes is solved, the shooting effect is improved, and the production and maintenance process is simplified.

CN119233055BActive Publication Date: 2026-05-26HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-06-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In motion or vibration scenarios, the lens of the camera module is prone to shaking, affecting the quality of photos and videos.

Method used

Design a camera module including a substrate, a locking motor and an autofocus motor. The locking component switches between a locked state and an unlocked state. When autofocus is not needed, the locking component locks the lens component and performs autofocus when unlocked, thereby fixing the position of the lens component.

Benefits of technology

It effectively avoids lens shakiness, improves the shooting effect of the camera module in moving scenes, and the decoupling design between the autofocus motor and the locking motor improves the convenience of modular production and maintenance, and reduces the overall size and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233055B_ABST
    Figure CN119233055B_ABST
Patent Text Reader

Abstract

This application relates to a camera module, a chip, an electronic device, and a control method for the camera module. The camera module includes a substrate, a locking motor, an autofocus motor, and a lens assembly. The locking motor is located between the substrate and the autofocus motor, and the autofocus motor surrounds and connects to the lens assembly. The locking motor includes a locking component and a driving component. The driving component is used to drive the locking component to a locked state after the camera module completes autofocus. The driving component is also used to drive the locking component to an unlocked state before the camera module starts autofocus. In the locked state, the locking component locks the lens assembly, fixing its position relative to the substrate. In the unlocked state, the locking component unlocks from the lens assembly, enabling the camera module to autofocus. The camera module of this application can solve the problems of repeated focusing and vibration during motion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of lens driving devices, and more particularly to a camera module, chip and electronic device and a control method for the camera module. Background Technology

[0002] With the widespread use of smartphones, the camera function of mobile phones has greatly increased the frequency of taking photos and videos in people's daily lives. Autofocus (AF-auto focus) is a basic function of most mobile phone cameras on the market. However, cameras with autofocus can experience lens shake in special scenarios such as movement or vibration. Lens shake directly affects the experience of taking photos and videos, resulting in poor shooting quality.

[0003] Designing a camera module that can prevent lens shakiness and improve the shooting effect in scenarios with motion or vibration is a direction that the industry continues to research. Summary of the Invention

[0004] Embodiments of this application provide a camera module, a chip and an electronic device, and a control method for the camera module, in order to solve the problem of lens tremor in scenarios such as motion or vibration.

[0005] In a first aspect, embodiments of this application provide a camera module, including a substrate, a locking motor, an autofocus motor, and a lens assembly. The autofocus motor surrounds and connects to the lens assembly along the optical axis of the camera module. The locking motor is located between the substrate and the autofocus motor. The locking motor includes a locking component and a driving component. The driving component is used to drive the locking component to a locked state after the camera module completes autofocus. The driving component is also used to drive the locking component to an unlocked state before the camera module starts autofocus. In the locked state, the locking component locks the lens assembly to fix the position of the lens assembly relative to the substrate. In the unlocked state, the locking component unlocks the lens assembly to enable the camera module to autofocus.

[0006] In this embodiment, on the one hand, the driving component is used to drive the locking component to switch positions between the locked state and the unlocked state. In the locked state, the locking component is locked to the lens component, and in the unlocked state, the locking component is unlocked to the lens component. This allows the lens component to be locked by the locking component when autofocus is not required, and the locking component to be unlocked to the lens component when autofocus is required. Then, the autofocus motor is used to focus the lens component. Therefore, the camera module in this embodiment can fix the position of the lens component in specific scenarios. For example, in motion scenarios, fixing the position of the lens component by the locking component can avoid the phenomenon of shaking, thereby effectively improving the shooting effect of the camera module during motion.

[0007] On the other hand, given that the camera module in this embodiment can solve the vibration problem, the autofocus motor and the locking motor are in a decoupled positional relationship. The design of the autofocus motor and the locking motor will not affect each other, which is beneficial for increasing the design diversity of the autofocus motor and the locking motor. For example, different types of autofocus motors can be matched with different types of locking motors. Moreover, since the autofocus motor and the locking motor are in a decoupled positional relationship, it is beneficial for modular production, replacement, and maintenance, improving convenience. Furthermore, given that the camera module can solve the vibration problem and the autofocus motor and the locking motor are decoupled, and since the locking motor is located between the substrate and the autofocus motor, the space between the lens assembly and the substrate can be effectively utilized, thus having a smaller impact on the overall size of the camera module.

[0008] In some embodiments, the lens assembly includes a first part and a second part interconnected as one unit. The autofocus motor surrounds and connects to the first part. In a first direction, the second part faces the locking component, which is used to lock or unlock with the second part. The first direction is perpendicular to the optical axis of the camera module. In this embodiment, by defining a first part and a second part of the lens assembly, the second part refers to the part that cooperates with the locking component. The second part will be different depending on the locking position. In the direction perpendicular to the optical axis of the camera module, the second part faces the locking component, which is used to lock or unlock with the second part. In this embodiment, the locking component is used to lock or unlock with the second part located where the autofocus motor is not surrounded. This facilitates a fixed connection between the locking component and the second part. The locking motor and the autofocus motor correspond to different parts of the lens assembly in the optical axis direction, allowing them to be decoupled. This effectively reduces the structural design difficulty of the locking motor, improves the structural rationality of the lens assembly, and also increases the structural design diversity of the locking motor.

[0009] In some embodiments, the second part has a sleeve-like structure, including an outer sidewall, a bottom wall, and an inner sidewall. The bottom wall faces the substrate, and the outer sidewall faces the locking assembly. The locking assembly is used to hold the camera module against the outer sidewall after it has focused at any position. This embodiment provides a specific locking architecture. By defining the specific structure of the second part, locking is achieved by the locking assembly and the outer sidewall of the second part abutting against each other. Since the locking assembly can abut against different positions on the outer sidewall, it can lock or unlock the lens assembly at any point in the focusing stroke. In this embodiment, the locking assembly can abut against any position on the sidewall of the second part, so that it can lock or unlock the lens assembly at any point in the focusing stroke. Therefore, the lens assembly can be locked at any focusing position, allowing it to be locked in a focusing position with good focusing effect, thus improving the user experience.

[0010] In some embodiments, when the lens assembly is located at any point in the focusing travel, in a first direction, the lens assembly is at least partially directly facing the locking component. The portion of the lens assembly facing the locking component is the second portion, and the locking component is used to lock or unlock with the second portion. Since the lens assembly is at least partially directly facing the locking component in the first direction when it is located at any point in the focusing travel, the second portion can be locked or unlocked by the locking component at any focusing position. This allows the lens assembly to be locked in a focusing position with good focusing effect, improving the user experience.

[0011] In some embodiments, the autofocus motor surrounds and forms an accommodating space, the locking motor surrounds and forms a receiving space, the accommodating space and the receiving space are connected in the optical axis direction of the camera module, the first part is located in the accommodating space, and the second part is located in the receiving space.

[0012] In this embodiment, since the second part is located within the receiving space, in the locked state, the locking component is fixedly connected to the second part located within the receiving space, while the first part cooperates with the autofocus motor. This facilitates independent control and position decoupling of the camera module by the locking motor and the autofocus motor. Furthermore, because the locking motor surrounds and forms the receiving space, the second part of the lens assembly is located within the receiving space, thus effectively protecting the second part of the lens assembly and meeting the sealing performance requirements of the camera module.

[0013] In some embodiments, the locking assembly includes a base and a locking member movably disposed on the base. The base is fixedly connected between the substrate and the autofocus motor. The driving assembly can drive the locking member to move relative to the base, thereby locking or unlocking the locking member with the second part. In this embodiment, based on the base being fixedly connected between the substrate and the autofocus motor, the locking member cooperates with the second part to unlock or lock the lens assembly. The locking member cooperates with the base to unlock or lock the lens assembly.

[0014] In some embodiments, there are two locking members, namely a first locking member and a second locking member. One end of the first locking member and one end of the second locking member are rotatably connected to the base. The driving component can drive the first locking member and the second locking member to rotate towards each other to abut and clamp the second part, so that the first locking member and the second locking member are locked to the second part. The driving component can also drive the first locking member and the second locking member to rotate away from each other, so that the first locking member and the second locking member are unlocked from the second part.

[0015] In this embodiment, a first locking member and a second locking member are rotatably mounted on the base. A driving assembly can drive the first and second locking members to rotate towards each other to abut and clamp the second part, thereby locking the lens assembly. The driving assembly can also drive the first and second locking members to rotate away from each other, thereby unlocking the lens assembly. By rotatably mounting the first and second locking members on the base, both members perform circular motion around their respective axes. Under the constraint of their axes, the movement paths of the first and second locking members are more precise. For camera modules with high precision requirements, this method of rotatably mounting the first and second locking members on the base improves the positional accuracy when fixing the locking assembly to the lens assembly, thus improving the overall design precision of the camera module. Furthermore, this method also reduces the design difficulty and structural complexity of the driving assembly, and helps to reduce the overall size of the camera module.

[0016] In some embodiments, the driving assembly includes a first permanent magnet, a second permanent magnet, a first magnetic element, a second magnetic element, and an electromagnet. The first permanent magnet is fixedly connected to the first locking element, and the second permanent magnet is fixedly connected to the second locking element. The first magnetic element, the second magnetic element, and the electromagnet are all fixed to the base. The electromagnet is located between the first permanent magnet and the second permanent magnet. The first permanent magnet is located between the first magnetic element and the electromagnet, and the second permanent magnet is located between the second magnetic element and the electromagnet. The electromagnet is used to drive the first locking element and the second locking element to rotate in opposite directions or in opposite directions. In some embodiments, when the electromagnet receives a current in the direction of a first current, the electromagnet can attract a first permanent magnet and a second permanent magnet to move toward the electromagnet, thereby driving the first locking member and the second locking member to rotate toward each other. When the electromagnet receives a current in the direction of a second current opposite to the direction of the first current, the electromagnet can repel the first permanent magnet and the second permanent magnet to move away from the electromagnet, thereby driving the first locking member and the second locking member to rotate in opposite directions. In the locked state, both the first permanent magnet and the second permanent magnet are magnetically attracted to the electromagnet. In the unlocked state, the first permanent magnet is magnetically attracted to the first magnetic element, and the second permanent magnet is magnetically attracted to the second magnetic element.

[0017] In this embodiment, the cooperation between the first permanent magnet, the second permanent magnet, the first magnetic component, the second magnetic component, and the electromagnet offers several advantages. Firstly, the design of the first permanent magnet, the second permanent magnet, the first magnetic component, the second magnetic component, and the electromagnet is simple, and their size is easily miniaturized, which helps reduce the design difficulty and size of the locking motor. Secondly, the locking and unlocking functions of the lens assembly can be achieved simply by switching the forward and reverse current, improving control convenience. Furthermore, even if the locking motor is de-energized in the locked state, the locking assembly can remain locked due to the magnetic attraction between the electromagnet's core and the first and second permanent magnets, thus saving energy and reducing heat generation.

[0018] In some embodiments, the other end of the first locking member includes a first worm gear tooth, and the other end of the second locking member includes a second worm gear tooth. The drive assembly includes a power source, a rotating shaft, and a first worm gear tooth and a second worm gear tooth disposed on the rotating shaft. The first worm gear tooth and the second worm gear tooth have opposite tooth directions. The first worm gear tooth meshes with the first worm gear tooth, and the second worm gear tooth meshes with the second worm gear tooth. The power source can drive the rotating shaft to rotate in the forward or reverse direction to drive the first locking member and the second locking member to rotate relative to or opposite to each other.

[0019] In this embodiment, based on the meshing of the first worm gear teeth with the first worm wheel teeth and the meshing of the second worm gear teeth with the second worm wheel teeth, the power source can drive the rotating shaft to rotate in the forward or reverse direction, thereby driving the first locking member and the second locking member to rotate relative to or opposite to each other. When the first locking member and the second locking member rotate towards each other, the second part can be clamped to lock the lens assembly. When the first locking member and the second locking member rotate opposite to each other, the lens assembly can be unlocked. In this embodiment, through the worm gear mechanism, the first worm gear teeth can drive the first worm wheel teeth to rotate. When the power source does not provide power, the first worm gear teeth and the first worm wheel teeth can achieve self-locking. The second worm gear teeth can drive the second worm wheel teeth to rotate. When the power source does not provide power, the second worm gear teeth and the second worm wheel teeth can achieve self-locking. Thus, even without power, the locking assembly can remain in the locked state, thereby saving energy and reducing heat generation. Furthermore, since both the first worm gear teeth and the second worm teeth are located on the rotating shaft, and the tooth directions of the first worm teeth and the second worm teeth are opposite, the first locking element and the second locking element can be driven by a single rotating shaft and a power source, thereby simplifying the structure of the drive assembly.

[0020] In some embodiments, the locking assembly includes a plurality of locking members disposed around the second portion, the plurality of locking members being rotatably connected to the base, and the driving assembly being capable of driving the plurality of locking members to rotate in a first rotation direction to abut and clamp the second portion, thereby locking the locking members to the second portion. The driving assembly is also capable of driving the plurality of locking members to rotate in a second rotation direction, thereby unlocking the locking members from the second portion, wherein the first rotation direction and the second rotation direction are opposite.

[0021] In this embodiment, multiple locking members are arranged around the second part, and these multiple locking members are rotatably connected to the base. This not only improves the positional accuracy of the locking assembly when fixing the lens assembly, similar to the two locking members in the previous embodiment, but also enhances the overall design accuracy of the camera module. Furthermore, since there are multiple locking members, the lens assembly can be clamped at multiple points, helping to maintain uniform force distribution on the lens assembly from multiple directions, thus improving the locking stability and positional accuracy of the lens assembly during locking.

[0022] In some embodiments, the drive assembly includes a turntable, a worm gear, and a power source. The turntable is rotatably connected to the base. The turntable includes worm gear teeth, and the worm gear meshes with the worm gear teeth. A plurality of locking members are rotatably connected to the turntable. The axis of rotation of the locking member relative to the base is spaced apart from the axis of rotation of the locking member relative to the turntable. The power source can drive the worm gear to rotate forward or reverse, thereby driving the turntable to rotate forward or reverse, and driving the plurality of locking members to rotate in a first rotation direction or a second rotation direction.

[0023] In this embodiment, the drive component also adopts a worm gear mechanism, which can maintain the locking state of the locking component even when the power source does not provide power, thereby saving energy and reducing heat generation. Furthermore, since one turntable connects multiple locking components simultaneously, the rotational synchronization of the multiple locking components can be ensured, which helps improve the positional accuracy of the locking components and the lens assembly in the locked state.

[0024] In some embodiments, there are two locking members, namely a first locking member and a second locking member. Both the first locking member and the second locking member are slidably connected to the base along a preset direction. The driving component can drive the first locking member and the second locking member to slide towards each other along the preset direction to abut and clamp the second part, so that the first locking member and the second locking member are locked to the second part. The driving component can also drive the first locking member and the second locking member to slide away from each other along the preset direction, so that the first locking member and the second locking member are unlocked from the second part.

[0025] In this embodiment, the first locking member and the second locking member are slidably disposed on the base in a preset direction. The locking and unlocking of the lens assembly are achieved through the cooperation of the first locking member and the second locking member.

[0026] In some embodiments, the drive assembly includes a rotating shaft, a power source, and a first threaded portion and a second threaded portion disposed on the rotating shaft. The axial direction of the rotating shaft is the same as the preset direction. The first locking member engages with the first threaded portion, and the second locking member engages with the second threaded portion. The power source can drive the rotating shaft to rotate in the forward or reverse direction to drive the first locking member and the second locking member to slide relative to or opposite to each other.

[0027] In this embodiment, through the cooperation between the first threaded part and the second threaded part on the rotating shaft and the first locking member and the second locking member, the first locking member and the second locking member can be driven to slide simultaneously by one rotating shaft, which reduces the structural complexity and can also ensure the synchronicity of the sliding of the first locking member and the second locking member, which is beneficial to improving the positional accuracy of the locking member and the lens assembly in the locked state.

[0028] In some embodiments, the camera module further includes an image processing module, the locking motor surrounds and forms a receiving space, the image processing module is disposed within the receiving space, and the image processing module is disposed on the substrate and located between the substrate and the lens assembly.

[0029] In this embodiment, by placing the image processing module within the housing space, the overall size of the camera module can be reduced by utilizing the housing space.

[0030] Secondly, this application provides a camera module, including a lens assembly, a locking motor, and an autofocus motor. The locking motor and the autofocus motor are stacked along the optical axis of the camera module. The locking motor and the autofocus motor are two independent lens assembly drive modules. The autofocus motor surrounds and connects to the lens assembly. The autofocus motor is used to drive the lens assembly along the optical axis to achieve focusing. When the lens assembly is located at any point in the focusing stroke, the locking motor can lock or unlock with the lens assembly.

[0031] This embodiment does not limit the vertical positional relationship between the locking motor and the autofocus motor. The camera module in this embodiment can fix the position of the lens assembly in specific scenarios, such as in motion scenarios. By fixing the position of the lens assembly through the locking motor, the phenomenon of vibration can be avoided, thereby effectively improving the shooting effect of the camera module during movement. Since the locking motor and the autofocus motor are two independent lens assembly drive modules, the autofocus motor and the locking motor are in a decoupled state in terms of positional relationship. The shape design of the autofocus motor and the locking motor will not affect each other, which is conducive to improving the design diversity of the autofocus motor and the locking motor. For example, different types of autofocus motors can be used to match different types of locking motors. Moreover, since the autofocus motor and the locking motor are in a decoupled state in terms of positional relationship, it is conducive to modular production, replacement and maintenance, improving convenience. In addition, since the locking motor can lock or unlock the lens assembly at any point in the focusing stroke of the lens assembly in this embodiment, the lens assembly can be locked at any focusing position, thereby locking the lens assembly at a focusing position with good focusing effect and improving the user experience.

[0032] Thirdly, this application provides an electronic device including a processor and a camera module as described in any of the embodiments of the first and second aspects above, wherein the processor is electrically connected to the camera module.

[0033] Fourthly, this application provides a control method for a camera module, applied to the electronic device described in the third aspect, wherein the control method for the camera module includes:

[0034] Activate photo or video recording mode;

[0035] Detect whether the electronic device has entered motion mode;

[0036] After determining that the electronic device is in motion mode, the autofocus motor is activated and drives the lens assembly to move to achieve autofocus;

[0037] When autofocus is complete, the locking motor starts and locks the lens assembly;

[0038] Perform the taking of photos or videos.

[0039] In this embodiment, the camera module control method can be used to fix the lens assembly by locking the motor in motion mode, thereby avoiding repeated focusing and shaking in motion scenes and improving shooting effect.

[0040] In some embodiments, detecting whether the electronic device has entered motion mode includes:

[0041] The system detects whether the electronic device is moving. When the electronic device is moving, it enters the motion mode, where motion refers to a movement speed exceeding a preset value or an acceleration exceeding a preset value; or

[0042] The system detects whether the electronic device receives a motion mode input signal from the user interface. When the electronic device receives the motion mode input signal from the user interface, the electronic device enters the motion mode.

[0043] In this embodiment, the electronic device can be automatically detected to determine whether it has entered motion mode, or it can be manually entered by inputting a motion mode signal. This satisfies both manual and automatic control needs and improves the user experience.

[0044] Fifthly, this application provides a control method for a camera module, applied to an electronic device, the control method for the camera module comprising:

[0045] Activate photo or video recording mode;

[0046] Read focus data within a preset time period, wherein the focus data includes focus position and duration;

[0047] The target focus position is obtained from the focus data, wherein the target focus position is the position where the focus position of the lens assembly of the electronic device exceeds a preset time.

[0048] The lens assembly of the electronic device completes focusing at the target focusing position;

[0049] Lock the lens assembly at the target focusing position;

[0050] Perform the taking of photos or videos.

[0051] In this embodiment, the camera module control method locks the lens assembly at the target focus position when it acquires it. This allows the lens assembly to maintain the desired focus position for shooting without repeated focusing, improving intelligence and user convenience while reducing power consumption caused by repeated focusing. Furthermore, it eliminates the need to continuously input current to the autofocus motor to maintain the focus position, thus saving power consumption.

[0052] Sixthly, this application provides a control method for a camera module, applied to the electronic device described in the third aspect, the control method for the camera module comprising:

[0053] Receive command to exit photo or video recording mode;

[0054] Read the target focus position within a preset time period;

[0055] The lens assembly of the electronic device moves to the target focusing position;

[0056] Lock the lens assembly of the electronic device at the target focusing position;

[0057] Exit the photo or video recording mode.

[0058] In this embodiment, after each use of the electronic device's photo or video recording mode, the lens assembly automatically locks at the target focus position (such as the user's preferred focus position). This allows for direct photo or video recording at the target focus position when using the electronic device's photo or video recording mode again. For example, in some application scenarios requiring snapshot capture, since the lens assembly automatically locks at the target focus position after the previous use of the electronic device's photo or video recording mode, the user can directly perform the photo or video recording function at their usual target focus position when taking photos or videos again. Compared to the mode of automatically focusing before taking a photo during snapshot capture, which has a longer reaction time and is prone to blurry images, the camera module in this embodiment does not require an automatic focusing step during snapshot capture, resulting in faster shooting speed and better shooting effect.

[0059] In some embodiments, the control method further includes taking a preset number of photos at the target focus position in response to a photo-taking command, or taking a video at the target focus position in response to a video-taking command.

[0060] In some embodiments, after taking a preset number of photos or capturing video at the target focus position, the control method for the camera module further includes:

[0061] Unlock the lens assembly.

[0062] In this embodiment, when taking the next round of photos after the previous round of snapshots is completed, the autofocus function can be turned on. Based on the previous round of snapshots, the autofocus motor has a longer autofocus response time, which helps to improve the focusing effect. In addition, by focusing through the autofocus motor, photos or videos with different effects than when the lens assembly is shooting at the user's usual target focus position can be obtained, increasing the diversity of photo or video shooting.

[0063] In a seventh aspect, this application provides a chip including a processor and a memory, the processor being coupled to the memory, the memory being used to store computer program code, the computer program code including computer instructions, and when the processor executes the computer instructions, the chip performing the camera module control method as described in any of the preceding embodiments. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0065] Figure 1 This is a front view of the electronic device provided in this application.

[0066] Figure 2 yes Figure 1 A schematic diagram of the rear structure of an electronic device;

[0067] Figure 3 A schematic structural diagram of a camera module provided in an embodiment of this application;

[0068] Figure 4 for Figure 3 An exploded view of the camera module in the diagram;

[0069] Figure 5 for Figure 3 An exploded view of the autofocus motor in the camera module.

[0070] Figure 6 for Figure 3A schematic diagram of the overall structure of the locking motor in the camera module;

[0071] Figure 7 for Figure 6 An exploded view of the locking motor in the diagram;

[0072] Figure 8 for Figure 6 A schematic diagram of the base of the locking motor in the diagram;

[0073] Figure 9 for Figure 6 A schematic diagram of the locking mechanism of the locking motor in the circuit;

[0074] Figure 10 for Figure 3 The diagram shows the structure of the locking motor and lens assembly, with the locking assembly in the locked state at this time.

[0075] Figure 11 for Figure 3 The diagram shows the structure of the locking motor and lens assembly, with the locking assembly in the unlocked state at this time.

[0076] Figure 12 for Figure 3 A cross-sectional view of the camera module in the middle;

[0077] Figure 13 This is a partial structural schematic diagram of another camera module provided in the embodiments of this application;

[0078] Figure 14 for Figure 13 A schematic diagram of the decomposition process;

[0079] Figure 15 This is a partial structural schematic diagram of another camera module provided in the embodiments of this application;

[0080] Figure 16 This is a partial structural schematic diagram of another camera module provided in the embodiments of this application;

[0081] Figure 17 for Figure 16 A schematic diagram of the decomposition process;

[0082] Figure 18 for Figure 16 A schematic diagram of the assembly structure of the locking component and the base;

[0083] Figure 19 for Figure 16 A schematic diagram of the assembly structure of the locking component and the turntable;

[0084] Figure 20 A flowchart illustrating a possible control method for a camera module provided in this application;

[0085] Figure 21 A flowchart of another possible control method for a camera module provided in this application;

[0086] Figure 22 A flowchart illustrating yet another possible control method for a camera module provided in this application. Detailed Implementation

[0087] The following section will first explain some of the terms used in the embodiments of this application.

[0088] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0089] Perpendicularity, as defined in this application, is not limited to an absolute perpendicular intersection (with an included angle of 90 degrees). It allows for non-absolute perpendicular intersections caused by factors such as assembly tolerances, design tolerances, and structural flatness. It also allows for small angular range errors, such as assembly errors within the range of 80 to 100 degrees, which can all be understood as a perpendicular relationship.

[0090] Parallelism, as defined in this application, is not limited to absolute parallelism. This definition of parallelism can be understood as basic parallelism, allowing for situations where there is no absolute parallelism due to factors such as assembly tolerances, design tolerances, and the influence of structural flatness. These situations may lead to the sliding mating part and the first door panel not being absolutely parallel, but this application also defines such situations as parallelism.

[0091] The optical axis is the direction in which light rays travel through an optical system, and is referenced to the principal ray at the center of the field of view. For symmetrical transmission systems, it generally coincides with the rotation center line of the optical system.

[0092] Auto focus (AF) is a technique that uses the principle of light reflection from the subject. The light reflected from the subject passes through the lens and is imaged and received on the image sensor. The image is then processed by a computer, which drives the motorized focusing mechanism to achieve the desired focus.

[0093] The electronic devices involved in this application embodiment may include handheld devices, in-vehicle devices, wearable devices, computing devices, etc. For example, specific electronic devices may include cellular phones, smartphones, personal digital assistant (PDA) computers, tablet computers, laptop computers, cameras, video recorders, cameras, smartwatches, unmanned aerial vehicles, smart wristbands, in-vehicle computers, wireless headphones, glasses and helmets, and other electronic devices with imaging capabilities. This application embodiment does not impose special limitations on the specific form of the above-mentioned electronic devices; for ease of understanding, the following description uses a mobile phone as an example.

[0094] Figure 1 This is a front view of the electronic device provided in this application. Figure 2 yes Figure 1 A schematic diagram of the back structure of an electronic device.

[0095] See also Figure 1 and Figure 2 The electronic device 100 may include a housing 101, a display panel (DP) 102, and a camera compact module (CCM) 103.

[0096] The housing 101 forms a receiving space for accommodating various components of the electronic device 100, and also serves to protect the electronic device 100. The camera module 103 is disposed within the receiving space formed by the housing 101 and the display screen 102. In some embodiments, the housing 101 includes a back cover and a mid-frame, and the display screen 102 and the camera module 103 can be fixed to the mid-frame. The housing 101 can be made of metal, plastic, ceramic, or glass.

[0097] The display screen 102 can be a Liquid Crystal Display (LCD) screen, an Organic Light Emitting Diode (OLED) screen, etc., where the OLED screen can be a flexible screen or a rigid screen. The display screen 102 can be a regular screen, or an irregularly shaped screen, a folding screen, etc. For example, the display screen 102 can rotate and fold freely to form an arc, a sphere, a cylinder, etc. The display screen 102 can be located on the front of the electronic device 100, on the back of the electronic device 100, or on both the front and back of the electronic device 100. The front of the electronic device 100 can be understood as the side facing the user when using the electronic device 100, and the back of the electronic device 100 can be understood as the side facing away from the user when using the electronic device 100.

[0098] The camera module 103 is used to capture images or videos. When the camera module 103 is disposed on the front of the electronic device 100, it can be used to capture the scene located on one side of the front of the electronic device 100, and in some embodiments it can be called a front-facing camera; when the camera module 103 is disposed on the back of the electronic device 100, it can be used to capture the scene located on one side of the back of the electronic device 100, and in some embodiments it can be called a rear-facing camera. During shooting, the user can select the appropriate camera module according to the shooting needs. The camera module 103 can be used to capture scenes at different distances, such as distant, close-up, or macro views; this application embodiment does not impose any special limitations.

[0099] It should be understood that Figure 1The installation position of the camera module 103 is merely illustrative. When the camera module 103 is used as a front-facing camera, it can be installed at any position on the front of the electronic device 100, such as the left side of the earpiece, the upper middle part of the electronic device 100, the lower part (or chin) of the electronic device 100, or one of the four corners of the electronic device 100. When the camera module 103 is used as a rear-facing camera, it can be installed at any position on the back of the electronic device 100, such as the upper left or upper right corner. In some other embodiments, the camera module 103 may not be mounted on the main body of the electronic device 100, but may be mounted on an edge protruding from the main body of the electronic device 100, or on a movable or rotatable component relative to the main body of the electronic device 100, which can extend, retract, or rotate from the main body of the electronic device 100. When the camera module 103 can rotate relative to the electronic device 100, the camera module 103 functions as both a front-facing camera and a rear-facing camera; that is, by rotating the same camera module 103, it can capture images from both the front and rear sides of the electronic device 100. In other embodiments, when the display 102 can be folded, the camera module 103 can function as a front-facing camera or a rear-facing camera as the display 102 folds.

[0100] This application embodiment does not limit the number of camera modules 103; it can be one, two, three, four, or even more. For example, one or more camera modules 103 can be set on the front of the electronic device 100, and / or one or more camera modules 103 can be set on the back of the electronic device 100. When multiple camera modules 103 are set, the multiple camera modules 103 can be completely identical or different. For example, the multiple camera modules 103 may have different lens optical parameters, different lens placement positions, different lens shapes, etc. This application embodiment also does not limit the relative positions of the multiple camera modules.

[0101] Optionally, the electronic device 100 may further include a protective lens 104 for protecting the camera module 103. The protective lens 104 is disposed on the housing 101 and covers the camera module 103. When the protective lens 104 is used to protect the front-facing camera, it may cover only the front-facing camera module or cover the entire front of the electronic device 100. When the protective lens 104 covers the entire front of the electronic device 100, it can simultaneously protect both the front-facing camera module and the display screen 102. The protective lens 104 is a cover glass (CG). When the protective lens 104 is used to protect the rear-facing camera, it may cover the entire back of the electronic device 100 or be disposed only at the corresponding position on the rear-facing camera module. The material of the protective lens 104 may be glass, sapphire, ceramic, etc., and this application embodiment does not impose any special limitations. In some embodiments, the protective lens 104 is transparent, allowing light from outside the electronic device 100 to enter the camera module 103 through the protective lens 104.

[0102] It should be understood that Figure 1 and Figure 2 The structure shown in the diagram does not constitute a specific limitation on the electronic device 100. The electronic device 100 may include more or fewer components than shown in the diagram. For example, the electronic device 100 may also include one or more components such as a battery, flash, fingerprint recognition module, earpiece, buttons, and sensors. The electronic device 100 may also have a different component arrangement than shown in the diagram.

[0103] Figure 3 A schematic structural diagram of a camera module 103 provided in an embodiment of this application; Figure 4 for Figure 3 An exploded view of the camera module 103.

[0104] For ease of description, the optical axis direction of the camera module 103 is defined as the Z direction, the side facing the object along the Z direction is the front side, and the side facing away from the object is the rear side. The first direction is perpendicular to the optical axis direction Z, and is called the X direction. The second direction, which is perpendicular to both the optical axis direction Z and the first direction X, is called the Y direction. The direction closer to the optical axis in the X and Y directions is the inner side, and the direction facing away from the optical axis is the outer side. The definitions of the X, Y, and Z directions, as well as the front, rear, inner, and outer sides, also apply to the accompanying drawings described below.

[0105] It should be noted that the above definitions of the X, Y, Z directions and the front, back, inside, and outside directions are only for the convenience of describing the positional and connection relationships between the components in the embodiments of this application, and should not be construed as limiting the embodiments of this application.

[0106] See also Figure 3 and Figure 4The camera module 103 may include a substrate 10, an autofocus motor 20, a locking motor 30, and a lens assembly 40.

[0107] The substrate 10 can be a printed circuit board (PCB). The substrate 10 can be connected to a flexible printed circuit (FPC). The end of the flexible printed circuit can be connected to a board-to-board (BTB) connector for fastening onto the main board inside the electronic device 100.

[0108] The autofocus motor 20 is used to drive the lens assembly 40 to move and change the focus position, thereby achieving autofocus. Specifically, the autofocus motor 20 is used to drive the lens assembly 40 to move back and forth along the optical axis Z to achieve the autofocus function. In some embodiments, the focus motor can be a voice coil motor (VCM), a shape memory alloy motor, a piezo motor, or a stepper motor, etc.

[0109] The locking motor 30 is used to lock or unlock the lens assembly 40. When the lens assembly 40 is locked, its movement along the optical axis Z is restricted, and the autofocus motor 20 can no longer drive the lens assembly 40 to move. When the lens assembly 40 is unlocked, the autofocus motor 20 can drive the lens assembly 40 to move along the optical axis Z. Through the locking motor 30, the camera module 103 in this embodiment can fix the position of the lens assembly 40 in specific scenarios, such as in motion scenarios. Fixing the position of the lens assembly 40 by the locking motor 30 can prevent shaky phenomena, thereby effectively improving the shooting effect of the camera module 103 during motion.

[0110] Lens assembly 40 is used to collect light signals reflected from a subject. In some embodiments, lens assembly 40 may include a lens barrel and a lens group mounted inside the lens barrel. In some embodiments, the lens group may have 5 to 10 lenses, such as 7 or 8. In some embodiments, the lenses may be made of solid or liquid materials.

[0111] In some implementations, such as Figure 3An autofocus motor 20 surrounds and connects to the lens assembly 40, while a locking motor 30 is located between the substrate 10 and the autofocus motor 20, and is mounted on the substrate 10. In this embodiment, the camera module 103 solves the vibration problem. On the one hand, the autofocus motor 20 and the locking motor 30 are decoupled in position, meaning their designs are not affected by each other. This improves the design diversity of the autofocus motor 20 and the locking motor 30, and also facilitates modular production and rapid assembly. Modularization also makes replacement and maintenance easier, enhancing convenience. On the other hand, since the lens assembly 40 in the camera module 103 needs to maintain a certain distance from the substrate 10 to facilitate the autofocus motor 20 to adjust the focus of the lens assembly 40, a support is usually set at this position to form a space for the lens assembly 40 to adjust the focus. In this embodiment, under the premise that the camera module 103 can solve the vibration problem and the autofocus motor 20 and the locking motor 30 can be decoupled from each other, since the locking motor 30 is located between the substrate 10 and the autofocus motor 20, the space between the lens assembly 40 and the substrate 10 used to set the support is effectively utilized, so the addition of the locking motor 30 has little impact on the overall size of the camera module 103.

[0112] In some embodiments, such as Figure 4 The camera module 103 may also include an image processing module 50, which processes the light signal reflected from the subject captured by the lens assembly 40. In some embodiments, the image processing module 50 is disposed between the lens assembly 40 and the substrate 10. In some embodiments, the image processing module 50 is housed within the area enclosed by the locking motor 30, thereby making full use of the available space to reduce the overall size of the camera module 103.

[0113] In some implementations, the image processing module 50 includes an image sensor, a filter, and a driver chip.

[0114] An image sensor, also called a photosensitive element, uses the photoelectric conversion function of an optoelectronic device to convert a light image on a photosensitive surface into an electrical signal proportional to the light image. In some implementations, the image sensor can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor device, etc.

[0115] In some embodiments, the filter is positioned directly opposite the image sensor; in others, the filter may be blue glass (BG) used to filter infrared light. Of course, in other embodiments, the filter may be an IRCUT dual filter or other types of filters.

[0116] In some implementations, the driver chip is used to receive drive signals from the processor and convert them into current to drive the autofocus motor 20 and the lock-up motor 30, thereby driving the autofocus motor 20 and the lock-up motor 30 to operate.

[0117] Figure 5 for Figure 3 An exploded view of the autofocus motor 20 in the camera module 103.

[0118] See also Figure 4 and Figure 5 The autofocus motor 20 includes a fixed part 21 and a movable part 22. The movable part 22 is located inside the fixed part 21. The lens assembly 40 is connected to the movable part 22. The movable part 22 can move relative to the fixed part 21 along the optical axis direction Z. Thus, the movable part 22 can drive the lens assembly 40 to move along the optical axis direction Z to achieve autofocus.

[0119] In some embodiments, the movable part 22 has a first through hole 221 in the middle, which is parallel to the optical axis direction Z and is used to install the lens assembly 40.

[0120] The fixing part 21 includes a housing 211 and a magnetic circuit assembly, the magnetic circuit assembly being disposed on the housing 211.

[0121] In some embodiments, the housing 211 surrounds and forms a receiving space 2111, and the movable part 22 and the magnetic circuit assembly are installed within the receiving space 2111. In some embodiments, the receiving space 2111 extends through the housing 211 along the optical axis Z to facilitate the assembly of the lens assembly 40.

[0122] The focusing motor also includes a reed assembly 23, which is connected to the movable part 22 and the fixed part 21 respectively, and can provide elastic force. For example, the reed assembly 23 is used to stabilize the movable part 22 in a preset position when the camera module 103 is not powered on, such as the movable part 22 being close to or stabilized at the bottom position under the action of elastic force.

[0123] In some implementations, such as Figure 5The reed assembly 23 includes an upper reed 231 and a lower reed 232 spaced apart along the optical axis direction Z. Specifically, the upper reed 231 includes a first outer connecting portion 2311 connected to the fixed portion 21 and a first inner connecting portion 2312 connected to the movable portion 22. The lower reed 232 includes a second outer connecting portion 2321 connected to the fixed portion 21 and a second inner connecting portion 2322 connected to the movable portion 22. It is understood that the first outer connecting portion 2311 and the second outer connecting portion 2321 can be connected to the housing 211 or to the magnetic circuit assembly.

[0124] It is understood that in some other embodiments, the reed assembly 23 may also include one or more reeds, and this application does not strictly limit this.

[0125] In some implementations, such as Figure 5 As shown, the upper spring 231 or the lower spring 232 simultaneously provides an elastic force to the movable part 22 to stabilize the movable part 22 in a preset position when no power is applied. In other embodiments, when the camera module 103 is not powered on, one of the upper spring 231 or the lower spring 232 may deform to generate an elastic force, thereby providing preload to stabilize the movable part 22 of the focusing motor in a preset position. The other of the upper spring 231 or the lower spring 232 may not deform; this embodiment does not limit this.

[0126] Furthermore, in unstable environments, the elastic force generated by the deformation of the upper spring 231 and the lower spring 232 helps the lens overcome inertia and achieve a clear shooting effect. For example, when the camera module 103 is powered on, the movable part 22 moves away from the preset position, and the upper spring 231 and the lower spring 232 deform to generate an elastic force, which is used to return the movable part 22 to the initial preset position.

[0127] Furthermore, the elastic force generated by the upper spring 231 and the lower spring 232 can buffer the movement of the movable part 22, balance the torque, and improve the stability of the lens assembly 40. In some embodiments, the upper spring 231 and / or the lower spring 232 can be made of conductive material to provide a current path for the circuitry within the camera module 103.

[0128] It is understood that in some other embodiments, the focusing motor may also include components such as a focusing coil, an auxiliary coil, and a Hall effect sensor, which will not be described in detail here.

[0129] Figure 6 for Figure 3 A schematic diagram of the overall structure of the locking motor 30 in the camera module 103; Figure 7 for Figure 6 An exploded view of the locking motor 30 in the diagram; Figure 8for Figure 6 A schematic diagram of the structure of the base 32 of the locking motor 30; Figure 9 for Figure 6 A schematic diagram of the locking element 33 of the locking motor 30.

[0130] See also Figures 6-9 The locking motor 30 may include a locking component 31 and a driving component 36. The driving component 36 is used to drive the locking component 31 to switch between a locked state and an unlocked state. For example, the driving component 36 is used to drive the locking component 31 to be in a locked state after the camera module 103 completes autofocus. The driving component 36 is also used to drive the locking component 31 to be in an unlocked state before the camera module 103 starts autofocus. In the locked state, the locking component 31 is locked to the lens assembly 40. At this time, the lens assembly 40 (as described above) is locked and can no longer move along the optical axis direction Z. The autofocus motor 20 (as described above) cannot perform focusing operations on the lens assembly 40. In the unlocked state, the locking component 31 is disconnected from the lens assembly 40. At this time, the lens assembly 40 is unlocked and can move along the optical axis direction Z. For example, it can move along the optical axis direction Z to autofocus under the drive of the autofocus motor 20 in the above embodiment.

[0131] In this embodiment, the driving component 36 is used to drive the locking component 31 to switch between a locked state and an unlocked state. In the locked state, the locking component 31 locks the lens component 40. In the unlocked state, the locking component 31 unlocks the lens component 40, so that the lens component 40 can be fixed in position by the locking component 31 when it needs to be fixed. When autofocus is needed, the locking component 31 unlocks the lens component 40, and then the autofocus motor 20 focuses the lens component 40. In this embodiment, the camera module 103 can fix the position of the lens component 40 in specific scenarios, such as in motion scenarios. Fixing the position of the lens component 40 by the locking component 31 can avoid repeated focusing and shaking, thereby effectively improving the shooting effect during motion. For example, in a snapshot scenario, the lens assembly 40 can be moved to the user's preferred focus position in advance, and then the locking assembly 31 can be driven to the locked state by the driving assembly 36. The "user's preferred focus position" refers to the focus position that the user frequently uses in daily use. Photos or videos taken at this position meet the user's aesthetic needs. Therefore, the lens assembly 40 is locked at the user's preferred focus position. At this time, the snapshot does not need to go through the autofocus process. However, there is usually not enough time for autofocus during snapshots, which can lead to out-of-focus problems and blurry images. In this embodiment, the camera module 103 can skip the autofocus step and take pictures or videos directly at the user's preferred focus position, thereby obtaining clearer photos or videos that meet the user's aesthetic needs. For example, in scenarios where users are accustomed to manual focus, when a user manually focuses to a preset focus position and intends to take multiple photos or videos at that position, the locking component 31 can be driven to a locked state by the driving component 36. This eliminates the need for repeated manual focusing during shooting, improving the user's shooting experience and saving energy lost due to repeated focusing. It is understood that the camera module 103 in this embodiment can also be applied to many other scenarios.

[0132] The locking assembly 31 may include a base 32 and a locking member 33 movably disposed on the base 32. For example, the locking member 33 may be rotatably disposed on the base 32, or the locking member 33 may be movably disposed on the base 32.

[0133] In some embodiments, the base 32 is fixedly connected between the substrate 10 and the autofocus motor 20. The drive assembly 36 can drive the locking member 33 to move relative to the base 32, so that the locking member 33 is locked or unlocked with the second part 42, so that the locking assembly 31 switches between a locked state and an unlocked state. In the locked state, the locking member 33 locks the lens assembly 40; in the unlocked state, the locking member 33 is unlocked from the lens assembly 40 and can be driven to move along the optical axis direction Z by the autofocus motor 20 in the previous embodiment.

[0134] Understandably, the shape of the base 32 is not specifically limited. For example, it can be roughly cube-shaped, roughly cuboid-shaped, roughly cylindrical, or of course, other shapes.

[0135] See Figures 6-8 In some embodiments, the base 32 includes a bottom wall 321 and a side wall 322 surrounding and connected to the periphery of the bottom wall 321, the side wall 322 and the bottom wall 321 enclosing a receiving space 301.

[0136] In some embodiments, a second through hole 3211 communicating with the receiving space 301 is provided on the bottom wall 321, and the second through hole 3211 can be used to pass through the lens assembly 40.

[0137] See Figure 6 , Figure 7 and Figure 9In some embodiments, the locking assembly 31 includes two locking members 33, namely a first locking member 34 and a second locking member 35. One end of the first locking member 34 is rotatably mounted on the base 32, for example, one end of the first locking member 34 is rotatably mounted on the bottom wall 321. One end of the second locking member 35 is rotatably mounted on the base 32, for example, one end of the second locking member 35 is rotatably mounted on the bottom wall 321. The driving assembly 36 can drive the first locking member 34 and the second locking member 35 to rotate towards each other to abut and clamp the lens assembly 40. At this time, the locking assembly 31 is in a locked state and the lens assembly 40 is locked. The driving assembly 36 can also drive the first locking member 34 and the second locking member 35 to rotate in opposite directions. At this time, the locking assembly 31 is in an unlocked state and the lens assembly 40 is unlocked. It is understood that, in this embodiment, "opposite rotation" means that the space enclosed between the first locking member 34 and the second locking member 35 will decrease after rotation. Specifically, "opposite rotation" means that the first locking member 34 rotates towards the direction closer to the optical axis, and the second locking member 35 rotates towards the direction closer to the optical axis. Conversely, "opposite rotation" means that the space enclosed between the first locking member 34 and the second locking member 35 will increase after rotation. Specifically, "opposite rotation" means that the first locking member 34 rotates away from the optical axis, and the second locking member 35 rotates away from the optical axis.

[0138] In this embodiment, the first locking member 34 and the second locking member 35 are rotatably mounted on the base 32. The driving assembly 36 can drive the first locking member 34 and the second locking member 35 to rotate towards each other to abut and clamp the lens assembly 40, thereby locking the lens assembly 40. The driving assembly 36 can also drive the first locking member 34 and the second locking member 35 to rotate in opposite directions, thereby unlocking the lens assembly 40. The first locking member 34 and the second locking member 35 are rotatably mounted on the base 32, so that both the first locking member 34 and the second locking member 35 move in a circular motion around their respective axes. Under the constraint of their respective axes, the movement paths of the first locking member 34 and the second locking member 35 can be more precise. For the high-precision camera module 103, the rotatable mounting of the first locking member 34 and the second locking member 35 on the base 32 helps to improve the positional accuracy when fixing the locking assembly 31 and the lens assembly 40, thereby improving the overall design precision of the camera module 103. In addition, the rotatable mounting of the first locking member 34 and the second locking member 35 on the base 32 also helps to reduce the design difficulty and structural complexity of the drive assembly 36, and helps to reduce the overall size of the camera module 103.

[0139] See Figure 6 , Figure 7 and Figure 9 In some embodiments, the first locking member 34 includes a first clamping part 341 and a first rotating part 342 and a first free part 343 connected at both ends of the first clamping part 341. The first rotating part 342 is rotatably disposed on the bottom wall 321. The first clamping part 341 is used to clamp the lens assembly 40. The driving assembly 36 can drive the first locking member 34 to rotate by driving the first free part 343 to move.

[0140] See Figure 6 and Figure 7 In some embodiments, the first clamping part 341 includes a first clamping surface 3411, which is an arc surface. Of course, in other embodiments, the first clamping surface 3411 may also be a plane or a curved surface of other shapes.

[0141] See Figure 6 and Figure 7 In some embodiments, the second locking member 35 includes a second clamping part 351 and a second rotating part 352 and a second free part 353 connected to both ends of the second clamping part 351. The second rotating part 352 is rotatably disposed on the bottom wall 321. The second clamping part 351 is used to clamp the lens assembly 40. The driving component 36 can drive the second locking member 35 to rotate by driving the second free part 353 to move.

[0142] In some implementations, such as Figure 7 As shown, the second clamping part 351 includes a second clamping surface 3511, which is an arc surface. Of course, in some other embodiments, the second clamping surface 3511 may also be a plane or a curved surface of other shapes.

[0143] In some implementations, such as Figure 6 As shown, a first rotating shaft 323 and a second rotating shaft 324 are provided on the bottom wall 321. The first rotating part 342 is rotatably connected to the first rotating shaft 323, and the second rotating part 352 is rotatably connected to the second rotating shaft 324.

[0144] In some implementations, such as Figure 6As shown, the bottom wall 321 is also provided with a first limiting post 325 and a second limiting post 326. The first free part 343 is provided with a first limiting groove 3431. The first limiting post 325 is assembled into the first limiting groove 3431. The first limiting post 325 can move a certain distance relative to the first limiting groove 3431 in any direction within the first limiting groove 3431. Thus, within a certain range, the first limiting post 325 will not interfere with the rotation of the first locking member 34. When it exceeds a certain range, the first limiting groove 3431 can limit the length of the movement path of the first locking member 34, reduce the stroke between the locked state and the unlocked state, and reduce the reaction time. The second free part 353 is provided with a second limiting groove 3531 with a similar structure to the first limiting groove 3431.

[0145] See Figures 6-7 The drive assembly 36 includes a first permanent magnet 361, a second permanent magnet 362, a first magnetic element 363, a second magnetic element 364, and an electromagnet 365.

[0146] In some embodiments, the first permanent magnet 361 is fixedly connected to the first locking member 34, and the second permanent magnet 362 is fixedly connected to the second locking member 35. For example, in some embodiments, the first permanent magnet 361 and the first locking member 34 are bonded together. Of course, the first permanent magnet 361 and the first locking member 34 can also be connected by snap-fit ​​or welding, etc.; the second permanent magnet 362 is bonded to the second locking member 35. Of course, the second permanent magnet 362 and the second locking member 35 can also be connected by snap-fit ​​or welding, etc.

[0147] In some embodiments, the electromagnet 365 is fixedly connected to the base 32 and located between the first permanent magnet 361 and the second permanent magnet 362, so that the magnetic attraction or repulsion between the electromagnet 365 and the first permanent magnet 361 and the second permanent magnet 362 can drive the first locking member 34 and the second locking member 35 to rotate relative to the base 32, so that the locking assembly 31 switches between the locked state and the unlocked state.

[0148] In some embodiments, the first magnetic component 363 is fixedly connected to the base 32, for example, by adhesive bonding or snap-fit ​​connection. The first permanent magnet 361 is located between the first magnetic component 363 and the electromagnet 365. The second magnetic component 364 is fixedly connected to the base 32, for example, by adhesive bonding or snap-fit ​​connection. The second permanent magnet 362 is located between the second magnetic component 364 and the electromagnet 365. When a current in the first current direction is input to the electromagnet 365, the electromagnet 365 can attract the first permanent magnet 361 and the second permanent magnet 362 to move towards the electromagnet 365, thereby driving... The first locking member 34 and the second locking member 35 rotate towards each other, thereby driving the locking assembly 31 to the locked state. When the electromagnet 365 is input with a second current direction opposite to the first current direction, the electromagnet 365 can repel the first permanent magnet 361 and the second permanent magnet 362 from moving away from the electromagnet 365, thereby driving the first locking member 34 and the second locking member 35 to rotate in opposite directions, thereby driving the locking assembly 31 to the unlocked state. In the locked state, the first permanent magnet 361 and the second permanent magnet 362 are both magnetically attracted to the electromagnet 365. In the unlocked state, the first permanent magnet 361 is magnetically attracted to the first magnetic element 363, and the second permanent magnet 362 is magnetically attracted to the second magnetic element 364.

[0149] In this embodiment, the cooperation between the first permanent magnet 361, the second permanent magnet 362, the first magnetic component 363, the second magnetic component 364, and the electromagnet 365 results in several advantages. Firstly, the design of the first permanent magnet 361, the second permanent magnet 362, the first magnetic component 363, the second magnetic component 364, and the electromagnet 365 is simple and easy to miniaturize, which helps reduce the design difficulty of the locking motor 30 and simplify its size. Secondly, the locking and unlocking functions of the lens assembly 40 can be achieved through only one set of forward and reverse current switching, improving control convenience. Furthermore, even if the locking motor 30 is de-energized in the locked state, the locking assembly 31 can remain in the locked state due to the magnetic attraction between the iron core of the electromagnet 365 and the first and second permanent magnets 361 and 362, thereby saving energy and reducing heat generation.

[0150] In some other embodiments, the drive assembly 36 may consist only of an electromagnet 365 and a first permanent magnet 361 and a second permanent magnet 362. In the unlocked state, the electromagnet 365 is not energized, and the distance between the electromagnet 365 and the first and second permanent magnets 361 and 362 is large enough that the core of the electromagnet 365 cannot drive the first and second permanent magnets 361 and 362 to move through magnetic attraction. However, when the electromagnet 365 is energized, the distance between the electromagnet 365 and the first and second permanent magnets 361 and 362 is large enough that the core of the electromagnet 365 cannot drive the first and second permanent magnets 361 and 362 to move through magnetic attraction. The magnetic attraction between magnets 362 can drive the first permanent magnet 361 and the second permanent magnet 362 to move towards each other, so that the iron core of electromagnet 365 is magnetically attracted to the first permanent magnet 361 and the second permanent magnet 362, thus keeping the locking component 31 in a locked state. When electromagnet 365 is de-energized, the magnetic attraction between the iron core of electromagnet 365 and the first permanent magnet 361 and the second permanent magnet 362 can also keep the locking component 31 in a locked state, thereby saving energy and reducing heat generation.

[0151] Figure 10 for Figure 3 The diagram shows the structure of the locking motor 30 and the lens assembly 40 assembled together, with the locking assembly 31 in a locked state at this time. Figure 11 for Figure 3 The diagram shows the structure of the locking motor 30 and the lens assembly 40 assembled together, with the locking assembly 31 in the unlocked state at this time; Figure 12 for Figure 3 A cross-sectional view of the camera module 103. It is understandable that... Figure 10 The locking component 31 is only one of many structures in this application; different structures of the locking component 31 can all achieve the locking state. Figure 11 The locked state is one of the multiple unlocking states of the locking component 31 in this application. The locking component 31 in this application may also include other forms of locking states.

[0152] See also Figures 10-12 When the lens assembly 40 is located at any point in the focusing travel, the locking component 31 can lock or unlock with the lens assembly 40. It can be understood that the "focusing travel" refers to the path that the lens assembly 40 can move when focusing via the autofocus motor 20, and a certain position of the lens assembly 40 on this path is a certain point in the focusing travel. In this embodiment, since the locking component 31 can lock or unlock with the lens assembly 40 when it is located at any point in the focusing travel, the lens assembly 40 can be locked at any focusing position. This allows the lens assembly 40 to be locked in a focusing position with good focusing effect, improving the user experience.

[0153] See also Figures 10-12In some embodiments, the lens assembly 40 includes a first portion 41 and a second portion 42 interconnected together, with an autofocus motor 20 surrounding and connected to the first portion 41. In a direction perpendicular to the optical axis Z of the camera module 103, such as in the first direction X, the second portion 42 faces a locking assembly 31, which is used to lock or unlock the second portion 42. In this embodiment, the locking component 31 is used to lock or unlock the second part 42 located outside the autofocus motor 20. In the optical axis direction Z perpendicular to the camera module 103, the second part 42 is directly opposite the locking component 31, that is, the second part 42 is not locked or surrounded by the autofocus motor 20, which makes it easy for the locking component 31 to lock the second part 42. The locking motor 30 and the autofocus motor 20 correspond to different parts of the lens assembly 40 in the optical axis direction Z, so that the position between the autofocus motor 20 and the locking motor 30 is decoupled, effectively reducing the structural design difficulty of the locking motor 30, improving the structural rationality of the lens assembly 40, and also increasing the structural design diversity of the locking motor 30.

[0154] It is understood that the first direction X in this embodiment can be any direction perpendicular to the optical axis direction Z of the camera module 103, not just the first direction X shown in the figure.

[0155] See also Figure 10 and Figure 12 In some embodiments, when the lens assembly 40 is located at any point in the focusing travel, in the first direction X, the lens assembly 40 is at least partially directly facing the locking assembly 31, and the portion of the lens assembly directly facing the locking assembly 31 is the second portion 42. Since the lens assembly 40 is at least partially directly facing the locking assembly 31 in the first direction X when it is located at any point in the focusing travel, the second portion 42 can be locked or unlocked by the locking assembly 31 at any focusing position. This allows the lens assembly 40 to be locked in a focusing position with good focusing effect, thereby improving the user experience.

[0156] It is understood that the lengths of the first portion 41 and the second portion 42 along the optical axis Z of the camera module 103 can vary as the lens assembly 40 focuses. For example, the second portion 42 at the upper focus point is shorter along the optical axis Z than the second portion 42 at the lower focus point. In this embodiment, regardless of the focus position, the portion of the lens assembly 40 surrounded by the autofocus motor 20 is referred to as the first portion 41, and the portion of the lens assembly 40 not surrounded by the autofocus motor 20 is referred to as the second portion 42. It is understood that the "upper focus point" refers to the position where the lens assembly 40 can move furthest from the substrate 10 in the optical axis Z of the camera module 103 during focusing, and the "lower focus point" refers to the position where the lens assembly 40 can move closest to the substrate 10 in the optical axis Z of the camera module 103 during focusing.

[0157] See also Figures 10-12 In some embodiments, the portion of the lens assembly 40 housed within the receiving space 2111 is designated as the first portion 41, which can be fixedly connected to the movable part 22. The movable part 22 then moves along the optical axis Z, driving the lens assembly 40 to achieve autofocus. The portion of the lens assembly 40 located outside the receiving space 2111 is designated as the second portion 42. This facilitates locking and unlocking of the second portion 42 by the locking motor 30, enabling decoupling of the positions between the autofocus motor 20 and the locking motor 30. This effectively reduces the structural design complexity of the locking motor 30, improves the structural rationality of the lens assembly 40, and also enhances the diversity of the locking motor 30's structural design.

[0158] It is understood that the shape of the lens assembly 40 in this embodiment is not limited. For example, it can be roughly cylindrical, or it can be roughly square or rectangular.

[0159] See also Figure 10 and Figure 12 In some embodiments, the second part 42 has a sleeve-like structure, including an outer sidewall 422, a bottom wall 423, and an inner sidewall 424. The bottom wall 423 faces the substrate 10, and the outer sidewall 422 faces the locking assembly 31, which is used to abut against the outer sidewall 422. In this embodiment, by abutting the outer sidewall 422 with the locking assembly 31, the second part 42 can be locked and unlocked.

[0160] See also Figure 10 and Figure 12In some embodiments, the locking component 31 can abut against different positions on the outer sidewall 422, so that the locking component 31 can lock or unlock the lens assembly 40 when the lens assembly 40 is at any point in the focusing stroke. In this embodiment, the locking component 31 can abut against any position on the sidewall of the second part 42, so that the locking component 31 can lock or unlock the lens assembly 40 when the lens assembly 40 is at any point in the focusing stroke. Therefore, for any focusing position, the lens assembly 40 can be locked, thereby locking the lens assembly 40 in a focusing position with good focusing effect, which can improve the user experience.

[0161] It is understandable that when the lens assembly 40 is at any point in the focusing stroke, the parts that cooperate between the second part 42 and the locking assembly 31 are sufficient to meet the locking requirements of the locking assembly 31.

[0162] See also Figures 10-12 In some embodiments, the accommodating space 2111 and the receiving space 301 are directly opposite and connected in the optical axis direction Z. The second part 42 is located in the receiving space 301, which facilitates cooperation with the locking component 31 located in the receiving space 301 to lock and unlock the second part 42. Moreover, the second part 42 of the lens assembly 40 is located in the receiving space 301, which can effectively protect the second part 42 of the lens assembly 40 and also help to meet the sealing performance requirements of the camera module 103.

[0163] See also Figure 7 as well as Figures 10-12In some specific embodiments, the sidewall 322 of the base 32 is fixed to the base plate 10, the bottom wall 321 of the base 32 is connected to the side of the sidewall 322 facing the autofocus motor 20, the housing 211 is disposed on the bottom wall 321, the second through hole 3211 formed by the bottom wall 321 is directly opposite to and communicates with the first through hole 221 formed by the movable part 22, the first part 41 of the lens assembly 40 is fixed to the first through hole 221, and the second part 42 of the lens assembly 40 passes through the second through hole 3211 and enters the receiving space 301 to cooperate with the locking component 31 to realize the locking and unlocking of the lens assembly 40. In this embodiment, when a current in the first current direction is input to the electromagnet 365, the electromagnet 365 can attract the first permanent magnet 361 and the second permanent magnet 362 to move towards the electromagnet 365, thereby driving the first locking member 34 and the second locking member 35 to rotate towards each other, thereby driving the locking assembly 31 to the locked state. At this time, both the first permanent magnet 361 and the second permanent magnet 362 are magnetically attracted to the electromagnet 365. In the locked state, the second part 42 is clamped and tightened by the first locking member 34 and the second locking member 35, thereby restricting the movement of the second part 42 along the optical axis direction Z, and thus restricting the movement of the lens assembly 40 in the optical axis direction Z. When an electromagnet 365 receives a second current direction opposite to the first current direction, the electromagnet 365 repels the first permanent magnet 361 and the second permanent magnet 362 from moving away from the electromagnet 365, thereby driving the first locking member 34 and the second locking member 35 to rotate in opposite directions, thus driving the locking assembly 31 to the unlocked state. At this time, the first permanent magnet 361 and the first magnetic member 363 are magnetically attracted, and the second permanent magnet 362 and the second magnetic member 364 are magnetically attracted. In the locked state, the autofocus motor 20 can be energized and working, or it can be de-energized. However, in the locked state, the force applied by the autofocus motor 20 to the first part 41 is insufficient to drive the lens assembly 40 out of the locking assembly 31. That is, in the locked state, the lens assembly 40 remains stationary in the optical axis direction Z. In the unlocked state, the first locking member 34 and the second locking member 35 can be spaced apart from the second part 42, that is, there is a gap 421 between the second part 42 and the first locking member 34 and the second locking member 35. In this case, the autofocus motor 20 can drive the lens assembly 40 to move in the optical axis direction Z to achieve autofocus. Of course, in some embodiments, in the unlocked state, the first locking member 34 and the second locking member 35 can also be in a state of clamping but not clamping the second part 42. In this case, although there is no gap 421 between the first locking member 34 and the second locking member 35 and the second part 42, the lens assembly 40 can still move in the optical axis direction Z under the drive of the autofocus motor 20.

[0164] In some embodiments, when locked, the locking motor 30 is de-energized. Under the magnetic attraction between the iron core of the electromagnet 365 and the first permanent magnet 361 and the second permanent magnet 362, the locking assembly 31 can be kept in the locked state, thereby saving energy and reducing heat generation.

[0165] In some embodiments, when in the unlocked state, the locking motor 30 is de-energized. Since the first permanent magnet 361 and the first magnetic element 363 are magnetically attracted, and the second permanent magnet 362 and the second magnetic element 364 are magnetically attracted, the locking assembly 31 can be kept in the unlocked state, thereby saving energy and reducing heat generation.

[0166] In some implementations, such as Figure 12 As shown, the image processing module 50 is housed within the receiving space 301 enclosed by the base 32, thereby making full use of the receiving space 301 and helping to reduce the overall size of the camera module 103.

[0167] Figure 13 This is a partial structural schematic diagram of another camera module 103 provided in the embodiments of this application; Figure 14 for Figure 13 An exploded view is shown below. This embodiment may include most of the technical features of the embodiments described above. The following mainly describes the differences between the two, and most of the content that is the same in both will not be repeated.

[0168] See also Figure 13 and Figure 14 The camera module 103 includes a substrate 10, an autofocus motor 20, a locking motor 30, and a lens assembly 40. The substrate 10, autofocus motor 20, and lens assembly 40 can be configured as described in the previous embodiment, and will not be repeated hereafter. The main difference between this embodiment and the previous embodiment is that the specific structure of the locking motor 30 in this embodiment differs from that in the previous embodiment, especially the drive component 36 of the locking motor 30, which is significantly different.

[0169] In some implementations, such as Figure 14As shown, the locking motor 30 may include a locking assembly 31 and a driving assembly 36. The locking assembly 31 includes a base 32, a first locking member 34, and a second locking member 35. The first locking member 34 has the same structure as the first locking member 34 substrate 10 in the previous embodiment, with the main difference being that a first worm gear tooth 3432 is formed on the first free portion 343 of the first locking member 34 in this embodiment. The second locking member 35 has the same structure as the second locking member 35 substrate 10 in the previous embodiment, with the main difference being that a second worm gear tooth 3532 is formed on the second free portion 353 of the second locking member 35 in this embodiment. The first clamping portion 341 and the first rotating portion 342 of the first locking member 34, and the second clamping portion 351 and the second rotating portion 352 of the second locking member 35, can all be referred to the previous embodiment and will not be repeated here. The base 32 is basically the same as the base 32 in the previous embodiment. The main difference is that the bottom wall 321 in this embodiment does not have the first limiting post 325 and the second limiting post 326. The base 32 in this embodiment includes a limiting block 327, which is located between the first free part 343 and the second free part 353. The limiting block 327 can limit the length of the movement path of the first locking member 34 and the second locking member 35, reduce the travel between the locked state and the unlocked state, and reduce the reaction time.

[0170] In some implementations, such as Figure 14As shown, the drive assembly 36 includes a power source 366, a rotating shaft 367, and a first worm gear 368 and a second worm gear 369 disposed on the rotating shaft 367. The power source 366 can be a motor, a rotary cylinder, or a hydraulic cylinder, etc. The teeth of the first worm gear 368 and the second worm gear 369 are opposite in direction. The first worm gear 368 meshes with the first worm wheel tooth 3432, and the second worm gear 369 meshes with the second worm wheel tooth 3532. The power source 366 can drive the rotating shaft 367 to rotate in the forward or reverse direction, so as to drive the first locking member 34 and the second locking member 35 to rotate relative to or opposite to each other. When the first locking member 34 and the second locking member 35 rotate toward each other (see the previous embodiment for details), the first locking member 34 and the second locking member 35 can clamp the lens assembly 40, thereby locking the lens assembly 40. When the first locking member 34 and the second locking member 35 rotate away from each other (see the previous embodiment for details), the lens assembly 40 can be unlocked. In this embodiment, through a worm gear mechanism, the first worm gear tooth 368 can drive the first worm wheel tooth 3432 to rotate. When the power source 366 does not provide power, the first worm gear tooth 368 and the first worm wheel tooth 3432 can achieve self-locking. The second worm gear tooth 369 can drive the second worm wheel tooth 3532 to rotate. When the power source 366 does not provide power, the second worm gear tooth 369 and the second worm wheel tooth 3532 can achieve self-locking. Thus, even without power, the locking assembly 31 can remain in the locked state, thereby saving energy and reducing heat generation. Furthermore, since the first worm gear tooth 3432 and the second worm tooth 369 are both located on the rotating shaft 367, and the tooth directions of the first worm tooth 368 and the second worm tooth 369 are opposite, the first locking member 34 and the second locking member 35 can be driven by a rotating shaft 367 and a power source 366, thereby simplifying the structure of the drive assembly 36.

[0171] Figure 15 This is a partial structural diagram of another camera module 103 provided in this application embodiment; this embodiment may include most of the technical features of the above embodiments, and the following mainly describes the differences between the two, while most of the content that is the same in both will not be repeated.

[0172] See Figure 15 The camera module 103 includes a substrate 10, an autofocus motor 20, a locking motor 30, and a lens assembly 40. The substrate 10, autofocus motor 20, and lens assembly 40 can be configured as described in the previous embodiment, and will not be repeated hereafter. The main difference between this embodiment and the previous embodiment is that the specific structure of the locking motor 30 in this embodiment differs from that in the previous embodiment, especially the drive component 36 of the locking motor 30, which is significantly different.

[0173] In some implementations, such as Figure 15As shown, the locking motor 30 may include a locking assembly 31 and a driving assembly 36. The locking assembly 31 includes a base 32, a first locking member 34 and a second locking member 35.

[0174] The structure of the first locking member 34 is basically the same as that of the first locking member 34 in the previous embodiment. The main difference is that the first locking member 34 in this embodiment slides relative to the base 32 along a preset direction, instead of rotating relative to the base 32 as in the previous embodiment. Specifically, the first locking member 34 includes a first clamping part 341, a first sliding part 345 and a first free part 343 located at both ends of the first clamping part 341. The first sliding part 345 is provided with a first guide groove 3451. The shape of the first guide groove 3451 can be a long strip groove such as an oblong groove or a rectangular groove. The base 32 is provided with a first guide rod. The first guide rod can be an oblong, rectangular or square rod, or it can be a combination guide rod composed of two or more circular rods. The first guide rod can slide relative to the first guide groove 3451 along a preset direction, which is also the length direction of the first guide groove 3451. As for the first clamping part 341 in this embodiment, it can be referred to the previous embodiment and will not be described again here.

[0175] The structure of the second locking member 35 is basically the same as that of the second locking member 35 in the previous embodiment. The main difference is that the second locking member 35 in this embodiment slides relative to the base 32 along a preset direction, instead of rotating relative to the base 32 as in the previous embodiment. Specifically, the second locking member 35 includes a second clamping part 351, a second sliding part 355 and a second free part 353 located at both ends of the second clamping part 351. A second guide groove 3551 is provided on the second sliding part 355. The shape of the second guide groove 3551 can be a long strip groove such as an oblong groove or a rectangular groove. A second guide rod is provided on the base 32. The second guide rod can be an oblong, rectangular or square rod, or it can be a combination guide rod composed of two or more circular rods. The second guide rod can slide relative to the second guide groove 3551 along a preset direction, which is also the length direction of the second guide groove 3551. As for the second clamping part 351 in this embodiment, it can be referred to the previous embodiment and will not be described in detail here.

[0176] The base 32 is basically the same as the base 32 in the previous embodiment. The main difference is that the bottom wall 321 in this embodiment does not have the first limiting post 325 and the second limiting post 326. The base 32 in this embodiment includes a limiting block 327, which is located between the first free part 343 and the second free part 353. The limiting block 327 can limit the length of the movement path of the first locking member 34 and the second locking member 35, reduce the travel between the locked state and the unlocked state, and reduce the reaction time.

[0177] In this embodiment, the first locking member 34 and the second locking member 35 can slide towards each other in a preset direction under the drive of the drive component 36 to abut and clamp the lens assembly 40, thereby driving the locking component 31 to the locked state (refer to the previous embodiment) and locking the lens assembly 40. The first locking member 34 and the second locking member 35 can also slide away from each other in a preset direction under the drive of the drive component 36, thereby driving the locking component 31 to the unlocked state (refer to the previous embodiment) and unlocking the lens assembly 40.

[0178] In some implementations, such as Figure 15 As shown, the first clamping surface 3411 on the first clamping part 341 is an arc surface, the second clamping surface 3511 on the second clamping part 351 is an arc surface, and the second part 42 of the lens assembly 40 is cylindrical. The outer diameter of the second part 42 is the same as the inner diameter of the first clamping surface 3411 and the second clamping surface 3511. Thus, in the locked state, the first clamping surface 3411 and the second clamping surface 3511 can be completely attached to the outer surface of the second part 42, thereby making the second part 42 subjected to balanced force when clamped, and preventing the lens assembly 40 from deviating from the original optical axis, so as to improve the fixing accuracy.

[0179] It is understood that the shape of the lens assembly 40 and the shapes of the first clamping surface 3411 and the second clamping surface 3511 can be adjusted according to requirements. The above implementation is only one of the many embodiments of this application.

[0180] In some implementations, such as Figure 15 As shown, the drive assembly 36 includes a rotating shaft 367, a power source 366, and a first threaded portion 370 and a second threaded portion 371 disposed on the rotating shaft 367. The axial direction of the rotating shaft 367 is the same as the preset direction. The first locking member 34 engages with the first threaded portion 370, specifically the first free portion 343 engages with the first threaded portion 370. The second free portion 353 of the second locking member 35 engages with the second threaded portion 371, specifically the second free portion 353 engages with the second threaded portion 371. The power source 366 can drive the rotating shaft 367 to rotate in the forward or reverse direction, so as to drive the first locking member 34 and the second locking member 35 to slide relative to or opposite to each other. Through the cooperation between the first threaded portion 370 and the second threaded portion 371 on the rotating shaft 367 and the first locking member 34 and the second locking member 35, the first locking member 34 and the second locking member 35 can be simultaneously driven to slide along the axial direction of the rotating shaft 367 by one rotating shaft 367, so that the first locking member 34 and the second locking member 35 slide relative to each other or in opposite directions, reducing structural complexity, and also ensuring the synchronicity of the sliding of the first locking member 34 and the second locking member 35, which is beneficial to improving the positional accuracy of the locking member 33 and the lens assembly 40 in the locked state.

[0181] In some implementations, the preset direction is parallel to the first direction X in the preceding embodiments. It is understood that in other implementations, the preset direction may not be parallel to the first direction X.

[0182] It is understood that, in this embodiment, sliding towards each other refers to the movement in which the distance between the first locking member 34 and the second locking member 35 gradually decreases, while sliding away from each other refers to the movement in which the distance between the first locking member 34 and the second locking member 35 gradually increases.

[0183] Figure 16 This is a partial structural schematic diagram of another camera module 103 provided in the embodiments of this application; Figure 17 for Figure 16 A schematic diagram of the decomposition process; Figure 18 for Figure 16 A schematic diagram of the assembly structure of the locking element 33 and the base 32; Figure 19 for Figure 16 A schematic diagram of the assembly structure of the locking element 33 and the turntable 372 is shown. This embodiment may include most of the technical features of the embodiments described above. The following mainly describes the differences between the two, and most of the content that is the same in both will not be repeated.

[0184] See also Figures 16-19 The camera module 103 includes a substrate 10, an autofocus motor 20, a locking motor 30, and a lens assembly 40. The substrate 10, autofocus motor 20, and lens assembly 40 can be configured as described in the previous embodiment, and will not be repeated hereafter. The main difference between this embodiment and the previous embodiment is that the specific structure of the locking motor 30 in this embodiment differs from that in the previous embodiment, especially the drive component 36 of the locking motor 30, which is significantly different.

[0185] In some implementations, such as Figure 16 and Figure 17As shown, the locking motor 30 may include a locking assembly 31 and a driving assembly 36. The locking assembly 31 includes a base 32 and a plurality of locking elements 33, specifically two or more locking elements 33. The base 32 includes a bottom wall 321 and a side wall 322, which together form a receiving space 301. The bottom wall 321, side wall 322, and receiving space 301 are described in the previous embodiment and will not be repeated here. The plurality of locking elements 33 are arranged around the lens assembly 40 and are rotatably connected to the base 32. The driving assembly 36 can drive the plurality of locking elements 33 to rotate in a first rotation direction a to abut and clamp the lens assembly 40, thereby driving the locking assembly 31 to a locked state and locking the lens assembly 40. The driving assembly 36 can also drive the plurality of locking elements 33 to rotate in a second rotation direction b, thereby driving the locking assembly 31 to an unlocked state and unlocking the lens assembly 40, wherein the first rotation direction a and the second rotation direction b are opposite. Based on the arrangement of multiple locking members 33 surrounding the lens assembly 40, and the rotatable connection of the multiple locking members 33 to the base 32, this not only improves the positional accuracy of the locking assembly 31 when fixing the lens assembly 40, similar to the two locking members 33 in the previous embodiment, but also improves the overall design accuracy of the camera module 103. Furthermore, since there are multiple locking members 33, the lens assembly 40 can be clamped at multiple points, which helps maintain the uniformity of force on the lens assembly 40 in multiple directions, thus improving the locking stability and positional accuracy of the lens assembly 40 during locking.

[0186] In some implementations, such as Figure 16 and Figure 17 As shown, the multiple locking members 33 are all the same in shape and size, and are evenly distributed around the optical axis, meaning that they can overlap each other when rotating around the optical axis. In this embodiment, because the multiple locking members 33 are evenly distributed around the optical axis, when the multiple locking members 33 clamp the lens assembly 40, specifically the second part 42 of the lens assembly 40, the second part 42 in this embodiment is cylindrical, so that the multiple locking members 33 can evenly clamp the second part 42. This helps to improve the positional accuracy when the locking assembly 31 and the lens assembly 40 are fixed, and thus helps to improve the overall design accuracy of the camera module 103.

[0187] In some implementations, such as Figure 16 and Figure 17As shown, the locking member 33 is provided with a first rotating shaft 323, and the bottom wall 321 of the base 32 is provided with a first rotating hole 3212. The locking member 33 is rotatably mounted on the first rotating hole 3212 via the first rotating shaft 323. The locking member 33 is provided with a second rotating hole 331, and the locking member 33 is rotatably connected to the drive assembly 36 via the second rotating hole 331. The axes of the first rotating shaft 323 and the second rotating hole 331 do not coincide. For example, the first rotating shaft 323 and the second rotating hole 331 are spaced apart, or the first rotating shaft 323 and the second rotating shaft 324 corresponding to each locking member 33 are spaced apart.

[0188] In some implementations, such as Figure 16 , Figure 17 and Figure 19 As shown, the drive assembly 36 includes a turntable 372 that rotates relative to the base 32, a worm gear 374, and a power source for driving the worm gear 374 to rotate. The turntable 372 has a worm gear tooth 373 on its periphery, and the worm gear 374 meshes with the worm gear tooth 373. All locking members 33 are rotatably connected to the turntable 372. Specifically, the turntable 372 has a second rotating shaft 324, and each locking member 33 is rotatably mounted within a second rotating shaft 324 through a second rotating hole 331 on it. The power source can drive the worm gear 374 to rotate forward or backward, thereby driving the turntable 372 to rotate forward or backward. The forward or backward rotation of the turntable 372 can drive multiple locking members 33 to rotate in either a first rotation direction a or a second rotation direction b, thereby driving the locking assembly 31 to switch between a locked state and an unlocked state to achieve locking and unlocking of the lens assembly 40. In this embodiment, the drive assembly 36 also employs a worm gear 374, which can maintain the locked state of the locking assembly 31 even when the power source is not providing power, thereby saving energy and reducing heat generation. Furthermore, since one turntable 372 connects multiple locking elements 33 simultaneously, the rotational synchronization of the multiple locking elements 33 can be ensured, which helps improve the positional accuracy of the locking elements 33 and the lens assembly 40 in the locked state.

[0189] This application embodiment also provides another camera module, including a lens assembly 40, a locking motor 30, and an autofocus motor 20. Along the optical axis Z of the camera module 103, the locking motor 30 and the autofocus motor 20 are stacked. The locking motor 30 and the autofocus motor 20 are two independent lens assembly 40 drive modules. The autofocus motor 20 surrounds and connects to the lens assembly 40. The autofocus motor 20 drives the lens assembly 40 along the optical axis Z to achieve focusing. When the lens assembly 40 is at any point in the focusing stroke, the locking motor 30 can lock or unlock with the lens assembly 40. The lens assembly 40, locking motor 30, and autofocus motor 20 in this embodiment can all refer to the previous embodiments, and will not be described again in this embodiment.

[0190] In this embodiment, the vertical positional relationship between the locking motor 30 and the autofocus motor 20 is not limited. As long as the locking motor 30 and the autofocus motor 20 are two independent lens assembly 40 drive modules, that is, the positions of the locking motor 30 and the autofocus motor 20 can be decoupled. For example, the locking motor 30 can be located below the autofocus motor 20, or it can be located above or to the side of the autofocus motor 20.

[0191] In this embodiment, the camera module 103 can fix the position of the lens assembly 40 in specific scenarios, such as in motion scenarios. By fixing the position of the lens assembly 40 with the locking motor 30, vibration can be avoided, thereby effectively improving the shooting effect of the camera module 103 during motion. Since the locking motor 30 and the autofocus motor 20 are two independent lens assembly 40 driving modules, the autofocus motor 20 and the locking motor 30 are in a decoupled positional relationship. The shape design of the autofocus motor 20 and the locking motor 30 will not affect each other, which is conducive to improving the design diversity of the autofocus motor 20 and the locking motor 30. For example, different types of autofocus motors 20 can be used to match different types of locking motors 30. Moreover, since the autofocus motor 20 and the locking motor 30 are in a decoupled positional relationship, it is conducive to modular production, replacement and maintenance, improving convenience. In addition, since the locking motor 30 can lock or unlock the lens assembly 40 at any point in the focusing stroke when the lens assembly 40 is located, the lens assembly 40 can be locked at any focusing position, thereby locking the lens assembly 40 at a focusing position with good focusing effect, which can improve the user experience.

[0192] Figure 20 A flowchart of a possible control method for a camera module 103 provided in this application.

[0193] This application embodiment also provides a control method for a camera module 103. This control method for the camera module 103 is applied to the electronic device 100 in the foregoing embodiments. The control method for the camera module 103 includes the following steps:

[0194] S100, activate photo or video mode.

[0195] In step S100, users can manually enter photo or video recording mode via input on the user interface. In other implementations, the mode can be automatically activated via intelligent control. For example, in some scenarios, using a mobile phone as an example, when a user raises the phone and holds it pointed at the object to be photographed for 3 seconds or more, the mode is automatically activated. In other implementations, the mode can be remotely activated via other smart devices. It should be noted that activating photo or video recording mode is different from executing the action command for taking a photo or video recording; specifically, the mode must be activated first before the action of taking a photo or video recording can be performed.

[0196] S200, detects whether electronic device 100 has entered sports mode.

[0197] In step S200, whether the electronic device 100 has entered motion mode can be detected in various ways. For example, in some embodiments, the movement of the electronic device 100 can be detected, and after the movement of the electronic device 100 is detected, the electronic device 100 enters motion mode. In this embodiment, motion refers to motion with a speed exceeding a preset value or motion with an acceleration exceeding a preset value. The preset value can be set according to requirements. It is understood that the electronic device 100 in this embodiment can be referred to the textual embodiment, and will not be described in detail here.

[0198] In some implementations, the magnitude of acceleration can be detected by an accelerometer, and then it can be determined whether the magnitude of acceleration exceeds a preset value.

[0199] In some implementations, the electronic device 100 can enter motion mode after detecting whether it receives a motion mode input signal from the user interface.

[0200] The electronic device 100 in this embodiment can detect whether it has entered motion mode through at least two methods: manual input and automatic detection, which improves the convenience of use and enhances the user experience.

[0201] S300: After determining that the electronic device 100 is in motion mode, the autofocus motor 20 is activated and drives the lens assembly 40 to move to achieve autofocus.

[0202] In some implementations, an autofocus signal is generated after the electronic device 100 is in motion mode, and the camera module 103 responds to the autofocus signal by driving the autofocus motor 20 to move the lens assembly 40 to achieve autofocus.

[0203] Through step S300, after the electronic device 100 enters motion mode, the autofocus motor 20 drives the lens assembly 40 to autofocus, so as to perform step S400 as follows.

[0204] S400: After autofocus is complete, the locking motor 30 is activated and the lens assembly 40 is locked.

[0205] In some implementations, a locking signal is generated after autofocus is completed, and the camera module 103 responds to the locking signal by locking the locking motor 30 locking the lens assembly 40.

[0206] In step S400, "autofocus complete" refers to focusing until the image is clear. The locking motor 30 can be the locking motor 30 described in the previous embodiment, or it can be any other locking motor 30 capable of locking and unlocking the lens assembly 40. When the locking motor 30 locks the lens assembly 40, it is equivalent to the lens assembly 40 being locked when the locking component 31 is in the locked state, as described in the previous embodiment. For example, if the locking motor 30 in step S400 is the locking motor 30 described in the previous embodiment, power can be cut off after the locking motor 30 locks the lens assembly 40. Even after power is cut off, the locking motor 30 still has a fixing effect on the lens assembly 40, and the lens assembly 40 still cannot move along the optical axis Z, thus saving power.

[0207] The S500 is used for taking photos or videos.

[0208] In the S500 step, the function of taking a photo or video can be performed manually by inputting through the user interface, or it can be performed intelligently through preset methods. For example, in some scenarios, the function of taking a photo or video can be performed intelligently through smile recognition, voice recognition, etc.

[0209] The control method of the camera module 103 in this embodiment can solve the problems of repeated focusing and shaking in motion. Specifically, the autofocus motor 20 drives the lens assembly 40 to autofocus. However, in motion, due to the change in distance between the lens assembly 40 and the object to be photographed after focusing, the autofocus motor 20 will autofocus on the lens assembly 40 again. This repeated focusing results in poor shooting effect. In the control method of the camera module 103 in this embodiment, after entering motion mode through the judgment in step S200, the autofocus motor 20 drives the lens assembly 40 to autofocus. However, after focusing, the lens assembly 40 can be locked through step S400. After that, the autofocus motor 20 can no longer autofocus repeatedly. Compared with repeated focusing, the shooting effect after the lens assembly 40 is locked is better.

[0210] Understandably, after the locking motor 30 fixes and locks the lens assembly 40, the autofocus motor 20 can automatically cut off power to save energy.

[0211] In some implementations, after the detection electronic device 100 exits the motion mode, the locking motor 30 receives an unlocking signal, at which point the lens assembly 40 unlocks, and the autofocus motor 20 can drive the lens assembly 40 to move along the optical axis to achieve autofocus. Specifically, the user can manually exit the motion mode, or the motion mode can be automatically exited when the moving speed or acceleration is less than a preset value within a preset time period. Both the preset time period and the preset value can be set by the user.

[0212] Figure 21 A flowchart illustrating another possible control method for a camera module 103 provided in this application. This control method for the camera module 103 can be applied to the electronic device 100 in the preceding embodiments. It is understood that this control method for the camera module 103 can also be applied to electronic devices different from those in the preceding embodiments.

[0213] This application embodiment also provides a control method for a camera module 103, the control method for the camera module 103 includes the following steps:

[0214] S100, activate photo or video mode.

[0215] Step S100 in this embodiment can be referred to the preceding text. Figure 20 The S100 step in the embodiment is not described in detail here.

[0216] S200 reads focus data within a preset time period, including focus position and duration.

[0217] In step S200, the preset time period can refer to the past 24 hours before the camera or video recording mode is activated, the past 10 days before the camera or video recording mode is activated, or all the time from the activation of the phone to the activation of the camera or video recording mode. It can be understood that the preset time period can be set according to needs.

[0218] The focus position refers to the position of the lens assembly 40 when the electronic device 100 is taking a picture or video. In this embodiment, the focus position of the lens assembly 40 can be expressed by the focal length.

[0219] S300 obtains the target focus position from the focus data, wherein the target focus position is the position where the focus position of the lens assembly 40 is located for a duration exceeding a preset duration.

[0220] In step S300, the preset duration can refer to a set time span, such as a preset duration of 10 minutes. The preset duration can be set according to your needs.

[0221] The target focus position refers to the focus position maintained for a preset duration (e.g., 10 minutes) among all focus positions reachable by the lens assembly 40. In this embodiment, that focus position is the target focus position. For example, if the lens assembly maintains a focus position at a focal length of 15mm for more than the preset duration (e.g., 10 minutes), then the focus position at a focal length of 15mm is the target focus position.

[0222] It is understandable that the duration for which the lens assembly 40 remains in the focus position refers to the sum of all times the lens assembly 40 is in that focus position. It should be noted that the target focus position in step S300 can refer to a point or a range. For example, the target focus position can be a focus position with a focal length of 15mm, or a focus position with a focal length of 10mm-15mm.

[0223] In some implementations, the target focus position needs to be further filtered. For example, when there is more than one focus position that exceeds the preset time, the target focus position is the focus position that exceeds the preset time the longest among the multiple focus positions that exceed the preset time.

[0224] S400, the lens assembly 40 of the electronic device 100 completes focusing at the target focusing position.

[0225] In step S400, the lens assembly 40 can achieve focusing at the target focus position using the autofocus motor 20 in the previous embodiment. It is understood that when the target focus position refers to a range, it is sufficient for the lens assembly 40 to be within that range.

[0226] Understandably, once the target focus position is obtained, if the lens assembly 40 is exactly at the target focus position, step S500 below can be executed directly. If the lens assembly 40 is not at the target focus position after obtaining the target focus position, step S400 is executed.

[0227] S500, locks lens assembly 40 at the target focus position.

[0228] In step S500, the locking motor 30 in the previous embodiment can be activated and locked to the target focusing position.

[0229] The principle by which the locking motor 30 locks the lens assembly 40 in the focusing position in this embodiment can be referred to the previous text. Figure 20 The S400 step in the embodiment is not described in detail here.

[0230] S600, to take photos or videos.

[0231] Step S600 in this embodiment can be referred to the preceding text. Figure 20 The S500 step in the embodiment is not described in detail here.

[0232] The control method of the camera module 103 in this embodiment locks the lens assembly 40 at the target focus position when it acquires the target focus position. This allows the lens assembly 40 to maintain the desired focus position for shooting without repeated focusing, improving intelligence and user convenience, while also reducing power consumption caused by repeated focusing. Furthermore, it eliminates the need to continuously input current to the autofocus motor 20 to maintain the focus position, thus saving power consumption of the autofocus motor 20.

[0233] Understandably, after the locking motor 30 fixes and locks the lens assembly 40, the autofocus motor 20 can automatically cut off power to save energy.

[0234] It is understandable that when using the locking motor 30 in the previous embodiment, after the locking motor fixes and locks the lens assembly 40, the locking motor 30 can still lock the lens assembly 40 after the power is turned off.

[0235] In some specific application scenarios, such as when a video recording mode is required in some implementations, for example, when recording a course, the camera or video recording mode is first activated. Then, the electronic device 100 intelligently reads the focus data within a preset time period (e.g., within 10 minutes), and then obtains whether the time the lens assembly 40 is in a certain focus position (e.g., the focus position at a focal length of 20mm) exceeds a preset duration (e.g., 3 minutes). If so, the focus position at a focal length of 20mm is the target focus position. Then, the lens assembly 40 of the electronic device 100 completes focusing, so that the lens assembly 40 is in the target focus position. After that, the lens assembly 40 is locked, for example, by starting and locking the lens assembly 40 at the focus position at a focal length of 20mm through the locking motor 30. Then, both the locking motor 30 and the autofocus motor 20 can stop working, but the lens assembly 40 can remain locked at the focus position at a focal length of 20mm and continue to execute the video recording command. The control method of the camera module 103 in this embodiment not only improves intelligence and makes it more convenient for users, but also reduces power consumption caused by repeated focusing. Furthermore, it eliminates the need to continuously supply current to the autofocus motor 20 at the focus position, thereby saving power consumption of the autofocus motor 20.

[0236] It is understood that in this embodiment, the locking motor 30 can be manually released from fixing the lens assembly 40, or the locking motor 30 can be automatically released from fixing the lens assembly 40 through a preset intelligent method, such as turning off the shooting or video recording mode and then turning it back on.

[0237] Figure 22 A flowchart illustrating another possible control method for a camera module 103 provided in this application. This control method for the camera module 103 can be applied to the electronic device 100 in the preceding embodiments. It is understood that this control method for the camera module 103 can also be applied to electronic devices different from those in the preceding embodiments.

[0238] This application embodiment also provides a control method for a camera module 103. This control method for the camera module 103 is applied to the electronic device 100 in the foregoing embodiments. The control method for the camera module 103 includes the following steps:

[0239] S100 receives commands to exit photo or video recording mode.

[0240] S200 reads the target focus position within a preset time period.

[0241] In step S200, the target focus position can be... Figure 21 The target focus position in the embodiment can also be a target focus position set according to other logic. For example, the target focus position when shooting portraits and the target focus position when shooting landscapes can be different. For example, when determining the target focus position, it can first identify whether the target object is a person or a landscape, and then determine the focus position in the lens assembly 40 whose corresponding duration exceeds the preset duration to obtain the target focus position.

[0242] In some implementations, the target focus position is a user-familiar focus position, such as a focus position the user frequently uses for taking photos. For example, within a preset time period (e.g., the past month), the focus position where the user has used the camera for more than a preset duration (e.g., 50 minutes) is the target focus position. It is understood that the user-familiar target focus position can be a point or a range. The preset time period can be the past 24 hours before activating the photo or video mode, the past 10 days before activating the photo or video mode, or all time from phone activation to the activation of the photo or video mode. It is understood that the preset time period can be set according to needs.

[0243] S300, the lens assembly 40 of the electronic device 100 moves to the target focusing position.

[0244] In step S300, the lens assembly 40 can be moved to the target focus position by the autofocus motor 20.

[0245] When performing step S300, it can first be determined whether the lens assembly 40 is in the target focus position. Specifically, it can be determined intelligently by a preset method or by manual input.

[0246] When the lens assembly 40 is not in the target focus position, an autofocus signal is generated. In response to the autofocus signal, the electronic device 100 drives the autofocus motor 20 to move the lens assembly 40 to the target focus position.

[0247] S400, locking the lens assembly 40 of the electronic device 100 at the target focusing position.

[0248] In step S400, the lens assembly 40 can be locked in the target focus position by locking the locking motor 30.

[0249] Specifically, after the lens assembly 40 moves to the user-preferred target focus position, a locking signal is generated. The camera module 103 responds to the locking signal, and the locking motor 30 locks the lens assembly 40 at the target focus position. In this embodiment, the camera module 103 responds to the locking signal, and the locking motor 30 locks the lens assembly 40 at the target focus position; this can be referred to the preceding text. Figure 20 The S400 step in the embodiment is not described in detail here.

[0250] S500, exit photo or video mode.

[0251] Through steps S100-S500, after each use of the photo or video mode of the electronic device 100, the lens assembly 40 of the electronic device 100 will automatically lock at the target focus position (such as the focus position that the user is used to), so that when using the photo or video mode of the electronic device 100 in a subsequent use, the photo or video can be taken directly at the target focus position.

[0252] For example, in some application scenarios that require snapshot capture, after the electronic device 100 has finished using the photo or video mode, the lens assembly 40 will automatically lock at the target focus position. Therefore, when taking a photo or video again, the user can directly perform the photo or video function at the target focus position that the user is used to. Compared with the mode of automatically focusing before taking a photo during snapshot capture, the reaction time of snapshot capture is long and it is easy to have blurry focus. The camera module 103 in this embodiment does not need to take an automatic focus step when capturing a photo, so the shooting speed is faster and the shooting effect is better.

[0253] In some implementations, after step S500, the control method for the camera module 103 further includes the following steps:

[0254] The S600, in response to a photo capture command, takes a preset number of photos at the target focus location, or in response to a video capture command, captures video at the target focus location.

[0255] In step S600, a capture signal can be generated in various ways. For example, in some embodiments, a capture signal is generated after the camera module 103 is turned off and then turned on again to take a picture or record video. Alternatively, in some embodiments, a capture signal is generated after the camera module 103 has been turned on but the photo or video recording function has not been used for a preset duration, and then the photo or video recording function is used again. Furthermore, the preset number of photos in S600 can be one or multiple photos.

[0256] In some embodiments, after step S600, the control method for the camera module 103 further includes:

[0257] S700, unlock the lens assembly 40.

[0258] In step S700, specifically, an unlock signal can be generated after capturing a preset number of photos at the target focus position or after shooting a video at the target focus position. In response to the unlock signal, the camera module 103 locks the locking motor 30 to release the locking of the lens assembly 40.

[0259] Of course, in some other implementations, the unlock signal can also be generated manually.

[0260] Following step S700, the control method for camera module 103 also includes:

[0261] S800, lens assembly 40 autofocus.

[0262] In step S800, specifically, in response to an autofocus signal, the autofocus motor 20 drives the camera module 103 to move in order to achieve autofocus.

[0263] The S900 performs photo or video recording.

[0264] Step S900 in this embodiment can be referred to the preceding text. Figure 20 The S500 step in the embodiment is not described in detail here.

[0265] After completing the first round of snapshots using steps S600 via steps S900, the next round of shooting can be performed using steps S900. Specifically, steps S700-S900 are executed sequentially to unlock and enable the autofocus function. By focusing through the autofocus motor 20, photos or videos with different effects than those taken when the lens assembly 40 is at the user's preferred target focus position can be obtained, increasing the diversity of photo or video shooting.

[0266] It should be noted that the electronic device 100 and camera module 103 provided in this application embodiment can be the electronic device 100 and camera module 103 in the previous embodiments, or they can be other electronic devices 100 and camera modules 103 with specific autofocus and locking functions but different in structure from the electronic devices 100 and camera modules 103 in the previous embodiments. Similarly, the autofocus motor 20 and locking motor 30 can be the autofocus motor 20 and locking motor 30 in the previous embodiments, or they can be other autofocus motors 20 and locking motors 30 with different structures. Similarly, the lens assembly 40 can be the lens assembly 40 in the previous embodiments, or it can be a lens assembly 40 with other structures.

[0267] This application embodiment also provides a chip, which includes a processor and a memory. The processor is coupled to the memory, which is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the chip executes the control method of the camera module 103 described above.

[0268] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A camera module, characterized in that, The camera module includes a substrate, a locking motor, an autofocus motor, and a lens assembly. The autofocus motor surrounds and connects to the lens assembly along the optical axis of the camera module, and the locking motor is located between the substrate and the autofocus motor. The locking motor includes a locking component and a driving component. The driving component is used to drive the locking component to a locked state after the camera module completes autofocus. The driving component is also used to drive the locking component to an unlocked state before the camera module starts autofocus. In the locked state, the locking component locks the lens assembly to fix the position of the lens assembly relative to the substrate. In the unlocked state, the locking component unlocks from the lens assembly to enable the camera module to autofocus. The locking component includes a base and a locking member movably disposed on the base. The base is fixedly connected between the substrate and the autofocus motor. The driving component drives the locking member to move relative to the base to lock or unlock the locking member from the lens assembly.

2. The camera module according to claim 1, characterized in that, The lens assembly includes a first part and a second part interconnected as one unit, the autofocus motor surrounds and is connected to the first part, the second part is directly opposite the locking assembly in a first direction, the locking assembly is used to lock or unlock with the second part, and the first direction is perpendicular to the optical axis of the camera module.

3. The camera module according to claim 2, characterized in that, The second part has a sleeve-like structure and includes an outer side wall, a bottom wall, and an inner side wall. The bottom wall faces the substrate, and the outer side wall faces the locking assembly. The locking assembly is used to hold the camera module against the outer side wall after it has finished focusing at any position.

4. The camera module according to claim 2 or 3, characterized in that, The locking element is arranged around the lens assembly.

5. The camera module according to claim 4, characterized in that, The number of locking components is two, namely a first locking component and a second locking component. One end of the first locking component and one end of the second locking component are rotatably connected to the base. The driving component can drive the first locking component and the second locking component to rotate towards each other to abut and clamp the second part. The driving component can also drive the first locking component and the second locking component to rotate away from each other to unlock the first locking component and the second locking component from the second part.

6. The camera module according to claim 5, characterized in that, The driving assembly includes a first permanent magnet, a second permanent magnet, a first magnetic component, a second magnetic component, and an electromagnet. The first permanent magnet is fixedly connected to the first locking component, and the second permanent magnet is fixedly connected to the second locking component. The first magnetic component, the second magnetic component, and the electromagnet are all fixed to the base. The electromagnet is located between the first permanent magnet and the second permanent magnet, between the first permanent magnet and the first magnetic component, and between the second permanent magnet and the second magnetic component. The electromagnet is used to drive the first locking component and the second locking component to rotate in opposite directions or in opposite directions.

7. The camera module according to claim 5, characterized in that, One end of the first locking member includes a first worm gear tooth, and the other end of the second locking member includes a second worm gear tooth. The drive assembly includes a power source, a rotating shaft, and a first worm gear tooth and a second worm gear tooth disposed on the rotating shaft. The teeth of the first worm gear tooth and the second worm gear tooth are opposite in direction. The first worm gear tooth meshes with the first worm gear tooth, and the second worm gear tooth meshes with the second worm gear tooth.

8. The camera module according to claim 4, characterized in that, The number of locking members is multiple, and the multiple locking members are arranged around the second part. The multiple locking members are rotatably connected to the base. The driving component can drive the multiple locking members to rotate in a first rotation direction to abut and clamp the second part. The driving component can also drive the multiple locking members to rotate in a second rotation direction to unlock the locking members from the second part, wherein the first rotation direction and the second rotation direction are opposite.

9. The camera module according to claim 8, characterized in that, The drive assembly includes a turntable, a worm gear, and a power source. The turntable is rotatably connected to the base. The turntable includes a worm gear tooth portion, and the worm gear meshes with the worm gear tooth portion. Multiple locking members are rotatably connected to the turntable. The axis of rotation of the locking member relative to the base is spaced apart from the axis of rotation of the locking member relative to the turntable. The power source can drive the worm gear to rotate forward or reverse, thereby driving the turntable to rotate forward or reverse, thereby driving the multiple locking members to rotate in a first rotation direction or a second rotation direction.

10. The camera module according to claim 4, characterized in that, The number of locking components is two, namely a first locking component and a second locking component. Both the first locking component and the second locking component are slidably connected to the base along a preset direction. The driving component can drive the first locking component and the second locking component to slide towards each other along the preset direction to abut and clamp the second part, so that the first locking component and the second locking component are locked to the second part. The driving component can also drive the first locking component and the second locking component to slide away from each other along the preset direction, so that the first locking component and the second locking component are unlocked from the second part.

11. The camera module according to claim 10, characterized in that, The drive assembly includes a rotating shaft, a power source, and a first threaded portion and a second threaded portion disposed on the rotating shaft. The axial direction of the rotating shaft is the same as the preset direction. The first locking member engages with the first threaded portion, and the second locking member engages with the second threaded portion. The power source can drive the rotating shaft to rotate in the forward or reverse direction to drive the first locking member and the second locking member to slide relative to or opposite to each other.

12. The camera module according to claim 1, characterized in that, The camera module also includes an image processing module. The locking motor surrounds and forms a receiving space. The image processing module is disposed within the receiving space and is located on the substrate and between the substrate and the lens assembly.

13. A camera module, characterized in that, The camera module includes a substrate, a lens assembly, a locking motor, and an autofocus motor. The locking motor and the autofocus motor are stacked along the optical axis of the camera module, forming two independent lens assembly drive modules. The autofocus motor surrounds and connects to the lens assembly. The autofocus motor drives the lens assembly along the optical axis to achieve focusing. When the lens assembly is at any point in its focusing stroke, the locking motor can lock or unlock with the lens assembly. The locking motor includes a locking component and a driving component. The driving component drives the locking component to a locked state after the camera module completes autofocus. The locking component includes a base and a locking member movably disposed on the base. The base is fixedly connected between the substrate and the autofocus motor. The driving component drives the locking member to move relative to the base, thereby locking or unlocking the locking member with the lens assembly.

14. An electronic device, characterized in that, The device includes a processor and a camera module as described in any one of claims 1-13, wherein the processor is electrically connected to the camera module.

15. A control method for a camera module, applied to the electronic device as described in claim 14, characterized in that, The control method for the camera module includes: Activate photo or video recording mode; Detect whether the electronic device has entered motion mode; After determining that the electronic device is in motion mode, the autofocus motor is activated and drives the lens assembly to move to achieve autofocus; After autofocus is completed, the locking motor starts and locks the lens assembly; Perform the taking of photos or videos.

16. A control method for a camera module, applied to the electronic device as described in claim 14, characterized in that, The control method for the camera module includes: Activate photo or video recording mode; Read focus data within a preset time period, wherein the focus data includes focus position and duration; The target focus position is obtained from the focus data, wherein the target focus position is the position where the focus position of the lens assembly of the electronic device exceeds a preset time. The lens assembly of the electronic device completes focusing at the target focusing position; Lock the lens assembly at the target focusing position; Perform the taking of photos or videos.

17. A control method for a camera module, applied to the electronic device as described in claim 14, characterized in that, The control method for the camera module includes: Receive command to exit photo or video recording mode; Read the target focus position; The lens assembly of the electronic device moves to the target focusing position; Lock the lens assembly of the electronic device at the target focusing position; Exit the photo or video recording mode.

18. The control method for a camera module according to claim 17, characterized in that, The method further includes: In response to a photo-taking command, a preset number of photos are taken at the target focus position, or in response to a video-taking command, a video is taken at the target focus position.

19. The control method for a camera module according to claim 17 or 18, characterized in that, After taking a preset number of photos or capturing video at the target focus position, the control method for the camera module further includes: Unlock the lens assembly.

20. A chip, characterized in that, The chip includes a processor and a memory, the processor being coupled to the memory, the memory being used to store computer program code, the computer program code including computer instructions, and when the processor executes the computer instructions, the chip executes the control method of the camera module according to any one of claims 15-19.