Photographing scene parameter switching system, switching method and mobile terminal

By acquiring the target and actual position of the drive motor in real time and determining whether the distance exceeds the threshold to switch scene parameters, the problem of long switching time in the existing technology is solved, realizing fast and efficient scene parameter switching and reducing system resources and costs.

CN116208845BActive Publication Date: 2026-05-29SHANGHAI AWINIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI AWINIC TECH CO LTD
Filing Date
2022-09-06
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, the process of switching shooting scene parameters is time-consuming and inefficient, requiring calls to hardware interfaces and shooting applications, resulting in slow switching.

Method used

By acquiring the target and actual positions of the drive motor in real time, it is determined whether the distance between them is continuously greater than a preset threshold. If so, the target scene parameters are switched and mapped into the cache to avoid calling too many hardware interfaces. The distance between the actual position of the drive motor and the target position is used to determine whether to switch scene parameters.

Benefits of technology

It simplifies the scene parameter switching process, reduces system resource usage, improves switching speed and efficiency, and reduces system complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208845B_ABST
    Figure CN116208845B_ABST
Patent Text Reader

Abstract

The application discloses a photographing scene parameter switching system, a switching method and a mobile terminal. The photographing scene parameter switching method can improve the switching efficiency, and specifically comprises the following steps: acquiring a target position of a driving motor in real time; acquiring an actual position of the driving motor in real time; determining whether the distance between the actual position of the driving motor and the target position is greater than a preset threshold continuously, and if yes, switching the currently adopted scene parameter to a target scene parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of photography technology, specifically to a photography scene parameter switching system, switching method, and mobile terminal. Background Technology

[0002] In recent years, with market development, users' demands for mobile phone photography functions have been changing rapidly, placing higher demands on both the quantity and quality of mobile phone cameras. In the field of mobile phone camera drivers, how to control the lens to achieve fast and stable focusing is crucial.

[0003] In the field of mobile phone camera drivers, scene parameters are typically used to adjust the control strategy of the camera's drive motor. This control strategy is related to the lens's focusing; therefore, achieving fast and stable focusing requires highly precise scene parameters. However, the diversity and complexity of shooting scenarios mean that relying solely on initially set scene parameters is insufficient for achieving clear images in mobile phone cameras.

[0004] In existing technologies, some methods use photography software to identify the shooting scene in real time and switch or adaptively adjust scene parameters; others determine whether parameter switching is needed based on the clarity of the real-time image. When the real-time image is not clear enough, a scene parameter switching operation is triggered to switch to the appropriate scene parameters. During this process, a hardware interface also needs to be called to find the corresponding parameters in the scene library and switch them.

[0005] The process of switching the above scene parameters all requires the use of a camera application. After selecting the scene parameters, a hardware interface must be called to switch the parameters, which makes the switching time-consuming and inefficient. Summary of the Invention

[0006] In view of this, this application provides a system, method and mobile terminal for switching scene parameters in photography, so as to solve the problems of long time consumption and low efficiency in switching scene parameters.

[0007] This application discloses a method for switching scene parameters in photography. The scene parameters correspond to a control strategy for a drive motor, which is used to drive the lens to move in order to achieve focusing. The method for switching scene parameters in photography includes the following steps: Step 1: Real-time acquisition of the target position of the drive motor; Step 2: Real-time acquisition of the actual position of the drive motor; Step 3: Determining whether the distance between the actual position of the drive motor and the target position is continuously greater than a preset threshold. If so, the scene parameters are switched to the target scene parameters.

[0008] Optionally, the method for switching scene parameters to target scene parameters includes: mapping the target scene parameters to a cache and overwriting the scene parameters already stored in the cache; and using the target scene parameters currently stored in the cache as the scene parameters of the current application scene.

[0009] Optionally, determining whether the distance between the actual position of the drive motor and the target position is continuously greater than a preset threshold includes at least the following steps: comparing the actual position of the drive motor and the target position of the drive motor at a preset frequency; if the cumulative number of times the distance between the actual position of the drive motor and the target position of the drive motor is greater than the preset threshold reaches a preset number, then it is determined that the distance between the actual position of the drive motor and the target position of the drive motor is continuously greater than the preset threshold.

[0010] Optionally, after switching the scene parameters to the target scene parameters, the method further includes the following steps: acquiring the target position and actual position of the drive motor in real time; comparing the actual position and the target position of the drive motor, and determining whether the distance between the actual position and the target position is continuously greater than the preset threshold. If so, controlling the drive motor to adjust its actual position in an open-loop state until the distance between the adjusted actual position and the target position is less than or equal to the preset threshold; if not, controlling the drive motor to continue working under the target scene parameters.

[0011] Optionally, after switching the scene parameters to the target scene parameters, if the distance between the actual position of the drive motor and the target position is less than or equal to the preset threshold, the method further includes the following steps: determining whether to switch back to the previously used scene parameters; if yes, then switch back to the previously used scene parameters and continue to perform steps 1 to 3; if no, then the drive motor maintains its current working state and continues to work at the actual position adjusted in the open-loop state.

[0012] Optionally, after switching the scene parameters to the target scene parameters, the following steps are also included: determining whether to switch back to the previously used scene parameters; if yes, then switch back to the previously used scene parameters and continue to perform steps 1 to 3; if no, then the drive motor maintains its current working state and continues to work under the target scene parameters.

[0013] Optionally, the method for mapping target scene parameters to the cache includes the following steps: obtaining the memory base address corresponding to each of several preset scene parameters stored in the memory, and obtaining the cache base address of a preset segment allocated for the scene parameters in the cache; loading the target scene parameters from the memory into the preset segment of the cache according to the memory base address corresponding to the target scene parameters and the cache base address of the preset segment, and overwriting the scene parameters previously stored in the preset segment.

[0014] Optionally, the data lengths of each scene parameter stored in the memory are consistent, and are all less than or equal to the storage space capacity of the preset segment.

[0015] Optionally, the plurality of preset scene parameters include an initial scene parameter, which is a system default setting or configured by the user. The method for switching the shooting scene parameter further includes the following steps: when the drive motor is initially powered on, the initial scene parameter is mapped to a cache and the initial scene parameter is called.

[0016] Optionally, the drive motor includes a moving iron voice coil motor and / or a moving coil voice coil motor.

[0017] This application also provides a scene parameter switching system for taking pictures, including: a memory, a cache, and a controller; the memory and the cache are connected through the controller, the controller stores control program code that can be executed by the controller, the memory stores a number of preset scene parameters, and the control program code, after being executed, is used to implement the scene parameter switching method as described in any of the above claims.

[0018] This application also provides a mobile terminal, characterized in that it is equipped with a lens, a drive motor, and a shooting scene parameter switching system as described above.

[0019] The scene parameter switching method, switching system, and mobile terminal in this application compare the actual position of the drive motor with the target position. The method determines whether to switch scene parameters by whether the distance between the actual position and the target position converges. This avoids calling too many hardware interfaces to switch scene parameters, uses fewer system resources, and switches faster, thereby improving switching efficiency.

[0020] Furthermore, multiple preset scene parameters are stored in the memory. When switching is required, the scene parameters to be switched to are mapped and loaded into the cache. This eliminates the need to store multiple scene parameters in the cache at the same time, which reduces the cache area and lowers the cost. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application.

[0022] Figure 1 This is a scene parameter switching system for taking pictures as described in one embodiment of this application;

[0023] Figure 2 This is a flowchart illustrating the steps of the method for switching shooting scene parameters described in one embodiment of this application;

[0024] Figure 3 This is a flowchart illustrating the steps of the method for switching shooting scene parameters described in one embodiment of this application;

[0025] Figure 4 This is a schematic diagram illustrating the mapping relationship between the memory and the cache regarding scene parameters in one embodiment of this application;

[0026] Figure 5 This is a flowchart illustrating the steps of the method for switching shooting scene parameters in one embodiment of this application. Detailed Implementation

[0027] The study found that to improve photography efficiency, multiple scene parameters can be pre-stored, and the appropriate scene parameter can be selected based on the actual usage scenario. The study also found that during scene parameter switching, the real-time image clarity can be used to determine whether to switch and to which scene parameter. However, this requires using a camera application and calling the corresponding hardware interface, increasing the implementation cost of scene parameter switching and the time required for switching.

[0028] To overcome the above problems, this application proposes a shooting scene parameter switching system, switching method, and mobile terminal.

[0029] The following description, in conjunction with the accompanying drawings, further explains the scene parameter switching system, switching method, and mobile terminal.

[0030] Please see Figure 1 and Figure 2 ,in Figure 1 This is a scene parameter switching system for taking pictures as described in one embodiment of this application; Figure 2 This is a flowchart illustrating the steps of the method for switching shooting scene parameters according to one embodiment of this application.

[0031] In this embodiment, the method for switching shooting scene parameters includes at least the following steps:

[0032] Step 1: Obtain the target position of the drive motor 104 in real time.

[0033] The target position of the drive motor 104 is related to the object distance information and the image distance information. When the drive motor 104 runs to the target position, the lens 105 mounted on the drive motor 104 can achieve focusing.

[0034] Step 2: Obtain the actual position of the drive motor 104 in real time.

[0035] In some embodiments, the actual position of the drive motor 104 can be obtained by a Hall sensor.

[0036] Step 3: Determine whether the distance between the actual position of the drive motor 104 and the target position is continuously greater than a preset threshold. If so, switch the currently used scene parameters to the target scene parameters.

[0037] In this embodiment, if the distance continuously exceeds a preset threshold, it indicates that the actual position of the current drive motor 104 cannot meet the requirements for convergence stability. Convergence stability is an important condition for taking clear photos. Therefore, it is necessary to switch to another suitable scene parameter so that the actual position of the drive motor 104 meets the requirements for convergence stability. Otherwise, if the actual position of the current drive motor 104 can meet the requirements for convergence stability and clear photos can be taken under the scene parameters, it is sufficient to maintain the current application scene parameters.

[0038] In one embodiment, a controller is used to execute the scene parameter switching method. The controller applies scene parameters to drive the drive motor 104. The controller 103 has a built-in algorithm module that controls the drive motor 104 according to the corresponding drive control strategy based on the scene parameters.

[0039] In some embodiments, the built-in algorithm module can at least implement a PID (Proportional-Integral-Differential) algorithm. The PID algorithm can call relevant parameters in the scene parameters, as well as obtain the target position and the actual position of the drive motor, perform calculations according to the proportional, integral, and derivative functional relationship, and determine the next action of the drive motor 104 based on the distance between the target position and the actual position of the drive motor.

[0040] In some embodiments, when the distance is positive, the controller 103 controls the drive motor 104 to move the lens upward, thereby increasing the output value of the drive motor 104 and making the actual position of the drive motor closer to the target position of the drive motor; when the distance is negative, the controller 103 controls the drive motor 104 to move the lens downward, making the actual position of the drive motor closer to the target position of the drive motor.

[0041] The target scene parameter to be switched to is the system default setting. The system can preset multiple scene parameters for sequential switching. In some other embodiments, these target scene parameters can be configured by the user. In fact, if a suitable scene parameter cannot be switched to during the scene parameter switching process, the user can manually switch to other scene parameters as needed.

[0042] In this embodiment, determining whether the distance between the actual position of the drive motor and the target position is continuously greater than a preset threshold includes at least the following steps: comparing the actual position of the drive motor and the target position of the drive motor at a preset frequency; if the cumulative number of times the distance between the actual position of the drive motor and the target position of the drive motor is greater than the preset threshold reaches a preset number, then it is determined that the distance between the actual position of the drive motor and the target position of the drive motor is continuously greater than the preset threshold.

[0043] When the cumulative number of consecutive occurrences reaches a preset number, it indicates that the distance between the actual position of the drive motor and the target position remains greater than the preset threshold for a preset duration, where the preset duration is equal to the preset number of occurrences multiplied by the preset frequency. This indicates that the position of the drive motor cannot converge and stabilize, making it difficult to capture a clear photograph based on the current scene parameters.

[0044] In this embodiment, the distance between the actual position of the drive motor and the target position of the drive motor is continuously greater than the preset threshold by frequency. Although there is a certain error, the final result can be optimized by increasing the detection frequency and the required amount of calculation is reduced.

[0045] The preset duration is a movable time window. The duration of this time window can be set by the user or a default value can be used. It is movable because when making comparisons within this time window, if the result of a comparison is different from the result of the previous comparison, the window needs to be moved back to this point to start again. Only when the results of multiple comparisons within this window are the same can it be determined whether to switch scene parameters.

[0046] The preset frequency and preset number of times can both be provided by the controller 103. Setting an appropriate preset duration can effectively reduce the probability of erroneous switching of scene parameters.

[0047] In this embodiment, when the distance is continuously less than or equal to the preset threshold and the duration is greater than or equal to the preset duration, the scene parameters of the current application are maintained; otherwise, the corresponding scene parameters are switched.

[0048] In this embodiment, the memory 101 stores two or more scene parameters to adapt to different scene requirements. When switching scene parameters, the controller 103 loads the target scene parameter into a preset segment of the cache 102 according to the memory base address of the target scene parameter to be switched to.

[0049] In some other embodiments, the memory 101 stores at least four scene parameters to match more scene requirements.

[0050] In this embodiment, the preset threshold is stored in the memory 101. When the shooting scene parameter switching system 100, i.e., when the drive motor is initially powered on, the controller 103 calls the preset threshold stored in the memory 101 into the cache 102 so that the controller 103 can retrieve it later.

[0051] In this embodiment, the preset threshold is 2μm. When the target position of the drive motor is 200μm away from the initial position, if the actual position of the drive motor is 198μm-202μm away from the initial position, then the distance between the target position and the actual position of the drive motor is considered to be less than or equal to the preset threshold, between +2μm and -2μm. In this case, there is no need to switch the scene parameters, and the lens 105 can capture a clear image. If the actual position of the drive motor is less than 198μm or greater than 202μm away from the initial position, then it is considered that the scene parameters need to be switched.

[0052] In practice, the preset threshold can be set as needed. The smaller the preset threshold, the higher the sensitivity of scene parameter switching. Therefore, if the preset threshold is small, the system may remain in a scene parameter switching state, making it difficult to output appropriate control commands to control the drive motor 104. If the preset threshold is set too large, the likelihood of the scene parameter switching system 100 switching scenes is low, and the system may be very insensitive. Even if the actual position of the drive motor is very mismatched with the target position, the scene parameter switching may not be triggered, affecting the actual focusing effect. Therefore, the preset threshold needs to be adjusted according to actual needs.

[0053] In this embodiment, the distance between the actual position of the drive motor and the target position of the drive motor is used to determine whether to switch scene parameters. This method does not require calling too many hardware interfaces, making it very simple and convenient. Furthermore, it does not require the use of a camera application, which reduces system complexity and switching time.

[0054] Please refer to further information. Figure 3 This is a flowchart illustrating the steps of the method for switching shooting scene parameters in one embodiment.

[0055] exist Figure 3 In the illustrated embodiment, in Figure 1 In step 3, after switching the currently used scene parameters to the aforementioned scene parameters, the following steps are also included:

[0056] Step 301: Obtain the actual position and target position of the drive motor in real time.

[0057] Step 302: Compare the actual position of the drive motor with the target position, and determine whether the distance between the actual position of the drive motor and the target position is continuously greater than the preset threshold. If so, control the drive motor to adjust its actual position in the open-loop state until the distance between the adjusted actual position and the target position is less than or equal to the preset threshold. If not, control the drive motor to continue working under the target scene parameters.

[0058] In this embodiment, the drive motor 104 is operated in an open-loop state because the given scene parameters in the closed-loop state are insufficient to bring the actual position of the drive motor within a convergence range. In this open-loop state, the drive motor 104 receives the current transmitted by the controller 103, and under the influence of Ampere force and magnetic force, drives the lens to move and oscillate until the distance between the actual position of the drive motor and the target position is less than or equal to the preset threshold, falling within the convergence range and satisfying the requirement for oscillation stability.

[0059] In open-loop mode, when the distance between the actual position and the target position of the drive motor is less than or equal to the preset threshold, the drive motor 104 will not stop oscillating, but the oscillation amplitude will be very small. Under this small oscillation, the distance between the actual position and the target position of the drive motor is always less than or equal to the preset threshold, which does not affect the imaging effect.

[0060] exist Figure 3 In the embodiment shown, after the distance between the actual position of the drive motor and the target position is less than or equal to the preset threshold, the following steps are further included:

[0061] Step 303: Determine whether to switch the previous scene parameters used for response. If yes, switch back to the scene parameters used last time and continue to perform steps 1 to 3. If no, the drive motor maintains the current working state and continues to work at the actual position of the drive motor adjusted in the open-loop state.

[0062] Based on rules set by the user or the system, it can be determined whether to switch the previous scene parameters used in the response. The previously used scene parameters include the scene parameters before switching when the camera application was opened this time, or the initial scene parameters.

[0063] In step 303, the drive motor 104 can be returned to the control strategy controlled by the initial scene parameters in the open-loop state, so that the controller 103 can give the next drive operation according to the control strategy.

[0064] In other embodiments, after controlling the drive motor to operate under the target scene parameter, the following steps are further included: determining whether to switch back to the previously used scene parameter according to the rules set by the user or the system; if yes, switching to the previously used scene parameter and continuing to perform steps 1 to 3; if no, the drive motor maintains the current working state and continues to operate under the target scene parameter.

[0065] Based on this mechanism, after switching scene parameters, it can be determined whether to switch back to the previously used scene parameters. If it is necessary to return to the previously used scene parameters, then switch back; otherwise, the current scene parameters can remain unchanged. Using this method, switching back to the previous scene parameters can be done after stabilization, thus avoiding interference from accidental factors. For example, if the previous scene parameters themselves meet the requirements, but some accidental factors caused the scene parameters to switch, then the scene parameters can be switched to stabilize the camera before returning to the previous settings. This allows it to be determined whether the problem lies with the previous scene parameters themselves or with other factors causing an erroneous switch.

[0066] Whether to switch back to the previously used scene parameters can be determined based on rules set by the user or the system. In some embodiments, a selection interface can be provided for the user to set rules, such as whether to switch back to the previously used scene parameters. In other embodiments, the rule setting process can only be implemented by the manufacturer or maintainer, which can simplify the user's steps and optimize the user experience.

[0067] In some embodiments, please refer to Figure 1 In step 3, the method for switching the currently used scene parameters to the target scene parameters includes: mapping the target scene parameters to a cache and overwriting the scene parameters already stored in the cache; and using the target scene parameters currently stored in the cache as the scene parameters for the current application scene. Specifically, after selecting the target scene parameter to switch to, the memory base address of the target scene parameter in the memory is obtained by the controller 103. Under the control of the controller 103, the target scene parameter corresponding to the memory base address is mapped to a preset segment in the cache 102 so that the scene parameters stored in the cache 102 can be directly called later.

[0068] In some embodiments, the method of mapping target scene parameters to a cache includes the following steps: obtaining the memory base addresses corresponding to a plurality of preset scene parameters stored in the memory, and obtaining the cache base address of a preset segment allocated to the currently used scene parameters in the cache; loading the target scene parameters from the memory into the preset segment of the cache according to the memory base address corresponding to the target scene parameters and the cache base address of the preset segment, and overwriting the previously stored scene parameters already stored in the preset segment. Specifically, based on the memory base address and data length corresponding to the target scene parameters, and the cache base address of the preset segment, a target storage area of ​​sufficient size can be allocated within the preset segment for the target scene parameters, and the target scene parameters can be loaded from the memory into the target storage area, overwriting the previously stored scene parameters in the target storage area.

[0069] The memory and the buffer are not directly connected; data transfer between them is achieved through the controller and the control program. The mapping relationship between the memory and the buffer regarding scene parameters is as follows: Figure 4 As shown, the Figure 4 This is a schematic diagram illustrating the mapping relationship between the memory and the cache regarding scene parameters in one embodiment. Figure 4 It can be seen that scene parameter 1 to scene parameter N have different memory base addresses.

[0070] After each scene parameter is mapped to the cache 102, it is stored in a preset segment of the cache 102. When reading the scene parameters in the cache 102, since the cache base address of the preset segment is known, the scene parameters in the cache 102 can be directly obtained according to the cache base address of the preset segment.

[0071] In some embodiments, the data lengths of scene parameters 1 to N are all consistent, and are all less than or equal to the storage space capacity of the preset segment in the cache. This allows each scene parameter to be mapped to the cache 102 (see [link to cache 102]). Figure 1 In the preset segment, errors in the mapping process caused by differences in the data length of the scene parameters are avoided. Furthermore, after the scene parameters are mapped into the cache 102, the same storage area in the cache is always used, which can reduce the area used by the cache 102.

[0072] In this embodiment, after mapping the scene parameters to the preset segment of the cache, the method further includes the following step: controlling the memory 101 to enter a standby state to reduce the power consumption of the scene parameter switching system 100.

[0073] The standby state mentioned here refers to turning off the clock signal of the memory 101. The clock signal is an important factor affecting the power consumption of the scene switching system 100.

[0074] In some embodiments, before switching scene parameters, the method further includes the following steps: waking up the memory 101 and, after waking up, mapping the scene parameters to be switched to the cache 102. Here, waking up refers to re-energizing the memory with a clock signal.

[0075] In some embodiments, the scene parameters include initial scene parameters, which are system default settings or user-configured settings. The method for switching shooting scene parameters further includes the following steps: upon initial power-on, mapping the initial scene parameters to a cache and applying the initial scene parameters.

[0076] In some embodiments, in a system that has not been restarted, the cache stores the scene parameters that were last switched to. When the camera is opened again, the scene parameters that were applied after the last switch can be directly applied and stored in the cache.

[0077] In some embodiments, a voice coil motor (VCM) is used as the drive motor 104. The voice coil motor receives current and controls the lens movement according to the current to achieve focusing. There are many types of voice coil motors, including moving iron voice coil motors and moving coil voice coil motors. At least one of different types of voice coil motors can be used to drive the lens.

[0078] In this embodiment, it is only necessary to determine whether to switch scene parameters by the distance between the actual position of the drive motor and the target position of the drive motor. No other hardware interfaces are called. Therefore, the switching process is smooth, uses fewer system resources, and is faster.

[0079] Please see Figure 5 This is a flowchart illustrating the steps of the method for switching scene parameters during photography, as described in one embodiment of this application.

[0080] In this embodiment, the drive motor is a voice coil motor, and the switching method includes the following steps:

[0081] Step 501: System activation and operation begins.

[0082] Step 502: Obtain the actual position of the voice coil motor.

[0083] Step 503: Determine whether the distance between the actual position of the voice coil motor and the target position of the voice coil motor is continuously less than or equal to a preset threshold. If yes, it is considered that the actual position of the drive motor has converged and stabilized, and then proceed to step 502. Otherwise, it is considered that the actual position of the drive motor has not converged and stabilized, and proceed to step 504.

[0084] Step 504: Wake up the memory and map the scene parameters to be switched to stored in the memory to the cache 102 (see [link]). Figure 1 In the controller 103 (see [link]), Figure 1 Call the cache 102 (see also) Figure 1 Scene parameters of the preset section in ).

[0085] Step 505: Determine whether the controller 103 has completed the switching of scene parameters, and proceed to step 506 if it has, otherwise continue to step 505.

[0086] Step 506: The memory 101 enters standby mode again.

[0087] An embodiment of this application also provides a system for switching shooting scene parameters.

[0088] Please see Figure 1In this embodiment, the scene parameter switching system includes a memory 101, a cache 102, and a controller 103. The memory 101 and the cache 102 are connected through the controller 103. The controller 103 stores control program code that can be executed by the controller 103. The memory 101 stores the scene parameters. After the control program code is executed, it is used to implement the scene parameter switching method.

[0089] The memory 101 can be at least one of NOR Flash memory or NAND Flash memory, and is a non-volatile memory. The appropriate memory can be selected based on specific needs. The storage capacity of the memory 101 should be large enough to store at least two scene parameters so that the scene parameter switching system 100 can switch between scene parameters.

[0090] The cache 102 is a volatile memory that loses its stored content in the event of a power outage. The cache 102 is connected to the memory 101 via the controller 103 and exchanges data with the memory 101 under the control of the controller.

[0091] The cache 102 can perform high-speed data exchange, exchanging data with the controller 103 before the memory 101. Therefore, the controller 103 can access the data stored in the cache 102 very quickly. After receiving the switching instruction, the scene parameters stored in the memory are mapped to the cache 102.

[0092] In this embodiment, the control program code is stored in the controller 103 and can implement multi-scene parameter switching logic. When the controller 103 runs the control program, it can achieve adaptive switching of multi-scene parameters. The control program includes at least the following: Figure 2 The steps and procedures are shown below.

[0093] When switching scene parameters, the scene parameters stored in memory 101 need to be mapped to cache 102. Specifically, controller 103 controls memory 101 and cache 102 to perform data transmission. Controller 103 controls memory 101 to map the scene parameters stored in the corresponding memory address to a fixed segment of cache 102.

[0094] The scene parameter switching system in this embodiment can use the aforementioned scene parameter switching method to switch the scene parameters of the current application when the distance between the actual position of the actual drive motor and the target position of the drive motor is continuously greater than a preset threshold. This avoids calling too many hardware interfaces to switch scene parameters, uses fewer system resources, and has a faster switching speed.

[0095] The embodiments of this application also provide a mobile terminal, which is equipped with a lens, a drive motor and the above-mentioned shooting scene parameter switching system. The shooting scene parameter switching system can drive the drive motor, and the drive motor drives the lens to move to achieve fast focusing.

[0096] In some embodiments, the mobile terminal includes a mobile phone, tablet computer, laptop computer, camera, etc., and the shooting scene parameter switching system 100 may be a separate module additionally mounted on the mobile terminal.

[0097] In this embodiment, the mobile terminal can use the aforementioned scene parameter switching method to switch the scene parameters of the current application when the distance between the actual position of the actual drive motor and the target position of the drive motor is continuously greater than a preset threshold. This avoids calling too many hardware interfaces to switch scene parameters, uses fewer system resources, and has a faster switching speed.

[0098] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, such as the combination of technical features between embodiments, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for switching shooting scene parameters, characterized in that, The scene parameters correspond to the control strategy for the drive motor, which is used to drive the lens movement to achieve focusing. The method for switching the shooting scene parameters includes the following steps: Step 1: Obtain the target position of the drive motor in real time; Step 2: Obtain the actual position of the drive motor in real time, wherein the actual position of the drive motor is acquired by a Hall sensor; Step 3: Determine whether the distance between the actual position of the drive motor and the target position is continuously greater than a preset threshold. If so, switch the scene parameters to the target scene parameters. Switching the scene parameters to the target scene parameters includes: obtaining the memory base address corresponding to each of the several preset scene parameters stored in the memory, and obtaining the cache base address of the preset segment allocated for the scene parameters in the cache. Based on the memory base address corresponding to the target scene parameters and the cache base address of the preset segment, load the target scene parameters from the memory into the preset segment of the cache, and overwrite the scene parameters previously stored in the preset segment.

2. The method for switching scene parameters for taking photos according to claim 1, characterized in that, The method for switching scene parameters to target scene parameters includes: mapping the target scene parameters to a cache and overwriting the scene parameters already stored in the cache; and using the target scene parameters currently stored in the cache as the scene parameters of the current application scene.

3. The method for switching scene parameters for taking photos according to claim 1, characterized in that, Determining whether the distance between the actual position of the drive motor and the target position is continuously greater than a preset threshold includes at least the following steps: The actual position of the drive motor is compared with the target position of the drive motor at a preset frequency. If the distance between the actual position of the drive motor and the target position of the drive motor is greater than the preset threshold for a preset number of consecutive cumulative times, it is determined that the distance between the actual position of the drive motor and the target position of the drive motor is continuously greater than the preset threshold.

4. The method for switching scene parameters for taking photos according to claim 1, characterized in that, After switching the scene parameters to the target scene parameters, the process also includes the following steps: The target position and actual position of the drive motor are acquired in real time. The actual position of the drive motor is compared with the target position, and it is determined whether the distance between the actual position and the target position is continuously greater than the preset threshold. If so, the drive motor is controlled to adjust its actual position in open-loop state until the distance between the adjusted actual position and the target position is less than or equal to the preset threshold. If not, the drive motor is controlled to continue working under the target scene parameters.

5. The method for switching scene parameters for taking photos according to claim 4, characterized in that, After switching the scene parameters to the target scene parameters, if the distance between the actual position of the drive motor and the target position is less than or equal to the preset threshold, the method further includes the following steps: Determine whether to switch back to the previously used scene parameters. If yes, switch back to the previously used scene parameters and continue with steps 1 to 3. If no, the drive motor maintains its current working state and continues to operate at the actual position adjusted in the open-loop state.

6. The method for switching scene parameters for taking photos according to claim 4, characterized in that, After switching the scene parameters to the target scene parameters, the following steps are also included: Determine whether to switch back to the previously used scene parameters. If yes, switch back to the previously used scene parameters and continue with steps 1 to 3. If no, the drive motor maintains its current working state and continues to work under the target scene parameters.

7. The method for switching scene parameters for taking photos according to claim 1, characterized in that, The data lengths of each scene parameter stored in the memory are consistent, and are all less than or equal to the storage space capacity of the preset segment.

8. The method for switching scene parameters for taking photos according to claim 7, characterized in that, The preset scene parameters include an initial scene parameter, which is either a system default setting or configured by the user. The method for switching the shooting scene parameter further includes the following steps: When the drive motor is initially powered on, the initial scene parameters are mapped into the cache and the initial scene parameters are called.

9. The method for switching scene parameters for taking photos according to claim 1, characterized in that, The drive motor includes a moving iron voice coil motor and / or a moving coil voice coil motor.

10. A system for switching parameters for a photography scene, characterized in that, include: Memory, cache, and controller; The memory and cache are connected through the controller. The controller stores control program code that can be executed by the controller. The memory stores several preset scene parameters. After the control program code is executed, it is used to implement the scene parameter switching method for taking pictures as described in any one of claims 1 to 9.

11. A mobile terminal, characterized in that, It is equipped with a lens, a drive motor, and a scene parameter switching system as described in claim 10.