Data rollback method and related device

By working together between the terminal and the backup server, a target rollback file is generated and applied, solving the problem in existing technologies that cannot roll back to any historical version, and enabling flexible recovery of terminal data.

CN115080313BActive Publication Date: 2026-03-27NANJING COOLPAD SOFTWARE TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technology cannot meet users' needs to roll back their mobile phone data to any historical version because cloud servers only store backup data of the latest version.

Method used

By working together with the terminal and backup server, the target version number and the current version number are determined. The target rollback file is generated using the version change information, and the current version number is rolled back to the target version number based on the file.

Benefits of technology

It enables terminal data to be rolled back from the current version number to any historical version number, meeting users' data recovery needs and is not limited by the terminal's geographical location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080313B_ABST
    Figure CN115080313B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data rollback method and related equipment, which are used for meeting the requirement of a user to rollback mobile phone data to any historical version. The method comprises the following steps: determining a target version number and a current version number of a terminal; sending a data rollback request comprising the target version number and the current version number to a backup server, so that the backup server determines a target rollback file required for the terminal to rollback from the current version number to the target version number according to the data rollback request and each version change information uploaded by the terminal; and rolling back from the current version number to the target version number according to the target rollback file sent by the backup server.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of data processing, and in particular to a data rollback method and related device BACKGROUND

[0002] Currently, mobile phone backup is mainly completed by fixed backup time set by the mobile phone operating system. Specifically, the mobile phone operating system initiates a backup task at regular intervals, and the latest data of the mobile phone is transmitted to the cloud server based on the backup task, and then the cloud server deletes the backup data of the previous version of the mobile phone, and only the latest version of the backup data is retained in the cloud server.

[0003] When the user needs to restore the mobile phone data, the mobile phone data can only be rolled back to the data version corresponding to the previous backup data. Because the cloud server storing the mobile phone backup data does not store each version of the backup data of the mobile phone, the user's demand to roll back the mobile phone data to any historical version cannot be met. SUMMARY

[0004] Embodiments of the present application provide a data rollback method and related device to meet the user's demand to roll back the mobile phone data to any historical version.

[0005] The first aspect of the embodiments of the present application provides a data rollback method applied to a terminal, comprising:

[0006] determining a target version number and a current version number of the terminal;

[0007] sending a data rollback request including the target version number and the current version number to a backup server, so that the backup server determines a target rollback file required for the terminal to roll back from the current version number to the target version number according to the data rollback request and each version change information uploaded by the terminal;

[0008] rolling back from the current version number to the target version number according to the target rollback file sent by the backup server.

[0009] In a specific implementation manner, the method further comprises:

[0010] if the terminal is started for the first time or the terminal completes a backup, setting the extended attribute of each file in the terminal storage of the terminal to unmodified;

[0011] if any file data in the terminal storage is changed, setting the extended attribute corresponding to the any file data to modified, and determining the file data before the change corresponding to the any file data, the file data after the change corresponding to the any file data, and the file data after the change corresponding to the any file data as version change information.

[0012] In an implementation manner, the method further comprises:

[0013] in response to a data backup request, obtaining file data to be backed up in terminal data of the terminal, the extended attribute of which is modified;

[0014] sending, to the backup server, version change information including file data identification before change corresponding to the file data to be backed up, file data identification after change corresponding to the file data to be backed up, and file data after change corresponding to the file data to be backed up.

[0015] In an implementation manner, the rolling back from the current version number to the target version number according to the target rollback file sent by the backup server comprises:

[0016] sending, to the storage server corresponding to the terminal, the target rollback file, so that the storage server rolls back terminal data corresponding to the terminal from the current version number to the target version number according to the target rollback file.

[0017] The second aspect of the embodiments of the present application provides a data rollback method applied to a backup server, comprising:

[0018] in response to a data rollback request of a terminal, determining a target version number requested to be rolled back by the terminal and a current version number of the terminal;

[0019] determining, according to each version change information uploaded by the terminal, a target rollback file required for rolling back from the current version number to the target version number of the terminal; the version change information is used to indicate file change between two adjacent version numbers of the terminal;

[0020] sending, to the terminal, the target rollback file, so that the terminal rolls back from the current version number to the target version number according to the target rollback file.

[0021] In an implementation manner, the version change information comprises file change information between two adjacent version numbers and file data after change, and the file change information comprises file data identification before change and file data identification after change;

[0022] The determining, according to each version change information uploaded by the terminal, a target rollback file required for rolling back from the current version number to the target version number of the terminal comprises:

[0023] determining, according to file change information included in each version change information, target file data identification required for rolling back from the current version number to the target version number;

[0024] From the changed file data included in each of the version change information, the target file data corresponding to the target file data identifier is selected as a target rollback file.

[0025] In a specific implementation, the target file data identifier required for rollback from the current version number to the target version number is determined according to the file change information included in each of the version change information, including:

[0026] The target file change information between the current version number and the target version number is determined according to the file change information included in each of the version change information.

[0027] The target file data identifier required for rollback from the current version number to the target version number is determined according to the file data identifier before change and the file data identifier after change included in the target file change information.

[0028] In a specific implementation, the target file data identifier required for rollback from the current version number to the target version number is determined according to the file change information included in each of the version change information, including:

[0029] The original file data identifier corresponding to the first version number uploaded by the terminal is determined.

[0030] The file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number are determined according to the original file data identifier and the file data identifier before change and the file data identifier after change included in each of the version change information.

[0031] The target file data identifier required for rollback from the current version number to the target version number is determined according to the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number.

[0032] The third aspect of the embodiments of the present application provides a terminal, including:

[0033] A determination unit is configured to determine a target version number and a current version number of the terminal.

[0034] A sending unit is configured to send a data rollback request including the target version number and the current version number to a backup server, so that the backup server determines a target rollback file required for the terminal to rollback from the current version number to the target version number according to the data rollback request and each version change information uploaded by the terminal.

[0035] A rollback unit is configured to rollback from the current version number to the target version number according to the target rollback file sent by the backup server.

[0036] In a specific implementation, the terminal further comprises a setting unit;

[0037] The setting unit is configured to set the extended attribute of each file in the terminal storage of the terminal to unmodified if the terminal is started for the first time or the terminal completes a backup;

[0038] The setting unit is further configured to set the extended attribute corresponding to the changed file data in the terminal storage to modified, and determine the file data before the change corresponding to the changed file data, the file data after the change corresponding to the changed file data, and the file data after the change corresponding to the changed file data as version change information.

[0039] In a specific implementation, the terminal further comprises an obtaining unit;

[0040] The obtaining unit is configured to obtain the file data to be backed up with the extended attribute of modified in the terminal data of the terminal in response to a data backup request;

[0041] The sending unit is further configured to send, to the backup server, the version change information comprising the file data before the change corresponding to the file data to be backed up, the file data after the change corresponding to the file data to be backed up, and the file data after the change corresponding to the file data to be backed up.

[0042] In a specific implementation, the rollback unit is specifically configured to send, to the storage server corresponding to the terminal, the target rollback file, so that the storage server rolls back the terminal data corresponding to the terminal from the current version number to the target version number according to the target rollback file.

[0043] The fourth aspect of the embodiments of the present application provides a backup server, comprising:

[0044] A determining unit is configured to determine a target version number requested to be rolled back by a terminal and a current version number of the terminal in response to a data rollback request of the terminal;

[0045] The determining unit is further configured to determine a target rollback file required for the terminal to roll back from the current version number to the target version number according to each version change information uploaded by the terminal; the version change information is used to indicate the file change between two adjacent version numbers of the terminal;

[0046] A sending unit is configured to send the target rollback file to the terminal, so that the terminal rolls back from the current version number to the target version number according to the target rollback file.

[0047] In an implementation manner, the version change information comprises file change information and changed file data between two adjacent version numbers, and the file change information comprises file data identifier before change and file data identifier after change;

[0048] The determining unit is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to file change information included in each version change information.

[0049] The determining unit is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to file change information included in each version change information.

[0050] In an implementation manner, the determining unit is specifically configured to determine target file change information between the current version number and the target version number according to file change information included in each version change information.

[0051] The determining unit is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to file data identifier before change and file data identifier after change included in the target file change information.

[0052] In an implementation manner, the determining unit is specifically configured to determine original file data identifier corresponding to a first version number uploaded by the terminal.

[0053] The determining unit is specifically configured to determine file data identifier corresponding to the current version number and file data identifier corresponding to the target version number according to the original file data identifier and file data identifier before change and file data identifier after change included in each version change information.

[0054] The determining unit is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to file data identifier corresponding to the current version number and file data identifier corresponding to the target version number.

[0055] The fifth aspect of the embodiments of the present application provides a data rollback device, comprising:

[0056] a central processing unit, a memory and an input and output interface;

[0057] The memory is a volatile memory or a persistent memory.

[0058] The central processing unit is configured to communicate with the memory and perform instruction operation in the memory to execute the method in the first aspect or the second aspect.

[0059] The sixth aspect of the embodiments of the present application provides a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the method according to the first aspect or the second aspect.

[0060] The seventh aspect of the embodiments of the present application provides a computer storage medium, which stores instructions, and the instructions, when executed on a computer, cause the computer to perform the method according to the first aspect or the second aspect.

[0061] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages: according to the current version number and the target version number of the terminal, the target rollback file required for rolling back from the current version number to the target version number can be determined, and then the terminal can roll back from the current version to the target version number according to the target rollback file. The terminal is allowed to roll back from the current version number to any previous version number, which meets the needs of users to roll back the mobile phone data to any historical version (i.e. the target version number). BRIEF DESCRIPTION OF DRAWINGS

[0062] Figure 1 A system architecture diagram of the data rollback method disclosed by the embodiments of the present application;

[0063] Figure 2 A flowchart of the data rollback method disclosed by the embodiments of the present application;

[0064] Figure 3 Another flowchart of the data rollback method disclosed by the embodiments of the present application;

[0065] Figure 4 A flowchart of the extension attribute modification disclosed by the embodiments of the present application;

[0066] Figure 5 A flowchart of the rollback file determination disclosed by the embodiments of the present application;

[0067] Figure 6 A structural diagram of the terminal disclosed by the embodiments of the present application;

[0068] Figure 7 A structural diagram of the server disclosed by the embodiments of the present application;

[0069] Figure 8 A structural diagram of the data rollback device disclosed by the embodiments of the present application. DETAILED DESCRIPTION

[0070] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those of ordinary skill in the art without creative effort should fall into the scope of the present application.

[0071] The embodiments of the present application provide a data rollback method and a related device, to meet the requirement of a user to rollback mobile phone data to any historical version.

[0072] To better implement the data rollback method of the present application, please refer to Figure 1 The embodiments of the present application provide a data rollback system, which comprises at least one terminal 101 and at least one backup server 102. The terminal 101 sends a current version number and a target version number to the backup server 102. The backup server 102 determines a target rollback file for the terminal 101 to rollback from the current version number to the target version number according to the current version number, the target version number and version change information sent by the terminal 101. Then, the terminal 101 rolls back from the current version number to the target version number according to the target rollback file sent by the backup server 102.

[0073] In addition, the terminal 101 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 102 can be implemented by an independent server or a server cluster composed of multiple servers, and can be a cloud server or a network server.

[0074] Please refer to Figure 2 On the basis of the foregoing data rollback system, the embodiments of the present application further provide a data rollback method. The data rollback method provided by the embodiments of the present application can be executed by the foregoing terminal 101 and / or server 102, and comprises the following steps.

[0075] 201. The terminal determines a target version number and a current version number.

[0076] When the terminal needs to perform data rollback (i.e. the terminal data needs to be restored to a historical version), the current version of the terminal data and the target version to which the terminal data needs to be rolled back need to be determined first. Specifically, the current version and the target version can be determined by the version number of the terminal data, i.e. the current version number and the target version number of the terminal are determined.

[0077] 202. The terminal sends a data rollback request comprising the target version number and the current version number to the backup server.

[0078] After determining the target version number and the current version number, the terminal can send a data rollback request including the current version number and the target version number to the backup server, so that the server determines the target rollback file according to the data rollback request.

[0079] 203. The backup server determines the target rollback file required for the terminal to rollback from the current version number to the target version number according to the version change information uploaded by the terminal. The version change information is used to indicate the file change between two adjacent version numbers of the terminal.

[0080] The backup server stores the version change information between any adjacent versions from the target version to the current version of the terminal data. The version change information is used to indicate the file change between two adjacent version numbers of the terminal. According to the version change information between each adjacent version from the target version to the current version, the backup server can determine the target rollback file required for the terminal to rollback from the current version number to the target version number.

[0081] 204. The backup server sends the target rollback file to the terminal.

[0082] After the backup server determines the target rollback file according to the target version number and the current version number of the terminal in step 203, the backup server sends the target rollback file to the terminal for rollback.

[0083] 205. The terminal rolls back from the current version number to the target version number according to the target rollback file sent by the backup server.

[0084] According to the target rollback file sent by the backup server, the terminal can determine the file data that is different between the terminal data of the target version and the terminal data of the current version, including but not limited to modified files, deleted files, and newly added files. According to the file data that is different between the terminal data of the target version and the terminal data of the current version, the terminal can rollback from the current version number to the target version number.

[0085] Further, a user can use multiple terminals, and when the user needs to migrate the terminal data of the target version of terminal A to terminal B, a moving software is usually used. However, the moving software is a user mode program and cannot access the software data of other software of the terminal, so it cannot restore the software data of other software to a certain version. At the same time, when the mobile moving software is used, terminal A and terminal B must be in the same local area network or transmit data through Bluetooth, so terminal A and terminal B cannot be too far apart in geographical location.

[0086] Therefore, in actual application, if a user needs to migrate the terminal data of the target version of terminal A to terminal B, the backup request can be initiated by terminal B. The target version number selected by terminal B when sending the backup request can be any version number of the terminal data of a terminal corresponding to the same user identity as the user identity corresponding to terminal B, and the current version number of terminal B can be the version number of the terminal data when terminal A is backed up for the first time or the version number of the terminal data when terminal A is shipped.

[0087] In the embodiment of the present application, the target rollback file required for rolling back from the current version number to the target version number can be determined according to the current version number and the target version number of the terminal, and then the terminal can be rolled back from the current version to the target version number according to the target rollback file. The terminal is allowed to be rolled back from the current version number to any previous version number, meeting the requirement of the user to roll back the terminal data to any historical version (i.e., the target version number). Meanwhile, the target rollback file required for restoring the data is stored in the backup server, and if the user needs to migrate the terminal data of the target version of terminal A to terminal B, terminal B can only restore the terminal data to the terminal data corresponding to the target version of terminal A as long as it can communicate with the server, without being limited by the geographical position between terminal A and terminal B.

[0088] Further, considering that the terminal usually cannot be used when the data is rolled back, in the embodiment of the present application, the terminal data of the terminal can be mounted on the corresponding storage server, wherein mounting refers to a process of making computer files and directories on a storage device accessible to users through the file system of the computer by the operating system. In this case, the foregoing step 205 can be implemented in the following manner: the terminal sends the target rollback file to the corresponding storage server, the corresponding storage server sends a response of successful data rollback to the terminal after receiving the target rollback file, and then the storage server rolls back the corresponding terminal data from the current version number to the target version number according to its own state.

[0089] In the embodiment of the present application, the terminal data is mounted on the corresponding storage server, and when data rollback is needed, the corresponding storage server sends a response of successful rollback to the terminal after receiving the target rollback file, and the terminal can be normally used after receiving the response of successful rollback, and the storage server rolls back the corresponding terminal data according to its own state, achieving the effect of fast rollback.

[0090] In some embodiments, the data rollback method further includes the following steps: if the terminal is started for the first time or the terminal completes a backup, setting the extended attribute of each file in the terminal storage of the terminal to unmodified; if any file data in the terminal storage is changed, setting the extended attribute of the any file data to modified, and determining the file data identifier before the change of the any file data, the file data identifier after the change of the any file data, and the file data after the change of the any file data as version change information.

[0091] Specifically, considering that the Linux operating system has an extended attribute mechanism, the file data changed in a period of time after each backup of the terminal or after the terminal is started for the first time and before the next backup can be marked by means of the extended attribute.

[0092] By modifying the extended attribute of all file data to the unmodified state immediately after each backup of the terminal or after the terminal is started for the first time, and then determining the file data identifier before the change, the file data identifier after the change, and the file data after the change of each changed file data as version change information before the next backup, the terminal can record all difference data between the terminal data before the next backup and the terminal data of the last backup, so as to implement differential backup.

[0093] Further, after the recording of difference data is implemented by the above mechanism, the terminal can initiate a data backup request at a regular time or a user initiates a data backup request through the terminal, which is not limited here.

[0094] In response to the data backup request, the terminal acquires file data with the extended attribute of unmodified in the terminal data at the current time as to-be-backed-up file data, and then sends, to the backup server, version change information including the file data identifier before the change of the to-be-backed-up file data, the file data identifier after the change of the to-be-backed-up data, and the file data after the change of the to-be-backed-up file data. Specifically, the version change information of the to-be-backed-up file data can be determined when the version change information is sent or can be determined when each to-be-backed-up file data is changed, which is not limited here.

[0095] In some embodiments, the foregoing step 205 can be implemented in the following manner: after receiving the target rollback file, the terminal can perform the operation of deleting and replacing file data or adding new file data in the terminal data according to the file identifier and file data in the target rollback file.

[0096] In some embodiments, the foregoing step 203 can be implemented by determining target file data identifiers required for rolling back from the current version number to the target version number according to file change information included in each version change information; and selecting file data corresponding to the target file data identifiers from the changed file data included in each version change information as target rollback files.

[0097] Specifically, target file data identifiers of file data that is newly added, modified and / or deleted between the terminal data of the current version and the terminal data of the target version can be determined according to each version change information, and then the newly added or modified file data can be obtained from the corresponding version change information including the target file data identifiers according to the target file data identifiers and the change (addition, modification and / or deletion). For example, if file A1 in the terminal data of the target version is modified to A3 in the current version number (where file A1 and file A3 are different versions of file A), then file A3 needs to be modified when rolling back from the current version number to the target version number, and file A3 needs to be replaced by file A1, which can be obtained from the version change information including file A1.

[0098] Further, determining target file data identifiers required for rolling back from the current version number to the target version number according to file change information included in each version change information can be implemented in the following two ways. First, target file change information between the current version number and the target version number is determined according to file change information included in each version change information; and target file data identifiers required for rolling back from the current version number to the target version number are determined according to the file data identifiers before change and the file data identifiers after change included in the target file change information. Second, the original file data identifier corresponding to the first version number uploaded by the terminal is determined; the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number are determined according to the original file data identifier and the file data identifiers before change and the file data identifiers after change included in each version change information; and target file data identifiers required for rolling back from the current version number to the target version number are determined according to the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number.

[0099] Specifically, in mode one, the difference information in the two version change information is determined according to the version change information corresponding to the current version number and the file change information corresponding to the target version number, and the target file data identifier is determined; in mode two, the original file data identifier corresponding to the first version number uploaded by the terminal is determined first, and then the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number are determined through the original file data identifier and the file data identifier before change and the file data identifier after change included in each version change information, that is, the whole file data identifier of the terminal data corresponding to the current version number and the whole file data identifier of the terminal data corresponding to the target version number are determined according to each version change information and the original file data identifier corresponding to the first version number, and then the target file data identifier changed from the current version number to the target version number is determined according to the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number.

[0100] In order to better describe the data rollback method of the embodiments of the present application, the data rollback method of the embodiments of the present application is described below in a mobile phone using Linux operating system as the operating system.

[0101] Please refer to Figure 3 The embodiments of the present application include a mobile phone (i.e. terminal) and a server (i.e. backup server), the mobile phone includes a backup component to be, an uploading component and a rollback component; the server includes a version database and a rollback component.

[0102] Specifically, the backup component to be is used to scan the whole disk and check out the file data changed from the last backup point when the mobile phone is periodically backed up (the user sets the backup period) or the user initiates backup, and send the related version change information of the changed file data to the uploading component, so that the uploading component is encrypted and uploaded to the server. The backup component to be is composed of a kernel thread and a file extended attribute. The kernel thread is a part of the operating system, and the extended attribute is a mechanism of the Linux operating system, which can record the file data modified since the last backup time by using the extended attribute. Since any file modification operation must be completed through the kernel, and the backup component to be is in the kernel, the file modification can be detected conveniently, and then the extended attribute MODIFY=1 is set. When the kernel thread backs up, the whole disk is scanned, if the file MODIFY=1, the backup is uploaded, and after the uploading is successful, MODIFY=0. In addition, when the kernel deletes a file, the kernel thread sends a message to notify the server; when the kernel creates a file, the extended attribute MODIFY=1 is set. Please refer to Figure 4At the time when the kernel detects the file modification and the system is booted for the first time, the file modified is marked with the extended attribute MODIFY=1 and the file not modified is marked with MODIFY=0. The specific process can be referred to Figure 4 .

[0103] The uploading component is responsible for converting the target file data identifier corresponding to the encrypted (such as Android system encryption) file data into plaintext, and then re-encrypting the file data by using an asymmetric encryption algorithm and uploading the file data to the server. In a specific implementation manner, the Android system enables file-based encryption (FBE) and / or full-disk encryption (FDE) for security, and the file data on the mobile phone is encrypted by using FBE and / or FDE. Meanwhile, the Android system itself supports FBE and / or FDE, so that the Linux operating system decrypts the file by using FBE when reading the file from the disk

[0104] The rollback component of the mobile phone is responsible for covering the corresponding file data on the mobile phone according to the file data issued by the server. If the target rollback file indicates that the file data needs to be deleted, the component also deletes the corresponding file data on the mobile phone.

[0105] The version database is used to record the difference between two adjacent versions. Each version stores the file data (or deleted or newly created file data) that has been changed since the last backup point.

[0106] The rollback component of the server is used to retrieve the file data that needs to be rolled back. Please refer to Figure 5 If the latest version on the server is the #9 version and the user needs to roll back to the #2 version, the determination of the target rollback file can be performed according to the process shown in Figure 5 , that is, first determining the file data identifier of the file data that has been changed, and then determining the corresponding file data that has been changed according to the file data identifier.

[0107] Please refer to Figure 6 The embodiment of the present application provides a terminal, which comprises:

[0108] A determination unit 601 is configured to determine a target version number and a current version number of the terminal.

[0109] A sending unit 602 is configured to send a data rollback request comprising the target version number and the current version number to a backup server, so that the backup server determines a target rollback file required for rolling back the terminal from the current version number to the target version number according to the data rollback request and version change information uploaded by the terminal.

[0110] A rollback unit 603 is configured to roll back from the current version number to the target version number according to the target rollback file sent by the backup server.

[0111] In a specific implementation, the terminal further includes a setting unit;

[0112] The setting unit is configured to set the extended attribute of each file in the terminal storage of the terminal to unmodified if the terminal is started for the first time or the terminal completes a backup;

[0113] The setting unit is further configured to set the extended attribute of any file data in the terminal storage to modified if the any file data is changed, and determine the file data before the change corresponding to the any file data, the file data after the change corresponding to the any file data, and the file data after the change corresponding to the any file data as version change information.

[0114] In a specific implementation, the terminal further includes an obtaining unit;

[0115] The obtaining unit is configured to obtain, in response to a data backup request, file data to be backed up in the terminal data of the terminal, the file data to be backed up having an extended attribute of modified;

[0116] The sending unit 602 is further configured to send, to the backup server, version change information including the file data before the change corresponding to the file data to be backed up, the file data after the change corresponding to the data to be backed up, and the file data after the change corresponding to the file data to be backed up.

[0117] In a specific implementation, the rollback unit 603 is specifically configured to send, to the storage server corresponding to the terminal, a target rollback file, so that the storage server rolls back the terminal data corresponding to the terminal from a current version number to a target version number according to the target rollback file.

[0118] Please refer to Figure 7 The embodiment of the present application provides a backup server, which comprises:

[0119] The determining unit 701 is configured to determine a target version number requested to be rolled back by the terminal and a current version number of the terminal in response to a data rollback request of the terminal;

[0120] The determining unit 701 is further configured to determine a target rollback file required for the terminal to be rolled back from the current version number to the target version number according to each version change information uploaded by the terminal; the version change information is used to indicate file change between two adjacent version numbers of the terminal;

[0121] The sending unit 702 is configured to send the target rollback file to the terminal, so that the terminal is rolled back from the current version number to the target version number according to the target rollback file.

[0122] In an implementation mode, the version change information comprises file change information and changed file data between two adjacent version numbers, and the file change information comprises file data identifier before change and file data identifier after change;

[0123] The determining unit 701 is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to the file change information included in each version change information.

[0124] The determining unit 701 is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to the file change information included in each version change information.

[0125] In an implementation mode, the determining unit 701 is specifically configured to determine target file change information between the current version number and the target version number according to the file change information included in each version change information.

[0126] The determining unit 701 is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to the file change information included in each version change information.

[0127] In an implementation mode, the determining unit 701 is specifically configured to determine original file data identifier corresponding to the first version number uploaded by the terminal.

[0128] The determining unit 701 is specifically configured to determine file data identifier corresponding to the current version number and file data identifier corresponding to the target version number according to the original file data identifier and the file data identifier before change and the file data identifier after change included in each version change information.

[0129] The determining unit 701 is specifically configured to determine target file data identifier required for rolling back from the current version number to the target version number according to the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number.

[0130] Figure 8 Figure 1 is a structural schematic diagram of a data rollback device provided by an embodiment of the present application. The data rollback device 800 can comprise one or more central processing units (CPU) 801 and a memory 805, and the memory 805 stores one or more application programs or data.

[0131] The memory 805 can be volatile storage or persistent storage. The program stored in the memory 805 can comprise one or more modules, and each module can comprise a series of instruction operations in the data rollback device. Further, the central processing unit 801 can be configured to communicate with the memory 805 and execute the series of instruction operations in the memory 805 on the data rollback device 800.

[0132] The data rollback device 800 can also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input / output interfaces 804, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0133] The central processing unit 801 can perform the operations of the data rollback device described above in the embodiments, which will not be described here in detail. The data rollback device can be a terminal and / or a backup server. Figures 1 to 7 The central processing unit 801 can perform the operations of the data rollback device described above in the embodiments, which will not be described here in detail. The data rollback device can be a terminal and / or a backup server.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described here in detail.

[0135] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0136] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0137] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0138] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such an understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, read-only memory), a random access memory (RAM, random access memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0139] The embodiments of the present application also provide a computer program product containing instructions, which, when the computer program product is run on a computer, cause the computer to execute the data rollback as described above.

Claims

1. A data rollback method, characterized by, The method applied to a terminal comprises: determining a target version number and a current version number of the terminal; setting an extended attribute of each file in a terminal storage of the terminal to unmodified if the terminal is started for the first time or the terminal completes a backup; setting an extended attribute of any file data in the terminal storage to modified if the file data is changed, and determining a file data identifier before the change, a file data identifier after the change and file data after the change of the file data as version change information; sending a data rollback request comprising the target version number and the current version number to a backup server, so that the backup server determines a target rollback file required for the terminal to rollback from the current version number to the target version number according to the data rollback request and each version change information uploaded by the terminal; rollbacking from the current version number to the target version number according to the target rollback file sent by the backup server.

2. The method of claim 1, wherein, The method further comprises: in response to a data backup request, obtaining file data to be backed up with an extended attribute of unmodified in terminal data of the terminal; sending version change information comprising a file data identifier before the change, a file data identifier after the change and file data after the change of the file data to be backed up to the backup server.

3. The method of claim 1, wherein, The rollback from the current version number to the target version number according to the target rollback file sent by the backup server comprises: sending the target rollback file to a storage server corresponding to the terminal, so that the storage server rolls back terminal data corresponding to the terminal from the current version number to the target version number according to the target rollback file.

4. A data rollback method, characterized by, The method applied to a backup server comprises: in response to a data rollback request of a terminal, determining a target version number requested to be rolled back by the terminal and a current version number of the terminal; determining a target rollback file required for the terminal to rollback from the current version number to the target version number according to each version change information uploaded by the terminal; the version change information is used to indicate file change between two adjacent version numbers of the terminal; the terminal sets an extended attribute of each file in a terminal storage of the terminal to unmodified if the terminal is started for the first time or the terminal completes a backup; when any file data in the terminal storage is changed, the terminal sets an extended attribute of the file data to modified, and determines a file data identifier before the change, a file data identifier after the change and file data after the change of the file data as the version change information; sending the target rollback file to the terminal, so that the terminal rolls back from the current version number to the target version number according to the target rollback file.

5. The method of claim 4, wherein, The version change information includes file change information between two adjacent version numbers and the changed file data, and the file change information includes the file data identifier before the change and the file data identifier after the change; The step of determining the target rollback file required for the terminal to roll back from the current version number to the target version number based on the version change information uploaded by the terminal includes: Based on the file change information included in each version change information, determine the target file data identifier required to roll back from the current version number to the target version number; From the modified file data included in each version change information, select the file data corresponding to the target file data identifier as the target rollback file.

6. The method of claim 5, wherein, The step of determining the target file data identifier required to roll back from the current version number to the target version number based on the file change information included in each version change information includes: Based on the file change information included in each version change information, determine the target file change information between the current version number and the target version number; Based on the file data identifier before and after the change included in the target file change information, determine the target file data identifier required to roll back from the current version number to the target version number.

7. The method of claim 5, wherein, The step of determining the target file data identifier required to roll back from the current version number to the target version number based on the file change information included in each version change information includes: Determine the original file data identifier corresponding to the first version number uploaded by the terminal; Based on the original file data identifier and the file data identifier before and after the change included in each version change information, determine the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number; Based on the file data identifier corresponding to the current version number and the file data identifier corresponding to the target version number, determine the target file data identifier required to roll back from the current version number to the target version number.

8. A data rollback device, characterized by, include: Central processing unit, memory, and input / output interfaces; The memory is either a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method of any one of claims 1 to 3 or 4 to 7.

9. A computer storage medium, characterized in that The computer storage medium stores instructions that, when executed on the computer, cause the computer to perform the method as described in any one of claims 1 to 3 or 4 to 7.

Citation Information

Patent Citations

  • Method and device for updating software

    CN106951296A

  • Data management method and device

    CN114328746A