CN109074301A - A kind of data processing method and device - Google Patents

A kind of data processing method and device Download PDF

Info

Publication number
CN109074301A
CN109074301A CN201780012551.1A CN201780012551A CN109074301A CN 109074301 A CN109074301 A CN 109074301A CN 201780012551 A CN201780012551 A CN 201780012551A CN 109074301 A CN109074301 A CN 109074301A
Authority
CN
China
Prior art keywords
storage device
data storage
removable data
terminal device
removable
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
CN201780012551.1A
Other languages
Chinese (zh)
Other versions
CN109074301B (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.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN109074301A publication Critical patent/CN109074301A/en
Application granted granted Critical
Publication of CN109074301B publication Critical patent/CN109074301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Telephone Function (AREA)

Abstract

A kind of data processing method and device of the existing technology do not execute corrupted data caused by removing SD card according to correct operation for solving the problems, such as.The described method includes: during the removable data storage device coupled with the terminal device is written in the first data on terminal device, when detecting that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset storage medium of the terminal device;When detecting that the removable data storage device is again coupled to the terminal device, the removable data storage device is written into the second data being stored in the storage medium.

Description

A kind of data processing method and device
This application claims Patent Office of the People's Republic of China is submitted, application No. is the priority of the Chinese patent application of 201710147617.X, entitled " a kind of method and apparatus of data processing " on March 13rd, 2017, entire contents are hereby incorporated by reference in the application.
Technical field
This application involves technical field of data storage more particularly to a kind of data processing method and devices.
Background technique
The application installed on the terminal devices such as mobile phone, plate at present and user data are more and more, and the internal storage space of terminal device is limited, therefore many persons have selected safe digital card (English: Secure Digital Memory Card, referred to as: SD) as storage extension, but the risk of loss of data is also brought simultaneously.When terminal device system background is writing data toward SD card, user pulls out SD at this time or SD undesirably falls off terminal device, the partial data that may result on SD is imperfect, the filesystem information on SD may be destroyed when serious, there is the case where terminal device can not identify SD card, causes loss to user to a certain extent.
Summary of the invention
The embodiment of the present application provides a kind of data processing method and device, of the existing technology does not execute corrupted data caused by removing SD card according to correct operation for solving the problems, such as.
First aspect, the embodiment of the present application provides a kind of data processing method, it include: during the removable data storage device coupled with the terminal device is written in the first data on terminal device, when detecting that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset storage medium of the terminal device;When detecting that the removable data storage device is again coupled to the terminal device, the removable data storage device is written into the second data being stored in the storage medium.
By above-mentioned design, into removable data storage device write-in data procedures, when detecting that removable data storage device is surprisingly removed, the part not being written is stored in preset storage medium, to when detecting that the removable data storage device is again coupled to the terminal device, it is continued to write in the removable data storage device in the part not being written, to ensure that the integrality of data to a certain extent and avoid data and be damaged.
In a kind of possible design, before the removable data storage device by the second data being stored in storage medium write-in, the method also includes: it confirmly detects the removable data storage device and is again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device;Or, confirmly detecting the removable data storage device and being again coupled to the opportunity of the terminal device is in the second preset duration when detecting that the removable data storage device is removed from the terminal device, after prompting removable data storage device described in user not safely remove.
By above-mentioned design, in the first preset duration after detecting that the removable data storage device is removed from the terminal device, when detecting that the removable data storage device is again coupled to the terminal device, then institute will be stored in The removable data storage device is written in the second data stated in storage medium, when user's removable data storage device is no longer coupled to the terminal device for a long time, terminal device no longer detects whether removable data storage device is again coupled to the terminal device, can reduce the consumption of terminal device electricity to a certain extent.
In a kind of possible design, after detecting that the removable data storage device is removed from the terminal device, before the removable data storage device is written in the second data that will be stored in the storage medium, the method can also include: that removable data storage device described in prompt user does not safely remove, and detect user's triggering for confirming the instruction not safely removed.
By above-mentioned design, after detecting that the removable data storage device is removed from the terminal device, removable data storage device described in prompt user does not safely remove, detect that the removable data storage device is again coupled to the terminal device, and detect when being used to confirm the instruction not safely removed of user's triggering, the removable data storage device is written into the second data being stored in the storage medium again, the removable data storage device data that user can be prompted to remove are dangerous, to which removable data storage device can be timely connected on terminal device by user again, the removable data storage device timely is written into the second data being stored in the storage medium, guarantee the integrality of data to a certain extent and avoids data and be damaged.
In a kind of possible design, the method can also include: not detect the removable data storage device in the second preset duration after the removable data storage device described in prompt user does not safely remove and be coupled to the terminal device;Second data are deleted from the storage medium, or when the storage medium is non-permanent storage medium, are then moved to second data in permanent storage media by non-permanent storage medium.
By above-mentioned design, in the second preset duration after prompting removable data storage device described in user not safely remove, the removable data storage device is not detected is coupled to the terminal device, second data are deleted from the storage medium timely, avoid the second data for a long time in occupation of storage medium to a certain extent.In addition, when the storage medium is non-permanent storage medium, second data are moved in permanent storage media by non-permanent storage medium then, losing after terminal device power-off for the useful data not being written is can be avoided, ensure that the safety of data to a certain extent.
In a kind of possible design, the method can also include: in the third preset duration after the removable data storage device described in prompt user does not safely remove, the removable data storage device is not detected is coupled to the terminal device, removable data storage device described in the user is prompted not safely remove again, it allows users in the case where timely knowing that mobile data storage device does not safely remove, removable data storage device is connected on terminal device in time, to which terminal device can timely continue to write to the data not being written in removable data storage device, it ensure that the integrality of data to a certain extent and data avoided to be damaged.
Based on inventive concept same as embodiment of the method, the embodiment of the present application also provides a kind of data processing equipment, described device is applied to terminal device, comprising:
Communication interface, processor and memory;The communication interface, for removable data storage device and the terminal device to be coupled;The memory, for storing the first data;The processor, for during the removable data storage device is written in the first data for storing the memory, when detecting that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset memory space of the memory;When detecting that the removable data storage device is again coupled to the terminal device, the removable data storage device is written into the second data being stored in the preset memory space.
In a kind of possible design, the memory includes the first storage medium and the second storage medium, and described first deposits Storage media is for storing first data;
The processor, when storing the second data for having not been written to the removable data storage device in first data in the preset memory space of the memory, specifically for second data are stored in the preset memory space of second storage medium.
In a kind of possible design, the processor, it is also used to before the removable data storage device is written in the second data that will be stored in the storage medium, confirmly detects the removable data storage device and be again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device;Or, confirmly detecting the removable data storage device and being again coupled to the opportunity of the terminal device is in the second preset duration when detecting that the removable data storage device is removed from the terminal device, after prompting removable data storage device described in user not safely remove.
In a kind of possible design, the processor, it is also used to after detecting that the removable data storage device is removed from the terminal device, before the removable data storage device is written in the second data that will be stored in the storage medium, removable data storage device described in prompt user does not safely remove, and detect user's triggering for confirming the instruction not safely removed.
In a kind of possible design, the processor is also used in the second preset duration after the removable data storage device described in prompt user does not safely remove, does not detect the removable data storage device and be coupled to the terminal device;Second data are deleted from the memory space, or when the corresponding storage medium of the preset memory space is non-permanent storage medium, are then moved to second data in permanent storage media by non-permanent storage medium.
In a kind of possible design, the processor, it is also used in the third preset duration after the removable data storage device described in prompt user does not safely remove, the removable data storage device is not detected and is coupled to the terminal device, and removable data storage device described in the user is prompted not safely remove again.
In a kind of possible design, described device further includes display or loudspeaker;The processor is when prompting removable data storage device described in user not safely remove, it is not safely removed specifically for prompting removable data storage device described in user not safely remove by the display interface of the display, or by removable data storage device described in loudspeaker prompt user.
The third aspect, the embodiment of the present application provide a kind of data processing equipment, which includes:
Writing module, for the removable data storage device coupled with the terminal device to be written in the first data on terminal device;
Detection module, for detecting whether the removable data storage device is removed from the terminal device;
Memory module, for during the removable data storage device coupled with the terminal device is written in the first data on terminal device by the write module, when the detection module detects that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset storage medium of the terminal device;
Detection module, is also used to detect whether the removable data storage device is coupled on the terminal device;
The write module is also used to when the detection module detects that the removable data storage device is again coupled to the terminal device, and the removable data storage device is written in the second data being stored in the storage medium.
In a kind of possible design, the detection module, it is also used to before the removable data storage device is written in the second data being stored in the storage medium by the write module, confirmly detects the removable data storage device and be again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device.
It further include cue module in a kind of possible design, for prompting removable data storage device described in user not safely remove when the detection module detects that the removable data storage device is removed from the terminal device.The detection module, it is also used to before the removable data storage device is written in the second data being stored in the storage medium by the write module, confirmly detect the removable data storage device and be again coupled to opportunity of the terminal device and be after detecting that the removable data storage device is removed from the terminal device, removable data storage device described in cue module prompt user do not safely remove after the second preset duration in.
In a kind of possible design, after the detection module detects that the removable data storage device is removed from the terminal device, removable data storage device described in the cue module prompt user is not safely removed;The detection module detects that the removable data storage device is again coupled to the terminal device, and detect user's triggering for confirm the instruction not safely removed, then the write module is by the second data being stored in storage medium write-in removable data storage device.
In a kind of possible design, described device further include:
Removing module, in the second preset duration after not safely removed for the removable data storage device described in cue module prompt user, not detecting the removable data storage device is not coupled to the terminal device fastly for the detection, then deletes second data from the storage medium.
In a kind of possible design, when the storage medium is non-permanent storage medium, the memory module, it is also used in the second preset duration after the cue module prompts removable data storage device described in user not safely remove, not detecting the removable data storage device is not coupled to the terminal device fastly for the detection, then is moved to second data in permanent storage media by non-permanent storage medium.
In a kind of possible design, the cue module, it is also used in the third preset duration after the removable data storage device described in prompt user does not safely remove, the detection module does not detect the removable data storage device and is coupled to the terminal device, and removable data storage device described in the user is prompted not safely remove again.
Fourth aspect, a kind of computer storage medium is also provided in the embodiment of the present application, software program is stored in the storage medium, which can realize the method that any one design of first aspect or above-mentioned first aspect provides when being read and executed by one or more processors.
5th aspect, the embodiment of the present application provide a kind of computer program product comprising instruction, when run on a computer, so that the method that computer executes any one design offer of above-mentioned first aspect or above-mentioned first aspect.
Detailed description of the invention
Fig. 1 is terminal device structural schematic diagram provided by the embodiments of the present application;
Fig. 2 is data processing system schematic diagram provided by the embodiments of the present application;
Fig. 3 is a kind of data processing method flow chart provided by the embodiments of the present application;
Fig. 4 is another data processing method flow chart provided by the embodiments of the present application;
Fig. 5 is another data processing method flow chart provided by the embodiments of the present application;
Fig. 6 is another data processing method flow chart provided by the embodiments of the present application;
Fig. 7 is the prompt information schematic diagram that terminal device provided by the embodiments of the present application shows user;
Fig. 8 is data processing equipment schematic diagram provided by the embodiments of the present application.
Specific embodiment
Hereinafter, the part term in the application is explained, so as to those skilled in the art understand that.
Removable data storage device, including memory, are configured for storing data.Removable data storage device can be subscriber identification module (English: Subscriber Identification Module, referred to as: SIM), secure digital (English: Secure Digital Memory, referred to as: SD) memory card, integrated circuit (English: integrated circuit, referred to as: IC) memory, a kind of universal serial bus (English: Universal Serial Bus, referred to as: USB) drive, a kind of Universal Integrated Circuit Card (English: Universal Integrated Circuit Card, referred to as: UICC), Removable User Identity Module (English: Rem Ovable User Identity Module, referred to as: R-UIM), thumb actuator, flash drive, solid storage device etc..
The terminal device includes but is not limited to personal computer, server computer, hand-held or laptop devices, mobile device (such as mobile phone, mobile phone, tablet computer, personal digital assistant, pager, media player, camera, audio recording device etc.), consumer electronic devices, minicomputer, mainframe computer, etc..
" coupling " refers to that two components combine directly or indirectly to one another.This combination can be fixed or mobility, and this combination can permit flow fluid, and electricity, electric signal or other type signals communicate between the two parts.For example removable data storage device is SD card, terminal device is personal computer, it is then provided with recess member on a personal computer, SD card can be installed in recess member, reach the coupling of SD card and personal computer, or SD card can be coupled by SD card reader with personal computer.
Permanent storage media refers to: the data being stored in a storage medium will not lose after a loss of power.Such as read-only memory (English: Read Only Memory, referred to as: ROM), flash memory (Flash Memory), writeable read-only memory of electrically erasable (English: Electrically Erasable Programmable Read-Only Memory, abbreviation: EEPROM) etc..
Non-permanent storage medium, refers to: the data being stored in a storage medium can lose after a loss of power.Such as random access memory (English: Random Access Memory, referred to as: RAM) etc..
It is multiple, refer to two or more.
In addition, it is necessary to understand, in the description of the present application, the vocabulary such as " first ", " second " are only used for distinguishing the purpose of description, are not understood to indicate or imply relative importance, can not be interpreted as indication or suggestion sequence.
Refering to what is shown in Fig. 1, the hardware structural diagram of the terminal device for the embodiment of the present application application.As shown in Figure 1, terminal device 100 includes display equipment 110, processor 120 and memory 130.Memory 130 can be used for storing software program and data, and processor 120 is stored in the software program and data of memory 130 by operation, thereby executing the various function application and data processing of terminal device 100.Memory 130 can mainly include storing program area and storage data area, wherein storing program area can application program (such as image collecting function etc.) needed for storage program area, at least one function etc.;Storage data area, which can be stored, uses created data (such as audio data, phone directory etc.) etc. according to terminal device 100.In addition, memory 130 may include high-speed random access memory, it can also include nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts etc..Processor 120 is the control centre of terminal device 100, utilize the various pieces of various interfaces and the entire terminal device of connection, by running or executing the software program and/or data that are stored in memory 130, the various functions and processing data for executing terminal device 100, to carry out integral monitoring to terminal device.Processor 120 may include one or more general processors, it may also include one or more digital signal processors (English: Digital Signal Processor, referred to as: DSP), for executing relevant operation, to realize technical solution provided by the embodiment of the present application.
It can also include the camera 160 for shooting photo or video in terminal device 100.Terminal device 100 can also include input equipment 140, digital information, character information or contact touch operation for receiving input/contactless hand Gesture, and generate signal input related with the user setting of terminal device 100 and function control etc..Specifically, in the embodiment of the present application, which may include touch panel 141.Touch panel 141, also referred to as touch screen, collectable user on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus on touch panel 141 or touch panel 141 operation), and corresponding attachment device is driven according to preset formula.Optionally, touch panel 141 may include both touch detecting apparatus and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 120, and can receive order that processor 120 is sent and be executed.Such as, user clicks the corresponding icon of a certain application or legend etc. with finger on touch panel 141, touch detecting apparatus, which detects, this time clicks this signal of bring, then touch controller is delivered it to, this signal is converted into coordinate again and is sent to processor 120 by touch controller, and processor 120 is determined according to the type (click or double-click) of the coordinate and the signal to operation performed by the icon or legend (unlatching).
Touch panel 141 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 141, input equipment 140 can also include other input equipments 142, other input equipments 142 can include but is not limited to one of physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. or a variety of.
Show equipment 110, including display panel 111, for showing information input by user or being supplied to the information of user and the various menu interfaces of terminal device 100 etc., it is mainly used for the collected picture of camera in display terminal 100 in the embodiment of the present application.Optionally, display panel can be using liquid crystal display (English: Liquid Crystal Display, referred to as: LCD) or the forms such as Organic Light Emitting Diode (English: Organic Light-Emitting Diode, referred to as: OLED) configure display panel 111.In some other embodiment, touch panel 141 can be covered on display panel 111, form touch display screen.
In addition to the above, terminal device 100 can also include for the power supply 150 to other module for power supply.Terminal device 100 can also include one or more sensors 170, such as acceleration transducer, light sensor, GPS sensor, infrared sensor, laser sensor, position sensor or camera lens orientation angle sensor etc..Terminal device 100 can also include less radio-frequency (English: Radio Frequency, referred to as: RF) circuit 180, for carrying out network communication with Wireless Communication Equipment, it can also include WiFi module 190, for carrying out WiFi communication with other equipment, it can also include loudspeaker 210, for playing music, voice prompting or sending prompt tone etc..The terminal device 100 further includes communication interface 220, and the communication interface 220 with removable data storage device for being of coupled connections.
The method for first removing removable data storage device according to standard operation for user involved in the embodiment of the present application below.By taking removable data storage device is SD card as an example:
If according to the standard operation for safely removing SD card, it is not in data corruption problem, specification movement is: before user pulls out SD card, SD card is first unloaded inside setting, after equal unloadings success (there is no any SD card read-write operations for the system of terminal device at this time), SD card can be taken out safely.
If not removing removable data storage device according to above-mentioned standard operation, corrupted data or even the damage of removable data storage device may result in.A kind of data processing method and device are provided based on this embodiment of the present application, can be avoided the problem of not removing removable data storage device according to above-mentioned standard operation and lead to corrupted data to a certain extent.Wherein, method and apparatus are that based on the same inventive concept, since the principle that method and device solves the problems, such as is similar, the implementation of apparatus and method can be with cross-reference, and overlaps will not be repeated.
It is shown in Figure 2, in data processing system provided by the embodiments of the present application include removable data storage device 200 with And terminal device 100.Removable data storage device 200 is coupled with terminal device 100.Shown in Figure 3, data processing method includes:
During removable data storage device 200 is written in the first data on terminal device 100, when detecting that the removable data storage device 200 is removed from the terminal device 100, the second data that the removable data storage device 200 is had not been written in first data are stored in the storage medium of the terminal device 100 (S301).When detecting that the removable data storage device 200 is again coupled to the terminal device 100, the removable data storage device 200 (S302) is written into the second data being stored in the storage medium.
In S301, the second data not write in removable data storage device 200 are saved in the storage medium of terminal device 100, which can be non-permanent storage medium, or can be with permanent storage media.The second data are specifically associated with preservation with the identification information of the removable data storage device 200 of removal.The size of data of initial address and second data of second data in removable data storage device etc. information can also be saved.Wherein, when detecting the removable data storage device 200 and being again coupled to the terminal device 100, the identification information of the removable data storage device of the terminal device 100 can be again coupled to by judgement, when identical as the identification information of removable data storage device in the storage medium is stored, it is determined that the removable data storage device 200 is again coupled to the terminal device 100.
In a kind of possible embodiment, in addition to when detecting that the removable data storage device 200 is again coupled to the terminal device 100, the second data being stored in the storage medium are written other than the removable data storage device 200, specifically the removable data storage device 200 can also be written into the second data being stored in the storage medium when reaching any one following opportunity:
The first:
It confirmly detects the removable data storage device 200 and is again coupled to the opportunity of the terminal device 100 as in the first preset duration after detecting that the removable data storage device 200 is removed from the terminal device 100.
Second:
Confirmly detecting the removable data storage device 200 and being again coupled to the opportunity of the terminal device 100 is in the second preset duration when detecting that the removable data storage device 200 is removed from the terminal device 100, after prompting removable data storage device 200 described in user not safely remove.
The third:
After removable data storage device do not safely remove described in prompt user, detect that the removable data storage device 200 is again coupled to the terminal device 100, and detect user's triggering for confirming the instruction not safely removed.
Above-mentioned first preset duration can be the same or different with the second preset duration.The embodiment of the present application is not especially limited this.
In conjunction with Fig. 4, it is based on the first opportunity provided by the embodiments of the present application, data processing method is specifically described:
S401 detects that the removable data storage device 200 is removed from the terminal device 100.
S402, it is determined whether data are written to removable data storage device 200, when determination is, that is, determines and removable data storage device 200 is written into the first data on terminal device 100, execute S403, when being determined as no, then process terminates.
The second data that the removable data storage device 200 is had not been written in first data are stored in the storage medium of the terminal device 100 by S403.Execute S404.
S404, first after detecting that the removable data storage device 200 is removed from the terminal device 100 In preset duration, detect that the removable data storage device 200 is again coupled to the terminal device 100.
The removable data storage device 200 is written in the second data being stored in the storage medium by S405.
Process terminates.
In conjunction with Fig. 5, it is based on second of opportunity provided by the embodiments of the present application, data processing method is specifically described:
S501 detects that the removable data storage device 200 is removed from the terminal device 100.
S502, it is determined whether data are written to removable data storage device 200, when determination is, that is, determines and removable data storage device 200 is written into the first data on terminal device 100, execute S503, when being determined as no, then process terminates.
The second data that the removable data storage device 200 is had not been written in first data are stored in the storage medium of the terminal device 100 by S503.Execute S504.
S504 prompts removable data storage device 200 described in user not safely remove.
S505 detects that the removable data storage device 200 is again coupled to the terminal device 100 in the second preset duration for prompting removable data storage device 200 described in user not safely remove.
The removable data storage device 200 is written in the second data being stored in the storage medium by S506.
Process terminates.
Optionally, if the removable data storage device 200 described in step S504 prompt user reaches the second preset duration after not safely removing, the removable data storage device 200 is not detected and is coupled to the terminal device 100, then is deleted second data from the storage medium.
If above-mentioned storage medium is non-permanent storage medium, if in the second preset duration after step S505 prompts removable data storage device 200 described in user not safely remove, the removable data storage device 200 is not detected and is coupled to the terminal device 100, second data can be moved in permanent storage media by non-permanent storage medium.
Optionally, if S504 removable data storage device 200 described in prompt user reaches third preset duration after not safely removing, it does not detect the removable data storage device 200 also then and is coupled to the terminal device 100, removable data storage device 200 described in the user is prompted not safely remove again.If reaching third preset duration after prompting removable data storage device 200 described in the user not safely remove again, it does not detect the removable data storage device 200 also and is coupled to the terminal device 100, second data can be deleted from the storage medium.
In conjunction with Fig. 6, it is based on the third opportunity provided by the embodiments of the present application, data processing method is specifically described:
S601 detects that the removable data storage device 200 is removed from the terminal device 100.
S602, it is determined whether data are written to removable data storage device 200, when determination is, that is, determines and removable data storage device 200 is written into the first data on terminal device 100, execute S603, when being determined as no, then process terminates.
The second data that the removable data storage device 200 is had not been written in first data are stored in the storage medium of the terminal device 100 by S603.Execute S604.
S604 prompts removable data storage device 200 described in user not safely remove.Execute S605.
S605 detects that the removable data storage device 200 is again coupled to the terminal device 100.Execute S606 or S607.
S606, detect user's triggering for confirming the instruction not safely removed.Execute S608.
S607 detects that the user of user's triggering cancels the instruction not safely removed.Then process terminates.
The removable data storage device 200 is written in the second data being stored in the storage medium by S608.
Process terminates.
Optionally, if the removable data storage device 200 described in step S604 prompt user reaches the second preset duration after not safely removing, the removable data storage device 200 is not detected and is coupled to the terminal device 100, then is deleted second data from the storage medium.
If above-mentioned storage medium is non-permanent storage medium, if in the second preset duration after step S605 prompts removable data storage device 200 described in user not safely remove, the removable data storage device 200 is not detected and is coupled to the terminal device 100, second data can be moved in permanent storage media by non-permanent storage medium.
Optionally, if S604 removable data storage device 200 described in prompt user reaches third preset duration after not safely removing, it does not detect the removable data storage device 200 also then and is coupled to the terminal device 100, removable data storage device 200 described in the user is prompted not safely remove again.If reaching third preset duration after prompting removable data storage device 200 described in the user not safely remove again, it does not detect the removable data storage device 200 also and is coupled to the terminal device 100, second data can be deleted from the storage medium.
In any embodiment provided by the present application, after the removable data storage device 200 is written in the second data that will be stored in the storage medium, user can be prompted to remove removable data storage device 200 according to standard operation.
In addition, in any embodiment provided by the present application, when prompting removable data storage device 200 described in user not safely remove, it can be by the warning that can be heard by a user (for example, a kind of buzzer, alarm device, Deng) prompt user, or the warning that can be seen by a user is (for example, illumination light, flashing light, image is over the display, prompt text is over the display etc.), or can be by alarm (for example, vibration) that user's tactile arrives.Such as, it is shown in Figure 7, illustratively show prompts removable data storage device 200 (by taking SD card as an example) described in user not safely remove by prompt text on the display of terminal device 100 (taking the mobile phone as an example), prompt text is " SD card does not safely remove; storage section Legacy Data please be immediately inserted into SD card and restore Legacy Data ".
Based on inventive concept same as above method embodiment, the embodiment of the present application also provides a kind of data processing equipment, described device is applied to terminal device, can specifically be realized by the processor 120 in terminal device 100.As shown in figure 8, the apparatus may include:
Writing module 801, for the removable data storage device coupled with the terminal device to be written in the first data on terminal device;
Detection module 802, for detecting whether the removable data storage device is removed from the terminal device;
Memory module 803, for during the removable data storage device coupled with the terminal device is written in the first data on terminal device by the write module 801, when the detection module 802 detects that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset storage medium of the terminal device;
Detection module 802, is also used to detect whether the removable data storage device is coupled on the terminal device;
The write module 801 is also used to when the detection module 802 detects that the removable data storage device is again coupled to the terminal device, and the removable data storage device is written in the second data being stored in the storage medium.
In one possible implementation, the detection module 802, it is also used to before the removable data storage device is written in the second data being stored in the storage medium by the write module 801, confirmly detects the removable data storage device and be again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device.
It in one possible implementation, further include cue module 804, for prompting removable data storage device described in user not safely remove when the detection module 802 detects that the removable data storage device is removed from the terminal device.The detection module 802, it is also used to before the removable data storage device is written in the second data being stored in the storage medium by the write module 801, confirmly detect the removable data storage device and be again coupled to opportunity of the terminal device and be after detecting that the removable data storage device is removed from the terminal device, removable data storage device described in cue module prompt user do not safely remove after the second preset duration in.
In one possible implementation, after the detection module 802 detects that the removable data storage device is removed from the terminal device, the cue module 804 prompts removable data storage device described in user not safely remove;The detection module 802 detects that the removable data storage device is again coupled to the terminal device, and detect user's triggering for confirm the instruction not safely removed, then the write module 801 is by the second data being stored in storage medium write-in removable data storage device.
In one possible implementation, described device further include:
Removing module 805, in the second preset duration after not safely removed for the removable data storage device described in the cue module 804 prompt user, the detection module 802 does not detect the removable data storage device and is coupled to the terminal device, then deletes second data from the storage medium.
In one possible implementation, when the storage medium is non-permanent storage medium, the memory module 803, it is also used in the second preset duration after the cue module 804 prompts removable data storage device described in user not safely remove, the detection module 802 does not detect the removable data storage device and is coupled to the terminal device, then is moved to second data in permanent storage media by non-permanent storage medium.
In one possible implementation, the cue module 804, it is also used in the third preset duration after the removable data storage device described in prompt user does not safely remove, the detection module 802 does not detect the removable data storage device and is coupled to the terminal device, and removable data storage device described in the user is prompted not safely remove again.
It is schematical to the division of module in the embodiment of the present application, only a kind of logical function partition, there may be another division manner in actual implementation, in addition, each functional module in each embodiment of the application can integrate in a processor, it is also possible to physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated module both can take the form of hardware realization, can also be realized in the form of software function module.
When using hardware realization, the hardware realization of the terminal device can refer to Fig. 1 and its associated description.
The communication interface 220, for removable data storage device and the terminal device to be coupled;
The memory 130, for storing the first data;
The processor 120, for during the removable data storage device is written in the first data for storing the memory 130, when detecting that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset memory space of the memory;When detecting that the removable data storage device is again coupled to the terminal device, the removable data storage device is written into the second data being stored in the preset memory space.
In one possible implementation, the memory 130 may include the first storage medium and the second storage medium, and first storage medium is for storing first data;
The processor 120, when storing the second data for having not been written to the removable data storage device in first data in the preset memory space of the memory, specifically for second data are stored in the preset memory space of second storage medium.
In one possible implementation, the processor 120 is also used in will be stored in the storage medium Two data are written before the removable data storage device, confirmly detect the removable data storage device and are again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device;Or, confirmly detecting the removable data storage device and being again coupled to the opportunity of the terminal device is in the second preset duration when detecting that the removable data storage device is removed from the terminal device, after prompting removable data storage device described in user not safely remove.
In one possible implementation, the processor, it is also used to after detecting that the removable data storage device is removed from the terminal device, before the removable data storage device is written in the second data that will be stored in the storage medium, removable data storage device described in prompt user does not safely remove, and detect user's triggering for confirming the instruction not safely removed.
In one possible implementation, the processor is also used in the second preset duration after the removable data storage device described in prompt user does not safely remove, does not detect the removable data storage device and be coupled to the terminal device;Second data are deleted from the memory space, or when the corresponding storage medium of the preset memory space is non-permanent storage medium, are then moved to second data in permanent storage media by non-permanent storage medium.
In one possible implementation, the processor, it is also used in the third preset duration after the removable data storage device described in prompt user does not safely remove, the removable data storage device is not detected and is coupled to the terminal device, and removable data storage device described in the user is prompted not safely remove again.
In one possible implementation, the processor is when prompting removable data storage device described in user not safely remove, it is not safely removed specifically for prompting removable data storage device described in user not safely remove by the display interface of the display, or by removable data storage device described in loudspeaker prompt user.
The embodiment of the present application, into removable data storage device write-in data procedures, when detecting that removable data storage device is surprisingly removed, the part not being written is stored in preset storage medium, to when detecting that the removable data storage device is again coupled to the terminal device, it is continued to write in the removable data storage device in the part not being written, to ensure that the integrality of data to a certain extent and avoid data and be damaged.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program product.Therefore, the form of complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application.Moreover, the form for the computer program product implemented in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) that one or more wherein includes computer usable program code can be used in the application.
The application is that reference is described according to the flowchart and/or the block diagram of the method for the embodiment of the present application, equipment (system) and computer program product.It should be understood that the combination of process and/or box in each flow and/or block and flowchart and/or the block diagram that can be realized by computer program instructions in flowchart and/or the block diagram.These computer program instructions be can provide to the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to generate a machine, so that generating by the instruction that computer or the processor of other programmable data processing devices execute for realizing the device for the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, to be able to guide in computer or other programmable data processing devices computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates the manufacture including command device, which realizes the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that series of operation steps are executed on a computer or other programmable device to generate computer implemented processing, thus the step of instruction executed on a computer or other programmable device is provided for realizing the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram.
Obviously, those skilled in the art can carry out various modification and variations without departing from the spirit and scope of the embodiment of the present application to the embodiment of the present application.If then the application is also intended to include these modifications and variations in this way, these modifications and variations of the embodiment of the present application belong within the scope of the claim of this application and its equivalent technologies.

Claims (12)

  1. A kind of data processing method characterized by comprising
    During the removable data storage device coupled with the terminal device is written in the first data on terminal device, when detecting that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset storage medium of the terminal device;
    When detecting that the removable data storage device is again coupled to the terminal device, the removable data storage device is written into the second data being stored in the storage medium.
  2. The method as described in claim 1, which is characterized in that before the removable data storage device by the second data being stored in storage medium write-in, the method also includes:
    It confirmly detects the removable data storage device and is again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device;Alternatively,
    Confirmly detecting the removable data storage device and being again coupled to the opportunity of the terminal device is in the second preset duration when detecting that the removable data storage device is removed from the terminal device, after prompting removable data storage device described in user not safely remove.
  3. The method as described in claim 1, it is characterized in that, after detecting that the removable data storage device is removed from the terminal device, before the removable data storage device is written in the second data that will be stored in the storage medium, the method also includes:
    Removable data storage device described in prompt user does not safely remove, and detect user's triggering for confirming the instruction not safely removed.
  4. Method as claimed in claim 2 or claim 3, which is characterized in that the method also includes:
    In the second preset duration after prompting removable data storage device described in user not safely remove, the removable data storage device is not detected and is coupled to the terminal device;
    Second data are deleted from the storage medium, or when the storage medium is non-permanent storage medium, are then moved to second data in permanent storage media by non-permanent storage medium.
  5. Method as claimed in claim 2 or claim 3, which is characterized in that the method also includes:
    In the third preset duration after prompting removable data storage device described in user not safely remove, the removable data storage device is not detected and is coupled to the terminal device, and removable data storage device described in the user is prompted not safely remove again.
  6. A kind of data processing equipment, which is characterized in that described device is applied to terminal device, comprising:
    Communication interface, processor and memory;
    The communication interface, for removable data storage device and the terminal device to be coupled;
    The memory, for storing the first data;
    The processor, for during the removable data storage device is written in the first data for storing the memory, when detecting that the removable data storage device is removed from the terminal device, the second data that the removable data storage device is had not been written in first data are stored in the preset memory space of the memory;When detecting that the removable data storage device is again coupled to the terminal device, the removable data storage device is written into the second data being stored in the preset memory space.
  7. Device as claimed in claim 6, which is characterized in that the memory includes the first storage medium and the second storage medium, and first storage medium is for storing first data;
    The processor, when storing the second data for having not been written to the removable data storage device in first data in the preset memory space of the memory, specifically for second data are stored in the preset memory space of second storage medium.
  8. Device as claimed in claims 6 or 7, it is characterized in that, the processor, it is also used to before the removable data storage device is written in the second data that will be stored in the storage medium, confirmly detects the removable data storage device and be again coupled to the opportunity of the terminal device as in the first preset duration after detecting that the removable data storage device is removed from the terminal device;Or, confirmly detecting the removable data storage device and being again coupled to the opportunity of the terminal device is in the second preset duration when detecting that the removable data storage device is removed from the terminal device, after prompting removable data storage device described in user not safely remove.
  9. Device as claimed in claims 6 or 7, it is characterized in that, the processor, it is also used to after detecting that the removable data storage device is removed from the terminal device, before the removable data storage device is written in the second data that will be stored in the storage medium, removable data storage device described in prompt user does not safely remove, and detect user's triggering for confirming the instruction not safely removed.
  10. Device as claimed in claim 8 or 9, it is characterized in that, the processor is also used in the second preset duration after the removable data storage device described in prompt user does not safely remove, does not detect the removable data storage device and be coupled to the terminal device;
    Second data are deleted from the memory space, or when the corresponding storage medium of the preset memory space is non-permanent storage medium, are then moved to second data in permanent storage media by non-permanent storage medium.
  11. Device as claimed in claim 8 or 9, it is characterized in that, the processor, it is also used in the third preset duration after the removable data storage device described in prompt user does not safely remove, the removable data storage device is not detected and is coupled to the terminal device, and removable data storage device described in the user is prompted not safely remove again.
  12. Such as the described in any item devices of claim 8 to 11, which is characterized in that described device further includes display or loudspeaker;
    The processor is when prompting removable data storage device described in user not safely remove, it is not safely removed specifically for prompting removable data storage device described in user not safely remove by the display interface of the display, or by removable data storage device described in loudspeaker prompt user.
CN201780012551.1A 2017-03-13 2017-05-27 Data processing method and device Active CN109074301B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201710147617X 2017-03-13
CN201710147617 2017-03-13
PCT/CN2017/086277 WO2018166072A1 (en) 2017-03-13 2017-05-27 Method and device for data processing

Publications (2)

Publication Number Publication Date
CN109074301A true CN109074301A (en) 2018-12-21
CN109074301B CN109074301B (en) 2021-10-08

Family

ID=63521688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780012551.1A Active CN109074301B (en) 2017-03-13 2017-05-27 Data processing method and device

Country Status (2)

Country Link
CN (1) CN109074301B (en)
WO (1) WO2018166072A1 (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5734894A (en) * 1995-04-25 1998-03-31 Honeywell Inc. Methods and apparatus for protecting the integrity of process data stored on a removable storage medium
CN1311509A (en) * 2000-03-03 2001-09-05 株式会社日立制作所 High reliability memory driver, and data write method therefor
US20070043903A1 (en) * 2005-08-19 2007-02-22 Seiko Epson Corporation Data Processing Apparatus and Method, Control Program Therefor, and Recording Medium Having Program Recorded Thereon
US20090019194A1 (en) * 2005-03-28 2009-01-15 Matsushita Electric Industrial Co., Ltd. Storage device
CN101566992A (en) * 2008-04-24 2009-10-28 扬智科技股份有限公司 System and method for data storage
CN101604547A (en) * 2009-07-07 2009-12-16 中兴通讯股份有限公司 A kind of disk array hot-swap data Write-protect system and method
US20090319725A1 (en) * 2008-06-23 2009-12-24 International Business Machines Corporation Methods, Systems and Computer Program Products for Detection of Frequent Improper Removals of and Changing Writing Policies to Prevent Data Loss in Memory Sticks
CN101828189A (en) * 2008-07-22 2010-09-08 Lsi公司 Data storage method, apparatus and system for interrupted write recovery
CN102750202A (en) * 2012-06-06 2012-10-24 宇龙计算机通信科技(深圳)有限公司 Data protection method and device
CN102866964A (en) * 2012-09-18 2013-01-09 北京奇虎科技有限公司 Method and device for protecting data on storage equipment
CN102929750A (en) * 2011-09-12 2013-02-13 微软公司 Nonvolatile media dirty region tracking
CN103262054A (en) * 2010-12-13 2013-08-21 弗森-艾奥公司 Apparatus, system, and method for auto-commit memory
CN103577124A (en) * 2013-11-15 2014-02-12 华为终端有限公司 Method and device for prompting read-write state of external storage equipment
CN104346241A (en) * 2013-08-07 2015-02-11 希捷科技有限公司 Torn write mitigation
CN104503703A (en) * 2014-12-16 2015-04-08 华为技术有限公司 Cache processing method and device
CN104699413A (en) * 2013-12-09 2015-06-10 群联电子股份有限公司 Data management method, memorizer saving device and memorizer control circuit unit
CN105138280A (en) * 2015-07-31 2015-12-09 成都华为技术有限公司 Data write-in method, apparatus and system
CN105700971A (en) * 2014-11-28 2016-06-22 东莞宇龙通信科技有限公司 Data backup method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115095A (en) * 2004-10-13 2006-04-27 Kyocera Mita Corp Image forming apparatus and computer-readable storage medium
CN101458672B (en) * 2007-12-10 2011-08-24 联想(北京)有限公司 Hot plug equipment, computer and data-transmission indicating method
CN102087623A (en) * 2010-12-02 2011-06-08 东方口岸科技有限公司 Data protection method during power-fail of special USB (Universal Serial Bus) storage equipment in data updating
US9858078B2 (en) * 2015-06-02 2018-01-02 International Business Machines Corporation Speculative load data in byte-write capable register file and history buffer for a multi-slice microprocessor

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5734894A (en) * 1995-04-25 1998-03-31 Honeywell Inc. Methods and apparatus for protecting the integrity of process data stored on a removable storage medium
CN1311509A (en) * 2000-03-03 2001-09-05 株式会社日立制作所 High reliability memory driver, and data write method therefor
US20090019194A1 (en) * 2005-03-28 2009-01-15 Matsushita Electric Industrial Co., Ltd. Storage device
US20070043903A1 (en) * 2005-08-19 2007-02-22 Seiko Epson Corporation Data Processing Apparatus and Method, Control Program Therefor, and Recording Medium Having Program Recorded Thereon
CN101566992A (en) * 2008-04-24 2009-10-28 扬智科技股份有限公司 System and method for data storage
US20090319725A1 (en) * 2008-06-23 2009-12-24 International Business Machines Corporation Methods, Systems and Computer Program Products for Detection of Frequent Improper Removals of and Changing Writing Policies to Prevent Data Loss in Memory Sticks
CN101828189A (en) * 2008-07-22 2010-09-08 Lsi公司 Data storage method, apparatus and system for interrupted write recovery
CN101604547A (en) * 2009-07-07 2009-12-16 中兴通讯股份有限公司 A kind of disk array hot-swap data Write-protect system and method
CN103262054A (en) * 2010-12-13 2013-08-21 弗森-艾奥公司 Apparatus, system, and method for auto-commit memory
CN102929750A (en) * 2011-09-12 2013-02-13 微软公司 Nonvolatile media dirty region tracking
CN102750202A (en) * 2012-06-06 2012-10-24 宇龙计算机通信科技(深圳)有限公司 Data protection method and device
CN102866964A (en) * 2012-09-18 2013-01-09 北京奇虎科技有限公司 Method and device for protecting data on storage equipment
CN104346241A (en) * 2013-08-07 2015-02-11 希捷科技有限公司 Torn write mitigation
CN103577124A (en) * 2013-11-15 2014-02-12 华为终端有限公司 Method and device for prompting read-write state of external storage equipment
CN104699413A (en) * 2013-12-09 2015-06-10 群联电子股份有限公司 Data management method, memorizer saving device and memorizer control circuit unit
CN105700971A (en) * 2014-11-28 2016-06-22 东莞宇龙通信科技有限公司 Data backup method and device
CN104503703A (en) * 2014-12-16 2015-04-08 华为技术有限公司 Cache processing method and device
CN105138280A (en) * 2015-07-31 2015-12-09 成都华为技术有限公司 Data write-in method, apparatus and system

Also Published As

Publication number Publication date
CN109074301B (en) 2021-10-08
WO2018166072A1 (en) 2018-09-20

Similar Documents

Publication Publication Date Title
EP3252644B1 (en) Method for activating function using fingerprint and electronic device including touch display supporting the same
CN107402663B (en) Fingerprint verification method and electronic device for executing the method
EP2746979B1 (en) Mobile device having face recognition function using additional component and method for controlling the mobile device
US11581673B2 (en) Card holder and mobile terminal
US20140359493A1 (en) Method, storage medium, and electronic device for mirroring screen data
KR102179156B1 (en) Input device for electronic device and input method using the same
US20140160045A1 (en) Terminal and method for providing user interface using a pen
US20140317499A1 (en) Apparatus and method for controlling locking and unlocking of portable terminal
US10802622B2 (en) Electronic device and method for controlling same
CN109416616B (en) Electronic device and operation method thereof
CN107450773B (en) False touch prevention method, terminal and computer readable storage medium
US9888451B2 (en) Method of dynamically associating an accessory ID with a portable memory device and displaying confirmation of the association
CN104536848A (en) Firmware recovery method, device and terminal
WO2019000287A1 (en) Icon display method and device
US9563393B2 (en) Information processing method and electronic device
KR20180074983A (en) Method for obtaining bio data and an electronic device thereof
US20140281962A1 (en) Mobile device of executing action in display unchecking mode and method of controlling the same
KR102536148B1 (en) Method and apparatus for operation of an electronic device
US10013172B2 (en) Electronic data storage device with multiple configurable data storage mediums
US20140062965A1 (en) Apparatus for measuring coordinates and control method thereof
KR102265648B1 (en) Electronic device and method of sending a message using electronic device
KR20150001130A (en) Method for processing user input and apparatus for the same
US9813096B2 (en) Playback of visual or audio content related to a captured image
CN109491825B (en) Method, device, storage medium and terminal for positioning abnormal starting problem
CN109074301A (en) A kind of data processing method and device

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

Effective date of registration: 20210428

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Applicant after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

GR01 Patent grant
GR01 Patent grant