WO2024067167A1 - 应用数据管理方法、设备、产品及介质 - Google Patents

应用数据管理方法、设备、产品及介质 Download PDF

Info

Publication number
WO2024067167A1
WO2024067167A1 PCT/CN2023/119139 CN2023119139W WO2024067167A1 WO 2024067167 A1 WO2024067167 A1 WO 2024067167A1 CN 2023119139 W CN2023119139 W CN 2023119139W WO 2024067167 A1 WO2024067167 A1 WO 2024067167A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
application
category
files
interface
Prior art date
Application number
PCT/CN2023/119139
Other languages
English (en)
French (fr)
Inventor
毕晟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024067167A1 publication Critical patent/WO2024067167A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions

Definitions

  • the present application relates to the field of terminals, and in particular to an application data management method, device, product and medium.
  • the terminal After obtaining the storage permission of the terminal, multiple applications can read and write files in the storage space of the terminal at will, resulting in the terminal operating system being unable to distinguish which application the files stored in the terminal come from, and being unable to distinguish between cache files and user-saved media files (such as pictures, videos, and audio) and other file categories.
  • the terminal is unable to classify the files in the storage space by the application to which they belong or by file category, so when the user manages the storage space, for example, when the user needs to delete pictures saved by a certain application, he needs to pay attention to whether the files in the storage space belong to the application one by one, and whether the file category is a picture, which increases the difficulty of operation.
  • operators of third-party cleanup applications can regularly analyze the applications and types to which files in the storage space belong, and generate analysis rules based on the analysis results, so that the third-party cleanup application can obtain the file category and application to which each file belongs after scanning the terminal storage space.
  • the present application provides an application data management method, device, product and medium.
  • an application data management method is provided, which is applied to a terminal device, the method comprising: when a first operation for accessing a file of the terminal device is detected, a first interface is displayed, the first interface including a first application list, and the applications in the first application list are applications to which the files of the terminal device belong; when a second operation of selecting a first application in the first application list is detected, a second interface is displayed, the second interface including a first file category list, the file categories in the first file category list are file categories to which the files of the first application belong, and the file categories in the first file category list are part or all of a plurality of file categories preset by the system of the terminal device; when a third operation of selecting a first file category in the first file category list is detected, a third interface is displayed, and the third interface includes files of the first application belonging to the first file category.
  • the terminal device when the user manages files in the terminal device, the terminal device can first display the application list, and after the user selects an application, display the file category list of the application, and then the user can manage the files under a certain file category of the application.
  • the preset file categories include private files and public files.
  • Public files also include videos, audios, pictures taken by the camera, files received or downloaded over short distances, other pictures, and documents, among which other pictures are pictures not taken by the camera and pictures not received or downloaded over short distances.
  • users can manage files based on the application list and file category list displayed on the terminal device, for example, perform operations such as deletion and sharing, without the need for users to distinguish the applications and file categories to which each file belongs. Users can directly select files of the target file category under the target application that needs to be managed based on the application list and file category list.
  • the terminal device can display the files according to the same file category.
  • the terminal device may not display the file category. Therefore, there will be no problem of different file classification methods under each application, and users will not need to understand the purpose and/or source of files under each category when managing data of different applications, making it more convenient for users to manage files in terminal devices.
  • a fourth interface when a fourth operation of selecting a second application in the first application list is detected, a fourth interface is displayed, the fourth interface includes a second file category list, the file category in the second file category list is the file category to which the files of the second application belong, and the file category in the second file category list is part or all of the multiple file categories preset by the system; ...
  • a fifth operation is performed on the second file category in the second file category list, a fifth interface is displayed, and the fifth interface includes files of the second application belonging to the second file category.
  • the terminal device when the terminal device receives the user's request to manage the files of the second application, the files of the second application will also be classified and displayed according to the file categories preset by the system. In other words, the terminal device can classify and display the files of different applications according to the same file category. Therefore, when the user manages the files of different applications, they select files based on the same classification method. This method avoids the need for users to spend more time to understand the file classification methods of different applications when managing the files of the application. Through this method, users can obtain file management for different applications according to the same file classification, which improves the efficiency of users in managing terminal device files.
  • the first application list and the first file category list are determined based on an information record table of the terminal device, where the information record table includes a unique identifier of an application to which a file of the terminal device belongs and a file category to which the file belongs.
  • the terminal device will save the application and file category of the file in the terminal device into the information record table, wherein the information record table may also include the unique identifier of the file, such as the absolute path of the file, the size of the file, the time when the file was created, etc. Furthermore, the application and file category to which the file belongs can be determined according to the information record table.
  • the user wants to manage the file, the user can view the file according to the application and file category to which the file belongs, and then manage the file, making it more convenient for the user to manage the files in the terminal device, thereby improving the user experience.
  • the method also includes: detecting a sixth operation of writing the first file to a terminal device; in response to the sixth operation, obtaining a unique identifier of an application to which the first file belongs and determining a file category to which the first file belongs, wherein the file category to which the first file belongs is one of a plurality of file categories preset by the system; and recording the unique identifier of the application to which the first file belongs and the file category to which the first file belongs in an information recording table.
  • the terminal device when the application writes a file to the terminal device, the terminal device will determine the application to which the written file belongs and the file category of the written file. Then, the terminal device can save the application to which the written file belongs and the file category in the information record table.
  • the user wants to manage the file, the user can view the file classification according to the application and file category to which the file belongs, so that the user can obtain a more accurate and intuitive file classification, and the user is more convenient when managing files in the terminal device.
  • the method also includes: detecting a sixth operation of writing the first file to the terminal device includes detecting a sixth operation of writing the first file to the terminal device by calling the first file write interface; obtaining a unique identifier of an application to which the first file belongs includes obtaining a unique identifier of the application that calls the first file write interface; and/or determining a file category to which the first file belongs includes determining the file category corresponding to the first file write interface as the file category to which the first file belongs, wherein multiple file categories preset by the system correspond to one file write interface respectively; or determining the file category indicated by a category parameter of the first file write interface as the file category to which the first file belongs, wherein multiple file categories preset by the system correspond to one category parameter of the first file interface respectively.
  • the application when writing a file, the application will call the file writing interface of the corresponding file category, or different parameters of the file writing interface according to the file category of the written file. That is, different file writing interfaces are provided for different file categories, or different parameters of the file writing interface are provided.
  • the file writing interface may include a privacy file writing interface and a public file writing interface
  • the public file writing interface also includes a video writing sub-interface, an audio writing sub-interface, a camera-shot picture writing sub-interface, a short-distance received or downloaded file writing sub-interface, other picture writing interfaces, and a document writing sub-interface.
  • the public file writing interface also includes different parameters such as video, audio, pictures taken by the camera, short-distance received or downloaded files, other picture documents, etc.
  • the terminal device also provides corresponding reading interfaces of the above interfaces, for example, a privacy file reading interface and a public file reading interface, and the public file reading interface also includes a video reading sub-interface, an audio reading sub-interface, a camera-shot picture reading sub-interface, a short-distance received or downloaded file reading sub-interface, other picture reading sub-interfaces, and a document reading sub-interface.
  • the terminal device can determine the file category of the written file through the file writing interface or the parameters of the file writing interface used by the application program to write the file. Therefore, there will not be the problem of different file classification methods under each application program, and the problem that users need to understand the purpose and/or source of files under each classification when managing files of different applications.
  • users can obtain more accurate and intuitive file classification, making it more convenient for users to manage files in terminal devices.
  • the first file writing interface is located at a framework layer of the terminal device.
  • the first file writing interface may be an interface provided to the application by a public file reading and writing framework or a private file reading and writing framework located in the terminal device framework layer.
  • the method further includes: detecting a seventh operation of uninstalling the first application; determining multiple files of the first application according to unique identifiers of applications to which the multiple files in the information record table belong; and uninstalling the multiple files of the first application according to the multiple files in the information record table.
  • the file category and file size of the file determine the storage space occupied by files of different file categories in the files of the first application; and display the storage space occupied by files of different file categories in the files of the first application.
  • the terminal device when the user uninstalls the application, can obtain the storage space size occupied by files under different categories of the application to be uninstalled according to the information record table, and then display the storage space size occupied by files of different categories of the application, so that the user can choose to keep or delete files of different categories of the application when uninstalling the application, to prevent the user from losing files due to uninstalling the application.
  • an application data management method is provided, which is applied to a terminal device, and is characterized in that the method includes: when a first operation for accessing a file of the terminal device is detected, a first interface is displayed, the first interface includes a first file category list, the file categories in the first file category list are file categories to which the files of the terminal device belong, and the file categories in the first file category list are part or all of a plurality of file categories preset by the system of the terminal device; when a second operation of selecting a first file category in the first file category list is detected, a second interface is displayed, the second interface includes a first application list, the applications in the first application list are applications to which the files in the first file category list belong; when a third operation of selecting a first application in the first application list is detected, a third interface is displayed, the third interface includes files of the first file category belonging to the first application.
  • the terminal device when the user manages files in the terminal device, the terminal device can first display a file category list, and after the user selects a certain file category, it displays the application with files of that file category, and then the user can manage the files under a certain file category of a certain application. Furthermore, based on the application list and file category list displayed by the terminal device, the user can manage the files, for example, delete, share, etc., without the user having to distinguish the application and file category to which each file belongs. The user can directly select the target file category under the target application to be managed based on the application list and file category list.
  • the terminal device can display the files according to the same file category.
  • the terminal device may not display the file category. Therefore, there will be no problem of different file classification methods under each application, and users will not need to understand the purpose and/or source of files under each category when managing data of different applications, making it more convenient for users to manage files in terminal devices.
  • the first application list and the first file category list are determined based on an information record table of the terminal device, where the information record table includes a unique identifier of an application to which a file of the terminal device belongs and a file category to which the file belongs.
  • the method also includes: detecting a fourth operation of writing the first file to a terminal device; in response to the fourth operation, obtaining a unique identifier of an application to which the first file belongs and determining a file category to which the first file belongs, wherein the file category to which the first file belongs is one of a plurality of file categories preset by the system; and recording the unique identifier of the application to which the first file belongs and the file category to which the first file belongs in an information recording table.
  • the method also includes: detecting a fourth operation of writing the first file to the terminal device includes detecting a fourth operation of writing the first file to the terminal device by calling the first file write interface; obtaining the unique identifier of the application to which the first file belongs includes: obtaining the unique identifier of the application that calls the first file write interface; and/or determining the file category to which the first file belongs includes: determining the file category corresponding to the first file write interface as the file category to which the first file belongs, wherein multiple file categories preset by the system respectively correspond to a file write interface; or, determining the file category indicated by the category parameter of the first file write interface as the file category to which the first file belongs, wherein multiple file categories preset by the system respectively correspond to a category parameter of the first file interface.
  • the first file writing interface is located at a framework layer of the terminal device.
  • the method also includes: detecting a fifth operation of uninstalling the first application; determining multiple files of the first application based on the unique identifier of the application to which the multiple files in the information recording table belong; determining the size of storage space occupied by files of different file categories in the files of the first application based on the file categories and file sizes of the multiple files of the first application in the information recording table; and displaying the sizes of storage space occupied by files of different file categories in the files of the first application.
  • a method for detecting a first operation of writing a first file to a terminal device; in response to the first operation, obtaining a unique identifier of an application to which the first file belongs and determining a category to which the first file belongs, wherein the category to which the first file belongs is one of a plurality of categories preset by a system of the terminal device; and recording the unique identifier of the application to which the first file belongs and the file category to which the first file belongs.
  • the terminal device when the application writes a file to the terminal device, the terminal device will determine the application to which the written file belongs and the file category of the written file. Then, the terminal device can save the application to which the written file belongs and the file category in the information record table.
  • the user wants to manage the file, the user can view the file classification according to the application and file category to which the file belongs, so that the user can obtain a more accurate and intuitive file classification, and the user is more convenient when managing files in the terminal device.
  • the present application provides an electronic device, characterized in that it includes a processor and a memory, the memory is used to store instructions, The processor is used to execute instructions. When the processor executes the instructions, the method described in the first aspect, the second aspect, or the third aspect is performed.
  • the present application provides a computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on an electronic device, the method described in the first aspect, the second aspect, or the third aspect is executed.
  • the present application provides a computer program product, characterized in that the computer program product includes computer instructions, and when executed by an electronic device, the electronic device executes the method described in the first aspect, the second aspect, or the third aspect.
  • the application data management method, device, product and medium provided by the embodiments of the present application set a specified file writing interface in the terminal, and the file category of the file in the storage space can be determined through the interface used when the application writes data, and the application to which the file belongs can be determined according to the unique identifier of the application that writes the file.
  • the terminal device can classify the files in the storage space according to the application, and can also classify the files of each application according to the file category, or classify the files according to the file category, and then classify them according to the application. In this way, the user can manage the files according to the classification results of the files by the terminal 100, which saves human resources and improves the user experience.
  • FIG1 is a schematic diagram of an interface for managing cache garbage provided by an embodiment of the present application.
  • FIG2 is a schematic diagram of an interface for managing files by file category provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of an interface for managing pictures of a terminal provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an interface for managing application files using a third-party cleaning application provided in an embodiment of the present application
  • FIG5 is a schematic diagram of a framework for an application to read and write files provided in an embodiment of the present application
  • FIG. 6 is a schematic diagram of an interface for managing an application program according to a prefabricated file directory provided in an embodiment of the present application
  • FIG7A is a schematic diagram of a hardware structure of a terminal provided in an embodiment of the present application.
  • FIG7B is a schematic diagram of a software structure of a terminal provided in an embodiment of the present application.
  • FIG8 is a flow chart of a method for installing an application program provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of an interface for installing an application provided in an embodiment of the present application.
  • FIG10 is a flow chart of a method for writing data by an application program provided in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an interface of a folder prefabricated in a terminal system provided in an embodiment of the present application.
  • FIG. 12 is a flowchart of a method for managing application files in a terminal according to an embodiment of the present application
  • FIG. 13 is a schematic diagram of an interface for viewing application files provided by a mobile phone manager in an embodiment of the present application
  • FIG14 is a schematic diagram of an interface for managing public files provided in an embodiment of the present application.
  • 15 is a schematic diagram of an interface for sorting public files by application program provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of an interface for viewing public file information provided in an embodiment of the present application.
  • FIG17 is a schematic diagram of an interface for managing public files provided in an embodiment of the present application.
  • FIG18 is a schematic diagram of an interface for deleting a public file provided in an embodiment of the present application.
  • FIG19 is a flow chart of a method for uninstalling an application provided in an embodiment of the present application.
  • FIG20 is a schematic diagram of an interface for uninstalling an application provided in an embodiment of the present application.
  • FIG. 21 is a schematic diagram of the structure of an application data management device provided in an embodiment of the present application.
  • Illustrative embodiments of the present application include, but are not limited to, application data management methods, apparatus, products, and media.
  • the application can access the storage space of the terminal memory at will. Furthermore, the application can create folders in the storage space to save the cache generated by the application when the application is running (such as page information of the browsed web pages) and media files saved by the user through the application (such as pictures, videos, and audio), etc. In addition, the application can also write the above data to the folder established by the terminal operating system. For example, the application writes the generated pictures to the system album, and the user can You can view the pictures generated by all applications through the terminal's built-in album software.
  • multiple applications installed on the terminal can arbitrarily read and write files in the terminal's storage space, causing the user and the terminal operating system to be unable to distinguish which application the files stored in the terminal come from, and unable to distinguish which files are system files and which files are cache files, making it impossible for users to conveniently manage the storage space. For example, it is impossible to conveniently delete files to free up storage space. When users cannot conveniently delete files in the storage space, more and more files will be in the terminal storage space, a large number of residual files will occupy the storage space, the terminal's available storage space will become less and less, and the terminal's system will become slower and slower.
  • the operator of a third-party cleaning application regularly analyzes the file categories of files in the storage space, and generates analysis rules based on the analysis results.
  • the terminal storage space is scanned by the third-party cleaning application, and the scanned files are analyzed according to the above analysis rules to obtain the file category of each file and the application to which the file belongs.
  • the third-party cleaning application can analyze whether the file belongs to the source code of the application, a cache file, or a media file according to the analysis rules, and display the analysis results to the user. Then, the user can manage the storage space through the results of the scanning and analysis of the third-party cleaning application.
  • a third-party cleaning application can scan the storage space of the mobile phone 10, analyze the purpose of each file in the storage space of the mobile phone 10, and display the cache files stored in the mobile phone 10.
  • Figure 1 exemplarily shows an interface 101 in which a third-party cleaning application in the mobile phone 10 displays the scanned cache files.
  • the display box 1011 in the interface 101 shows that there is a total of 86.3 megabytes (MB) of cache garbage in the mobile phone 10.
  • the cache garbage is temporary data generated by the operating system of the mobile phone 10 when running the application, such as the data of the browsed web pages.
  • the cache garbage is also specifically divided into mobile phone cache garbage, system cache garbage and cloud space garbage.
  • the mobile phone cache garbage includes cache files generated by all applications in the mobile phone 10 during operation
  • the system cache includes cache files generated during the operation of the mobile phone 10 operating system
  • the cloud space garbage includes cache files in the files stored by the mobile phone 10 in the cloud server.
  • the third-party cleaning application will also scan the media files such as audio, pictures and videos generated by the application in the mobile phone 10.
  • the display box 1012 in the interface 101 shows that after the deep detection of the mobile phone 10, it is determined that there are 97.8MB of media files stored in the mobile phone 10. The user can delete the cached garbage and the deep detected files by clicking the control 1013.
  • the third-party cleaning application may further classify the scanned media files according to file categories.
  • the media files in the mobile phone 10 may be classified into pictures, videos, audios, large files, applications, and installation packages.
  • the interface 102 displayed by the third-party cleaning application in the mobile phone 10 includes a display box 1021, and the user may manage the files according to the classification of the files in the display box 1021.
  • the third-party cleaning application since the application can write the above media files into any folder at will, the third-party cleaning application only classifies the files according to the file category, for example, according to the file suffix (for example: .jpg, .avi or .exe) and according to the data size of the file, and the third-party cleaning application cannot analyze which application each file specifically comes from. For example, when the user clicks the icon corresponding to the picture in the display box 1021 in Figure 2, the third-party cleaning application will display the interface 103 shown in Figure 3 on the mobile phone 10. As shown in the interface 103, the third-party cleaning application can only sort the pictures in chronological order, but cannot classify the pictures by application.
  • the file suffix for example: .jpg, .avi or .exe
  • the operator of the third-party cleaning application can also regularly analyze the folders and files created by each application, and record the analysis results as rules.
  • the scanned folders and files in them are analyzed according to the above rules, and the application to which each file belongs and its purpose can be obtained.
  • the user can manage the data generated by a certain application.
  • a third-party cleaning application can determine the folders created by the video application in the storage space of the mobile phone 10 and display the files in each directory under the folder. Users can delete the files generated by the video application as needed.
  • the analysis results of the operators are dependent on the directory of the folders created by the application itself, and the final results presented may be too professional and difficult for ordinary users to understand.
  • the files generated by the video application include "log files”, “web page cache” and "boot image cache”. It is difficult for ordinary users to understand the differences between the above-mentioned categories of files and thus cannot manage the files.
  • the management of storage space by scanning and analyzing the files in the storage space through the third-party cleaning applications requires the operators of the third-party cleaning applications to regularly analyze the files generated by the application and the operating system. Whenever the application or the operating system is updated, the operators need to re-analyze the purpose of the generated files, which consumes a lot of manpower. Moreover, the analysis results of the operators may not be completely correct. Indeed, when the operator's analysis is incorrect, users may delete useful files or even accidentally delete the application's program files, causing the application or operating system to fail to run normally, affecting the user experience.
  • the terminal can also limit the storage area of files generated by applications.
  • the terminal allocates independent storage space for each application, and the files of each application can be stored in the corresponding folder, and other applications cannot access the data of the application. In this way, the terminal can determine the application to which the file belongs based on the folder to which the file belongs.
  • the present application provides an application data management method, which is applied to the terminal 100.
  • the method sets a file reading and writing framework in the terminal 100, and a plurality of file writing interfaces are set in the file reading and writing framework, and each file writing interface corresponds to a different file category.
  • an application writes files of different categories to the terminal 100, it needs to write through the interface corresponding to the file category, and the terminal 100 will obtain the unique identifier of the application that writes the file, and then the application to which the file belongs can be determined.
  • the unique identifier of the application that writes the file and the file category of the written file are saved in the information record table. That is, the information record table stores the unique identifier and file category of the application to which each file belongs.
  • the terminal 100 does not need to use a third-party cleaning application to analyze the files generated by the application.
  • the user can search for files by application and file category, and delete or retain the files as needed. This method does not require additional manpower to analyze files, and will not cause errors in file category analysis, resulting in users accidentally deleting files.
  • file categories include private files and public files. Since the privacy permissions of different files are different, files that can be shared by an application with other applications are called public files, and files that an application does not share with other applications are called private files according to the privacy permissions of the files. Furthermore, public files are specifically divided into sub-file categories such as video, audio, pictures taken by the camera, files received or downloaded over short distances, other pictures, and documents, among which other pictures are pictures not taken by the camera and pictures not received or downloaded over short distances. It should be understood that public files and private files may also include other sub-file categories, and this application does not specifically limit the division of sub-file categories of public files and private files.
  • the file reading and writing framework may also be referred to as a user data access framework.
  • Public files may also be referred to as media files.
  • Private files also include files such as pictures, videos, and documents, such as user passwords of applications, chat records, and database records.
  • the above-mentioned private files are files that the application does not share with other applications. For example, the application receives a picture, but the user does not save the picture to the terminal 100. At this time, the picture is a private file, and when the user saves the picture to the terminal 100, the picture belongs to a public file.
  • the cache files generated by the application can also be divided into public files or private files according to needs.
  • the file reading and writing framework can be a software module, generally located in the application framework layer of the terminal 100.
  • the file reading and writing framework can include a privacy file reading and writing framework and a public file reading and writing framework.
  • the privacy file reading and writing framework provides a privacy file writing/reading interface to the application for the application to write or read privacy files.
  • the public file reading and writing framework provides a public file writing/reading interface to the application for the application to write or read public files.
  • the public file writing interface can also include a picture writing/reading interface taken by a camera, other picture (image) writing/reading interfaces, video (video) writing/reading interfaces, audio (audio) writing/reading interfaces and document (documents) writing/reading interfaces, short-distance receiving or downloading file writing/reading sub-interfaces and other interfaces.
  • a picture writing/reading interface taken by a camera
  • other picture (image) writing/reading interfaces video (video) writing/reading interfaces
  • audio (audio) writing/reading interfaces and document (documents) writing/reading interfaces short-distance receiving or downloading file writing/reading sub-interfaces and other interfaces.
  • the public file reading and writing framework provides a public file writing/reading interface to the application.
  • the public file writing/reading interface may also include different category parameters. Different file categories correspond to category parameters of different public file writing/reading interfaces.
  • the category parameters may be used to indicate that the file category is video, audio, pictures taken by a camera, files received or downloaded over short distances, other pictures, and documents.
  • the application framework layer of the terminal 100 may include a privacy file reading and writing framework and a public file reading and writing framework.
  • Application 1 can write private files to the terminal 100 through the privacy file writing interface provided by the privacy file reading and writing framework, and can write public files to the terminal 100 through the public file writing interface provided by the public file reading and writing framework.
  • some other embodiments of the present application disclose an application data management method.
  • the method can obtain the application to which the terminal 100 file belongs through the information record table, and then display an application list of all applications on the terminal 100.
  • the user can select the target application as needed, and then the terminal 100 will display a file category list based on the file category of the target application file in the information record table.
  • the user can select the target file category and then manage the files under the target file category in the target application, specifically performing operations such as deletion, moving, copying, and sharing.
  • the interface 106A of the application data management on the terminal 100 is exemplified.
  • the interface 106A displays the size of the three applications "video application", "music” and "browser” on the terminal 100 in the storage space.
  • the terminal 100 will display the files of the "video application” by file category as shown in FIG. 6 (B).
  • the application data management Since the private files are files that cannot be accessed by other applications, the application data management only displays the size of the storage space occupied by the private files of the "video application", and cannot display the specific files in the private files of the "video application”.
  • public files can be accessed by other applications.
  • the public files of the "video application” are displayed in the application data management according to the four categories of "stored pictures", “stored videos”, “stored audio” and "stored documents”. The user can select the corresponding file category by clicking the area in the display box 1063.
  • the total file categories of the terminal 100 files can also be obtained through the information record table, and then all file categories on the terminal 100 are displayed.
  • the user can select the target file category according to the needs, and then the terminal 100 will display the application list according to the application of the file with the target file category in the information record table.
  • the user can select the target application and then manage the files of the target application under the target file category.
  • the terminal 100 can classify the files in the storage space by application, and can further classify the files of each application by file category, or, first classify the files by file category, and then classify each file category by application, so that the user can conveniently manage some files of a certain category of an application according to the classification results of the terminal 100, instead of deleting the entire folder corresponding to the application.
  • the terminal 100 can determine the application to which the files in the storage space belong and the category of the files without the need for a third-party cleaning application to analyze the files generated by the application.
  • This method does not require additional manpower to analyze the files, and the terminal 100 directly determines the file category through the interface when the application writes the file, and will not cause errors in the file category analysis, resulting in the user accidentally deleting the file. Therefore, the terminal 100 can classify the files in the storage space according to the application and the file category, so that the user can manage the files according to the classification results of the terminal 100, which saves human resources and improves the user experience.
  • the terminal 100 may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA) or a dedicated camera (such as a SLR camera, a card camera), etc.
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • a dedicated camera such as a SLR camera, a card camera
  • FIG7A shows a schematic diagram of the structure of an exemplary terminal 100 provided in the embodiment of the present application.
  • the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal 100.
  • the terminal 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), Baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units can be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the terminal 100.
  • the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the I2S interface can be used for audio communication.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display 194 and the camera 193.
  • the GPIO interface can be configured by software.
  • the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal 100.
  • the terminal 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the terminal 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • LNA low noise amplifier
  • the modulation and demodulation processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor.
  • the wireless communication module 160 can provide wireless communication solutions for application on the terminal 100, including UWB, wireless local area networks (WLAN) (such as wireless fidelity (WiFi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • IR infrared technology
  • the terminal 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc.
  • the terminal 100 may include 1 or N display screens 194, where N is greater than 1. A positive integer.
  • the interface content currently output by the system is displayed on the display screen 194.
  • the interface content is an interface for application data management.
  • the terminal 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process data fed back by the camera 193 .
  • the camera 193 is used to capture static images or videos.
  • the terminal 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital video.
  • NPU is a neural-network (NN) computing processor. It can quickly process input information by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, and can also continuously self-learn.
  • NN neural-network
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
  • the internal memory 121 can be used to store computer executable program codes, which include instructions.
  • the processor 110 executes various functional applications and data processing of the terminal 100 by running the instructions stored in the internal memory 121.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the data storage area may store data created during the use of the terminal 100 (such as audio data, a phone book, etc.), etc.
  • the terminal 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
  • the receiver 170B also called a "handset" is used to convert the audio electrical signal into a sound signal.
  • Microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the earphone jack 170D is used to connect a wired earphone.
  • the pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.
  • the gyro sensor 180B may be used to determine a motion posture of the terminal 100 .
  • the air pressure sensor 180C is used to measure air pressure.
  • the magnetic sensor 180D includes a Hall sensor, and the terminal 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in various directions (generally three axes). When the terminal 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
  • the distance sensor 180F is used to measure the distance.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • LED light emitting diode
  • photodiode a light detector
  • the ambient light sensor 180L is used to sense the brightness of ambient light.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the temperature sensor 180J is used to detect the temperature.
  • Touch sensor 180K also called “touch panel”.
  • Bone conduction sensor 180M can obtain vibration signals.
  • the buttons 190 include a power button, a volume button, etc.
  • the buttons 190 may be mechanical buttons or touch buttons.
  • Motor 191 can generate vibration prompts.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • FIG. 7B shows a software structure block diagram of the terminal 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, each with clear roles and division of labor.
  • the layers communicate with each other through software interfaces.
  • the operating system is divided into five layers, from top to bottom, namely, the application layer, the application framework layer, the system library, the hardware abstraction layer (HAL) (not shown in FIG. 7B ), and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, game, shopping, travel, instant messaging (such as short message), etc.
  • the application package may also include system applications such as the home screen (i.e., desktop), negative one screen, control center, notification center, etc.
  • the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a public file read-write framework, a private file read-write framework, an application management framework, an input manager, a window manager, a view system, a phone manager, a resource manager, a notification manager, a display manager, etc.
  • the application framework layer is illustrated by taking the window manager, the display manager, the resource manager, the public file read-write framework, the private file read-write framework, and the application management framework as an example. It should be noted that the application management framework can call interfaces in the public file read-write framework and the private file read-write framework.
  • the public file reading and writing framework is used to provide applications with interfaces for reading and writing files, such as a public file writing interface and a public file reading interface.
  • the public file writing interface can also be specifically divided into a video writing sub-interface, an audio writing sub-interface, a camera-shot picture writing sub-interface, a short-distance received or downloaded file writing sub-interface, a picture writing sub-interface, and a document writing sub-interface according to the file category.
  • the public file reading interface can also be specifically divided into a video reading sub-interface, an audio reading sub-interface, a camera-shot picture reading sub-interface, a short-distance received or downloaded file reading sub-interface, other picture reading sub-interfaces, and a document reading sub-interface according to the file category.
  • the privacy file read-write framework is used to provide applications with an interface for reading and writing privacy files. Applications can write privacy files to the privacy file storage area through the privacy file read-write interface.
  • the application management framework is used to complete the installation and uninstallation of applications and manage application files, etc. It should be understood that the application management framework also involves reading and writing files in the process of managing applications, so the application management framework needs to frequently call the public file reading and writing framework and the private file reading and writing framework.
  • the input manager is used to receive instructions or requests reported by lower layers such as the kernel layer and the hardware abstraction layer.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • the display manager is used to transmit display content to the kernel layer.
  • the phone manager is used to provide communication functions of the terminal 100, such as management of call status (including connection, disconnection, etc.).
  • the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and disappear automatically after a short stay without user interaction.
  • the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • functional modules such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • the surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • a 2D graphics engine is a drawing engine for 2D drawings.
  • the hardware abstraction layer is the interface layer between the operating system software and the hardware components. It provides the interaction between the upper-layer software and the lower-layer hardware.
  • the HAL layer abstracts the underlying hardware into software containing the corresponding hardware interface. By accessing the HAL layer, the settings of the underlying hardware devices can be realized, for example, the related hardware components can be enabled or disabled at the HAL layer.
  • the core architecture of the HAL layer is composed of at least one of C++ or C.
  • the kernel layer is a layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, a touch chip driver, and an input system.
  • the kernel layer is illustrated by taking an input system, a touch chip driver, a display driver, and a storage driver as an example.
  • the display driver and the storage driver can be set together in the driver module.
  • the structure illustrated in the present application does not constitute a specific limitation on the terminal 100.
  • the terminal 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the following is a detailed description of the process of an application data management method provided by the present application.
  • the application data management method is described separately according to multiple application scenarios such as the terminal 100 installing the application, the application writing data to the terminal 100, the application reading data from the terminal 100, the terminal 100 managing the data of the application, and the terminal 100 uninstalling the application.
  • the terminal 100 is illustrated as a mobile phone 10 and the application is the first application. It should be understood that the terminal 100 can also be an electronic device such as a tablet, a computer, etc., and the present application does not specifically limit the type of the terminal 100.
  • the first application sends a request to install the first application to the application management framework.
  • the user can download the application through the application store of the mobile phone 10, or download the application through the browser in the mobile phone 10.
  • the first application will send a request to install the application to the application management framework of the mobile phone 10 through the application store or browser.
  • interface 901 is the main interface of mobile phone 10.
  • Mobile phone 10 can detect a touch operation (such as a click operation on icon 9011) acting on application store icon 9011 in interface 901, and start the application store program in response to the operation.
  • interface 902 is the interface of the application store, and the user can download various required applications in the application store.
  • the user can click on control 9012 corresponding to the video application, and mobile phone 10 detects the touch operation acting on control 9012, that is, the application management framework of mobile phone 10 obtains the request to install the video application.
  • the application management framework of the mobile phone 10 After the application management framework detects the request to install the first application, the application management framework of the mobile phone 10 will obtain the unique identifier of the first application.
  • S803 The first application writes the installation file through the privacy file reading and writing framework.
  • the first application writes the installation file of the first application into the storage space of the mobile phone 10 through the privacy file reading and writing framework.
  • the installation file of the application includes an application installation package (application package, APK) file.
  • the application management framework after the application management framework detects that the first application has written an installation file through the privacy file reading and writing framework, the application management framework will also parse the installation files such as APK files to obtain the components, configuration files and other information of the first application, so that the first application can run on the mobile phone 10.
  • the installation files such as APK files
  • a first application generates a first file.
  • the first application will generate data during its operation.
  • the data generated by the first application includes privacy files generated during the operation of the first application, pictures, videos, audio and other files saved by the user through the first application, APK files that will be obtained when the first application is updated, and drivers required during the operation of the first application.
  • the first application determines a file category of a first file.
  • the first application will determine the file category of the first file according to the file reading and writing interface provided by the mobile phone 10, so that the first application can call the corresponding interface to write data.
  • files generated by the first application can be divided into private files and public files according to whether the files can be shared with other applications.
  • Public files are files that can be shared with other applications, such as pictures, videos, and audio.
  • Private files are files that are not shared with other applications, such as user passwords, chat records, database records, etc. in the application.
  • the first application will further classify the first file by file category to determine whether the first file belongs to the category of video, audio, picture taken by a camera, file received or downloaded over short distances, other pictures, or documents.
  • S1003 The first application writes the first file through the first file writing interface.
  • the first application determines the interface to be called for writing the first file according to the file category of the first file, and then writes the first file according to the corresponding interface.
  • the first file writing interface is called, and the first file writing interface corresponds to the file category of the first file.
  • the mobile phone 10 has multiple file writing interfaces, which may include a privacy file writing interface and a public file writing interface.
  • the public file writing interface also includes a video writing sub-interface, an audio writing sub-interface, a camera-shot picture writing sub-interface, a short-distance received or downloaded file writing sub-interface, other picture writing interfaces, and a document writing sub-interface.
  • S1004 The mobile phone 10 obtains a unique identifier of the first application from the first application.
  • the mobile phone 10 When receiving the first application writing the first file, the mobile phone 10 will also obtain the unique identifier of the first application from the first application to determine the application to which the first file belongs.
  • the mobile phone 10 determines the file category of the first file according to the first file writing interface, and stores the unique identifier and the file category of the first application.
  • the mobile phone 10 can determine the file category according to the file writing interface or interface parameter called when the first application writes the first file.
  • the mobile phone 10 also stores the file category of the first file, the absolute path of the first file, and the unique identifier of the first application in the information record table.
  • the mobile phone 10 can determine whether the first file is a private file, or a video, audio, camera or other picture in a public file based on whether the first application calls a private file writing interface, a video writing sub-interface, an audio writing sub-interface, a camera picture writing sub-interface, other picture writing interfaces or a document writing sub-interface.
  • the mobile phone 10 can also determine the file category of the first file based on the category parameters of the public file writing interface called by the first application, wherein the public file writing interface also includes different category parameters such as video, audio, pictures or videos taken by a camera, files received or downloaded over short distances, and other picture documents.
  • the mobile phone 10 after receiving the first application writing the first file, the mobile phone 10 will also write the first file into a corresponding directory in a pre-made folder of the mobile phone 10 according to a file writing interface, wherein the pre-made folder includes various file categories.
  • interface 1101 shows that mobile phone 10 is a prefabricated folder, which also specifically includes picture, video, audio and document folders, wherein the picture folder is used to store files written by other picture writing interfaces, the video folder is used to store files written by the video writing sub-interface, the audio folder is used to store files written by the audio writing sub-interface, and the document folder is used to store files written by the document writing sub-interface.
  • the picture folder is used to store files written by other picture writing interfaces
  • the video folder is used to store files written by the video writing sub-interface
  • the audio folder is used to store files written by the audio writing sub-interface
  • the document folder is used to store files written by the document writing sub-interface.
  • the private file does not share files of other applications, only the first application can read and write data in the private folder without deleting the first application, so the mobile phone 10 will not display the private folder.
  • the mobile phone 10 also writes data such as the absolute path, file size, and creation time of the first file into the information record table.
  • the application management framework obtains a request to manage files of a first application.
  • the mobile phone 10 also includes applications such as a mobile phone manager, which is used to manage data in the mobile phone 10 through an application management framework.
  • the user can manage the data of the first application based on the mobile phone manager and other applications.
  • the mobile phone 10 obtains the user's operation of managing files, the mobile phone 10 will also obtain the applications to which all files belong in the information record table, and then display the application list.
  • the user can click on the target application in the application list to manage the files of the target application.
  • the interface 1301 is the main interface of the mobile phone 10, and the mobile phone 10 can detect a touch operation on the mobile phone manager icon 1302 in the interface 1301. In response to the above operation, the mobile phone 10 will run the mobile phone manager application, referring to (B) in FIG. 13 , the interface 1303 is an interface diagram after the mobile phone manager is running, and the mobile phone manager can manage files by classification of application programs and public files through the application management framework.
  • the mobile phone 10 When the mobile phone 10 detects a touch operation on the application data management display bar 1304, the mobile phone 10 will display each application and the storage space occupied by each application, and the mobile phone 10 obtains the user's operation of selecting the first application, that is, the mobile phone 10 obtains a request to manage the data of the first application.
  • the mobile phone 10 For details, please refer to the interface shown in (A) of Figure 6 above, which will not be repeated here.
  • S1202 The application management framework displays the files of the first application according to file categories.
  • the application management framework will display a list of file categories according to the file categories of the files belonging to the first application in the information record table. For details, please refer to the interface shown in (B) in Figure 6 above, which will not be repeated here.
  • the application management framework is only used to obtain the file information of the first application, and a framework such as a window manager is also required to display the file information of the first application on the display screen of the mobile phone 10.
  • the application management framework may also first display a list of file categories, and then display the list of file categories when the user selects the target file category.
  • the application list with files of the target file category is displayed.
  • the user selects the display bar 1305 of the public file management in the interface shown in (B) of FIG. 13 .
  • the application management framework will display the data of all applications according to the taken photos, stored pictures, stored videos, stored audios and stored documents as shown in the interface 1401 , and display the total storage size occupied by files of each category.
  • the application management framework When the application management framework detects a touch operation on a file of a certain category, the application management framework will display the files of this category. When displaying files of this category, the application management framework can also sort and display the files according to the applications to which they belong.
  • the mobile phone 10 detects a touch operation on the display bar 1402 corresponding to “Stored Pictures”.
  • the mobile phone 10 obtains the file data through the application management framework and displays the interface 1403 shown in (B) in FIG. 14 .
  • the interface 1403 displays the data written in the mobile phone 10 through the picture interface.
  • the application management framework displays files in different sorting modes, such as sorting by time, by application, or by size.
  • interface 1403 includes control 1404, and control 1404 is used to change the file sorting mode.
  • the application management framework detects a touch operation on control 1404.
  • interface 1501 displays multiple sorting modes, including sorting by time, by application, and by size.
  • Mobile phone 10 detects a touch operation on control 1502 corresponding to sorting by application.
  • interface 1503 exemplarily displays the result of sorting stored images by application, including images stored by video applications and browsers.
  • S1203 The application management framework obtains a user's request to perform a first operation on the target file.
  • the application management framework obtains the touch operation acting on the target file in the first application, indicating that the user needs to perform corresponding operations on the target data, and the operations that can be performed include moving, deleting, copying, sharing, printing, and renaming.
  • the user before performing the first operation on the target data, can also view detailed information of the target file, such as file name, file size, creation time, etc.
  • the user selects the picture 1602 in the pictures stored by the video application by clicking the icon of the picture 1602 in the interface 1601.
  • the application management framework displays a prompt box 1604 in the interface 1603.
  • the prompt box 1604 shows detailed information of the picture 1602, including the name: "target file.jpg", the application: the first application; the picture size: 1.5MB, the creation time: 2022.09.09.
  • the user can also operate on the picture by clicking the controls on the picture.
  • the user can select the operation to be performed on picture 1602 according to the needs.
  • S1204 The application management framework processes the target file according to the first operation.
  • the application management framework processes the target data according to the acquired user's request to perform a first operation on the target data.
  • the application management framework detects a touch operation on the delete icon 1801 in the prompt box 1704, and the mobile phone 10 deletes the picture 1602.
  • the picture 1602 is no longer displayed in the interface 1802.
  • the application management framework obtains a request to uninstall the first application.
  • the user can delete the application through the mobile phone manager, or directly delete the application.
  • the application management framework obtains the above user operation, it is considered that the application management framework obtains the request to uninstall the first application.
  • the user can delete the video application through the mobile phone manager, and the application management framework detects the touch operation acting on the control 1064 , and it can be considered that the mobile phone 10 obtains the request to uninstall the video application.
  • the application management framework detects a long press operation on the video application icon 2001, and the mobile phone 10 will display a prompt box 2002.
  • the mobile phone 10 detects a touch operation based on the uninstall control 2003, it can be considered that the mobile phone 10 has obtained a request to uninstall the video application.
  • S1902 The application management framework obtains files of the first application and deletes the privacy files of the first application.
  • the application management framework will determine the data belonging to the first application in the mobile phone 10 according to the information record table, and then determine the privacy file of the first application according to the file category in the information record table. When the mobile phone 10 uninstalls the first application, the privacy file of the first application will be deleted.
  • the privacy file may not be recorded in the information recording table.
  • the mobile phone 10 stores the privacy file in the internal memory, and the application management framework directly reads the privacy file of the first application in the internal memory according to the unique identifier of the first application.
  • S1903 The application management framework determines whether there is a public file.
  • the application management framework When uninstalling the first application, the application management framework will also determine whether there is a public file based on the file category in the information record table. The shared file can be read and written by other applications. If the judgment result is yes, step S1904 is executed, and if the judgment result is no, the uninstallation of the first application is completed.
  • S1904 The mobile phone 10 prompts the size of the first application public file.
  • the application management framework When the application management framework detects that there are still public files of the first application in the mobile phone 10 that have not been deleted based on the file category of the files of the first application in the information record table, the application management framework will prompt that information about the public files of the first application is still stored in the mobile phone 10.
  • a prompt box 2004 will be displayed to prompt the user that information about public files in the first application is still stored in the mobile phone 10 .
  • the mobile phone 10 further determines, based on the file category of the first application file in the information record table, that the file belongs to a specific file category under public files, such as video, audio, pictures taken by a camera, files received or downloaded over short distances, other pictures, and documents, etc. Then, the user is prompted with the size of the files under each of the above file categories.
  • the application management framework obtains a second operation of the user on the public file of the first application, and processes the public file of the first application based on the second operation.
  • the user can choose to delete or retain the public files of the first application based on the prompt of the mobile phone 10, and the application management framework will delete or retain the media data of the first application based on the user operation.
  • the application management framework when uninstalling the first application, may first process the public files and then delete the private files.
  • the application data management method sets a specified file writing interface in the terminal, and the file category of the file in the storage space can be determined through the interface used when the application writes data, and the application to which the file belongs can be determined according to the unique identifier of the application that writes the file.
  • This method does not require additional manpower to analyze the file type, and will not cause errors in file category analysis, resulting in users accidentally deleting files. Therefore, the terminal 100 can classify the files in the storage space according to the application, and can also classify the files of each application by file category, or classify the files by file category and then by application. In this way, the user can manage the files according to the classification results of the terminal 100, which saves human resources and improves the user experience.
  • the present application provides an application data management device.
  • the application data management device 2100 may include: a detection unit 2110 , a display unit 2120 , an acquisition unit 2130 , and a determination unit 2140 .
  • the detection unit 2110 is used to detect a first operation for accessing files of a terminal device, and the display unit 2120 is used to display a first interface when a first operation for accessing files of a terminal device is detected.
  • the first interface includes a first application list, and the applications in the first application list are applications to which the files of the terminal device belong.
  • the detection unit 2110 is further configured to detect a second operation of selecting a first application in the first application list.
  • the display unit 2120 is further configured to display a second interface when a second operation of selecting a first application in the first application list is detected, the second interface including a first file category list, wherein the file categories in the first file category list are part or all of the preset multiple file categories.
  • the detection unit 2110 is also used to detect a third operation of selecting the first file category in the first file category list, and the display unit 2120 is also used to display a third interface when it is detected that the first file category in the first file category list is selected, and the third interface includes files of the first application belonging to the first file category.
  • the detection unit 2110 is further used to detect a sixth operation for accessing files of the terminal device
  • the display unit 2120 is further used to display a fourth interface when the sixth operation for accessing files of the terminal device is detected, and the fourth interface includes a first file category list, the file category in the first file category list is the file category to which the files of the terminal device belong, and the file category in the first file category list is part or all of the preset multiple file categories;
  • the detection unit 2110 is further used to detect a seventh operation of selecting a first file category in the first file category list
  • the display unit 2120 is further used to display a fifth interface when the seventh operation of selecting a first file category in the first file category list is detected, the fifth interface including a first application list, and the applications in the first application list are applications to which the files in the first file category list belong.
  • the detection unit 2110 is further used to detect an eighth operation of selecting a first application in the first application list
  • the display unit 2120 is further used to display a sixth interface when the eighth operation of selecting the first application in the first application list is detected, and the sixth interface includes files of the first file category belonging to the first application.
  • the detection unit 2110 is further used to detect a fourth operation of writing the first file to the terminal device; the acquisition unit 2130 is used to obtain, in response to the fourth operation, a unique identifier of an application to which the first file belongs and determine a file category to which the first file belongs, wherein the file category to which the first file belongs is one of a plurality of preset file categories; the determination unit 2140 is further used to record in an information recording table the unique identifier of the application to which the first file belongs and the file category to which the first file belongs.
  • the detection unit 2110 is also used to detect a fourth operation of writing the first file to the terminal device by calling the first file write interface; the acquisition unit 2130 is also used to obtain the unique identifier of the application that calls the first file write interface; the determination unit 2140 is also used to determine the file category corresponding to the first file write interface as the file category to which the first file belongs, wherein the preset multiple file categories respectively correspond to a file write interface; or, the determination unit 2140 is also used to determine the file category indicated by the category parameter of the first file write interface as the file category to which the first file belongs, wherein the preset multiple file categories respectively correspond to a category parameter of the first file interface.
  • the first file writing interface is located at the framework layer of the terminal device.
  • the detection unit 2110 is also used to detect a fifth operation of uninstalling the first application; the determination unit 2140 is also used to determine multiple files of the first application based on the unique identifier of the application to which the multiple files in the information recording table belong; the determination unit 2140 is also used to determine the size of storage space occupied by files of different file categories in the files of the first application based on the file categories and file sizes of the multiple files of the first application in the information recording table; the display unit 2120 is also used to display the size of storage space occupied by files of different file categories in the files of the first application.
  • the application data management device sets a designated file writing interface in the terminal.
  • the file category of the file in the storage space can be determined through the interface used when the application writes data, and the application to which the file belongs can be determined according to the unique identifier of the application that writes the file.
  • the device does not need to spend extra manpower to analyze the file type, and will not produce errors in file category analysis, resulting in users accidentally deleting files. Therefore, the terminal 100 can classify the files in the storage space according to the application, and can also classify the files of each application according to the file category, or classify the files according to the file category, and then classify them according to the application. In this way, the user can manage the files according to the classification results of the files by the terminal 100, which saves human resources and improves the user experience.
  • all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof.
  • all or part of the embodiments may be implemented in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
  • the aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

Landscapes

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

Abstract

本申请应用于终端领域,提供了一种数据管理方法,应用于终端设备,其中方法包括:当检测到用于访问终端设备的文件的操作时显示包括终端设备的文件所属的应用的列表;当检测到选择第一应用列表中的第一应用的操作时显示文件类别列表,文件类别列表中的文件类别为预设的多个文件类别中的部分或全部;当检测到选择第一文件类别列表中的第一文件类别时,显示包括第一应用的属于第一文件类别的文件。因此,终端设备能将存储空间中的文件按应用程序进行分类,并对于每个应用程序的文件还能按文件类别进行分类,使得用户能根据终端设备对文件的分类结果对文件进行管理,既节省了人力资源,又提高了用户体验感。

Description

应用数据管理方法、设备、产品及介质
本申请要求于2022年09月30日提交中国专利局、申请号为202211215773.2、申请名称为“应用数据管理方法、设备、产品及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端领域,尤其涉及一种应用数据管理方法、设备、产品及介质。
背景技术
多个应用程序在获取终端的存储权限后,均可以在终端的存储空间中任意读取和写入文件,导致终端操作系统无法分辨终端存储的文件分别来自于哪个应用程序,也无法区分缓存文件以及用户保存的媒体文件(例如图片、视频以及音频)等文件类别。进而终端无法将存储空间的文件按所属应用程序或者按文件类别进行分类,使得用户在对存储空间进行管理时,例如需要删除用户通过某一应用程序保存的图片时,需要注意逐一辨别存储空间中文件是否属于该应用程序,以及分辨文件的类别是否为图片,增大了操作难度。
在一些方案中,第三方清理类应用的运营人员可以定期分析存储空间中文件所属的应用程序以及类型,根据分析结果生成分析规则,使得第三方清理类应用对终端存储空间进行扫描后,得到的每个文件的文件类别以及所属应用程序。
但是,运营人员是基于应用程序创建的各个文件夹去分析各个文件夹中存储的文件的类型,导致对每个应用程序的文件类别的分析结果都不相同。用户要对不同应用程序的文件进行管理时,还需要分别去理解每种分类下文件的用途和/或来源,使得用户在管理文件时效率较低。
发明内容
本申请提供了一种应用数据管理方法、设备、产品及介质。
第一方面,提供一种应用数据管理方法,应用于终端设备,该方法包括:当检测到用于访问终端设备的文件的第一操作时显示第一界面,第一界面包括第一应用列表,第一应用列表中的应用为终端设备的文件所属的应用;当检测到选择第一应用列表中的第一应用的第二操作时显示第二界面,第二界面包括第一文件类别列表,第一文件类别列表中的文件类别为第一应用的文件所属的文件类别,且第一文件类别列表中的文件类别为终端设备的系统预设的多个文件类别中的部分或全部;当检测到选择第一文件类别列表中的第一文件类别的第三操作时,显示第三界面,第三界面包括第一应用的属于第一文件类别的文件。
在上述方案中,用户在管理终端设备中的文件时,终端设备可以先显示应用列表,在用户选中某一应用之后,显示该应用的文件类别列表,然后用户可以对该应用的某一文件类别下的文件进行管理。预设的文件类别包括隐私文件、公共文件。公共文件还包括视频、音频、相机拍摄的图片、短距接收或下载的文件、其他图片以及文档等,其中其他图片为非相机拍摄的图片和非短距接收或下载的图片。
进而,用户基于终端设备显示的应用列表、文件类别列表,可以对文件进行管理,例如,进行删除、分享等操作,无需用户去分辨各个文件所属的应用程序和文件的类别,用户能直接根据应用列表和文件类别列表,选择需要进行管理的目标应用程序下的目标文件类别的文件。
并且,由于存在预设的文件类别,能使得用户在查看每个应用程序下的文件时,终端设备都能将文件按相同的文件类别进行分类显示,其中,应用不具有某种文件类别的文件时,终端设备可以不显示该文件类别。因此,不会出现每个应用程序下文件的分类方式不同的问题,以及导致用户对不同应用的数据进行管理时,都需要去理解每种分类下文件的用途和/或来源等问题,使得用户在管理终端设备中的文件时更加便捷。
结合第一方面,在一些实现方式中,当检测到选择第一应用列表中的第二应用的第四操作时显示第四界面,第四界面包括第二文件类别列表,第二文件类别列表中的文件类别为第二应用的文件所属的文件类别,且第二文件类别列表中的文件类别为系统预设的多个文件类别中的部分或全部;当检测到选择 第二文件类别列表中的第二文件类别的第五操作时,显示第五界面,第五界面包括第二应用的属于第二文件类别的文件。
在上述方案中,在终端设备接收到用户对第二应用的文件进行管理时,也会将第二应用的文件按系统预设的文件类别进行分类显示。也即是说,终端设备对于不同应用程序的文件都能按相同的文件类别进行分类显示。进而用户在对不同的应用程序的文件进行管理时,都是基于相同分类方式去选择文件的。该方法避免了用户在管理应用程序的文件时需要较多花费时间去理解不同应用程序的文件分类方式,通过该方法用户能获取到对于不同应用程序能按相同的文件分类进行文件管理,提高了用户在管理终端设备文件的效率。
结合第一方面,在一些实现方式中,第一应用列表和第一文件类别列表是根据终端设备的信息记录表确定的,信息记录表包括终端设备的文件所属的应用的唯一标识和所属的文件类别。
在上述方案中,终端设备会将终端设备中文件的所属应用、文件类别保存到信息记录表中,其中信息记录表中还可以包括文件的唯一标识,例如文件的绝对路径,文件的大小,创建文件的时间等。进而,根据信息记录表可以确定文件所属的应用和文件类别,在用户要对文件进行管理时,用户能按文件所属的应用和文件类别查看文件,然后对文件进行管理,使得用户在管理终端设备中的文件时更加便捷,提高了用户体验。
结合第一方面,在一些实现方式中,该方法还包括:检测到将第一文件写入终端设备的第六操作;响应于第六操作,获取第一文件所属的应用的唯一标识并确定第一文件所属的文件类别,其中,第一文件所属的文件类别为系统预设的多个文件类别中的一个;在信息记录表中记录第一文件所属的应用的唯一标识和第一文件所属的文件类别。
在上述方案中,应用程序在向终端设备写入文件的过程中,终端设备会确定写入文件所属的应用和写入文件的文件类别。进而,终端设备能将写入文件的所属应用、文件类别保存到信息记录表内,在用户要对文件进行管理时,用户能按文件所属的应用和文件类别查看文件分类,使得用户能获取到更准确和直观的文件分类,用户在管理终端设备中的文件时更加便捷。
结合第一方面,在一些实现方式中,该方法还包括:检测到将第一文件写入终端设备的第六操作包括,检测到通过调用第一文件写入接口将第一文件写入终端设备的第六操作;获取第一文件所属的应用的唯一标识包括:获取调用第一文件写入接口的应用的唯一标识;和/或确定第一文件所属的文件类别包括:将第一文件写入接口对应的文件类别确定为第一文件所属的文件类别,其中,系统预设的多个文件类别分别对应一个文件写入接口;或者,将第一文件写入接口的类别参数所指示的文件类别确定为第一文件所属的文件类别,其中,系统预设的多个文件类别分别对应第一文件接口的一个类别参数。
在上述方案中,应用程序在写入文件时会根据写入文件的文件类别,调用对应文件类别的文件写入接口,或者文件写入接口的不同参数。即针对不同文件类别,提供了不同文件写入接口,或者提供了文件写入接口的不同参数。例如,文件写入接口可以包括隐私文件写入接口、公共文件写入接口,公共文件写入接口还包括视频写入子接口、音频写入子接口、相机拍摄的图片写入子接口、短距接收或下载的文件写入子接口、其他图片写入接口以及文档写入子接口。或者,公共文件写入接口还包括视频、音频、相机拍摄的图片、短距接收或下载的文件、其他图片文档等不同参数。并且,终端设备还对应提供了上述接口的对应的读取接口,例如,隐私文件读取接口、公共文件读取接口,公共文件读取接口还包括视频读取子接口、音频读取子接口、相机拍摄的图片读取子接口、短距接收或下载的文件读取子接口、其他图片读取子接口以及文档读取子接口。
进而,终端设备通过应用程序写入文件时使用的文件写入接口或者文件写入接口的参数,可以确定写入文件的文件类别。因此,不会出现每个应用程序下文件的分类方式不同的问题,以及导致用户对不同应用的文件进行管理时,都需要去理解每种分类下文件的用途和/或来源等问题。使得通过本方案提供的方法,用户能获取到更准确和直观的文件分类,使得用户在管理终端设备中的文件时更加便捷。
结合第一方面,在一些实现方式中,第一文件写入接口位于终端设备的框架层。
在上述方案中,第一文件写入接口可以是位于终端设备框架层的公共文件读写框架或隐私文件读写框架向应用程序提供的接口。
结合第一方面,在一些实现方式中,该方法还包括:检测到卸载第一应用的第七操作;根据信息记录表中多个文件所属的应用的唯一标识,确定第一应用的多个文件;根据信息记录表中第一应用的多个 文件的文件类别和文件大小,确定第一应用的文件中不同文件类别的文件占用的存储空间大小;显示第一应用的文件中不同文件类别的文件分别占用的存储空间大小。
在上述方案中,在用户卸载应用时,终端设备能根据信息记录表获取要卸载的应用在不同类别下的文件分别只占用存储空间大小,然后显示该应用不同类别文件分别占用的存储空间大小,以使用户能在卸载应用时,对该应用不同类别的文件选择保留或者删除,以防用户因卸载应用丢失文件。
第二方面,提供一种应用数据管理方法,应用于终端设备,其特征在于,该方法包括:当检测到用于访问终端设备的文件的第一操作时显示第一界面,第一界面包括第一文件类别列表,第一文件类别列表中的文件类别为终端设备的文件所属的文件类别,第一文件类别列表中的文件类别为终端设备的系统预设的多个文件类别中的部分或全部;当检测到选择第一文件类别列表中的第一文件类别的第二操作时显示第二界面,第二界面包括第一应用列表,第一应用列表中的应用为属于第一文件类别列表的文件所属的应用;当检测到选择第一应用列表中的第一应用的第三操作时,显示第三界面,第三界面包括第一文件类别的属于第一应用的文件。
在上述方案中,用户在管理终端设备中的文件时,终端设备可以先显示文件类别列表,在用户选中某一文件类别之后,显示具有该文件类别文件的应用,然后用户可以对某一应用的某一文件类别下的文件进行管理。进而,用户基于终端设备显示的应用列表、文件类别列表,可以对文件进行管理,例如,进行删除、分享等操作,无需用户去分辨各个文件所属的应用程序和文件的类别,用户能直接根据应用列表和文件类别列表,选择需要进行管理的目标应用程序下的目标文件类别的文件。
并且,由于存在预设的文件类别,能使得用户在查看每个应用程序下的文件时,终端设备都能将文件按相同的文件类别进行分类显示,其中,应用不具有某种文件类别的文件时,终端设备可以不显示该文件类别。因此,不会出现每个应用程序下文件的分类方式不同的问题,以及导致用户对不同应用的数据进行管理时,都需要去理解每种分类下文件的用途和/或来源等问题,使得用户在管理终端设备中的文件时更加便捷。
结合第二方面,在一些实现方式中,第一应用列表和第一文件类别列表是根据终端设备的信息记录表确定的,信息记录表包括终端设备的文件所属的应用的唯一标识和所属的文件类别。
结合第二方面,在一些实现方式中,该方法还包括:检测到将第一文件写入终端设备的第四操作;响应于第四操作,获取第一文件所属的应用的唯一标识并确定第一文件所属的文件类别,其中,第一文件所属的文件类别为系统预设的多个文件类别中的一个;在信息记录表中记录第一文件所属的应用的唯一标识和第一文件所属的文件类别。
结合第二方面,在一些实现方式中,该方法还包括:检测到将第一文件写入终端设备的第四操作包括,检测到通过调用第一文件写入接口将第一文件写入终端设备的第四操作;获取第一文件所属的应用的唯一标识包括:获取调用第一文件写入接口的应用的唯一标识;和/或确定第一文件所属的文件类别包括:将第一文件写入接口对应的文件类别确定为第一文件所属的文件类别,其中,系统预设的多个文件类别分别对应一个文件写入接口;或者,将第一文件写入接口的类别参数所指示的文件类别确定为第一文件所属的文件类别,其中,系统预设的多个文件类别分别对应第一文件接口的一个类别参数。
结合第二方面,在一些实现方式中,第一文件写入接口位于终端设备的框架层。
结合第二方面,在一些实现方式中,该方法还包括:检测到卸载第一应用的第五操作;根据信息记录表中多个文件所属的应用的唯一标识,确定第一应用的多个文件;根据信息记录表中第一应用的多个文件的文件类别和文件大小,确定第一应用的文件中不同文件类别的文件占用的存储空间大小;显示第一应用的文件中不同文件类别的文件分别占用的存储空间大小。
第三方面,提供一种检测到将第一文件写入终端设备的第一操作;响应于第一操作,获取第一文件所属的应用的唯一标识并确定第一文件所属的类别,其中,第一文件所属的类别为终端设备的系统预设的多个类别中的一个;记录第一文件所属的应用的唯一标识和第一文件所属的文件类别。
在上述方案中,应用程序在向终端设备写入文件的过程中,终端设备会确定写入文件所属的应用和写入文件的文件类别。进而,终端设备能将写入文件的所属应用、文件类别保存到信息记录表内,在用户要对文件进行管理时,用户能按文件所属的应用和文件类别查看文件分类,使得用户能获取到更准确和直观的文件分类,用户在管理终端设备中的文件时更加便捷。
第四方面,本申请提供了一种电子设备,其特征在于,包括处理器和存储器,存储器用于存储指令, 处理器用于执行指令,当处理器执行该指令时,执行如第一方面或第二方面或第三方面所描述的方法。
第五方面,本申请提供一种计算机可读存储介质,其特征在于,计算机可读存储介质中存储有指令,当指令在电子设备上运行时,执行如第一方面或第二方面或第三方面所描述的方法。
第六方面,本申请提供了一种计算机程序产品,其特征在于,计算机程序产品包括计算机指令,在被电子设备执行时,电子设备执行如第一方面或第二方面或第三方面所描述的方法。
综上所述,本申请实施例提供的应用数据管理方法、设备、产品及介质,在终端中设置了指定的文件写入接口,通过应用程序写入数据时使用的接口就能确定存储空间中文件的文件类别,根据写入文件的应用的唯一标识能确定文件所属的应用。这样,无需耗费额外的人力去分析文件类型,不会产生文件类别分析出错,导致用户误删文件的情况。因此,基于本申请终端设备能将存储空间中的文件按应用程序进行分类,并对于每个应用程序的文件还能按文件类别进行分类,或者将文件按文件类别分类,在按应用程序分类。这样,使得用户能根据终端100对文件的分类结果对文件进行管理,既节省了人力资源,又提高了用户体验感。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。
图1是本申请实施例提供的一种管理缓存垃圾的界面示意图;
图2是本申请实施例提供的一种按文件类别管理文件的界面示意图;
图3是本申请实施例提供的一种终端管理图片的界面示意图;
图4是本申请实施例提供的一种第三方清理类应用管理应用程序文件的界面示意图;
图5是本申请实施例提供的一种应用程序读写文件的框架示意图;
图6是本申请实施例提供的一种按预制文件目录管理应用程序的界面示意图;
图7A是本申请实施例提供的一种终端的硬件结构示意图;
图7B是本申请实施例提供的一种终端的软件结构示意图;
图8是本申请实施例提供的一种安装应用程序的方法流程示意图;
图9是本申请实施例提供的一种安装应用程序的界面示意图;
图10是本申请实施例提供的一种应用程序写入数据的方法流程图;
图11是本申请实施例提供的一种终端系统预制的文件夹的界面示意图;
图12是本申请实施例提供的一种终端管理应用程序的文件的方法流程图;
图13是本申请实施例提供的一种手机管家查看应用文件的界面示意图;
图14是本申请实施例提供的一种管理公共文件的界面示意图;
图15是本申请实施例提供的一种将公共文件按应用程序排序的界面示意图;
图16是本申请实施例提供的一种查看公共文件信息的界面示意图;
图17是本申请实施例提供的一种管理公共文件的界面示意图;
图18是本申请实施例提供的一种删除公共文件的界面示意图;
图19是本申请实施例提供的一种卸载应用程序的方法流程示意图;
图20是本申请实施例提供的一种卸载应用程序的界面示意图;
图21是本申请实施例提供的一种应用数据管理装置的结构示意图。
具体实施方式
本申请的说明性实施例包括但不限于应用数据管理方法、设备、产品及介质。
为更加清楚理解本申请的方案,下面首先介绍应用程序在终端写入文件的过程。
目前,用户可以根据需求在终端上安装和卸载应用程序。应用程序在安装时,需要向终端获取存储权限,用户在终端授予应用程序存储权限后,应用程序可以随意访问终端存储器的存储空间。进而,应用程序可以在存储空间建立文件夹保存应用程序运行时应用程序产生的缓存(例如浏览的网页的页面信息)以及用户通过应用程序保存的媒体文件(例如图片、视频以及音频)等等。并且,应用程序还可以将上述数据写入终端操作系统建立的文件夹中,例如,应用程序将产生的图片写入系统相册中,用户通 过终端自带的相册软件就能查看到所有应用程序产生的图片。
因此,终端上已安装的多个应用程序均可以在终端的存储空间中任意读取和写入文件,导致用户和终端操作系统无法分辨终端存储的文件分别来自于哪个应用程序,也无法区分哪些文件是系统文件,哪些文件是缓存文件,使得用户无法便捷地对存储空间进行管理。例如,无法便捷得进行文件删除以实现存储空间的释放,当用户无法便捷地删除存储空间中的文件时,进而终端存储空间中文件越来越多,大量残留文件占用存储空间,终端可用存储空间越来越少,终端的系统越来越慢。
为解决上述问题,在一些实施例中,通过第三方清理类应用的运营人员定期分析存储空间中文件的文件类别,从而根据分析结果生成分析规则。并通过第三方清理类应用对终端存储空间进行扫描,将扫描到的文件再根据上述分析规则进行分析,以获得每个文件的文件类别以及文件所属应用程序,例如第三方清理类应用可以根据分析规则分析该文件属于应用程序的源代码还是缓存文件,又或者是媒体文件等,并将分析结果展示给用户。进而,用户就能通过第三方清理类应用扫描和分析的结果对存储空间进行管理。
举例来说,第三方清理类应用可以扫描手机10的存储空间,并分析手机10存储空间中各个文件的用途,将手机10中存储的缓存文件进行显示。如图1所示,图1示例性示出了手机10中第三方清理类应用对扫描得到的缓存文件进行显示的界面101。其中,界面101中显示框1011显示了手机10中存在缓存垃圾共86.3兆字节(Megabytes,MB),缓存垃圾为手机10操作系统在运行应用程序时产生的临时数据,例如浏览过的网页的数据。缓存垃圾还具体分为了手机缓存垃圾、系统缓存垃圾以及云空间的垃圾。手机缓存垃圾包括手机10中所有应用程序在运行时产生的缓存文件,系统缓存包括手机10操作系统运行过程中产生的缓存文件,云空间的垃圾包括手机10在云服务器中存储文件中的缓存文件。
第三方清理类应用程序还会扫描手机10中应用程序产生的音频、图片以及视频等媒体文件,例如界面101中显示框1012示出了对手机10深度检出后确定的手机10中还存储有97.8MB媒体文件。用户通过点击控件1013即可对上述缓存垃圾和深度检出的文件进行删除。
在另一些实施例中,第三方清理类应用还可以进一步将扫描到媒体文件按文件类别进行分类。例如,根据文件类别可以将手机10中的媒体文件按图片、视频、音频、大文件、应用以及安装包等进行分类。示例性地,如图2所示,手机10中第三方清理类应用显示的界面102中包括显示框1021,用户可以根据显示框1021中文件的分类对文件进行管理。
但是,由于应用程序可以随意将上述媒体文件写入任意文件夹,第三方清理类应用也只是根据文件类别,例如,根据文件的后缀(例如:.jpg、.avi或者.exe)以及根据文件的数据大小对文件进行分类的,第三方清理类应用也无法分析到每个文件具体来源于哪个应用程序。示例性地,当用户点击图2中显示框1021中的图片对应的图标之后,第三方清理类应用将在手机10上显示如图3所示的界面103,如界面103所示第三方清理类应用程序仅能将图片按时间顺序进行排序,而不能将图片按应用程序进行分类。
因此,用户在对某一分类的文件进行清理时,无法获取到该分类中文件分别源于哪个应用程序,当用户需要删除某一应用程序产生的媒体文件时,还需要逐一去分辨哪些文件是该应用程序产生的,会消耗用户大量时间,影响用户使用体验。
为解决上述问题,在另一些实施例中,第三方清理类应用的运营人员还可以定期分析每个应用程序创建的文件夹以及产生的文件,将分析结果记为规则。通过第三方清理类应用对终端存储空间进行扫描,将扫描到的文件夹和里面的文件再根据上述规则进行分析,就能得到的每个文件所属的应用以及其用途。进而,用户就能对某一应用程序产生的数据进行管理。
示例性地,如图4所示,第三方清理类应用基于对“视频应用”产生的文件进行的分析,可以在手机10存储空间中确定视频应用所创建的文件夹,并对该文件夹下各个目录中的文件进行显示,用户可根据需求对该视频应用产生文件进行删除。
但是,运营人员的分析结果是依赖于应用程序自身创建的文件夹的目录的,最终所呈现的结果可能过于专业,普通用户难以理解,如图4中界面104所示,视频应用产生的文件包括“日志文件”、“网页缓存”以及“引导图片缓存”,普通用户难以理解上述各类别文件的区别,进而无法对文件进行管理。
并且,通过上述第三方清理类应用扫描和分析存储空间的文件对存储空间进行管理,需要第三方清理类应用的运营人员定期去分析应用程序和操作系统产生文件,每当应用程序或操作系统更新,运营人员又需要重新去分析产生的文件的用途,这样会消耗大量人力。并且运营人员的分析结果不一定完全正 确,当运营人员的分析有误时,用户可能会将有用的文件清除掉,甚至误删应用程序的程序文件,导致应用程序或操作系统没法正常运行,影响用户体验。
为解决上述问题,在另一些实施例中,终端还可以限制应用程序产生的文件的存储区域,终端为每个应用程序分配了独立的存储空间,每个应用程序的文件都能存储在对应的文件夹下,其他应用程序无法访问该应用程序的数据。这样,终端能根据文件所属的文件夹确定文件所属的应用程序。
但由于应用所有的数据都只能存储在这个文件夹,而文件夹内部应用存储的内容没有细分。又因为其他应用程序无法访问该应用程序的文件,第三方应用程序无法对应用程序的文件进行分类用户想要对应用对应的数据进行管理,例如删除部分文件,只能选择删除整个文件夹,如此,导致用户仍然无法对存储空间进行便捷的管理。
综上,上述方案仍然均难以实现存储空间的便捷管理。当用户无法便捷地管理存储空间,例如便捷的删除存储空间中的文件时,会导致终端存储空间难以及时释放,影响终端的系统运行。
为了解决上述问题,本申请提供了一种应用数据管理方法,应用于终端100。该方法在终端100中设置了文件读写框架,文件读写框架中设置有多个文件写入接口,每个文件写入接口对应不同的文件类别。应用程序在向终端100写入不同类别的文件时,需要通过该文件类别对应的接口进行写入,并且,终端100会获取写入文件的应用程序的唯一标识,进而可以确定文件所属的应用程序。如此,在某个应用程序通过调用写入文件的类别所对应的接口类型写入文件时,将写入文件的应用程序的唯一标识和写入文件的文件类别保存在信息记录表中。即信息记录表中存储有各个文件所属的应用程序的唯一标识、文件类别。
如此,终端100不需要借助第三方清理类应用对应用程序产生的文件进行分析,根据信息记录表中各个文件所属的应用程序以及文件类别,用户就能按应用程序和文件类别对查找文件,并按需对文件进行删除或保留等操作。该方法无需耗费额外的人力去分析文件,不会产生文件类别分析出错,导致用户误删文件的情况。
其中,文件类别包括隐私文件、公共文件。由于不同文件的隐私权限不同的,因此根据文件的隐私权限,将应用程序可以分享给其他应用程序的文件称为公共文件,应用程序不分享给其他应用程序的文件称为隐私文件。进一步地,还具体将公共文件按类型分为了视频、音频、相机拍摄的图片、短距接收或下载的文件、其他图片以及文档等子文件类别,其中其他图片为非相机拍摄的图片和非短距接收或下载的图片。应理解,公共文件和隐私文件还可以包括其他子文件类别,本申请对公共文件和隐私文件的子文件类别划分也不作具体限定。
在一些实施例中,文件读写框架也可称为用户数据访问框架。公共文件也可称为媒体文件。隐私文件也包括图片、视频和文档等文件,例如应用程序的用户密码、聊天记录以及数据库记录等。但上述隐私文件是应用程序不分享给其他应用程序的文件。例如,应用接收到图片,但用户并没有将该图片保存到终端100中,此时该图片为隐私文件,而当用户将该图片保存到终端100后,该图片就属于公共文件。另外,应用程序产生的缓存文件也可以根据需求划分为公共文件或者隐私文件。
文件读写框架可以是软件模块,一般位于终端100的应用程序框架层。文件读写框架可以包括隐私文件读写框架和公共文件读写框架。隐私文件读写框架向应用程序提供了隐私文件写入/读取接口,用于应用程序写入或读取隐私文件。公共文件读写框架向应用程序提供了公共文件写入/读取接口,用于应用程序写入或读取公共文件。公共文件写入接口还可以包括相机(camera)拍摄的图片写入/读取接口,其他图片(image)写入/读取接口,视频(video)写入/读取接口,音频(audio)写入/读取接口以及文档(documents)写入/读取接口,短距接收或下载的文件写入/读取子接口等接口。应理解,在还具有其他文件类别的情况下,文件读写框架还可以包括其他与文件类别对应的写入/读取接口,本申请对文件接口类别的划分也不作具体限定。
在一些实施例中,公共文件读写框架向应用程序提供了公共文件写入/读取接口,公共文件写入/读取接口还可以包括不同类别参数,不同文件类别对应不同公共文件写入/读取接口的类别参数,类别参数可以用于指示文件类别为视频、音频、相机拍摄的图片、短距接收或下载的文件、其他图片以及文档。
如图5所示,终端100的应用程序框架层可以包括隐私文件读写框架和公共文件读写框架,应用1能通过隐私文件读写框架提供的隐私文件写入接口向终端100写入隐私文件,以及能通过公共文件读写框架提供的公共文件写入接口向终端100写入公共文件。
此外,如前所述,在一些实施例中,存在用户想要对应用的文件进行管理的情况,为此,本申请另外一些实施例,公开了一种应用数据管理方法,该方法用户在对文件进行管理时,可以通过信息记录表获取终端100文件所属的应用,然后显示终端100上所有应用的应用列表,用户可以根据需求选中目标应用,然后终端100会根据信息记录表中目标应用文件的文件类别显示文件类别列表,用户可以选用目标文件类别,然后对该目标应用中目标文件类别下的文件进行管理,具体可以执行删除、移动、复制、分享等操作。
如图6中(A)示例性示出了终端100上应用数据管理的界面106A,界面106A显示了终端100上“视频应用”、“音乐”和“浏览器”三个应用程序在存储空间中占用的大小。当用户点击显示框1061时,终端100将如图6中(B)所示按文件类别显示“视频应用”的文件,其中,由于隐私文件为不能被其他应用所访问的文件,因此应用数据管理中只显示“视频应用”的隐私文件占用的存储空间大小,而不能显示“视频应用”隐私文件中的具体文件。相反,公共文件是可以被其他应用所访问的,应用数据管理中按“存储的图片”、“存储的视频”、“存储的音频”以及“存储的文档”四个分类对“视频应用”的公共文件进行显示,用户可以通过点击显示框1063中的区域对对应的文件类别进行选择。
在另一些实施例中,基于用户对文件进行管理,还可以通过信息记录表获取终端100文件总共具有的文件类别,然后显示终端100上所有文件类别,用户可以根据需求选中目标文件类别,然后终端100会根据信息记录表中具有目标文件类别的文件的应用,显示应用列表,用户可以选用目标应用,然后对该目标文件类别下目标应用的文件进行管理。具体可参考后文图12及其相关描述。
这样,终端100能将存储空间中的文件按应用程序进行分类,并对于每个应用程序的文件还能按文件类别进行分类,或者,先将文件按文件类别进行分类,并对于每个文件类别还能按应用程序进行分类,使得用户能根据终端100对文件的分类结果对应用程序某一分类的部分文件进行便捷管理,而不是删除应用程序对应的整个文件夹。
综上所述,通过本申请提供的应用数据管理方法,终端100不需要借助第三方清理类应用对应用程序产生的文件进行分析,就能确定存储空间中的文件所属的应用程序以及文件的类别。该方法无需耗费额外的人力去分析文件,并且终端100是直接通过应用程序写入文件时的接口确定的文件类别,不会产生文件类别分析出错,导致用户误删文件的情况。因此,终端100能将存储空间中的文件按应用程序和文件类别进行分类,使得用户能根据终端100对文件的分类结果对文件进行管理,既节省了人力资源,又提高了用户体验感。
上述终端100可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)或专门的照相机(例如单反相机、卡片式相机)等,本申请对该终端100的具体类型不作任何限制。
下面首先介绍本申请实施例中涉及的终端100。参见图7A,图7A示出了本申请实施例提供的示例性终端100的结构示意图。
终端100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对终端100的具体限定。在本申请另一些实施例中,终端100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP), 基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是终端100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。I2S接口可以用于音频通信。PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。GPIO接口可以通过软件配置。USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端100的结构限定。在本申请另一些实施例中,终端100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
终端100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。
移动通信模块150可以提供应用在终端100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。
无线通信模块160可以提供应用在终端100上的包括UWB,无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,WiFi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。
终端100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端100可以包括1个或N个显示屏194,N为大于1 的正整数。
在本申请的一些实施例中,显示屏194中显示有系统当前输出的界面内容。例如,界面内容为应用数据管理的界面。
终端100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。
摄像头193用于捕获静态图像或视频。在一些实施例中,终端100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端100使用过程中所创建的数据(比如音频数据,电话本等)等。
终端100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。
耳机接口170D用于连接有线耳机。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。
陀螺仪传感器180B可以用于确定终端100的运动姿态。
气压传感器180C用于测量气压。
磁传感器180D包括霍尔传感器。终端100可以利用磁传感器180D检测翻盖皮套的开合。
加速度传感器180E可检测终端100在各个方向上(一般为三轴)加速度的大小。当终端100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。
环境光传感器180L用于感知环境光亮度。
指纹传感器180H用于采集指纹。
温度传感器180J用于检测温度。
触摸传感器180K,也称“触控面板”。
骨传导传感器180M可以获取振动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。
马达191可以产生振动提示。
指示器192可以是指示灯,可以用于指示充电状态,电量变化等。
SIM卡接口195用于连接SIM卡。
图7B示出了本申请实施例的终端100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将操作系统分为五层,从上至下分别为应用程序层,应用程序框架层,系统库,硬件抽象层(hard abstraction layer,HAL)(图7B中未进行示意),以及内核层。
应用程序层可以包括一系列应用程序包。
如图7B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,游戏,购物,出行,即时通信(如短信息)等应用程序。另外,应用程序包还可以包括:主屏幕(即桌面),负一屏,控制中心,通知中心等系统应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图7B所示,应用程序框架层可以包括公共文件读写框架,隐私文件读写框架,应用管理框架,输入管理器,窗口管理器(window manager),视图系统,电话管理器,资源管理器,通知管理器,显示管理器等。为了便于说明,图7B中,应用程序框架层以包括窗口管理器,显示管理器,资源管理器,公共文件读写框架、隐私文件读写框架以及应用管理框架为例进行示意。需要说明的是,应用管理框架可以调用公共文件读写框架以及隐私文件读写框架中的接口。
公共文件读写框架用于给应用程序提供读取和写入文件的接口,例如,公共文件写入接口以及公共文件读取接口。
公共文件写入接口还可以按文件类别具体分为视频写入子接口、音频写入子接口、相机拍摄的图片写入子接口、短距接收或下载的文件写入子接口、图片写入子接口以及文档写入子接口。对应地,公共文件读取接口还可以按文件类别具体分为视频读取子接口、音频读取子接口、相机拍摄的图片读取子接口、短距接收或下载的文件读取子接口、其他图片读取子接口以及文档读取子接口。
隐私文件读写框架用于给应用程序提供读取和写入隐私文件的接口,应用程序通过隐私文件读写接口可以将隐私文件写入隐私文件存储区域。
应用管理框架用于完成应用程序的安装、卸载以及管理应用程序的文件等。应理解,应用管理框架在对应用程序进行管理的过程中也涉及对文件的读取和写入,因此应用管理框架需要经常调用上述公共文件读写框架和隐私文件读写框架。
输入管理器用于接收如内核层、硬件抽象层等下层上报的指令或请求。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。
显示管理器用于向内核层传输显示内容。
电话管理器用于提供终端100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
硬件抽象层HAL层为操作系统软件与硬件组件的接口层,其为上层软件和下层硬件之间的交互提 供接口。HAL层将底层硬件抽象为包含相应硬件接口的软件,通过访问HAL层就可以实现对底层硬件设备的设置,例如可以在HAL层使能或禁用相关硬件组件。在一些实施例中,HAL层的核心架构由C++或者C中的至少一项构成。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动,触控芯片的驱动和输入(input)系统等。为了便于说明,图7B中,内核层以包括输入系统、触控芯片的驱动、显示驱动以及存储驱动为例进行示意。其中,显示驱动以及存储驱动可共同设置在驱动模块中。
可以理解的是,本申请示意的结构并不构成对终端100的具体限定。在另一些实施例中,终端100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
下面分别对本申请提供的一种应用数据管理方法的流程进行详细描述。其中,以所述应用数据管理方法按终端100安装应用程序、应用程序向终端100写入数据、应用程序从终端100读取数据、终端100对应用程序的数据进行管理以及终端100卸载应用程序等多个应用场景进行分别描述。并以终端100为手机10,应用程序为第一应用进行举例说明,应理解,终端100还可以是平板、电脑等电子设备,本申请对终端100的类型不作具体限定。
下面结合图8对手机10安装第一应用程序的过程进行详细描述。
S801:第一应用向应用管理框架发送安装第一应用的请求。
用户可以通过手机10的应用商城下载应用程序,或者通过手机10中的浏览器下载应用程序。当用户在应用商城或浏览器发送安装第一应用的请求时,第一应用将通过应用商城或浏览器向手机10的应用管理框架发送安装应用程序的请求。
示例性地,参见图9中的(A),界面901为手机10的主界面,手机10可以检测到作用于界面901中应用商城图标9011的触控操作(如在图标9011上的点击操作),并响应于该操作启动应用商城程序。参见图9中的(B),界面902为应用商城的界面,用户可以在该应用商城中下载需要的各种应用,例如,用户可以点击视频应用对应的控件9012,手机10检测到作用于控件9012的触控操作,即手机10的应用管理框架获取到安装视频应用的请求。
S802:获取第一应用的唯一标识。
应用管理框架检测到安装第一应用的请求后,手机10的应用管理框架将根据获取第一应用的唯一标识。
S803:第一应用通过隐私文件读写框架写入安装文件。
第一应用通过隐私文件读写框架将第一应用的安装文件写入手机10的存储空间。应用程序的安装文件包括应用安装包(application package,APK)文件。
在一些实施例中,应用管理框架检测到第一应用通过隐私文件读写框架写入了安装文件后,应用管理框架还将对APK文件等安装文件进行解析,以获取第一应用的组件、配置文件等信息,进而第一应用可以在手机10上运行。
下面结合图10对第一应用向手机10写入数据的过程进行详细描述。
S1001:第一应用产生第一文件。
第一应用在运行中会产生数据,第一应用产生的数据包括第一应用在运行过程中产生的隐私文件,用户通过第一应用保存的图片、视频、音频等文件,第一应用要进行更新时会获取到的APK文件,以及第一应用运行过程中所需的驱动程序等。
S1002:第一应用确定第一文件的文件类别。
第一应用将根据手机10提供的文件读写接口,判断第一文件的文件类别,以使第一应用能调用对应的接口写入数据。
举例来说,第一应用产生的文件可以按文件是否可共享给其他应用而分为隐私文件和公共文件,其中,公共文件为应用程序可以分享给其他应用程序的文件,例如图片、视频以及音频。隐私文件为不分享其他应用程序的文件,例如应用程序中的用户密码,聊天记录,数据库记录等。
在一些实施例中,如果第一文件属于公共文件,第一应用还会进一步将按文件类别对第一文件进行分类,判断第一文件属于视频、音频、相机拍摄的图片、短距接收或下载的文件、其他图片以及文档中哪一类。
S1003:第一应用通过第一文件写入接口写入第一文件。
第一应用根据第一文件的文件类别确定写入该第一文件所需要调用的接口,进而根据对应的接口写入第一文件。例如,调用第一文件写入接口,第一文件写入接口对应第一文件的文件类别。
在一些实施例中,手机10具有多个文件写入接口,文件写入接口可以包括隐私文件写入接口、公共文件写入接口,公共文件写入接口还包括视频写入子接口、音频写入子接口、相机拍摄的图片写入子接口、短距接收或下载的文件写入子接口、其他图片写入接口以及文档写入子接口。
S1004:手机10向第一应用获取第一应用的唯一标识。
手机10在接收到第一应用写入第一文件时,还会向第一应用获取第一应用的唯一标识,以确定第一文件所属的应用。
S1005:手机10根据第一文件写入接口确定第一文件的文件类别,并存储第一应用的唯一标识和文件类别。
手机10能根据第一应用写入第一文件时调用的文件写入接口或者接口参数确定文件类别。手机10还会将第一文件的文件类别、第一文件的绝对路径、第一应用的唯一标识存储至信息记录表中。
在一些实施例中,手机10可以根据第一应用调用的是有隐私文件写入接口、视频写入子接口、音频写入子接口、相机拍摄的图片写入子接口、其他图片写入接口还是文档写入子接口,确定第一文件是隐私文件,还是公共文件中的视频、音频、相机还是其他图片。
在另一些实施例中,在第一应用调用的是公共文件写入接口的情况下,手机10还可以根据第一应用调用的公共文件写入接口的类别参数确定第一文件的文件类别,其中,公共文件写入接口还包括视频、音频、相机拍摄的图片或视频、短距接收或下载的文件、其他图片文档等不同类别参数。
在另一些实施例中,手机10在接收到第一应用写入第一文件后,还会根据文件写入接口将第一文件写入手机10预制文件夹中对应的目录下,其中预制文件夹中包括各个文件类别。
示例性地,如图11中所示,界面1101示出了手机10为预制文件夹,预制文件夹下还具体包括图片、视频、音频以及文档文件夹,其中图片文件夹用于存放为其他图片写入接口写入的文件,视频文件夹用于存放视频写入子接口写入的文件,音频文件夹用于存放音频写入子接口写入的文件,文档文件夹用于存放文档写入子接口写入的文件。
在一些实施例中,由于隐私文件不分享其他应用程序的文件,在不删除第一应用的情况下,只有第一应用能对隐私文件夹中的数据进行读写,因此手机10不会显示存放隐私文件夹。
在另一些实施例中,手机10还会将第一文件的绝对路径、文件大小、创建时间等数据一起写入信息记录表。
下面结合图12对管理第一应用的数据的过程进行详细描述。
S1201:应用管理框架获取到管理第一应用的文件的请求。
手机10还包括如手机管家等应用,该应用用于通过应用管理框架对手机10中的数据进行管理,用户可以基于手机管家等应用对第一应用的数据进行管理。在手机10获取到用户对文件进行管理的操作时,手机10还将获取信息记录表中,所有文件所属的应用,然后将显示应用列表,用户可以点击应用列表中的目标应用,对目标应用的文件进行管理。
示例性地,参见图13中的(A),界面1301为手机10的主界面,手机10可以检测到作用于界面1301中手机管家图标1302的触控操作。响应于上述操作,手机10将运行手机管家应用,参见图13中的(B),界面1303为一种手机管家运行后的界面图,手机管家可以通过应用管理框架按应用程序和公共文件的分类对文件进行管理。
当手机10检测到作用于应用数据管理显示栏1304的触控操作,手机10将显示各个应用程序,以及各个应用程序所占用的存储空间大小,手机10获取到用户选中第一应用的操作,即手机10获取到管理第一应用的数据的请求。具体可参考上述图6中的(A)示出的界面,此处不再赘述。
S1202:应用管理框架将第一应用的文件按文件类别进行显示。
应用管理框架将根据信息记录表中属于第一应用的文件的文件类别,显示文件类别列表,具体可参考上述图6中的(B)示出的界面,此处不再赘述。在一些实施例中,应用管理框架仅用于获取第一应用的文件信息,还需要窗口管理器等框架才能在手机10的显示屏显示第一应用的文件的信息。
在一些实施例中,应用管理框架也可以先显示文件类别列表,然后在用户选中了目标文件类别的情 况下,再显示具有目标文件类别的文件的应用列表。举例来说,用户在如图13中的(B)所示的界面中选中公共文件管理的显示栏1305,响应于用户操作,参见图14中的(A),应用管理框架将把所有应用程序的数据按拍摄的照片、存储的图片、存储的视频、存储的音频以及存储的文档按界面1401所示进行显示,并显示各个类别的文件共占用的存储大小。
应用管理框架检测到作用于某一类别的文件的触控操作,应用管理框架将显示该类别的文件。应用管理框架在显示该类别的文件时,还能按文件所属的应用程序进行排序显示。参见图14中的(A)手机10检测到作用于“存储的图片”对应的显示栏1402的触控操作,手机10通过应用管理框架获取到文件数据显示如图14中的(B)所示的界面1403,界面1403将手机10中通过图片接口写入的数据进行了显示。
应用管理框架按不同排序方式对文件进行显示,例如按时间排序、按应用排序或者按大小排序。参考图14中的(B),界面1403包括控件1404,控件1404用于更改文件排序方式,应用管理框架检测到作用于控件1404的触控操作,参考图15中的(A),界面1501显示多种排序方式,包括按时间排序、按应用排序以及按大小排序。手机10检测到作用于按应用排序对应控件1502的触控操作,参考图15中的(B),界面1503示例性展示了将存储的图片按应用程序进行排序的结果,其中,包括视频应用和浏览器存储的图片。
S1203:应用管理框架获取到用户对目标文件进行第一操作的请求。
应用管理框架获取到作用于第一应用中目标文件的触控操作,表示用户需要对目标数据进行相应操作,可进行的操作包括移动、删除、复制、分享、打印以及重命名等。
在一些实施例中,用户在对目标数据进行第一操作之前,还可以查看目标文件的详细信息,例如文件名称、文件大小、创建时间等等。具体参考图16(A),用户通过点击界面1601中的图片1602的图标来选中视频应用存储的图片中的图片1602,参考图16中的(B),应用管理框架在界面1603中显示提示框1604,提示框1604示出了图片1602的详细信息,其中,包括名称:“目标文件.jpg”,所述应用:第一应用;图片大小:1.5MB,创建时间:2022.09.09。
用户还可以通过点击图片上的控件来实现对图片的操作,参考图17中的(A),用户通过点击界面1701图片1602图标上的控件1702,将显示如图17中的(B)所示的界面,其中界面1703中的提示框1704示出了用户可对图片1602进行的操作,例如分享、移动、复制和删除,用户可以根据需求选择需要对图片1602进行的操作。
S1204:应用管理框架将目标文件按第一操作进行处理。
应用管理框架根据获取到的用户对目标数据进行第一操作的请求,对目标数据进行处理。
示例性地,参考图18中的(A),应用管理框架检测到作用于提示框1704中删除图标1801的触控操作,手机10将删除图片1602。对应地,参考图18中的(B),界面1802中不再显示图片1602。
下面结合图19对手机10卸载第一应用的过程进行详细介绍。
S1901:应用管理框架获取到卸载第一应用的请求。
用户可以通过手机管家来删除应用程序,也可以直接对应用程序进行删除操作。当应用管理框架获取到上述用户操作时,即认为应用管理框架获取到卸载第一应用的请求。
参考如图6中的(B),用户可以通过手机管家删除视频应用,应用管理框架检测到作用于控件1064的触控操作,即可认为手机10获取到卸载视频应用的请求。
或者参考如图20中的(A),应用管理框架检测到作用于视频应用图标2001的长按操作,手机10将显示提示框2002,在手机10再检测到基于卸载控件2003的触控操作,即可认为手机10获取到卸载视频应用的请求。
S1902:应用管理框架获取第一应用的文件,并删除第一应用的隐私文件。
应用管理框架将根据信息记录表确定手机10中属于第一应用的数据,然后根据信息记录表中文件类别,确定第一应用的隐私文件。手机10在卸载第一应用时,将删除第一应用的隐私文件。
在一些实施例中,信息记录表中也可以不记录隐私文件,手机10将隐私文件存储在内部存储器中,应用管理框架将根据第一应用的唯一标识直接在内部存储器中读取第一应用的隐私文件。
S1903:应用管理框架判断是否存在公共文件。
应用管理框架在卸载第一应用时,还会根据信息记录表中文件类别判断是否存在公共文件,所述公 共文件可被其余应用程序读写。若判断结果为是,则执行步骤S1904,若判断结果为否,则完成对第一应用的卸载。
S1904:手机10提示第一应用公共文件的大小。
应用管理框架将根据信息记录表中第一应用的文件的文件类别,检测到手机10中还有第一应用的公共文件未删除时,应用管理框架将提示手机10中还存储有第一应用的公共文件的信息。
参考如图20中的(B),手机管家基于应用管理框架检测到删除视频应用的请求之后,将显示提示框2004,提示用户手机10中还存储有第一应用中的公共文件的信息。
在一些实施例中,手机10还会根据信息记录表中第一应用文件的文件类别,确定文件属于公共文件下的具体文件类别,例如,视频、音频、相机拍摄的图片、短距接收或下载的文件、其他图片以及文档等。然后,向用户提示上述各个文件类别下文件的大小。
S1905:应用管理框架获取用户对第一应用的公共文件的第二操作,基于第二操作对第一应用的公共文件进行处理。
用户可以基于手机10的提示,选择对第一应用的公共文件进行删除或者保留,应用管理框架将基于用户操作对第一应用的媒体数据进行删除或者保留。
在一些实施例中,应用管理框架卸载第一应用时还可以先对公共文件进行处理,再删除隐私文件。
综上所述,本申请实施例提供的应用数据管理方法,在终端中设置了指定的文件写入接口,通过应用程序写入数据时使用的接口就能确定存储空间中文件的文件类别,根据写入文件的应用的唯一标识能确定文件所属的应用。该方法无需耗费额外的人力去分析文件类型,不会产生文件类别分析出错,导致用户误删文件的情况。因此,终端100能将存储空间中的文件按应用程序进行分类,并对于每个应用程序的文件还能按文件类别进行分类,或者将文件按文件类别分类,在按应用程序分类。这样,使得用户能根据终端100对文件的分类结果对文件进行管理,既节省了人力资源,又提高了用户体验感。
为了解决用户无法便捷地管理存储空间的问题,本申请提供了一种应用数据管理装置,如图21所示,应用数据管理装置2100可以包括:检测单元2110、显示单元2120、获取单元2130以及确定单元2140。
检测单元2110用于检测用于访问终端设备的文件的第一操作,显示单元2120用于当检测到用于访问终端设备的文件的第一操作时显示第一界面,第一界面包括第一应用列表,第一应用列表中的应用为终端设备的文件所属的应用。
检测单元2110还用于检测选择第一应用列表中的第一应用的第二操作。显示单元2120还用于当检测到选择第一应用列表中的第一应用的第二操作时显示第二界面,第二界面包括第一文件类别列表,第一文件类别列表中的文件类别为预设的多个文件类别中的部分或全部。
检测单元2110还用于检测选择第一文件类别列表中的第一文件类别的第三操作,显示单元2120还用于当检测到选择第一文件类别列表中的第一文件类别时,显示第三界面,第三界面包括第一应用的属于第一文件类别的文件。
在另一些实施例中,检测单元2110还用于检测用于访问终端设备的文件的第六操作,显示单元2120还用于当检测到用于访问终端设备的文件的第六操作时显示第四界面,第四界面包括第一文件类别列表,第一文件类别列表中的文件类别为终端设备的文件所属的文件类别,第一文件类别列表中的文件类别为预设的多个文件类别中的部分或全部;
在另一些实施例中,检测单元2110还用于检测选择第一文件类别列表中的第一文件类别的第七操作,显示单元2120还用于当检测到选择第一文件类别列表中的第一文件类别的第七操作时显示第五界面,第五界面包括第一应用列表,第一应用列表中的应用为属于第一文件类别列表的文件所属的应用。
在另一些实施例中,检测单元2110还用于检测选择第一应用列表中的第一应用的第八操作,显示单元2120还用于当检测到选择第一应用列表中的第一应用的第八操作时,显示第六界面,第六界面包括第一文件类别的属于第一应用的文件。
在另一些实施例中,检测单元2110还用于检测到将第一文件写入终端设备的第四操作;获取单元2130用于响应于第四操作,获取第一文件所属的应用的唯一标识并确定第一文件所属的文件类别,其中,第一文件所属的文件类别为预设的多个文件类别中的一个;确定单元2140还用于在信息记录表中记录第一文件所属的应用的唯一标识和第一文件所属的文件类别。
在另一些实施例中,检测单元2110还用于检测通过调用第一文件写入接口将第一文件写入终端设备的第四操作;获取单元2130还用于获取调用第一文件写入接口的应用的唯一标识;确定单元2140还用于将第一文件写入接口对应的文件类别确定为第一文件所属的文件类别,其中,预设的多个文件类别分别对应一个文件写入接口;或者,确定单元2140还用于将第一文件写入接口的类别参数所指示的文件类别确定为第一文件所属的文件类别,其中,预设的多个文件类别分别对应第一文件接口的一个类别参数。
在另一些实施例中,第一文件写入接口位于终端设备的框架层。
在另一些实施例中,检测单元2110还用于检测到卸载第一应用的第五操作;确定单元2140还用于根据信息记录表中多个文件所属的应用的唯一标识,确定第一应用的多个文件;确定单元2140还用于根据信息记录表中第一应用的多个文件的文件类别和文件大小,确定第一应用的文件中不同文件类别的文件占用的存储空间大小;显示单元2120还用于显示第一应用的文件中不同文件类别的文件分别占用的存储空间大小。
综上所述,本申请实施例提供的应用数据管理装置,在终端中设置了指定的文件写入接口,通过应用程序写入数据时使用的接口就能确定存储空间中文件的文件类别,根据写入文件的应用的唯一标识能确定文件所属的应用。该装置无需耗费额外的人力去分析文件类型,不会产生文件类别分析出错,导致用户误删文件的情况。因此,终端100能将存储空间中的文件按应用程序进行分类,并对于每个应用程序的文件还能按文件类别进行分类,或者将文件按文件类别分类,在按应用程序分类。这样,使得用户能根据终端100对文件的分类结果对文件进行管理,既节省了人力资源,又提高了用户体验感。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。
所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。
所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(read only memory,ROM)或随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可存储程序代码的介质。

Claims (17)

  1. 一种应用数据管理方法,应用于终端设备,其特征在于,所述方法包括:
    当检测到用于访问所述终端设备的文件的第一操作时显示第一界面,所述第一界面包括第一应用列表,所述第一应用列表中的应用为所述终端设备的文件所属的应用;
    当检测到选择所述第一应用列表中的第一应用的第二操作时显示第二界面,所述第二界面包括第一文件类别列表,所述第一文件类别列表中的文件类别为所述第一应用的文件所属的文件类别,且所述第一文件类别列表中的文件类别为所述终端设备的系统预设的多个文件类别中的部分或全部;
    当检测到选择所述第一文件类别列表中的第一文件类别的第三操作时,显示第三界面,所述第三界面包括所述第一应用的属于所述第一文件类别的文件。
  2. 根据权利要求1所述的应用数据管理方法,其特征在于,
    当检测到选择所述第一应用列表中的第二应用的第四操作时显示第四界面,所述第四界面包括第二文件类别列表,所述第二文件类别列表中的文件类别为所述第二应用的文件所属的文件类别,且所述第二文件类别列表中的文件类别为所述系统预设的多个文件类别中的部分或全部;
    当检测到选择所述第二文件类别列表中的第二文件类别的第五操作时,显示第五界面,所述第五界面包括所述第二应用的属于所述第二文件类别的文件。
  3. 根据权利要求2所述的应用数据管理方法,其特征在于,
    所述第一应用列表和所述第一文件类别列表是根据所述终端设备的信息记录表确定的,所述信息记录表包括所述终端设备的文件所属的应用的唯一标识和所属的文件类别。
  4. 根据权利要求3所述的应用数据管理方法,其特征在于,所述方法还包括:
    检测到将所述第一文件写入所述终端设备的第六操作;
    响应于所述第六操作,获取所述第一文件所属的应用的唯一标识并确定所述第一文件所属的文件类别,其中,所述第一文件所属的文件类别为所述系统预设的多个文件类别中的一个;
    在所述信息记录表中记录所述第一文件所属的应用的唯一标识和所述第一文件所属的文件类别。
  5. 根据权利要求4所述的应用数据管理方法,其特征在于,
    所述检测到将所述第一文件写入所述终端设备的第六操作包括,检测到通过调用第一文件写入接口将所述第一文件写入所述终端设备的所述第六操作;
    所述获取所述第一文件所属的应用的唯一标识包括:获取调用所述第一文件写入接口的应用的唯一标识;和/或
    所述确定所述第一文件所属的文件类别包括:
    将所述第一文件写入接口对应的文件类别确定为所述第一文件所属的文件类别,其中,所述系统预设的多个文件类别分别对应一个文件写入接口;或者,将所述第一文件写入接口的类别参数所指示的文件类别确定为所述第一文件所属的文件类别,其中,所述系统预设的多个文件类别分别对应所述第一文件接口的一个类别参数。
  6. 根据权利要求5所述的应用数据管理方法,其特征在于,
    所述第一文件写入接口位于所述终端设备的框架层。
  7. 根据权利要求3至6任一所述的应用数据管理方法,其特征在于,所述方法还包括:
    检测到卸载所述第一应用的第七操作;
    根据所述信息记录表中多个文件所属的应用的唯一标识,确定所述第一应用的多个文件;
    根据所述信息记录表中所述第一应用的多个文件的文件类别和文件大小,确定所述第一应用的文件中不同文件类别的文件占用的存储空间大小;
    显示所述第一应用的文件中不同文件类别的文件分别占用的存储空间大小。
  8. 一种应用数据管理方法,应用于终端设备,其特征在于,所述方法包括:
    当检测到用于访问所述终端设备的文件的第一操作时显示第一界面,所述第一界面包括第一文件类别列表,所述第一文件类别列表中的文件类别为所述终端设备的文件所属的文件类别,且所述第一文件类别列表中的文件类别为所述终端设备的系统预设的多个文件类别中的部分或全部;
    当检测到选择所述第一文件类别列表中的第一文件类别的第二操作时显示第二界面,所述第二界面包括第一应用列表,所述第一应用列表中的应用为属于所述第一文件类别列表的文件所属的应用;
    当检测到选择所述第一应用列表中的第一应用的第三操作时,显示第三界面,所述第三界面包括所述第一文件类别的属于所述第一应用的文件。
  9. 根据权利要求8所述的应用数据管理方法,其特征在于,
    所述第一应用列表和所述第一文件类别列表是根据所述终端设备的信息记录表确定的,所述信息记录表包括所述终端设备的文件所属的应用的唯一标识和所属的文件类别。
  10. 根据权利要求9所述的应用数据管理方法,其特征在于,所述方法还包括:
    检测到将所述第一文件写入所述终端设备的第四操作;
    响应于所述第四操作,获取所述第一文件所属的应用的唯一标识并确定所述第一文件所属的文件类别,其中,所述第一文件所属的文件类别为所述系统预设的多个文件类别中的一个;
    在所述信息记录表中记录所述第一文件所属的应用的唯一标识和所述第一文件所属的文件类别。
  11. 根据权利要求10所述的应用数据管理方法,其特征在于,
    所述检测到将所述第一文件写入所述终端设备的第四操作包括,检测到通过调用第一文件写入接口将所述第一文件写入所述终端设备的所述第四操作;
    所述获取所述第一文件所属的应用的唯一标识包括:获取调用所述第一文件写入接口的应用的唯一标识;和/或
    所述确定所述第一文件所属的文件类别包括:
    将所述第一文件写入接口对应的文件类别确定为所述第一文件所属的文件类别,其中,所述系统预设的多个文件类别分别对应一个文件写入接口;或者,将所述第一文件写入接口的类别参数所指示的文件类别确定为所述第一文件所属的文件类别,其中,所述预设的多个文件类别分别对应所述第一文件接口的一个类别参数。
  12. 根据权利要求11所述的应用数据管理方法,其特征在于,
    所述第一文件写入接口位于所述终端设备的框架层。
  13. 根据权利要求9至12任一所述的应用数据管理方法,其特征在于,所述方法还包括:
    检测到卸载所述第一应用的第五操作;
    根据所述信息记录表中多个文件所属的应用的唯一标识,确定所述第一应用的多个文件;
    根据所述信息记录表中所述第一应用的多个文件的文件类别和文件大小,确定所述第一应用的文件中不同文件类别的文件占用的存储空间大小;
    显示所述第一应用的文件中不同文件类别的文件分别占用的存储空间大小。
  14. 一种应用数据管理方法,应用于终端设备,其特征在于,所述方法包括:
    检测到将第一文件写入所述终端设备的第一操作;
    响应于所述第一操作,获取所述第一文件所属的应用的唯一标识并确定所述第一文件所属的类别,其中,所述第一文件所属的类别为所述终端设备的系统预设的多个类别中的一个;
    记录所述第一文件所属的应用的唯一标识和所述第一文件所属的文件类别。
  15. 一种电子设备,其特征在于,包括处理器和存储器,所述存储器用于存储指令,所述处理器用于执行所述指令,当所述处理器执行所述指令时,执行如权利要求1至7中任一项所述的方法,或者执行如权利要求8至13中任一项所述的方法,或者执行如权利要求14所述的方法。
  16. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,在被电子设备执行时,所述电子设备执行如权利要求1至7中任一项所述的方法,或者执行如权利要求8至13中任一项所述的方法,或者执行如权利要求14所述的方法。
  17. 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1至7中任一项所述的方法,或者执行如权利要求8至13中任一项所述的方法,或者执行如权利要求14所述的方法。
PCT/CN2023/119139 2022-09-30 2023-09-15 应用数据管理方法、设备、产品及介质 WO2024067167A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211215773.2A CN117851338A (zh) 2022-09-30 2022-09-30 应用数据管理方法、设备、产品及介质
CN202211215773.2 2022-09-30

Publications (1)

Publication Number Publication Date
WO2024067167A1 true WO2024067167A1 (zh) 2024-04-04

Family

ID=90476114

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/119139 WO2024067167A1 (zh) 2022-09-30 2023-09-15 应用数据管理方法、设备、产品及介质

Country Status (2)

Country Link
CN (1) CN117851338A (zh)
WO (1) WO2024067167A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130226975A1 (en) * 2012-02-29 2013-08-29 Pantech Co., Ltd. Method for file management and mobile device using the same
WO2020000445A1 (zh) * 2018-06-29 2020-01-02 华为技术有限公司 一种浏览应用文件夹的方法及电子设备
CN111104380A (zh) * 2019-11-27 2020-05-05 维沃移动通信有限公司 应用文件管理方法、装置、移动终端及存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130226975A1 (en) * 2012-02-29 2013-08-29 Pantech Co., Ltd. Method for file management and mobile device using the same
WO2020000445A1 (zh) * 2018-06-29 2020-01-02 华为技术有限公司 一种浏览应用文件夹的方法及电子设备
CN111104380A (zh) * 2019-11-27 2020-05-05 维沃移动通信有限公司 应用文件管理方法、装置、移动终端及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "The folder of the mobile phone being in a disorder, but does not understand and being afraid of deleting the folder?", 18 March 2020 (2020-03-18), pages 1 - 10, XP093151545, Retrieved from the Internet <URL:https://cloud.tencent.com/developer/news/596142> [retrieved on 20240415] *

Also Published As

Publication number Publication date
CN117851338A (zh) 2024-04-09

Similar Documents

Publication Publication Date Title
WO2021082835A1 (zh) 启动功能的方法及电子设备
JP2021526332A (ja) アプリケーション機能の実施方法及び電子装置
CN114816167B (zh) 应用图标的显示方法、电子设备及可读存储介质
CN110865837B (zh) 一种进行系统升级的方法和终端
JP7201827B2 (ja) 画像分類方法及び電子デバイス
WO2021185352A1 (zh) 一种版本升级方法及相关装置
WO2023051355A1 (zh) 权限检查的方法和电子设备
WO2022253158A1 (zh) 一种用户隐私保护方法及装置
CN115481444B (zh) 文件保护方法及电子设备
WO2024067167A1 (zh) 应用数据管理方法、设备、产品及介质
WO2020062192A1 (zh) 一种操作控制方法及电子设备
WO2021238376A1 (zh) 功能包的加载方法、装置、服务器和电子设备
KR20190098516A (ko) 어플리케이션과 관련된 데이터를 관리하기 위한 방법 및 그 전자 장치
US20150119008A1 (en) Method of reproducing contents and electronic device thereof
EP4325356A1 (en) Desktop sharing method and electronic device
WO2024087808A1 (zh) 界面显示方法及电子设备
CN114706633B (zh) 预加载方法、电子设备及存储介质
WO2024046184A1 (zh) 一种文件管理、应用管理的方法和电子设备
WO2023072241A1 (zh) 一种媒体文件管理方法及相关装置
WO2024017211A1 (zh) 一种任务接续方法、电子设备、程序产品及介质
WO2024032022A1 (zh) 一种应用图标的可视化方法和设备
WO2023061298A1 (zh) 一种图片备份系统、方法与设备
WO2023029993A1 (zh) 一种搜索方法和电子设备
EP4339762A1 (en) File migration method, electronic device, and storage medium
WO2023169212A1 (zh) 一种识别应用程序中sdk的方法、终端及服务器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23870401

Country of ref document: EP

Kind code of ref document: A1