CN107632795B - Method, device, mobile terminal and computer storage medium for moving data - Google Patents
Method, device, mobile terminal and computer storage medium for moving data Download PDFInfo
- Publication number
- CN107632795B CN107632795B CN201711009177.8A CN201711009177A CN107632795B CN 107632795 B CN107632795 B CN 107632795B CN 201711009177 A CN201711009177 A CN 201711009177A CN 107632795 B CN107632795 B CN 107632795B
- Authority
- CN
- China
- Prior art keywords
- data
- moved
- target position
- copied
- subdata
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Telephone Function (AREA)
Abstract
The invention provides a method, equipment, a mobile terminal and a computer storage medium for moving data, which comprises the following steps: receiving a data movement request; the data moving request corresponds to data to be moved and a target position; executing the operation of copying the data to be moved to the target position; when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved; and if so, deleting the data to be moved to finish data movement. Therefore, according to the scheme, when data are moved, the data are copied to the target position, then the original data are deleted after the completion and success of copying are determined, even if problems occur in any link in the scheme, data cannot be lost, and the safety of the data is guaranteed.
Description
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, device, mobile terminal, and computer storage medium for moving data.
Background
When data movement is performed, for example, a photo folder DCIM is cut to a new directory, the cut photo may be lost. Specifically, In a specific example, when a large folder containing photos and videos, such as a Digital Camera In Memory (DCIM) folder, is cut on an external Memory card by an Android mobile phone, there is a possibility that only a few photos are obtained, and other photos are not obtained. For this case, the photos cannot be recovered, which results in very poor user experience.
Therefore, a secure method is needed for data movement to ensure the security of data migration.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method, equipment, a mobile terminal and a computer storage medium for moving data, which are used for realizing safe moving data so as to ensure the data safety of a user.
Specifically, the present invention proposes the following specific examples:
the technical scheme of the invention provides a method for moving data, which comprises the following steps:
receiving a data movement request; the data moving request corresponds to data to be moved and a target position;
executing the operation of copying the data to be moved to the target position;
when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
and if so, deleting the data to be moved to finish data movement.
The second technical solution of the present invention is to provide, on the basis of the first technical solution, the executing of the operation of copying the data to be moved to the target location includes:
determining the number of subdata included in the data to be moved;
and if the number is larger than a preset value, copying the data to be moved to the target position.
The third technical scheme of the invention is provided on the basis of the second technical scheme, and the third technical scheme also comprises the following steps:
and if the number is less than or equal to a preset value, executing moving operation on the data to be moved according to a preset moving scheme.
The fourth technical solution of the present invention is to provide, on the basis of the third technical solution, that the moving operation corresponding to the moving scheme is an operation of deleting data on which the moving operation is performed while moving the data.
A fifth technical solution of the present invention is provided on the basis of the first technical solution, where the data movement request includes: a request to move data, a request to cut data, a request to delete data after compression.
A sixth technical solution of the present invention is provided on the basis of the first technical solution, where the determining that the copying operation is completed includes:
and determining that the physical storage corresponding to the data to be moved at the target position completes the synchronous operation.
A seventh technical solution of the present invention is provided on the basis of the first technical solution, where the determining whether the data copied to the target location is consistent with the data to be moved includes:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
The technical scheme eight of the invention is provided on the basis of the technical scheme one or the technical scheme seven, and the invention further comprises the following steps:
when the data copied to the target position is inconsistent with the data to be moved, acquiring and displaying information of inconsistent data parts, and generating prompt operation information; wherein the prompt operation information includes: an information icon for discarding the inconsistent data portion, and an information icon for re-performing the copy operation on the inconsistent data portion.
The ninth technical solution of the present invention is provided on the basis of the first technical solution, and if the determination result is yes, deleting the data to be moved to complete data movement includes:
if the judgment result is yes, generating a message of successful copying and generating prompt information; the prompt information is used for prompting whether to delete the data to be moved;
and when a feedback deletion confirmation instruction is acquired, deleting the data to be moved to finish data movement.
The technical scheme of the invention provides a device for moving data, which comprises:
the receiving module is used for receiving a data moving request; the data moving request corresponds to data to be moved and a target position;
the execution module is used for executing the operation of copying the data to be moved to the target position;
the judging module is used for judging whether the data copied to the target position is consistent with the data to be moved or not when the copying operation is determined to be completed;
and the deleting module is used for deleting the data to be moved to finish data movement when the judgment result is yes.
The eleventh technical solution of the present invention is provided on the basis of the tenth technical solution, wherein the execution module is configured to:
determining the number of subdata included in the data to be moved;
and if the number is larger than a preset value, copying the data to be moved to the target position.
The twelfth technical scheme of the invention is provided on the basis of the eleventh technical scheme, and the twelfth technical scheme further comprises the following steps:
and the processing module is used for executing the moving operation on the data to be moved according to a preset moving scheme when the number is less than or equal to a preset value.
A thirteenth technical means is to provide, on the basis of the twelfth technical means, that the moving operation corresponding to the moving means is an operation of deleting data on which the moving operation is performed while moving the data.
A fourteenth technical solution of the present invention is provided on the basis of the tenth technical solution, where the data movement request includes: a request to move data, a request to cut data, a request to delete data after compression.
A fifteenth technical solution of the present invention is provided on the basis of the tenth technical solution, where the determining module determines that the copying operation is completed, and the method includes:
and determining that the physical storage corresponding to the data to be moved at the target position completes the synchronous operation.
A sixteenth technical solution of the present invention is provided on the basis of the tenth technical solution, in which the determining module determines whether the data copied to the target location is consistent with the data to be moved, and the determining module includes:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
A seventeenth technical solution of the present invention is provided on the basis of the tenth or sixteenth technical solution, further comprising:
the prompt operation module is used for acquiring and displaying information of inconsistent data parts and generating prompt operation information when the data copied to the target position is inconsistent with the data to be moved; wherein the prompt operation information includes: an information icon for discarding the inconsistent data portion, and an information icon for re-performing the copy operation on the inconsistent data portion.
Eighteen, the technical solution of the present invention is provided in the technical solution tenth, and the deletion module is configured to:
when the judgment result is yes, generating a message of successful copying and generating prompt information; the prompt information is used for prompting whether to delete the data to be moved;
and when a feedback deletion confirmation instruction is acquired, deleting the data to be moved to finish data movement.
The nineteenth technical scheme of the invention provides a mobile terminal, which comprises:
a processor;
a memory storing executable instructions for the processor;
wherein the processor is configured to:
receiving a data movement request; the data moving request corresponds to data to be moved and a target position;
executing the operation of copying the data to be moved to the target position;
when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
and if so, deleting the data to be moved to finish data movement.
Twenty of the technical solutions of the present invention provides a computer storage medium, in which a computer program is stored; the computer program is for performing the following process:
the method comprises the following steps of A, receiving a data moving request; the data moving request corresponds to data to be moved and a target position;
the process B is used for executing the operation of copying the data to be moved to the target position;
step C, when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
and D, if the judgment result is yes, deleting the data to be moved to finish data movement.
Thus, the invention provides a method, a device, a mobile terminal and a computer storage medium for moving data, comprising: receiving a data movement request; the data moving request corresponds to data to be moved and a target position; executing the operation of copying the data to be moved to the target position; when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved; and if so, deleting the data to be moved to finish data movement. Therefore, according to the scheme, when data are moved, the data are copied to the target position, then the original data are deleted after the completion and success of copying are determined, even if problems occur in any link in the scheme, data cannot be lost, and the safety of the data is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart illustrating a method for moving data according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for moving data according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for moving data according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for moving data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for moving data according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
Various embodiments of the present disclosure will be described more fully hereinafter. The present disclosure is capable of various embodiments and of modifications and variations therein. However, it should be understood that: there is no intention to limit the various embodiments of the disclosure to the specific embodiments disclosed herein, but rather, the disclosure is to cover all modifications, equivalents, and/or alternatives falling within the spirit and scope of the various embodiments of the disclosure.
Example 1
Embodiment 1 of the present invention discloses a method for moving data, as shown in fig. 1, including the following steps:
specifically, in an embodiment, the data movement request includes: a request to move data, a request to cut data, a request to delete data after compression.
Specifically, in addition to the above request, other data movement requests may be included, and the method is not limited to the above specific examples as long as the request relates to data transmission to a new location and an original file after the data transmission is completed is deleted;
specifically, taking data as a folder and a clip folder as an example for description, for example, a user wants to clip the folder 1 on the disk C to the disk F, and will initiate a data moving request, where the data to be moved corresponding to the data moving request is the folder, and the target location is the disk F.
102, executing an operation of copying the data to be moved to the target position;
specifically, in an embodiment, the executing of the operation of copying the data to be moved to the target location in step 102 includes:
determining the number of subdata included in the data to be moved;
and if the number is larger than a preset value, copying the data to be moved to the target position.
Specifically, taking fig. 2 and fig. 3 as an example, considering that a user generally has many files and is in disorder (there may be hidden files or files that cannot be deleted inside) in the process of moving a large folder, if a power failure occurs in the moving process, a subsystem is restarted, resources such as a memory or a cpu are insufficient, and a process of cutting a file is abnormally ended, the moving process is abnormally ended, data is not synchronized to a physical storage, dirty data is left, and a file loss is caused. For this reason, the larger the amount of data, the longer the time for causing the movement, and the greater the probability that the data loss will occur.
Specifically, in one embodiment, if the number is less than or equal to a preset value, the moving operation is performed on the data to be moved according to a preset moving scheme.
For this reason, when the number of the sub data of the data to be moved is less, for example, less than or equal to 500 (the value is not limited to this number, and may be specifically set based on different specific environments, needs of a user, and the like or set by a user in a user-defined manner), the data may be moved according to a preset moving flow, and the specific preset moving flow may include an original moving data flow or operation;
specifically, in an embodiment, as shown in fig. 4, the moving operation corresponding to the moving scheme is an operation of deleting data on which the moving operation is performed while moving the data.
Of course, the copy process may be performed first regardless of the number of sub-data.
103, when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
specifically, in an embodiment, the operation of determining the copy in step 103 is completed, and includes:
and determining that the physical storage corresponding to the data to be moved at the target position completes the synchronous operation.
Specifically, considering that the data is transferred by a buffer, the data transfer is actually completed only after all the data is transferred from the buffer to a physical storage, such as a hard disk, and the like, and therefore, the confirmation of the copy completion is performed based on the confirmation that all the data to be moved completes the synchronization operation on the physical storage corresponding to the target location.
The step 103 of determining whether the data copied to the target location is consistent with the data to be moved includes:
specifically, for example, as shown in fig. 2, it is determined whether the number of the sub data in the data copied to the target location and the data to be moved are consistent with each other and the size of each sub data is consistent with each other; or
For example, as shown in fig. 3, it is determined whether the number of the sub data in the data copied to the target location is consistent with the sub data in the data to be moved, the size of each sub data, and the empty sub data;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
Specifically, whether all the listed parts are consistent or not needs to be judged, for example, the number needs to be consistent, the size of each subdata needs to be consistent, and the like, that is, as long as one is inconsistent, the whole is inconsistent.
And when it is determined that the inconsistency has occurred, the method further comprises:
when the data copied to the target position is inconsistent with the data to be moved, acquiring and displaying information of inconsistent data parts, and generating prompt operation information; wherein the prompt operation information includes: an information icon for discarding the inconsistent data portion, and an information icon for re-performing the copy operation on the inconsistent data portion.
Specifically, for example, after the copy is completed, it is found that the subfile 102 and the subfile 2030 do not exist at the target location, in this case, prompt operation information may be generated based on this, so that the user may select whether to abandon the two files or retry the copy of the two files to the target location, and then the determination is continued after the copy is completed.
And 104, if the judgment result is yes, deleting the data to be moved to finish data movement.
In a specific embodiment, if the determination result in step 104 is yes, deleting the data to be moved to complete data movement includes:
if the judgment result is yes, generating a message of successful copying and generating prompt information; the prompt information is used for prompting whether to delete the data to be moved;
and when a feedback deletion confirmation instruction is acquired, deleting the data to be moved to finish data movement.
Specifically, the copying is confirmed to be successful, that is, all the subdata (exception given by the user) in the data to be moved is successfully copied to the target position; in this case, the original data may be deleted as it is, or may be deleted again when the user instructs deletion.
Example 2
Embodiment 2 of the present invention also discloses a device for moving data, as shown in fig. 5, including:
a receiving module 201, configured to receive a data movement request; the data moving request corresponds to data to be moved and a target position;
an execution module 202, configured to execute an operation of copying the data to be moved to the target location;
a judging module 203, configured to, when it is determined that the copying operation is completed, judge whether the data copied to the target location is consistent with the data to be moved;
and the deleting module 204 is configured to delete the data to be moved to complete data movement when the determination result is yes.
In a specific embodiment, the executing module 202 is configured to:
determining the number of subdata included in the data to be moved;
and if the number is larger than a preset value, copying the data to be moved to the target position.
In a specific embodiment, the apparatus further comprises:
and the processing module is used for executing the moving operation on the data to be moved according to a preset moving scheme when the number is less than or equal to a preset value.
In a specific embodiment, the moving operation corresponding to the moving scheme is an operation of deleting data on which the moving operation is performed while moving the data.
In a specific embodiment, the data movement request includes: a request to move data, a request to cut data, a request to delete data after compression.
In a specific embodiment, the determining module 203 determines that the copying operation is completed, including:
and determining that the physical storage corresponding to the data to be moved at the target position completes the synchronous operation.
In a specific embodiment, the determining module 203 determines whether the data copied to the target location is consistent with the data to be moved, including:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
In a specific embodiment, the apparatus further comprises:
the prompt operation module is used for acquiring and displaying information of inconsistent data parts and generating prompt operation information when the data copied to the target position is inconsistent with the data to be moved; wherein the prompt operation information includes: an information icon for discarding the inconsistent data portion, and an information icon for re-performing the copy operation on the inconsistent data portion.
In a specific embodiment, the deleting module 204 is configured to:
when the judgment result is yes, generating a message of successful copying and generating prompt information; the prompt information is used for prompting whether to delete the data to be moved;
and when a feedback deletion confirmation instruction is acquired, deleting the data to be moved to finish data movement.
Example 3
As shown in fig. 6, for convenience of illustration, only the portion related to the embodiment of the present invention is shown, and details of the technique are not disclosed, please refer to the method portion of the embodiment of the present invention. The mobile terminal may be any mobile terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc., taking the mobile terminal as the mobile phone as an example:
fig. 6 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present invention. Referring to fig. 6, the handset includes: radio Frequency (RF) circuitry 1510, memory 1520, input unit 1530, display unit 1540, sensor 1550, audio circuitry 1560, wireless fidelity (WiFi) module 1570, processor 1580, and power supply 1590. Those skilled in the art will appreciate that the handset configuration shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Fig. 6 specifically describes each component of the mobile phone:
the RF circuit 1510 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the downlink information to the baseband processor 1581; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1510 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1510 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 1520 may be used to store software programs and modules, and the processor 1580 performs various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 1520. The memory 1520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1520 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532. The touch panel 1531, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on or near the touch panel 1531 using any suitable object or accessory such as a finger or a stylus) and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1531 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1580, and can receive and execute commands sent by the processor 1580. In addition, the touch panel 1531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 1530 may include other input devices 1532 in addition to the touch panel 1531. In particular, other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1540 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 1540 may include a Display panel 1541, and optionally, the Display panel 1541 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1531 may cover the display panel 1541, and when the touch panel 1531 detects a touch operation on or near the touch panel 1531, the touch operation is transmitted to the processor 1580 to determine the type of the touch event, and then the processor 1580 provides a corresponding visual output on the display panel 1541 according to the type of the touch event. Although in fig. 6, the touch panel 1531 and the display panel 1541 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1531 and the display panel 1541 may be integrated to implement the input and output functions of the mobile phone.
The handset can also include at least one sensor 1550, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 1541 according to the brightness of ambient light and a proximity sensor that turns off the display panel 1541 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a WiFi module 1570, and provides wireless broadband internet access for the user. Although fig. 6 shows WiFi module 1570, it is understood that it does not belong to the essential components of the handset and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1580 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1520 and calling data stored in the memory 1520, thereby integrally monitoring the mobile phone. Optionally, the processor 1580 may include one or more processing units; preferably, the processor 1580 may incorporate an application processor, which primarily handles operating systems, user interfaces, application programs, and the like. The baseband processor 1581 mainly functions to perform baseband encoding/decoding, voice encoding, and the like, and the baseband processor 1581 may integrate a modem processor, or may not integrate the modem processor into the baseband processor 1581. It is to be appreciated that the baseband processor 1581 may also be integrated within the processor 1580.
The handset also includes a power supply 1590 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1580 via a power management system to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein. In this embodiment of the present invention, the processor 1580 included in the terminal is configured to:
receiving a data movement request; the data moving request corresponds to data to be moved and a target position;
executing the operation of copying the data to be moved to the target position;
when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
and if so, deleting the data to be moved to finish data movement.
Specifically, the embodiment 3 further includes other related features, and for the specific features, refer to the contents of the embodiments 1 and 2.
Example 4
The embodiment of the invention also discloses a computer storage medium, wherein the computer storage medium stores a computer program; the computer program is for performing the following process:
the method comprises the following steps of A, receiving a data moving request; the data moving request corresponds to data to be moved and a target position;
the process B is used for executing the operation of copying the data to be moved to the target position;
step C, when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
and D, if the judgment result is yes, deleting the data to be moved to finish data movement.
Specifically, the embodiment 4 further includes other related features, and for the specific features, refer to the contents of the embodiments 1 and 2.
Thus, the invention provides a method, a device, a mobile terminal and a computer storage medium for moving data, comprising: receiving a data movement request; the data moving request corresponds to data to be moved and a target position; executing the operation of copying the data to be moved to the target position; when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved; and if so, deleting the data to be moved to finish data movement. Therefore, according to the scheme, when data are moved, the data are copied to the target position, then the original data are deleted after the completion and success of copying are determined, even if problems occur in any link in the scheme, data cannot be lost, and the safety of the data is guaranteed.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned invention numbers are merely for description and do not represent the merits of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present invention, however, the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.
Claims (14)
1. A method of moving data, comprising:
receiving a data movement request; the data moving request corresponds to data to be moved and a target position;
executing the operation of copying the data to be moved to the target position;
when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
if the judgment result is yes, deleting the data to be moved to finish data movement;
the executing the operation of copying the data to be moved to the target position comprises:
determining the number of subdata included in the data to be moved;
if the number is larger than a preset value, copying the data to be moved to the target position, and if the number is smaller than or equal to the preset value, performing moving operation on the data to be moved according to a preset moving scheme;
the judging whether the data copied to the target position is consistent with the data to be moved includes:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
2. The method according to claim 1, wherein the move operation corresponding to the move scheme is an operation of deleting data on which the move operation is performed while moving the data.
3. The method of claim 1, wherein the data movement request comprises: a request to move data, a request to cut data, a request to delete data after compression.
4. The method of claim 1, wherein the operation of determining that the copy is complete comprises:
and determining that the physical storage corresponding to the data to be moved at the target position completes the synchronous operation.
5. The method of claim 1, further comprising:
when the data copied to the target position is inconsistent with the data to be moved, acquiring and displaying information of inconsistent data parts, and generating prompt operation information; wherein the prompt operation information includes: an information icon for discarding the inconsistent data portion, and an information icon for re-performing the copy operation on the inconsistent data portion.
6. The method of claim 1, wherein if the determination result is yes, deleting the data to be moved to complete data movement, comprising:
if the judgment result is yes, generating a message of successful copying and generating prompt information; the prompt information is used for prompting whether to delete the data to be moved;
and when a feedback deletion confirmation instruction is acquired, deleting the data to be moved to finish data movement.
7. An apparatus for moving data, comprising:
the receiving module is used for receiving a data moving request; the data moving request corresponds to data to be moved and a target position;
the execution module is used for executing the operation of copying the data to be moved to the target position;
the judging module is used for judging whether the data copied to the target position is consistent with the data to be moved or not when the copying operation is determined to be completed;
the deleting module is used for deleting the data to be moved to finish data movement when the judging result is yes;
the execution module is configured to determine the number of sub data included in the data to be moved;
if the quantity is larger than a preset value, copying the data to be moved to the target position;
the processing module is used for executing moving operation on the data to be moved according to a preset moving scheme when the number is smaller than or equal to a preset value;
the judging module judges whether the data copied to the target position is consistent with the data to be moved, and the judging module comprises the following steps:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
8. The apparatus according to claim 7, wherein the move operation corresponding to the move scheme is an operation of deleting data on which the move operation is performed while moving the data.
9. The device of claim 7, wherein the data movement request comprises: a request to move data, a request to cut data, a request to delete data after compression.
10. The apparatus of claim 7, wherein the determining module determines that the copying operation is complete comprises:
and determining that the physical storage corresponding to the data to be moved at the target position completes the synchronous operation.
11. The apparatus of claim 7, further comprising:
the prompt operation module is used for acquiring and displaying information of inconsistent data parts and generating prompt operation information when the data copied to the target position is inconsistent with the data to be moved; wherein the prompt operation information includes: an information icon for discarding the inconsistent data portion, and an information icon for re-performing the copy operation on the inconsistent data portion.
12. The device of claim 7, wherein the deletion module is to:
when the judgment result is yes, generating a message of successful copying and generating prompt information; the prompt information is used for prompting whether to delete the data to be moved;
and when a feedback deletion confirmation instruction is acquired, deleting the data to be moved to finish data movement.
13. A mobile terminal, comprising:
a processor;
a memory storing executable instructions for the processor;
wherein the processor is configured to:
receiving a data movement request; the data moving request corresponds to data to be moved and a target position;
executing the operation of copying the data to be moved to the target position;
when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
if the judgment result is yes, deleting the data to be moved to finish data movement;
the executing the operation of copying the data to be moved to the target position comprises:
determining the number of subdata included in the data to be moved;
if the number is larger than a preset value, copying the data to be moved to the target position, and if the number is smaller than or equal to the preset value, performing moving operation on the data to be moved according to a preset moving scheme;
the judging whether the data copied to the target position is consistent with the data to be moved includes:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
14. A computer storage medium, wherein a computer program is stored in the computer storage medium; the computer program is for performing the following process:
the method comprises the following steps of A, receiving a data moving request; the data moving request corresponds to data to be moved and a target position;
the process B is used for executing the operation of copying the data to be moved to the target position;
step C, when the copying operation is determined to be finished, judging whether the data copied to the target position is consistent with the data to be moved;
if the judgment result is yes, deleting the data to be moved to finish data movement;
the performing of the operation of copying the data to be moved to the target location in the flow B comprises:
determining the number of subdata included in the data to be moved;
if the number is larger than a preset value, copying the data to be moved to the target position, and if the number is smaller than or equal to the preset value, performing moving operation on the data to be moved according to a preset moving scheme;
the determining whether the data copied to the target location is consistent with the data to be moved in the process C includes:
judging whether the number of the subdata in the data copied to the target position is consistent with that of the data to be moved and the size of each subdata; or
Judging whether the number of subdata in the data copied to the target position and the data to be moved, the size of each subdata and the empty subdata are consistent or not;
if the judgment results are yes, determining that the data copied to the target position are consistent with the data to be moved;
and if the judgment results are not yes, determining that the data copied to the target position is inconsistent with the data to be moved.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711009177.8A CN107632795B (en) | 2017-10-25 | 2017-10-25 | Method, device, mobile terminal and computer storage medium for moving data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711009177.8A CN107632795B (en) | 2017-10-25 | 2017-10-25 | Method, device, mobile terminal and computer storage medium for moving data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107632795A CN107632795A (en) | 2018-01-26 |
CN107632795B true CN107632795B (en) | 2020-11-24 |
Family
ID=61106366
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711009177.8A Active CN107632795B (en) | 2017-10-25 | 2017-10-25 | Method, device, mobile terminal and computer storage medium for moving data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107632795B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704174A (en) * | 2018-07-09 | 2020-01-17 | 中国移动通信有限公司研究院 | Memory release method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101458632A (en) * | 2007-12-12 | 2009-06-17 | 国际商业机器公司 | Data object copy/paste transfer method and device |
CN102789492A (en) * | 2012-07-05 | 2012-11-21 | 天津三星通信技术研究有限公司 | File mobility management method and device |
CN105446888A (en) * | 2014-05-30 | 2016-03-30 | 华为技术有限公司 | Data transferring method between storage devices, controller, and storage system |
CN106445421A (en) * | 2016-10-14 | 2017-02-22 | 郑州云海信息技术有限公司 | Storage system data migration method and system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110023415A (en) * | 2009-08-31 | 2011-03-08 | 주식회사 잉카인터넷 | Data copying method using an outside storage media |
CN104346452B (en) * | 2014-10-28 | 2016-08-17 | 腾讯科技(深圳)有限公司 | The method and device that a kind of software is moved |
US9996275B2 (en) * | 2016-02-16 | 2018-06-12 | Netapp Inc. | Calculating cutover time in a copy-free transition of storage objects |
CN106445707A (en) * | 2016-10-12 | 2017-02-22 | 北京元心科技有限公司 | Method and device for sharing data of multisystem clipboard |
CN106502826B (en) * | 2016-10-19 | 2019-06-18 | Oppo广东移动通信有限公司 | Data backup and transmission method and mobile terminal |
-
2017
- 2017-10-25 CN CN201711009177.8A patent/CN107632795B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101458632A (en) * | 2007-12-12 | 2009-06-17 | 国际商业机器公司 | Data object copy/paste transfer method and device |
CN102789492A (en) * | 2012-07-05 | 2012-11-21 | 天津三星通信技术研究有限公司 | File mobility management method and device |
CN105446888A (en) * | 2014-05-30 | 2016-03-30 | 华为技术有限公司 | Data transferring method between storage devices, controller, and storage system |
CN106445421A (en) * | 2016-10-14 | 2017-02-22 | 郑州云海信息技术有限公司 | Storage system data migration method and system |
Also Published As
Publication number | Publication date |
---|---|
CN107632795A (en) | 2018-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10635449B2 (en) | Method and apparatus for running game client | |
CN104518953B (en) | Method for deleting message, instant communication terminal and system | |
KR101610454B1 (en) | Data transmission method and apparatus, and terminal with touch screen | |
CN110324489B (en) | Method for displaying multiple application windows by mobile terminal and mobile terminal | |
CN106484562B (en) | A kind of data transmission processing method and terminal device | |
CN105490919A (en) | Message withdrawal method and device | |
CN109309696B (en) | Folder transmission method, sender, receiver, and storage medium | |
CN103327189A (en) | Method and device for uploading, browsing and deleting pictures | |
CN106569910B (en) | Data backup and transmission method and mobile terminal | |
CN104636047A (en) | Method and device for operating objects in list and touch screen terminal | |
CN106507269B (en) | Data migration method and terminal equipment | |
WO2015131768A1 (en) | Video processing method, apparatus and system | |
WO2018049894A1 (en) | Data transmission method and device | |
CN106658753B (en) | Data migration method and terminal equipment | |
CN106528638B (en) | Method for deleting backup data and mobile terminal | |
CN104965641A (en) | Method and apparatus for displaying information | |
WO2018049901A1 (en) | Data migration method and related devices | |
WO2018049904A1 (en) | Data migration method and related devices | |
CN106484563B (en) | Data migration method and terminal equipment | |
CN106332058A (en) | Data transmission method and terminal equipment | |
WO2017000495A1 (en) | Method and device for adding contacts | |
CN107145572B (en) | Data processing method and device, computer equipment and storage medium | |
CN105577712B (en) | A kind of file uploading method, device and system | |
CN107632795B (en) | Method, device, mobile terminal and computer storage medium for moving data | |
CN103457832A (en) | Information management method, device and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |