CN105740372B - Data recovery method and device and electronic equipment - Google Patents

Data recovery method and device and electronic equipment Download PDF

Info

Publication number
CN105740372B
CN105740372B CN201610055477.9A CN201610055477A CN105740372B CN 105740372 B CN105740372 B CN 105740372B CN 201610055477 A CN201610055477 A CN 201610055477A CN 105740372 B CN105740372 B CN 105740372B
Authority
CN
China
Prior art keywords
data
stored
database
permission
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610055477.9A
Other languages
Chinese (zh)
Other versions
CN105740372A (en
Inventor
郭镇龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201610055477.9A priority Critical patent/CN105740372B/en
Publication of CN105740372A publication Critical patent/CN105740372A/en
Application granted granted Critical
Publication of CN105740372B publication Critical patent/CN105740372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention provides a data recovery method, a data recovery device and electronic equipment, which are used for solving the problem that data cannot be recovered because an operating system of the electronic equipment limits a third-party client to operate a database, wherein the method comprises the following steps: acquiring data to be stored from a server; when it is detected that the data to be stored is limited to be written into the first database, generating a modification permission request according to the acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to an application for acquiring the data to be stored, and the first database is used for storing the data of the attribute of the data to be stored; obtaining an authority distribution success indication according to the authority modification request; and writing the data to be stored into the first database. By implementing the embodiment of the invention, the data can be recovered under the condition that the operation system of the electronic equipment limits the operation of the database of the third-party client.

Description

Data recovery method and device and electronic equipment
Technical Field
The invention relates to the technical field of electronic equipment, in particular to a data recovery method and device and electronic equipment.
Background
With the continuous development of the internet technology, a user can backup data to a cloud server through a third-party client on the electronic device in order to avoid data loss on the electronic device, such as short message data, pictures, videos and the like, caused by the loss of the electronic device, the replacement of the electronic device, the mistaken deletion of the data and the like. When the data needs to be recovered, the data can be downloaded from the cloud server through the third-party client and written into the corresponding database. However, when the operating system of the electronic device is an android system and the version number of the operating system is a version number of 4.4 or more, the operating system of the electronic device will limit the operation of the third-party client on the database, so that the data cannot be restored to the database.
Disclosure of Invention
The embodiment of the invention provides a data recovery method and device and electronic equipment, and aims to solve the problem that an operating system of the electronic equipment limits a third-party client to operate a database, so that data to be recovered cannot be recovered.
A first aspect of an embodiment of the present invention provides a data recovery method, where the method is applied to an electronic device, and the method includes:
acquiring data to be stored from a server;
when it is detected that the data to be stored is limited to be written into a first database, generating a modification permission request according to an acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to an application for acquiring the data to be stored, and the first database is used for storing data of attributes of the data to be stored;
obtaining an authority distribution success indication according to the authority modification request;
and writing the data to be stored into the first database.
With reference to the first aspect of the embodiment of the present invention, in a first possible implementation manner of the first aspect of the embodiment of the present invention, after the obtaining, from the server, data to be stored, the method further includes:
generating a write command comprising the data to be stored, wherein the write command is used for instructing the first database to store the data to be stored;
when the message that the write command cannot be executed by the first database is detected, the reason why the write command cannot be executed is obtained, and when the reason is that the application cannot perform writing operation on the first database, it is determined that the data to be stored is limited to be written into the first database.
With reference to the first aspect of the embodiment of the present invention, in a second possible implementation manner of the first aspect of the embodiment of the present invention, after the obtaining, from the server, the data to be stored, the method further includes:
and acquiring the version number of the operating system of the electronic equipment, and determining that the data to be stored is limited to be written into a first database when the version number is greater than a preset version number.
With reference to the first aspect of the embodiment of the present invention and any one possible implementation manner of the first aspect and the second aspect of the first aspect of the embodiment of the present invention, in a third possible implementation manner of the first aspect of the embodiment of the present invention, the acquiring, from the server, the data to be stored includes:
receiving input account information;
sending a data acquisition request carrying the account information to the server, wherein the data acquisition request is used for indicating the server to send data to be stored corresponding to the account information to the electronic equipment;
and receiving the data to be stored sent by the server.
With reference to the first aspect of the embodiment of the present invention and any one possible implementation manner of the first and second aspects of the first aspect of the embodiment of the present invention, in a fourth possible implementation manner of the first aspect of the embodiment of the present invention, after the writing the data to be stored in the first database, the method further includes:
when the data to be stored is detected to be stored in the first database, generating authority release information;
and releasing the write-in permission distributed to the application according to the permission release information.
A second aspect of an embodiment of the present invention provides a data recovery apparatus, where the apparatus is disposed on an electronic device, and the apparatus includes:
the first acquisition unit is used for acquiring data to be stored from the server;
the generating unit is used for generating a modification permission request according to the acquisition mode of the data to be stored when the fact that the data to be stored acquired by the first acquiring unit is limited to be written into a first database is detected, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to an application for acquiring the data to be stored, and the first database is used for storing data of the attribute of the data to be stored;
the obtaining unit is used for obtaining an authority distribution success indication according to the authority modification request generated by the generating unit;
and the writing unit is used for writing the data to be stored acquired by the first acquisition unit into the first database.
With reference to the second aspect of the embodiment of the present invention, in a first possible implementation manner of the second aspect of the embodiment of the present invention, the generating unit is further configured to generate a write command including the data to be stored after the first obtaining unit obtains the data to be stored from the server, where the write command is used to instruct the first database to store the data to be stored;
the device further comprises:
a second obtaining unit, configured to, when detecting that the write command generated by the generating unit cannot be executed by the first database, obtain a reason why the write command cannot be executed, and when the reason is that the application cannot perform a write operation on the first database, determine that the data to be stored is limited to be written in the first database.
With reference to the second aspect of the embodiment of the present invention, in a second possible implementation manner of the second aspect of the embodiment of the present invention, the apparatus further includes:
and the third acquiring unit is used for acquiring the version number of the operating system of the electronic equipment after the first acquiring unit acquires the data to be stored from the server, and when the version number is greater than a preset version number, determining that the data to be stored is limited to be written into the first database.
With reference to the second aspect of the embodiment of the present invention and any one possible implementation manner of the first and second aspects of the second aspect of the embodiment of the present invention, in a third possible implementation manner of the second aspect of the embodiment of the present invention, the first obtaining unit includes:
the receiving subunit is used for receiving the input account information;
the communication subunit is configured to send a data acquisition request carrying the account information received by the receiving subunit to the server, where the data acquisition request is used to instruct the server to send data to be stored corresponding to the account information to the electronic device;
the communication subunit is further configured to receive the data to be stored sent by the server.
With reference to the second aspect of the embodiment of the present invention and any one of the first possible implementation manner and the second possible implementation manner of the second aspect of the embodiment of the present invention, in a fourth possible implementation manner of the second aspect of the embodiment of the present invention, the generating unit is further configured to generate permission release information when it is detected that the data to be stored is stored in the first database after the writing unit writes the data to be stored in the first database;
the device further comprises:
and the releasing unit is used for releasing the writing permission distributed to the application according to the permission release information generated by the generating unit.
A third aspect of embodiments of the present invention provides an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the steps of:
acquiring data to be stored from a server;
when it is detected that the data to be stored is limited to be written into a first database, generating a modification permission request according to an acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to an application for acquiring the data to be stored, and the first database is used for storing data of attributes of the data to be stored;
obtaining an authority distribution success indication according to the authority modification request;
and writing the data to be stored into the first database.
A fourth aspect of the embodiments of the present invention provides a storage medium, where the storage medium is used to store an application program, and the application program is used to execute, when running, the data recovery method provided in the first aspect of the embodiments of the present invention.
A fifth aspect of the embodiment of the present invention provides an application program, where the application program is configured to execute the data recovery method provided in the first aspect of the embodiment of the present invention when running.
In the embodiment of the invention, after the data to be stored is acquired from the server, when the data to be stored is detected to be limited to be written into the first database, after the modification permission request is generated, the writing permission of the first database is distributed to the application for acquiring the data to be stored, so that the data to be stored can be written into the first database by using the writing permission. Therefore, in the case that the operating system of the electronic device limits the third-party client to operate the database on the electronic device, the data recovery can be realized by applying for the modification authority.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data recovery method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another data recovery method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a further data recovery method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another data recovery apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data recovery method and device and electronic equipment, and aims to solve the problem that data cannot be recovered because an operating system of the electronic equipment limits a third-party client to operate a database. The following are detailed below.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a data recovery method according to an embodiment of the present invention. The data recovery method is applied to the electronic equipment provided with the third-party client (namely, the third-party application). As shown in fig. 1, the data recovery method may include the following steps.
101. And acquiring the data to be stored from the server.
In this embodiment, when a user needs to recover data lost due to the replacement of the electronic device, the loss of the electronic device, the data mistaken deletion, and the like, the user may input a start instruction for starting the third-party client to the electronic device by clicking, touching, sliding, and the like a preset icon on the electronic device, and the electronic device will start the third-party client after receiving the start instruction. And then, a third-party client on the electronic equipment can output prompt information for prompting the user to input account information through the operation of the user, when the third-party client on the electronic equipment receives the account information input by the user, the electronic equipment can send a data acquisition request carrying the account information to a server through the third-party client, and the server can send data to be stored corresponding to the account information to the third-party client on the electronic equipment according to the data acquisition request. The electronic device can back up data on the electronic device to the server through the third-party client, and can also acquire the data from the server and write the data into the database. The preset icon is an icon of the third-party client. The data to be stored may be short message data, picture data, photo data, video data, and the like. The data acquisition request has a function of indicating the server to send the data to be stored corresponding to the account information to the electronic equipment.
102. And when the data to be stored is detected to be limited to be written into the first database, generating a modification permission request according to the acquisition mode of the data to be stored.
In this embodiment, when the version number of the operating system of the electronic device is higher than 4.4, the operating system of the electronic device will restrict the third-party client from operating the database on the electronic device, so that the electronic device can acquire the permission information of the operating system of the electronic device after acquiring the data to be stored from the server through the third-party client, and when the operation permission information of the electronic device does not include the permission information of the third-party client to the first database, that is, when the operating system of the electronic device restricts the operation of the third-party client to the first database, that is, when it is detected that the data to be stored is restricted from being written into the first database, it indicates that the data to be stored is restricted from being written into the first database, and a modification permission request will be generated according to the acquisition manner of the data to be stored, that is, a permission application request is generated, and the modification permission request may indicate that the permission to write into the first database is allocated to the application that acquires the data The first database is a database for storing data of attributes of data to be stored, for example: when the data to be stored is short message data, the first database is a short message database, when the data to be stored is pictures, photos or videos, the first database is an album database, and the permission application request can indicate that the third-party client side is allocated with writing permission for operating the first database.
103. And obtaining an authority distribution success indication according to the authority modification request, and writing the data to be stored into the first database.
In this embodiment, after the permission modification request is generated according to the acquisition mode of the data to be stored, the electronic device modifies the permission of the operating system, that is, the permission of the third-party client is a write permission assigned to the first database, and after the assignment is completed, a permission assignment success indication may be generated to indicate that the permission of the third-party client for writing to the first database is already assigned, that is, the third-party client may perform write operation on the first database. And then writing the data to be stored in the third-party client into the first database, namely generating a write command comprising the data to be stored, wherein the write command is used for indicating the first database to store the data to be stored.
In the data recovery method described in fig. 1, after the data to be stored is acquired from the server, when it is detected that the data to be stored is limited to be written into the first database, a modification permission request is generated, so as to allocate the write permission of the first database to the application that acquires the data to be stored, and thus, the data to be stored can be written into the first database by using the write permission. Therefore, in the case that the operating system of the electronic device limits the third-party client to operate the database on the electronic device, the data recovery can be realized by applying for the modification authority.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another data recovery method according to an embodiment of the present invention. The data recovery method is applied to the electronic equipment provided with the third-party client (namely, the third-party application). As shown in fig. 2, the data recovery method may include the following steps.
Step 201 is the same as step 101 in the previous embodiment, and this embodiment will not be described again here.
202. A write command is generated that includes data to be stored.
In this embodiment, after the electronic device obtains the data to be stored from the server through the third-party client, a write command including the data to be stored is directly generated, that is, the data to be stored is directly written into the first database, and the write command may be used to instruct the first database to store the data to be stored.
203. When a message that the write command cannot be executed by the first database is detected, a reason why the write command cannot be executed is acquired.
204. And when the reason is that the application for acquiring the data to be stored cannot perform writing operation on the first database, generating a modification permission request according to the acquisition mode of the data to be stored.
In this embodiment, when the reason that the write command cannot be executed by the first database is that an application (i.e., a third-party client) that acquires data to be stored cannot perform a write operation on the first database, it indicates that the version number of the operating system is greater than the preset version number, step 102 is executed, and detailed explanation thereof is not repeated here.
Step 205 is the same as step 103 in the previous embodiment, and this embodiment will not be described again here.
206. And when the data to be stored is detected to be stored in the first database, generating permission release information, and releasing the write-in permission distributed to the application for acquiring the data to be stored according to the permission release information.
In this embodiment, after the third-party client is assigned with the write-in permission for the first database and data to be stored is written in the first database, information such as a data storage completion message is generated, and after the information is detected, permission release information may be generated, and the write-in permission assigned to the application is released according to the permission release information, so as to restore the original state, thereby ensuring the security of the data in the first database.
In the data recovery method described in fig. 2, after the data to be stored is acquired from the server, the data to be stored may be directly written into the first database, and when the third-party client has a right to write into the first database, unnecessary operations may be reduced.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating another data recovery method according to an embodiment of the present invention. The data recovery method is applied to the electronic equipment provided with the third-party client (namely, the third-party application). As shown in fig. 3, the data recovery method may include the following steps.
Step 301 is the same as step 101 in the previous embodiment, and this embodiment will not be described again here.
302. The version number of the operating system of the electronic device is obtained.
303. And when the version number of the operating system is greater than the preset version number, generating a permission modification request according to the acquisition mode of the data to be stored.
Step 304 is the same as step 103 in the previous embodiment, and this embodiment will not be described again here.
Step 305 is the same as step 206 in the previous embodiment, and this embodiment will not be described again here.
In the data recovery method described in fig. 3, after the data to be stored is acquired from the server, before the data to be stored is written into the first database, the version number of the operating system is acquired first, when the version number of the operating system is greater than the preset version number, it is indicated that the third-party client does not have the write right to the first database, the right modification is performed first, and after the right modification is completed, the data to be stored is written into the first database, and when the third-party client does not have the write right to the first database, unnecessary operations can be reduced.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present invention. The data recovery device is arranged on the electronic equipment provided with the third-party client. As shown in fig. 4, the data restoring apparatus may include:
a first obtaining unit 401, configured to obtain data to be stored from a server;
a generating unit 402, configured to generate, when it is detected that the data to be stored acquired by the first acquiring unit 401 is limited to be written into the first database, a modification permission request according to an acquisition manner of the data to be stored, where the modification permission request is used to instruct that the write permission of the first database is allocated to an application that acquires the data to be stored, and the first database is a database used to store data of an attribute of the data to be stored;
an obtaining unit 403, configured to obtain an indication of successful permission allocation according to the permission modification request generated by the generating unit 402;
a writing unit 404, configured to write the data to be stored acquired by the first acquiring unit 401 into the first database.
Specifically, after obtaining the permission assignment success indication according to the permission modification request, the obtaining unit 403 writes the data to be stored, obtained by the first obtaining unit 401, into the first database by using the trigger writing unit 404.
In the data recovery apparatus depicted in fig. 4, after the data to be stored is acquired from the server, when it is detected that the data to be stored is limited to be written into the first database, a modification permission request is generated, so as to allocate the write permission of the first database to the application acquiring the data to be stored, and thus the data to be stored can be written into the first database by using the write permission. Therefore, in the case that the operating system of the electronic device limits the third-party client to operate the database on the electronic device, the data recovery can be realized by applying for the modification authority.
Referring to fig. 5, fig. 5 is a schematic structural diagram of another data recovery apparatus according to an embodiment of the present invention. The data recovery apparatus shown in fig. 5 is optimized by the data recovery apparatus shown in fig. 4, where: the data recovery apparatus may further include a second obtaining unit 405.
As a possible implementation manner, the generating unit 402 is further configured to generate a write command including the data to be stored after the first obtaining unit 401 obtains the data to be stored from the server, where the write command is used to instruct the first database to store the data to be stored;
a second obtaining unit 405, configured to, when detecting that the write command generated by the generating unit 402 cannot be executed by the first database, obtain a reason that the write command cannot be executed, and when the reason is that the application cannot perform a write operation on the first database, determine that the data to be stored is limited to be written into the first database.
As a possible implementation manner, the second obtaining unit 405 is configured to obtain a version number of an operating system of the electronic device after the first obtaining unit 401 obtains the data to be stored from the server, and determine that the data to be stored is limited to be written into the first database when the version number is greater than a preset version number.
As a possible implementation, the first obtaining unit 401 may include:
the receiving sub-unit 4011 is configured to receive input account information;
the communication sub-unit 4012 is configured to send a data obtaining request carrying the account information received by the receiving sub-unit 4011 to the server, where the data obtaining request is used to instruct the server to send data to be stored corresponding to the account information to the electronic device;
the communication sub-unit 4012 is further configured to receive data to be stored, where the data is sent by the server.
As a possible implementation manner, the generating unit 402 is further configured to generate the permission release information when it is detected that the data to be stored is stored in the first database after the writing unit 404 writes the data to be stored in the first database;
the data recovery apparatus may further include:
a releasing unit 406, configured to release the write permission allocated to the application according to the permission release information generated by the generating unit 402.
In the data recovery apparatus depicted in fig. 5, after the data to be stored is acquired from the server, when it is detected that the data to be stored is limited to be written into the first database, a modification permission request is generated, so as to allocate the write permission of the first database to the application acquiring the data to be stored, and thus the data to be stored can be written into the first database by using the write permission. Therefore, in the case that the operating system of the electronic device limits the third-party client to operate the database on the electronic device, the data recovery can be realized by applying for the modification authority.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device may be a mobile phone provided with a database, and the like. As shown in fig. 6, the electronic device may include a housing 601, a processor 602, a memory 603, a circuit board 604, and a power supply circuit 605, wherein the circuit board 604 is disposed inside a space surrounded by the housing, and the processor 602 and the memory 603 are disposed on the circuit board 604; a power supply circuit 605 for supplying power to each circuit or device of the electronic apparatus; the memory 603 is used for storing executable program code; the processor 602 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 603, for performing the steps of:
acquiring data to be stored from a server;
when it is detected that the data to be stored is limited to be written into the first database, generating a modification permission request according to the acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to an application for acquiring the data to be stored, and the first database is used for storing the data of the attribute of the data to be stored;
obtaining an authority distribution success indication according to the authority modification request;
and writing the data to be stored into the first database.
As a possible implementation, after the processor 602 obtains the data to be stored from the server, the processor 602 further executes a program corresponding to the executable program code by reading the executable program code stored in the memory 603, so as to perform the following steps:
generating a write command comprising data to be stored, wherein the write command is used for indicating a first database to store the data to be stored;
when the message that the write command cannot be executed by the first database is detected, the reason that the write command cannot be executed is obtained, and when the reason is that the application cannot perform writing operation on the first database, it is determined that the data to be stored is limited to be written into the first database.
As a possible implementation, after the processor 602 obtains the data to be stored from the server, the processor 602 further executes a program corresponding to the executable program code by reading the executable program code stored in the memory 603, so as to perform the following steps:
and acquiring the version number of the operating system of the electronic equipment, and determining that the data to be stored is limited to be written into the first database when the version number is greater than a preset version number.
As a possible implementation, the processor 602, obtaining data to be stored from a server, includes:
receiving input account information;
sending a data acquisition request carrying account information to a server, wherein the data acquisition request is used for indicating the server to send data to be stored corresponding to the account information to the electronic equipment;
and receiving data to be stored sent by the server.
As a possible implementation manner, after the processor 602 writes the data to be stored in the first database, the processor 602 further runs a program corresponding to the executable program code by reading the executable program code stored in the memory 603, so as to perform the following steps:
when detecting that the data to be stored is stored in the first database, generating permission release information;
and releasing the write permission distributed for the application according to the permission release information.
In the electronic device described in fig. 6, after the data to be stored is acquired from the server, when it is detected that the data to be stored is limited to be written into the first database, a modification permission request is generated, so as to assign the writing permission of the first database to the application acquiring the data to be stored, and thus the data to be stored can be written into the first database by using the writing permission. Therefore, in the case that the operating system of the electronic device limits the third-party client to operate the database on the electronic device, the data recovery can be realized by applying for the modification authority.
In one embodiment, a storage medium is provided for storing an application program for executing a data recovery method corresponding to fig. 1-3 when the application program is executed.
In one embodiment, an application program is provided for performing the data recovery method corresponding to fig. 1-3 at runtime.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The data recovery method, the data recovery device, and the electronic device provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the embodiments of the present invention, and the description of the embodiments above is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A data recovery method, applied to an electronic device, the method comprising:
acquiring data to be stored from a server;
acquiring authority information of an operating system of the electronic equipment, and detecting that the data to be stored is limited to be written into a first database when the authority information does not include the authority information of the first database; or generating a write command comprising the data to be stored, wherein the write command is used for indicating the first database to store the data to be stored, when a message that the write command cannot be executed by the first database is detected, the reason why the write command cannot be executed is obtained, and when the reason is that an application which obtains the data to be stored cannot perform writing operation on the first database, it is determined that the data to be stored is limited to be written into the first database;
generating a modification permission request according to the acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to the application for acquiring the data to be stored, and the first database is used for storing the data of the attribute of the data to be stored;
obtaining an authority distribution success indication according to the authority modification request;
and writing the data to be stored into the first database.
2. The method of claim 1, wherein after the obtaining the data to be stored from the server, the method further comprises:
and acquiring the version number of the operating system of the electronic equipment, and determining that the data to be stored is limited to be written into a first database when the version number is greater than a preset version number.
3. The method according to claim 1 or 2, wherein the obtaining data to be stored from a server comprises:
receiving input account information;
sending a data acquisition request carrying the account information to the server, wherein the data acquisition request is used for indicating the server to send data to be stored corresponding to the account information to the electronic equipment;
and receiving the data to be stored sent by the server.
4. The method according to claim 1 or 2, wherein after the writing of the data to be stored into the first database, the method further comprises:
when the data to be stored is detected to be stored in the first database, generating authority release information;
and releasing the write-in permission distributed to the application according to the permission release information.
5. A data recovery apparatus, the apparatus being provided on an electronic device, the apparatus comprising:
the first acquisition unit is used for acquiring data to be stored from the server;
the generating unit is used for detecting that the data to be stored acquired by the first acquiring unit is limited to be written into a first database when the authority information of the operating system of the electronic equipment does not include the authority information of the first database, and generating a modification authority request according to the acquiring mode of the data to be stored, wherein the modification authority request is used for indicating that the writing authority of the first database is allocated to the application acquiring the data to be stored, and the first database is used for storing the data of the attribute of the data to be stored; or, the generating unit is configured to generate a write command including the data to be stored after the first obtaining unit obtains the data to be stored from a server, where the write command is used to instruct the first database to store the data to be stored; a second obtaining unit, configured to, when detecting that the write command generated by the generating unit cannot be executed by the first database, obtain a reason why the write command cannot be executed, and when the reason is that the application cannot perform a write operation on the first database, determine that the data to be stored is restricted from being written into the first database; the generating unit generates a modification permission request according to the acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to the application for acquiring the data to be stored, and the first database is used for storing the data of the attribute of the data to be stored;
the obtaining unit is used for obtaining an authority distribution success indication according to the authority modification request generated by the generating unit;
and the writing unit is used for writing the data to be stored acquired by the first acquisition unit into the first database.
6. The apparatus of claim 5, further comprising:
and the third acquiring unit is used for acquiring the version number of the operating system of the electronic equipment after the first acquiring unit acquires the data to be stored from the server, and when the version number is greater than a preset version number, determining that the data to be stored is limited to be written into the first database.
7. The apparatus according to claim 5 or 6, wherein the first obtaining unit comprises:
the receiving subunit is used for receiving the input account information;
the communication subunit is configured to send a data acquisition request carrying the account information received by the receiving subunit to the server, where the data acquisition request is used to instruct the server to send data to be stored corresponding to the account information to the electronic device;
the communication subunit is further configured to receive the data to be stored sent by the server.
8. The apparatus according to claim 5 or 6, wherein the generating unit is further configured to generate permission release information when it is detected that the data to be stored is stored in the first database after the writing unit writes the data to be stored in the first database;
the device further comprises:
and the releasing unit is used for releasing the writing permission distributed to the application according to the permission release information generated by the generating unit.
9. An electronic device, comprising: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the steps of:
acquiring data to be stored from a server;
acquiring authority information of an operating system of the electronic equipment, and detecting that the data to be stored is limited to be written into a first database when the authority information does not include the authority information of the first database; or generating a write command comprising the data to be stored, wherein the write command is used for indicating the first database to store the data to be stored, when a message that the write command cannot be executed by the first database is detected, the reason why the write command cannot be executed is obtained, and when the reason is that an application which obtains the data to be stored cannot perform writing operation on the first database, it is determined that the data to be stored is limited to be written into the first database;
generating a modification permission request according to the acquisition mode of the data to be stored, wherein the modification permission request is used for indicating that the writing permission of the first database is allocated to the application for acquiring the data to be stored, and the first database is used for storing the data of the attribute of the data to be stored;
obtaining an authority distribution success indication according to the authority modification request;
and writing the data to be stored into the first database.
CN201610055477.9A 2016-01-27 2016-01-27 Data recovery method and device and electronic equipment Active CN105740372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610055477.9A CN105740372B (en) 2016-01-27 2016-01-27 Data recovery method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610055477.9A CN105740372B (en) 2016-01-27 2016-01-27 Data recovery method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN105740372A CN105740372A (en) 2016-07-06
CN105740372B true CN105740372B (en) 2020-11-27

Family

ID=56247688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610055477.9A Active CN105740372B (en) 2016-01-27 2016-01-27 Data recovery method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN105740372B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289633A (en) * 2011-09-02 2011-12-21 广东欧珀移动通信有限公司 Method for managing dynamic permission of application program under Android platform
CN103200306A (en) * 2012-01-09 2013-07-10 Lg电子株式会社 Mobile terminal and controlling method thereof
CN103312676A (en) * 2012-03-15 2013-09-18 宇龙计算机通信科技(深圳)有限公司 Terminal, server and terminal safety management method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115661A1 (en) * 2012-10-22 2014-04-24 Electronics And Telecommunications Research Institute User authentication method and system for using web multi contents

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289633A (en) * 2011-09-02 2011-12-21 广东欧珀移动通信有限公司 Method for managing dynamic permission of application program under Android platform
CN103200306A (en) * 2012-01-09 2013-07-10 Lg电子株式会社 Mobile terminal and controlling method thereof
CN103312676A (en) * 2012-03-15 2013-09-18 宇龙计算机通信科技(深圳)有限公司 Terminal, server and terminal safety management method

Also Published As

Publication number Publication date
CN105740372A (en) 2016-07-06

Similar Documents

Publication Publication Date Title
KR101605156B1 (en) Device, method, and computer for providing file deleting service
KR101636870B1 (en) Method and apparatus for generating minimal boot image
US9274788B2 (en) Information processing apparatus, method for controlling the same, and storage medium
JP6464288B2 (en) Program, apparatus, server, and storage medium for deleting a cloud host in a cloud computing environment
KR101238374B1 (en) Method and appratus for supplying mashup service
AU2016202576B2 (en) Techniques for evaluating applications through use of an auxiliary application
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN113127228A (en) Graphic rendering method, server, and computer-readable storage medium
CN106201789A (en) Data backup method and device and terminal
CN105786539B (en) File downloading method and device
CN114564158A (en) Method, device, equipment and medium for controlling document printing under Linux system
WO2017198155A1 (en) Method for starting adb debugging, and terminal
CN109710286A (en) Method for upgrading system, device, equipment and storage medium
CN108132832B (en) Application program starting method and device
CN108762983B (en) Multimedia data recovery method and device
CN110727416A (en) Development framework generation method and related device
CN104765631B (en) A kind of application recovery method and device of mobile terminal
CN106843928B (en) Remote restoration method and device for application program
CN107145390B (en) Android service lifecycle management method, service management object-based device and Android system
CN105740372B (en) Data recovery method and device and electronic equipment
KR20190098516A (en) Method for managing data related to application and electronic device thereof
CN109669810B (en) Information storage method, information storage card recovery method, information storage device, information storage card recovery device, electronic equipment and storage medium
CN113094211B (en) Backup data processing method and device
US9940334B2 (en) Image forming apparatus and control method thereof
CN112291317B (en) Data downloading method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant