Backup method, device, and readable storage medium

By implementing a method of using network-attached storage devices in the device to perform data backup, users' problems due to high backup costs are solved, efficient and automatic data backup is achieved, and user experience is improved.

WO2025050802A1PCT designated stage expired Publication Date: 2025-03-13HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/103382
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-07
Filing Date
2024-07-03
Publication Date
2025-03-13

AI Technical Summary

Technical Problem

In the prior art, users need to pay a high fee to purchase additional space of cloud servers to back up application data in the device, resulting in higher backup costs.

Method used

By implementing a backup method in the device, data backup is performed using network-attached storage devices. The specific steps include detecting user operations or reaching a preset time, obtaining application data that has not been backed up in the device, and backing up through a communication protocol that supports non-local area network transmission, reducing the amount of data transmission and improving backup efficiency.

Benefits of technology

It reduces the cost of users backing up data and improves the efficiency of backup data. Users can automatically back up data without operating on the device every time, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103382_13032025_PF_FP_ABST
    Figure CN2024103382_13032025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, and discloses a backup method, a device, and a readable storage medium. In the method, when a first device has detected an operation of a user backing up application data corresponding to at least one application program or a preset backup time has been reached, the first device can acquire first application data corresponding to the at least one application program, and backs up to a second device second application data that is not backed up to the second device among the first application data, wherein the second device is a network attached storage device. Thus, the first device can upload only the second application data among the first application data to the second device, without needing to upload all the first application data, thereby improving the efficiency of the first device backing up data to the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Backup method, device and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 7, 2023, with application number 202311156820.5 and application name “Backup method, device and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of data processing technology, and in particular to a backup method, device, and readable storage medium. Background Art

[0003] The amount of application data increases over time, leading to a continuous increase in the storage space occupied by the application data on the device. To prevent application data from taking up too much storage space and improve data security, the device can back up application data to a cloud server based on user operations.

[0004] However, the free space provided by cloud servers to users is usually small, and users need to pay to purchase additional space to back up the application data of applications in their devices, resulting in higher costs for users to back up data.

[0005] Summary of the Invention

[0006] In view of this, the present application provides a backup method, device and readable storage medium, which are conducive to improving the efficiency of device data backup.

[0007] In a first aspect, the present application provides a backup method, applied to a first device, the method comprising: obtaining first application data corresponding to at least one application installed in the first device when a backup condition is met, wherein the backup condition includes the first device detecting a user operation of backing up application data corresponding to at least one application, or reaching a pre-set backup time; backing up second application data in the first application data that has not been backed up to the second device to the second device, wherein the second device is a network-attached storage device.

[0008] In some implementations of this application, when backing up first application data to a second device, the first device may only upload to the second device the second application data that has not been backed up to the second device. This method can reduce the amount of data transmitted when backing up data from the first device to the second device, thereby improving backup efficiency.

[0009] In a possible implementation of the first aspect above, the above-mentioned backup conditions also include at least one of the following conditions: when the first device backs up data to the second device for the first time, the first device is in an idle state, the remaining power of the first device is greater than a first power threshold, and the first device is connected to a router or customer premises device that provides a wireless fidelity network; when the first device backs up data to the second device for the first time, the first device is in an idle state, the first device is in a charging state, and the first device is connected to a router or customer premises device that provides a wireless fidelity network; when the first device is not backing up data to the second device for the first time, the first device is in an idle state and the remaining power of the first device is greater than a second power threshold, wherein the second power threshold is lower than the first power threshold; and the user confirms the operation of immediately backing up data to the second device.

[0010] In some implementations of the present application, if the first device does not detect a user confirmation to immediately back up data to the second device, the first device may back up data to the second device only when the first device is in an idle state and the battery level is greater than a corresponding power threshold. This method can avoid affecting the user's use of the first device while backing up data, and can also avoid backup failures due to insufficient battery.

[0011] In a possible implementation of the first aspect above, backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: obtaining first snapshot information corresponding to the first application data and second snapshot information corresponding to the data stored in the second device; based on the first snapshot information and the second snapshot information, determining the second application data in the first application data, and backing up the second application data to the second device.

[0012] In some implementations of the present application, the first device can determine the second application data in the first application data that has not been backed up to the second device by comparing the first snapshot information corresponding to the first application data and the second snapshot information corresponding to the data stored in the second device.

[0013] In a possible implementation of the above-mentioned first aspect, the above-mentioned first snapshot information includes at least one of the following information: the last modification time of each file corresponding to the first application data, the size of each file corresponding to the first application data, and the hash value of each file corresponding to the first application data; the above-mentioned second snapshot information includes at least one of the following information: the last modification time of each file corresponding to the data stored in the second device, the size of each file corresponding to the data stored in the second device, and the hash value of each file corresponding to the data stored in the second device.

[0014] In some implementations of the present application, the first device may determine the second application data by comparing the file information of each file corresponding to the first application data in the first snapshot information with the file information in the second snapshot information. For example, if the file information of a file in the first snapshot information is different from the file information in the second snapshot information, the first device may determine that the file is the file corresponding to the second application data.

[0015] In a possible implementation of the first aspect above, backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: backing up the second application data and snapshot information of the second application data to the second device; wherein the snapshot information of the second application data includes at least one of the size, last modification time and hash value of each file corresponding to the second application data.

[0016] In some implementations of the present application, snapshot information of the data stored in the second device is determined by the first device and uploaded to the second device.

[0017] In a possible implementation of the first aspect above, the operating system of the above-mentioned first device includes a synchronous collaborative service and a package management service; and obtaining the first application data corresponding to at least one application installed in the first device includes: the synchronous collaborative service uses the package management service to obtain the first application data corresponding to at least one application.

[0018] In a possible implementation of the first aspect above, backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: the synchronous collaborative service backs up the second application data in the first application data that has not been backed up to the second device to the second device.

[0019] In some implementations of the present application, the first device backs up the first application data and the second application data within the first application data based on the synchronization and collaboration services and package management services in the operating system. In this way, the first device can automatically back up data to the second device based on the backup options pre-set by the user (such as the backup frequency and target application described below), without the user having to perform operations on the first device each time, which is conducive to improving the user experience.

[0020] In a possible implementation of the first aspect above, backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: backing up the second application data to the second device through any one of the following communication protocols: Hypertext Transfer Protocol, Hypertext Transfer Protocol Secure, Transmission Control Protocol / Internet Protocol, and Point-to-Point Protocol.

[0021] In some implementations of the present application, the first device backs up the second application data to the second device via a communication protocol that supports non-local area network transmission, such as the Hypertext Transfer Protocol, Hypertext Transfer Protocol Secure, Transmission Control Protocol / Internet Protocol, and Point-to-Point Protocol. Because the Hypertext Transfer Protocol, Hypertext Transfer Protocol Secure, Transmission Control Protocol / Internet Protocol, and Point-to-Point Protocol all support non-local area network transmission, data backup can be achieved even when the first and second devices are not in the same local area network, which is beneficial to improving user experience.

[0022] In a second aspect, the present application provides a readable storage medium, which includes one or more programs. When the one or more programs are executed by a device, the device implements the backup method provided in the above-mentioned first aspect and any possible implementation of the above-mentioned first aspect.

[0023] In a third aspect, the present application provides a device comprising: a memory for storing one or more programs; and a processor for executing the one or more programs to enable the device to implement the backup method provided in the first aspect and any possible implementation of the first aspect. It should be understood that this device is equivalent to the source device described in the following embodiments.

[0024] In a fourth aspect, the present application provides a program product, which, when running on a device, enables the device to implement the backup method provided in the first aspect and any possible implementation of the first aspect.

[0025] It should be understood that the beneficial effects of the second to fourth aspects mentioned above can be referred to the description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] FIG1A shows a schematic diagram of a source device backing up data to a network attached storage device via a local area network according to some embodiments of the present application;

[0027] FIG1B is a schematic diagram showing an interface displayed on the mobile phone 10 during the process of backing up application data in the mobile phone 10 to a NAS device via the SMB protocol according to some embodiments of the present application;

[0028] FIG1C shows a schematic diagram of an interface for scanning shared folders and a folder FD1 displayed on a mobile phone 10 according to some embodiments of the present application;

[0029] FIG2 shows a schematic diagram of a source device backing up data to a network attached storage device according to some embodiments of the present application;

[0030] FIG3 is a schematic diagram showing an interface displayed on the mobile phone 10 during the process of configuring backup options of the mobile phone 10 according to some embodiments of the present application;

[0031] FIG4 is a schematic diagram showing a flow chart of a data backup method according to some embodiments of the present application;

[0032] FIG5 shows a schematic diagram of a software architecture of a mobile phone 10 according to some embodiments of the present application;

[0033] FIG6 shows a schematic diagram of an interactive process of backing up data from a mobile phone 10 to a NAS device 20 for the first time according to some embodiments of the present application;

[0034] FIG7 shows a schematic diagram of an interactive process of a mobile phone 10 backing up data to a NAS device 20 for a non-first time according to some embodiments of the present application;

[0035] FIG8 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application;

[0036] FIG9 shows a schematic structural diagram of a NAS device 20 according to some embodiments of the present application. DETAILED DESCRIPTION

[0037] Illustrative embodiments of the present application include, but are not limited to, backup methods, devices, and readable storage media.

[0038] For ease of description, in the following embodiments, the device that needs to back up application data of an application program to a storage device is referred to as a source device.

[0039] It should be understood that the source device (hereinafter referred to as the device) in the embodiments of the present application may include, but is not limited to, a mobile phone, a tablet computer, a portable computer, a wearable device (such as a smart watch or smart bracelet), a smart home device (such as a smart TV or smart speaker), an IoT device, etc. For ease of description, the following embodiments use a mobile phone as the source device as an example to introduce the technical solution of the present application.

[0040] As mentioned above, since the free space provided to users by cloud servers is usually small, users need to pay to purchase additional space to back up the application data of applications in the source device, resulting in higher costs for users to back up data.

[0041] To reduce the cost of backing up data for users, referring to FIG1A , in some embodiments, a source device can, in response to a user operation, back up application data of applications installed on the source device to a network attached storage (NAS) device via the server message block (SMB) protocol. For example, in some embodiments, the source device can back up application data of applications installed on the source device to the NAS device via the Samba application (an application that implements the SMB protocol) via the SMB protocol.

[0042] Because the client applications corresponding to NAS devices generally do not have permission to access the application data of the application, it is necessary to utilize the backup function provided by the operating system of the source device and use the Samba application to back up the application data of the user-selected application to the NAS device based on the SMB protocol. However, due to limitations of the Samba application and the SMB protocol, when backing up the application data of the user-selected application to the NAS device using the Samba application based on the SMB protocol, the source device and the NAS device must be in the same local area network (for example, connected to the same router, or connected to the same switch, or connected to the same hub), which affects the user experience.

[0043] For example, FIG. 1B and FIG. 1C illustrate schematic diagrams of interfaces displayed on the mobile phone 10 during a process of backing up application data in the mobile phone 10 to a NAS device via the SMB protocol according to some embodiments of the present application.

[0044] As shown in FIG1B , in response to the user selecting the external storage option U11 in the backup and restore interface U1, the mobile phone 10 may display the external storage interface U2. Then, in response to the user selecting the shared folder option U21 or the scan for shared folders option U22 in the external storage interface U2, the mobile phone 10 may scan for NAS devices on the same local area network as the mobile phone 10. If no NAS devices exist on the local area network where the mobile phone 10 resides, the mobile phone 10 may display a prompt box U31 in the scan for shared folders interface U3, prompting the user that "this device and your NAS device must be on the same local area network."

[0045] As shown in Figure 1C , if a NAS device 20 exists on the local area network where mobile phone 10 resides, mobile phone 10 can display a shared folder FD1 provided by NAS device 20. Then, in response to a user selecting the icon U41 for shared folder FD1, mobile phone 10 can display a backup interface U5 for shared folder FD1, allowing the user to select an application to back up its application data. Next, in response to the user selecting a target application and clicking the backup control U51, mobile phone 10 can back up the application data of the selected application to shared folder FD1 via the local area network using the SMB protocol.

[0046] Based on the above process, it can be seen that if the user wants to back up the application data of the application to the NAS device 20, the mobile phone 10 needs to be in the same local area network as the NAS device 20 (for example, connected to the same router, or connected to the same switch, or connected to the same hub), and the user needs to manually operate on the mobile phone 10, which results in a poor user experience in backing up data.

[0047] In order to improve the user experience of backing up data, an embodiment of the present application provides a data backup method. Referring to Figure 2, in this method, the source device can automatically back up the application data of the application to the NAS device. For example, the service for backup in the source device (for example, a synchronous collaborative service) can automatically back up the application data of the target application to the NAS device through other communication protocols that support non-local area network transmission when the backup time corresponding to the backup frequency is reached based on the target application set by the user (that is, the application that needs to back up the application data to the NAS device) and the backup frequency. In this way, even if the source device is not in the same local area network as the NAS device, the source device can automatically back up the application data of the target application to the NAS device, which is conducive to improving the user experience.

[0048] In some embodiments, the source device can back up the application data of the user-selected application to the NAS device through other communication protocols that support non-local area network transmission, such as hypertext transfer protocol (HTTP), hypertext transfer protocol secure (HTTPS), transmission control protocol / internet protocol (TCP / IP), and point-to-point protocol (PPP).

[0049] In some embodiments, if the target application's data is not being backed up to the NAS device for the first time, the source device may first obtain historical data snapshot information corresponding to the historical application data already backed up in the NAS device, as well as target data snapshot information corresponding to the target application's application data in the device, during the process of backing up the target application's application data to the NAS device. The source device may then compare the historical data snapshot information with the current data snapshot information to determine the incremental backup data in the target application's application data that has not been backed up to the NAS device, and back up the incremental backup data to the NAS device. In this way, the source device can back up data to the NAS device in the form of incremental backups, thereby reducing the amount of data sent by the device to the NAS device.

[0050] In some embodiments, when the source device reaches the backup time corresponding to the backup frequency set by the user, the operating status of the source device can also be detected. When the operating status of the source device meets the backup conditions, the data is backed up to the NAS device. For example, the backup conditions may include at least one of the following conditions:

[0051] When the source device backs up data to the NAS device for the first time, the source device is in an idle state, the remaining power of the source device is greater than a first power threshold, and the source device is connected to a router or customer premise equipment (CPE) that provides a wireless fidelity (Wi-Fi) network;

[0052] When the source device backs up data to the NAS device for the first time, the source device is in an idle state, the source device is in a charging state, and the source device is connected to a router or CPE that provides a Wi-Fi network;

[0053] Detecting the user's confirmation to back up data to the NAS device immediately;

[0054] When the source device does not back up data to the NAS device for the first time, the source device is in an idle state and the remaining power is greater than the second power threshold (the second power threshold is lower than the first power threshold).

[0055] In some embodiments, the idle state of the source device may be a state in which the source device is not operated by the user, for example, the source device is in a screen-off state.

[0056] Based on the above backup conditions, the source device can back up data to the NAS device when it is idle or when it detects the user confirming an immediate backup operation, thus preventing the backup from affecting user operations. The source device can also back up data to the NAS device only when the remaining battery power is sufficient, which helps improve the battery life of the source device and avoid backup failures due to insufficient remaining battery power.

[0057] In some embodiments, the application data of an application may include at least one of the following data: user data of the application, such as the user's basic information, account password, login status, shopping records, chat records, files, etc.; program data of the application, such as the application's configuration files, log files, temporary files, etc.; cached data of the application, such as text, web pages, pictures, videos, audio, files, etc. cached by the application; database of the application, such as the database used by the application and the data in the database; other data of the application, such as other data files used by the application, network connection information, etc.

[0058] It should be understood that in other embodiments, the application data of the application may also include other data, and the specific content of the application data of the application is not limited here.

[0059] In some embodiments, the NAS device may be any form of network attached storage device, including but not limited to home storage, home data center (HDC), etc.

[0060] The technical solution of this application is described below by taking the mobile phone 10 as an example of a source device.

[0061] For example, FIG3 shows a schematic diagram of a process in which a user sets up automatic backup of application data to a NAS device according to some embodiments of the present application.

[0062] Referring to Figure 3, the user can operate on the settings application of the mobile phone 10 or other applications installed on the mobile phone 10 (such as smart life applications) to make the source device display the backup and restore interface U6. Compared with the backup and restore interface U1 shown in Figure 1B, the backup and restore interface U6 includes a "Home Storage" option U61. The "Home Storage" option U61 is the entry for the user to configure the rules for the mobile phone 10 to back up the application data of the application to the NAS device.

[0063] 3 , the mobile phone 10 may display a home storage interface U7 in response to the user selecting the “home storage” option U61 . The home storage interface U7 includes a home storage switch U71 , an automatic backup frequency option U72 , a backup option U73 , and an immediate backup option U74 .

[0064] In some embodiments, the home storage switch U71 is used to configure whether the mobile phone 10 automatically backs up the application data of the target application selected by the user to the NAS device associated with the mobile phone 10 (for example, a NAS device logged in with the same account as the mobile phone 10, NAS device 20 is introduced below).

[0065] In some embodiments, the user can configure the backup frequency of the mobile phone 10 to automatically back up the application data of the target application configured by the user in the backup options to the NAS device by operating the automatic backup frequency option U72.

[0066] In some embodiments, the mobile phone 10 may select the backup option interface U8 shown in FIG. 3 in response to the user's selection operation on the backup option U73 , so that the user can select a target application in the backup option interface U8 .

[0067] When the home storage switch U71 is turned on, the mobile phone 10 can back up the application data of the target application to the NAS device 20 associated with the mobile phone 10 through HTTP, HTTPS, TCP / IP, PPP and other protocols that support non-LAN transmission according to the backup frequency configured by the user and the target application selected by the user when the backup time corresponding to the backup frequency is reached.

[0068] In some embodiments, when the mobile phone 10 is not backing up data to the NAS device 20 for the first time, it can first obtain historical data snapshot information corresponding to the historical application data backed up on the NAS device 20, as well as target data snapshot information corresponding to the application data of the target application on the mobile phone 10. The mobile phone 10 can then compare the historical data snapshot information with the current data snapshot information to determine the incremental backup data of the target application's application data that has not been backed up to the NAS device 20, and back up the incremental backup data to the NAS device 20. In this way, the mobile phone 10 can back up data to the NAS device 20 via incremental backup, reducing the amount of data sent by the mobile phone 10 to the NAS device 20.

[0069] In some embodiments, when the backup time corresponding to the backup frequency is reached, the mobile phone 10 can back up the target application's application data to the NAS 20 if the operating status of the mobile phone 10 meets the aforementioned backup conditions. This can, in some scenarios, prevent the backup from affecting the user's operation of the mobile phone 10. In other scenarios, it can improve the battery life of the mobile phone 10 and avoid backup failures due to insufficient remaining battery power in the mobile phone 10.

[0070] Next, in conjunction with the scenario shown in FIG3 , the technical solution of the present application is introduced by taking the mobile phone 10 as the source device and the NAS device 20 as an example.

[0071] FIG4 is a flow chart showing a data backup method according to some embodiments of the present application. The execution subject of the process is the mobile phone 10. As shown in FIG4 , the process includes the following steps:

[0072] S401: Acquire application data of the target application when the backup conditions are met

[0073] When the backup conditions are met, the mobile phone 10 obtains the application data of the target application selected by the user.

[0074] In some embodiments, the backup condition may include at least one of the following conditions a) to e):

[0075] a) When the mobile phone 10 backs up data to the NAS device 20 for the first time, the mobile phone 10 is in an idle state, the remaining power of the mobile phone 10 is greater than a first power threshold, and the mobile phone 10 is connected to a router or CPE providing a Wi-Fi network.

[0076] b) When the mobile phone 10 backs up data to the NAS device 20 for the first time, the mobile phone 10 is in an idle state, the mobile phone 10 is in a charging state, and the mobile phone 10 is connected to a router or CPE providing a Wi-Fi network.

[0077] c) When the mobile phone 10 is not backing up data to the NAS device 20 for the first time, the backup time corresponding to the backup frequency set by the user is reached and the mobile phone 10 is in an idle state.

[0078] d) If the mobile phone 10 is not backing up data to the NAS device 20 for the first time, the backup time corresponding to the backup frequency set by the user has arrived, the mobile phone 10 is in an idle state, and the remaining battery power of the mobile phone 10 is greater than a second battery power threshold, where the second battery power threshold is lower than the first battery power threshold.

[0079] e) Detecting the user's confirmation of immediately backing up data to the NAS device 20. For example, the mobile phone can confirm that the backup conditions are met when detecting that the user selects the immediate backup option U74 in the aforementioned home storage interface U7.

[0080] Based on the above backup conditions, it is possible to avoid backing up data while the mobile phone 10 is in use and affecting the user experience, and it is also possible to avoid backup failure due to low battery of the mobile phone 10.

[0081] It should be understood that in other embodiments, the backup conditions may also include more or fewer conditions, which is not limited here.

[0082] S402: When it is not the first time to back up data to the NAS device 20, obtain target data snapshot information and historical data snapshot information

[0083] When it is not the first time to back up data to the NAS device, the mobile phone 10 obtains target data snapshot information corresponding to the application data of the target application and historical data snapshot information corresponding to the data stored in the NAS device 20 .

[0084] In some embodiments, the target data snapshot information may include file information corresponding to each file in the application data obtained in the aforementioned step S401. The file information is used to uniquely identify a file. When the content of the file is different, the file information is different.

[0085] In some embodiments, the historical data snapshot information may include file information corresponding to each file stored in the NAS device 20 .

[0086] In some embodiments, the file information of a file may include at least one of the file size, the last modification time, and the hash value of the file, wherein the hash value of the file is a hash value obtained by a hash function (also called a hash function).

[0087] In some embodiments, the file information of each file may also include more or less information, which is not limited here.

[0088] S403: Determine incremental backup data in the application data of the target application that has not been backed up to the NAS device based on the target data snapshot information and the historical data snapshot information.

[0089] For example, the mobile phone 10 may compare the file information of a first file whose relative path (the storage path of the file in the application data of the target application relative to the root directory of the mobile phone 10) is a first path in the target data snapshot information with the file information of a second file whose relative path is the first path and whose file name is the same as the first file in the historical data snapshot information. If the file information of the first file is different from the file information of the second file, the mobile phone 10 may determine that the first file is incremental backup data that has not been backed up to the NAS device 20.

[0090] For another example, the mobile phone 10 may determine that the first file is incremental backup data when the target data snapshot information contains file information of the first file, but the historical data snapshot information does not contain file information corresponding to a file with the same file name and relative path as the first file.

[0091] In some embodiments, the mobile phone 10 may also determine the incremental backup data in the application data of the target application that has not been backed up to the NAS device 20 by other means, which is not limited here.

[0092] S404 : Upload the incremental backup data to the NAS device 20 .

[0093] After determining the incremental backup data in the application data of the target application that has not been backed up to the NAS device 20 , the mobile phone 10 uploads the incremental backup data to the NAS device 20 via protocols such as HTTP, HTTPS, TCP / IP, and PPP.

[0094] In some embodiments, the mobile phone 10 may also update snapshot information corresponding to the incremental backup data, such as file information (such as size, last modification time, hash value of the file, etc.) of each file in the incremental backup data, to the NAS device 20 .

[0095] S405 : When backing up data to the NAS device 20 for the first time, upload the application data of the target application to the NAS device 20 .

[0096] When the mobile phone 10 backs up data to the NAS device 20 for the first time, the application data of the target application can be uploaded to the NAS device 20 via protocols such as HTTP, HTTPS, TCP / IP, and PPP.

[0097] In some embodiments, the mobile phone 10 can also obtain snapshot information corresponding to the application data of the target application (for example, file information of each file in the application data of the target application, such as file size, last modification time, hash value of the file, etc.), and upload the snapshot information corresponding to the application data of the target application to the NAS device 20 via HTTP, HTTPS, TCP / IP, PPP and other protocols.

[0098] After the snapshot information corresponding to the target application's application data is uploaded to the NAS device 20, the next time the mobile phone 10 backs up data to the NAS device 20, it can back up only the incremental backup data that has not yet been backed up to the NAS device 20 based on the snapshot information stored in the NAS device 20. This can reduce the amount of data that the mobile phone 10 backs up to the NAS device 20.

[0099] In some embodiments, the mobile phone 10 may also upload the relative path of each target application in the application data to the NAS device 20 , which is not limited here.

[0100] Based on the above method, even when the mobile phone 10 is not on the same local area network as the NAS device 20, it can back up the application data of applications installed on the mobile phone 10 to the NAS device 20 via protocols such as HTTP, HTTPS, TCP / IP, and PPP, thereby improving the user experience. Furthermore, if this is not the first time that the mobile phone 10 is backing up data to the NAS device 20, it does not need to back up data already stored on the NAS device 20, thus reducing the amount of data that the mobile phone 10 needs to back up to the NAS device 20.

[0101] Below, the technical solution of this application is introduced in conjunction with the software architecture of mobile phone 10.

[0102] To facilitate understanding, the software architecture of the mobile phone 10 is first introduced.

[0103] FIG5 shows a schematic diagram of a software architecture of a mobile phone 10 according to some embodiments of the present application.

[0104] As shown in FIG5 , the software architecture of the mobile phone 10 includes an application layer 01 , a framework layer 02 , a file system 03 , and the like.

[0105] The application layer 01 includes application programs in the mobile phone 10 .

[0106] For example, the application layer 01 may include application programs such as recording 011, chatting 012, and backup 013.

[0107] Backup 013 can be used to implement the backup and restore functions of data in the mobile phone 10. In some embodiments, a human-computer interaction interface can be provided to the user to configure the rules for backing up the application data of the application (such as backup frequency, target application, etc.), so that the user can configure the rules for backing up the application data of the application based on the interface of Backup 013.

[0108] In some embodiments, the backup 013 may call the synchronization collaboration service 023 to trigger data backup when the backup condition is met.

[0109] In some embodiments, backup 013 may be an independent application, a part of other applications, or a system service. The embodiments of the present application do not limit the specific form of backup 013.

[0110] It should be understood that in other embodiments, the application layer 01 may include more or fewer application programs, which is not limited here.

[0111] The framework layer 02 provides an application programming interface (API) and programming framework for applications in the application layer 01. The framework layer 02 includes some predefined functions. For example, the framework layer may include a file service 021, a package management service (PackageManagerService, PMS) 022, and a synchronization and collaboration service 023.

[0112] The file service 021 is used to manage files and file directories in the mobile phone 10. In some embodiments, the file service 021 can respond to calls from other applications or services and send the directory structure (such as a directory tree, etc.) and file information of each application to the corresponding application or service.

[0113] The PMS 022 is used to manage the applications installed in the mobile phone 10, such as managing the installation, uninstallation, update, and backup of the applications.

[0114] In some embodiments, the PMS 022 may package the installation packages, application data, etc. of the applications installed in the mobile phone 10 in response to calls from other applications or services (e.g., packaging one or more files into a file in a unified format, such as a file with a suffix of tar, rar, zip, etc.).

[0115] In some embodiments, the PMS 022 may call the file service 021 to generate snapshot information of files stored in the mobile phone 10 .

[0116] The synchronization collaboration service 023 is used to synchronize application data in the mobile phone 10 to other devices, such as cloud servers, NAS devices, etc.

[0117] In some embodiments, the synchronization collaboration service 023 may back up application data corresponding to the target application to the NAS device according to the backup frequency and target application set by the user through the backup 013 .

[0118] It should be understood that in other embodiments, the framework layer 02 may also include more or fewer services, which is not limited here.

[0119] The file system 03 is used to store data in the mobile phone 10. The file system 03 can be a file system established in the internal memory of the mobile phone 10 and / or an external memory (such as a Secure Digital (SD) card). The application data of each application in the mobile phone 10 can be stored only in the internal memory of the mobile phone 10, only in the external memory of the mobile phone 10, or simultaneously in the internal memory and the external memory of the mobile phone 10.

[0120] In some embodiments, for any application, the file system 03 may include a sandbox directory 031 and / or an external card directory 032. The sandbox directory refers to a directory in the internal memory of the mobile phone 10 that stores application data of the application, and the external card directory refers to a directory in the external memory that stores application data of the application.

[0121] It should be understood that the software architecture of mobile phone 10 shown in FIG5 is merely an example. In other embodiments, the architecture of mobile phone 10 may include more or fewer layers / modules, may merge or split some modules, and may also adjust the positions of some modules, without limitation herein. For example, in some embodiments, the software architecture of mobile phone 10 may further include a kernel layer, a hardware abstraction layer, etc., without limitation herein.

[0122] Based on the software architecture shown in FIG5 , the data backup method provided in the embodiment of the present application may include the following steps:

[0123] ① Backup 013 triggers backup.

[0124] For example, the backup 013 may trigger the synchronization collaboration service 023 to back up the application data of the target application selected by the user according to the backup frequency set by the user when the backup time corresponding to the backup frequency arrives.

[0125] For another example, when the backup 013 detects the user's operation to back up the application data of the target application (for example, when the user is detected to select the backup now option U74 in the aforementioned home storage interface U7), the synchronization collaboration service 023 may be triggered to back up the application data of the target application selected by the user.

[0126] ②Synchronize and collaborate with service 023 to obtain external card data.

[0127] After the backup is triggered by the backup 013 , the synchronous cooperative service 023 obtains the external card data (data stored in the external memory of the mobile phone 10 by the target application) from the external card directory 032 corresponding to the target application selected by the user.

[0128] ③ The synchronization collaboration service 023 requests the package management service 022 to obtain the sandbox data.

[0129] After the backup is triggered by the backup 013 , the synchronization cooperation service 023 requests the package management service 022 to obtain the sandbox data (data stored in the internal memory of the mobile phone 10 by the target application).

[0130] ④ The package management service 022 packages the sandbox data in response to the request sent by the synchronization collaboration service 023.

[0131] After receiving the request for obtaining sandbox data sent by the synchronization collaboration service 023 , the package management service 022 packages the data in the sandbox directory of the target application in response to the request.

[0132] ⑤Synchronize and collaborate with service 023 to obtain sandbox data.

[0133] After the package management service 022 packages the sandbox data, the synchronous collaboration service 023 can obtain the sandbox data packaged by the package management service 022 .

[0134] Optionally, in other embodiments, step ② may be performed after steps ③ to ⑤, or may be performed simultaneously with steps ③ to ⑤, which is not limited here.

[0135] ⑥ The synchronization collaboration service 023 uploads the backup data to the NAS device 20.

[0136] After acquiring the sandbox data and / or external card data of the target application, the synchronous collaboration service 023 uploads the acquired data to the NAS device 20 via protocols such as HTTP, HTTPS, TCP / IP, and PPP.

[0137] Based on the above process, the mobile phone 10 can automatically back up the application data of the target application selected by the user to the NAS device 20 according to the user's operation or the backup frequency of the user's device. During this period, the mobile phone 10 does not need to be in the same local area network as the NAS device, which is conducive to improving the user experience.

[0138] The following describes the technical solution of this application in conjunction with the software architecture shown in FIG5 .

[0139] First, the process of backing up data from the mobile phone 10 to the NAS device 20 for the first time is introduced.

[0140] FIG6 shows a schematic diagram of an interactive process for backing up data from a mobile phone 10 to a NAS device 20 for the first time according to some embodiments of the present application. As shown in FIG6 , the interactive process includes the following steps:

[0141] S601: The synchronous collaborative service 023 starts backing up application data when the backup conditions are met.

[0142] The synchronous collaborative service 023 starts backing up application data when the backup conditions are met.

[0143] In some embodiments, the backup condition may include any one of the following conditions:

[0144] When the mobile phone 10 backs up data to the NAS device 20 for the first time, the mobile phone 10 is in an idle state, the remaining power of the mobile phone 10 is greater than a first power threshold, and the mobile phone 10 is connected to a router or CPE providing a Wi-Fi network.

[0145] When the mobile phone 10 backs up data to the NAS device 20 for the first time, the mobile phone 10 is in an idle state, the mobile phone 10 is in a charging state, and the mobile phone 10 is connected to a router or CPE providing a Wi-Fi network.

[0146] The user confirms the operation of backing up data immediately to the NAS device 20. For example, the synchronization cooperation service 023 may start backing up application data when it detects that the user selects the backup immediately option U74 in the aforementioned home storage interface U7.

[0147] In some embodiments, the backup conditions may also include more or fewer conditions, which are not limited here.

[0148] In some embodiments, the backup 013 may start the synchronous collaborative service 023 when the backup conditions are met. After being started, the synchronous collaborative service 023 starts to back up application data.

[0149] It should be understood that for any target application selected by the user, the application data of the target application can be backed up to the NAS device 20 through the following steps S602 to S616.

[0150] S602: The synchronous collaborative service 023 stops running the target application.

[0151] If the backup conditions are met, the synchronization and collaboration service 023 may first determine whether the target application is in a running state (including foreground and background running). If the target application is in a running state, the synchronization and collaboration service 023 may stop running the target application. If the target application is not in a running state, step S602 may not be performed.

[0152] S603: The synchronous collaboration service 023 sends a data packaging instruction to the package management service 022.

[0153] When the target application is not in the running state or the target application has stopped running, the synchronization cooperation service 023 sends a data packaging instruction to the package management service 022 .

[0154] In some embodiments, the data packaging instruction may include the installation package name corresponding to the target application.

[0155] S604: The package management service 022 packages the application data of the target application.

[0156] After receiving the data packaging instruction, the package management service 022 may package the application data of the target application into one or more files in response to the data packaging instruction.

[0157] Exemplarily, the package management service 022 may package the application data of the target application into a file, such as a file with an extension in a format such as rar, tar, or zip (other formats are also possible and are not limited here).

[0158] In some embodiments, after the application data of the target application is packaged into a file (hereinafter referred to as a packaged file), the storage path of the first file in the packaged file relative to the packaged file is the same as the storage path of the first file in the mobile phone 10 relative to the root directory of the mobile phone 10. For example, assuming that the storage path of the first file in the mobile phone 10 relative to the root directory of the mobile phone 10 is " / X / Y" (i.e., the first file is stored in folder Y within folder X in the root directory of the mobile phone 10), then the storage path of the first file in the packaged file relative to the packaged file is also " / X / Y" (i.e., the first file is stored in folder Y within folder X in the root directory of the packaged file).

[0159] In some embodiments, the application data packaged by the package management service 022 includes data in a sandbox directory corresponding to the target application and data in a foreign card directory.

[0160] S605: The package management service 022 sends a packaging completion message to the synchronization collaboration service 023.

[0161] After completing the packaging of the application data of the target application, the package management service 022 sends a packaging completion message to the synchronization collaboration service 023 .

[0162] S606 : The synchronous collaborative service 023 uploads the packaged data to the NAS device 20 .

[0163] After receiving the packaging completion message, the package management service 022 can upload the packaged data to the NAS device 20 via a protocol that supports non-LAN transmission, such as HTTP, HTTPS, TCP / IP, or PPP.

[0164] It should be understood that after receiving the data uploaded by the synchronization collaboration service 023 (such as the packaged data mentioned above), the NAS device 20 can store the received data in the NAS device 20.

[0165] S607: The synchronization collaboration service 023 sends a snapshot acquisition instruction to the package management service 022.

[0166] The synchronization collaboration service 023 sends a snapshot acquisition instruction to the package management service 022 , where the snapshot acquisition instruction is used to instruct the package management service 022 to acquire snapshot information corresponding to the application data of the target application.

[0167] S608: The package management service 022 generates snapshot information corresponding to the application data of the target application.

[0168] In response to the snapshot acquisition instruction, the package management service 022 generates snapshot information corresponding to the application data of the target application. In some embodiments, the snapshot information includes file information of each file in the application data of the target application, such as the last modification time, size, and hash value of the file.

[0169] In some embodiments, the package management service 022 may store the generated snapshot information in the file service 021 .

[0170] In some embodiments, the package management service 022 may obtain file information of each file from the file service 021 .

[0171] S609: The synchronous collaborative service 023 obtains the package name and relative path of the target application.

[0172] The synchronization service 023 obtains the package name and relative path of the target application, where the relative path is used to indicate the path of the installation location of the target application in the mobile phone 10 relative to the root directory of the mobile phone 10 .

[0173] In some embodiments, the synchronization collaboration service 023 may obtain the package name and relative path of each target application from the target application or the package management service 022 or the file service 021 .

[0174] S610: The synchronous collaborative service 023 stores the package name and relative path of the target application.

[0175] The synchronous collaborative service 023 stores the package name and relative path of the target application.

[0176] In some embodiments, the synchronization collaboration service 023 may store the package name and relative path of the target application in the backup information.

[0177] S611 : The synchronous collaboration service 023 obtains the directory structure of the target application from the file service 021 .

[0178] The synchronous collaboration service 023 may obtain the directory structure of the target application from the file service 021 based on the relative path of the target application.

[0179] In some embodiments, the directory structure is used to indicate the topological relationship of the folders of the target application.

[0180] In some embodiments, the directory structure may be a directory tree.

[0181] S612: The synchronous collaborative service 023 stores the directory structure of the target application.

[0182] After receiving the directory structure of the target application, the synchronous collaboration service 023 may store the directory structure of the target application in the backup information.

[0183] For example, assuming that a certain application has a folder named Z with a relative path of "X / Y", a folder named Z may be created in the directory with a relative path of "X / Y" in the backup information.

[0184] In some embodiments, if the directory structure received by the synchronization collaboration service 023 is not a directly readable or recognizable directory structure, the received directory structure can be converted into a readable or recognizable directory structure based on the rules defined by the file system or operating system of the mobile phone 10.

[0185] S613 : The synchronous collaboration service 023 obtains snapshot information corresponding to the application data of the target application from the file service 021 .

[0186] The synchronous collaboration service 023 may obtain file information of each file in the application data of each target application from the file service 021 according to the directory structure of each target application, and obtain snapshot information corresponding to the application data of the target application.

[0187] S614: The synchronous collaborative service 023 stores snapshot information corresponding to the application data of the target application.

[0188] After acquiring the snapshot information corresponding to the application data of the target application, the synchronous collaboration service 023 may store the snapshot information corresponding to the application data of the target application in the backup information.

[0189] For example, assuming that the relative path of a certain file is "X / Y", the relative path of the file information corresponding to the file stored in the backup information is also "X / Y".

[0190] Based on the aforementioned steps S609 to S614 , the backup information stores the package name, relative path, directory structure of the target application and file information of each file in the application data of each target application.

[0191] S615 : The synchronization collaboration service 023 uploads the backup information to the NAS device 20 .

[0192] After acquiring the backup information, the synchronization collaboration service 023 may upload the backup information to the NAS device 20 via protocols such as HTTP, HTTPS, TCP / IP, and PPP.

[0193] S616: The synchronous collaborative service 023 resumes running the target application.

[0194] After the synchronization collaboration service 023 uploads the backup information to the NAS device 20 via protocols such as HTTP, HTTPS, TCP / IP, and PPP, the target application can be restored.

[0195] It should be understood that the execution order of the steps in the above process is only an example. In other embodiments, the execution order of the steps can be adjusted, and some steps can be combined or split, which is not limited here. For example, in some embodiments, step S606 can be executed at any time during the execution of steps S606 to S616, and step S608 can be executed in parallel with the aforementioned step S604, etc., which is not limited here.

[0196] Based on the above method, the synchronization collaboration service 023 can back up the application data of the target application to the NAS device 20 when the backup conditions are met. During the backup period, the mobile phone 10 does not need to be in the same local area network as the NAS device 20, which is conducive to improving the user's data backup experience.

[0197] The following describes a process in which the mobile phone 10 backs up data to the NAS device 20 for a non-first time.

[0198] FIG7 shows a schematic diagram of an interactive process for a mobile phone 10 to back up data to a NAS device 20 for a non-first time according to some embodiments of the present application. As shown in FIG7 , the interactive process includes the following steps:

[0199] S701: When the backup conditions are met, start backing up application data.

[0200] The synchronous collaborative service 023 starts backing up application data when the backup conditions are met.

[0201] In some embodiments, the backup condition may include any one of the following conditions:

[0202] If this is not the first time that the mobile phone 10 is backing up data to the NAS device 20, the backup time corresponding to the backup frequency set by the user has arrived and the mobile phone 10 is in an idle state. For example, if the user sets the backup frequency to once every seven days, the mobile phone 10 may start backing up application data when seven days have passed since the last backup and the mobile phone 10 is in an idle state.

[0203] If this is not the first time that the mobile phone 10 is backing up data to the NAS device 20, the backup time corresponding to the backup frequency set by the user has arrived, the mobile phone 10 is in an idle state, and the remaining battery power of the mobile phone 10 is greater than a second battery threshold. The second battery threshold is lower than the first battery threshold. For example, if the user sets the backup frequency to once every seven days and the second battery threshold is 50%, the mobile phone 10 may start backing up application data when seven days have passed since the last backup, the mobile phone 10 is in an idle state, and the remaining battery power is greater than 50%.

[0204] Detecting the user confirming the operation of backing up data immediately to the NAS device 20. For example, the mobile phone can start backing up application data when detecting that the user selects the backup immediately option U74 in the aforementioned home storage interface U7.

[0205] In some embodiments, the backup conditions may also include more or fewer conditions, which are not limited here.

[0206] S702: The synchronous collaborative service 023 stops running the target application.

[0207] If the backup conditions are met, the synchronization and collaboration service 023 may first determine whether the target application is in a running state (including foreground and background running). If the target application is in a running state, the synchronization and collaboration service 023 may stop running the target application. If the target application is not in a running state, step S702 may not be performed.

[0208] S703: The synchronization collaboration service 023 sends a snapshot acquisition instruction to the package management service 022.

[0209] When the target application is not in the running state or the target application has stopped running, the synchronization coordination service 023 sends a snapshot acquisition instruction to the package management service 022 .

[0210] S704: The package management service 022 generates target data snapshot information corresponding to the application data of the target application.

[0211] The package management service 022 generates target data snapshot information corresponding to the application data of the target application in response to the snapshot acquisition instruction.

[0212] In some embodiments, the target data snapshot information includes file information of each file in the application data of the target application stored in the mobile phone 10, such as the last modification time, file size, hash value of the file, etc.

[0213] S705 : The synchronization collaboration service 023 obtains historical data snapshot information corresponding to the application data stored in the NAS device 20 .

[0214] The synchronization cooperation service 023 obtains historical data snapshot information corresponding to the application data stored in the NAS device 20 from the NAS device 20 .

[0215] In some embodiments, the historical data snapshot information includes file information of each file in the application data of the target application stored in the NAS device 20, such as the last modification time, file size, hash value of the file, etc.

[0216] In some embodiments, if there are multiple target applications, the synchronization collaboration service 023 can obtain the historical data snapshot information of the application data corresponding to the multiple target applications at one time, or can obtain the historical data snapshot information of the application data corresponding to the multiple target applications one by one, which is not limited here.

[0217] In some embodiments, the package management service 022 may obtain historical data snapshot information corresponding to the target application from the aforementioned backup information stored in the NAS device 20 according to the relative path of the target application.

[0218] S706 : The synchronization collaboration service 023 compares the target data snapshot information with the historical data snapshot information to determine the incremental backup data that has not been backed up to the NAS device 20 .

[0219] After acquiring the target data snapshot information and the historical data snapshot information, the synchronization collaboration service 023 compares the target data snapshot information with the historical data snapshot information to determine the incremental backup data that has not been backed up to the NAS device 20 .

[0220] For example, the synchronization collaboration service 23 may determine the incremental backup data that has not been backed up to the NAS device 20 by comparing file information of files with the same relative path and the same file name.

[0221] In some embodiments, if a historical version of a file has been stored on the NAS device 20, but the version stored on the mobile phone 10 is inconsistent with the historical version stored on the NAS device 20, the file may be data that has not been backed up to the NAS device 20. For this portion of the file, the synchronization collaboration service 023 may compare the file information of the first file in the target data snapshot information with the file information of the second file in the historical data snapshot information (the second file has the same file name and the same relative path as the first file). If the file information of the first file and the file information of the second file are at least partially different, the first file is determined to be incremental backup data.

[0222] In some embodiments, if no version of a file has been backed up to the NAS device 20, the file may be incremental backup data. For such files, the synchronization collaboration service 023 may determine that the first file is incremental backup data if the target data snapshot information contains file information for the first file, but the historical data snapshot information does not contain file information corresponding to a file with the same file name and relative path as the first file.

[0223] In other embodiments, the synchronization collaboration service 023 may also determine the incremental backup data that has not been backed up to the NAS device 20 in other ways, which are not limited here.

[0224] S707: The synchronization collaboration service 023 uploads the incremental backup data, the snapshot information corresponding to the incremental backup data, and the relative storage location to the NAS device 20.

[0225] After determining the incremental backup data that has not been backed up to the NAS device 20, the synchronization collaboration service 023 can upload the incremental backup data, snapshot information corresponding to the incremental backup data, and the relative storage location (for example, the storage location of the incremental backup data relative to the root directory of the mobile phone 10) to the NAS device 20.

[0226] S708: Resume the target application.

[0227] After uploading the incremental backup data, the snapshot information corresponding to the incremental backup data, and the relative storage location to the NAS device 20 , the synchronous collaboration service 023 resumes the target application.

[0228] S709: The NAS device 20 updates the incremental backup data to the NAS device 20 based on the incremental backup data, the snapshot information corresponding to the incremental backup data, and the relative storage location.

[0229] In some embodiments, the NAS device 20 may find the storage directory of the file in the NAS device 20 based on the relative storage location of the file in the incremental backup data, and replace the file with the same file name in the directory with the received file or store the file in the directory.

[0230] In some embodiments, if the data stored in the NAS device 20 is a compressed (or packaged) file, the NAS device may first decompress (or unpack) the compressed (or packaged) file; then, update the received file to the corresponding directory in the decompressed (or unpacked) data; and then, re-compress (or repack) the updated data.

[0231] In some embodiments, the order of the above steps S708 and S709 can be swapped or performed in parallel, which is not limited here.

[0232] Based on the above method, when the mobile phone 10 is not backing up data to the NAS device 20 for the first time, it can only upload data that has not been backed up to the NAS device 20 to the NAS device 20, which is beneficial to reducing data transmission volume and improving backup efficiency.

[0233] Furthermore, FIG8 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.

[0234] As shown in FIG8 , the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include an acceleration sensor 180A, a touch sensor 180B, and the like.

[0235] The processor 110 may include one or more processing units, for example, the processor 110 may include a central processing unit (CPU), an AP, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a microcontroller unit (MCU), a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), a field programmable gate array (FPGA), etc. In some embodiments, different processing units may be independent devices or integrated into one or more processors.

[0236] Processor 110 may also be provided with a memory for storing one or more programs and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store one or more programs or data that have just been used or are being recycled by processor 110. When processor 110 needs to use one or more programs or data again, it can directly call them from the memory. This avoids repeated accesses, reduces the waiting time of processor 110, and thus improves system efficiency.

[0237] In some embodiments, the processor 110 can be configured to execute one or more programs corresponding to the data backup methods provided in the aforementioned embodiments. The charging management module 140 is configured to receive charging input from a charger. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141.

[0238] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.

[0239] The wireless communication function of the mobile phone 10 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0240] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0241] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the mobile phone 10. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0242] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity networks), Bluetooth (BT), global navigation satellite system (GNSS), near field communication (NFC), infrared (IR), etc. applied on the mobile phone 10. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0243] Mobile phone 10 implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0244] The display screen 194 is used to display images.

[0245] The camera 193 is used to capture still images or videos.

[0246] The external memory interface 120 can be used to connect to an external memory card. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, application data of an application can be stored in the external memory card.

[0247] The internal memory 121 can be used to store one or more programs and corresponding data. The internal memory 121 may include a program storage area and a data storage area. In some embodiments, the program storage area may store an operating system, an application required for at least one function, etc., such as the program corresponding to the data backup method provided in the aforementioned embodiments. The data storage area may store data created during the use of the mobile phone 10, such as application data of an application. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a general flash memory, etc. The processor 110 executes various functional applications of the mobile phone 10 by running one or more programs stored in the internal memory 121, and / or one or more programs stored in a memory provided in the processor 110.

[0248] The mobile phone 10 can implement audio functions, such as music playback, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0249] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals.

[0250] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0251] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0252] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0253] The headphone jack 170D is used to connect a wired headphone.

[0254] Keys 190 include a power button, a volume button, and the like. Keys 190 may be mechanical keys or touch-sensitive keys. Mobile phone 10 may receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 10.

[0255] The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, notifications, etc.

[0256] The SIM card interface 195 is used to connect a SIM card or an eSIM.

[0257] It should be understood that the structure of the mobile phone 10 shown in the embodiment of the present application does not constitute a specific limitation on the source device. In other embodiments of the present application, the source device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0258] Furthermore, FIG9 shows a schematic structural diagram of a NAS device 20 according to some embodiments of the present application.

[0259] As shown in FIG. 9 , the NAS device 20 includes a processor 21 , a memory 22 , a communication interface 23 , and a bus 24 .

[0260] The processor 21 may include one or more processing units, such as a CPU, an MCU, a DPS, an FPGA, an ASIC, etc.

[0261] In some embodiments, the processor 21 may be configured to execute one or more programs to implement the methods provided in the aforementioned embodiments. For example, the processor 21 may receive data from other devices (e.g., source devices) and store the data in the memory 22, send historical data snapshot information corresponding to the data stored in the memory 22 to other devices, and update the data to the memory 22 based on the data sent by the other devices and the relative storage location of the data.

[0262] The memory 22 may include one or more memories for storing data or one or more application programs. For example, in some embodiments, the memory 22 may be used to store data sent by other devices, such as application data and backup information of the aforementioned target application. It should be understood that the memory 22 may be provided within the processor 21.

[0263] In some embodiments, the memory 22 may include a hard disk drive, a solid-state drive, a flash memory, an optical disk, or a magneto-optical disk.

[0264] In some embodiments, memory 22 may include removable or non-removable or fixed media.

[0265] In some embodiments, the memory 22 may be internal or external to the NAS device 20 .

[0266] Communication interface 23 is used to enable communication between NAS device 20 and other devices. Communication interface 23 may include a wired or wireless communication interface, so that NAS device 22 can access the Internet via a wired or wireless method and obtain data from or send data to other devices via the Internet.

[0267] The bus 24 is used to connect the processor 21, the memory 22, the communication interface 23, and other possible modules or circuits.

[0268] It should be understood that the structure of the NAS device 20 shown in FIG. 9 is only an example. In other embodiments, the NAS device 20 may include more or fewer modules, which is not limited here.

[0269] An embodiment of the present application also provides a program product, which, when executed on a device, can enable the device to implement the data backup methods provided in the aforementioned embodiments.

[0270] An embodiment of the present application further provides a readable storage medium, in which one or more programs are stored. When the one or more programs are executed by a device, the device implements the data backup method provided by the aforementioned embodiments.

[0271] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.

[0272] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a" do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.

Claims

1. A backup method, applied to a first device, characterized in that: The method comprises: If a backup condition is met, obtaining first application data corresponding to at least one application installed in the first device, wherein the backup condition includes the first device detecting an operation of a user to back up the application data corresponding to the at least one application, or reaching a preset backup time; Backing up second application data in the first application data that has not been backed up to the second device to the second device, wherein the second device is a network attached storage device.

2. The method according to claim 1, characterized in that The backup conditions also include at least one of the following conditions: In a case where the first device backs up data to the second device for the first time, the first device is in an idle state, the remaining power of the first device is greater than a first power threshold, and the first device is connected to a router or a customer premise device that provides a wireless fidelity network; In a case where the first device backs up data to the second device for the first time, the first device is in an idle state, the first device is in a charging state, and the first device is connected to a router or a customer premise device that provides a wireless fidelity network; In a case where it is not the first time that the first device backs up data to the second device, the first device is in an idle state and the remaining power of the first device is greater than a second power threshold, wherein the second power threshold is lower than the first power threshold; An operation of confirming that the user immediately backs up the data to the second device is detected.

3. The method according to claim 2, characterized in that The backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: Acquire first snapshot information corresponding to the first application data and second snapshot information corresponding to the data stored in the second device; Based on the first snapshot information and the second snapshot information, the second application data in the first application data is determined, and the second application data is backed up to the second device.

4. The method according to claim 3, characterized in that The first snapshot information includes at least one of the following information: the last modification time of each file corresponding to the first application data, the size of each file corresponding to the first application data, and the hash value of each file corresponding to the first application data; The second snapshot information includes at least one of the following information: the last modification time of each file corresponding to the data stored in the second device, the size of each file corresponding to the data stored in the second device, and the hash value of each file corresponding to the data stored in the second device.

5. The method according to claim 1, characterized in that The backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: backing up the second application data and the snapshot information of the second application data to the second device; The snapshot information of the second application data includes at least one of the size, the last modification time and the hash value of each file corresponding to the second application data.

6. The method according to any one of claims 1 to 5, characterized in that The operating system of the first device includes a synchronization collaboration service and a package management service; and the obtaining of first application data corresponding to at least one application installed in the first device includes: The synchronous collaboration service uses the package management service to obtain the first application data corresponding to the at least one application program.

7. The method according to claim 6, characterized in that The backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: The synchronous collaborative service backs up the second application data in the first application data that has not been backed up to the second device to the second device.

8. The method according to claim 1, characterized in that The backing up the second application data in the first application data that has not been backed up to the second device to the second device includes: The second application data is backed up to the second device via any one of the following communication protocols: Hypertext Transfer Protocol, Hypertext Transfer Protocol Secure, Transmission Control Protocol / Internet Protocol, Point-to-Point Protocol.

9. A readable storage medium, characterized in that: The readable storage medium includes one or more programs, and when the one or more programs are executed by the device, the device implements the backup method according to any one of claims 1 to 8.

10. A device, characterized in that: include: A memory for storing one or more programs; A processor, configured to execute the one or more programs so that the device implements the backup method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Tracking objects modified between backup operations

    CN101027649A

  • Data processing method and device, computer equipment, storage medium and program product

    CN115344428A

  • Data backup method and device, data recovery method and device, equipment and readable storage medium

    CN116501545A

  • Application intelligent snapshot backups

    US10061657B1