WO2018166072A1 - Method and device for data processing - Google Patents
Method and device for data processing Download PDFInfo
- Publication number
- WO2018166072A1 WO2018166072A1 PCT/CN2017/086277 CN2017086277W WO2018166072A1 WO 2018166072 A1 WO2018166072 A1 WO 2018166072A1 CN 2017086277 W CN2017086277 W CN 2017086277W WO 2018166072 A1 WO2018166072 A1 WO 2018166072A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data storage
- storage device
- removable data
- terminal device
- removable
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/28—Error detection; Error correction; Monitoring by checking the correct order of processing
Definitions
- the present application relates to the field of data storage technologies, and in particular, to a data processing method and apparatus.
- the embodiment of the present application provides a data processing method and device, which are used to solve the problem of data corruption caused by the removal of an SD card that is not performed according to the correct operation in the prior art.
- the embodiment of the present application provides a data processing method, including: detecting, in a process of writing first data on a terminal device to a removable data storage device coupled to the terminal device, And storing, when the mobile data storage device is removed from the terminal device, the second data in the first data that has not been written into the removable data storage device in a preset storage medium of the terminal device And detecting, when the removable data storage device is coupled to the terminal device again, writing the second data stored in the storage medium to the removable data storage device.
- the unwritten portion in the process of writing data to the removable data storage device, when it is detected that the removable data storage device is accidentally removed, the unwritten portion is stored in the preset storage medium, thereby detecting the When the removable data storage device is coupled to the terminal device again, the unwritten portion continues to be written into the removable data storage device, thereby ensuring data integrity to a certain extent and avoiding data corruption.
- the method before the second data stored in the storage medium is written into the removable data storage device, the method further comprises: determining that the removable data storage device is detected again The timing of coupling to the terminal device is within a first preset time period after detecting that the removable data storage device is removed from the terminal device; or determining that the removable data storage device is detected again The timing of coupling to the terminal device is to prompt the user that the removable data storage device is not safely removed within a second preset time period after detecting that the removable data storage device is removed from the terminal device .
- the terminal device after detecting that the removable data storage device is coupled to the terminal device again within a first preset time period after the removable data storage device is removed from the terminal device, Will be stored in the office
- the second data in the storage medium is written to the removable data storage device, and when the user removable data storage device is no longer coupled to the terminal device for a long time, the terminal device no longer detects whether the removable data storage device is coupled again to
- the terminal device can reduce the consumption of the power of the terminal device to a certain extent.
- the method may further include prompting the user that the removable data storage device is not securely removed and detecting an instruction triggered by the user to confirm that there is no secure removal.
- the removable data storage device After detecting that the removable data storage device is removed from the terminal device, prompting the user that the removable data storage device is not securely removed, detecting that the removable data storage device is coupled again
- the terminal device is detected and the user-triggered instruction for confirming that there is no safe removal is detected
- the second data stored in the storage medium is written into the removable data storage device, and the user can be prompted to move
- the removable data storage device data is not secure, so that the user can connect the removable data storage device to the terminal device again in time, and timely write the second data stored in the storage medium to the movable data.
- the storage device guarantees the integrity of the data to a certain extent and avoids data corruption.
- the method may further include: detecting, in the second preset duration after the user is prompted that the removable data storage device is not safely removed, detecting that the removable data storage device is coupled to the a terminal device; deleting the second data from the storage medium, or moving the second data from a non-permanent storage medium to a permanent storage when the storage medium is a non-permanent storage medium In the medium.
- the removable data storage device in the second preset duration after prompting the user that the removable data storage device is not safely removed, the removable data storage device is not detected to be coupled to the terminal device, and the second is timely The data is deleted from the storage medium to prevent the second data from occupying the storage medium for a long time.
- the storage medium is a non-permanent storage medium
- the second data is moved from the non-permanent storage medium to the permanent storage medium, and the unwritten useful data can be avoided at the terminal device. Loss after power, to a certain extent to ensure the security of the data.
- the method may further include: detecting, in the third preset duration after the user is prompted that the removable data storage device is not safely removed, detecting that the removable data storage device is coupled to the Said terminal device, again prompting said user that said removable data storage device is not securely removed, so that the user can timely know that the mobile data storage device is not securely removed, and connect the removable data storage device to the terminal device in time Therefore, the terminal device can continue to write the unwritten data into the removable data storage device in time, which ensures the integrity of the data and the data corruption.
- the embodiment of the present application further provides a data processing device, where the device is applied to a terminal device, including:
- the communication interface for coupling a removable data storage device with the terminal device; the memory for storing first data; the processor for The first data stored in the memory is written into the removable data storage device, and when the removable data storage device is detected to be removed from the terminal device, the first data is not yet The second data written to the removable data storage device is stored in a predetermined storage space of the memory; when the removable data storage device is detected to be coupled to the terminal device again, The second data in the preset storage space is written to the removable data storage device.
- the memory includes a first storage medium and a second storage medium, the first storage a storage medium for storing the first data;
- the processor when storing the second data of the first data that has not been written into the removable data storage device in a preset storage space of the memory, specifically for using the second Data is stored in the preset storage space of the second storage medium.
- the processor is further configured to determine that the removable data storage device is detected before writing the second data stored in the storage medium to the removable data storage device The timing of coupling to the terminal device again is within a first preset time period after detecting that the removable data storage device is removed from the terminal device; or determining that the removable data storage device is detected Re-coupling to the terminal device is a second preset duration after prompting the user that the removable data storage device is not safely removed, when detecting that the removable data storage device is removed from the terminal device Inside.
- the processor is further configured to: after detecting that the removable data storage device is removed from the terminal device, in the second data to be stored in the storage medium Prior to writing to the removable data storage device, the user is prompted that the removable data storage device is not securely removed and an instruction triggered by the user to confirm that there is no secure removal is detected.
- the processor is further configured to detect that the removable data storage device is coupled to the second preset duration after prompting the user that the removable data storage device is not safely removed.
- the terminal device deletes the second data from the storage space, or when the storage medium corresponding to the preset storage space is a non-permanent storage medium, the second data is non-permanent
- the storage medium is moved to a permanent storage medium.
- the processor is further configured to detect that the removable data storage device is coupled to the third preset duration after prompting the user that the removable data storage device is not safely removed.
- the terminal device again prompts the user that the removable data storage device is not securely removed.
- the device further includes a display or a speaker; when the processor prompts the user that the removable data storage device is not safely removed, specifically for prompting the user through the display interface of the display The removable data storage device is not securely removed, or the user is prompted by the speaker that the removable data storage device is not securely removed.
- an embodiment of the present application provides a data processing apparatus, where the apparatus includes:
- a writing module configured to write the first data on the terminal device to the removable data storage device coupled to the terminal device;
- a detecting module configured to detect whether the removable data storage device is removed from the terminal device
- a storage module configured to: when the writing module writes first data on the terminal device into the removable data storage device coupled to the terminal device, the detecting module detects the removable data storage device When being removed from the terminal device, the second data of the first data that has not been written into the removable data storage device is stored in a preset storage medium of the terminal device;
- a detecting module configured to detect whether the removable data storage device is coupled to the terminal device
- the writing module is further configured to: when the detecting module detects that the movable data storage device is coupled to the terminal device again, write second data stored in the storage medium to the movable device Data storage device.
- the detecting module is further configured to: before the writing module writes the second data stored in the storage medium into the removable data storage device, determining to detect the The timing at which the removable data storage device is coupled to the terminal device again is within a first predetermined duration after detecting that the removable data storage device is removed from the terminal device.
- the method further includes a prompting module, when the detecting module detects that the removable data storage device is removed from the terminal device, prompting the user that the removable data storage device does not Safely removed.
- the detecting module is further configured to: before the writing module writes the second data stored in the storage medium to the removable data storage device, determine that the removable data storage device is detected to be coupled again The timing of the terminal device is that after detecting that the removable data storage device is removed from the terminal device, the prompting module prompts the user that the removable data storage device has no second preset after being safely removed. Within the time.
- the prompting module prompts the user that the removable data storage device is not safely removed.
- the detection module detects that the removable data storage device is coupled to the terminal device again, and detects a user-triggered instruction for confirming that there is no secure removal, then the write module is to be stored in the storage Second data in the medium is written to the removable data storage device.
- the device further includes:
- a deleting module configured to, within a second preset duration after the prompting module prompts the user that the removable data storage device is not safely removed, the detecting does not detect that the removable data storage device is coupled to the The terminal device deletes the second data from the storage medium.
- the storage module is further configured to: after the prompting module prompts the user that the removable data storage device is not safely removed Within two preset durations, the detecting does not detect that the removable data storage device is coupled to the terminal device, and the second data is moved from the non-permanent storage medium to the permanent storage medium.
- the prompting module is further configured to: after the prompting the user that the removable data storage device is not safely removed, the detecting module does not detect the movable data.
- a storage device is coupled to the terminal device, again prompting the user that the removable data storage device is not securely removed.
- the embodiment of the present application further provides a computer storage medium, where the software program stores a software program, where the software program can implement the first aspect or the first one when being read and executed by one or more processors Any of the aspects provided by the design.
- an embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing a computer to perform the method provided by any one of the above first aspect or the first aspect.
- FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
- FIG. 2 is a schematic diagram of a data processing system according to an embodiment of the present application.
- FIG. 3 is a flowchart of a data processing method according to an embodiment of the present application.
- FIG. 5 is a flowchart of still another data processing method according to an embodiment of the present application.
- FIG. 6 is a flowchart of still another data processing method according to an embodiment of the present application.
- FIG. 7 is a schematic diagram of prompt information displayed by a terminal device according to an embodiment of the present disclosure.
- FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present application.
- a removable data storage device including a memory, configured to store data.
- the removable data storage device may be a subscriber identification module (English: Subscriber Identification Module, SIM for short), a secure digital (English: Secure Digital Memory, SD) memory card, or an integrated circuit (IC: integrated circuit) Memory, a universal serial bus (English: Universal Serial Bus, USB for short), a universal integrated circuit card (English: Universal Integrated Circuit Card, UICC), removable user identification module (English: Removable User) Identity Module (R-UIM), thumb drive, flash drive, solid state storage device, etc.
- SIM Subscriber Identification Module
- SD Secure Digital Memory
- IC integrated circuit
- a universal serial bus English: Universal Serial Bus, USB for short
- a universal integrated circuit card English: Universal Integrated Circuit Card, UICC
- removable user identification module English: Removable User) Identity Module (R-UIM)
- thumb drive flash drive
- solid state storage device etc.
- the terminal device includes, but is not limited to, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a cell phone, a mobile phone, a tablet, a personal digital assistant, a pager, a media player, a camera, an audio recording device, etc.) ), consumer electronics, small computers, large computers, and more.
- a personal computer such as a cell phone, a mobile phone, a tablet, a personal digital assistant, a pager, a media player, a camera, an audio recording device, etc.
- a mobile device such as a cell phone, a mobile phone, a tablet, a personal digital assistant, a pager, a media player, a camera, an audio recording device, etc.
- Coupled means that two components are bonded directly or indirectly to each other. This combination may be fixed or movable, and this combination may allow for the transfer of fluid, electrical, electrical signals or other types of signals between the two components.
- the removable data storage device is an SD card
- the terminal device is a personal computer.
- the personal computer is provided with a recessed member, and the SD card can be mounted on the concave member to achieve the coupling between the SD card and the personal computer, or the SD card can be Coupled with a personal computer via an SD card reader.
- Permanent storage medium means that data stored in the storage medium will not be lost after power off.
- read only memory English: Read Only Memory, ROM for short
- flash memory Flash Memory
- electrically erasable write-read only memory Edinburgh: Electrically Erasable Programmable Read-Only Memory, EEPROM for short.
- Non-permanent storage medium means that data stored in the storage medium will be lost after power off.
- Such as random access memory English: Random Access Memory, referred to as: RAM.
- Multiple means two or more.
- the terminal device 100 includes a display device 110, a processor 120, and a memory 130.
- the memory 130 can be used to store software programs and data, and the processor 120 executes various functional applications and data processing of the terminal device 100 by running software programs and data stored in the memory 130.
- the memory 130 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as an image collection function, etc.), and the like; and the storage data area may be stored according to the terminal device 100. Use the created data (such as audio data, phone book, etc.).
- the memory 130 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device or the like.
- the processor 120 is a control center of the terminal device 100, and connects various parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device 100 by running or executing software programs and/or data stored in the memory 130. And process the data to monitor the terminal device as a whole.
- the processor 120 may include one or more general-purpose processors, and may also include one or more digital signal processors (English: Digital Signal Processor, DSP for short) for performing related operations to implement the embodiments of the present application. Technical solution.
- a camera 160 for taking a photo or video may also be included in the terminal device 100.
- the terminal device 100 may further include an input device 140 for receiving input digital information, character information, or contact touch operation/contactless hand Potential, and signal input related to user setting and function control of the terminal device 100 are generated.
- the input device 140 may include a touch panel 141.
- the touch panel 141 also referred to as a touch screen, can collect touch operations on or near the user (such as the user's operation on the touch panel 141 or on the touch panel 141 using any suitable object or accessory such as a finger, a stylus, or the like. ), and drive the corresponding connection device according to a preset program.
- the touch panel 141 may include two parts: a touch detection device and a touch controller.
- the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller;
- the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
- the processor 120 is provided and can receive commands from the processor 120 and execute them.
- the user clicks on an icon or a legend corresponding to an application on the touch panel 141, and the touch detection device detects the signal brought by the click, and then transmits the signal to the touch controller, and touches The controller then converts this signal to coordinates for transmission to processor 120, which determines the operation (on) for the icon or legend based on the coordinates and the type of the signal (click or double click).
- the touch panel 141 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
- the input device 140 may further include other input devices 142, which may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like. One or more of them.
- the display device 110 includes a display panel 111 for displaying information input by the user or information provided to the user, and various menu interfaces of the terminal device 100, etc., which are mainly used for displaying the camera in the terminal device 100 in the embodiment of the present application.
- the captured picture can be configured by using a liquid crystal display (English: Liquid Crystal Display, LCD for short) or an organic light-emitting diode (English: Organic Light-Emitting Diode, OLED for short).
- the touch panel 141 can cover the display panel 111 to form a touch display screen.
- the terminal device 100 may further include a power source 150 for supplying power to other modules.
- the terminal device 100 may also include one or more sensors 170, such as an acceleration sensor, a light sensor, a GPS sensor, an infrared sensor, a laser sensor, a position sensor or a lens pointing angle sensor, and the like.
- the terminal device 100 may further include a radio frequency (English: Radio Frequency, RF for short) circuit 180 for performing network communication with the wireless network device, and may further include a WiFi module 190 for performing WiFi communication with other devices, and may also include
- the speaker 210 is used for playing music, voice prompts or sounding prompts and the like.
- the terminal device 100 further includes a communication interface 220 for coupling connection with the removable data storage device.
- a data processing method and apparatus which can avoid the problem of data corruption caused by not removing the removable data storage device according to the above specification operation.
- the method and the device are based on the same inventive concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
- the data processing system provided by the embodiment of the present application includes a removable data storage device 200. And the terminal device 100.
- the removable data storage device 200 is coupled to the terminal device 100.
- the data processing method includes:
- the removable data storage device 200 In the process of writing the first data on the terminal device 100 to the removable data storage device 200, detecting the first data when the removable data storage device 200 is removed from the terminal device 100 The second data that has not been written into the removable data storage device 200 is stored in the storage medium of the terminal device 100 (S301). Upon detecting that the removable data storage device 200 is coupled again to the terminal device 100, the second data stored in the storage medium is written to the removable data storage device 200 (S302).
- the second data that is not written in the removable data storage device 200 is saved to the storage medium of the terminal device 100, and the storage medium may be a non-permanent storage medium or may be a permanent storage medium.
- the second data is associated with the identification information of the removed removable data storage device 200.
- Information such as a start address of the second data in the removable data storage device, a data size of the second data, and the like may also be saved.
- the removable data storage device 200 When detecting that the removable data storage device 200 is coupled to the terminal device 100 again, it may be stored in the storage medium by determining identification information of the removable data storage device coupled to the terminal device 100 again. When the identification information of the removable data storage device is the same, it is determined that the removable data storage device 200 is coupled to the terminal device 100 again.
- writing second data stored in the storage medium to the removable data storage may be written into the removable data storage device 200 when any of the following timings is reached:
- Determining that the timing of detecting that the removable data storage device 200 is coupled to the terminal device 100 is the first preset duration after detecting that the removable data storage device 200 is removed from the terminal device 100 Inside.
- Determining that the time when the removable data storage device 200 is detected to be coupled to the terminal device 100 is to prompt the user to move when detecting that the removable data storage device 200 is removed from the terminal device 100
- the data storage device 200 is not within the second preset time period after the security removal.
- the third type is the third type.
- the removable data storage device 200 is again coupled to the terminal device 100 and detects a user-triggered instruction for confirming that there is no secure removal.
- the first preset duration and the second preset duration may be the same or different. This embodiment of the present application does not specifically limit this.
- the mobile data storage device 200 is not detected to be connected to the terminal device 100 after the user is prompted to perform the second preset duration after the removable data storage device 200 is not securely removed, the device is not detected to be coupled to the terminal device 100.
- the second data is deleted from the storage medium.
- the storage medium is a non-permanent storage medium
- the removable data storage device 200 is not detected to be coupled to The terminal device 100 can move the second data from a non-permanent storage medium to a permanent storage medium.
- the S504 reaches the third preset duration after prompting the user that the removable data storage device 200 is not securely removed, the removable data storage device 200 has not been detected to be coupled to the terminal device 100, again The user is prompted that the removable data storage device 200 is not securely removed. If the user is again prompted that the removable data storage device 200 has not been securely removed and reaches a third preset duration, and the removable data storage device 200 has not been detected to be coupled to the terminal device 100, the The two data are deleted from the storage medium.
- the mobile data storage device 200 is not detected to be connected to the terminal device 100 after the user is prompted to perform the second preset duration after the removable data storage device 200 is not securely removed, the device is not detected to be coupled to the terminal device 100.
- the second data is deleted from the storage medium.
- the storage medium is a non-permanent storage medium
- the removable data storage device 200 is not detected to be coupled to The terminal device 100 can move the second data from a non-permanent storage medium to a permanent storage medium.
- the S604 reaches the third preset duration after prompting the user that the removable data storage device 200 is not securely removed, the removable data storage device 200 has not been detected to be coupled to the terminal device 100, again The user is prompted that the removable data storage device 200 is not securely removed. If the user is again prompted that the removable data storage device 200 has not been securely removed and reaches a third preset duration, and the removable data storage device 200 has not been detected to be coupled to the terminal device 100, the The two data are deleted from the storage medium.
- the user may be prompted to remove the removable data storage device 200 according to the specification operation. .
- an alert sound that can be heard by the user eg, a beep, an alarm, And so on, alerting the user, or a warning that can be seen by the user (eg, illumination light, flashing lights, images on the display, prompting text on the display, etc.), or an alert (eg, vibration) that can be perceived by the user.
- the prompt text is "The SD card is not safely removed, and the stored part of the data is left, please insert the SD card to restore the legacy data immediately."
- the embodiment of the present application further provides a data processing device, where the device is applied to a terminal device, and may be implemented by the processor 120 in the terminal device 100.
- the apparatus may include:
- the writing module 801 is configured to write the first data on the terminal device to the removable data storage device coupled to the terminal device;
- a detecting module 802 configured to detect whether the removable data storage device is removed from the terminal device
- a storage module 803 configured to: when the writing module 801 writes first data on the terminal device into the removable data storage device coupled to the terminal device, the detecting module 802 detects the movable When the data storage device is removed from the terminal device, the second data of the first data that has not been written into the removable data storage device is stored in a preset storage medium of the terminal device;
- the detecting module 802 is further configured to detect whether the removable data storage device is coupled to the terminal device;
- the writing module 801 is further configured to: when the detecting module 802 detects that the removable data storage device is coupled to the terminal device again, write the second data stored in the storage medium into the Removable data storage device.
- the detecting module 802 is further configured to determine, before the writing module 801 writes the second data stored in the storage medium to the removable data storage device, The timing of coupling the removable data storage device to the terminal device is within a first predetermined time period after detecting that the removable data storage device is removed from the terminal device.
- the prompting module 804 is further configured to prompt the user to move the data when the detecting module 802 detects that the removable data storage device is removed from the terminal device. The storage device is not safely removed.
- the detecting module 802 is further configured to determine that the removable data storage device is detected again before the writing module 801 writes the second data stored in the storage medium to the removable data storage device.
- the timing of coupling to the terminal device is to prompt the user that the removable data storage device is not securely removed after detecting that the removable data storage device is removed from the terminal device Within the preset duration.
- the prompting module 804 prompts the user that the removable data storage device does not Safely removing; the detection module 802 detects that the removable data storage device is coupled to the terminal device again, and detects a user-triggered instruction for confirming that there is no secure removal, then the write module 801 will Second data stored in the storage medium is written to the removable data storage device.
- the device further includes:
- a deleting module 805, configured to: after the prompting module 804 prompts the user that the removable data storage device is not safely removed, the detecting module 802 does not detect that the removable data storage device is coupled to The terminal device deletes the second data from the storage medium.
- the storage module 803 is further configured to prompt the user that the removable data storage device is not safely removed at the prompting module 804. After the second preset duration, the detecting module 802 does not detect that the removable data storage device is coupled to the terminal device, and then moves the second data from the non-permanent storage medium to the permanent storage medium. .
- the prompting module 804 is further configured to: after the prompting the user that the removable data storage device is not safely removed, the detecting module 802 does not detect the A removable data storage device is coupled to the terminal device, again prompting the user that the removable data storage device is not securely removed.
- each functional module in each embodiment of the present application may be integrated into one processing. In the device, it can also be physically existed alone, or two or more modules can be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- the hardware implementation of the terminal device can refer to FIG. 1 and its related description.
- the communication interface 220 is configured to couple the removable data storage device with the terminal device;
- the memory 130 is configured to store first data.
- the processor 120 is configured to detect that the removable data storage device is removed from the terminal device during writing of the first data stored in the memory 130 to the removable data storage device And storing, in the first data, second data that has not been written into the removable data storage device in a preset storage space of the memory; detecting that the removable data storage device is coupled to When the terminal device is used, the second data stored in the preset storage space is written into the removable data storage device.
- the memory 130 may include a first storage medium and a second storage medium, where the first storage medium is configured to store the first data;
- the processor 120 is configured to: when the second data that has not been written into the removable data storage device in the first data is stored in a preset storage space of the memory, The two data are stored in the preset storage space of the second storage medium.
- the processor 120 is further configured to be stored in the storage medium Before the second data is written into the removable data storage device, determining that the mobile data storage device is detected to be coupled to the terminal device again is detecting that the removable data storage device is from the terminal device Within a first preset duration after removal; or determining that the opportunity to detect that the removable data storage device is coupled to the terminal device again is detecting that the removable data storage device is moved from the terminal device In addition, prompting the user that the removable data storage device is not safely removed within a second preset duration.
- the processor is further configured to: after detecting that the removable data storage device is removed from the terminal device, in a second to be stored in the storage medium Before the data is written to the removable data storage device, the user is prompted to have the secure data storage device not safely removed, and a user-triggered instruction for confirming that there is no secure removal is detected.
- the processor is further configured to: detect, after the prompting user that the removable data storage device is not securely removed, the mobile data storage device is not detected. Go to the terminal device; delete the second data from the storage space, or when the storage medium corresponding to the preset storage space is a non-permanent storage medium, then the second data is The permanent storage medium is moved to a permanent storage medium.
- the processor is further configured to: detect, after the prompting user that the removable data storage device is not securely removed, the mobile data storage device is not detected to be coupled. To the terminal device, the user is again prompted that the removable data storage device is not securely removed.
- the processor when the processor prompts the user that the removable data storage device is not securely removed, the processor is specifically configured to prompt the user that the removable data storage device is not secure through the display interface of the display. Remove, or prompt the user through the speaker that the removable data storage device is not securely removed.
- the unwritten portion in the process of writing data to the removable data storage device, when detecting that the removable data storage device is accidentally removed, the unwritten portion is stored in the preset storage medium, thereby detecting When the removable data storage device is coupled to the terminal device again, the unwritten portion continues to be written into the removable data storage device, thereby ensuring data integrity to a certain extent and avoiding data corruption.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
- the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
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 method and device for data processing, for use in solving the problem in the prior art of data corruption as a result of not executing the removal of an SD card according to a correct operation. The method comprises: in a process of writing first data on a terminal device into a removable data storage device coupled to the terminal device, when the removable data storage device is detected as being removed from the terminal device, storing second data of the first data not yet written into the removable data storage device into a preset storage medium of the terminal device; and when the removable data storage device is detected as being coupled once again to the terminal device, writing the second data in the storage medium into the removable data storage device.
Description
本申请要求在2017年3月13日提交中国专利局、申请号为201710147617.X、发明名称为“一种数据处理的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200910147617.X, entitled "A Method and Apparatus for Data Processing", filed on March 13, 2017, the entire disclosure of which is incorporated herein by reference. In this application.
本申请涉及数据存储技术领域,尤其涉及一种数据处理方法及装置。The present application relates to the field of data storage technologies, and in particular, to a data processing method and apparatus.
目前手机、平板等终端设备上安装的应用及用户数据越来越多,而终端设备的内部存储空间有限,因此很多人选择了安全数码卡(英文:Secure Digital Memory Card,简称:SD)作为存储扩展,但同时也带来了数据丢失的风险。当终端设备系统后台正在往SD卡写数据,此时用户拔掉SD或者SD意外脱离终端设备,可能会导致SD上的部分数据不完整,严重时可能会破坏SD上的文件系统信息,出现终端设备无法识别SD卡的情况,在一定程度上给用户造成了损失。At present, there are more and more applications and user data installed on terminal devices such as mobile phones and tablets, and the internal storage space of terminal devices is limited. Therefore, many people choose Secure Digital Memory Card (English: Secure Digital Memory Card, SD) for storage. Expansion, but also brings the risk of data loss. When the terminal device system is writing data to the SD card in the background, the user unplugs the SD or the SD accidentally leaves the terminal device, which may cause some data on the SD to be incomplete. In severe cases, the file system information on the SD may be damaged, and the terminal may appear. The device does not recognize the SD card, causing a loss to the user to a certain extent.
发明内容Summary of the invention
本申请实施例提供了一种数据处理方法及装置,用于解决现有技术存在的未按照正确操作执行移除SD卡导致的数据损坏的问题。The embodiment of the present application provides a data processing method and device, which are used to solve the problem of data corruption caused by the removal of an SD card that is not performed according to the correct operation in the prior art.
第一方面,本申请实施例提供了一种数据处理方法,包括:在将终端设备上的第一数据写入与所述终端设备耦合的可移动数据存储装置的过程中,检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述终端设备的预设的存储介质中;在检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置。In a first aspect, the embodiment of the present application provides a data processing method, including: detecting, in a process of writing first data on a terminal device to a removable data storage device coupled to the terminal device, And storing, when the mobile data storage device is removed from the terminal device, the second data in the first data that has not been written into the removable data storage device in a preset storage medium of the terminal device And detecting, when the removable data storage device is coupled to the terminal device again, writing the second data stored in the storage medium to the removable data storage device.
通过上述设计,在向可移动数据存储装置写入数据过程中,检测到可移动数据存储装置被意外移除时,将未写入的部分存到预设的存储介质中,从而在检测到该可移动数据存储装置再次耦合到该终端设备时,在未写入的部分继续写入到该可移动数据存储装置中,从而在一定程度上保证了数据的完整性以及避免了数据发生损坏。With the above design, in the process of writing data to the removable data storage device, when it is detected that the removable data storage device is accidentally removed, the unwritten portion is stored in the preset storage medium, thereby detecting the When the removable data storage device is coupled to the terminal device again, the unwritten portion continues to be written into the removable data storage device, thereby ensuring data integrity to a certain extent and avoiding data corruption.
在一种可能的设计中,所述将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,所述方法还包括:确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内;或者,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。In a possible design, before the second data stored in the storage medium is written into the removable data storage device, the method further comprises: determining that the removable data storage device is detected again The timing of coupling to the terminal device is within a first preset time period after detecting that the removable data storage device is removed from the terminal device; or determining that the removable data storage device is detected again The timing of coupling to the terminal device is to prompt the user that the removable data storage device is not safely removed within a second preset time period after detecting that the removable data storage device is removed from the terminal device .
通过上述设计,在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内,检测到所述可移动数据存储装置再次耦合到所述终端设备时,再将存储在所
述存储介质中的第二数据写入所述可移动数据存储装置,在用户可移动数据存储装置长时间不再耦合到该终端设备时,终端设备不再检测可移动数据存储装置是否再次耦合到所述终端设备,在一定程度上能够降低终端设备电量的消耗。With the above design, after detecting that the removable data storage device is coupled to the terminal device again within a first preset time period after the removable data storage device is removed from the terminal device, Will be stored in the office
The second data in the storage medium is written to the removable data storage device, and when the user removable data storage device is no longer coupled to the terminal device for a long time, the terminal device no longer detects whether the removable data storage device is coupled again to The terminal device can reduce the consumption of the power of the terminal device to a certain extent.
在一种可能的设计中,检测到所述可移动数据存储装置被从所述终端设备上移除后,在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,所述方法还可以包括:提示用户所述可移动数据存储装置没有安全移除,并检测到用户触发的用于确认没有安全移除的指令。In a possible design, after detecting that the removable data storage device is removed from the terminal device, writing second data stored in the storage medium to the removable data storage device Previously, the method may further include prompting the user that the removable data storage device is not securely removed and detecting an instruction triggered by the user to confirm that there is no secure removal.
通过上述设计,在检测到所述可移动数据存储装置被从所述终端设备上移除后,提示用户所述可移动数据存储装置没有安全移除,检测到所述可移动数据存储装置再次耦合到所述终端设备,并检测到用户触发的用于确认没有安全移除的指令时,再将存储在所述存储介质中的第二数据写入所述可移动数据存储装置,能够提示用户移除的可移动数据存储装置数据不安全,从而用户能够及时的再次将可移动数据存储装置连接到终端设备上,及时的将存储在所述存储介质中的第二数据写入所述可移动数据存储装置,在一定程度上保证数据的完整性以及避免了数据发生损坏。With the above design, after detecting that the removable data storage device is removed from the terminal device, prompting the user that the removable data storage device is not securely removed, detecting that the removable data storage device is coupled again When the terminal device is detected and the user-triggered instruction for confirming that there is no safe removal is detected, the second data stored in the storage medium is written into the removable data storage device, and the user can be prompted to move The removable data storage device data is not secure, so that the user can connect the removable data storage device to the terminal device again in time, and timely write the second data stored in the storage medium to the movable data. The storage device guarantees the integrity of the data to a certain extent and avoids data corruption.
在一种可能的设计中,所述方法还可以包括:在提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备;将所述第二数据从所述存储介质中删除,或者在所述存储介质为非永久性存储介质时,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。In a possible design, the method may further include: detecting, in the second preset duration after the user is prompted that the removable data storage device is not safely removed, detecting that the removable data storage device is coupled to the a terminal device; deleting the second data from the storage medium, or moving the second data from a non-permanent storage medium to a permanent storage when the storage medium is a non-permanent storage medium In the medium.
通过上述设计,在提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备,及时的将所述第二数据从所述存储介质中删除,在一定程度上避免第二数据长期占据着存储介质。另外,在所述存储介质为非永久性存储介质时,则将所述第二数据由非永久性存储介质移动到永久性存储介质中,能够避免未写入的有用的数据的在终端设备断电后丢失,在一定程度上保证了数据的安全性。With the above design, in the second preset duration after prompting the user that the removable data storage device is not safely removed, the removable data storage device is not detected to be coupled to the terminal device, and the second is timely The data is deleted from the storage medium to prevent the second data from occupying the storage medium for a long time. In addition, when the storage medium is a non-permanent storage medium, the second data is moved from the non-permanent storage medium to the permanent storage medium, and the unwritten useful data can be avoided at the terminal device. Loss after power, to a certain extent to ensure the security of the data.
在一种可能的设计中,所述方法还可以包括:在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除,使得用户能够及时的知道移动数据存储装置没有安全移除的情况下,将可移动数据存储装置及时连接到终端设备上,从而终端设备能够及时的将未写入的数据继续写入到可移动数据存储装置中,在一定程度上保证了数据的完整性以及避免数据发生损坏。In a possible design, the method may further include: detecting, in the third preset duration after the user is prompted that the removable data storage device is not safely removed, detecting that the removable data storage device is coupled to the Said terminal device, again prompting said user that said removable data storage device is not securely removed, so that the user can timely know that the mobile data storage device is not securely removed, and connect the removable data storage device to the terminal device in time Therefore, the terminal device can continue to write the unwritten data into the removable data storage device in time, which ensures the integrity of the data and the data corruption.
基于与方法实施例同样的发明构思,本申请实施例还提供了一种数据处理装置,所述装置应用于终端设备,包括:Based on the same inventive concept as the method embodiment, the embodiment of the present application further provides a data processing device, where the device is applied to a terminal device, including:
通信接口、处理器以及存储器;所述通信接口,用于将可移动数据存储装置与所述终端设备耦合在一起;所述存储器,用于存储第一数据;所述处理器,用于在将所述存储器存储的第一数据写入所述可移动数据存储装置的过程中,检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述存储器的预设的存储空间中;在检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述预设的存储空间中的第二数据写入所述可移动数据存储装置。a communication interface, a processor, and a memory; the communication interface for coupling a removable data storage device with the terminal device; the memory for storing first data; the processor for The first data stored in the memory is written into the removable data storage device, and when the removable data storage device is detected to be removed from the terminal device, the first data is not yet The second data written to the removable data storage device is stored in a predetermined storage space of the memory; when the removable data storage device is detected to be coupled to the terminal device again, The second data in the preset storage space is written to the removable data storage device.
在一种可能的设计中,所述存储器包括第一存储介质以及第二存储介质,所述第一存
储介质用于存储所述第一数据;In a possible design, the memory includes a first storage medium and a second storage medium, the first storage
a storage medium for storing the first data;
所述处理器,在将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述存储器的预设的存储空间中时,具体用于将所述第二数据存储在所述第二存储介质的所述预设的存储空间中。The processor, when storing the second data of the first data that has not been written into the removable data storage device in a preset storage space of the memory, specifically for using the second Data is stored in the preset storage space of the second storage medium.
在一种可能的设计中,所述处理器,还用于在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内;或者,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。In a possible design, the processor is further configured to determine that the removable data storage device is detected before writing the second data stored in the storage medium to the removable data storage device The timing of coupling to the terminal device again is within a first preset time period after detecting that the removable data storage device is removed from the terminal device; or determining that the removable data storage device is detected Re-coupling to the terminal device is a second preset duration after prompting the user that the removable data storage device is not safely removed, when detecting that the removable data storage device is removed from the terminal device Inside.
在一种可能的设计中,所述处理器,还用于在检测到所述可移动数据存储装置被从所述终端设备上移除后,在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,提示用户所述可移动数据存储装置没有安全移除,并检测到用户触发的用于确认没有安全移除的指令。In a possible design, the processor is further configured to: after detecting that the removable data storage device is removed from the terminal device, in the second data to be stored in the storage medium Prior to writing to the removable data storage device, the user is prompted that the removable data storage device is not securely removed and an instruction triggered by the user to confirm that there is no secure removal is detected.
在一种可能的设计中,所述处理器,还用于在提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备;将所述第二数据从所述存储空间中删除,或者在所述预设的存储空间对应的存储介质为非永久性存储介质时,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。In a possible design, the processor is further configured to detect that the removable data storage device is coupled to the second preset duration after prompting the user that the removable data storage device is not safely removed. The terminal device deletes the second data from the storage space, or when the storage medium corresponding to the preset storage space is a non-permanent storage medium, the second data is non-permanent The storage medium is moved to a permanent storage medium.
在一种可能的设计中,所述处理器,还用于在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除。In a possible design, the processor is further configured to detect that the removable data storage device is coupled to the third preset duration after prompting the user that the removable data storage device is not safely removed. The terminal device again prompts the user that the removable data storage device is not securely removed.
在一种可能的设计中,所述装置还包括显示器或者扬声器;所述处理器在提示用户所述可移动数据存储装置没有安全移除时,具体用于通过所述显示器的显示界面提示用户所述可移动数据存储装置没有安全移除,或者通过所述扬声器提示用户所述可移动数据存储装置没有安全移除。In a possible design, the device further includes a display or a speaker; when the processor prompts the user that the removable data storage device is not safely removed, specifically for prompting the user through the display interface of the display The removable data storage device is not securely removed, or the user is prompted by the speaker that the removable data storage device is not securely removed.
第三方面,本申请实施例提供了一种数据处理装置,该装置包括:In a third aspect, an embodiment of the present application provides a data processing apparatus, where the apparatus includes:
写入模块,用于将终端设备上的第一数据写入与所述终端设备耦合的可移动数据存储装置;a writing module, configured to write the first data on the terminal device to the removable data storage device coupled to the terminal device;
检测模块,用于检测所述可移动数据存储装置是否被从所述终端设备上移除;a detecting module, configured to detect whether the removable data storage device is removed from the terminal device;
存储模块,用于在所述写入模块将终端设备上的第一数据写入与所述终端设备耦合的可移动数据存储装置的过程中,所述检测模块检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述终端设备的预设的存储介质中;a storage module, configured to: when the writing module writes first data on the terminal device into the removable data storage device coupled to the terminal device, the detecting module detects the removable data storage device When being removed from the terminal device, the second data of the first data that has not been written into the removable data storage device is stored in a preset storage medium of the terminal device;
检测模块,还用于检测所述可移动数据存储装置是否耦合到所述终端设备上;a detecting module, configured to detect whether the removable data storage device is coupled to the terminal device;
所述写入模块,还用于在所述检测模块检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置。The writing module is further configured to: when the detecting module detects that the movable data storage device is coupled to the terminal device again, write second data stored in the storage medium to the movable device Data storage device.
在一种可能的设计中,所述检测模块,还用于在所述写入模块将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内。
In a possible design, the detecting module is further configured to: before the writing module writes the second data stored in the storage medium into the removable data storage device, determining to detect the The timing at which the removable data storage device is coupled to the terminal device again is within a first predetermined duration after detecting that the removable data storage device is removed from the terminal device.
在一种可能的设计中,还包括提示模块,用于在所述检测模块检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除。所述检测模块,还用于在所述写入模块将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除后,所述提示模块提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。In a possible design, the method further includes a prompting module, when the detecting module detects that the removable data storage device is removed from the terminal device, prompting the user that the removable data storage device does not Safely removed. The detecting module is further configured to: before the writing module writes the second data stored in the storage medium to the removable data storage device, determine that the removable data storage device is detected to be coupled again The timing of the terminal device is that after detecting that the removable data storage device is removed from the terminal device, the prompting module prompts the user that the removable data storage device has no second preset after being safely removed. Within the time.
在一种可能的设计中,在所述检测模块检测到所述可移动数据存储装置被从所述终端设备上移除后,所述提示模块提示用户所述可移动数据存储装置没有安全移除;所述检测模块检测到所述可移动数据存储装置再次耦合到所述终端设备,且检测到用户触发的用于确认没有安全移除的指令,则所述写入模块将存储在所述存储介质中的第二数据写入所述可移动数据存储装置。In a possible design, after the detecting module detects that the removable data storage device is removed from the terminal device, the prompting module prompts the user that the removable data storage device is not safely removed. The detection module detects that the removable data storage device is coupled to the terminal device again, and detects a user-triggered instruction for confirming that there is no secure removal, then the write module is to be stored in the storage Second data in the medium is written to the removable data storage device.
在一种可能的设计中,所述装置还包括:In one possible design, the device further includes:
删除模块,用于在所述提示模块提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,所述检测莫快未检测所述可移动数据存储装置耦合到所述终端设备,则将所述第二数据从所述存储介质中删除。a deleting module, configured to, within a second preset duration after the prompting module prompts the user that the removable data storage device is not safely removed, the detecting does not detect that the removable data storage device is coupled to the The terminal device deletes the second data from the storage medium.
在一种可能的设计中,在所述存储介质为非永久性存储介质时,所述存储模块,还用于在所述提示模块提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,所述检测莫快未检测所述可移动数据存储装置耦合到所述终端设备,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。In a possible design, when the storage medium is a non-permanent storage medium, the storage module is further configured to: after the prompting module prompts the user that the removable data storage device is not safely removed Within two preset durations, the detecting does not detect that the removable data storage device is coupled to the terminal device, and the second data is moved from the non-permanent storage medium to the permanent storage medium.
在一种可能的设计中,所述提示模块,还用于在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,所述检测模块未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除。In a possible design, the prompting module is further configured to: after the prompting the user that the removable data storage device is not safely removed, the detecting module does not detect the movable data. A storage device is coupled to the terminal device, again prompting the user that the removable data storage device is not securely removed.
第四方面,本申请实施例中还提供一种计算机存储介质,该存储介质中存储软件程序,该软件程序在被一个或多个处理器读取并执行时可实现第一方面或上述第一方面的任意一种设计提供的方法。In a fourth aspect, the embodiment of the present application further provides a computer storage medium, where the software program stores a software program, where the software program can implement the first aspect or the first one when being read and executed by one or more processors Any of the aspects provided by the design.
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或上述第一方面的任意一种设计提供的方法。In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing a computer to perform the method provided by any one of the above first aspect or the first aspect.
图1为本申请实施例提供的终端设备结构示意图;FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
图2为本申请实施例提供的数据处理系统示意图;2 is a schematic diagram of a data processing system according to an embodiment of the present application;
图3为本申请实施例提供的一种数据处理方法流程图;FIG. 3 is a flowchart of a data processing method according to an embodiment of the present application;
图4为本申请实施例提供的另一种数据处理方法流程图;4 is a flowchart of another data processing method according to an embodiment of the present application;
图5为本申请实施例提供的又一种数据处理方法流程图;FIG. 5 is a flowchart of still another data processing method according to an embodiment of the present application;
图6为本申请实施例提供的再一种数据处理方法流程图;FIG. 6 is a flowchart of still another data processing method according to an embodiment of the present application;
图7为本申请实施例提供的终端设备显示用户的提示信息示意图;FIG. 7 is a schematic diagram of prompt information displayed by a terminal device according to an embodiment of the present disclosure;
图8为本申请实施例提供的数据处理装置示意图。FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present application.
以下,对本申请中的部分用语进行解释说明,以便与本领域技术人员理解。Hereinafter, some of the terms in the present application will be explained to be understood by those skilled in the art.
可移动数据存储装置,包括存储器,配置为用于存储数据。可移动数据存储装置可以是用户识别模块(英文:Subscriber Identification Module,简称:SIM),安全数字(英文:Secure Digital Memory,简称:SD)存储器卡,集成电路(英文:integrated circuit,简称:IC)存储器,一种通用串行总线(英文:Universal Serial Bus,简称:USB)驱动,一种通用集成电路卡(英文:Universal Integrated Circuit Card,简称:UICC),可移动用户识别模块(英文:Removable User Identity Module,简称:R-UIM),拇指驱动器,闪存驱动器,固态存储设备等等。A removable data storage device, including a memory, configured to store data. The removable data storage device may be a subscriber identification module (English: Subscriber Identification Module, SIM for short), a secure digital (English: Secure Digital Memory, SD) memory card, or an integrated circuit (IC: integrated circuit) Memory, a universal serial bus (English: Universal Serial Bus, USB for short), a universal integrated circuit card (English: Universal Integrated Circuit Card, UICC), removable user identification module (English: Removable User) Identity Module (R-UIM), thumb drive, flash drive, solid state storage device, etc.
该终端设备包括但不限于个人计算机、服务器计算机、手持式或膝上型设备、移动设备(比如手机、移动电话、平板电脑、个人数字助理、寻呼机、媒体播放器、相机、音频记录装置等等)、消费型电子设备、小型计算机、大型计算机,等等。The terminal device includes, but is not limited to, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a cell phone, a mobile phone, a tablet, a personal digital assistant, a pager, a media player, a camera, an audio recording device, etc.) ), consumer electronics, small computers, large computers, and more.
“耦合”是指两个部件彼此直接或间接地结合。这种结合可以是固定的或可移动性的,这种结合可以允许流动液,电,电信号或其它类型信号在两个部件之间通信。比如可移动数据存储装置为SD卡,终端设备为个人计算机,则在个人计算机上设置有凹陷构件,能够将SD卡安装到凹陷构件上,达到SD卡与个人计算机的耦合,或者可以将SD卡通过SD读卡器与个人计算机耦合在一起。"Coupled" means that two components are bonded directly or indirectly to each other. This combination may be fixed or movable, and this combination may allow for the transfer of fluid, electrical, electrical signals or other types of signals between the two components. For example, the removable data storage device is an SD card, and the terminal device is a personal computer. The personal computer is provided with a recessed member, and the SD card can be mounted on the concave member to achieve the coupling between the SD card and the personal computer, or the SD card can be Coupled with a personal computer via an SD card reader.
永久性存储介质,是指:存储在存储介质中的数据在断电后不会丢失。比如只读存储器(英文:Read Only Memory,简称:ROM),闪存(Flash Memory)、电擦除可写只读存储器(英文:Electrically Erasable Programmable Read-Only Memory,简称:EEPROM)等。Permanent storage medium means that data stored in the storage medium will not be lost after power off. For example, read only memory (English: Read Only Memory, ROM for short), flash memory (Flash Memory), electrically erasable write-read only memory (English: Electrically Erasable Programmable Read-Only Memory, EEPROM for short).
非永久性存储介质,是指:存储在存储介质中的数据在断电后会丢失。比如随机存储器(英文:Random Access Memory,简称:RAM)等。Non-permanent storage medium means that data stored in the storage medium will be lost after power off. Such as random access memory (English: Random Access Memory, referred to as: RAM).
多个,是指两个或两个以上。Multiple means two or more.
另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In addition, it should be understood that in the description of the present application, the terms "first", "second" and the like are used only to distinguish the purpose of description, and are not to be understood as indicating or implying relative importance, nor as an indication. Or suggest the order.
参考图1所示,为本申请实施例应用的终端设备的硬件结构示意图。如图1所示,终端设备100包括显示设备110、处理器120以及存储器130。存储器130可用于存储软件程序以及数据,处理器120通过运行存储在存储器130的软件程序以及数据,从而执行终端设备100的各种功能应用以及数据处理。存储器130可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如图像采集功能等)等;存储数据区可存储根据终端设备100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器130可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件等。处理器120是终端设备100的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器130内的软件程序和/或数据,执行终端设备100的各种功能和处理数据,从而对终端设备进行整体监控。处理器120可以包括一个或多个通用处理器,还可包括一个或多个数字信号处理器(英文:Digital Signal Processor,简称:DSP),用于执行相关操作,以实现本申请实施例所提供的技术方案。Referring to FIG. 1 , it is a schematic diagram of a hardware structure of a terminal device applied to an embodiment of the present application. As shown in FIG. 1, the terminal device 100 includes a display device 110, a processor 120, and a memory 130. The memory 130 can be used to store software programs and data, and the processor 120 executes various functional applications and data processing of the terminal device 100 by running software programs and data stored in the memory 130. The memory 130 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as an image collection function, etc.), and the like; and the storage data area may be stored according to the terminal device 100. Use the created data (such as audio data, phone book, etc.). Further, the memory 130 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device or the like. The processor 120 is a control center of the terminal device 100, and connects various parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device 100 by running or executing software programs and/or data stored in the memory 130. And process the data to monitor the terminal device as a whole. The processor 120 may include one or more general-purpose processors, and may also include one or more digital signal processors (English: Digital Signal Processor, DSP for short) for performing related operations to implement the embodiments of the present application. Technical solution.
终端设备100中还可以包括用于拍摄照片或视频的摄像头160。终端设备100还可以包括输入设备140,用于接收输入的数字信息、字符信息或接触式触摸操作/非接触式手
势,以及产生与终端设备100的用户设置以及功能控制有关的信号输入等。具体地,本申请实施例中,该输入设备140可以包括触控面板141。触控面板141,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板141上或在触控面板141的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板141可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器120,并能接收处理器120发来的命令并加以执行。例如,用户在触控面板141上用手指单击某一应用对应的图标或者图例等等,触摸检测装置检测到此次单击带来的这个信号,然后将该信号传送给触摸控制器,触摸控制器再将这个信号转换成坐标发送给处理器120,处理器120根据该坐标和该信号的类型(单击或双击)确定对该图标或者图例所执行的操作(开启)。A camera 160 for taking a photo or video may also be included in the terminal device 100. The terminal device 100 may further include an input device 140 for receiving input digital information, character information, or contact touch operation/contactless hand
Potential, and signal input related to user setting and function control of the terminal device 100 are generated. Specifically, in the embodiment of the present application, the input device 140 may include a touch panel 141. The touch panel 141, also referred to as a touch screen, can collect touch operations on or near the user (such as the user's operation on the touch panel 141 or on the touch panel 141 using any suitable object or accessory such as a finger, a stylus, or the like. ), and drive the corresponding connection device according to a preset program. Optionally, the touch panel 141 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 120 is provided and can receive commands from the processor 120 and execute them. For example, the user clicks on an icon or a legend corresponding to an application on the touch panel 141, and the touch detection device detects the signal brought by the click, and then transmits the signal to the touch controller, and touches The controller then converts this signal to coordinates for transmission to processor 120, which determines the operation (on) for the icon or legend based on the coordinates and the type of the signal (click or double click).
触控面板141可以采用电阻式、电容式、红外线以及表面声波等多种类型实现。除了触控面板141,输入设备140还可以包括其他输入设备142,其他输入设备142可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The touch panel 141 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 141, the input device 140 may further include other input devices 142, which may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like. One or more of them.
显示设备110,包括的显示面板111,用于显示由用户输入的信息或提供给用户的信息以及终端设备100的各种菜单界面等,在本申请实施例中主要用于显示终端设备100中摄像头采集到的画面。可选的,显示面板可以采用液晶显示器(英文:Liquid Crystal Display,简称:LCD)或有机发光二极管(英文:Organic Light-Emitting Diode,简称:OLED)等形式来配置显示面板111。在其他一些实施例中,触控面板141可覆盖显示面板111上,形成触摸显示屏。The display device 110 includes a display panel 111 for displaying information input by the user or information provided to the user, and various menu interfaces of the terminal device 100, etc., which are mainly used for displaying the camera in the terminal device 100 in the embodiment of the present application. The captured picture. Optionally, the display panel can be configured by using a liquid crystal display (English: Liquid Crystal Display, LCD for short) or an organic light-emitting diode (English: Organic Light-Emitting Diode, OLED for short). In some other embodiments, the touch panel 141 can cover the display panel 111 to form a touch display screen.
除以上之外,终端设备100还可以包括用于给其他模块供电的电源150。终端设备100还可以包括一个或多个传感器170,例如加速度传感器、光线传感器、GPS传感器、红外传感器、激光传感器、位置传感器或镜头指向角度传感器等。终端设备100还可以包括无线射频(英文:Radio Frequency,简称:RF)电路180,用于与无线网络设备进行网络通信,还可以包括WiFi模块190,用于与其他设备进行WiFi通信,还可以包括扬声器210,用于播放音乐、语音提示或者发出提示音等等。所述终端设备100还包括通信接口220,该通信接口220用于与可移动数据存储装置耦合连接。In addition to the above, the terminal device 100 may further include a power source 150 for supplying power to other modules. The terminal device 100 may also include one or more sensors 170, such as an acceleration sensor, a light sensor, a GPS sensor, an infrared sensor, a laser sensor, a position sensor or a lens pointing angle sensor, and the like. The terminal device 100 may further include a radio frequency (English: Radio Frequency, RF for short) circuit 180 for performing network communication with the wireless network device, and may further include a WiFi module 190 for performing WiFi communication with other devices, and may also include The speaker 210 is used for playing music, voice prompts or sounding prompts and the like. The terminal device 100 further includes a communication interface 220 for coupling connection with the removable data storage device.
下面先针对本申请实施例中涉及的用户按照规范操作移除可移动数据存储装置的方法。以可移动数据存储装置为SD卡为例:The method for removing the removable data storage device according to the specification operation by the user involved in the embodiment of the present application is first described below. Take the removable data storage device as an SD card as an example:
如果按照安全移除SD卡的规范操作,不会出现数据损坏问题,规范动作是:用户拔SD卡前,先在设置里面卸载SD卡,等卸载成功后(此时终端设备的系统不再有任何SD卡读写操作),可以安全将SD卡取出。If the operation of the SD card is safely removed, there will be no data corruption. The standard action is: before the SD card is removed, the SD card is uninstalled in the settings. After the uninstallation is successful, the system of the terminal device no longer exists. Any SD card read and write operation can safely remove the SD card.
如果未按照上述规范操作移除可移动数据存储装置,则可能会导致数据损坏,乃至可移动数据存储装置损坏。基于此本申请实施例提供了一种数据处理方法及装置,在一定程度上能够避免未按照上述规范操作移除可移动数据存储装置而导致数据损坏的问题。其中,方法和装置是基于同一发明构思的,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。Failure to remove the removable data storage device in accordance with the above specifications may result in data corruption or even damage to the removable data storage device. Based on this embodiment of the present application, a data processing method and apparatus are provided, which can avoid the problem of data corruption caused by not removing the removable data storage device according to the above specification operation. The method and the device are based on the same inventive concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
参见图2所示,本申请实施例提供的数据处理系统中包括可移动数据存储装置200以
及终端设备100。可移动数据存储装置200与终端设备100耦合在一起。参见图3所示,数据处理方法包括:As shown in FIG. 2, the data processing system provided by the embodiment of the present application includes a removable data storage device 200.
And the terminal device 100. The removable data storage device 200 is coupled to the terminal device 100. Referring to FIG. 3, the data processing method includes:
在将终端设备100上的第一数据写入可移动数据存储装置200的过程中,检测到所述可移动数据存储装置200被从所述终端设备100上移除时,将所述第一数据中还未写入所述可移动数据存储装置200的第二数据存储在所述终端设备100的存储介质中(S301)。在检测到所述可移动数据存储装置200再次耦合到所述终端设备100时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200(S302)。In the process of writing the first data on the terminal device 100 to the removable data storage device 200, detecting the first data when the removable data storage device 200 is removed from the terminal device 100 The second data that has not been written into the removable data storage device 200 is stored in the storage medium of the terminal device 100 (S301). Upon detecting that the removable data storage device 200 is coupled again to the terminal device 100, the second data stored in the storage medium is written to the removable data storage device 200 (S302).
在S301中,将可移动数据存储装置200中未写完的第二数据保存到终端设备100的存储介质,该存储介质可以是非永久性存储介质,或者可以永久性存储介质。具体将第二数据与移除的可移动数据存储装置200的标识信息关联保存。还可以保存第二数据在可移动数据存储装置中的起始地址、以及第二数据的数据大小等等信息。其中,检测所述可移动数据存储装置200再次耦合到所述终端设备100时,可以通过判断再次耦合到所述终端设备100的可移动数据存储装置的标识信息,与存储在所述存储介质中的可移动数据存储装置的标识信息相同时,则确定所述可移动数据存储装置200再次耦合到所述终端设备100。In S301, the second data that is not written in the removable data storage device 200 is saved to the storage medium of the terminal device 100, and the storage medium may be a non-permanent storage medium or may be a permanent storage medium. Specifically, the second data is associated with the identification information of the removed removable data storage device 200. Information such as a start address of the second data in the removable data storage device, a data size of the second data, and the like may also be saved. When detecting that the removable data storage device 200 is coupled to the terminal device 100 again, it may be stored in the storage medium by determining identification information of the removable data storage device coupled to the terminal device 100 again. When the identification information of the removable data storage device is the same, it is determined that the removable data storage device 200 is coupled to the terminal device 100 again.
在一种可能实施例中,除了在检测到所述可移动数据存储装置200再次耦合到所述终端设备100时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200以外,具体的还可以在达到如下任意一种时机时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200:In a possible embodiment, in addition to detecting that the removable data storage device 200 is coupled to the terminal device 100 again, writing second data stored in the storage medium to the removable data storage In addition to the device 200, specifically, the second data stored in the storage medium may be written into the removable data storage device 200 when any of the following timings is reached:
第一种:The first:
确定检测到所述可移动数据存储装置200再次耦合到所述终端设备100的时机为在检测到所述可移动数据存储装置200被从所述终端设备100上移除后的第一预设时长内。Determining that the timing of detecting that the removable data storage device 200 is coupled to the terminal device 100 is the first preset duration after detecting that the removable data storage device 200 is removed from the terminal device 100 Inside.
第二种:Second:
确定检测到所述可移动数据存储装置200再次耦合到所述终端设备100的时机为检测到所述可移动数据存储装置200被从所述终端设备100上移除时,提示用户所述可移动数据存储装置200没有安全移除后的第二预设时长内。Determining that the time when the removable data storage device 200 is detected to be coupled to the terminal device 100 is to prompt the user to move when detecting that the removable data storage device 200 is removed from the terminal device 100 The data storage device 200 is not within the second preset time period after the security removal.
第三种:The third type:
提示用户所述可移动数据存储装置没有安全移除后,检测到所述可移动数据存储装置200再次耦合到所述终端设备100,并检测到用户触发的用于确认没有安全移除的指令。After prompting the user that the removable data storage device has not been securely removed, it is detected that the removable data storage device 200 is again coupled to the terminal device 100 and detects a user-triggered instruction for confirming that there is no secure removal.
上述第一预设时长与第二预设时长可以相同也可以不同。本申请实施例对此不作具体限定。The first preset duration and the second preset duration may be the same or different. This embodiment of the present application does not specifically limit this.
结合图4,基于本申请实施例提供的第一种时机,对数据处理方法进行具体说明:With reference to FIG. 4, based on the first timing provided by the embodiment of the present application, the data processing method is specifically described:
S401,检测到所述可移动数据存储装置200被从所述终端设备100上移除。S401. It is detected that the removable data storage device 200 is removed from the terminal device 100.
S402,确定是否正在向可移动数据存储装置200写入数据,确定是时,即确定将终端设备100上的第一数据写入可移动数据存储装置200,执行S403,确定为否时,则流程结束。S402, determining whether data is being written to the removable data storage device 200, determining that it is, that is, determining that the first data on the terminal device 100 is written into the removable data storage device 200, and executing S403, if the determination is no, the flow is End.
S403,将所述第一数据中还未写入所述可移动数据存储装置200的第二数据存储在所述终端设备100的存储介质中。执行S404。S403. Store, in the first data, the second data that has not been written into the removable data storage device 200 in the storage medium of the terminal device 100. Execute S404.
S404,在检测到所述可移动数据存储装置200被从所述终端设备100上移除后的第一
预设时长内,检测到所述可移动数据存储装置200再次耦合到所述终端设备100。S404, after detecting that the removable data storage device 200 is removed from the terminal device 100,
Within the preset duration, it is detected that the removable data storage device 200 is coupled to the terminal device 100 again.
S405,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200。S405. Write second data stored in the storage medium to the removable data storage device 200.
流程结束。The process ends.
结合图5,基于本申请实施例提供的第二种时机,对数据处理方法进行具体说明:With reference to FIG. 5, based on the second timing provided by the embodiment of the present application, the data processing method is specifically described:
S501,检测到所述可移动数据存储装置200被从所述终端设备100上移除。S501. It is detected that the removable data storage device 200 is removed from the terminal device 100.
S502,确定是否正在向可移动数据存储装置200写入数据,确定是时,即确定将终端设备100上的第一数据写入可移动数据存储装置200,执行S503,确定为否时,则流程结束。S502, determining whether data is being written to the removable data storage device 200, determining that it is, that is, determining that the first data on the terminal device 100 is written into the removable data storage device 200, and executing S503, determining NO, the flow End.
S503,将所述第一数据中还未写入所述可移动数据存储装置200的第二数据存储在所述终端设备100的存储介质中。执行S504。S503. Store, in the first data, the second data that has not been written into the removable data storage device 200 in the storage medium of the terminal device 100. Execution S504.
S504,提示用户所述可移动数据存储装置200没有安全移除。S504, prompting the user that the removable data storage device 200 is not securely removed.
S505,在提示用户所述可移动数据存储装置200没有安全移除的第二预设时长内,检测到所述可移动数据存储装置200再次耦合到所述终端设备100。S505. Detecting that the removable data storage device 200 is coupled to the terminal device 100 again within a second preset duration that prompts the user that the removable data storage device 200 is not securely removed.
S506,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200。S506. Write second data stored in the storage medium to the removable data storage device 200.
流程结束。The process ends.
可选地,若在步骤S504提示用户所述可移动数据存储装置200没有安全移除后达到第二预设时长时,未检测所述可移动数据存储装置200耦合到所述终端设备100,则将所述第二数据从所述存储介质中删除。Optionally, if the mobile data storage device 200 is not detected to be connected to the terminal device 100 after the user is prompted to perform the second preset duration after the removable data storage device 200 is not securely removed, the device is not detected to be coupled to the terminal device 100. The second data is deleted from the storage medium.
如果上述存储介质为非永久性存储介质,若在步骤S505提示用户所述可移动数据存储装置200没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置200耦合到所述终端设备100,可以将所述第二数据由非永久性存储介质移动到永久性存储介质中。If the storage medium is a non-permanent storage medium, if the user is prompted to indicate that the removable data storage device 200 is not securely removed within a second preset time period, the removable data storage device 200 is not detected to be coupled to The terminal device 100 can move the second data from a non-permanent storage medium to a permanent storage medium.
可选地,若S504在提示用户所述可移动数据存储装置200没有安全移除后达到第三预设时长,则还未检测所述可移动数据存储装置200耦合到所述终端设备100,再次提示所述用户所述可移动数据存储装置200没有安全移除。若再次提示所述用户所述可移动数据存储装置200没有安全移除后达到第三预设时长,还未检测所述可移动数据存储装置200耦合到所述终端设备100,可以将所述第二数据从所述存储介质中删除。Optionally, if the S504 reaches the third preset duration after prompting the user that the removable data storage device 200 is not securely removed, the removable data storage device 200 has not been detected to be coupled to the terminal device 100, again The user is prompted that the removable data storage device 200 is not securely removed. If the user is again prompted that the removable data storage device 200 has not been securely removed and reaches a third preset duration, and the removable data storage device 200 has not been detected to be coupled to the terminal device 100, the The two data are deleted from the storage medium.
结合图6,基于本申请实施例提供的第三种时机,对数据处理方法进行具体说明:With reference to FIG. 6, the data processing method is specifically described based on the third timing provided by the embodiment of the present application:
S601,检测到所述可移动数据存储装置200被从所述终端设备100上移除。S601. It is detected that the removable data storage device 200 is removed from the terminal device 100.
S602,确定是否正在向可移动数据存储装置200写入数据,确定是时,即确定将终端设备100上的第一数据写入可移动数据存储装置200,执行S603,确定为否时,则流程结束。S602, determining whether data is being written to the removable data storage device 200, determining that it is, that is, determining that the first data on the terminal device 100 is written into the removable data storage device 200, and executing S603, if the determination is no, the process is End.
S603,将所述第一数据中还未写入所述可移动数据存储装置200的第二数据存储在所述终端设备100的存储介质中。执行S604。S603. Store, in the first data, the second data that has not been written into the removable data storage device 200 in the storage medium of the terminal device 100. Execution S604.
S604,提示用户所述可移动数据存储装置200没有安全移除。执行S605。S604, prompting the user that the removable data storage device 200 is not securely removed. Execute S605.
S605,检测到所述可移动数据存储装置200再次耦合到所述终端设备100。执行S606或者S607。S605, detecting that the removable data storage device 200 is coupled to the terminal device 100 again. Execute S606 or S607.
S606,检测到用户触发的用于确认没有安全移除的指令。执行S608。S606. A user-triggered instruction for confirming that there is no safe removal is detected. Execute S608.
S607,检测到用户触发的用户取消没有安全移除的指令。则流程结束。
S607. A user-triggered user cancels an instruction that is not safely removed. Then the process ends.
S608,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200。S608. Write second data stored in the storage medium to the removable data storage device 200.
流程结束。The process ends.
可选地,若在步骤S604提示用户所述可移动数据存储装置200没有安全移除后达到第二预设时长时,未检测所述可移动数据存储装置200耦合到所述终端设备100,则将所述第二数据从所述存储介质中删除。Optionally, if the mobile data storage device 200 is not detected to be connected to the terminal device 100 after the user is prompted to perform the second preset duration after the removable data storage device 200 is not securely removed, the device is not detected to be coupled to the terminal device 100. The second data is deleted from the storage medium.
如果上述存储介质为非永久性存储介质,若在步骤S605提示用户所述可移动数据存储装置200没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置200耦合到所述终端设备100,可以将所述第二数据由非永久性存储介质移动到永久性存储介质中。If the storage medium is a non-permanent storage medium, if the user is prompted to the second preset duration after the removable data storage device 200 is not securely removed in step S605, the removable data storage device 200 is not detected to be coupled to The terminal device 100 can move the second data from a non-permanent storage medium to a permanent storage medium.
可选地,若S604在提示用户所述可移动数据存储装置200没有安全移除后达到第三预设时长,则还未检测所述可移动数据存储装置200耦合到所述终端设备100,再次提示所述用户所述可移动数据存储装置200没有安全移除。若再次提示所述用户所述可移动数据存储装置200没有安全移除后达到第三预设时长,还未检测所述可移动数据存储装置200耦合到所述终端设备100,可以将所述第二数据从所述存储介质中删除。Optionally, if the S604 reaches the third preset duration after prompting the user that the removable data storage device 200 is not securely removed, the removable data storage device 200 has not been detected to be coupled to the terminal device 100, again The user is prompted that the removable data storage device 200 is not securely removed. If the user is again prompted that the removable data storage device 200 has not been securely removed and reaches a third preset duration, and the removable data storage device 200 has not been detected to be coupled to the terminal device 100, the The two data are deleted from the storage medium.
在本申请提供的任一实施例中,在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置200后,可以提示用户按照规范操作移除可移动数据存储装置200。In any of the embodiments provided by the present application, after the second data stored in the storage medium is written into the removable data storage device 200, the user may be prompted to remove the removable data storage device 200 according to the specification operation. .
另外,本申请提供的任一实施例中,在提示用户所述可移动数据存储装置200没有安全移除时,可以通过可以被用户听见的警告声(例如,一种蜂鸣声,警报器,等)提示用户,或者可以被用户看见的警告(例如,照明光,闪灯,图像在显示器上,提示文字在显示器上等),或者可以被用户触觉到的警报(例如,振动)。例如,参见图7所示,示例性的示出了通过提示文字在终端设备100(以手机为例)的显示器上来提示用户所述可移动数据存储装置200(以SD卡为例)没有安全移除,提示文字为“SD卡没有安全移除,存储部分遗留数据,请立即插入SD卡恢复遗留数据”。In addition, in any of the embodiments provided by the present application, when the user is prompted that the removable data storage device 200 is not securely removed, an alert sound that can be heard by the user (eg, a beep, an alarm, And so on, alerting the user, or a warning that can be seen by the user (eg, illumination light, flashing lights, images on the display, prompting text on the display, etc.), or an alert (eg, vibration) that can be perceived by the user. For example, referring to FIG. 7, it is exemplarily shown that the user is prompted by the prompt text on the display of the terminal device 100 (for example, a mobile phone) that the removable data storage device 200 (for example, an SD card) has no security shift. In addition, the prompt text is "The SD card is not safely removed, and the stored part of the data is left, please insert the SD card to restore the legacy data immediately."
基于与上述方法实施例同样的发明构思,本申请实施例还提供了一种数据处理装置,所述装置应用于终端设备,具体可以由终端设备100中的处理器120来实现。如图8所示,所述装置可以包括:Based on the same inventive concept as the foregoing method embodiment, the embodiment of the present application further provides a data processing device, where the device is applied to a terminal device, and may be implemented by the processor 120 in the terminal device 100. As shown in FIG. 8, the apparatus may include:
写入模块801,用于将终端设备上的第一数据写入与所述终端设备耦合的可移动数据存储装置;The writing module 801 is configured to write the first data on the terminal device to the removable data storage device coupled to the terminal device;
检测模块802,用于检测所述可移动数据存储装置是否被从所述终端设备上移除;a detecting module 802, configured to detect whether the removable data storage device is removed from the terminal device;
存储模块803,用于在所述写入模块801将终端设备上的第一数据写入与所述终端设备耦合的可移动数据存储装置的过程中,所述检测模块802检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述终端设备的预设的存储介质中;a storage module 803, configured to: when the writing module 801 writes first data on the terminal device into the removable data storage device coupled to the terminal device, the detecting module 802 detects the movable When the data storage device is removed from the terminal device, the second data of the first data that has not been written into the removable data storage device is stored in a preset storage medium of the terminal device;
检测模块802,还用于检测所述可移动数据存储装置是否耦合到所述终端设备上;The detecting module 802 is further configured to detect whether the removable data storage device is coupled to the terminal device;
所述写入模块801,还用于在所述检测模块802检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置。The writing module 801 is further configured to: when the detecting module 802 detects that the removable data storage device is coupled to the terminal device again, write the second data stored in the storage medium into the Removable data storage device.
在一种可能的实现方式中,所述检测模块802,还用于在所述写入模块801将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内。
In a possible implementation manner, the detecting module 802 is further configured to determine, before the writing module 801 writes the second data stored in the storage medium to the removable data storage device, The timing of coupling the removable data storage device to the terminal device is within a first predetermined time period after detecting that the removable data storage device is removed from the terminal device.
在一种可能的实现方式中,还包括提示模块804,用于在所述检测模块802检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除。所述检测模块802,还用于在所述写入模块801将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除后,所述提示模块提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。In a possible implementation, the prompting module 804 is further configured to prompt the user to move the data when the detecting module 802 detects that the removable data storage device is removed from the terminal device. The storage device is not safely removed. The detecting module 802 is further configured to determine that the removable data storage device is detected again before the writing module 801 writes the second data stored in the storage medium to the removable data storage device. The timing of coupling to the terminal device is to prompt the user that the removable data storage device is not securely removed after detecting that the removable data storage device is removed from the terminal device Within the preset duration.
在一种可能的实现方式中,在所述检测模块802检测到所述可移动数据存储装置被从所述终端设备上移除后,所述提示模块804提示用户所述可移动数据存储装置没有安全移除;所述检测模块802检测到所述可移动数据存储装置再次耦合到所述终端设备,且检测到用户触发的用于确认没有安全移除的指令,则所述写入模块801将存储在所述存储介质中的第二数据写入所述可移动数据存储装置。In a possible implementation manner, after the detecting module 802 detects that the removable data storage device is removed from the terminal device, the prompting module 804 prompts the user that the removable data storage device does not Safely removing; the detection module 802 detects that the removable data storage device is coupled to the terminal device again, and detects a user-triggered instruction for confirming that there is no secure removal, then the write module 801 will Second data stored in the storage medium is written to the removable data storage device.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the device further includes:
删除模块805,用于在所述提示模块804提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,所述检测模块802未检测所述可移动数据存储装置耦合到所述终端设备,则将所述第二数据从所述存储介质中删除。a deleting module 805, configured to: after the prompting module 804 prompts the user that the removable data storage device is not safely removed, the detecting module 802 does not detect that the removable data storage device is coupled to The terminal device deletes the second data from the storage medium.
在一种可能的实现方式中,在所述存储介质为非永久性存储介质时,所述存储模块803,还用于在所述提示模块804提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,所述检测模块802未检测所述可移动数据存储装置耦合到所述终端设备,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。In a possible implementation, when the storage medium is a non-permanent storage medium, the storage module 803 is further configured to prompt the user that the removable data storage device is not safely removed at the prompting module 804. After the second preset duration, the detecting module 802 does not detect that the removable data storage device is coupled to the terminal device, and then moves the second data from the non-permanent storage medium to the permanent storage medium. .
在一种可能的实现方式中,所述提示模块804,还用于在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,所述检测模块802未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除。In a possible implementation manner, the prompting module 804 is further configured to: after the prompting the user that the removable data storage device is not safely removed, the detecting module 802 does not detect the A removable data storage device is coupled to the terminal device, again prompting the user that the removable data storage device is not securely removed.
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。The division of the modules in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner. In addition, each functional module in each embodiment of the present application may be integrated into one processing. In the device, it can also be physically existed alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
采用硬件实现时,该终端设备的硬件实现可参考图1及其相关描述。When implemented in hardware, the hardware implementation of the terminal device can refer to FIG. 1 and its related description.
所述通信接口220,用于将可移动数据存储装置与所述终端设备耦合在一起;The communication interface 220 is configured to couple the removable data storage device with the terminal device;
所述存储器130,用于存储第一数据;The memory 130 is configured to store first data.
所述处理器120,用于在将所述存储器130存储的第一数据写入所述可移动数据存储装置的过程中,检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述存储器的预设的存储空间中;在检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述预设的存储空间中的第二数据写入所述可移动数据存储装置。The processor 120 is configured to detect that the removable data storage device is removed from the terminal device during writing of the first data stored in the memory 130 to the removable data storage device And storing, in the first data, second data that has not been written into the removable data storage device in a preset storage space of the memory; detecting that the removable data storage device is coupled to When the terminal device is used, the second data stored in the preset storage space is written into the removable data storage device.
在一种可能的实现方式中,所述存储器130可以包括第一存储介质以及第二存储介质,所述第一存储介质用于存储所述第一数据;In a possible implementation manner, the memory 130 may include a first storage medium and a second storage medium, where the first storage medium is configured to store the first data;
所述处理器120,在将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述存储器的预设的存储空间中时,具体用于将所述第二数据存储在所述第二存储介质的所述预设的存储空间中。The processor 120 is configured to: when the second data that has not been written into the removable data storage device in the first data is stored in a preset storage space of the memory, The two data are stored in the preset storage space of the second storage medium.
在一种可能的实现方式中,所述处理器120,还用于在将存储在所述存储介质中的第
二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内;或者,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。In a possible implementation, the processor 120 is further configured to be stored in the storage medium
Before the second data is written into the removable data storage device, determining that the mobile data storage device is detected to be coupled to the terminal device again is detecting that the removable data storage device is from the terminal device Within a first preset duration after removal; or determining that the opportunity to detect that the removable data storage device is coupled to the terminal device again is detecting that the removable data storage device is moved from the terminal device In addition, prompting the user that the removable data storage device is not safely removed within a second preset duration.
在一种可能的实现方式中,所述处理器,还用于在检测到所述可移动数据存储装置被从所述终端设备上移除后,在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,提示用户所述可移动数据存储装置没有安全移除,并检测到用户触发的用于确认没有安全移除的指令。In a possible implementation, the processor is further configured to: after detecting that the removable data storage device is removed from the terminal device, in a second to be stored in the storage medium Before the data is written to the removable data storage device, the user is prompted to have the secure data storage device not safely removed, and a user-triggered instruction for confirming that there is no secure removal is detected.
在一种可能的实现方式中,所述处理器,还用于在提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备;将所述第二数据从所述存储空间中删除,或者在所述预设的存储空间对应的存储介质为非永久性存储介质时,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。In a possible implementation, the processor is further configured to: detect, after the prompting user that the removable data storage device is not securely removed, the mobile data storage device is not detected. Go to the terminal device; delete the second data from the storage space, or when the storage medium corresponding to the preset storage space is a non-permanent storage medium, then the second data is The permanent storage medium is moved to a permanent storage medium.
在一种可能的实现方式中,所述处理器,还用于在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除。In a possible implementation manner, the processor is further configured to: detect, after the prompting user that the removable data storage device is not securely removed, the mobile data storage device is not detected to be coupled. To the terminal device, the user is again prompted that the removable data storage device is not securely removed.
在一种可能的实现方式中,所述处理器在提示用户所述可移动数据存储装置没有安全移除时,具体用于通过所述显示器的显示界面提示用户所述可移动数据存储装置没有安全移除,或者通过所述扬声器提示用户所述可移动数据存储装置没有安全移除。In a possible implementation, when the processor prompts the user that the removable data storage device is not securely removed, the processor is specifically configured to prompt the user that the removable data storage device is not secure through the display interface of the display. Remove, or prompt the user through the speaker that the removable data storage device is not securely removed.
本申请实施例,在向可移动数据存储装置写入数据过程中,检测到可移动数据存储装置被意外移除时,将未写入的部分存到预设的存储介质中,从而在检测到该可移动数据存储装置再次耦合到该终端设备时,在未写入的部分继续写入到该可移动数据存储装置中,从而在一定程度上保证了数据的完整性以及避免了数据发生损坏。In the embodiment of the present application, in the process of writing data to the removable data storage device, when detecting that the removable data storage device is accidentally removed, the unwritten portion is stored in the preset storage medium, thereby detecting When the removable data storage device is coupled to the terminal device again, the unwritten portion continues to be written into the removable data storage device, thereby ensuring data integrity to a certain extent and avoiding data corruption.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, it is intended that the present invention cover the modifications and variations of the embodiments of the present invention.
Claims (12)
- 一种数据处理方法,其特征在于,包括:A data processing method, comprising:在将终端设备上的第一数据写入与所述终端设备耦合的可移动数据存储装置的过程中,检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述终端设备的预设的存储介质中;In the process of writing the first data on the terminal device to the removable data storage device coupled to the terminal device, detecting that the removable data storage device is removed from the terminal device, The second data of the first data that has not been written into the removable data storage device is stored in a preset storage medium of the terminal device;在检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述存储介质中的第二数据写入所述可移动数据存储装置。Upon detecting that the removable data storage device is coupled to the terminal device again, the second data stored in the storage medium is written to the removable data storage device.
- 如权利要求1所述的方法,其特征在于,所述将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,所述方法还包括:The method of claim 1, wherein the method further comprises: before the second data stored in the storage medium is written to the removable data storage device, the method further comprising:确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内;或者,Determining that the timing of detecting that the removable data storage device is coupled to the terminal device again is within a first preset duration after detecting that the removable data storage device is removed from the terminal device; or确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。Determining that the opportunity to detect that the removable data storage device is coupled to the terminal device again is to prompt the user that the removable data storage device is not present when detecting that the removable data storage device is removed from the terminal device Within the second preset duration after safe removal.
- 如权利要求1所述的方法,其特征在于,检测到所述可移动数据存储装置被从所述终端设备上移除后,在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,所述方法还包括:The method of claim 1, wherein after detecting that the removable data storage device is removed from the terminal device, writing the second data stored in the storage medium to the Before the data storage device is removable, the method further includes:提示用户所述可移动数据存储装置没有安全移除,并检测到用户触发的用于确认没有安全移除的指令。The user is prompted to have the secure data storage device not safely removed and an instruction triggered by the user to confirm that there is no safe removal is detected.
- 如权利要求2或3所述的方法,其特征在于,所述方法还包括:The method of claim 2 or 3, wherein the method further comprises:在提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备;Not detecting that the removable data storage device is coupled to the terminal device within a second preset duration after prompting the user that the removable data storage device is not securely removed;将所述第二数据从所述存储介质中删除,或者在所述存储介质为非永久性存储介质时,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。The second data is deleted from the storage medium, or when the storage medium is a non-permanent storage medium, the second data is moved from the non-permanent storage medium to the permanent storage medium.
- 如权利要求2或3所述的方法,其特征在于,所述方法还包括:The method of claim 2 or 3, wherein the method further comprises:在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除。Within the third preset duration after prompting the user that the removable data storage device is not securely removed, the removable data storage device is not detected to be coupled to the terminal device, and the user is again prompted to move the data storage The device was not safely removed.
- 一种数据处理装置,其特征在于,所述装置应用于终端设备,包括:A data processing device, wherein the device is applied to a terminal device, including:通信接口、处理器以及存储器;Communication interface, processor and memory;所述通信接口,用于将可移动数据存储装置与所述终端设备耦合在一起;The communication interface is configured to couple the removable data storage device with the terminal device;所述存储器,用于存储第一数据;The memory is configured to store first data;所述处理器,用于在将所述存储器存储的第一数据写入所述可移动数据存储装置的过程中,检测到所述可移动数据存储装置被从所述终端设备上移除时,将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述存储器的预设的存储空间中;在检测到所述可移动数据存储装置再次耦合到所述终端设备时,将存储在所述预设的存储空间中的第二数据写入所述可移动数据存储装置。The processor, when detecting that the first data stored in the memory is written into the removable data storage device, detecting that the removable data storage device is removed from the terminal device, Storing second data of the first data that has not been written to the removable data storage device in a predetermined storage space of the memory; detecting that the removable data storage device is coupled to the At the time of the terminal device, the second data stored in the preset storage space is written to the removable data storage device.
- 如权利要求6所述的装置,其特征在于,所述存储器包括第一存储介质以及第二存储介质,所述第一存储介质用于存储所述第一数据; The device according to claim 6, wherein the memory comprises a first storage medium and a second storage medium, the first storage medium for storing the first data;所述处理器,在将所述第一数据中还未写入所述可移动数据存储装置的第二数据存储在所述存储器的预设的存储空间中时,具体用于将所述第二数据存储在所述第二存储介质的所述预设的存储空间中。The processor, when storing the second data of the first data that has not been written into the removable data storage device in a preset storage space of the memory, specifically for using the second Data is stored in the preset storage space of the second storage medium.
- 如权利要求6或7所述的装置,其特征在于,所述处理器,还用于在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为在检测到所述可移动数据存储装置被从所述终端设备上移除后的第一预设时长内;或者,确定检测到所述可移动数据存储装置再次耦合到所述终端设备的时机为检测到所述可移动数据存储装置被从所述终端设备上移除时,提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内。The device according to claim 6 or 7, wherein the processor is further configured to determine that the second data stored in the storage medium is written before the removable data storage device is detected The timing of the movable data storage device being coupled to the terminal device again is within a first preset duration after detecting that the removable data storage device is removed from the terminal device; or determining that the detected The timing when the removable data storage device is coupled to the terminal device again prompts the user that the removable data storage device is not safely removed when detecting that the removable data storage device is removed from the terminal device After the second preset duration.
- 如权利要求6或7所述的装置,其特征在于,所述处理器,还用于在检测到所述可移动数据存储装置被从所述终端设备上移除后,在将存储在所述存储介质中的第二数据写入所述可移动数据存储装置之前,提示用户所述可移动数据存储装置没有安全移除,并检测到用户触发的用于确认没有安全移除的指令。The device according to claim 6 or 7, wherein the processor is further configured to: after detecting that the removable data storage device is removed from the terminal device, Before the second data in the storage medium is written to the removable data storage device, the user is prompted to the secure data storage device not to be safely removed, and a user-triggered instruction for confirming that there is no secure removal is detected.
- 如权利要求8或9所述的装置,其特征在于,所述处理器,还用于在提示用户所述可移动数据存储装置没有安全移除后的第二预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备;The device according to claim 8 or 9, wherein the processor is further configured to not detect the second preset duration after the user is prompted that the removable data storage device is not safely removed. a removable data storage device coupled to the terminal device;将所述第二数据从所述存储空间中删除,或者在所述预设的存储空间对应的存储介质为非永久性存储介质时,则将所述第二数据由非永久性存储介质移动到永久性存储介质中。Deleting the second data from the storage space, or moving the second data from the non-permanent storage medium to the non-permanent storage medium when the storage medium corresponding to the preset storage space is a non-permanent storage medium In a permanent storage medium.
- 如权利要求8或9所述的装置,其特征在于,所述处理器,还用于在提示用户所述可移动数据存储装置没有安全移除后的第三预设时长内,未检测所述可移动数据存储装置耦合到所述终端设备,再次提示所述用户所述可移动数据存储装置没有安全移除。The device according to claim 8 or 9, wherein the processor is further configured to not detect the third preset duration after the user is prompted that the removable data storage device is not safely removed. A removable data storage device is coupled to the terminal device, again prompting the user that the removable data storage device is not securely removed.
- 如权利要求8至11任一项所述的装置,其特征在于,所述装置还包括显示器或者扬声器;A device according to any one of claims 8 to 11, wherein the device further comprises a display or a speaker;所述处理器在提示用户所述可移动数据存储装置没有安全移除时,具体用于通过所述显示器的显示界面提示用户所述可移动数据存储装置没有安全移除,或者通过所述扬声器提示用户所述可移动数据存储装置没有安全移除。 When the processor prompts the user that the removable data storage device is not securely removed, specifically for prompting the user that the removable data storage device is not safely removed through the display interface of the display, or prompting through the speaker The user said removable data storage device is not securely removed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201780012551.1A CN109074301B (en) | 2017-03-13 | 2017-05-27 | Data processing method and device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710147617.X | 2017-03-13 | ||
CN201710147617 | 2017-03-13 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018166072A1 true WO2018166072A1 (en) | 2018-09-20 |
Family
ID=63521688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/086277 WO2018166072A1 (en) | 2017-03-13 | 2017-05-27 | Method and device for data processing |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109074301B (en) |
WO (1) | WO2018166072A1 (en) |
Citations (5)
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 |
CN101458672A (en) * | 2007-12-10 | 2009-06-17 | 联想(北京)有限公司 | 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 |
CN102750202A (en) * | 2012-06-06 | 2012-10-24 | 宇龙计算机通信科技(深圳)有限公司 | Data protection method and device |
US20160357566A1 (en) * | 2015-06-02 | 2016-12-08 | International Business Machines Corporation | Speculative Load Data in Byte-Write Capable Register File and History Buffer for a Multi-Slice Microprocessor |
Family Cites Families (17)
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 |
JP4078010B2 (en) * | 2000-03-03 | 2008-04-23 | 株式会社日立グローバルストレージテクノロジーズ | Magnetic disk apparatus and information recording method |
US7818477B2 (en) * | 2005-03-28 | 2010-10-19 | Panasonic Corporation | Storage device with buffer control unit |
JP4419989B2 (en) * | 2005-08-19 | 2010-02-24 | セイコーエプソン株式会社 | DATA PROCESSING DEVICE, DATA PROCESSING METHOD, CONTROL PROGRAM, AND RECORDING MEDIUM CONTAINING THE PROGRAM |
CN101566992A (en) * | 2008-04-24 | 2009-10-28 | 扬智科技股份有限公司 | Data storage system and storage method thereof |
US7937529B2 (en) * | 2008-06-23 | 2011-05-03 | International Business Machines Corporation | Detection of frequent improper removals of and changing writing policies to prevent data loss in memory sticks |
WO2010011217A1 (en) * | 2008-07-22 | 2010-01-28 | Lsi Corporation | 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 |
CN103262054B (en) * | 2010-12-13 | 2015-11-25 | 桑迪士克科技股份有限公司 | For automatically submitting device, the system and method for storer to |
US9003103B2 (en) * | 2011-09-12 | 2015-04-07 | Microsoft Technology Licensing, Llc | Nonvolatile media dirty region tracking |
CN102866964B (en) * | 2012-09-18 | 2015-06-03 | 北京奇虎科技有限公司 | Method and device for protecting data on storage equipment |
US9448896B2 (en) * | 2013-08-07 | 2016-09-20 | Seagate Technology Llc | Torn write mitigation |
CN103577124A (en) * | 2013-11-15 | 2014-02-12 | 华为终端有限公司 | Method and device for prompting read-write state of external storage equipment |
CN104699413B (en) * | 2013-12-09 | 2019-02-22 | 群联电子股份有限公司 | Data management method, memory storage device and memory control circuit unit |
CN105700971A (en) * | 2014-11-28 | 2016-06-22 | 东莞宇龙通信科技有限公司 | Data backup method and device |
CN104503703B (en) * | 2014-12-16 | 2018-06-05 | 华为技术有限公司 | The treating method and apparatus of caching |
CN105138280B (en) * | 2015-07-31 | 2018-10-19 | 成都华为技术有限公司 | Method for writing data, apparatus and system |
-
2017
- 2017-05-27 WO PCT/CN2017/086277 patent/WO2018166072A1/en active Application Filing
- 2017-05-27 CN CN201780012551.1A patent/CN109074301B/en active Active
Patent Citations (5)
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 |
CN101458672A (en) * | 2007-12-10 | 2009-06-17 | 联想(北京)有限公司 | 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 |
CN102750202A (en) * | 2012-06-06 | 2012-10-24 | 宇龙计算机通信科技(深圳)有限公司 | Data protection method and device |
US20160357566A1 (en) * | 2015-06-02 | 2016-12-08 | International Business Machines Corporation | Speculative Load Data in Byte-Write Capable Register File and History Buffer for a Multi-Slice Microprocessor |
Also Published As
Publication number | Publication date |
---|---|
CN109074301B (en) | 2021-10-08 |
CN109074301A (en) | 2018-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102557125B1 (en) | Electronic device and control method thereof | |
KR102056316B1 (en) | Method of operating touch screen and electronic device thereof | |
US20140279437A1 (en) | Method and apparatus for electronic payment in electronic device | |
EP3792741B1 (en) | Method for browsing folder of application, and electronic device | |
CN109446832B (en) | Screen capturing method and device | |
US20140351725A1 (en) | Method and electronic device for operating object | |
KR102337157B1 (en) | Electronic blackboard apparatus and the controlling method thereof | |
JP5639489B2 (en) | Information processing apparatus, control method therefor, program, and storage medium | |
KR102155133B1 (en) | Method and apparatus for displaying image | |
JP6190978B2 (en) | Firmware refresh method, apparatus, program, and recording medium | |
CN105138247A (en) | Presenting user interface on a first device based on detection of a second device within a proximity to the first device | |
CN108255674A (en) | Method and device for collecting process logs of multi-process browser and mobile terminal | |
WO2019033655A1 (en) | Method and apparatus for mistouch prevention, device, and storage medium | |
JP2019158986A5 (en) | ||
CN106371693B (en) | A method and mobile terminal for displaying navigation information | |
CN103677480B (en) | For measuring the equipment and its control method of coordinate | |
US9904322B2 (en) | Mass storage device | |
JP2015207040A (en) | Touch operation input device, touch operation input method, and program | |
KR20140137629A (en) | Mobile terminal for detecting earphone connection and method therefor | |
CN105829998B (en) | Bind the appliance to the computing device | |
CN106534482B (en) | Method and device for managing application programs of mobile terminal | |
EP2813947B1 (en) | Electronic device and method for mounting file system using virtual block device | |
WO2018166072A1 (en) | Method and device for data processing | |
US9857910B2 (en) | Method for controlling multiple touchscreens and electronic device | |
CN110795285A (en) | Backup mark display method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17900405 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17900405 Country of ref document: EP Kind code of ref document: A1 |