CN110109529B - SD card power supply control method and device, storage medium and electronic equipment - Google Patents

SD card power supply control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110109529B
CN110109529B CN201910322277.9A CN201910322277A CN110109529B CN 110109529 B CN110109529 B CN 110109529B CN 201910322277 A CN201910322277 A CN 201910322277A CN 110109529 B CN110109529 B CN 110109529B
Authority
CN
China
Prior art keywords
card
power supply
power
mobile terminal
request
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
CN201910322277.9A
Other languages
Chinese (zh)
Other versions
CN110109529A (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.)
Xiamen Jiupin Sesame Information Technology Co ltd
Original Assignee
Huizhou TCL 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201910322277.9A priority Critical patent/CN110109529B/en
Publication of CN110109529A publication Critical patent/CN110109529A/en
Application granted granted Critical
Publication of CN110109529B publication Critical patent/CN110109529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Telephone Function (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the application discloses a method and a device for controlling power supply of an SD card, a storage medium and electronic equipment, wherein the embodiment of the application judges whether the SD card needs to be supplied with power or not according to a preset access request; if power needs to be supplied to the SD card and the SD card is in a power-off state, the power supply to the SD card is started; and if the power supply to the SD card is not needed and the SD card is in a power supply state, cutting off the power supply to the SD card. The embodiment of the application can reduce the power consumption of the SD card to the mobile terminal.

Description

SD card power supply control method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of mobile terminals, in particular to a power supply control method and device for an SD card, a storage medium and electronic equipment.
Background
In the prior art, a mobile terminal such as a mobile phone, a camera, a tablet computer, etc. often uses an SD (secure digital memory) Card to expand a memory because of limited storage capacity, so when the mobile terminal uses an external SD Card, a hot plug detection function of the external SD Card is added for user convenience, that is, when the SD Card is inserted into the mobile terminal, the mobile terminal starts the external SD Card to supply power, and when the SD Card is pulled out of the mobile terminal, the mobile terminal stops the external SD Card to supply power. However, in actual use, although the SD card is installed in the mobile terminal, the SD card is not always in a read-write state, but the installed SD card is in a power supply state as long as the terminal is started, and the SD card consumes power of the mobile terminal regardless of whether the mobile terminal accesses the SD card, which results in excessive power consumption of the SD card on the mobile terminal.
Disclosure of Invention
The embodiment of the application provides a power supply control method and device for an SD card, a storage medium and electronic equipment, which can reduce the power consumption of the SD card on a mobile terminal.
In a first aspect, an embodiment of the present application provides a power supply control method for an SD card, including:
judging whether power needs to be supplied to the SD card or not according to a preset access request;
if power needs to be supplied to the SD card and the SD card is in a power-off state, the power supply to the SD card is started;
and if the power supply to the SD card is not needed and the SD card is in a power supply state, cutting off the power supply to the SD card.
In a second aspect, an embodiment of the present application provides an SD card power supply control device, including:
the state judgment module is used for judging whether power needs to be supplied to the SD card or not according to a preset access request, wherein the preset access request comprises read-write operation;
the power supply control module is used for starting power supply to the SD card when the SD card needs to be supplied with power and is in a power-off state;
and cutting off power supply to the SD card if the SD card is in a power supply state without supplying power to the SD card.
In a third aspect, a storage medium is provided in this application, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the SD card power supply control method provided in any embodiment of this application.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory has a computer program, and the processor is configured to execute the SD card power supply control method provided in any embodiment of the present application by calling the computer program.
According to the technical scheme, whether the SD card needs to be powered or not is judged according to the preset access request, if the SD card needs to be powered and is in the power-off state, the power supply to the SD card is started, and if the SD card does not need to be powered and is in the power-off state, the power supply to the SD card is cut off, so that the mobile terminal is prevented from still supplying power to the SD card under the condition that the SD card is not accessed, and the power consumption of the SD card to the mobile terminal is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a power supply control method for an SD card according to an embodiment of the present disclosure.
Fig. 2 is a schematic flowchart of a second power supply control method for an SD card according to an embodiment of the present application.
Fig. 3 is a third flowchart illustrating a power supply control method for an SD card according to an embodiment of the present application.
Fig. 4 is a schematic diagram illustrating a connection between an SD card and a mobile terminal in the SD card power supply control method according to the embodiment of the present application.
Fig. 5 is a schematic structural diagram of an SD card power supply control device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 7 is a second structural schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
An execution main body of the SD card power supply control method may be the SD card power supply control device provided in the embodiment of the present application, or an electronic device integrated with the SD card power supply control device, where the SD card power supply control device may be implemented in a hardware or software manner. The electronic device may be a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer.
Referring to fig. 1, fig. 1 is a first flowchart illustrating a power supply control method for an SD card according to an embodiment of the present disclosure. The specific process of the SD card power supply control method provided in the embodiment of the present application may be as follows:
step 101, judging whether power needs to be supplied to the SD card according to a preset access request.
And 102, if power needs to be supplied to the SD card and the SD card is in a power-off state, starting the power supply to the SD card.
And 103, cutting off the power supply to the SD card if the SD card is not required to be supplied with power and is in a power supply state.
In the embodiment of the application, the mobile terminal comprises a mobile phone, a tablet computer, a digital camera and other terminals which can be provided with an SD card to expand storage. According to the scheme, the requirement condition of the SD card installed in the mobile terminal on power supply is detected, and when the power supply is not needed, the power supply to the SD card is cut off.
The SD card is arranged behind the card slot of the mobile terminal, the SD card can be connected with an internal circuit of the mobile terminal through the card slot, and the mobile terminal supplies power to the SD card to maintain normal operation of the SD card. The method comprises the steps that under the condition that the mobile terminal needs to access the SD card, the mobile terminal needs to supply power to the SD card, and the preset access request comprises but is not limited to read-write operation of the mobile terminal pointing to the SD card. For example, when the mobile terminal needs to write data into or read data from the SD card, the SD card needs to be in a power supply state in order to ensure normal read/write operations. When the mobile terminal and the SD card do not have any data communication, the SD card does not need to be continuously supplied with power, and at the moment, the power supply to the SD card can be cut off through a power supply control circuit on the mobile terminal.
Fig. 2 is a schematic flow chart of a power supply control method for an SD card according to an embodiment of the present application.
In some embodiments, the step 101 of determining whether power needs to be supplied to the SD card according to a preset access request includes:
step 1011, detecting whether an access request pointing to the SD card exists, wherein if an access request pointing to the SD card is detected, it is determined that power needs to be supplied to the SD card, and if an access request pointing to the SD card is detected to be completed, it is determined that power does not need to be supplied to the SD card.
The mobile terminal detects an access request on the mobile terminal in real time or in a timing mode, when the access request pointing to the SD card is detected, the SD card is judged to need to be supplied with power, at the moment, if the SD card is in a power-off state, the power supply to the SD card is started, and if the SD card is already in a power supply state, the access request can be directly carried out. In addition, when the mobile terminal detects that the access request pointing to the SD card is finished and the power supply to the SD card is not required to be continuously supplied, the power supply to the SD card is cut off, the power consumption of the SD card to the mobile terminal is reduced, the battery consumption of the mobile terminal is reduced, and the service life is prolonged.
Further, the SD card internally includes a main controller and a storage module, and in addition to the above-mentioned need to supply power to the SD card when the mobile terminal accesses the SD card, the power needs to be supplied to the SD card by the mobile terminal when the main controller inside the SD card needs to perform some data processing operations.
Fig. 3 is a schematic diagram illustrating a third flow of the SD card power supply control method according to the embodiment of the present application. In an optional embodiment, after the step of cutting off power supply to the SD card, the method further includes:
104, when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals;
105, if a power supply starting request sent by the SD card is not received within a preset time length after the SD card is started to be powered on, cutting off the power supply to the SD card;
and 106, if a power supply starting request sent by the SD card is received within a preset time after the SD card is started to supply power, maintaining the power supply state until a power supply closing request sent by the SD card is received.
In this case, if the main controller of the SD card needs to perform some data processing operations, the SD card cannot be powered on, and therefore, when the SD card is in a power-off state, the mobile terminal supplies power to the SD card for a short time at preset time intervals, so that the SD card can determine whether to send a power supply start request to the mobile terminal within the short time. The preset time interval and the preset time duration can be set according to actual needs, for example, the preset time interval takes values within 2-30 minutes, the preset time duration is 2-10 seconds, for example, every 10 minutes, the mobile terminal supplies power to the SD card for 10 seconds, within the 10 seconds, if a main controller in the SD card determines that data processing operation needs to be performed, a power supply starting request is sent to the mobile terminal, and when the mobile terminal receives the power supply starting request within the 10 seconds, the power supply state is maintained; the SD card performs data processing operation, and after the data processing is completed, a power supply closing request is sent to the mobile terminal, and at the moment, the mobile terminal can cut off the power supply to the SD card.
The SD card may determine whether the data processing operation is completed by marking the data processing operation, for example, the flag is set to 1 when the data processing operation is started, and the flag is set to 0 when the operation is completed. If the SD card is powered down in the data processing process. After powering on again, the SD card detects that there is a data processing operation marked as 1, determines that the data operation is in an incomplete state, and needs to continue to execute the data processing operation, and at this time, may send a power-on request to the mobile terminal to maintain a power supply state.
The SD card is configured in the following mode according to the power on request and the power off request: identifying the type of the SD card when the connection with the SD card is detected; acquiring power supply request data matched with the type of the SD card; sending the power request data to the SD card, the power request data being used to configure the SD card as: when the data processing operation needs to be executed, a power supply turn-on request is sent to the mobile terminal, and when the data processing operation is finished, a power supply turn-off request is sent to the mobile terminal.
Specifically, a data communication interface is arranged between the mobile terminal and the SD card, when the mobile terminal is connected with the SD card or when the mobile terminal is initially connected with the SD card, after the type of the SD card is identified, power supply request data matched with the type of the SD card is obtained, the power supply request data is sent to the SD card through the data communication interface, and the SD card is configured to initiate a power supply starting request to the mobile terminal through the data communication interface.
Referring to fig. 4, a schematic diagram of connection between an SD card and a mobile terminal in the SD card power supply control method provided in the embodiment of the present application is shown. And monitoring the level of a preset pin in real time, wherein when the level of the preset pin is detected to be a low level, connection with the SD card is judged to be established, and when the level of the preset pin is detected to be a high level, connection with the SD card is judged to be disconnected.
The clamping groove of the mobile terminal is provided with a metal elastic sheet, a preset pin connected with the metal elastic sheet and a pull-up resistor connected between the power supply circuit and the preset pin. The preset pin is used for detecting whether the mobile terminal is connected with the SD card or not. When the SD card is inserted into the card slot, the metal elastic sheet is grounded, the preset pin is at a low level, the mobile terminal is judged to be connected with the SD card, and when the SD card is not inserted into the card slot, the preset pin is connected with a pull-up resistor, and the mobile terminal is judged to be disconnected with the SD card when the preset pin is detected to be at a high level.
In addition, the SD card chip may define power request data by its manufacturer, and after recognizing the type of the SD card, the mobile terminal may obtain the power request data from a network corresponding to the SD card according to the recognized type. Or, configuring power request data of multiple types of SD cards on the mobile terminal in advance, and searching the power request data matched with the identified type of the SD card from the preconfigured data when the type of the SD card is identified.
Further, when the mobile terminal receives a power supply closing request sent by the SD card, the step of judging whether power needs to be supplied to the SD card or not according to a preset access request is returned to be executed. During the period of time that the mobile terminal supplies power to the SD card after the SD card sends a power-on request to the mobile terminal, there is a possibility that the mobile terminal will access the SD card. That is, after the SD card completes the internal data processing operation and transmits a power off request to the mobile terminal, there is a possibility that the mobile terminal has an access request to the SD card at this time, and therefore, after the mobile terminal receives the power off request transmitted by the SD card, the process returns to step S101, and if it is determined that the mobile terminal does not need to supply power to the SD card and the SD card is in a power supply state at this time, the power supply to the SD card is cut off.
Further, in some embodiments, after the step of cutting off power to the SD card, the method further comprises:
when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals;
if the power control request sent by the SD card is not received within the preset time after the power supply to the SD card is started, the power supply to the SD card is cut off;
and if the power control request sent by the SD card is received within the preset time after the power supply of the SD card is started, maintaining the power supply state until the power control request sent by the SD card is received again.
After establishing connection with the SD card, the mobile terminal sends power supply request data to the SD card, wherein the power supply request data is used for configuring the SD card as follows: and when the data processing operation needs to be executed or is finished, sending a power supply control request to the mobile terminal. The SD card realizes the request of turning on or turning off the power supply to the mobile terminal through a power supply control request.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, the SD card power supply control method provided in the embodiment of the present application determines whether power needs to be supplied to the SD card according to an access request on the mobile terminal, and if it is determined that power needs to be supplied to the SD card and the SD card is in a power-off state, the power supply to the SD card is turned on, and if it is determined that power does not need to be supplied to the SD card and the SD card is in a power-supply state, the power supply to the SD card is cut off, thereby preventing the mobile terminal from still supplying power to the SD card without accessing the SD card, and reducing power consumption of the SD card to the mobile terminal.
In one embodiment, the power supply control device for the SD card is further provided. Referring to fig. 5, fig. 5 is a schematic structural diagram of an SD card power supply control device 400 according to an embodiment of the present disclosure. The SD card power supply control device 400 is applied to an electronic device, and the SD card power supply control device 400 includes a state determination module 401 and a power supply control module 402, as follows:
a state judgment module 401, configured to judge whether power needs to be supplied to the SD card according to a preset access request;
a power control module 402, configured to start power supply to the SD card if power needs to be supplied to the SD card and the SD card is in a power-off state;
and cutting off power supply to the SD card if the SD card is in a power supply state without supplying power to the SD card.
In the embodiment of the application, the mobile terminal comprises a mobile phone, a tablet computer, a digital camera and other terminals which can be provided with an SD card to expand storage. According to the scheme, the requirement condition of the SD card installed in the mobile terminal on power supply is detected, and when the power supply is not needed, the power supply to the SD card is cut off.
The SD card is arranged behind the card slot of the mobile terminal, the SD card can be connected with an internal circuit of the mobile terminal through the card slot, and the mobile terminal supplies power to the SD card to maintain normal operation of the SD card. The method comprises the steps that under the condition that the mobile terminal needs to access the SD card, the mobile terminal needs to supply power to the SD card, and the preset access request comprises but is not limited to read-write operation of the mobile terminal pointing to the SD card. For example, when the mobile terminal needs to write data into or read data from the SD card, the SD card needs to be in a power supply state in order to ensure normal read/write operations. When the mobile terminal and the SD card do not have any data communication, the SD card does not need to be continuously supplied with power, and at the moment, the power supply to the SD card can be cut off through a power supply control circuit on the mobile terminal.
In some embodiments, the state determination module 401 is further configured to: and detecting whether an access request pointing to the SD card exists, wherein if the access request pointing to the SD card is detected, the power supply to the SD card is determined to be needed, and if the access request pointing to the SD card is detected to be completed, the power supply to the SD card is determined not to be needed.
The state determination module 401 detects an access request on the mobile terminal in real time or in a timing manner, when an access request pointing to the SD card is detected, it is determined that power needs to be supplied to the SD card, at this time, if the SD card is in a power-off state, the power control module 402 starts power supply to the SD card, and if the SD card is already in a power-supply state, the access request can be directly performed. In addition, when the state determination module 401 detects that the access request directed to the SD card is completed and the SD card does not need to be continuously supplied with power, the power control module 402 cuts off power supply to the SD card, thereby reducing power consumption of the SD card on the mobile terminal, reducing battery consumption of the mobile terminal, and prolonging service life.
Further, the SD card internally includes a main controller and a storage module, and in addition to the above-mentioned need to supply power to the SD card when the mobile terminal accesses the SD card, the power needs to be supplied to the SD card by the mobile terminal when the main controller inside the SD card needs to perform some data processing operations.
In an alternative embodiment, the power control module 402 is further configured to: when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals; if the power supply starting request sent by the SD card is not received within the preset time length after the power supply to the SD card is started, the power supply to the SD card is cut off; and if a power supply starting request sent by the SD card is received within a preset time after the SD card is started to supply power, maintaining the power supply state until the power supply closing request sent by the SD card is received.
When the mobile terminal does not have an access request pointing to the SD card, the power control module 402 may cut off power supply to the SD card, and in this case, if the main controller of the SD card needs to perform some data processing operations, it may be impossible to perform the data processing operations. The preset time interval and the preset time duration can be set according to actual needs, for example, the preset time interval takes values within 2-30 minutes, the preset time duration is 2-10 seconds, for example, every 10 minutes, the mobile terminal supplies power to the SD card for 10 seconds, within the 10 seconds, if a main controller in the SD card determines that data processing operation needs to be performed, a power supply starting request is sent to the mobile terminal, and when the mobile terminal receives the power supply starting request within the 10 seconds, the power supply state is maintained; the SD card performs data processing operation, and after the data processing is completed, a power supply closing request is sent to the mobile terminal, and at the moment, the mobile terminal can cut off the power supply to the SD card.
The SD card may determine whether the data processing operation is completed by marking the data processing operation, for example, the flag is set to 1 when the data processing operation is started, and the flag is set to 0 when the operation is completed. If the SD card is powered down in the data processing process. After powering on again, the SD card detects that there is a data processing operation marked as 1, determines that the data operation is in an incomplete state, and needs to continue to execute the data processing operation, and at this time, may send a power-on request to the mobile terminal to maintain a power supply state.
Among them, the power-on request and the power-off request are configured in the SD card in the following manner. The SD card power supply control device 400 further includes a data configuration module for: identifying the type of the SD card when the connection with the SD card is detected; acquiring power supply request data matched with the type of the SD card; sending the power request data to the SD card, the power request data being used to configure the SD card as: when the data processing operation needs to be executed, a power supply turn-on request is sent to the mobile terminal, and when the data processing operation is finished, a power supply turn-off request is sent to the mobile terminal.
Specifically, a data communication interface is arranged between the mobile terminal and the SD card, when the mobile terminal is connected with the SD card or when the mobile terminal is initially connected with the SD card, after the data configuration module identifies the type of the SD card, power supply request data matched with the type of the SD card is acquired, the power supply request data is sent to the SD card through the data communication interface, and the SD card is configured to initiate a power supply opening request to the mobile terminal through the data communication interface.
Referring to fig. 4, a schematic diagram of connection between an SD card and a mobile terminal in the SD card power supply control method provided in the embodiment of the present application is shown. And monitoring the level of a preset pin in real time, wherein when the level of the preset pin is detected to be a low level, connection with the SD card is judged to be established, and when the level of the preset pin is detected to be a high level, connection with the SD card is judged to be disconnected.
The clamping groove of the mobile terminal is provided with a metal elastic sheet, a preset pin connected with the metal elastic sheet and a pull-up resistor connected between the power supply circuit and the preset pin. The preset pin is used for detecting whether the mobile terminal is connected with the SD card or not. When the SD card is inserted into the card slot, the metal elastic sheet is grounded, the preset pin is at a low level, the mobile terminal is judged to be connected with the SD card, and when the SD card is not inserted into the card slot, the preset pin is connected with a pull-up resistor, and the mobile terminal is judged to be disconnected with the SD card when the preset pin is detected to be at a high level.
In addition, the SD card chip may define power request data by its manufacturer, and after recognizing the type of the SD card, the mobile terminal may obtain the power request data from a network corresponding to the SD card according to the recognized type. Or, configuring power request data of multiple types of SD cards on the mobile terminal in advance, and searching the power request data matched with the identified type of the SD card from the preconfigured data when the type of the SD card is identified.
Further, when the mobile terminal receives a power-off request sent by the SD card, the state determination module 401 determines whether power needs to be supplied to the SD card according to a preset access request. During the period of time that the mobile terminal supplies power to the SD card after the SD card sends a power-on request to the mobile terminal, there is a possibility that the mobile terminal will access the SD card. That is to say, after the SD card completes internal data processing operations and sends a power shutdown request to the mobile terminal, there may be an access request directed to the SD card at this time for the mobile terminal, therefore, after the mobile terminal receives the power shutdown request sent by the SD card, the state determination module 401 determines whether power needs to be supplied to the SD card according to a preset access request, and if it is determined that power is not needed to be supplied to the SD card by the mobile terminal and the SD card is in a power supply state at this time, power supply to the SD card is cut off.
Further, in some embodiments, the power control module 402 is further configured to: when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals; if the power control request sent by the SD card is not received within the preset time after the power supply to the SD card is started, the power supply to the SD card is cut off; and if the power control request sent by the SD card is received within the preset time after the power supply of the SD card is started, maintaining the power supply state until the power control request sent by the SD card is received again.
After the mobile terminal is connected with the SD card, the data configuration module sends power request data to the SD card, and the power request data is used for configuring the SD card as follows: and when the data processing operation needs to be executed or is finished, sending a power supply control request to the mobile terminal. The SD card realizes the request of turning on or turning off the power supply to the mobile terminal through a power supply control request.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the SD card power supply control device provided in the embodiment of the present application determines whether power needs to be supplied to the SD card according to an access request on the mobile terminal, and if it is determined that power needs to be supplied to the SD card and the SD card is in a power-off state, the power supply to the SD card is turned on, and if it is determined that power does not need to be supplied to the SD card and the SD card is in a power-supply state, the power supply to the SD card is cut off, so that the mobile terminal is prevented from still supplying power to the SD card without accessing the SD card, and power consumption of the SD card to the mobile terminal is reduced.
The embodiment of the application also provides the electronic equipment. The electronic device can be a smart phone, a tablet computer and the like. As shown in fig. 6, fig. 6 is a first schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 300 comprises a processor 301 and a memory 302. The processor 301 is electrically connected to the memory 302.
The processor 301 is a control center of the electronic device 300, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or calling a computer program stored in the memory 302 and calling data stored in the memory 302, thereby performing overall monitoring of the electronic device.
In this embodiment, the processor 301 in the electronic device 300 loads instructions corresponding to one or more processes of the computer program into the memory 302 according to the following steps, and the processor 301 runs the computer program stored in the memory 302, so as to implement various functions:
judging whether power needs to be supplied to the SD card or not according to a preset access request;
if power needs to be supplied to the SD card and the SD card is in a power-off state, the power supply to the SD card is started;
and if the power supply to the SD card is not needed and the SD card is in a power supply state, cutting off the power supply to the SD card.
In some embodiments, when determining whether power needs to be supplied to the SD card according to a preset access request, the processor 301 performs the following steps:
and detecting whether an access request pointing to the SD card exists, wherein if the access request pointing to the SD card is detected, the power supply to the SD card is determined to be needed, and if the access request pointing to the SD card is detected to be completed, the power supply to the SD card is determined not to be needed.
In some embodiments, after power to the SD card is cut off, processor 301 performs the following steps:
when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals;
if the power supply starting request sent by the SD card is not received within the preset time length after the power supply to the SD card is started, the power supply to the SD card is cut off;
and if a power supply starting request sent by the SD card is received within a preset time after the SD card is started to supply power, maintaining the power supply state until the power supply closing request sent by the SD card is received.
In some embodiments, processor 301 further performs the steps of:
identifying the type of the SD card when the connection with the SD card is detected;
acquiring power supply request data matched with the type of the SD card;
sending the power request data to the SD card, the power request data being used to configure the SD card as: when the data processing operation needs to be executed, a power supply turn-on request is sent to the mobile terminal, and when the data processing operation is finished, a power supply turn-off request is sent to the mobile terminal.
In some embodiments, prior to the step of identifying the type of the SD card, processor 301 performs the steps of:
and monitoring the level of a preset pin in real time, wherein when the level of the preset pin is detected to be a low level, connection with the SD card is judged to be established, and when the level of the preset pin is detected to be a high level, connection with the SD card is judged to be disconnected.
Memory 302 may be used to store computer programs and data. The memory 302 stores computer programs containing instructions executable in the processor. The computer program may constitute various functional modules. The processor 301 executes various functional applications and data processing by calling a computer program stored in the memory 302.
In some embodiments, as shown in fig. 7, fig. 7 is a second schematic structural diagram of an electronic device provided in the embodiments of the present application. The electronic device 300 further includes: radio frequency circuit 303, display screen 304, control circuit 305, input unit 306, audio circuit 307, sensor 308, and power supply 309. The processor 301 is electrically connected to the rf circuit 303, the display 304, the control circuit 305, the input unit 306, the audio circuit 307, the sensor 308, and the power source 309, respectively.
The radio frequency circuit 303 is used for transceiving radio frequency signals to communicate with a network device or other electronic devices through wireless communication.
The display screen 304 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 305 is electrically connected to the display screen 304, and is used for controlling the display screen 304 to display information.
The input unit 306 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 306 may include a fingerprint recognition module.
Audio circuitry 307 may provide an audio interface between the user and the electronic device through a speaker, microphone. Where audio circuitry 307 includes a microphone. The microphone is electrically connected to the processor 301. The microphone is used for receiving voice information input by a user.
The sensor 308 is used to collect external environmental information. The sensor 308 may include one or more of an ambient light sensor, an acceleration sensor, a gyroscope, and the like.
The power supply 309 is used to power the various components of the electronic device 300. In some embodiments, the power source 309 may be logically coupled to the processor 301 through a power management system, such that functions to manage charging, discharging, and power consumption management are performed through the power management system.
Although not shown in fig. 7, the electronic device 300 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
Therefore, the embodiment of the application provides an electronic device, which determines whether power needs to be supplied to an SD card according to an access request on a mobile terminal, and if it is determined that power needs to be supplied to the SD card and the SD card is in a power-off state, the power supply to the SD card is turned on, and if it is determined that power does not need to be supplied to the SD card and the SD card is in a power-supply state, the power supply to the SD card is cut off, so that the mobile terminal is prevented from still supplying power to the SD card under the condition that the mobile terminal does not access the SD card, and power consumption of the SD card to the mobile terminal is reduced.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the SD card power supply control method according to any one of the above embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Furthermore, the terms "first", "second", and "third", etc. in this application are used to distinguish different objects, and are not used to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules listed, but rather, some embodiments may include other steps or modules not listed or inherent to such process, method, article, or apparatus.
The SD card power supply control method, device, storage medium, and electronic apparatus provided in the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A power supply control method for an SD card is applied to a mobile terminal and is characterized by comprising the following steps:
judging whether power needs to be supplied to the SD card or not according to a preset access request, wherein the preset access request comprises read-write operation;
if the SD card needs to be powered and is in a power-off state, starting power supply to the SD card;
if the power supply to the SD card is not needed and the SD card is in a power supply state, cutting off the power supply to the SD card;
when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals;
if the power supply starting request sent by the SD card is not received within the preset time length after the power supply to the SD card is started, the power supply to the SD card is cut off;
and if a power supply starting request sent by the SD card is received within a preset time after the SD card is started to supply power, maintaining the power supply state until the power supply closing request sent by the SD card is received.
2. The SD card power supply control method according to claim 1, wherein the step of determining whether power needs to be supplied to the SD card according to a preset access request comprises:
and detecting whether an access request pointing to the SD card exists, wherein if the access request pointing to the SD card is detected, the power supply to the SD card is determined to be needed, and if the access request pointing to the SD card is detected to be completed, the power supply to the SD card is determined not to be needed.
3. The SD card power supply control method according to claim 1 or 2, further comprising:
identifying the type of the SD card when the connection with the SD card is detected;
acquiring power supply request data matched with the type of the SD card;
sending the power request data to the SD card, the power request data being used to configure the SD card as: when the data processing operation needs to be executed, a power supply turn-on request is sent to the mobile terminal, and when the data processing operation is finished, a power supply turn-off request is sent to the mobile terminal.
4. The SD card power supply control method according to claim 3, wherein the step of identifying the type of the SD card is preceded by the method further comprising:
and monitoring the level of a preset pin in real time, wherein when the level of the preset pin is detected to be a low level, connection with the SD card is judged to be established, and when the level of the preset pin is detected to be a high level, connection with the SD card is judged to be disconnected.
5. An SD card power supply control device, which is applied to a mobile terminal, is characterized by comprising:
the state judgment module is used for judging whether power needs to be supplied to the SD card or not according to a preset access request, wherein the preset access request comprises read-write operation;
the power supply control module is used for starting power supply to the SD card when the SD card needs to be supplied with power and is in a power-off state; if the power supply to the SD card is not needed and the SD card is in a power supply state, cutting off the power supply to the SD card; when the SD card is in a power-off state, starting power supply to the SD card at preset time intervals; if the power supply starting request sent by the SD card is not received within the preset time length after the power supply to the SD card is started, the power supply to the SD card is cut off; and if a power supply starting request sent by the SD card is received within a preset time after the SD card is started to supply power, maintaining the power supply state until the power supply closing request sent by the SD card is received.
6. The SD card power supply control device of claim 5, wherein the state judgment module is further configured to: and detecting whether an access request pointing to the SD card exists, wherein if the access request pointing to the SD card is detected, the power supply to the SD card is determined to be needed, and if the access request pointing to the SD card is detected to be completed, the power supply to the SD card is determined not to be needed.
7. A storage medium having stored thereon a computer program, characterized by causing a computer to execute the SD card power supply control method according to any one of claims 1 to 4 when the computer program runs on the computer.
8. An electronic device comprising a processor and a memory, the memory storing a computer program, wherein the processor is configured to execute the SD card power supply control method according to any one of claims 1 to 4 by calling the computer program.
CN201910322277.9A 2019-04-22 2019-04-22 SD card power supply control method and device, storage medium and electronic equipment Active CN110109529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910322277.9A CN110109529B (en) 2019-04-22 2019-04-22 SD card power supply control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910322277.9A CN110109529B (en) 2019-04-22 2019-04-22 SD card power supply control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110109529A CN110109529A (en) 2019-08-09
CN110109529B true CN110109529B (en) 2021-05-07

Family

ID=67486088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910322277.9A Active CN110109529B (en) 2019-04-22 2019-04-22 SD card power supply control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110109529B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800848B (en) * 2020-07-02 2021-09-10 恒宝股份有限公司 Smart card control method and device, terminal equipment and readable storage medium
CN112416109B (en) * 2020-11-16 2024-07-16 展讯半导体(成都)有限公司 TF card management method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3423243B2 (en) * 1999-03-26 2003-07-07 三洋電機株式会社 Digital camera
CN101042608A (en) * 2006-03-21 2007-09-26 鸿富锦精密工业(深圳)有限公司 Portable electronic device with save electricity function and implementing method thereof
US7472298B1 (en) * 2008-01-31 2008-12-30 International Business Machines Corporation Storage system and method for saving energy based on storage classes with corresponding power saving policies
CN101656098A (en) * 2008-08-20 2010-02-24 联想(北京)有限公司 Solid state hard disc, power supply management method thereof and terminal
CN101995938A (en) * 2010-11-23 2011-03-30 东莞宇龙通信科技有限公司 Memory card management method, device and mobile communication terminal
CN103577352A (en) * 2012-08-07 2014-02-12 昆达电脑科技(昆山)有限公司 Storage card recognition device
CN103049075A (en) * 2012-12-19 2013-04-17 苏州佳世达电通有限公司 Electronic device capable of reducing standby power consumption and method thereof
CN104700886B (en) * 2013-12-06 2019-05-31 恩智浦美国有限公司 Memory circuit with power supply status sensor
CN107085360A (en) * 2016-02-16 2017-08-22 日本冲信息株式会社 Image processing system, equipment and its electrical control method
TWI682272B (en) * 2018-06-20 2020-01-11 技嘉科技股份有限公司 Control method of redundant power supply device

Also Published As

Publication number Publication date
CN110109529A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
EP3355223B1 (en) Unlock method and mobile terminal
US8335549B2 (en) Method for power management of mobile communication terminal and mobile communication terminal using this method
CN106532876B (en) Power supply control method and device and computer equipment
CN108681514B (en) Device detection method and device, storage medium and electronic device
CN110109529B (en) SD card power supply control method and device, storage medium and electronic equipment
CN111103963A (en) Fingerprint module starting method and device, storage medium and terminal
US10831873B2 (en) Method for enabling biometric recognition pattern and related products
CN111065086A (en) SIM (subscriber identity module) identification method and device, storage medium and mobile terminal
CN110912574B (en) SIM card detection method, device, storage medium and terminal
CN110768382A (en) Wireless charging method and device, storage medium and electronic equipment
CN111443803A (en) Mode switching method, device, storage medium and mobile terminal
CN111433756B (en) Terminal and Type C interface anti-corrosion method
CN109195206B (en) Control method of display screen state, storage medium and electronic equipment
CN110958345B (en) Method and device for detecting rear cover of mobile terminal and computer readable storage medium
CN112486350B (en) Detection method and device for touch screen of mobile terminal, storage medium and mobile terminal
CN112542867B (en) Mobile terminal power supply control method and device, terminal equipment and storage medium
CN110086508B (en) Voltage adjusting method, system, storage medium and mobile terminal
CN110716158B (en) Detection method, system, storage medium and mobile terminal
CN113420283A (en) Starting-up method and device of mobile terminal, storage medium and mobile terminal
CN111654849A (en) Quick starting method and system for near field communication, storage medium and terminal equipment
CN115379533A (en) Earphone connection method, storage medium, wireless earphone, device and mobile terminal
CN112437421A (en) Bluetooth control method, device, storage medium and mobile terminal
CN111045742A (en) Card changing method and device of terminal equipment, storage medium and terminal equipment
CN112202464B (en) Identification card detection method and device, storage medium and mobile terminal
CN111638897B (en) System updating method, device, terminal equipment and storage medium

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
TR01 Transfer of patent right

Effective date of registration: 20231223

Address after: 361000 room 4101, No. 131, xinjingdongli, Haicang District, Xiamen City, Fujian Province

Patentee after: Xiamen Jiupin sesame Information Technology Co.,Ltd.

Address before: 516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West

Patentee before: HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd.

TR01 Transfer of patent right