CN110471622A - A kind of SD card method for writing data, device, storage medium and terminal - Google Patents

A kind of SD card method for writing data, device, storage medium and terminal Download PDF

Info

Publication number
CN110471622A
CN110471622A CN201910697671.0A CN201910697671A CN110471622A CN 110471622 A CN110471622 A CN 110471622A CN 201910697671 A CN201910697671 A CN 201910697671A CN 110471622 A CN110471622 A CN 110471622A
Authority
CN
China
Prior art keywords
remaining space
memory remaining
working condition
card
memory
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.)
Granted
Application number
CN201910697671.0A
Other languages
Chinese (zh)
Other versions
CN110471622B (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.)
Shenzhen Zongzheng Intellectual Property Service 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 CN201910697671.0A priority Critical patent/CN110471622B/en
Publication of CN110471622A publication Critical patent/CN110471622A/en
Application granted granted Critical
Publication of CN110471622B publication Critical patent/CN110471622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The embodiment of the present application discloses a kind of SD card method for writing data, device, storage medium and terminal, wherein SD card method for writing data include: when detect data are written to SD card when, obtain the time difference at current time and last historical juncture when data are written to the SD card;When the time difference is less than preset time difference, setting working condition is the second working condition, second working condition are as follows: writing speed is arranged according to the relationship between current memory remaining space and the first memory remaining space section, third memory remaining space section;When the time difference is more than or equal to the preset time difference, setting working condition is the first working condition, first working condition are as follows: writing speed is arranged according to the relationship between current memory remaining space and the first memory remaining space section, the second memory remaining space section, third memory remaining space section.Application scheme can effectively improve SD card writing speed.

Description

A kind of SD card method for writing data, device, storage medium and terminal
Technical field
This application involves the application fields of mobile terminal, and in particular to a kind of SD card method for writing data, device, storage are situated between Matter and terminal.
Background technique
SD card (Secure Digital Memory Card) is also referred to as safe digital card, is a kind of fast based on semiconductor The memory device of new generation of memory is dodged, it on mancarried device by widely in using, such as digital camera, personal digital help Reason (foreign language abbreviation PDA) and multimedia player etc..SD card has become most widely used one kind in current consumer digital equipment Storage card, the multifunctional storage card with various features such as large capacity, high-performance, safety.
Conventionally, as mobile terminal limited storage space, so generally requiring external SD card, mobile terminal exists It is that the data that will be first written in SD card are put in memory when being written and read to external SD card, is further written to SD card In, since memory is shared by the application program of various mobile terminals, write-in speed can be made when being continually written to SD card Degree becomes slower.
Summary of the invention
The embodiment of the present application provides a kind of SD card method for writing data, device, storage medium and terminal, and SD card can be improved Writing speed.
The embodiment of the present application provides a kind of SD card method for writing data, comprising:
When detect data are written to SD card when, going through when obtaining current time and the last write-in data to the SD card The time difference at history moment;
When the time difference be less than preset time difference when, setting working condition be the second working condition, described second Working condition are as follows: according to current memory remaining space and the first memory remaining space section, third memory remaining space section it Between relationship be arranged writing speed;
When the time difference is more than or equal to the preset time difference, setting working condition is the first working condition, First working condition are as follows: according to current memory remaining space and the first memory remaining space section, the remaining sky of the second memory Between relationship between section, third memory remaining space section writing speed is set.
Correspondingly, the embodiment of the present application also provides a kind of SD card writing stations, comprising:
Acquiring unit, for when detect data are written to SD card when, obtain current time and last to the SD card The time difference of historical juncture when write-in data;
First setting unit, for when the time difference is less than preset time difference, setting working condition to be second Working condition, second working condition include being set according to the first memory remaining space section and third memory remaining space section Set writing speed;
Second setting unit, for work shape to be arranged when the time difference is more than or equal to the preset time difference State is the first working condition, and first working condition includes surplus according to the first memory remaining space section, the second memory Said write speed is arranged in complementary space section and the third memory remaining space section.
In some embodiments, the second setting unit, further includes:
Subelement is obtained, for obtaining the memory remaining space;
First setting subelement, if being in the first memory remaining space section for the memory remaining space, Setting writing speed is the first writing speed;
Second setting subelement, if being in the second memory remaining space section for the memory remaining space, Setting said write speed is the second writing speed.
Correspondingly, the storage medium is stored with a plurality of instruction, institute the embodiment of the present application also provides a kind of storage medium It states instruction to be loaded suitable for processor, to execute the step in SD card method for writing data as described above.
Correspondingly, the embodiment of the present application also provides a kind of terminal, including processor and memory, the memory storage There is a plurality of instruction, the processor load described instruction is to execute the step in SD card method for writing data as described above.
Application scheme by when detect data are written to SD card when, obtain current time and last to the SD card The time difference of historical juncture when write-in data;When the time difference is less than preset time difference, working condition is set For the second working condition, second working condition are as follows: according to current memory remaining space and the first memory remaining space section, Writing speed is arranged in relationship between third memory remaining space section;When the time difference is more than or equal to described preset When time difference, setting working condition is the first working condition, first working condition are as follows: according to current memory remaining space Relationship between the first memory remaining space section, the second memory remaining space section, third memory remaining space section is set Set writing speed.Application scheme can effectively improve SD card writing speed.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a kind of flow diagram of SD card method for writing data provided by the embodiments of the present application.
Fig. 2 is the flow diagram of another SD card method for writing data provided by the embodiments of the present application.
Fig. 3 is a kind of Operation interface diagram of SD card method for writing data provided by the embodiments of the present application.
Fig. 4 is a kind of structural block diagram of SD card writing station provided by the embodiments of the present application.
Fig. 5 is the structural block diagram of another SD card writing station provided by the embodiments of the present application.
Fig. 6 is the structural schematic diagram of terminal provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiment is only a part of the embodiment of the application, instead of all the embodiments.Base Embodiment in the application, those skilled in the art's every other reality obtained without creative efforts Example is applied, shall fall in the protection scope of this application.
Based on the above issues, the embodiment of the present application provides a kind of SD card method for writing data, device, storage medium and end End, can effectively improve SD card writing speed.It is described in detail separately below.It should be noted that the following description Sequence is not as the restriction to embodiment preferred sequence.
Referring to FIG. 1, Fig. 1 is a kind of flow diagram of SD card method for writing data provided by the embodiments of the present application.It should SD card method for writing data can be applied to such as mobile phone, tablet computer, laptop, and palm PC, portable media are broadcast Put the fixed terminals such as the mobile terminals, and desktop computer such as device (Portable Media Player, PMP).The SD card The detailed process of method for writing data can be such that
101, when detect data are written to SD card when, obtain current time and last when data are written to the SD card Historical juncture time difference.
Specifically, initiating the instruction that data are written to SD card by user.Wherein, refer to SD card write-in data by terminal Data in memory move in the SD card connecting with terminal, and terminal and SD card are attached by hardware interface.Wherein, it is written Data be Installed System Memory information, may include symbol, text, number, voice, image, video etc..Specifically, in system Depositing information can be shown by file mode in terminal interface.For example, user can pass through any in selection terminal memory bank Then file executes the operation for moving to SD card to this file.It can be that data are written to SD card specifically, obtaining current time When, record currently starts to be written time when data.Obtain historical juncture when data are written to SD card, can for it is last to The time after data are completed is written in SD card.Calculate the time difference between the time twice recorded.For example, last to SD Card write-in data, 30 divide 4 seconds when the time after completing can be 11.When it is preceding to SD card be written data before time can be 30 divide 6 seconds when 11, then the time difference between data is written to SD card twice is 2 seconds.
In some embodiments, step " when detect to SD card be written data when ", can also include following below scheme:
When detecting to SD card write-in data to be written for the first time, first working condition is executed.
Specifically, referring to when user triggers the instruction to SD card write-in data for the first time and carrying out first data write-in to SD card When, terminal according to the first working condition to SD card carry out data write-in, avoid be not detected to SD write-in data history when When quarter, stop that data are written to SD card.Wherein, the first working condition can be with are as follows: obtains current memory remaining space, determines current Memory remaining space section, if current memory remaining space section is in the first memory remaining space section, can be set to SD card writing speed is the first SD card writing speed;If current memory remaining space section is in the second memory remaining space Section or third memory remaining space section, then can be set to SD card writing speed is the second SD card writing speed.
Wherein, memory remaining space section can by the relationship of memory remaining space and default memory remaining space come into Row divides.For example, default memory remaining space may include the first memory remaining space and the second memory remaining space, wherein First memory remaining space can be greater than the second memory remaining space.
For example, division rule can be with are as follows: if memory remaining space is greater than the first memory remaining space, memory remaining space In the first memory remaining space section;If memory remaining space is less than or equal to the first memory remaining space and is more than or equal to second Memory remaining space, then memory remaining space is in the second memory remaining space section;If memory remaining space less than second in Remaining space is deposited, then memory remaining space is in third memory remaining space section.
In some embodiments, step " when detect to SD card be written data when ", can also include following below scheme:
Into SD card write-in data procedures, current memory remaining space locating for current residual memory headroom is detected Section;
Determine whether current memory remaining space section is original memory remaining space section, and the original memory is surplus Complementary space section is memory remaining space section when data are written to the SD card;
If it is not, said write speed then is arranged according to current memory remaining space section.
Specifically, current memory remaining space can constantly change, then institute during data are written to SD card The memory remaining space section at place can also change.Detect memory remaining space section locating for current memory remaining space. It, will be in current memory remaining space and the first memory remaining space, second for example, current memory remaining space can be obtained in real time It deposits remaining space to be compared, the memory remaining space section where current memory remaining space is determined according to comparison result.
Specifically, by current memory remaining space section compared with original memory remaining space section, wherein original memory Remaining space section is the memory remaining space section where the memory headroom got before data are written to SD card.If working as Preceding memory remaining space and original memory remaining space are inconsistent, then according to current memory remaining space section and being presently in work Make the relationship setting SD card writing speed of state.By the memory remaining space got in real time, and press locating remaining space area Between SD card writing speed is set, can be improved SD card writing speed.
In some embodiments, step " determines whether current memory remaining space section is that original memory is remaining empty Between section, further include following below scheme:
Judge whether current memory remaining space section is the second memory remaining space section;
If so, determining whether the working condition is second working condition;
If so, keeping presently written speed that data are written to the SD card.
Specifically, current memory remaining space and the first memory remaining space, the second memory remaining space that will acquire It is compared, obtains comparison result.
Wherein, show that comparison result can be less than or equal to the first memory remaining space and is greater than for current memory remaining space Equal to the second memory remaining space, then it is determined that current memory remaining space is in the second memory remaining space section.
Further, detection is presently in working condition.Wherein, being presently in working condition can be the first work shape State, at this point, writing speed, which is arranged, according to the first working condition is written data to SD card.Being presently in working condition can be second Working condition, at this point, continuing that data are written to SD card according to presently written speed.This step can in a second operative state, When memory remaining space is in the second memory remaining space, remain to continue to carry out data write-in to SD card.
102, when the time difference is less than preset time difference, setting working condition is the second working condition, described Second working condition are as follows: according to current memory remaining space and the first memory remaining space section, third memory remaining space area Between between relationship be arranged writing speed.
Specifically, time difference is compared with preset time difference according to the time difference being calculated.Wherein, Preset time difference can be arranged automatically according to memory size system.It can be more rationally effective according to the setting of preset time difference SD card writing speed is arranged in switch operating state.
For example, time difference can be less than preset time difference, at this point, setting working condition is the second working condition.Its In, the second working condition can be with are as follows: obtains current memory remaining space, determines current memory remaining space section, if in current It deposits remaining space section and is in the first memory remaining space section, then can be set to SD card writing speed is the first SD card Writing speed;If current memory remaining space section is in third memory remaining space section, can be set to SD card data Writing speed is the second SD card writing speed.
In some embodiments, step " setting working condition is the second working condition ", can also include following below scheme:
Obtain current memory remaining space;
If current memory remaining space is in the second memory remaining space section, start timing;
Reach prefixed time interval when the time of timing, then second working condition is switched to the first work shape State.
Specifically, memory remaining space can be obtained in real time when being in the second working condition.If being got when detecting Memory remaining space be in the second memory remaining space section, then do not change when the preceding writing speed to SD card write-in data, And start to carry out timing.Specifically, when reaching prefixed time interval, current memory remaining space section is surplus still in the second memory Second working condition then can be switched to the first working condition by complementary space section.By prefixed time interval to working condition Switching, can effectively save to SD card write-in data time.
103, when the time difference is more than or equal to the preset time difference, setting working condition is the first work shape State, first working condition are as follows: according to current memory remaining space and the first memory remaining space section, the second memory residue Writing speed is arranged in relationship between spatial interval, third memory remaining space section.
Specifically, time difference is compared with preset time difference according to the time difference being calculated.
For example, time difference can be more than or equal to preset time difference, at this point, setting working condition is the first work shape State.
In some embodiments, step " setting working condition is the first working condition ", may include following below scheme:
Obtain the memory remaining space;
If the memory remaining space is in the first memory remaining space section, writing speed is set and is write for first Enter speed;
If the memory remaining space is in the second memory remaining space section, it is that said write speed, which is arranged, Two writing speeds.
It is specific to obtain current memory remaining space, current memory remaining space section is determined, if current memory is remaining empty Between section be in the first memory remaining space section, then can be set to SD card writing speed be the first SD card write-in speed Degree;If current memory remaining space section is in the second memory remaining space section or third memory remaining space section, Can be set to SD card writing speed is the second SD card writing speed.When the memory remaining space got is any value When, by executing the first working condition, SD card writing speed can be set to SD card, data are written.
In the present embodiment, when data are written to SD card by detection, acquisition current time is write with the last time to the SD card The time difference of historical juncture when entering data, when the time difference is less than preset time difference, setting working condition is Second working condition, second working condition are as follows: according to current memory remaining space and the first memory remaining space section, Writing speed is arranged in relationship between three memory remaining space sections;When the time difference be more than or equal to it is described default when Between difference when, setting working condition be the first working condition, first working condition are as follows: according to current memory remaining space with First memory remaining space section, the second memory remaining space section, the relationship setting between third memory remaining space section Writing speed.The time difference to SD card writing speed is arranged by acquisition in application scheme twice in succession, and according to this The size dynamic adaptation SD card writing speed of time difference, can effectively save the SD card write time, improve to SD card and number is written According to efficiency.
Referring to FIG. 2, Fig. 2 is the flow diagram of another SD card method for writing data provided by the embodiments of the present application. In the present embodiment, citing description can be carried out using mobile phone as terminal.The concrete scene of the SD card method for writing data is answered With can be such that
201, terminal receives the request to SD card write-in data.
In the present embodiment, it is first determined SD card is placed in terminal.User can open the instruction to SD card write-in data, Terminal is after receiving the instruction to SD card write-in data of user's triggering, according to instruction execution corresponding operating.
For example, referring to FIG. 3, Fig. 3 is Operation interface diagram provided by the embodiments of the present application.User opens terminal, and opening is deposited Storage file can see terminal screen interface as shown on the left side of figure 3, wherein the interface is listed files interface, is shown Each file of system memory space.User can choose any file and open it.
For example, user's opened file folder, can choose file 1, then terminal screen interface is jumped to shown in the right side Fig. 3 Interface.The boundary interface can show the content of file 1, and user can carry out file 1 by the button below triggering screen Operation.Specifically, user can click " moving to SD card " button, the instruction to SD card write-in data is triggered.
202, writing speed is arranged according to the first working condition according to request current memory remaining space in terminal And record the data write-in moment.
In the present embodiment, request of data is written according to the SD card received in terminal, can set according to the first working condition Set SD card writing speed.
For example, current memory remaining space M is got, for example, memory remaining space M can be 500M.By memory residue Space M and the first memory remaining space (can be M1), the second memory remaining space (can be M2), wherein the first memory is remaining Space M1 can be that 400M, the second memory remaining space M2 can be 300M.At this point, memory remaining space M is greater than the first memory Remaining space M1 can then determine that memory remaining space section locating for memory remaining space M is the first memory remaining space area Between.In the first working condition, when being in the first memory remaining space section, then SD card writing speed can be set and write for first Enter speed, wherein the first writing speed can be 10M/ seconds.
203, terminal opens first timer, and timing acquisition current memory remaining space is arranged according to the first working condition Writing speed simultaneously records the data write-in moment.
In the present embodiment, number is written when terminal is arranged SD card writing speed and starts to execute to SD card with this writing speed According to operation when, first timer can be opened.Such as the time setting of first timer can be 5 seconds.According to the first timing The time of device setting obtains current memory remaining space, and SD card writing speed is then arranged according to the first working condition and records The moment is written.
For example, terminal starts data can be written to SD card with 10M/ seconds writing speeds, meanwhile, first timer can be with Start to set timing in 5 seconds.Wherein, timer timing mode can be countdown 5 seconds to 0 second, or reverse countdown 0 second to 5 Second.After timing, memory remaining space M3 is obtained, for example, memory remaining space M3 can be 600M.Memory is remaining at this time Space M3 can still be greater than the first memory remaining space M1, then can determine memory remaining space locating for memory remaining space M3 Section is the first memory remaining space section.It, then can be with when being in the first memory remaining space section in the first working condition Setting SD card writing speed be the first writing speed, i.e. 10M/ seconds.Then at the time of terminal record is when the preceding write-in data to SD, 30 divide 4 seconds when can be 12.
204, terminal obtains the time difference at the adjacent write-in moment of data twice, judges whether the time difference is less than preset time Difference, if so, thening follow the steps 205;If it is not, thening follow the steps 206.
In the present embodiment, terminal, according to the continuous variation of memory remaining space, is write when carrying out write-in data to SD card Entering speed can also change.When writing speed is arranged each time, current time is recorded.Terminal by the adjacent moment twice into Row subtraction calculations, obtain time difference.
30 divide 4 seconds when for example, can be 12 at the time of when writing speed is arranged in the first time of terminal record, terminal record 30 divide 6 seconds when can be 12 at the time of when second setting writing speed, terminal will twice the moment subtract each other to obtain time difference 2 Second.Then obtained time difference is compared with preset time difference, wherein preset time difference can be 3 seconds.Pass through Compare, can determine that time difference is less than preset time difference.Then step 205 can be executed according to comparison result.
In some embodiments, there may also be another situations.For example, writing speed is arranged in the first time of terminal record When at the time of 30 divide 4 seconds when can be 12,30 divide 8 when can be 12 at the time of when second of setting writing speed of terminal record Second, terminal will twice the moment subtract each other to obtain time difference 4 seconds.Then obtained time difference and preset time difference are compared Compared with, wherein preset time difference can be 3 seconds.By comparing, it can determine that time difference is greater than preset time difference.Then may be used To execute step 206 according to comparison result.
205, current first working condition is switched to the second working condition and opens second timer and obtained currently by terminal Memory remaining space.
In the present embodiment, when the time difference for determining the adjacent SD card writing speed setting of progress twice is less than preset time When difference, the first working condition executed at this time is switched to the second working condition by terminal.It is then turned on second timer, example Such as, in order to avoid data frequently are written to SD card, when the setting duration of second timer can be greater than the setting of first timer Long, second timer can be set as 20 seconds.Terminal is closed first timer and is obtained according to the setting duration of second timer Memory remaining space.
For example, memory remaining space can be 100M at this time, terminal can be to the writing speed of SD card write-in data 10M/ seconds.The first locating at this time working condition can be switched to the second working condition by terminal, be in the second working condition When, memory remaining space is less than the second memory remaining space M2, it is determined that locating memory remaining space section is surplus for third memory Complementary space section then can be set the second writing speed to SD card and data be written.Wherein, the second writing speed can be 5M/ seconds. And starts timing according to 20 seconds durations that second timer is set and obtain memory remaining space.
206, writing speed is arranged according to the first working condition in terminal.
In the present embodiment, when the time difference for determining the adjacent SD card writing speed setting of progress twice is greater than preset time When difference, terminal will continue to execute the first working condition.
For example, memory remaining space can be 100M at this time, terminal can be to the writing speed of SD card write-in data 10M/ seconds.Terminal can continue to execute the first working condition, and when being in the first working condition, memory remaining space is less than second Memory remaining space M2, it is determined that locating memory remaining space section is third memory remaining space section, then can be set the Data are written to SD card in the rate of two writing speeds, i.e. 5M/ second.
207, when terminal is in the second working condition, and the not set writing speed in second timer, then will Second working condition switches to the first working condition and closes second timer.
In the present embodiment, when terminal is in the second working condition, and after opening second timer.In timer setting In length, terminal memory remaining space can be constantly in the second memory remaining space section, then not to SD during the second timing Card setting writing speed.At this point, the second working condition is switched to the first working condition and closes second timer by terminal.
For example, at this point, terminal memory remaining space can be 100M, according to the second writing speed 5M/ seconds of setting to SD Card write-in data, open second timer, obtain memory remaining space section, the memory remaining space got can be 450M, then determination is worked as according to memory remaining space compared with the first memory remaining space M1, the second memory remaining space M2 Preceding memory remaining space section is the second memory remaining space section, according to the second working condition, remaining in the second memory Then it is arranged without SD card writing speed when spatial interval.At this point it is possible to which the second working condition is back switched to the first work State, and close second timer.
In the present embodiment, by the way that number is arranged based on the first working condition according to request current memory remaining space According to writing speed and the data write-in moment is recorded, opens first timer, timing acquisition current memory remaining space, according to first Working condition setting writing speed simultaneously records the data write-in moment, obtains the time difference at the adjacent write-in moment of data twice Value, judges whether the time difference is less than preset time difference, if so, current first working condition is switched to the second working condition And it opens second timer and obtains current memory remaining space;If it is not, writing speed then is arranged according to the first working condition, work as place When the second working condition, and the not set writing speed in second timer, then the second working condition is switched to One working condition simultaneously closes second timer, and SD card can be improved.Application scheme is it is possible to prevente effectively from be frequently arranged to SD card Writing speed reduces mobile terminal consumption.
For convenient for better implementation SD card method for writing data provided by the embodiments of the present application, the embodiment of the present application is also provided A kind of device based on above-mentioned SD card method for writing data.The wherein meaning of noun and phase in above-mentioned SD card method for writing data Together, specific implementation details can be with reference to the explanation in embodiment of the method.
Referring to FIG. 4, Fig. 4 is a kind of structural block diagram of SD card writing station provided by the embodiments of the present application, comprising:
Acquiring unit 401, for when detect data are written to SD card when, obtain current time and last to the SD The time difference of historical juncture when card write-in data;
First setting unit 402, for when the time difference is less than preset time difference, setting working condition to be the Two working conditions, second working condition include according to the first memory remaining space section and third memory remaining space section Writing speed is set;
Second setting unit 403, for work to be arranged when the time difference is more than or equal to the preset time difference State is the first working condition, and first working condition includes according to the first memory remaining space section, the second memory Said write speed is arranged in remaining space section and the third memory remaining space section.
Referring to FIG. 5, in some embodiments, the second setting unit 403 includes:
Subelement 4031 is obtained, for obtaining the memory remaining space;
First setting subelement 4032, if being in the first memory remaining space area for the memory remaining space Between, then it is the first writing speed that writing speed, which is arranged,;
Second setting subelement 4033, if being in the second memory remaining space area for the memory remaining space Between, then it is the second writing speed that said write speed, which is arranged,.
The present embodiment is by when detecting that obtaining current time writes with last to the SD card when data are written to SD card The time difference of historical juncture when entering data;When the time difference is less than preset time difference, setting working condition is Second working condition, second working condition are as follows: according to current memory remaining space and the first memory remaining space section, Writing speed is arranged in relationship between three memory remaining space sections;When the time difference be more than or equal to it is described default when Between difference when, setting working condition be the first working condition, first working condition are as follows: according to current memory remaining space with First memory remaining space section, the second memory remaining space section, the relationship setting between third memory remaining space section Writing speed.The embodiment of the present application is configured SD card writing speed, is had by the time difference to SD card write-in data Effect avoids that writing speed frequently is arranged to SD card, can reduce power consumption of terminal, and then effectively improve SD card write efficiency.
The embodiment of the present application also provides a kind of terminal.As shown in fig. 6, the terminal may include radio frequency (RF, Radio Frequency) circuit 601, include one or more memory 602, the input unit of computer readable storage medium 603, display unit 604, sensor 605, voicefrequency circuit 606, Wireless Fidelity (WiFi, Wireless Fidelity) module 607, the components such as processor 608 and the power supply 609 of processing core are included one or more than one.Those skilled in the art Member it is appreciated that terminal structure shown in Fig. 6 not structure paired terminal restriction, may include more more or fewer than illustrating Component perhaps combines certain components or different component layouts.Wherein:
During RF circuit 601 can be used for receiving and sending messages, signal is sended and received, and particularly, the downlink of base station is believed After breath receives, one or the processing of more than one processor 608 are transferred to;In addition, the data for being related to uplink are sent to base station.It is logical Often, RF circuit 601 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, user identity Module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier (LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuit 601 can also be logical with network and other equipment by wireless communication Letter.
Memory 602 can be used for storing software program and module, and processor 608 is stored in memory 602 by operation Software program and module, thereby executing various function application and data processing.Memory 602 can mainly include storage journey Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function Such as sound-playing function, image player function) etc..In addition, memory 602 may include high-speed random access memory, also It may include nonvolatile memory, a for example, at least disk memory, flush memory device or the storage of other volatile solid-states Device.Correspondingly, memory 602 can also include Memory Controller, to provide processor 608 and input unit 603 to depositing The access of reservoir 602.
Input unit 603 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, in a specific embodiment In, input unit 603 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or touching Control plate, collect user on it or nearby touch operation (such as user using any suitable object such as finger, stylus or Operation of the attachment on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to preset formula It sets.In addition to touch sensitive surface, input unit 603 can also include other input equipments.Specifically, other input equipments may include But in being not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more.
Display unit 604 can be used for showing information input by user or be supplied to user information and server it is each Kind graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.It is aobvious Show that unit 604 may include display panel, optionally, liquid crystal display (LCD, Liquid Crystal can be used Display), the forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display surface Plate.Further, touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, Processor 608 is sent to determine the type of touch event, is followed by subsequent processing device 608 according to the type of touch event in display panel It is upper that corresponding visual output is provided.Although touch sensitive surface and display panel are realized as two independent components in Fig. 6 Input and input function, but in some embodiments it is possible to it is touch sensitive surface and display panel is integrated and realize and input and defeated Function out.
Terminal may also include at least one sensor 605, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel, proximity sensor can close display panel and back when server is moved in one's ear Light.
Voicefrequency circuit 606, loudspeaker, microphone can provide the audio interface between user and server.Voicefrequency circuit 606 Electric signal after the audio data received being converted, is transferred to loudspeaker, is converted to voice signal output by loudspeaker;Separately On the one hand, the voice signal of collection is converted to electric signal by microphone, is converted to audio data after being received by voicefrequency circuit 606, After audio data output processor 608 is handled again, through RF circuit 601 to be sent to such as terminal, or audio data is defeated Out to memory 602 to be further processed.Voicefrequency circuit 606 is also possible that earphone jack, to provide peripheral hardware earphone and clothes The communication of business device.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 607 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 6 is shown WiFi module 607, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely Become in the range of the essence of application and omits.
Processor 608 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and module being stored in memory 602, and call the number being stored in memory 602 According to the various functions and processing data of execute server, to carry out integral monitoring to mobile phone.Optionally, processor 608 can wrap Include one or more processing cores;Preferably, processor 608 can integrate application processor and modem processor, wherein answer With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication. It is understood that above-mentioned modem processor can not also be integrated into processor 608.
Terminal further includes the power supply 609 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system and processor 608 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system Etc. functions.Power supply 609 can also include one or more direct current or AC power source, recharging system, power failure inspection The random components such as slowdown monitoring circuit, power adapter or inverter, power supply status indicator.
Specifically in the present embodiment, the processor 608 in terminal can be according to following instruction, will be one or more The corresponding executable file of the process of application program is loaded into memory 602, and is run by processor 608 and be stored in storage Application program in device 602, to realize various functions:
When detect data are written to SD card when, going through when obtaining current time and the last write-in data to the SD card The time difference at history moment;
When the time difference be less than preset time difference when, setting working condition be the second working condition, described second Working condition are as follows: according to current memory remaining space and the first memory remaining space section, third memory remaining space section it Between relationship be arranged writing speed;
When the time difference is more than or equal to the preset time difference, setting working condition is the first working condition, First working condition are as follows: according to current memory remaining space and the first memory remaining space section, the remaining sky of the second memory Between relationship between section, third memory remaining space section writing speed is set.
Application scheme by when detect data are written to SD card when, obtain current time and last to the SD card The time difference of historical juncture when write-in data;When the time difference is less than preset time difference, working condition is set For the second working condition, second working condition are as follows: according to current memory remaining space and the first memory remaining space section, Writing speed is arranged in relationship between third memory remaining space section;When the time difference is more than or equal to described preset When time difference, setting working condition is the first working condition, first working condition are as follows: according to current memory remaining space Relationship between the first memory remaining space section, the second memory remaining space section, third memory remaining space section is set Writing speed is set, can effectively improve SD card writing speed.
It will appreciated by the skilled person that all or part of the steps in the various methods of above-described embodiment can be with It is completed by instructing, or relevant hardware is controlled to complete by instruction, which can store in computer-readable storage In medium, and is loaded and executed by processor.
For this purpose, the embodiment of the present application provides a kind of storage medium, wherein being stored with a plurality of instruction, which can be processed Device is loaded, to execute the step in any SD card method for writing data provided by the embodiment of the present application.For example, this refers to Order can execute following steps:
When detect data are written to SD card when, going through when obtaining current time and the last write-in data to the SD card The time difference at history moment;When the time difference is less than preset time difference, setting working condition is the second working condition, Second working condition are as follows: according to current memory remaining space and the first memory remaining space section, the remaining sky of third memory Between relationship between section writing speed is set;When the time difference is more than or equal to the preset time difference, if Setting working condition is the first working condition, first working condition are as follows: surplus according to current memory remaining space and the first memory Speed is written in complementary space section, the second memory remaining space section, the relationship setting data between third memory remaining space section Degree.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
Wherein, which may include: read-only memory (ROM, Read Only Memory), random access memory Body (RAM, Random Access Memory), disk or CD etc..
By the instruction stored in the storage medium, any SD card number provided by the embodiment of the present application can be executed According to the step in wiring method, it is thereby achieved that any SD card method for writing data institute provided by the embodiment of the present application The beneficial effect being able to achieve is detailed in the embodiment of front, and details are not described herein.
SD card method for writing data, device, storage medium and terminal provided by the embodiment of the present application are carried out above It is discussed in detail, specific examples are used herein to illustrate the principle and implementation manner of the present application, above embodiments Illustrate to be merely used to help understand the present processes and its core concept;Meanwhile for those skilled in the art, according to this The thought of application, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is not answered It is interpreted as the limitation to the application.

Claims (10)

1. a kind of SD card method for writing data characterized by comprising
When detect data are written to SD card when, when obtaining current time and last history when data are written to the SD card The time difference at quarter;
When the time difference is less than preset time difference, setting working condition is the second working condition, second work State are as follows: according between current memory remaining space and the first memory remaining space section, third memory remaining space section Writing speed is arranged in relationship;
When the time difference is more than or equal to the preset time difference, setting working condition is the first working condition, described First working condition are as follows: according to current memory remaining space and the first memory remaining space section, the second memory remaining space area Between, relationship between third memory remaining space section writing speed is set.
2. also being wrapped the method according to claim 1, wherein the setting working condition is the second working condition It includes:
Obtain current memory remaining space;
If current memory remaining space is in the second memory remaining space section, start timing;
Reach prefixed time interval when the time of timing, then second working condition is switched to first working condition.
3. the method according to claim 1, wherein the setting working condition is the first working condition, comprising:
Obtain the memory remaining space;
If the memory remaining space is in the first memory remaining space section, it is the first write-in speed that writing speed, which is arranged, Degree;
If the memory remaining space is in the second memory remaining space section, said write speed is set and is write for second Enter speed.
4. the method according to claim 1, wherein it is described when detect to SD card be written data when, acquisition is worked as The time difference of historical juncture when preceding moment and last from the write-in data to the SD card, further includes:
When detecting to SD card write-in data to be written for the first time, first working condition is executed.
5. the method according to claim 1, wherein further include:
Into SD card write-in data procedures, current memory remaining space area locating for current residual memory headroom is detected Between;
Determine whether current memory remaining space section is original memory remaining space section, the original memory is remaining empty Between section be to the SD card be written data when memory remaining space section;
If it is not, said write speed then is arranged according to current memory remaining space section.
6. according to the method described in claim 5, it is characterized in that, described by current memory remaining space section and former Before beginning memory remaining space is matched, further includes:
Judge whether current memory remaining space section is the second memory remaining space section;
If so, determining whether the working condition is second working condition;
If so, keeping presently written speed that data are written to the SD card.
7. a kind of SD card writing station characterized by comprising
Acquiring unit, for when detect data are written to SD card when, obtain current time and last be written to the SD card The time difference of historical juncture when data;
First setting unit, for when the time difference is less than preset time difference, setting working condition to be the second work State, second working condition include being write according to the first memory remaining space section and the setting of third memory remaining space section Enter speed;
Second setting unit, is used for when the time difference is more than or equal to the preset time difference, and setting working condition is First working condition, first working condition include remaining empty according to the first memory remaining space section, the second memory Between section and the third memory remaining space section said write speed is set.
8. device according to claim 7, which is characterized in that second setting unit includes: acquisition subelement, and first Subelement and the second setting subelement are set;
The acquisition subelement, for obtaining the memory remaining space;
The first setting subelement, if being in the first memory remaining space section for the memory remaining space, Setting writing speed is the first writing speed;
The second setting subelement, if being in the second memory remaining space section for the memory remaining space, Setting said write speed is the second writing speed.
9. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, described instruction be suitable for processor into Row load requires the step in 1 to 6 described in any item SD card method for writing data with perform claim.
10. a kind of terminal, which is characterized in that including processor and memory, the memory is stored with a plurality of instruction, the place Device load described instruction is managed with the step in perform claim 1 to 6 described in any item SD card method for writing data of requirement.
CN201910697671.0A 2019-07-30 2019-07-30 SD card data writing method and device, storage medium and terminal Active CN110471622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910697671.0A CN110471622B (en) 2019-07-30 2019-07-30 SD card data writing method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910697671.0A CN110471622B (en) 2019-07-30 2019-07-30 SD card data writing method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN110471622A true CN110471622A (en) 2019-11-19
CN110471622B CN110471622B (en) 2024-02-20

Family

ID=68509255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910697671.0A Active CN110471622B (en) 2019-07-30 2019-07-30 SD card data writing method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN110471622B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112379834A (en) * 2020-11-11 2021-02-19 深圳市豪恩汽车电子装备股份有限公司 Memory card management device and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291250A (en) * 2008-04-25 2008-10-22 北京泰得思达科技发展有限公司 Alarming method of memory space inadequate in network storage system
JP2010271977A (en) * 2009-05-22 2010-12-02 Fujitsu Ten Ltd Device, method, and program for writing data
CN103501327A (en) * 2013-09-25 2014-01-08 北京奇虎科技有限公司 Downloading method and device based on mobile terminal application
CN106371764A (en) * 2016-08-23 2017-02-01 浪潮(北京)电子信息产业有限公司 Virtual block device-based data processing method and apparatus
WO2017206403A1 (en) * 2016-05-31 2017-12-07 宇龙计算机通信科技(深圳)有限公司 Memory optimization method, optimization apparatus and terminal
CN108170376A (en) * 2017-12-21 2018-06-15 上海新案数字科技有限公司 The method and system that storage card is read and write
CN109857337A (en) * 2018-12-10 2019-06-07 浪潮(北京)电子信息产业有限公司 A kind of writing speed control method, system, device and readable storage medium storing program for executing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291250A (en) * 2008-04-25 2008-10-22 北京泰得思达科技发展有限公司 Alarming method of memory space inadequate in network storage system
JP2010271977A (en) * 2009-05-22 2010-12-02 Fujitsu Ten Ltd Device, method, and program for writing data
CN103501327A (en) * 2013-09-25 2014-01-08 北京奇虎科技有限公司 Downloading method and device based on mobile terminal application
WO2017206403A1 (en) * 2016-05-31 2017-12-07 宇龙计算机通信科技(深圳)有限公司 Memory optimization method, optimization apparatus and terminal
CN106371764A (en) * 2016-08-23 2017-02-01 浪潮(北京)电子信息产业有限公司 Virtual block device-based data processing method and apparatus
CN108170376A (en) * 2017-12-21 2018-06-15 上海新案数字科技有限公司 The method and system that storage card is read and write
CN109857337A (en) * 2018-12-10 2019-06-07 浪潮(北京)电子信息产业有限公司 A kind of writing speed control method, system, device and readable storage medium storing program for executing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112379834A (en) * 2020-11-11 2021-02-19 深圳市豪恩汽车电子装备股份有限公司 Memory card management device and method
CN112379834B (en) * 2020-11-11 2022-12-02 深圳市豪恩汽车电子装备股份有限公司 Memory card management device and method

Also Published As

Publication number Publication date
CN110471622B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
US11074117B2 (en) Copying and pasting method, data processing apparatus, and user equipment
US10725646B2 (en) Method and apparatus for switching screen interface and terminal
CN104636047B (en) The method, apparatus and touch screen terminal operated to the object in list
US9794206B2 (en) Method and apparatus for managing the display of messages of a group chat
US20140365892A1 (en) Method, apparatus and computer readable storage medium for displaying video preview picture
CN104238893B (en) A kind of method and apparatus that video preview picture is shown
CN109710139B (en) Page processing method, device, terminal and storage medium
WO2015062235A1 (en) Electronic device, battery protecting method and apparatus
CN105975190B (en) Graphical interface processing method, device and system
US10951754B2 (en) Method for responding to incoming call by means of fingerprint recognition, storage medium, and mobile terminal
CN107168609A (en) status bar display method, device and terminal
US11262911B2 (en) Integrated home key and virtual key area for a smart terminal
CN106200970B (en) The method and terminal of a kind of split screen display available
CN106775185B (en) Desktop display method and terminal
US20140181726A1 (en) Method and electronic device for providing quick launch access and storage medium
CN104007887B (en) The method and terminal that floating layer is shown
CN106951143B (en) Method and device for hiding application icons
CN109669662A (en) A kind of pronunciation inputting method, device, storage medium and mobile terminal
CN105162930B (en) The way of recording and device of mobile terminal
US20220300328A1 (en) Application optimization method and device, storage medium, and electronic equipment
CN103399657A (en) Mouse pointer control method, device and terminal device
CN110429678A (en) Mobile terminal method of supplying power to, system, storage medium and mobile terminal
CN104951178A (en) Processing method, device and system for desktop data
CN104090743A (en) Music locating method and device for mobile terminal and mobile terminal
CN104238931B (en) Information input method and device and electronic 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240229

Address after: 907, No. 210, Tianwan Road, Tianliao Community, Yutang Street, Guangming District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Zongzheng Intellectual Property Service Co.,Ltd.

Country or region after: China

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

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

Country or region before: China