Patent Description:
With the development of wireless transmission technologies, mobile terminals have become indispensable in people's life. To reduce space occupied by a camera module in a mobile terminal to provide more space for the entire industrial design of the mobile terminal, the concept of detachable camera comes into being. A detachable camera means that a mobile terminal is only equipped with one detachable camera module that can work independently, to perform original camera rear-facing shooting and front-facing shooting functions.

Since shooting parameters of camera front-facing shooting and rear-facing shooting are different, to ensure normal operation of a camera module, it is necessary to detect whether a shooting mode of the camera module is front-facing shooting or rear-facing shooting. In the related art, a special detection apparatus is usually added in a mobile terminal to identify a shooting mode of the camera module. However, this method usually requires additional modification (such as digging a hole or reserving a contact point) of the appearance of the mobile terminal, to install the detection apparatus.

<CIT> discloses that one side of a rotation connection unit of a cylindrical shape is inserted into a first body and the other side thereof is inserted into a second body. The rotation connection unit comprises: n unit disks which are continuously arranged in the longitudinal direction of the rotation connection unit; a plurality of ball terminals, each of which protrudes from one surface of the unit disk; and arc terminals electrically connected to the ball terminals, wherein the other surfaces of the arc terminals are exposed. A mobile terminal comprises the rotation connection unit in contact with the arc terminals of the unit disks facing the ball terminals. The mobile terminal can photograph a front portion and a rear portion of the mobile terminal by using one camera.

<CIT> provides a camera system in which a lens unit can be fixed easily to an arbitrary position of a camera body. The camera system comprises a lens unit incorporating a CCD, and a camera body. A magnet is buried in the protruding portion of the lens unit. A body section of the camera body is formed of a magnetic body. Consequently, the lens unit can be fixed to an arbitrary position of the camera body not impeding the function. A cable is employed for transmitting data and power between the lens unit and the camera body.

Embodiments of the present invention provide a mobile terminal, a shooting mode detection method, and a storage medium, which can detect a shooting mode of a mobile terminal having a detachable camera module.

The embodiments of the present invention adopt the following technical solutions:.

According to a first aspect, a mobile terminal according to claim <NUM> is provided.

According to a second aspect, a shooting mode detection method according to claim <NUM> is provided.

According to a third aspect, a mobile terminal according to claim <NUM> is provided.

According to a fourth aspect, a computer-readable storage medium according to claim <NUM> is provided.

In the embodiments of the present invention, since the magnetic structural element is disposed on the camera module that is detachable from the terminal body, and is opposite to only one of the Hall sensors when the camera module is placed on the placement portion, when the camera module is placed on the placement portion of the terminal body in different manners, Hall sensors opposite to the magnetic structural element are different. Therefore, magnetic field strengths of the magnetic structural element detected by the first Hall sensor and the second Hall sensor are different. Thus, in practical applications, the magnetic field strengths detected by the first Hall sensor and the second Hall sensor can be used to determine the Hall sensor opposite to the magnetic structural element. Since the camera module has a front-facing shooting mode and a rear-facing shooting mode, and the Hall sensors opposite to the magnetic structural element are different in different shooting modes, the processor built in the terminal body can determine the shooting mode of the camera module based on magnetic field strength signals output by the first Hall sensor and the second Hall sensor. That is, in the mobile terminal of the embodiments of the present invention, the shooting mode of the camera module can be determined only by disposing the Hall sensors and the magnetic structural element, the determining logic is simple, and costs are low. Besides, the appearance of the mobile terminal does not need to be additionally modified, and the appearance aesthetics of the mobile terminal can be preserved.

The accompanying drawings described herein are used to provide further understanding of the present invention and constitute a part of the present invention. The illustrative embodiments of the present invention and descriptions thereof are used to explain the present invention, and do not constitute any improper limitation on the present invention. In the accompanying drawings:.

The following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to accompanying drawings in the embodiments of the present invention.

The following describes the technical solutions in various embodiments of the present invention in detail with reference to the accompanying drawings.

Referring to <FIG>, an embodiment of the present invention provides a mobile terminal. The mobile terminal specifically includes:
a terminal body <NUM>, a camera module <NUM> detachably connected to the terminal body <NUM>, a first Hall sensor <NUM>, a second Hall sensor <NUM>, and a magnetic structural element <NUM>.

The terminal body <NUM> has a placement portion <NUM> where the camera module <NUM> can be placed, and the terminal body <NUM> has a built-in processor <NUM>.

The first Hall sensor <NUM> and the second Hall sensor <NUM> are respectively electrically connected to the processor <NUM> built in the terminal body <NUM> and fixedly arranged on a side on which the placement portion <NUM> of the terminal body <NUM> is located.

The magnetic structural element <NUM> is fixed on an end of the camera module <NUM> close to the placement portion <NUM>, and when the camera module <NUM> is placed on the placement portion <NUM>, the magnetic structural element <NUM> is opposite to the first Hall sensor <NUM> or the second Hall sensor <NUM>. For example, the magnetic structural element <NUM> may be a magnet.

In the embodiments of the present invention, since the magnetic structural element <NUM> is disposed on the camera module <NUM> that is detachable from the terminal body <NUM>, and is opposite to only one of the Hall sensors when the camera module <NUM> is placed on the placement portion <NUM>, when the camera module <NUM> is placed on the placement portion <NUM> of the terminal body <NUM> in different manners, Hall sensors opposite to the magnetic structural element <NUM> are different. Therefore, magnetic field strengths of the magnetic structural element detected by the first Hall sensor <NUM> and the second Hall sensor <NUM> are different.

Thus, in practical applications, the magnetic field strengths detected by the first Hall sensor <NUM> and the second Hall sensor <NUM> can be used to determine the Hall sensor opposite to the magnetic structural element. Since the camera module <NUM> has a front-facing shooting mode and a rear-facing shooting mode, and the Hall sensors opposite to the magnetic structural element <NUM> are different in different shooting modes, the processor <NUM> built in the terminal body <NUM> can determine the shooting mode of the camera module <NUM> based on a magnetic field strength signal output by the first Hall sensor <NUM> and a magnetic field strength signal output by the second Hall sensor <NUM>. That is, in the mobile terminal of the embodiments of the present invention, the shooting mode of the camera module can be determined only by disposing the Hall sensors and the magnetic structural element, the determining logic is simple, and costs are low. Besides, the appearance of the mobile terminal does not need to be additionally modified, and the appearance aesthetics of the mobile terminal can be preserved.

In this embodiment of the present invention, the terminal body <NUM> further includes a display screen <NUM>, and the camera module <NUM> includes a camera <NUM>. As shown in <FIG>, in the rear-facing shooting mode, the orientation of the camera <NUM> is contrary to the orientation of the display screen <NUM>. In the front-facing shooting mode, the orientation of the camera <NUM> is the same as the orientation of the display screen <NUM>. As shown in <FIG>, the camera module <NUM> is placed on the placement portion <NUM>, and when the orientation of the camera <NUM> is contrary to the orientation of the display screen <NUM>, the magnetic structural element <NUM> is opposite to the first Hall sensor <NUM>. As shown in <FIG> and <FIG>, when the orientation of the camera <NUM> is to the same as the orientation of the display screen <NUM>, the magnetic structural element <NUM> is opposite to the second Hall sensor <NUM>.

Since the orientations of the camera <NUM> relative to the display screen <NUM> are different, and the Hall sensors opposite to the magnetic structural element <NUM> are different when the camera module <NUM> is in different shooting modes, the Hall sensor opposite to the magnetic structural element <NUM> detects a higher magnetic field strength, while the other Hall sensor detects a lower magnetic field strength. Correspondingly, the first Hall sensor <NUM> and the second Hall sensor <NUM> output corresponding magnetic field strength signals to the processor <NUM> based on detected magnetic field strengths of the magnetic structural element <NUM>. The processor <NUM> can acquire the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM>, and determine the shooting mode of the camera module <NUM> according to the first magnetic field strength signal and the second magnetic field strength signal.

<FIG> are used as an example. When the camera module <NUM> is far away from the terminal body <NUM>, the first Hall sensor <NUM> and the second Hall sensor <NUM> respectively detect that the magnetic field strength E of the magnetic structural element <NUM> is relatively small. In this case, the first magnetic field strength signal INT1 output by the first Hall sensor <NUM> and the second magnetic field strength signal INT2 output by the second Hall sensor <NUM> are both a first level signal.

As shown in <FIG>, when the camera module <NUM> approaches the terminal body <NUM>, if the orientation of the camera <NUM> is contrary to the orientation of the display screen <NUM>, a distance between the magnetic structural element <NUM> and the first Hall sensor <NUM> decreases. The first Hall sensor <NUM> detects that the magnetic field strength of the magnetic structural element <NUM> increases, and when the magnetic field strength E reaches a field strength triggering threshold E0 of the first Hall sensor <NUM>, the first magnetic field strength signal INT1 output by the first Hall sensor <NUM> is a second level signal. In this case, the second Hall sensor <NUM> detects that the magnetic field strength E of the magnetic structural element <NUM> is small, and the outputted second magnetic field strength signal INT2 is still the first level signal.

As shown in <FIG> and <FIG>, if the orientation of the camera <NUM> is the same as the orientation of the display screen <NUM>, a distance between the magnetic structural element <NUM> and the second Hall sensor <NUM> decreases. The second Hall sensor <NUM> detects that the magnetic field strength E of the magnetic structural element <NUM> increases, and when the magnetic field strength E reaches a field strength triggering threshold E0 of the second Hall sensor <NUM>, the second magnetic field strength signal INT2 output by the second Hall sensor <NUM> is a second level signal. In this case, the first Hall sensor <NUM> detects that the magnetic field strength E of the magnetic structural element <NUM> is small, and the outputted first magnetic field strength signal INT1 is still the first level signal. The first level signal and the second level signal are different level signals, when the first level signal is a high level signal, the second level signal is a low level signal, and when the first level signal is a low level signal, the second level signal is a high level signal.

Correspondingly, the processor <NUM> can determine the shooting mode of the camera module <NUM> according to the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM>. Specifically, the processor <NUM> is specifically configured to: in a case that the first magnetic field strength signal is a first level signal and the second magnetic field strength signal is a second level signal, determine that the shooting mode of the camera module <NUM> is the front-facing shooting mode; and in a case that the first magnetic field strength signal is a second level signal and the second magnetic field strength signal is a first level signal, determine that the shooting mode of the camera module <NUM> is the rear-facing shooting mode.

In the embodiments of the present invention, the processor <NUM> determines the shooting mode of the camera module <NUM> only based on the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM>, the determining logic is simple, and costs are low. Besides, the appearance of the mobile terminal does not need to be additionally modified, and the appearance aesthetics of the mobile terminal can be preserved.

Further, in the embodiments of the present invention, the processor <NUM> may also be configured to disable the shooting function of the mobile terminal in a case that the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM> are both the first level signal.

Still referring to <FIG>, in a process in which the camera module <NUM> moves away from the terminal body <NUM>, the magnetic structural element <NUM> is farther and farther away from the first Hall sensor <NUM> and the second Hall sensor <NUM>, and the first Hall sensor <NUM> and the second Hall sensor <NUM> both detect that the magnetic field strength of the magnetic structural element <NUM> decreases. Therefore, the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM> are both the first level signal. Based on this, when the processor <NUM> obtains that the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM> are both the first level signal, the processor <NUM> can determine that the camera module <NUM> is detached from the terminal body <NUM>. In this case, by disabling the shooting function of the mobile terminal, power consumption and system resource occupation of the mobile terminal caused by the camera module can be reduced, and the battery life of the mobile terminal can be increased.

Further, in the embodiments of the present invention, after determining the shooting mode of the camera module <NUM>, the processor <NUM> may be further configured to adjust a shooting parameter of the camera module <NUM> according to the shooting mode. The shooting parameter may, for example, include but is not limited to at least one of the following: a shooting speed, a resolution, a focal length, an angle of view, and the like.

Thus, the processor <NUM> of the mobile terminal adjusts the shooting parameter of the camera module <NUM> based on the shooting mode of the camera module <NUM>, which can improve the shooting quality and shooting efficiency of the camera module in the corresponding shooting mode.

In the embodiments of the present invention, as shown in <FIG> and <FIG>, to improve the accuracy of determining the shooting mode of the camera module, the first Hall sensor <NUM> and the second Hall sensor <NUM> are symmetrically distributed on two sides relative to the center line of the terminal body <NUM>. Therefore, by separating the first Hall sensor <NUM> from the second Hall sensor <NUM>, it can be avoided that the difference between the magnetic field strength signals output by the first Hall sensor <NUM> and the second Hall sensor <NUM> is small because the first Hall sensor <NUM> and the second Hall sensor <NUM> are close to each other. Therefore, based on the first magnetic field strength signal output by the first Hall sensor <NUM> and the second magnetic field strength signal output by the second Hall sensor <NUM>, it can be effectively and accurately identified whether the shooting mode of the camera module <NUM> is the front-facing shooting mode or the rear-facing shooting mode.

Referring to <FIG>, an embodiment of the present invention provides a shooting mode detection method. The method can be applied to the mobile terminal described in the foregoing embodiments of the present invention. Specifically, the method includes:.

Step <NUM>: Acquire a first magnetic field strength signal output by the first Hall sensor and a second magnetic field strength signal output by the second Hall sensor.

Step <NUM>: Determine a shooting mode of the camera module according to the first magnetic field strength signal and the second magnetic field strength signal, where the shooting mode includes a front-facing shooting mode or a rear-facing shooting mode.

In an embodiment of the present invention, as shown in <FIG>, in the rear-facing shooting mode, the orientation of the camera is contrary to the orientation of the display screen. In the front-facing shooting mode, the orientation of the camera is the same as the orientation of the display screen. The camera module is placed on the placement portion, when the orientation of the camera of the camera module is contrary to the orientation of the display screen of the terminal body, the magnetic structural element is opposite to the first Hall sensor, and when the orientation of the camera is the same as the orientation of the display screen, the magnetic structural element is opposite to the second Hall sensor.

Correspondingly, step <NUM> may include:
in a case that the first magnetic field strength signal output by the first Hall sensor is a first level signal and the second magnetic field strength signal output by the second Hall sensor is a second level signal, determining that the shooting mode of the camera module is the front-facing shooting mode.

For example, the user can hold the camera module to approach the placement portion of the terminal body. If the orientation of the camera is the same as the orientation of the display screen, the magnetic structural element becomes closer to the second Hall sensor in the process in which the camera module approaches the terminal body, the second Hall sensor detects that the magnetic field strength of the magnetic structural element increases, and when the magnetic field strength reaches a field strength triggering threshold of the second Hall sensor, the second magnetic field strength signal INT2 output by the second Hall sensor changes from the first level signal to a second level signal. In this case, the first Hall sensor detects that the magnetic field strength of the magnetic structural element is small, and the outputted first magnetic field strength signal INT1 is still the first level signal.

In a case that the first magnetic field strength signal output by the first Hall sensor is a second level signal and the second magnetic field strength signal output by the second Hall sensor is a first level signal, it is determined that the shooting mode of the camera module is the rear-facing shooting mode;.

For example, the user can hold the camera module to approach the placement portion of the terminal body. If the orientation of the camera is contrary to the orientation of the display screen, the magnetic structural element becomes closer to the first Hall sensor in the process in which the camera module approaches the terminal body, the first Hall sensor detects that the magnetic field strength of the magnetic structural element increases, and when the magnetic field strength reaches a field strength triggering threshold of the first Hall sensor, the first magnetic field strength signal INT1 output by the first Hall sensor changes from the first level signal to a second level signal. In this case, the second Hall sensor detects that the magnetic field strength of the magnetic structural element is small, and the outputted second magnetic field strength signal INT2 is still the first level signal.

The first level signal and the second level signal are different level signals, when the first level signal is a high level signal, the second level signal is a low level signal, or when the first level signal is a low level signal, the second level signal is a high level signal.

In the embodiments of the present invention, the shooting mode of the camera module is determined only based on the first magnetic field strength signal output by the first Hall sensor and the second magnetic field strength signal output by the second Hall sensor, the determining logic is simple, and costs are low. Besides, the appearance of the mobile terminal does not need to be additionally modified, and the appearance aesthetics of the mobile terminal can be preserved.

As shown in <FIG>, in another embodiment of the present invention, in a shooting mode detection method provided by an embodiment of the present invention, after the above step <NUM>, the method further includes:.

Step <NUM>: Adjust a shooting parameter of the camera module according to the shooting mode of the camera module.

The shooting parameter may, for example, include but is not limited to at least one of the following: a shooting speed, a resolution, a focal length, an angle of view, and the like.

It can be understood that the shooting parameter of the camera module is adjusted based on the shooting mode of the camera module, which can improve the shooting quality and shooting efficiency of the camera module in the corresponding shooting mode.

As shown in <FIG>, in another embodiment of the present invention, in a shooting mode detection method provided by the embodiments of the present invention, after the above step <NUM>, the method further includes:.

Step <NUM>: Disable the shooting function of the mobile terminal in a case that the first magnetic field strength signal and the second magnetic field strength signal are both the first level signal.

It can be understood that when obtaining that the first magnetic field strength signal output by the first Hall sensor and the second magnetic field strength signal output by the second Hall sensor are both the first level signal, it can be determined that the camera module is detached from the terminal body. In this case, by disabling the shooting function of the mobile terminal, power consumption and system resource occupation of the mobile terminal caused by the camera module can be reduced, and the battery life of the mobile terminal can be increased.

It should be noted that, since the method embodiment is basically similar to the mobile terminal described in the above-mentioned embodiments, the method embodiment is only briefly described herein, and for the relevant part, refer to the description of the above-mentioned embodiments.

Referring to <FIG>, an embodiment of the present invention further provides a mobile terminal. Specifically, the mobile terminal may include, but is not limited to, any one of a mobile phone, a tablet computer, a smart wearable device, and a personal digital assistant (PDA). The mobile terminal <NUM> includes an acquisition module <NUM> and a determining module <NUM>.

The acquisition module <NUM> is configured to acquire a first magnetic field strength signal output by the first Hall sensor and a second magnetic field strength signal output by the second Hall sensor.

The determining module <NUM> is configured to determine a shooting mode of the camera module according to the first magnetic field strength signal and the second magnetic field strength signal, where the shooting mode includes a front-facing shooting mode or a rear-facing shooting mode.

The mobile terminal provided in the embodiments of the present invention can implement the processes implemented by the mobile terminal in the method embodiments in <FIG> and <FIG>. To avoid repetition, details are not described herein again.

Optionally, the camera module is placed on the placement portion, when the orientation of the camera of the camera module is contrary to the orientation of the display screen of the terminal body, the magnetic structural element is opposite to the first Hall sensor, and when the orientation of the camera is the same as the orientation of the display screen, the magnetic structural element is opposite to the second Hall sensor; and.

The determining module <NUM> is specifically configured to:.

In another embodiment of the present invention, the apparatus <NUM> further includes:
an adjustment module, configured to adjust a shooting parameter of the camera module according to the shooting mode of the camera module, where the shooting parameter includes at least one of the following: a shooting speed, a resolution, a focal length, and an angle of view.

It can be understood that the shooting parameter of the camera module is adjusted based on the shooting mode of the camera module, which can improve the shooting quality and shooting efficiency of the camera module in the corresponding shooting mode. In another embodiment of the present invention, the apparatus <NUM> further includes:
a disabling module, configured to disable the shooting function of the mobile terminal in a case that the first magnetic field strength signal and the second magnetic field strength signal are both the first level signal.

In the mobile terminal in the above-mentioned embodiments, a specific manner in which each module performs an operation has been described in detail in the embodiments of the method, and will not be described in detail herein.

<FIG> is a schematic diagram of a hardware structure of a mobile terminal implementing embodiments of the present invention. The mobile terminal <NUM> includes the terminal body, the camera module detachably connected to the terminal body, the first Hall sensor, the second Hall sensor, and the magnetic structural element according to any one of the above embodiments of the present invention. The mobile terminal <NUM> further includes but is not limited to components such as a radio frequency unit <NUM>, a network module <NUM>, an audio output unit <NUM>, an input unit <NUM>, a sensor <NUM>, a display unit <NUM>, a user input unit <NUM>, an interface unit <NUM>, a memory <NUM>, a processor <NUM>, and a power supply <NUM>. These modules or units can be built in the terminal body. A person skilled in the art may understand that a structure of the mobile terminal shown in <FIG> does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements. In the embodiments of the present invention, the mobile terminal includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a palmtop computer, an in-vehicle terminal, a wearable device, a pedometer, and the like.

The processor <NUM> is configured to acquire a first magnetic field strength signal output by the first Hall sensor and a second magnetic field strength signal output by the second Hall sensor; and determine a shooting mode of the camera module according to the first magnetic field strength signal and the second magnetic field strength signal, where the shooting mode includes a front-facing shooting mode or a rear-facing shooting mode.

Since the magnetic structural element is disposed on the camera module that is detachable from the terminal body, and is opposite to only one of the Hall sensors when the camera module is placed on the placement portion, when the camera module is placed on the placement portion of the terminal body in different manners, Hall sensors opposite to the magnetic structural element are different. Therefore, magnetic field strengths of the magnetic structural element detected by the first Hall sensor and the second Hall sensor are different. Thus, in practical applications, the magnetic field strengths detected by the first Hall sensor and the second Hall sensor can be used to determine the Hall sensor opposite to the magnetic structural element. Since the camera module has a front-facing shooting mode and a rear-facing shooting mode, and the Hall sensors opposite to the magnetic structural element are different in different shooting modes, the processor built in the terminal body can determine the shooting mode of the camera module based on magnetic field strength signals output by the first Hall sensor and the second Hall sensor. That is, in the mobile terminal of the embodiments of the present invention, the shooting mode of the camera module can be determined only by disposing the Hall sensors and the magnetic structural element, the determining logic is simple, and costs are low. Besides, the appearance of the mobile terminal does not need to be additionally modified, and the appearance aesthetics of the mobile terminal can be preserved.

It should be understood that in the embodiments of the present invention, the radio frequency unit <NUM> may be configured to receive and transmit information, or receive and transmit signals during a call. Specifically, the radio frequency unit <NUM> receives downlink data from a base station, and transmits the downlink data to the processor <NUM> for processing; and in addition, transmits uplink data to the base station. Generally, the radio frequency unit <NUM> includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit <NUM> may also communicate with a network and other devices through a wireless communication system.

The mobile terminal provides wireless broadband Internet access for a user by using a network module <NUM>, for example, helping the user send and receive an email, browsing a web page, and accessing streaming media.

The audio output unit <NUM> can convert audio data received by the radio frequency unit <NUM> or the network module <NUM> or stored in the memory <NUM> into an audio signal, and output the audio signal as sound. In addition, the audio output unit <NUM> may further provide audio output (for example, call signal receiving sound or message receiving sound) to a specific function performed by the mobile terminal <NUM>. The audio output unit <NUM> includes a speaker, a buzzer, a telephone receiver, and the like.

The input unit <NUM> is configured to receive audio or radio frequency signals. The input unit <NUM> may include a graphics processing unit (Graphics Processing Unit, GPU) <NUM> and a microphone <NUM>. The graphics processing unit <NUM> is configured to process image data of a static picture or a video obtained by an image capture apparatus (for example, a camera) in video capture mode or image capture mode. A processed image frame may be displayed on the display unit <NUM>. The image frame processed by the graphics processing unit <NUM> may be stored in the memory <NUM> (or another storage medium) or sent by using the radio frequency unit <NUM> or the network module <NUM>. The microphone <NUM> may receive sound and can process the sound into audio data. Processed audio data may be converted, in a call mode, into a format that can be sent to a mobile communication base station by using the radio frequency unit <NUM> for output.

The mobile terminal <NUM> further includes at least one sensor <NUM>, such as an optical sensor, a motion sensor, and another sensor. Specifically, the optical sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor may adjust luminance of the display panel <NUM> based on brightness of ambient light, and the proximity sensor may disable the display panel <NUM> and/or backlight when the mobile terminal <NUM> approaches an ear. As a type of the motion sensor, an accelerometer sensor may detect magnitude of an acceleration in each direction (generally three axes), and may detect magnitude and a direction of gravity when being static. The accelerometer sensor may be used for recognizing a mobile terminal gesture (for example, horizontal and vertical screen switching, a game, or magnetometer posture calibration), a function to vibration recognition (for example, a pedometer or a strike), or the like. The sensor <NUM> may further include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like. This is not described herein.

The display unit <NUM> is configured to display information input by the user or information provided to the user. The display unit <NUM> may include the display panel <NUM>, and the display panel <NUM> may be configured in a form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

The user input unit <NUM> may be configured to receive input digit or character information and generate key signal input to user setting and function control of the mobile terminal. Specifically, the user input unit <NUM> includes a touch panel <NUM> and another input device <NUM>. The touch panel <NUM> is also referred to as a touchscreen, and may collect a touch operation of the user on or near the touch panel <NUM> (for example, an operation performed on or near the touch panel <NUM> by the user by using any appropriate object or accessory such as a finger or a stylus). The touch panel <NUM> may include two parts: a touch detection apparatus and a touch controller. The touch detection apparatus detects a touch location of the user, detects a signal brought by the touch operation, and sends the signal to the touch controller. The touch controller receives touch information from the touch detection apparatus, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor <NUM>, and can receive and execute a command sent by the processor <NUM>. In addition, the touch panel <NUM> may be implemented as a resistive type, a capacitive type, an infrared type, a surface acoustic wave type, or the like. In addition to the touch panel <NUM>, the user input unit <NUM> may further include another input device <NUM>. Specifically, the another input device <NUM> may include but is not limited to: a physical keyboard, a function button (such as a volume control button, a switch button), a trackball, a mouse, and a joystick, which is not described herein.

Further, the touch panel <NUM> may cover the display panel <NUM>. When detecting a touch operation on or near the touch panel <NUM>, the touch panel <NUM> transmits the touch operation to the processor <NUM> to determine a type of a touch event. Then, the processor <NUM> provides corresponding visual output on the display panel <NUM> based on the type of the touch event. In <FIG>, the touch panel <NUM> and the display panel <NUM> are used as two independent components to implement input and output functions of the mobile terminal. However, in some embodiments, the touch panel <NUM> and the display panel <NUM> may be integrated to implement the input and output functions of the mobile terminal. This is not specifically limited herein.

The interface unit <NUM> is an interface connecting an external apparatus to the mobile terminal <NUM>. For example, the external apparatus may include a wired or wireless headset port, an external power supply (or a battery charger) port, a wired or wireless data port, a memory card port, a port for connecting an apparatus having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit <NUM> may be configured to receive input (for example, data information and power) from the external apparatus and transmit the received input to one or more elements in the mobile terminal <NUM>, or may be configured to transmit data between the mobile terminal <NUM> and the external apparatus.

The memory <NUM> may be configured to store a software program and various pieces of data. The memory <NUM> may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (for example, a sound play function or an image display function), and the like. The data storage area may store data (for example, audio data or an address book) or the like created based on use of the mobile phone. In addition, the memory <NUM> may include a high-speed random access memory or a nonvolatile memory, for example, at least one disk storage device, a flash memory, or other nonvolatile solid-state storage devices.

The processor <NUM> is a control center of the mobile terminal, and is connected to all parts of the entire mobile terminal by using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing the software program and/or the module that are stored in the memory <NUM> and invoking the data stored in the memory <NUM>, to implement overall monitoring on the mobile terminal. The processor <NUM> may include one or more processing units. Optionally, the processor <NUM> may integrate an application processor and a modem processor. The application processor mainly deals with an operating system, a user interface, an application, and the like. The modem processor mainly deals with wireless communication. It can be understood that, alternatively, the modem processor may not be integrated into the processor <NUM>.

The terminal <NUM> may also include the power supply <NUM> (for example, a battery) that supplies power to various components. Optionally, the power supply <NUM> may be logically connected to the processor <NUM> by using a power supply management system, to implement functions of managing charging, discharging, and power consumption by using the power supply management system.

In addition, the mobile terminal <NUM> includes some function modules not shown, and details are not described herein.

An embodiment of the present invention further provides a mobile terminal, including a processor <NUM>, a memory <NUM>, and a computer program stored in the memory <NUM> and executable on the processor <NUM>. When executed by the processor <NUM>, the computer program implements the foregoing processes of the embodiments of the shooting mode detection method, and a same technical effect can be achieved. To avoid repetition, details are not described herein again.

Embodiments of the present invention further provide a computer readable storage medium. The computer readable storage medium stores a computer program. The computer program implements, when executed by a processor, the foregoing processes of the embodiments of the shooting mode detection method, and a same technical effect can be achieved. To avoid repetition, details are not described herein again. The computer readable storage medium is, for example, a read-only memory (ROM for short), a random access memory (RAM for short), a magnetic disk, or an optical disc.

It should be noted that, in this specification, the terms "include", "comprise", or their any other variant is intended to cover a non-exclusive inclusion, so that a process, a method, an article, or an apparatus that includes a list of elements not only includes those elements but also includes other elements which are not expressly listed, or further includes elements inherent to such process, method, article, or apparatus. In the absence of more restrictions, an element defined by the statement "including a. " does not exclude another same element in a process, method, article, or apparatus that includes the element.

Based on the descriptions of the foregoing implementations, a person skilled in the art may clearly understand that the method in the foregoing embodiments may be implemented by software in addition to a necessary universal hardware platform or by hardware only. In most circumstances, the former is a preferred implementation. Based on such understanding, the technical solutions of the present invention essentially or the part contributing to the related art may be implemented in a form of a software product. The computer software product is stored in a storage medium (such as a ROM/RAM, a hard disk, or an optical disc), and includes several instructions for instructing a terminal (which may be mobile phone, a computer, a server, an air conditioner, a network device, or the like) to perform the methods described in the embodiments of the present invention.

Claim 1:
A mobile terminal having a camera module (<NUM>), comprising
a display screen;
a terminal body (<NUM>), wherein the terminal body has a placement portion where the camera module (<NUM>) can be placed;
the camera module (<NUM>) detachably connected to the terminal body (<NUM>), wherein the camera module (<NUM>) comprises a camera;
a first Hall sensor (<NUM>) and a second Hall sensor (<NUM>), wherein the first Hall sensor (<NUM>) and the second Hall sensor (<NUM>) are respectively electrically connected to a processor (<NUM>) built in the terminal body (<NUM>) and fixedly arranged on a side on which the placement portion of the terminal body (<NUM>) is located, wherein the first Hall sensor (<NUM>) and the second Hall sensor (<NUM>) are symmetrically distributed on two sides relative to the center line of the terminal body (<NUM>); and
a magnetic structural element (<NUM>), wherein the magnetic structural element (<NUM>) is fixed on an end of the camera module (<NUM>) close to the placement portion, and the camera module (<NUM>) is placed on the placement portion,
wherein the camera module (<NUM>) has a front-facing shooting mode and a rear-facing shooting mode; in the front-facing shooting mode, the orientation of the camera is the same as the orientation of the display screen, and the magnetic structural element is opposite to the second Hall sensor (<NUM>); and in the rear-facing shooting mode, the orientation of the camera is contrary to the orientation of the display screen, and the magnetic structural element is opposite to the first Hall sensor (<NUM>);
wherein the processor (<NUM>) is configured to:
acquire a first magnetic field strength signal output by the first Hall sensor (<NUM>) and a second magnetic field strength signal output by the second Hall sensor (<NUM>); and
determine a shooting mode of the camera module (<NUM>) according to the first magnetic field strength signal and the second magnetic field strength signal.