Data recovery method and device, and storage medium

By establishing point-to-point communication connections between terminals, data can be transmitted and recovered directly in a public database, solving the problem of low data security caused by relying on intermediate media in existing technologies, and achieving data recovery with higher security and stronger adaptability.

CN115421981BActive Publication Date: 2026-08-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211159633.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2026-08-25
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

Existing data recovery methods rely on intermediaries, resulting in low data security and cumbersome operations.

Method used

By establishing point-to-point communication connections between terminals, data can be directly transmitted and restored in the public database, avoiding intermediate media, and the private database can be updated using the public database.

Benefits of technology

It improves the security and adaptability of the data recovery process, reduces the risk of data leakage, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115421981B_ABST
    Figure CN115421981B_ABST
Patent Text Reader

Abstract

The application provides a data recovery method, device and storage medium. In the technical solution of the application, a first terminal receives data to be recovered from a second terminal, the data to be recovered including data corresponding to a target application program; the first terminal inserts the data to be recovered into a public database to obtain an updated public database, the public database being used to store data corresponding to at least one application program of the same type as the target application program in the first terminal; and the first terminal updates a target private database of the first terminal according to the updated public database, the target private database being used to store data corresponding to the target application program in the first terminal. In the data recovery method of the application, data transmission between the first terminal and the second terminal does not depend on an intermediate medium, is safer, and directly operates the public database inside the terminal to complete data recovery, which is more adaptable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to data recovery methods, apparatus and storage media. Background Technology

[0002] With the continuous development of communication technology, users generate personal data on terminals such as mobile phones and computers when using communication services and Internet services. This personal data needs to be properly stored so that users can quickly recover it when changing terminal devices.

[0003] For example, text messages are a type of important personal data. The following example uses Google Messages to illustrate how existing technologies can recover text message data. For instance, Google would need to integrate a Google Cloud backup and restore module into the Google Messages app. This would involve backing up text message data from one device's Google Messages private database to the cloud, and then downloading and restoring the data from the cloud to the corresponding Google Messages private database on another device.

[0004] In other words, existing data recovery methods generally require transferring the data through an intermediate medium before downloading it to the target device for recovery. This method relies on the intermediate medium and is therefore not very secure. Thus, improving data security during the recovery process has become a pressing issue. Summary of the Invention

[0005] This application provides a data recovery method, apparatus, and storage medium, which can improve data security during the data recovery process.

[0006] In a first aspect, this application provides a data recovery method applied to a first terminal, the method comprising: the first terminal receiving data to be recovered from a second terminal, the data to be recovered including data corresponding to a target application; the first terminal inserting the data to be recovered into a public database to obtain an updated public database, the public database being used to store data corresponding to at least one application of the same type as the target application in the first terminal; and the first terminal updating a target private database of the first terminal according to the updated public database, the target private database being used to store data corresponding to the target application in the first terminal.

[0007] In this embodiment, data transmission between the first terminal and the second terminal does not rely on an intermediate medium, which can reduce the risk of data leakage, improve security, and allow direct operation of the public database inside the terminal during data recovery, making it more adaptable.

[0008] Secondly, this application provides a data recovery device applied to a first terminal. The device includes: a receiving module for receiving data to be recovered from a second terminal, the data to be recovered including data corresponding to a target application; an inserting module for inserting the data to be recovered into a public database to obtain an updated public database, the public database being used to store data corresponding to at least one application of the same type as the target application in the first terminal; and an updating module for updating a target private database of the first terminal according to the updated public database, the target private database being used to store data corresponding to the target application in the first terminal.

[0009] Thirdly, this application provides a data recovery apparatus, including a processor and a memory, wherein the memory is used to store code instructions; and the processor is used to execute the code instructions to implement the method in the first aspect or any of the possible implementations described above.

[0010] Fourthly, this application provides a computer-readable storage medium storing a computer program (also referred to as code or instructions) that, when run on a computer, causes the computer to perform the methods described in the first aspect or any of the possible implementations thereof.

[0011] Fifthly, this application provides a computer program product comprising: a computer program (also referred to as code or instructions) that, when run, causes a computer to perform the methods described in the first aspect or any of the possible implementations thereof. Attached Figure Description

[0012] Figure 1 This is a schematic diagram illustrating an application scenario provided by one embodiment of this application;

[0013] Figure 2 A flowchart illustrating an existing Google SMS data recovery method provided in one embodiment of this application;

[0014] Figure 3 A flowchart illustrating a data recovery method provided in one embodiment of this application;

[0015] Figure 4 A flowchart of a data recovery method provided in another embodiment of this application;

[0016] Figure 5 A flowchart illustrating a data recovery method provided in yet another embodiment of this application;

[0017] Figure 6 A flowchart illustrating a Google SMS data recovery method provided in one embodiment of this application;

[0018] Figure 7 This is a structural schematic diagram of a data recovery apparatus provided in one embodiment of the present application;

[0019] Figure 8 This is a structural schematic diagram of an apparatus provided for another embodiment of this application. Detailed Implementation

[0020] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0021] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. For example, "first instruction" and "second instruction" are used to distinguish different user instructions and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0022] It should be noted that, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0023] Furthermore, "at least one" refers to one or more, while "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0024] Figure 1 This is a schematic diagram illustrating an application scenario provided by one embodiment of this application. For example... Figure 1 As shown, the application scenario 100 may include a first terminal 101 and a second terminal 102, wherein the first terminal 101 and the second terminal 102 can transmit data between each other through wireless connection or intermediate medium.

[0025] It should be understood that the aforementioned first terminal 101 and second terminal 102 can also be referred to as terminal devices, which may be mobile phones, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The first terminal 101 and second terminal 102 can be devices of the same model or different models; the data that can be transmitted may include some or all of the data stored in the first terminal 101 and / or the second terminal 102, such as application data, which may include contacts, calendars, pictures, text messages, emails, etc.; or, it may include non-application data, such as system data, etc., without limitation.

[0026] With the increasing frequency of updates to mobile phones, computers, and other terminals, users are replacing their terminals more and more often. When using communication and internet services, users generate personal data on their terminals. When switching terminals, users need to restore this personal data from the previous terminal to the new terminal to meet their needs.

[0027] In current related technologies, when restoring data from the first terminal 101 to the second terminal 102 according to user needs, it is generally necessary to transfer the data through an intermediate medium, then download the data to the target device, and finally restore the data.

[0028] It should be noted that, taking smartphones as an example, as smartphone functions continue to increase, the number of applications (APPs) installed on smartphones is also increasing. Generally, after an APP is installed on a smartphone, the smartphone will allocate a data cache area for the APP to store the APP's runtime cache data, which is the private database corresponding to the APP. The data stored in the private database corresponding to the APP is generally not accessed by other APPs installed on the smartphone.

[0029] For example, taking the Google Messages app on a smartphone as an example, assuming it's necessary to restore the SMS data from Google Messages on the first terminal 101 to the second terminal 102, then the Google Cloud Backup and Recovery module needs to be integrated into Google Messages as an intermediary to achieve data recovery. The specific process for Google Messages data recovery is as follows: Figure 2 As shown, the specific method is as follows: First, the first terminal 101 launches the Google Messages application, and then launches Google Backup. Through the Google Backup recovery module, the SMS data in the private database of Google Messages on the first terminal 101 is backed up and then stored in the cloud. Correspondingly, the second terminal 102 launches the Google Messages application, and then pulls the cloud backup data from the cloud to further restore the Google Backup data. That is, the second terminal 102 downloads the SMS data backed up from the first terminal 101 from the cloud and restores the SMS data to the corresponding private database of Google Messages in the second terminal 102. Finally, it is displayed through Google Messages.

[0030] For example, the SMS data of Google SMS in a smartphone can also be transferred from the first terminal 101 to the second terminal 102 via a subscriber identification module (SIM) card or a mobile storage device. That is, the user exports the SMS data from the private database of Google SMS to the SIM card or mobile storage device on the first terminal 101, inserts the SIM card or mobile storage device into the second terminal 102, and then imports the SMS data from the SIM card or mobile storage device into the private database of Google SMS on the second terminal 102 for display via Google SMS.

[0031] However, the above methods use cloud backup and recovery modules, SIM cards, or mobile storage devices as intermediate media to restore SMS data from one terminal to another. This process requires intruding into the private database corresponding to the application, which is cumbersome and carries the risk of data leakage through the intermediate media, resulting in low data security.

[0032] Therefore, improving data security during the data recovery process has become an urgent problem to be solved.

[0033] In view of this, embodiments of this application provide a data recovery method, apparatus, and storage medium, which can improve data security during the data recovery process.

[0034] The data recovery method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0035] Please refer to Figure 3 This is a flowchart illustrating a data recovery method provided in one embodiment of this application. This method can be applied to the above-described... Figure 1The application scenarios shown can be applied to other scenarios as well, and this application does not limit the scope of the embodiments. For ease of explanation, the method will be applied to, for example, Figure 1 Taking the scenario shown as an example, the first terminal in the following text is... Figure 1 The first terminal 101 shown below, and the second terminal referred to below are... Figure 1 The second terminal 102 is shown below. A detailed description follows. Figure 3 The flowchart illustrates the various steps in the method shown, including:

[0036] S301, the second terminal sends data to be recovered to the first terminal, the data to be recovered including data corresponding to the target application.

[0037] Accordingly, the first terminal receives the data to be recovered.

[0038] It should be understood that the data to be recovered sent by the second terminal to the first terminal is obtained by encoding and packaging the data in the public database in the second terminal used to store the target application and the data corresponding to at least one application of the same type as the target application. The target application is the application that the user specifies the application for which data needs to be recovered, or the second terminal may determine the application for which data needs to be recovered based on the usage parameters, or the first terminal may instruct the second terminal device, which is not limited here.

[0039] It should be noted that the public database in the second terminal is used to store data of the target application in the second terminal and at least one application of the same type as the target application. Each application also has its own private database, which is used to store the runtime cache data of the corresponding application. The data stored in the corresponding private database is generally not accessible to other applications installed on the second terminal.

[0040] For example, when the target application is Google Messages, the second terminal allocates a data cache area for Google Messages to store the cached data of Google Messages, which is Google Messages' private database.

[0041] S302, the first terminal inserts the data to be restored into the public database to obtain the updated public database. The public database is used to store data corresponding to at least one application in the first terminal that is of the same type as the target application.

[0042] It should be understood that the first terminal inserts the data to be recovered received in the previous step into the corresponding public database in the first terminal.

[0043] For example, if the data to be recovered is SMS data, then the data to be recovered is inserted into the SMS public database of the first terminal.

[0044] It should be noted that the public database of the first terminal is used to store data of the target application in the first terminal and at least one application of the same type as the target application. Each application also has its own private database, which is used to store the runtime cache data of the corresponding application. The data stored in the corresponding private database is generally not accessed by other applications installed on the first terminal.

[0045] For example, when the target application is Google Messages, the first terminal allocates a data cache area for Google Messages to store the cached data of Google Messages, which is Google Messages' private database.

[0046] In one possible implementation, to facilitate transmission, when the second terminal sends the data to be recovered to the first terminal, it can encode, compress, or perform other processing on the data. In this case, after receiving the data to be recovered, the first terminal will first decode the received data and then insert the decoded data into the public database.

[0047] S303, the first terminal updates its target private database according to the updated public database. The target private database is used to store data corresponding to the target application in the first terminal.

[0048] It should be understood that the first terminal updates the data from the updated public database obtained in the previous step to the target private database of the target application in the first terminal. The target private database is a data cache area allocated by the first terminal for the target application to store the runtime cache data of the target application.

[0049] In the above technical solution, data recovery is achieved by packaging the public database data in the second terminal and sending it to the corresponding public database in the first terminal. Then, the first terminal restores the public database data in the first terminal to the private database of the target application. This data recovery method does not involve an intermediate medium, which can reduce the risk of data leakage. Moreover, it directly operates on the public databases of the first and second terminals. Compared with the existing technology, it does not require intrusion into the private database of the target application, has stronger adaptability, and can further improve the security of data transmission.

[0050] Based on the above embodiments, Figure 4 A flowchart of a data recovery method provided in another embodiment of this application is shown. Figure 4 In the illustrated embodiment, the following details how the first terminal updates its target private database based on the updated public database. Figure 4 The flowchart illustrates the various steps in the method shown, including:

[0051] S401, the second terminal sends data to be recovered to the first terminal, the data to be recovered including data corresponding to the target application.

[0052] Accordingly, the first terminal receives the data to be recovered.

[0053] This step and Figure 3 Step S301 in the illustrated embodiment is similar, and the repeated parts will not be described again here.

[0054] It should be noted that after the second terminal encodes and packages the data in the public database used to store the target application and the data corresponding to at least one application of the same type as the target application, it can first write the data into a temporary file on the second terminal and wait for it to be sent.

[0055] In one possible implementation, after the second terminal has sent the data to be recovered to the first terminal, it deletes the temporary files in the second terminal.

[0056] For example, if the data to be recovered is SMS data and the target application is Google SMS, then the data to be recovered is the data obtained by encoding and packaging the data in the SMS public database on the second terminal. This SMS public database is used to store SMS data corresponding to all SMS applications, including Google SMS, such as SMS data corresponding to Xiaomi SMS.

[0057] S402, the first terminal inserts the data to be restored into the public database to obtain the updated public database. The public database is used to store data corresponding to at least one application in the first terminal that is of the same type as the target application.

[0058] This step and Figure 3 Step S302 in the illustrated embodiment is similar and will not be repeated here.

[0059] S403, the first terminal control target application is in data recovery state.

[0060] In one possible implementation, after the first terminal inserts the data to be recovered into the public database and obtains the updated public database, it generates a first message. The first message is used to indicate that the data of the target application has changed, so that the target application is in a data recovery state according to the first message.

[0061] In other words, after the data in the public database of the first terminal changes, the first terminal will send a message to the target application to inform it that its corresponding data has changed, so that the target application is in a data recovery state.

[0062] In one possible implementation, the first message is a broadcast message.

[0063] For example, when the target application is Google Messages, the first message is an “ACTION_EXTERNAL_PROV-IDER_CHANGE” broadcast to notify Google Messages that it is in a data recovery state.

[0064] S404, the first terminal updates the target private database based on the updated public database through the target application.

[0065] It should be understood that after receiving the first message notification, the target application initiates a data recovery process to update the updated public database data to the target application's target private database.

[0066] In one possible implementation, the first terminal can update all data in the updated public database to the target private database of the first terminal and display it through the target application.

[0067] For example, when the target application is Google Messages, the first terminal can restore all the data in the updated public database of SMS to the private database corresponding to Google Messages, and then display the data in the private database through Google Messages.

[0068] In one possible implementation, the first terminal may also update the data corresponding to the preset application in the updated public database to the target private database of the first terminal, and display it through the target application.

[0069] For example, when the target application is Google Messages, the first terminal can restore the data downloaded from Google Messages in the updated public database to the private database corresponding to Google Messages, and then display the data in the private database through Google Messages; or it can restore the data downloaded from Xiaomi Messages in the updated public database to the private database corresponding to Google Messages, and then display the data in the private database through Google Messages.

[0070] It should be noted that although the data in public databases are of the same type, they generally come with source identifiers, allowing the terminal to identify which application the data comes from for future reference.

[0071] In this embodiment, when the first terminal updates its target private database based on the updated public database, it first sends a message to notify the target application. Then, the target application updates the target private database with the updated public database data. In this method, the first terminal inserts data into the public database, and then the application restores the data based on the public database. Compared with the prior art, it does not require direct intrusion into the target application's private database, making it more adaptable and further improving the security of data transmission.

[0072] Based on the above embodiments, please refer to Figure 5 , Figure 5 A flowchart of a data recovery method provided in another embodiment of this application is shown. Figure 5 In the illustrated embodiment, taking how the first terminal receives the data to be recovered from the second terminal as an example, the following is a detailed explanation. Figure 5 The flowchart illustrates the various steps in the method shown, including:

[0073] S501, the first terminal establishes a point-to-point P2P communication connection with the second terminal.

[0074] Peer-to-peer (P2P) connections, also known as peer-to-peer connections, refer to communication between two hosts where there is no distinction between service requester and service provider. Application processes distributed across the network edge are equal and are called peers. Peers communicate directly with each other; each peer is both a service requester and a service provider. For example, as long as two hosts are running peer-to-peer software, they can communicate equally and peer-to-peer, and both can download shared documents already on the other's hard drive. The essence of P2P connections is decentralization, or service distribution, because servers are not concentrated in a few server computers but distributed across a large number of peer computers, which are not owned by the service provider. Furthermore, one of the most prominent characteristics of P2P connections is their scalability. Adding a peer to the system not only increases the number of service requesters but also increases the number of service providers, and system performance does not decrease with increasing scale.

[0075] It should be understood that the first terminal establishes a P2P communication connection with the second terminal, which means that the first terminal and the second terminal can transmit data through P2P without going through an intermediate medium. This can solve the problem of existing solutions relying heavily on the Internet or intermediate transfer media. At the same time, it is simple to operate, more secure, and has no risk of data leakage.

[0076] In some embodiments, the first terminal and the second terminal can establish a P2P communication connection by establishing a wireless fidelity (WiFi) connection.

[0077] For example, the first terminal starts a WiFi hotspot and generates an authentication QR code for that hotspot. Then, the second terminal recognizes the authentication QR code to complete the connection to the hotspot. Alternatively, the first terminal starts a WiFi hotspot, and the second terminal completes the connection by entering the WiFi hotspot's password.

[0078] Furthermore, the first terminal establishes a socket connection with the second terminal based on the WiFi connection.

[0079] Sockets are the cornerstone of communication, serving as the basic operational unit for communication supporting the Transmission Control Protocol / Internet Protocol (TCP / IP). A socket can be viewed as an endpoint for communication between processes on different hosts, forming the programming interface within a single host and across the entire network. Sockets exist within a communication domain, an abstract concept introduced to handle general thread communication via sockets. Sockets typically exchange data with other sockets within the same domain (data exchange may also cross domain boundaries, in which case an interpreter must be executed). Various processes use this shared domain to communicate with each other using the Internet Protocol suite.

[0080] A socket can also be viewed as an endpoint in the communication connection between two network applications; this is a logical concept. It is an application programming interface (API) for inter-process communication in a network environment, and also a named and addressable communication endpoint. Each socket in use has its type and a process associated with it. During communication, one network application writes a piece of information to be transmitted into its host's socket. This socket then transmits this information to the socket on the other host through a transmission medium connected to the network interface controller (NIC), enabling the other party to receive the information. A socket combines an Internet Protocol (IP) address and a port, providing a mechanism for sending data packets to application-layer processes.

[0081] In other words, once a socket connection is established between the first terminal and the second terminal, data transmission can be performed directly.

[0082] In one possible implementation, the first terminal and the second terminal can establish a P2P communication connection through Bluetooth, WiFi direct connection, etc., and this application does not limit this.

[0083] S502, the second terminal sends data to be recovered to the first terminal via a P2P communication connection, the data to be recovered including data corresponding to the target application.

[0084] Correspondingly, the first terminal receives the data to be recovered via a P2P communication connection.

[0085] It should be understood that after the first terminal and the second terminal establish a WiFi connection and a socket connection, the second terminal sends the data to be recovered to the first terminal. The data to be recovered is obtained by the second terminal encoding and packaging data from a public database used to store the target application and data corresponding to at least one application of the same type as the target application. The target application is the application for which the user specifies the application whose data needs to be recovered.

[0086] In one possible implementation, after the first terminal successfully receives the data to be recovered from the second terminal, the first terminal disconnects the P2P communication connection with the second terminal to ensure the data security of the first terminal.

[0087] In one possible implementation, when the first terminal receives the data to be recovered sent by the second terminal, it may first send a request message to the second terminal. The request message is used to inform the second terminal user of the data required from the specified application. At this time, the data to be recovered is data from the specified application obtained by filtering data in the public database according to the data source.

[0088] S503, the first terminal inserts the data to be restored into the public database to obtain the updated public database. The public database is used to store data corresponding to at least one application in the first terminal that is of the same type as the target application.

[0089] This step and Figure 3 Step S302 in the illustrated embodiment is similar and will not be repeated here.

[0090] S504, the first terminal updates the target private database of the first terminal according to the updated public database, the target private database being used to store data corresponding to the target application in the first terminal.

[0091] This step and Figure 3Step S303 in the illustrated embodiment is similar and will not be repeated here.

[0092] In this embodiment, data transmission between the first terminal and the second terminal is achieved through a P2P connection, eliminating the dependence on intermediate media and solving the problem of existing solutions that heavily rely on the Internet or intermediate transfer media. At the same time, it is simple to operate, more secure, and has no risk of data leakage.

[0093] Based on the above embodiments, Figure 6 A flowchart illustrating a Google SMS data recovery method provided in one embodiment of this application is shown. Figure 6 In the illustrated embodiment, the data recovery method using Google SMS is taken as an example. The following is a detailed description. Figure 6 The flowchart illustrates the various steps in the method shown, including:

[0094] S601, the second terminal starts a WiFi hotspot and generates an authentication QR code for the hotspot.

[0095] S602, the first terminal initiates QR code scanning, identifies the authentication QR code of the second terminal, and completes the connection with the WiFi hotspot of the second terminal.

[0096] In this step, the first terminal further establishes a socket connection with the second terminal based on the WiFi hotspot.

[0097] S603, the second terminal reads SMS public database data.

[0098] In this step, the second terminal first starts the data backup process and reads its SMS public database data.

[0099] S604, the second terminal encodes and packages the data from the SMS public database to obtain the data to be recovered, and writes it to a temporary file.

[0100] It should be noted that the encoded data occupies less storage space, which can save memory. Of course, this encoding operation is not necessary, and this application does not impose any restrictions on it.

[0101] S605, the second terminal sends the data to be recovered to the first terminal.

[0102] Accordingly, the first terminal receives the data to be recovered. If the reception is successful, the socket connection is closed. If the reception is unsuccessful, the reception is restarted.

[0103] It should be understood that closing the socket connection after the first terminal successfully receives the data can reduce the risk of data theft. Of course, this closing operation is not mandatory, and the application does not impose any restrictions on it.

[0104] S606: After the second terminal successfully sends the data to be recovered, delete the temporary file.

[0105] In this step, if the second terminal successfully sends the data to be recovered to the first terminal, the temporary file is deleted; otherwise, it is sent again.

[0106] It should be understood that deleting temporary files after the second terminal successfully sends the data can free up terminal memory and improve terminal smoothness. Of course, this deletion operation is not necessary, and the application does not impose any restrictions on it.

[0107] S607, the first terminal decodes the received data to be recovered.

[0108] In this step, corresponding to the data encoding in step S604, a data decoding operation is performed.

[0109] S608, the first terminal inserts the decoded data into the SMS public database to obtain the updated SMS public database.

[0110] S609, the first terminal sends a broadcast notification that Google SMS is in data recovery status.

[0111] In this step, after the SMS public database in the first terminal is updated, the first terminal will send a broadcast notification to the Google SMS application, in which the broadcast is “ACTION_EXTERNAL_PROVIDER_CHANGE”.

[0112] S610, the first terminal updates Google SMS's private database based on the updated SMS public database via Google SMS.

[0113] In other words, Google Message will restore the updated data from the public database to Google Message's private database.

[0114] S611, the first terminal launches Google Message and displays updated Google Message private database data.

[0115] In this embodiment, the first terminal and the second terminal establish a P2P connection for data transmission via a Wi-Fi hotspot. This eliminates the need for an intermediary, making the operation simple, highly secure, and directly accessing the SMS public database. Data recovery is achieved without intruding on Google SMS's private database, resulting in greater adaptability.

[0116] In one possible implementation, to further improve data security and reliability, the data to be recovered in the above embodiments may also be encrypted. No specific encryption method is applied for or restricted.

[0117] Based on the above embodiments, Figure 7This is a structural schematic diagram of a data recovery device 700 provided in one embodiment of the present application. The device 700 includes a receiving module 701, an insertion module 702, and an update module 703.

[0118] The receiving module 701 is used to receive data to be recovered from the second terminal, the data to be recovered including data corresponding to the target application; the inserting module 702 is used to insert the data to be recovered into a public database to obtain an updated public database, the public database being used to store data corresponding to at least one application of the same type as the target application in the first terminal; the updating module 703 is used to update the target private database of the first terminal according to the updated public database, the target private database being used to store data corresponding to the target application in the first terminal.

[0119] In some embodiments, the apparatus further includes: a control module for controlling the target application to be in a data recovery state; and an update module 703 for updating the target private database according to the updated public database through the target application.

[0120] In some embodiments, the control module is specifically configured to generate a first message, the first message being used to indicate that the data of the target application has changed, so that the target application is in the data recovery state according to the first message.

[0121] In some embodiments, the first message is a broadcast message.

[0122] In some embodiments, the device further includes: an establishment module for establishing a point-to-point (P2P) communication connection with the second terminal; and a receiving module 701 for receiving the data to be recovered through the P2P communication connection.

[0123] In some embodiments, the establishment module is specifically used to establish a Wi-Fi connection with the second terminal; and based on the Wi-Fi connection, to establish a socket connection between the second terminal and the first terminal.

[0124] In some embodiments, the apparatus further includes a disconnect module, configured to disconnect the P2P communication connection after the first terminal receives data to be recovered from the second terminal.

[0125] It should be understood that the device 700 here is embodied in the form of a functional module. The term "module" here can refer to application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors, etc.) and memories for executing one or more software or firmware programs, integrated logic circuits, and / or other suitable components supporting the described functions. In an alternative example, those skilled in the art will understand that the device 700 may specifically be the first terminal in the above embodiments, or the functions of the first terminal in the above embodiments may be integrated into the device 700. The device 700 may be used to execute the various processes and / or steps corresponding to the first terminal in the above method embodiments; to avoid repetition, these will not be described further here.

[0126] The aforementioned device 700 has the function of implementing the corresponding steps performed by the first terminal in the aforementioned method; the aforementioned function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned function.

[0127] Figure 8 This is a structural schematic diagram of an apparatus provided for another embodiment of this application. Figure 8 The apparatus shown can be used to perform the method of any of the foregoing embodiments.

[0128] like Figure 8 As shown, the device 800 in this embodiment includes a memory 801, a processor 802, a communication interface 803, and a bus 804. The memory 801, processor 802, and communication interface 803 are interconnected via the bus 804.

[0129] The memory 801 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 801 may store a program, and when the program stored in the memory 801 is executed by the processor 802, the processor 802 performs the various steps of the method shown in the above embodiments.

[0130] The processor 802 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, used to execute relevant programs to implement the various methods shown in the embodiments of this application.

[0131] The processor 802 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the method in this embodiment can be accomplished through integrated logic circuits in the processor 802 or through software instructions.

[0132] The processor 802 described above can also be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0133] The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 801, and processor 802 reads the information in memory 801 and, in conjunction with its hardware, completes the functions required by the units included in the device of this application.

[0134] The communication interface 803 can use, but is not limited to, transceivers to enable communication between the device 800 and other devices or communication networks.

[0135] Bus 804 may include a pathway for transmitting information between various components of device 800 (e.g., memory 801, processor 802, communication interface 803).

[0136] It should be understood that the device 800 shown in the embodiments of this application may be an electronic device, or it may be a chip configured in an electronic device.

[0137] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0138] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0143] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data recovery method, characterized in that, Applied to a first terminal, the method includes: The first terminal receives data to be recovered from the second terminal. The data to be recovered includes data corresponding to the target application. The data to be recovered is read by the second terminal from the public database of the second terminal. The public database of the second terminal is used to store the target application in the second terminal and data corresponding to at least one application of the same type as the target application. The first terminal inserts the data to be recovered into the public database of the first terminal to obtain an updated public database of the first terminal. The public database of the first terminal is used to store data corresponding to at least one application in the first terminal that is of the same type as the target application. The first terminal updates its target private database based on the updated public database of the first terminal. The target private database is used to store data corresponding to the target application in the first terminal.

2. The method according to claim 1, characterized in that, The first terminal updates its target private database based on the updated public database, including: The first terminal controls the target application to be in a data recovery state; The first terminal updates the target private database based on the updated public database through the target application.

3. The method according to claim 2, characterized in that, The control of the target application to be in a data recovery state includes: The first terminal generates a first message, which is used to indicate that the data of the target application has changed, so that the target application is in the data recovery state according to the first message.

4. The method according to claim 3, characterized in that, The first message is a broadcast message.

5. The method according to claim 1, characterized in that, The first terminal receives data to be recovered from the second terminal, including: The first terminal establishes a point-to-point (P2P) communication connection with the second terminal; The first terminal receives the data to be recovered through the P2P communication connection.

6. The method according to claim 5, characterized in that, The first terminal establishes a peer-to-peer (P2P) communication connection with the second terminal, including: The first terminal establishes a wireless fidelity WiFi connection with the second terminal; Based on the WiFi connection, a socket connection is established between the second terminal and the first terminal.

7. The method according to claim 5 or 6, characterized in that, After the first terminal receives the data to be recovered from the second terminal, the method further includes: The first terminal disconnects the P2P communication connection.

8. A data recovery device, characterized in that, Applied to a first terminal, the device includes: A receiving module is used to receive data to be recovered from a second terminal. The data to be recovered includes data corresponding to a target application. The data to be recovered is read by the second terminal from a public database of the second terminal. The public database of the second terminal is used to store data corresponding to the target application and at least one application of the same type as the target application in the second terminal. An insertion module is used to insert the data to be recovered into the public database of the first terminal to obtain an updated public database of the first terminal. The public database of the first terminal is used to store data corresponding to at least one application in the first terminal that is of the same type as the target application. The update module is used to update the target private database of the first terminal according to the updated public database of the first terminal, wherein the target private database is used to store data corresponding to the target application in the first terminal.

9. A data recovery device, characterized in that, It includes a processor and a memory, the memory being used to store code instructions; the processor being used to execute the code instructions to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, the computer program including instructions for implementing the method as described in any one of claims 1 to 7.

11. A computer program product, the computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed on a computer, the computer causes the computer to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data transmission method of terminal

    CN110806951A