CN117688556A - Application data processing method, device, equipment, storage medium and product - Google Patents

Application data processing method, device, equipment, storage medium and product Download PDF

Info

Publication number
CN117688556A
CN117688556A CN202311749411.6A CN202311749411A CN117688556A CN 117688556 A CN117688556 A CN 117688556A CN 202311749411 A CN202311749411 A CN 202311749411A CN 117688556 A CN117688556 A CN 117688556A
Authority
CN
China
Prior art keywords
application data
terminal
storage space
owner information
external storage
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.)
Pending
Application number
CN202311749411.6A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202311749411.6A priority Critical patent/CN117688556A/en
Publication of CN117688556A publication Critical patent/CN117688556A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a processing method, a device, equipment, a storage medium and a product of application data, and belongs to the technical field of databases. The method comprises the following steps: when an application program installed on a terminal updates application data in an external storage space of the terminal, calling a monitoring module in the terminal; updating, by the monitoring module, owner information of the application data in the external storage space maintained by the monitoring module; updating owner information maintained by the monitoring module to a media memory of the terminal, wherein the media memory is provided with a database; and updating the owner information of the application data into a data list in the database through the media memory, wherein the data list is used for storing the owner information of the application data stored in an external storage space of the terminal. The method and the device ensure that related functions of the owner of the file to be queried can be normally executed, and further improve the reliability of application data.

Description

Application data processing method, device, equipment, storage medium and product
Technical Field
The present disclosure relates to the field of database technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a product for processing application data.
Background
For an application program installed on a terminal of an Android (Android) operating system, a developer of the application program can store application data of the application program in an internal storage space of the terminal and/or an external storage space of the terminal according to requirements, wherein the external storage space comprises a private file of the external space or a public file of the external space. When other users need to access the application data stored in the external storage space of the terminal, the terminal needs to acquire the owner information of the application data stored in the external storage space, and based on the owner information of the application data, the application data in the external storage space is operated through an application program interface (Application Programming Interface, API) of a storage access framework (Storage Access Framework, SAF) or a media store (MediaStore).
However, for the terminals with Android 10 and the Android 10 previous version of the operating system, since the terminals do not store the owner information of the application data, the terminals need to obtain the authorization of the user to operate the application data in the external storage space, however, since the related authorization of reading the application data in the external storage space is sensitive, the user may refuse the authorization, thereby causing failure of operating the application data in the external storage space, that is, the processing reliability of the application data is lower.
Disclosure of Invention
The embodiment of the application provides a processing method, a device, equipment, a storage medium and a product for application data, which can improve the processing reliability of the application data. The technical scheme is as follows:
in one aspect, a method for processing application data is provided, where the method includes:
when an application program installed on a terminal updates application data in an external storage space of the terminal, calling a monitoring module in the terminal;
updating, by the monitoring module, owner information of the application data in the external storage space maintained by the monitoring module;
updating owner information maintained by the monitoring module to a media memory of the terminal, wherein the media memory is provided with a database;
and updating the owner information of the application data into a data list in the database through the media memory, wherein the data list is used for storing the owner information of the application data stored in an external storage space of the terminal.
In another aspect, there is provided an apparatus for processing application data, the apparatus comprising:
the calling module is used for calling the monitoring module in the terminal when the application program installed on the terminal updates the application data in the external storage space of the terminal;
The first updating module is used for updating the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module;
the second updating module is used for updating the owner information maintained by the monitoring module to a media memory of the terminal, and the media memory is provided with a database;
and a third updating module, configured to update, through the media storage, the owner information of the application data to a data list in the database, where the data list is used to store the owner information of the application data stored in an external storage space of the terminal.
In another aspect, a terminal is provided, the terminal comprising one or more processors and one or more memories, the one or more memories storing at least one program code therein, the at least one program code being loaded and executed by the one or more processors to implement a method of processing application data as described above.
In another aspect, a computer readable storage medium is provided, where at least one program code is stored, where the at least one program code is loaded and executed by a processor to implement the method for processing application data described above.
In another aspect, a computer program product is provided, which stores at least one program code for execution by a processor to implement the method of processing application data as described above.
In the embodiment of the application, the monitoring module is newly added in the terminal and is used for maintaining the owner information of the application data in the external storage space and updating the application data in the external storage space maintained by the monitoring module into the data list through the media memory, so that the information recording integrity in the data list is improved, the normal execution of related functions of the owner of the required query file is ensured, and the reliability of the application data is further improved.
Drawings
FIG. 1 illustrates an implementation environment of a method for processing application data according to an exemplary embodiment of the present application;
FIG. 2 illustrates a flow chart of a method of processing application data as illustrated in an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a method of processing application data as illustrated in an exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of a method of processing application data as illustrated in an exemplary embodiment of the present application;
FIG. 5 illustrates a flow chart of a method of processing application data as illustrated in an exemplary embodiment of the present application;
FIG. 6 illustrates a flow chart of a method of processing application data as illustrated in an exemplary embodiment of the present application;
FIG. 7 illustrates a block diagram of an application data processing apparatus according to an exemplary embodiment of the present application;
fig. 8 shows a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
References herein to "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
It should be noted that, information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals referred to in this application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of relevant data is required to comply with relevant laws and regulations and standards of relevant countries and regions. For example, application data and operating system versions, etc., referred to in this application are acquired with sufficient authorization.
Referring to fig. 1, a schematic diagram of an implementation environment of a method for processing application data according to an exemplary embodiment of the present application is shown. Referring to fig. 1, the implementation environment includes a terminal on which an application program is installed, and application data of the application program may be stored in an internal storage space of the terminal and an external storage space of the terminal. The internal storage space of the terminal is used for storing the first private file of the application program, that is, the application data of the application program of the terminal may be stored in the first private file of the internal storage space. The external storage space of the terminal comprises an external private space and an external public space, wherein the external private space is used for storing a second private file of the application program, namely, the application data of the application program of the terminal can be stored in the second private file of the external storage space; the external public space is used for storing a public file of an application program, that is, application data of the application program of the terminal can be stored in a public file owned by the application program under a public directory of the external storage space. For example, if the application program installed on the terminal is a video playing application program, the terminal may store the video that can be shared into a public file owned by the application program under a public directory in the external storage space, store the private video into the internal storage space, and store the collected video into a private file in the external storage space. And what application data is stored in which storage space can be set and changed according to the requirement, which is not particularly limited in the embodiment of the present application.
In some embodiments, when the terminal needs to access the application data stored in the external storage space, it needs to acquire the owner information of the application data stored in the external storage space, and operate the application data in the external storage space through an API of the SAF or MediaStore, etc. based on the owner information of the application data. Therefore, when an application program stores application data in an external storage space, or when an application program deletes application data in an external storage space, the terminal needs to record and maintain owner information of the application data stored in the external storage space.
The operating system of the terminal can be an Android operating system, and for the Android operating system before the first version, the terminal does not record owner information of application data stored in an external storage space; for the Android operating system after the first version, only the owner information of the application data of the external storage space is recorded in the terminal in a mode of updating the API of the MediaStore, and the terminal cannot acquire the owner information of the application data of the external storage space in other modes such as SAF. Therefore, in the embodiment of the application, a monitoring module is added in the terminal, the owner information of the application data in the external storage space is monitored through the monitoring module, the owner information of the application data in the external storage space maintained by the monitoring module is synchronized to the MediaStore, and the MediaStore is updated to the data list (Files data list) of the database, so that the owner information of the application data in the comprehensive external storage space is stored in the Files data list, the integrity of the owner information is improved, and application processing is facilitated based on the owner information of the application data in the external storage space.
Referring to fig. 2, a flowchart of a method for processing application data according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
step 201: and when the application program installed on the terminal updates the application data in the external storage space of the terminal, calling a monitoring module in the terminal.
Adding a monitoring module in the terminal; for example, a monitoring module is added to the terminal through a system Over-the-Air Technology (OTA) update mode and the like; the monitoring module is used for monitoring owner information of the updated application data in the external storage space; for example, the monitoring module monitors the owner information of the updated application data in the external storage space by means of hook-related API interfaces or the like. The updated application data includes stored application data or deleted application data; when the application data is stored in the external storage space in the form of a file, calling a monitoring module in the terminal when the application program creates the application file in the external storage space; or when the application program deletes the application file in the external storage space, a monitoring module in the terminal is called.
In some embodiments, the owner information of the application data includes an application data identification and an application program identification. In the case that the application data is stored in the external storage space in the form of an application file, the application data identifier may be an application file identifier; the application identification may be a package name of the application. The external storage space comprises an external public space and/or an external private space; in the embodiment of the present application, an example is described in which the external storage space includes an external public space, that is, the present application maintains owner information of application data stored in the external public space (in a public file under a public directory).
Step 202: and updating the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module.
When an application program installed on a terminal stores application data in an external storage space of the terminal, recording owner information of the stored application data; or, when an application installed on the terminal deletes the application data in the external storage space of the terminal, the owner information of the deleted application data is deleted.
Step 203: and updating the owner information maintained by the monitoring module to a media memory of the terminal, wherein the media memory is provided with a database.
For the first updating time, when the operating system of the terminal is updated, updating the owner information maintained by the monitoring module to a media memory of the terminal; for example, when the operating system of the terminal is updated from the first version of the operating system to the second version of the operating system, the monitoring module updates its maintained owner information into the media store of the terminal.
For the second update opportunity, this step may be: when the update period is reached, the owner information maintained by the monitoring module is updated to the media storage of the terminal. For example, the monitoring module updates the owner information maintained by the monitoring module to the media store once every a first preset time period. The update period may be set and changed as needed, and in the embodiment of the present application, the update period is not particularly limited.
For the third update opportunity, this step may be: when the monitoring module monitors the owner information of the new application data, the monitored owner information of the application data is updated to the media storage.
In some embodiments, the monitoring module actively updates the media store with its maintained owner information; in other embodiments, the update operation of the monitoring module is triggered by the media store; accordingly, the steps may be: when the operating system of the terminal is updated, the media memory sends a first update request to the monitoring module, wherein the first update request is used for requesting the monitoring module to update the owner information maintained by the monitoring module to the media memory; and when the monitoring module receives the first updating request, updating the maintained owner information to the media memory of the terminal. Or when the update period is reached, the media storage sends a second update request to the monitoring module, wherein the second update request is used for requesting the monitoring module to update the owner information maintained by the monitoring module to the media storage; and when the monitoring module receives the second updating request, updating the maintained owner information to the media memory of the terminal.
In some embodiments, the monitoring module deletes locally stored owner information after updating the owner information it maintains to the media store, e.g., the media store notifies the monitoring module to delete locally stored owner information after updating the data list in the database, thereby saving storage space.
Step 204: the owner information of the application data is updated to a data list in a database through the media memory, the data list being used to store the owner information of the application data stored in the external storage space of the terminal.
The owner information comprises an application data identifier and an application program identifier; accordingly, the steps may be: searching an item corresponding to the application data identifier in a data list through a media memory, wherein the item is used for storing the application program identifier; when an entry corresponding to the application data identifier is found, supplementing the application program identifier in an identity possession field in the entry; the identity possession field may be an owner (owner) field. When the item corresponding to the application data identifier is not found, caching the owner information updated by the monitoring module in the media memory; and searching an entry corresponding to the application data identifier in the data list again through the media memory every second preset time period until the entry corresponding to the application data identifier is searched, and supplementing the application program identifier in the identity possession field in the entry.
For example, when the operating system of the terminal is updated from the version before Android 10 and Android 10 to the version after Android 11 and Android 11, the monitoring module updates the owner information of the application data of the external storage space maintained by the monitoring module to the media memory, so that the media memory refreshes the data list of the database thereof and supplements and records the owner information of the application data in the external storage space. For another example, for Android 11 and Android systems with versions after Android 11, a monitoring module monitors the application program installed on the terminal to use an API mode of a non-MediaStore, updates application data in an external storage space, and transmits user information of the application data to the MediaStore for refreshing a data list maintained by the MediaStore so as to supplement owner information of the application data in the external storage space in the data list.
In the embodiment of the application, the monitoring module is newly added in the terminal and is used for maintaining the owner information of the application data in the external storage space and updating the application data in the external storage space maintained by the monitoring module into the data list through the media memory, so that the information recording integrity in the data list is improved, the normal execution of related functions of the owner of the required query file is ensured, and the reliability of the application data is further improved.
Referring to fig. 3, a flowchart of a method for processing application data according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
step 301: the terminal determines an operating system version of the terminal.
In some embodiments, the monitoring modules in the terminals of different versions of the operating system are functionally different; therefore, in the step, the operating system version of the terminal is determined, and the monitoring module is subsequently called at different occasions based on different operating system versions. The operating system of the terminal can be an Android operating system, and correspondingly, the version of the operating system can be an Android version number; for example, the operating system of the terminal may be Android10 or Android 9.
Step 302: the terminal monitors an update operation of application data of the application program in the external storage space based on the operating system version.
And under the condition that the operating system version of the terminal is the first version, the terminal monitors the updating operation of the application data in the external storage space through a plurality of updating modes, and the owner information of the application data in the external storage space is not recorded in the operating system of the first version. The first version may be Android 10 and a version prior to Android 10. The plurality of updating modes comprise an API mode of the MediaStore, an SAF mode, other modes of using relative rights of reading and writing the external storage space, and the like.
And when the operating system version of the terminal is the second version, monitoring the updating operation of the application data in the external storage space updated by a target updating mode, wherein the target updating mode is other updating modes except the API of the media memory, and the owner information of the application data updated in the external storage space through the application program interface of the media memory is recorded in the operating system of the second version. In some embodiments, when the application data in the external storage space is updated through the API mode of the media memory, the media memory will acquire the owner information of the application data, and update the owner information to the data list in the database; therefore, in this step, when the application data in the external storage space is updated by other updating methods, the monitoring module will acquire the owner information of the application data, so as to avoid redundancy of the owner information.
In this embodiment of the present application, since the target update manner other than the API of the MediaStore may be, for example, monitoring by using SAF or other related authority that uses the read-write external storage space, to store or delete the update operation of the application data in the external storage space, when the update operation is monitored, the monitoring module maintains the owner information of the application data, and updates the owner information of the application data to the data list of the database, thereby increasing a data access supporting manner (that is, a data read-write manner using the API of the MediaStore), and improving the flexibility of the read-write manner of the owner information of the application data.
In addition, as the owner information of the application data of the complete external storage space is stored in the data list, the data list supports the API mode of the MediaStore to access, so that even if a subsequent user withdraws the relative permission of the application program for reading and writing the external storage space, the application program can acquire the owner information of the application data without using the SAF mode, thereby avoiding adding extra user interaction, but uses the API mode of the MediaStore to access the application data stored by the application program based on the owner information of the application data stored in the data list.
Step 303: and when the updating operation is monitored, the terminal calls a monitoring module in the terminal.
The update operation includes a storage operation and a deletion operation; accordingly, the steps may be: when the storage operation of the application data of the external storage space is monitored, the terminal calls a monitoring module; or when the deleting operation of the application data of the external storage space is monitored, the terminal calls the monitoring module. When the application data is stored in the external storage space in the form of a file, the terminal calls the monitoring module when the application program creates the application file in the external storage space; or when the application program deletes the application file in the external storage space, the terminal calls the monitoring module.
In some embodiments, the monitoring module is invoked when the terminal monitors an update operation to update application data in the external storage space in any one of a plurality of update manners, in the case that the operating system version of the terminal is the first version. And when the terminal detects the updating operation of updating the application data in the external storage space in the target updating mode under the condition that the operating system version of the terminal is the second version, the monitoring module is invoked.
Step 304: and the terminal updates the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module.
In some embodiments, this step is the same as step 202, and will not be described here again.
Step 305: the terminal updates the owner information maintained by the monitoring module to a media memory of the terminal, and the media memory is provided with a database.
In some embodiments, this step is the same as step 203, and will not be described here again.
Step 306: the terminal updates the owner information of the application data to a data list in a database through the media memory, the data list being used for storing the owner information of the application data stored in an external storage space of the terminal.
In some embodiments, this step is the same as step 204, and will not be described here again.
In the embodiment of the application, for the first version (Android 10) and the terminal of the operating system before the first version, the owner information of the application data of the external storage space is not recorded in the terminal; therefore, the monitoring module monitors the updating operation of the application data in the external storage space through various updating modes, so that the integrity of the owner information of the application data is improved, namely, the owner information of the application data stored by the application program under the Android 10 and the operating system of the previous version of the Android 10 can be embodied in the data list of the MediaStore database.
For the terminal of the second version (Android 11) and the operating system after the second version, since the owner information of the application data in the external storage space is recorded in the terminal, the update operation of the application data in the external storage space is monitored by the monitoring module by the target update mode (other update modes except the API of the MediaStore), so that redundant monitoring of the owner information of the application data is avoided, and the owner information of the application data stored in the external storage space without using the update mode of the MediaStore API can be also embodied in the data list of the MediaStore database.
Since the related art is directed to a terminal in which an operating system version is the first version or before the first version, a data list of the terminal does not record owner information of application data of an external storage space; in the embodiment of the application, a monitoring module is added in the terminal, the monitoring module maintains the owner information of the application data of the external storage space, and updates the maintained owner information to the data list, so that the application supports the owner information of the application data of the external storage space in the old version system. The terminal of the old version system records the owner information of the application data of the external storage space, so that the compatibility of the MediaStore mechanism to the system upgrading scene (especially from Android 10 to Android 11) is improved.
In the embodiment of the application, the owner information of the application data of the complete external storage space is stored in the data list of the MediaStore database; therefore, the method and the device can simplify the read-write flow of the application program to the application data in the external storage space created when the application program does not support the mediaStore after the operating system is upgraded, and even if the operating system of the terminal is upgraded to the version after the Android10, the application program can read and write the application data stored under the Android10 and the system of the previous version of the application program through the API of the mediaStore under the condition that the application program does not apply for obtaining the relative permission of reading and writing the external storage and additional interaction is not added by using the SAF, so that the APP reconstruction workload of an application developer caused by the system upgrade is reduced.
Referring to fig. 4, a flowchart of a method for processing application data according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
step 401: and under the condition that the operating system version is the first version, the terminal monitors the updating operation of updating the application data in the external storage space through a plurality of updating modes.
Owner information of application data of the external storage space is not recorded in the first version of the operating system. The various updating modes include an API mode of the MediaStore, SAF and other modes of using relative rights of reading and writing the external storage space.
Step 402: and when the updating operation is monitored, the terminal calls a monitoring module in the terminal.
The first version may be Android10 or a version before Android 10; for example, for Android10 and terminals of operating systems of previous versions of Android10, when an application program (e.g., APP 1) in the terminal calls a system API (e.g., filereadeeapi 1) to create a common file (e.g., file 1) in the external storage space, the filereadeeapi 1 is called, resulting in triggering the monitoring module (fileRecord).
Step 403: and the terminal updates the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module.
The owner information of the application data includes an application data identification and an application program identification. In the case that the application data is stored in the external storage space in the form of an application file, the application data identifier may be an application file identifier; the application identification may be a package name of the application. For example, the monitoring module (fileRecord) records the package name of APP1 (e.g., APP1 ID) and the file identification of the application file (e.g., file1 ID) and the association relationship between the two; the information form recorded by the monitoring module (fileRecord) on the single application file is { file1ID, APP1ID }; the monitoring module (fileRecord) records and maintains owner information of application files (typically public files) created by application programs on the external storage space, wherein the recorded information is in the form of { { file1ID, APP1ID }, …, { fileend ID, appn ID }. When an application file in the external storage space is deleted, the monitoring module (fileRecord) deletes the owner information { fileid, appndid } of the corresponding file it records.
Step 404: when the operating system of the terminal is updated, the terminal updates the owner information maintained by the monitoring module to a media memory of the terminal, and the media memory is provided with a database.
For example, when the operating system is upgraded from Android 10 and a version before Android 10 to Android11 and a version after Android11, the monitoring module (fileRecord) passes the owner information of the application files it records and maintains { { file1ID, APP1ID }, …, { fileid, appid } }, to the mediaStore.
Step 405: the terminal updates the owner information of the application data to a data list in a database through the media memory, the data list being used for storing the owner information of the application data stored in an external storage space of the terminal.
For example, mediaStore refreshes the Files data table of its database, and based on { { file1ID, APP1ID }, …, { file ID, appn ID }, looks up the corresponding entry of file1ID in Files data table one by one according to file identification file1ID, and supplements and records file owner information APP1ID in the owner field of the entry. After the MediaStore has completed refreshing the Files data table, it notifies the fileRecorder, which then deletes the { { file1ID, APP1ID }, …, { fileend ID, appid } }, maintained by the fileRecorder.
In the embodiment of the application, for the first version (Android 10) and the terminal of the operating system before the first version, the owner information of the application data of the external storage space is not recorded in the terminal; therefore, the monitoring module monitors the updating operation of the application data in the external storage space through various updating modes, so that the integrity of the owner information of the application data is improved, namely, the owner information of the application data stored by the application program under the Android 10 and the operating system of the previous version of the Android 10 can be embodied in the data list of the MediaStore database.
Referring to fig. 5, a flowchart of a method for processing application data according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
step 501: and under the condition that the operating system version of the terminal is the second version, the terminal monitors the updating operation of updating the application data in the external storage space in a target updating mode.
The target update method is other update methods than the application program interface of the media storage, and the owner information of the application data updated in the external storage space through the application program interface of the media storage is recorded in the second version of operating system.
Step 502: and when the updating operation is monitored, the terminal calls a monitoring module in the terminal.
For example, in a terminal of an operating system of a later version of Android 10, a certain application (denoted APP 2) uses a mode of reading and writing related rights of external storage or SAF and the like to call a corresponding file creation API (denoted filereadeapi 2), a public file (denoted file 2) is created under a public directory of an external storage space, and the filereadeapi 2 is called, resulting in triggering of a fileRecorder.
Step 503: and the terminal updates the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module.
The owner information of the application data includes an application data identification and an application program identification. In the case that the application data is stored in the external storage space in the form of an application file, the application data identifier may be an application file identifier; the application identification may be a package name of the application. For example, the fileRecorder queries the package name of APP2 (denoted as APP2 ID), and the file identification of file2 (denoted as file2 ID).
Step 504: when the update period is reached, the terminal updates the owner information maintained by the monitoring module to a media memory of the terminal, and the media memory is provided with a database.
Step 505: the terminal updates the owner information of the application data to a data list in a database through the media memory, the data list being used for storing the owner information of the application data stored in an external storage space of the terminal.
In some embodiments, the fileRecorder passes { file2ID, APP2ID } to a Files data table whose database is refreshed MediaStore, mediaStore, and looks up whether there is a corresponding entry for the file2ID in the Files data table based on the { file2ID, APP2ID } received. If so, supplementing and recording an APP2ID in an owner field of a data table entry corresponding to the file 2ID; if not, the MediaStore caches { file2ID, APP2ID } for a period of time, and updates the file2ID entry wner field until the existence of the file corresponding to the file2ID is queried; or the fileRecorder sends new file2ID information covering the original { file2ID, APP2ID }.
In this embodiment of the present application, for the terminal of the second version (Android 11) and the operating system after the second version, since the owner information of the application data in the external storage space is recorded in the terminal, the update operation of the application data in the external storage space is monitored by the monitoring module by the target update method (other update methods except for the API of the MediaStore), so that redundant monitoring of the owner information of the application data is avoided, so that the owner information of the application data stored in the external storage space without using the update method of the MediaStore API may also be embodied in the data list of the MediaStore database.
Referring to fig. 6, a flowchart of a method for processing application data according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
step 601: when an application program installed on the terminal updates application data in an external storage space of the terminal, the terminal calls a monitoring module in the terminal.
In some embodiments, this step is the same as step 201, and will not be described here again.
Step 602: and the terminal updates the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module.
In some embodiments, this step is the same as step 202, and will not be described here again.
Step 603: the terminal updates the owner information maintained by the monitoring module to a media memory of the terminal, and the media memory is provided with a database.
In some embodiments, this step is the same as step 203, and will not be described here again.
Step 604: the terminal updates the owner information of the application data to a data list in a database through the media memory, the data list being used for storing the owner information of the application data stored in an external storage space of the terminal.
In some embodiments, this step is the same as step 204, and will not be described here again.
Step 605: when a query request is received, the terminal searches corresponding application data from an external storage space based on the owner information carried by the query request and the owner information stored in the data list.
In some embodiments, when a user wants to uninstall an application, a query request is triggered to a terminal, the query request carrying owner information of application data to be queried; the terminal searches corresponding owner information from the data list based on the query request, searches corresponding application data in the external storage space based on the owner information, and deletes the searched application data, so that the application data stored in the external storage space can be queried, the comprehensiveness of the queried application data is improved, and the unloading cleanliness is further improved.
Referring to fig. 7, a block diagram of an apparatus for processing application data according to an exemplary embodiment of the present application is shown, where the apparatus includes:
a calling module 701, configured to call a monitoring module in the terminal when an application program installed on the terminal updates application data in an external storage space of the terminal;
a first updating module 702, configured to update, by the monitoring module, owner information of the application data in the external storage space maintained by the monitoring module;
A second updating module 703, configured to update the owner information maintained by the monitoring module to a media memory of the terminal, where the media memory has a database;
a third updating module 704, configured to update, through the media storage, the owner information of the application data to a data list in the database, where the data list is used to store the owner information of the application data stored in the external storage space of the terminal.
In some embodiments, the calling module 701 is configured to determine an operating system version of the terminal; based on the version of the operating system, monitoring the update operation of the application data of the application program in the external storage space; and when the updating operation is monitored, a monitoring module in the terminal is called.
In some embodiments, the invoking module 701 is configured to monitor an update operation of updating the application data in the external storage space in multiple update manners when the operating system version is a first version, where owner information of the application data in the external storage space is not recorded in the operating system of the first version.
In some embodiments, the calling module 701 is configured to monitor, when the operating system version of the terminal is the second version, an update operation of updating the application data in the external storage space by a target update mode, where the target update mode is another update mode except for an application program interface API of the media storage, and owner information of the application data updated in the external storage space by the API of the media storage is recorded in the second version operating system.
In some embodiments, the second updating module 703 is configured to update the owner information maintained by the monitoring module to the media storage of the terminal when the operating system of the terminal is updated; or,
a second updating module 703, configured to update the owner information maintained by the monitoring module to the media storage of the terminal when the update period is reached.
In some embodiments, the third update module 704 is configured to include an application data identification and an application program identification; searching an item corresponding to the application data identifier in a data list through a media memory, wherein the item is used for storing the application program identifier; and when the entry corresponding to the application data identifier is found, supplementing the application program identifier in the identity possession field in the entry.
In some embodiments, the third updating module 704 is further configured to cache, in the media storage, the owner information updated by the monitoring module when no entry corresponding to the application data identifier is found; and searching the corresponding item of the application data identifier in the data list again through the media memory every preset time period until the corresponding item of the application data identifier is searched, and supplementing the application program identifier in the identity possession field in the item.
In some embodiments, the first updating module 702 is configured to record owner information of stored application data when an application program installed on the terminal stores the application data in an external storage space of the terminal; or,
the first updating module 702 is configured to delete owner information of deleted application data when an application program installed on the terminal deletes the application data in an external storage space of the terminal.
In the embodiment of the application, the monitoring module is newly added in the terminal and is used for maintaining the owner information of the application data in the external storage space and updating the application data in the external storage space maintained by the monitoring module into the data list through the media memory, so that the information recording integrity in the data list is improved, the normal execution of related functions of the owner of the required query file is ensured, and the reliability of the application data is further improved.
It should be noted that, when the processing device for application data provided in the foregoing embodiment processes application data, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the processing device for application data provided in the above embodiment and the processing method embodiment for application data belong to the same concept, and the specific implementation process is detailed in the method embodiment, which is not repeated here.
Referring to fig. 8, a block diagram of a terminal 800 according to an exemplary embodiment of the present application is shown. The terminal 800 in this application includes one or more of the following components: a processor 810, a memory 820, and a display 830.
Processor 810 may include one or more processing cores. The processor 810 connects various parts within the overall terminal 800 using various interfaces and lines, performs various functions of the terminal 800 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 820, and invoking data stored in the memory 820. Alternatively, the processor 810 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 810 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a Neural network processor (Neural-network Processing Unit, NPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen 830; the NPU is used to implement artificial intelligence (Artificial Intelligence, AI) functionality; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 810 and may be implemented on a single chip.
The Memory 820 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 820 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 820 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 820 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc.; the storage data area may store data (e.g., audio data, phonebook) created according to the use of the terminal 800, etc.
The display 830 is a display component for displaying a user interface. Alternatively, the display 830 is a display with a touch function, through which a user can perform a touch operation on the display 830 using any suitable object such as a finger, a stylus, or the like.
The display 830 is typically provided on the front panel of the terminal 800. The display screen 830 may be designed as a full screen, a curved screen, a contoured screen, a double-sided screen, or a folded screen. The display 830 may also be designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which is not limited in this embodiment.
In addition, those skilled in the art will appreciate that the structure of the terminal 800 illustrated in the above-described figures does not constitute a limitation of the terminal 800, and the terminal 800 may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. For example, the terminal 800 further includes an audio acquisition device, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, wi-Fi) module, a power supply, a bluetooth module, and the like, which are not described herein.
The embodiments of the present application also provide a computer readable medium storing at least one program code loaded and executed by the processor to implement the method for processing a sound signal as shown in the above embodiments.
The embodiments of the present application also provide a computer program product storing at least one program code loaded and executed by the processor to implement the method for processing a sound signal as shown in the above embodiments.
In some embodiments, the computer program product according to the embodiments of the present application may be deployed to be executed on one user terminal, or executed on a plurality of user terminals located at one site, or executed on a plurality of user terminals distributed at a plurality of sites and interconnected by a communication network, where a plurality of user terminals distributed at a plurality of sites and interconnected by a communication network may constitute a blockchain system.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.

Claims (12)

1. A method for processing application data, the method comprising:
when an application program installed on a terminal updates application data in an external storage space of the terminal, calling a monitoring module in the terminal;
Updating, by the monitoring module, owner information of the application data in the external storage space maintained by the monitoring module;
updating owner information maintained by the monitoring module to a media memory of the terminal, wherein the media memory is provided with a database;
and updating the owner information of the application data into a data list in the database through the media memory, wherein the data list is used for storing the owner information of the application data stored in an external storage space of the terminal.
2. The method of claim 1, wherein invoking the monitoring module in the terminal when the application installed on the terminal updates application data in the external storage space of the terminal comprises:
determining an operating system version of the terminal;
based on the operating system version, monitoring the updating operation of the application data of the application program in the external storage space;
and when the updating operation is monitored, a monitoring module in the terminal is called.
3. The method of claim 2, wherein the monitoring the update operation of the application data of the application program in the external storage space based on the operating system version comprises:
And under the condition that the operating system version is the first version, monitoring the updating operation of updating the application data in the external storage space through a plurality of updating modes, wherein the owner information of the application data in the external storage space is not recorded in the operating system of the first version.
4. The method of claim 2, wherein the monitoring the update operation of the application data of the application program in the external storage space based on the operating system version comprises:
and under the condition that the operating system version of the terminal is a second version, monitoring the updating operation of updating the application data in the external storage space through a target updating mode, wherein the target updating mode is other updating modes except for an application program interface API of the media memory, and the owner information of the application data updated in the external storage space through the API of the media memory is recorded in the operating system of the second version.
5. The method of claim 1, wherein the updating the owner information maintained by the monitoring module to the media storage of the terminal comprises:
Updating the owner information maintained by the monitoring module to a media memory of the terminal when the operating system of the terminal is updated; or,
and when the updating period is reached, updating the owner information maintained by the monitoring module to the media memory of the terminal.
6. The method according to claim 1 or 5, wherein said updating, via said media store, owner information of said application data into a data list in said database comprises:
the owner information comprises an application data identifier and an application program identifier; searching an entry corresponding to the application data identifier in the data list through the media memory, wherein the entry is used for storing the application program identifier;
and when the item corresponding to the application data identifier is found, supplementing the application program identifier in an identity possession field in the item.
7. The method of claim 6, wherein the method further comprises:
when no item corresponding to the application data identifier is found, caching the owner information updated by the monitoring module in the media memory;
And searching an entry corresponding to the application data identifier in the data list again through the media memory every preset time period until the entry corresponding to the application data identifier is searched, and supplementing the application program identifier in an identity possession field in the entry.
8. The method of claim 1, wherein updating, by the monitoring module, owner information of application data in the external storage space maintained by the monitoring module comprises:
when an application program installed on the terminal stores application data in an external storage space of the terminal, recording owner information of the stored application data; or,
and deleting the owner information of the deleted application data when the application program installed on the terminal deletes the application data in the external storage space of the terminal.
9. An apparatus for processing application data, the apparatus comprising:
the calling module is used for calling the monitoring module in the terminal when the application program installed on the terminal updates the application data in the external storage space of the terminal;
the first updating module is used for updating the owner information of the application data in the external storage space maintained by the monitoring module through the monitoring module;
The second updating module is used for updating the owner information maintained by the monitoring module to a media memory of the terminal, and the media memory is provided with a database;
and a third updating module, configured to update, through the media storage, the owner information of the application data to a data list in the database, where the data list is used to store the owner information of the application data stored in an external storage space of the terminal.
10. A terminal comprising one or more processors and one or more memories, the one or more memories having stored therein at least one program code loaded and executed by the one or more processors to implement the method of processing application data as claimed in any of claims 1 to 8.
11. A computer readable storage medium, characterized in that at least one program code is stored in the storage medium, which is loaded and executed by a processor to implement the method of processing application data according to any one of claims 1 to 8.
12. A computer program product, characterized in that the computer program product stores at least one piece of program code for execution by a processor for implementing the method of processing application data according to any one of claims 1 to 8.
CN202311749411.6A 2023-12-18 2023-12-18 Application data processing method, device, equipment, storage medium and product Pending CN117688556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311749411.6A CN117688556A (en) 2023-12-18 2023-12-18 Application data processing method, device, equipment, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311749411.6A CN117688556A (en) 2023-12-18 2023-12-18 Application data processing method, device, equipment, storage medium and product

Publications (1)

Publication Number Publication Date
CN117688556A true CN117688556A (en) 2024-03-12

Family

ID=90136855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311749411.6A Pending CN117688556A (en) 2023-12-18 2023-12-18 Application data processing method, device, equipment, storage medium and product

Country Status (1)

Country Link
CN (1) CN117688556A (en)

Similar Documents

Publication Publication Date Title
CN102349062B (en) Method and system for synchronizing browser caches across devices and web services
US10140113B2 (en) Data processing method and device of preset application after upgrading
CN110569130B (en) Cross-process communication method, device and equipment
KR101224721B1 (en) System and method for a context-awareness platform
US8342960B2 (en) Information processor
CN108614976A (en) Authority configuring method, device and storage medium
CN113791813A (en) Method and terminal for updating SELinux security policy
WO2022156484A1 (en) Media data processing method and apparatus, and terminal device
CN111666516A (en) Page loading method and device, electronic equipment and storage medium
CN113868156B (en) System upgrade power-down protection method, electronic device and storage medium
CN113220669A (en) Service data processing method and device and electronic equipment
CN116737214A (en) Upgrade method of operating system, electronic equipment and storage medium
CN105447349A (en) Method and device for protecting derived symbol in so file
CN116400938B (en) Operating system upgrading method, device and storage medium
CN113326078A (en) Method, equipment and storage medium for dynamically updating software development kit
CN116719670B (en) Data processing method, electronic device and readable storage medium
CN115113989B (en) Transaction execution method, device, computing equipment and storage medium
CN117688556A (en) Application data processing method, device, equipment, storage medium and product
CN116628773A (en) Data processing method, device, electronic equipment and storage medium
CN109901849A (en) Application program installation method, device, electronic equipment and storage medium
CN114721699B (en) Mirror image upgrading method and device, electronic equipment and storage medium
CN116662101B (en) Fault restoration method of electronic equipment and electronic equipment
WO2024022176A1 (en) System operation method and terminal apparatus
CN118120212A (en) File deduplication method, device and equipment
CN116954680A (en) Plug-in updating method, device, equipment, medium and program product of storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination