CN108810284B - Mode switching method of camera and electronic equipment - Google Patents

Mode switching method of camera and electronic equipment Download PDF

Info

Publication number
CN108810284B
CN108810284B CN201810762962.9A CN201810762962A CN108810284B CN 108810284 B CN108810284 B CN 108810284B CN 201810762962 A CN201810762962 A CN 201810762962A CN 108810284 B CN108810284 B CN 108810284B
Authority
CN
China
Prior art keywords
camera
mode
switching
electronic device
battery
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810762962.9A
Other languages
Chinese (zh)
Other versions
CN108810284A (en
Inventor
唐文峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810762962.9A priority Critical patent/CN108810284B/en
Publication of CN108810284A publication Critical patent/CN108810284A/en
Application granted granted Critical
Publication of CN108810284B publication Critical patent/CN108810284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/52Details of telephonic subscriber devices including functional features of a camera

Abstract

The embodiment of the invention provides a mode switching method of a camera and electronic equipment, wherein the method is applied to the electronic equipment, at least one camera of the electronic equipment is provided with a first mode and a second mode, the camera in the first mode is contained in an accommodating space in the electronic equipment, at least part of the structure of the camera in the second mode is positioned outside the accommodating space, and the method comprises the following steps: acquiring state parameters of the electronic equipment under the condition that the camera is in the second mode; under the condition that the state parameters meet preset conditions, switching the camera to the first mode; the state parameters comprise electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used for indicating whether the electronic equipment is abnormal or not. The embodiment of the invention can solve the problem that the camera in the prior art is damaged because the camera cannot be recycled.

Description

Mode switching method of camera and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for switching modes of a camera and an electronic device.
Background
With the pursuit of high screen ratio of electronic devices, the full-screen mobile phone concept has gradually become a flashing point that each mainstream mobile phone manufacturer attracts users. Wherein, some manufacturers set the camera to the telescopic mode, reach the purpose that improves the screen and account for the ratio.
However, although the telescopic camera can obtain better full-screen visual experience, if the user is taking a picture, the mobile phone is suddenly locked or the mobile phone is in a low power and is suddenly turned off, the problem that the camera cannot be normally recovered occurs, and therefore when the user makes contact with other objects, the camera is easily damaged.
Disclosure of Invention
The embodiment of the invention provides a mode switching method of a camera and electronic equipment, and aims to solve the problem that the camera in the prior art is damaged because the camera cannot be recycled.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for switching modes of a camera, which is applied to an electronic device, where at least one camera of the electronic device is provided with a first mode and a second mode, where the camera in the first mode is accommodated in an accommodating space in the electronic device, and at least a part of a structure of the camera in the second mode is located outside the accommodating space, and the method includes:
acquiring state parameters of the electronic equipment under the condition that the camera is in the second mode;
under the condition that the state parameters meet preset conditions, switching the camera to the first mode; wherein the content of the first and second substances,
the state parameters comprise electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used for indicating whether the electronic equipment is abnormal or not.
In a second aspect, an embodiment of the present invention further provides an electronic device, where at least one camera of the electronic device is provided with a first mode and a second mode, where the camera in the first mode is received in an accommodating space in the electronic device, and at least a part of a structure of the camera in the second mode is located outside the accommodating space, the electronic device includes:
the first acquisition module is used for acquiring the state parameters of the electronic equipment under the condition that the camera is in the second mode;
the switching module is used for switching the camera to the first mode under the condition that the state parameters meet preset conditions; wherein the content of the first and second substances,
the state parameters comprise electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used for indicating whether the electronic equipment is abnormal or not.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the method for switching modes of a camera as described above.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for switching modes of a camera as described above.
In this way, in the embodiment of the present invention, when the camera is in the second mode, the state parameters of the camera are obtained, where the state parameters include electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used to indicate whether the electronic device is abnormal, and then the application scenario of the camera is further known by the state information, so that when the state parameters meet the preset conditions, the camera is switched to the first mode in time, so that part of the structure of the camera located outside the accommodating space is recovered into the accommodating space, and damage caused by the fact that the camera cannot be normally recovered is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a mode switching method of a camera according to an embodiment of the present invention;
fig. 2 is a second schematic flow chart of a mode switching method of a camera according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the invention;
FIG. 4 is a second schematic structural diagram of an electronic apparatus according to an embodiment of the invention;
FIG. 5 is a third schematic structural diagram of an electronic apparatus according to an embodiment of the invention;
FIG. 6 is a fourth schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 7 is a schematic structural diagram of an electronic device according to another embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a mode switching method for a camera according to an embodiment of the present invention is applied to an electronic device, where at least one camera of the electronic device is provided with a first mode and a second mode, where the camera in the first mode is accommodated in an accommodating space in the electronic device, and at least a part of a structure of the camera in the second mode is located outside the accommodating space, and the method includes:
step 101, acquiring a state parameter of the electronic device when the camera is in the second mode, where the state parameter includes electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used to indicate whether the electronic device is abnormal.
Here, the state parameter may be power information indicating a remaining power of the electronic device; and/or abnormal feedback information indicating whether the electronic equipment is abnormal or not, wherein the state parameter can be used for assisting the electronic equipment to know whether the camera of the electronic equipment is in an abnormal condition or not, such as a dead halt or low power and the like. In this step, the electronic device executes the next step by acquiring the state parameter when the camera thereof is in the second mode.
And 102, switching the camera to the first mode under the condition that the state parameters meet preset conditions.
Here, the preset condition is a camera emergency recovery condition preset for the state parameter, and is used for judging a scene where the camera needs emergency recovery. In this step, under the condition that the state parameters obtained in step 101 satisfy the preset conditions, the camera is switched to the first mode in time, that is, a part of the structure of the camera located outside the accommodating space is recovered into the accommodating space.
Thus, through the above steps 101 and 102, the electronic device obtains the state parameters of the camera when the camera is in the second mode to know the application scene of the camera, so that the camera is timely switched to the first mode when the state parameters meet the preset conditions, the partial structure of the camera outside the accommodating space is recovered to the accommodating space, and the damage caused by the fact that the camera cannot be normally recovered is avoided.
Wherein, after step 102, the method further comprises:
when the camera is in the first mode and an instruction for switching the camera mode is received, acquiring the working states of the camera and relevant modules for switching the camera mode;
and if the working state indicates that the work is abnormal, resetting the camera or the related module.
Here, when the camera is in the first mode and receives an instruction for switching the camera mode, the obtained operating states of the camera and the relevant modules for switching the camera mode are known, and after the camera and/or the relevant modules work abnormally, the camera and/or the relevant modules which work abnormally are reset, so that the situation that the camera cannot be recovered into the accommodating space and is damaged due to the fact that the camera stretches out of the accommodating space is avoided.
The relevant module for switching the camera mode may include: executing an instruction for switching the camera mode, and recovering the camera; a module for acquiring the state parameters and comparing the state parameters with preset conditions; a module that generates a switching instruction of the camera mode, and the like.
In an embodiment of the present invention, on one hand, the state parameter is power information indicating a remaining power of the electronic device, so that the electronic device can timely recycle the camera before the remaining power cannot support recycling the camera according to the power information.
For example, the power information is a remaining power of the battery, and the preset condition is that the remaining power of the battery is smaller than a threshold of the recovered power. Therefore, the electronic equipment can acquire the residual battery capacity in real time under the condition that the camera is in the second mode, and can acquire the residual battery capacity and the recovery electric quantity threshold value of the preset condition, and if the residual battery capacity is smaller than the recovery electric quantity threshold value, the camera is switched to the first mode, so that the camera can be timely recovered.
However, it should be appreciated that the battery of the electronic device may age over time, and the amount of power supported by the battery may vary. If the timing for switching the camera mode is determined by adopting the above manners of the remaining battery capacity and the recovered battery capacity threshold, a large error exists. Therefore, preferably, the power information is a standby time period;
as shown in fig. 2, in step 101, the step of acquiring the state parameter of the electronic device includes:
step 201, obtaining the current remaining capacity and the aging state data of the battery of the electronic device, where the aging state data includes the charging and discharging times of the battery.
In this step, the current remaining power and the aging state data of the battery of the electronic device are acquired to execute the next step, and the standby time corresponding to the current remaining power is estimated to determine the switching time of the camera mode. The aging state data includes, but is not limited to, the number of charge and discharge times of the battery, and may further include the type of the battery, the service life, and the like.
Step 202, substituting the current remaining capacity and the aging state data of the battery into a battery state measurement model obtained in advance to obtain the standby time corresponding to the current remaining capacity.
Here, the electronic device has a battery state measurement model for determining the standby time period with respect to the remaining capacity of the battery in advance. In this step, the current remaining power and the aging state data of the battery obtained in step 201 are substituted into the battery state measurement model, so that the standby duration corresponding to the current remaining power can be obtained.
Thus, according to step 201 and step 202, the electronic device can obtain the corresponding standby time by combining the current remaining capacity and the aging state data of the battery under the condition that the camera is in the second mode, so that the accurate switching time is determined based on the standby time, the camera is switched to the first mode, and the camera is further recovered in time.
Optionally, the preset condition is that the standby time of the electronic device is less than a first preset time;
step 102, comprising:
when the obtained standby time length is less than the first preset time length, generating a first switching instruction;
and responding to the first switching instruction, driving a motor, and switching the camera to the first mode.
Thus, after the standby time length which can be supported by the remaining battery capacity is obtained through the steps 201 and 202, the standby time length is compared with a first preset time length in a preset condition in real time, and once the standby time length is smaller than the first preset time length, a first switching instruction is generated; and then responding to the first switching instruction, driving the motor, switching the camera in the second mode to the first mode, and finishing the recovery of the camera. Due to the combination of the current residual capacity and the aging state of the battery, the time for switching the modes can be more accurately determined, and the switching error is reduced.
In this embodiment, optionally, the power information is power information of a main battery of the electronic device or power information of a backup battery of the camera.
That is, when the electronic device supports mode switching of the camera by the main battery, the power information according to the switching is the power information of the main battery of the electronic device; when the electronic equipment is provided with a standby battery which is specially used for supporting the camera, the electric quantity information according to which the switching is carried out is the electric quantity information of the standby battery of the camera. Of course, in the electronic device provided with the standby battery, the standby battery can also supply power after the main battery is insufficient in electric quantity to support the switching of the camera modes.
It should also be noted that, in this embodiment, in order to ensure the stability of the battery state measurement model, optionally, before step 101, the method further includes:
substituting the battery information of the electronic equipment into a preset measurement model to determine model parameters; the battery information comprises a plurality of battery service lives and standby time corresponding to each electric quantity under different battery service lives;
and constructing a battery state measurement model according to the determined model parameters and the preset measurement model.
Through the steps, the electronic equipment substitutes battery information including the service lives of the batteries and the standby time corresponding to each electric quantity under different service lives of the batteries into the preset measurement model to optimize the model parameters, specific model parameters are determined, then the battery state measurement model used for determining the standby time is constructed according to the determined model parameters and the preset measurement model, and the output stability of the battery state measurement model is improved.
Assuming that the electronic device supports mode switching of the camera by the main battery, the battery information is obtained by collecting aging test state data of batteries of the same shipment batch and model according to the model and shipment batch of the main battery, such as [ 1 year of use, 20% of remaining power for a standby time of 1 hour ], [ 1 year of use, 10% of remaining power for a standby time of 30 minutes ], [ 2 years of use, 20% of remaining power for a standby time of 50 minutes ], and [ 5 years of use, 20% of remaining power for a standby time of 30 minutes ]. Therefore, the output of the battery state measurement model is more stable by combining the preset measurement model and the model parameters for deep optimization of the battery information.
In the embodiment of the present invention, on the other hand, the status parameter is abnormal feedback information indicating whether an abnormality exists in the electronic device.
Optionally, the electronic device queries the central processing unit CPU at a fixed period to determine whether the CPU is abnormal, so as to determine the camera mode switching timing.
Optionally, the preset condition is that the abnormal feedback information is not received within a second preset time length;
step 102, comprising:
when the abnormality feedback information is not received and a second switching instruction is generated within the second preset time after the abnormality inquiry is sent to the CPU;
and responding to the second switching instruction, driving a motor and switching the camera to the first mode.
In this way, when the inquiry information is sent to the CPU in a fixed period and the corresponding abnormal feedback information is not received in a second preset time period, a second switching instruction is generated; and then responding to the second switching instruction, driving the motor, switching the camera in the second mode to the first mode, and completing the recovery of the camera in time under the condition that the CPU is abnormal, thereby reducing the damage of the camera.
In addition, in a scenario where the camera cannot be recovered due to an abnormality of the electronic device, except that the CPU cannot send the abnormality feedback information for the abnormality inquiry within the second preset time period, the CPU may also send the abnormality feedback information, but the abnormality feedback information indicates that the electronic device is abnormal, at this time, a switching instruction is also generated, so that the electronic device responds to the switching instruction, and the motor is driven to switch the camera to the first mode.
In summary, in the mode switching method for the camera according to the embodiment of the present invention, when the camera is in the second mode, the state parameter of the camera is obtained, where the state parameter includes the electric quantity information and/or the abnormal feedback information indicating whether the electronic device is abnormal, and then the application scene of the camera is further known by the state information, so that the camera is switched to the first mode in time when the state parameter meets the preset condition, so that a part of the structure of the camera located outside the accommodating space is recovered into the accommodating space, and damage caused by the fact that the camera cannot be normally recovered is avoided.
FIG. 3 is a block diagram of an electronic device of one embodiment of the invention. At least one camera of the electronic device 300 shown in fig. 3 is provided with a first mode and a second mode, wherein the camera in the first mode is accommodated in an accommodating space in the electronic device, at least a part of the structure of the camera in the second mode is located outside the accommodating space, and the electronic device 300 includes a first obtaining module 301 and a switching module 302.
A first obtaining module 301, configured to obtain a state parameter of the electronic device when the camera is in the second mode;
a switching module 302, configured to switch the camera to the first mode when the state parameter meets a preset condition; wherein the content of the first and second substances,
the state parameters comprise electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used for indicating whether the electronic equipment is abnormal or not.
On the basis of fig. 3, optionally, as shown in fig. 4, the electronic device 300 further includes:
a second obtaining module 303, configured to obtain, when the camera is in the first mode and an instruction for switching the camera mode is received, working states of the camera and a related module for switching the camera mode;
and the processing module 304 is configured to perform reset and reset processing on the camera or the related module if the working state indicates that the working is abnormal.
On the basis of fig. 3, optionally, as shown in fig. 5, the power information is a standby duration;
the first obtaining module 301 includes:
the obtaining submodule 3011 is configured to obtain current remaining power and aging state data of a battery of the electronic device, where the aging state data includes the number of times of charging and discharging the battery;
the processing submodule 3012 is configured to substitute the current remaining power and the aging state data of the battery into a battery state measurement model obtained in advance, so as to obtain a standby duration corresponding to the current remaining power.
Optionally, the preset condition is that the standby time of the electronic device is less than a first preset time;
the switching module 302 includes:
a first generating submodule 3021, configured to generate a first switching instruction when the obtained standby duration is less than the first preset duration;
a first switching submodule 3022, configured to drive a motor in response to the first switching instruction, and switch the camera to the first mode.
Optionally, the power information is power information of a main battery of the electronic device or power information of a backup battery of the camera.
Optionally, the electronic device 300 further includes:
a determining module 305, configured to substitute battery information of the electronic device into a preset measurement model to determine a model parameter; the battery information comprises a plurality of battery service lives and standby time corresponding to each electric quantity under different battery service lives;
a building module 306, configured to build a battery state measurement model according to the determined model parameters and the preset measurement model.
On the basis of fig. 3, optionally, as shown in fig. 6, the preset condition is that the abnormal feedback information is not received within a second preset time period;
the switching module 302 includes:
the second generating submodule 3023 is configured to generate a second switching instruction when the abnormality feedback information is not received within the second preset duration after the abnormality inquiry is sent to the CPU;
a second switching submodule 3024, configured to drive a motor in response to the second switching instruction, and switch the camera to the first mode.
The electronic device 300 can implement each process implemented by the electronic device in the method embodiments of fig. 1 and fig. 2, and is not described here again to avoid repetition. According to the electronic equipment provided by the embodiment of the invention, the state parameter of the camera is acquired under the condition that the camera is in the second mode, the state parameter is the electric quantity information indicating the residual electric quantity of the electronic equipment or the abnormal feedback information indicating the abnormality of the CPU of the electronic equipment, and the application scene of the camera is further known by the state parameter, so that the camera is switched to the first mode in time under the condition that the state parameter meets the preset condition, the part of the structure of the camera, which is positioned outside the accommodating space, is recycled into the accommodating space, and the damage caused by the fact that the camera cannot be normally recycled is avoided.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device 700 for implementing various embodiments of the present invention, where the electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, a power supply 711, and a camera 712. The camera 712 is provided with a first mode and a second mode, the camera in the first mode is accommodated in the accommodating space in the electronic device, and at least part of the structure of the camera in the second mode is located outside the accommodating space. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 7 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 710 is configured to obtain a state parameter of the electronic device when the camera is in the second mode; under the condition that the state parameters meet preset conditions, switching the camera to the first mode; the state parameter is electric quantity information, and the electric quantity information is used for indicating the residual electric quantity of the electronic equipment; or the state parameter is abnormal feedback information which is used for indicating that a Central Processing Unit (CPU) of the electronic equipment is abnormal.
It is thus clear that this electronic equipment is through under the condition that the camera is in the second mode, acquire its state parameter, and this state parameter includes electric quantity information and/or unusual feedback information, and this unusual feedback information is used for instructing whether electronic equipment exists unusually, then further know the application scene of camera by this state information, thereby under the condition that state parameter satisfies the default condition, in time switch this camera to first mode, make the camera be located partial structure outside the accommodation space and retrieve to the accommodation space in, avoid the damage that the camera can't normally retrieve the emergence.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 710; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 701 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 701 may also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 702, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output related to a specific function performed by the electronic apparatus 700 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used to receive audio or video signals. The input Unit 704 may include a Graphics Processing Unit (GPU) 7041 and a microphone 7042, and the Graphics processor 7041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 706. The image frames processed by the graphic processor 7041 may be stored in the memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 701 in case of a phone call mode.
The electronic device 700 also includes at least one sensor 705, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 7061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7061 and/or a backlight when the electronic device 700 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 705 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 706 is used to display information input by the user or information provided to the user. The Display unit 706 may include a Display panel 7061, and the Display panel 7061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 707 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 7071 (e.g., operations by a user on or near the touch panel 7071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 7071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 710, receives a command from the processor 710, and executes the command. In addition, the touch panel 7071 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, the other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 7071 may be overlaid on the display panel 7061, and when the touch panel 7071 detects a touch operation on or near the touch panel 7071, the touch operation is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Although the touch panel 7071 and the display panel 7061 are shown in fig. 7 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 7071 and the display panel 7061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 708 is an interface for connecting an external device to the electronic apparatus 700. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device 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 708 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 700 or may be used to transmit data between the electronic apparatus 700 and the external device.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 709 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 710 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 709 and calling data stored in the memory 709, thereby monitoring the whole electronic device. Processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 710.
The electronic device 700 may also include a power supply 711 (e.g., a battery) for providing power to the various components, and preferably, the power supply 711 may be logically coupled to the processor 710 via a power management system, such that functions of managing charging, discharging, and power consumption may be performed via the power management system.
In addition, the electronic device 700 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when being executed by the processor, the computer program implements each process of the embodiment of the method for switching modes of a camera, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the method for switching modes of a camera, and can achieve the same technical effect, and in order to avoid repetition, the detailed description is omitted here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A mode switching method of a camera is applied to an electronic device, at least one camera of the electronic device is provided with a first mode and a second mode, wherein the camera in the first mode is accommodated in an accommodating space in the electronic device, and at least part of the structure of the camera in the second mode is positioned outside the accommodating space, and the method comprises the following steps:
acquiring state parameters of the electronic equipment under the condition that the camera is in the second mode;
under the condition that the state parameters meet preset conditions, switching the camera to the first mode;
the state parameters comprise electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used for indicating whether the electronic equipment is abnormal or not; the preset condition is the camera emergency recovery condition preset aiming at the state parameter and used for judging the scene that the camera needs emergency recovery;
the power information indicates the remaining power of the electronic equipment; the abnormal feedback information is abnormal feedback information indicating whether the CPU of the electronic equipment is abnormal or not;
the electric quantity information is battery residual electric quantity, when the battery residual electric quantity is smaller than a recovery electric quantity threshold value, or the electric quantity information is standby time length, when the standby time length of the electronic equipment is smaller than a first preset time length, a preset condition of emergency recovery of the camera is met, and the camera is switched to the first mode; and/or
When the abnormal feedback information is not received within a second preset time after the abnormal inquiry is sent to the CPU, or the CPU sends the abnormal feedback information to indicate that the electronic equipment is abnormal, the preset condition of the emergency recovery of the camera is met, and the camera is switched to the first mode.
2. The method for switching modes of a camera according to claim 1, wherein after the step of acquiring the state parameters of the electronic device, the method further comprises:
when the camera is in the first mode and an instruction for switching the camera mode is received, acquiring the working states of the camera and relevant modules for switching the camera mode;
and if the working state indicates that the work is abnormal, resetting the camera or the related module.
3. The mode switching method for the camera according to claim 1, wherein the power information is a standby duration;
the step of obtaining the state parameter of the electronic device includes:
acquiring the current residual capacity and aging state data of a battery of the electronic equipment, wherein the aging state data comprises the charging and discharging times of the battery;
and substituting the current residual electric quantity and the aging state data of the battery into a battery state measurement model obtained in advance to obtain the standby time corresponding to the current residual electric quantity.
4. The method for switching modes of a camera according to claim 3, wherein the preset condition is that a standby time of the electronic device is less than a first preset time;
the step of switching the camera to the first mode when the state parameter satisfies a preset condition includes:
when the obtained standby time length is less than the first preset time length, generating a first switching instruction;
and responding to the first switching instruction, driving a motor, and switching the camera to the first mode.
5. The method for switching modes of a camera according to claim 1, wherein the power information is power information of a main battery of the electronic device or power information of a backup battery of the camera.
6. The method for switching modes of a camera according to claim 1, further comprising, before the step of obtaining the state parameters of the electronic device:
substituting the battery information of the electronic equipment into a preset measurement model to determine model parameters; the battery information comprises a plurality of battery service lives and standby time corresponding to each electric quantity under different battery service lives;
and constructing a battery state measurement model according to the determined model parameters and the preset measurement model.
7. The method for switching modes of a camera according to claim 1, wherein the preset condition is that the abnormal feedback information is not received within a second preset time period;
the step of switching the camera to the first mode when the state parameter satisfies a preset condition includes:
generating a second switching instruction when the abnormality feedback information is not received within the second preset time after the abnormality inquiry is sent to the CPU;
and responding to the second switching instruction, driving a motor and switching the camera to the first mode.
8. An electronic device, at least a camera of the electronic device is provided with a first mode and a second mode, wherein the camera in the first mode is accommodated in an accommodating space in the electronic device, and at least a part of the structure of the camera in the second mode is located outside the accommodating space, the electronic device comprising:
the first acquisition module is used for acquiring the state parameters of the electronic equipment under the condition that the camera is in the second mode;
the switching module is used for switching the camera to the first mode under the condition that the state parameters meet preset conditions;
the state parameters comprise electric quantity information and/or abnormal feedback information, and the abnormal feedback information is used for indicating whether the electronic equipment is abnormal or not; the preset condition is the camera emergency recovery condition preset aiming at the state parameter and used for judging the scene that the camera needs emergency recovery;
the power information indicates the remaining power of the electronic equipment; the abnormal feedback information is abnormal feedback information indicating whether the CPU of the electronic equipment is abnormal or not;
the electric quantity information is battery residual electric quantity, when the battery residual electric quantity is smaller than a recovery electric quantity threshold value, or the electric quantity information is standby time length, when the standby time length of the electronic equipment is smaller than a first preset time length, a preset condition of emergency recovery of the camera is met, and the camera is switched to the first mode; and/or
When the abnormal feedback information is not received within a second preset time after the abnormal inquiry is sent to the CPU, or the CPU sends the abnormal feedback information to indicate that the electronic equipment is abnormal, the preset condition of the emergency recovery of the camera is met, and the camera is switched to the first mode.
9. The electronic device of claim 8, further comprising:
the second acquisition module is used for acquiring the working states of the camera and relevant modules for switching the camera mode when the camera is in the first mode and an instruction for switching the camera mode is received;
and the processing module is used for resetting the camera or the related module if the working state indicates abnormal working.
10. The electronic device of claim 8, wherein the power information is a standby duration;
the first obtaining module comprises:
the obtaining submodule is used for obtaining the current residual capacity and the aging state data of a battery of the electronic equipment, and the aging state data comprises the charging and discharging times of the battery;
and the processing submodule is used for substituting the current residual electric quantity and the aging state data of the battery into a battery state measurement model which is obtained in advance to obtain the standby time corresponding to the current residual electric quantity.
11. The electronic device according to claim 10, wherein the preset condition is that a standby time of the electronic device is less than a first preset time;
the switching module includes:
the first generation submodule is used for generating a first switching instruction when the obtained standby time length is less than the first preset time length;
and the first switching submodule is used for responding to the first switching instruction, driving a motor and switching the camera to the first mode.
12. An electronic device, comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the mode switching method of the camera head according to any one of claims 1 to 7.
CN201810762962.9A 2018-07-12 2018-07-12 Mode switching method of camera and electronic equipment Active CN108810284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810762962.9A CN108810284B (en) 2018-07-12 2018-07-12 Mode switching method of camera and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810762962.9A CN108810284B (en) 2018-07-12 2018-07-12 Mode switching method of camera and electronic equipment

Publications (2)

Publication Number Publication Date
CN108810284A CN108810284A (en) 2018-11-13
CN108810284B true CN108810284B (en) 2021-01-29

Family

ID=64074961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810762962.9A Active CN108810284B (en) 2018-07-12 2018-07-12 Mode switching method of camera and electronic equipment

Country Status (1)

Country Link
CN (1) CN108810284B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417966B (en) * 2019-07-25 2021-10-19 RealMe重庆移动通信有限公司 Terminal control method, device, mobile terminal and storage medium
CN112597899A (en) * 2020-12-24 2021-04-02 北京市商汤科技开发有限公司 Behavior state detection method and device, electronic equipment and storage medium
CN113687636B (en) * 2021-08-23 2022-11-08 明度智云(浙江)科技有限公司 Equipment management method, system and storage medium for industrial production

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014152855A2 (en) * 2013-03-14 2014-09-25 Geerds Joergen Camera system
US9870027B2 (en) * 2013-05-31 2018-01-16 Hewlett-Packard Development Company, L.P. Mass storage device operation
CN104580864B (en) * 2015-01-21 2017-11-14 广东欧珀移动通信有限公司 Camera repositioning method and device
US9870024B2 (en) * 2015-10-30 2018-01-16 Essential Products, Inc. Camera integrated into a display
US9762781B2 (en) * 2015-10-30 2017-09-12 Essential Products, Inc. Apparatus and method to maximize the display area of a mobile device by increasing the size of the display without necessarily increasing the size of the phone
CN106094990A (en) * 2016-06-12 2016-11-09 张帆 The screen maximized electronic equipment of accounting and using method thereof
CN106817540A (en) * 2016-12-30 2017-06-09 广东欧珀移动通信有限公司 A kind of camera control method and equipment
CN106993125B (en) * 2017-05-23 2019-04-12 维沃移动通信有限公司 A kind of terminal device

Also Published As

Publication number Publication date
CN108810284A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN109343759B (en) Screen-turning display control method and terminal
CN107832689B (en) Fingerprint identification method and mobile terminal
CN110838748B (en) Electronic equipment and charging control system thereof
CN109560591B (en) Charging method, device and terminal
CN108810284B (en) Mode switching method of camera and electronic equipment
CN110784915B (en) Power consumption control method of electronic equipment and electronic equipment
CN108984066B (en) Application icon display method and mobile terminal
CN110933494A (en) Picture sharing method and electronic equipment
CN108170310B (en) Touch screen control method and mobile terminal
CN108089935B (en) Application program management method and mobile terminal
CN108388400B (en) Operation processing method and mobile terminal
CN110868683B (en) Ultrasonic module failure detection method and electronic equipment
CN210894629U (en) Electric meter assembly and electronic equipment
CN109947323B (en) Terminal display method and terminal
CN109067429B (en) Control method and terminal equipment
CN108874111B (en) Battery over-discharge protection control method and mobile terminal
CN108228357B (en) Memory cleaning method and mobile terminal
CN107769324B (en) Charging method, charger, mobile terminal and server
CN110764650A (en) Key trigger detection method and electronic equipment
CN110995816B (en) Sharing method and electronic device
CN111045588B (en) Information viewing method and electronic equipment
CN109783379B (en) Script execution exception determining method and device
CN109164948B (en) Touch screen electrostatic capacitance supplementing device and method and mobile terminal
CN108668005B (en) Terminal detection method and terminal
CN109828652B (en) Control method of power consumption mode and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant