Camera motor limiting control method, device and equipment
By interacting with the target electronic device using acoustic signals, the difference between the incident angle and the motor angle is calculated, enabling non-contact limit control of the camera motor. This solves the problem of motor idling caused by mechanical limiters, improving equipment reliability and user experience.
Patent Information
- Application Number
- CN202511449925.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-02-27
AI Technical Summary
Existing camera motor limiting methods are prone to causing the motor to spin freely during initialization or reset, affecting motor life and user experience, and relying on mechanical limiting structures increases costs.
By exchanging acoustic signals between the camera and the target electronic device, and using a microphone array and signal processing module to calculate the difference between the incident angle and the motor angle, non-contact motor limit control is achieved, avoiding mechanical limit structures.
It achieves precise positioning during motor initialization, reduces equipment costs, improves equipment reliability and user experience, and avoids motor idling and hard collisions.
Smart Images

Figure CN121585904A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of camera control, specifically relating to a method, device, and equipment for limiting control of a camera motor. Background Technology
[0002] Current home network cameras, especially home PTZ cameras, often have a rotation function, which can be manually controlled via a mobile app or used with AI algorithms for tracking people or other objects. However, due to structural limitations such as the casing, cameras cannot achieve 360° rotation in the horizontal and / or vertical directions, thus requiring limits on the motor's rotation.
[0003] The mainstream existing methods for limiting camera motor movement include mechanical limiting. Mechanical limiting restricts the camera's travel by means of the housing, track design, etc., and selects a motor with low torque. When the mechanical limit position is reached, the motor is allowed to idle until the CPU stops the motor through other logical judgments.
[0004] However, when the camera is powered on and the motor is initialized or reset, the camera needs to be adjusted to a specific position. For example, the default initial position of most cameras is the midpoint of the maximum travel. That is, a camera that can rotate a maximum of 270° horizontally needs to be rotated 135° relative to the starting point after initialization or reset. So there is a problem: how to determine the starting point of the motor.
[0005] For most mechanically limited camera devices, the method of obtaining the initial point of the motor is mostly to first rotate forward (towards the end point) to the maximum stroke, and then rotate backward (towards the initial point) to the maximum stroke. This is extremely easy to cause the motor to spin idly when rotating towards the end point (it has actually reached the end point, but the CPU program judges that it has not yet reached the end point). This not only affects the life of the motor, but also reduces the user's evaluation of the product's intelligence level. Summary of the Invention
[0006] This application provides a camera motor limit control method, device, and equipment to achieve precise positioning of the camera motor angle without introducing limit switches or other hardware, solve the problem of idling during initialization or reset operations of mechanically limited camera motors, and reduce costs while improving equipment reliability and user experience.
[0007] In a first aspect, this application provides a camera motor limit control method, applied to a camera, wherein the camera is communicatively connected to a target electronic device, the method comprising: When the camera is powered on or the motor is reset, a collaborative initialization request message is sent to the target electronic device. The collaborative initialization request message is used to request the acoustic signal of the target electronic device. Acquire the acoustic signal and the current motor angle of the camera; The current target angle difference is determined based on the acoustic signal and the current motor angle. The motor is subjected to limit control based on the current target angle difference.
[0008] According to the camera motor limit control method provided in this application, the step of limiting the motor based on the current target angle difference includes: determining whether the current target angle difference is greater than a first angle value; if it is greater than the first angle value, controlling the motor to rotate the first angle value according to a first rotation speed; sending the collaborative initialization request information to the electronic device again to redetermine the current target angle difference, and repeating the above steps until the current target angle difference is less than a second angle value for a consecutive preset number of times, and the second angle value is less than the first angle value.
[0009] According to the camera motor limit control method provided in this application, controlling the motor to rotate the first angle value according to the first speed includes: when the current target angle difference is greater than the third angle value for a consecutive preset number of times, adjusting the first speed to the second speed, controlling the motor to rotate the first angle value according to the second speed, wherein the third angle value is greater than the first angle value, and the first speed is greater than the second speed.
[0010] According to the camera motor limit control method provided in this application, the step of limiting the motor according to the current target angle difference includes: if it is less than or equal to the first angle value, controlling the motor to rotate according to the first speed based on the current target angle difference; sending the collaborative initialization request information to the electronic device again to redetermine the current target angle difference, and repeating the above steps until the current target angle difference is less than the second angle value for a consecutive preset number of times.
[0011] According to the camera motor limit control method provided in this application, the camera includes a microphone array. The step of determining the current target angle difference based on the sound wave signal and the current motor angle includes: obtaining the time difference between any two microphones in the microphone array receiving the sound wave signal; obtaining the distance between the camera and the target electronic device; determining the incident angle of the sound wave signal based on the time difference and the distance; and determining the current target angle difference based on the incident angle and the current motor angle.
[0012] According to the camera motor limit control method provided in this application, the step of determining the current target angle difference based on the incident angle and the current motor angle includes: inputting the incident angle into a mapping model to obtain the target rotation angle output by the mapping model, wherein the mapping model is used to determine the correspondence between the incident angle and the motor angle; and determining the difference between the target rotation angle and the current motor angle as the target angle difference.
[0013] Secondly, this application also provides a camera motor limit control device, comprising: The sending unit is used to send a collaborative initialization request message to the target electronic device when the camera is powered on or the motor is reset. The collaborative initialization request message is used to request the acoustic wave signal of the target electronic device. An acquisition unit is used to acquire the acoustic signal and the current motor angle of the camera; A determining unit is configured to determine the current target angle difference based on the acoustic signal and the current motor angle. The control unit is used to perform limit control on the motor based on the current target angle difference.
[0014] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the steps of the camera motor limit control method described in the first aspect.
[0015] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the camera motor limit control method described in the first aspect.
[0016] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the camera motor limit control steps described in the first aspect.
[0017] The camera motor limit control method, device, and equipment provided in this application send a collaborative initialization request message to a target electronic device when the camera is powered on or the motor is reset. This collaborative initialization request message requests an acoustic signal from the target electronic device. Then, it acquires the acoustic signal and the current motor angle of the camera. Next, it determines the current target angle difference based on the acoustic signal and the current motor angle. Finally, it performs limit control on the motor based on the current target angle difference. Therefore, this solution utilizes an electronic device as an acoustic beacon, achieving position calibration during motor initialization through a non-contact interaction of electronic device sound emission, camera sound reception, and angle calculation. Simultaneously, it does not rely on limit switches or mechanical structures, achieving initial motor position calibration solely through acoustic signal interaction, thus solving the problem of idling during initialization or reset operations for mechanically limited camera motors. This also reduces costs and improves device reliability and user experience. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is one of the flowcharts illustrating the camera motor limit control method provided in this application.
[0020] Figure 2 This is a flowchart of the module of the camera motor limit control method provided in this application.
[0021] Figure 3 This is a timing flowchart of the camera motor limit control method provided in this application.
[0022] Figure 4 This is the second flowchart of the camera motor limit control method provided in this application.
[0023] Figure 5 This is a block diagram of the functional units of the camera motor limit control device provided in this application.
[0024] Figure 6 This is a structural diagram of the camera provided in this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. 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 includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0028] Current mechanical limit switches use physical structures to restrict the rotation range of the motor. During motor initialization or reset, the motor is prone to idling, which reduces the motor's lifespan, affects users' evaluation of the product's intelligence level, and lowers the user experience.
[0029] To address the aforementioned problems, this application provides a method, apparatus, and device for limiting the movement of a camera motor. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0030] Please see Figure 1 , Figure 1 This is one of the flowcharts of the camera motor limit control method provided in this application, which includes the following steps.
[0031] S101, when the camera is powered on or the motor is reset, a collaborative initialization request message is sent to the target electronic device.
[0032] The collaborative initialization request information is used to request the acoustic signal from the target electronic device, establishing a communication connection between the camera and the target electronic device. The camera can be a network camera (IP camera, IPC), and the target electronic device can be a speaker, television, or other stable electronic device with sound-emitting capabilities. Stable location means that the frequency of the device's movement is below a preset value. The target electronic device and the camera can communicate via a home router.
[0033] S102, acquire the acoustic signal and the current motor angle of the camera.
[0034] The camera sends a cooperative initialization request to a designated target electronic device within the local area network via a router. Upon receiving this request, the target electronic device can transmit a specific frequency and coded characteristic acoustic wave signal back to the camera. Specifically, a 40kHz high-frequency square wave can be used as the carrier wave, embedded with a 128-bit spread spectrum sequence. The 40kHz frequency is chosen because it is higher than common environmental noise levels (e.g., television noise is mainly below 20kHz, and human voice is mainly below 3kHz), effectively reducing environmental noise interference. The 128-bit spread spectrum sequence further enhances the signal's anti-interference capability and uniqueness, ensuring the camera can accurately identify signals from the target electronic device. The duration of the characteristic acoustic wave signal can be set to 20ms, and the signal period can not exceed 50ms to meet the system's real-time requirements.
[0035] S103, determine the current target angle difference based on the acoustic signal and the current motor angle.
[0036] After acquiring the sound wave signal, the original sound wave signal can be filtered to remove environmental noise interference. Then, the target angle is calculated based on the processed sound wave signal, and the difference between the target angle and the current motor angle is determined.
[0037] S104, limit control is performed on the motor based on the current target angle difference.
[0038] In the motor limit control process, the motor is driven to rotate in a preset direction by the motor drive unit. Once the preset conditions are met, the motor limit is considered complete. The preset direction is towards the target position initialized by the motor. This preset condition is related to the target angle difference.
[0039] Please see Figure 2Taking a smart speaker as the target electronic device, and the smart speaker and camera communicating via a home router as an example, the camera includes a microphone array. The implementation steps of this application are explained in detail through specific modules. When the camera powers on or the motor resets, it needs to be adjusted to a specific pose. At this time, the camera sends a collaborative initialization request to a designated smart speaker within the local area network via the router. After receiving the initialization request from the camera or the initialization command triggered by the system, the smart speaker emits a characteristic acoustic wave signal with a specific frequency and encoding. The camera's microphone array monitors the surrounding ambient acoustic wave signals in real time. Upon receiving the characteristic acoustic wave signal emitted by the smart speaker, the microphone array transmits the raw signal to the signal processing module. After processing the acoustic wave signal, the signal processing module calculates the target angle difference based on the angle data fed back by the camera body using an angle calculation engine. At this time, the motor drive module rotates the motor based on the target angle difference to complete the motor limit. Specifically, the signal processing module and the angle calculation engine can be located in the camera or other electronic devices.
[0040] As can be seen, in this embodiment, when the camera is powered on or the motor is reset, a collaborative initialization request message is sent to the target electronic device. This collaborative initialization request message requests the acoustic signal from the target electronic device. Then, the acoustic signal and the current motor angle of the camera are acquired. Next, the current target angle difference is determined based on the acoustic signal and the current motor angle. Finally, the motor is limited based on the current target angle difference. Therefore, this solution utilizes the electronic device as an acoustic beacon, achieving position calibration during motor initialization through a non-contact interaction of electronic device sound emission, camera sound reception, and angle calculation. Simultaneously, it does not rely on limit switches or mechanical structures, achieving initial motor position calibration solely through acoustic signal interaction. This solves the problem of idling during initialization or reset operations for mechanically limited camera motors, while also reducing costs and improving device reliability and user experience.
[0041] In one possible embodiment, the step of limiting the motor based on the current target angle difference includes: determining whether the current target angle difference is greater than a first angle value; if it is greater than the first angle value, controlling the motor to rotate the first angle value according to a first speed; sending the collaborative initialization request information to the electronic device again to redetermine the current target angle difference, and repeating the above steps until the current target angle difference is less than a second angle value for a consecutive preset number of times, and the second angle value is less than the first angle value.
[0042] The first angle value can be 5°. If the calculated target angle difference is greater than 5°, the camera motor is controlled to rotate 5° in a preset direction at a first rotation speed, which is towards the target position. The camera then sends a collaborative initialization request to the target electronic device again. Based on the newly acquired acoustic signal and the current motor angle, the target angle difference is recalculated. If the recalculated target angle difference is still greater than 5°, the camera motor is again controlled to rotate 5° in the preset direction at the first rotation speed, and the collaborative initialization request is sent again to the target electronic device to re-determine if the target angle difference is greater than 5°. If the target angle difference is consistently less than a second preset value (e.g., less than 1° for three consecutive times), the motor is considered to have completed the necessary permissions.
[0043] As can be seen, in this embodiment, the sound wave signal is triggered once every time the motor rotates by the first angle value, the angle is recalculated and the rotation direction is adjusted, which can prevent overshoot.
[0044] In one possible embodiment, controlling the motor to rotate the first angle value according to the first speed includes: when the current target angle difference is greater than the third angle value for a consecutive preset number of times, adjusting the first speed to a second speed, controlling the motor to rotate the first angle value according to the second speed, wherein the third angle value is greater than the first angle value, and the first speed is greater than the second speed.
[0045] Since the motor triggers an acoustic signal reception every time it rotates to a first angular value, recalculating the angle and adjusting the rotation direction, if the calculated target angle difference (positioning error) is greater than a third angular value multiple times during rotation, the motor enters a soft-limit mode, reducing its speed to avoid hard collisions, and simultaneously recalculating and adjusting the angle. For example, if the first speed is 1 rpm, and the positioning error is greater than 15° three times consecutively, the speed will drop to 1 rpm. Specifically, if the preset target angle difference is less than a second angular value during subsequent rotations, the speed can be restored to the first speed.
[0046] As can be seen, in this embodiment, when the positioning error is large in multiple instances, the rotation speed can be reduced during subsequent rotations to prevent hard collisions with the motor and extend the equipment's lifespan.
[0047] In one possible embodiment, the step of limiting the motor based on the current target angle difference includes: if the current target angle difference is less than or equal to the first angle value, controlling the motor to rotate according to a first speed based on the current target angle difference; sending the collaborative initialization request information to the electronic device again to redetermine the current target angle difference, and repeating the above steps until the current target angle difference is less than the second angle value for a preset number of consecutive times.
[0048] If the determined target angle difference is less than or equal to the first angle value (e.g., the target angle is 2°, which is less than 5°), then the camera motor is controlled to rotate the target by 2° at a first speed in the preset direction. The camera then sends a collaborative initialization request to the target electronic device again to re-acquire the current target angle difference. If the determined current target angle difference is consistently less than the second angle value (e.g., three consecutive calculations show a current target angle difference less than 1°), then the motor is considered to have completed its limit switch.
[0049] As can be seen, in this embodiment, the initial position calibration of the motor is achieved solely through acoustic signal interaction without relying on limit switches or mechanical structures, thus solving the problems of camera idling and collision.
[0050] In one possible embodiment, the camera includes a microphone array, and the step of determining the current target angle difference based on the sound wave signal and the current motor angle includes: obtaining the time difference between any two microphones in the microphone array receiving the sound wave signal; obtaining the distance between the camera and the target electronic device; determining the incident angle of the sound wave signal based on the time difference and the distance; and determining the current target angle difference based on the incident angle and the current motor angle.
[0051] The camera's microphone array monitors ambient sound signals in real time. Upon receiving a characteristic sound wave signal emitted by the target electronic device, the microphone array transmits the raw signal to the signal processing module. The signal processing module first filters the raw signal to remove ambient noise interference. Then, it calculates the time difference Δt between the signals received by any two microphones and uses the Direction of Arrival (DOA) algorithm to calculate the incident angle φ of the sound wave. The specific calculation formula is as follows: φ = arctan(Δt·v / d) Where v is the speed of sound, and d is the distance between the target electronic device and the camera. For example Figure 3As shown, taking a smart speaker as the target electronic device, the camera sends an initialization request to the smart speaker through the home router. After receiving the request, the smart speaker emits a 40kHz high-frequency square wave and a 128-bit spread spectrum sequence of characteristic acoustic wave signals according to preset parameters, with a duration of 20ms. After receiving the signal, the camera transmits the raw signal to the processing module. The processing module calculates and processes the signal before sending an angle adjustment command to the camera. Finally, the camera sends a positioning completion signal back to the speaker. The signal period can be set to be less than or equal to a preset value to meet real-time requirements. For example, the entire process can be set to complete within 50ms to ensure system real-time performance. Then, the camera's microphone array monitors ambient sound waves in real time. After receiving the characteristic acoustic wave signal, it transmits the raw signal containing timestamps t1, t2, ..., tN to the internal signal processing module. The signal processing module then performs bandpass filtering on the raw signal to remove ambient noise interference below 20kHz, and then calculates the time difference Δt between the signals received by each microphone. Assuming the time difference between the center microphone and the edge microphone is Δt = 20 μs, the speed of sound is v = 340 m / s, and the distance from the speaker to the camera is d = 1.5 m, the incident angle of the sound wave can be calculated to be φ ≈ 2.5° according to the aforementioned company.
[0052] As can be seen, in this embodiment, a smart speaker with a relatively fixed position in the home is used as an acoustic beacon, and the position calibration during motor initialization is achieved through non-contact interaction of "target electronic device emitting sound → camera recording sound → angle calculation".
[0053] In one possible embodiment, determining the current target angle difference based on the incident angle and the current motor angle includes: inputting the incident angle into a mapping model to obtain the target rotation angle output by the mapping model, wherein the mapping model is used to determine the correspondence between the incident angle and the motor angle; and determining the difference between the target rotation angle and the current motor angle as the target angle difference.
[0054] After obtaining the incident angle, the angle calculation engine calls a pre-trained mapping model f(θ) to convert the incident angle φ into the target rotation angle θ_target. The mapping model f(θ) can be continuously trained and optimized using machine learning algorithms before the system leaves the factory or during use, establishing an accurate correspondence between the incident angle and the motor angle. The motor drive module can read the current motor angle θ_current, and then calculate the difference between the current angle and the target angle, Δθ = |θ_target - θ_current|, based on the target rotation angle.
[0055] In specific implementation, the mapping model is updated when preset conditions are met; the preset conditions are determined to be met in any of the following situations: the camera position changes, the environment in which the camera is located changes, or an optimization request for the mapping model is received.
[0056] This means the mapping model can be continuously optimized based on actual usage. For example, when a user frequently adjusts the camera position or the home environment changes, the system automatically triggers a retraining mechanism, collecting new sample data to update the mapping model and ensure the accuracy of angle calculations. Simultaneously, users can also manually trigger model optimization operations via a mobile app, improving the system's adaptability and flexibility.
[0057] As can be seen, in this embodiment, by utilizing the characteristic that the target electronic device is usually in a fixed position and has a sound-emitting function, and combining it with the microphone array of the camera, it is possible to achieve precise positioning of the camera motor angle without introducing limit switches or other hardware.
[0058] The following is combined Figure 4 This document describes the overall process of this application. When the camera is powered on or the motor is reset, it needs to be initialized. At this time, the camera sends a collaborative initialization request to the target electronic device. Then, based on the acoustic information fed back by the target electronic device, it performs acoustic positioning, completes the DOA calculation, determines the incident angle, and then calculates the current target angle difference Δθ based on the incident angle and the current motor angle. If the current target angle difference Δθ is greater than the first angle value (Δθ>5°), the motor rotates 5° at a first speed of 5 rpm. Then, every 5° rotation triggers this signal reception, and the current target angle difference is recalculated. If there are three consecutive positioning errors (Δθ>15°, the third angle value), the motor enters a soft limit mode, and the speed drops to 1 rpm. If Δθ is less than 5°, the motor rotates Δθ at the first speed of 5 rpm. If the positioning error is less than 1° (the second angle value) for three consecutive times, positioning is considered complete, the motor stops rotating, and the system enters standby mode.
[0059] The camera motor limit control device provided in the embodiments of this application is described below. The camera motor limit control device described below can be referred to in correspondence with the camera motor limit control method described above.
[0060] Please see Figure 5 The camera motor limit control device 500 includes: a sending unit 501, used to send a collaborative initialization request message to a target electronic device when the camera is powered on or the motor is reset, the collaborative initialization request message being used to request an acoustic signal from the target electronic device; an acquisition unit 502, used to acquire the acoustic signal and the current motor angle of the camera; a determination unit 503, used to determine the current target angle difference based on the acoustic signal and the current motor angle; and a control unit 504, used to perform limit control on the motor based on the current target angle difference.
[0061] In one possible embodiment, in the step of limiting the motor according to the current target angle difference, the control unit 504 is specifically configured to: determine whether the current target angle difference is greater than a first angle value; if it is greater than the first angle value, control the motor to rotate the first angle value according to a first speed; send the cooperative initialization request information to the electronic device again to redetermine the current target angle difference, and repeat the above steps until the current target angle difference is less than a second angle value for a consecutive preset number of times, and the second angle value is less than the first angle value.
[0062] In one possible embodiment, in controlling the motor to rotate the first angle value according to the first speed, the control unit 504 is specifically configured to: adjust the first speed to a second speed when the current target angle difference is greater than a third angle value for a consecutive preset number of times, control the motor to rotate the first angle value according to the second speed, wherein the third angle value is greater than the first angle value, and the first speed is greater than the second speed.
[0063] In one possible embodiment, in terms of limiting the motor according to the current target angle difference, the control unit 504 is specifically configured to: if the current target angle difference is less than or equal to the first angle value, control the motor to rotate according to the first speed by the current target angle difference; send the cooperative initialization request information to the electronic device again to redetermine the current target angle difference, and repeat the above steps until the current target angle difference is less than the second angle value for a preset number of consecutive times.
[0064] In one possible embodiment, where the camera includes a microphone array, the determining unit 503 is specifically configured to: obtain the time difference between any two microphones in the microphone array receiving the sound wave signal; obtain the distance between the camera and the target electronic device; determine the incident angle of the sound wave signal based on the time difference and the distance; and determine the current target angle difference based on the incident angle and the current motor angle.
[0065] In one possible embodiment, in determining the current target angle difference based on the incident angle and the current motor angle, the determining unit 503 is specifically configured to: input the incident angle into a mapping model to obtain a target rotation angle output by the mapping model, wherein the mapping model is used to determine the correspondence between the incident angle and the motor angle; and determine the difference between the target rotation angle and the current motor angle as the target angle difference.
[0066] Please see Figure 6 , Figure 6A schematic diagram of the physical structure of an electronic device is provided. This electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, communication interface 620, and memory 630 communicate with each other via the communication bus 640. Specifically, this electronic device may be a camera. The processor 610 can call a computer program in the memory 30 to execute a camera motor limit control method. This method includes: sending a collaborative initialization request message to a target electronic device when the camera is powered on or the motor is reset; the collaborative initialization request message is used to request an acoustic signal from the target electronic device; acquiring the acoustic signal and the current motor angle of the camera; determining a current target angle difference based on the acoustic signal and the current motor angle; and performing limit control on the motor based on the current target angle difference.
[0067] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0068] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the camera motor limit control method provided in the above embodiments. The method includes: sending a collaborative initialization request message to a target electronic device when the camera is powered on or the motor is reset, the collaborative initialization request message being used to request an acoustic signal from the target electronic device; obtaining the acoustic signal and the current motor angle of the camera; determining a current target angle difference based on the acoustic signal and the current motor angle; and performing limit control on the motor based on the current target angle difference.
[0069] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program. The computer program is used to cause a processor to execute the camera motor limit control method provided in the above embodiments. The method includes: sending a collaborative initialization request message to a target electronic device when the camera is powered on or the motor is reset, the collaborative initialization request message being used to request an acoustic signal from the target electronic device; acquiring the acoustic signal and the current motor angle of the camera; determining a current target angle difference based on the acoustic signal and the current motor angle; and performing limit control on the motor based on the current target angle difference.
[0070] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0071] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0072] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for controlling the limit of a camera motor, characterized in that, The method comprises the following steps: When the camera is powered on or the motor is reset, a cooperative initialization request information is sent to a target electronic device, and the cooperative initialization request information is used to request a sound wave signal of the target electronic device; The sound wave signal and a current motor angle of the camera are obtained; A current target angle difference is determined according to the sound wave signal and the current motor angle; The motor is controlled according to the current target angle difference.
2. The method of claim 1, wherein, The motor is controlled according to the current target angle difference, which comprises the following steps: It is determined whether the current target angle difference is greater than a first angle value; If the current target angle difference is greater than the first angle value, the motor is controlled to rotate the first angle value at a first rotating speed; The cooperative initialization request information is sent to the electronic device again to re-determine the current target angle difference, and the above steps are repeatedly executed until the current target angle difference is less than a second angle value for a preset number of times in succession, and the second angle value is less than the first angle value.
3. The method of claim 2, wherein, The motor is controlled according to the current target angle difference, which comprises the following steps: If the current target angle difference is less than or equal to the first angle value, the motor is controlled to rotate the current target angle difference at a first rotating speed; 4. The method of claim 2, wherein, The cooperative initialization request information is sent to the electronic device again to re-determine the current target angle difference, and the above steps are repeatedly executed until the current target angle difference is less than the second angle value for a preset number of times in succession. The camera comprises a microphone array, and the current target angle difference is determined according to the sound wave signal and the current motor angle, which comprises the following steps: A time difference is obtained, in which any two microphones in the microphone array receive the sound wave signal; 5. The method according to any one of claims 1 to 4, characterized in that, A distance between the camera and the target electronic device is obtained; An incident angle of the sound wave signal is determined according to the time difference and the distance; The current target angle difference is determined according to the incident angle and the current motor angle. The current target angle difference is determined according to the incident angle and the current motor angle, which comprises the following steps: The incident angle is input into a mapping model to obtain a target rotating angle output by the mapping model, and the mapping model is used to determine a corresponding relationship between the incident angle and the motor angle; 6. The method of claim 5, wherein, A difference between the target rotating angle and the current motor angle is determined as the target angle difference. The method comprises the following steps: A sending unit is configured to send a cooperative initialization request information to a target electronic device when a camera is powered on or a motor is reset, and the cooperative initialization request information is used to request a sound wave signal of the target electronic device; 7. A camera motor limit control device, characterized in that, An obtaining unit is configured to obtain the sound wave signal and a current motor angle of the camera; A determining unit is configured to determine a current target angle difference according to the sound wave signal and the current motor angle; A control unit is configured to limit the motor according to the current target angle difference.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the camera motor limit control method of any one of claims 1 to 6. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the camera motor limit control method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the camera motor limit control method of any one of claims 1 to 6. The computer program is executed by the processor to implement the camera motor limit control method of any one of claims 1 to 6.