CN109408465B - File attribution information recording method, device, storage medium and terminal - Google Patents

File attribution information recording method, device, storage medium and terminal Download PDF

Info

Publication number
CN109408465B
CN109408465B CN201811270044.0A CN201811270044A CN109408465B CN 109408465 B CN109408465 B CN 109408465B CN 201811270044 A CN201811270044 A CN 201811270044A CN 109408465 B CN109408465 B CN 109408465B
Authority
CN
China
Prior art keywords
file
attribution information
application program
file system
creating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811270044.0A
Other languages
Chinese (zh)
Other versions
CN109408465A (en
Inventor
祝杰民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811270044.0A priority Critical patent/CN109408465B/en
Publication of CN109408465A publication Critical patent/CN109408465A/en
Application granted granted Critical
Publication of CN109408465B publication Critical patent/CN109408465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a file attribution information recording method and device, a storage medium and a terminal. The method comprises the following steps: monitoring the creating operation of the first file; determining a target application program which initiates the creating operation; and recording the identity information of the target application program as the attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium. By adopting the technical scheme, the identity information of the application program for creating the file can be acquired when the file is created, and the identity information is stored into the bottom file system as the file attribution information, and the bottom file system is realized based on the physical storage medium, so that the owner of the file can be accurately and persistently recorded, and the subsequent targeted management of the file is facilitated.

Description

File attribution information recording method, device, storage medium and terminal
Technical Field
The embodiment of the application relates to the technical field of file management, in particular to a method, a device, a storage medium and a terminal for recording file attribution information.
Background
At present, intelligent terminals become necessary electronic equipment in daily life of most users. Along with the rapid development of the intelligent terminal technology, the functions in the intelligent terminal are more and more perfect, and the various use requirements of users can be met.
For many users, many applications are generally installed in the intelligent terminal for daily life and work. Generally, the application programs have the authority to operate the storage in the terminal, and more files can be generated in time and month, and useless garbage files are not lacked. For some files, the terminal does not provide an effective scheme for recording the attribution information of the files, and inconvenience is brought to the aspects of file management and the like.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and a terminal for recording the attribution information of files in the terminal, which can record the attribution information of the files in the terminal and facilitate file management.
In a first aspect, an embodiment of the present application provides a method for recording file attribution information, including:
monitoring the creating operation of the first file;
determining a target application program which initiates the creating operation;
and recording the identity information of the target application program as the attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium.
In a second aspect, an embodiment of the present application provides a file attribution information recording apparatus, including:
the creating operation monitoring module is used for monitoring creating operation of the first file;
the application program determining module is used for determining a target application program for initiating the creating operation when the creating operation of the first file is monitored;
and the attribution information recording module is used for recording the identity information of the target application program as the attribution information of the first file into a bottom file system, wherein the bottom file system is realized based on a physical storage medium.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements a file attribution information recording method according to an embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the file attribution information recording method according to the embodiment of the present application.
According to the file attribution information recording scheme provided in the embodiment of the application, when the creation operation of the first file is monitored, the target application program initiating the creation operation is determined, the identity information of the target application program is used as the attribution information of the first file and is recorded to the bottom file system, wherein the bottom file system is realized on the basis of a physical storage medium. By adopting the technical scheme, the identity information of the application program for creating the file can be acquired when the file is created, and the identity information is stored into the bottom file system as the file attribution information, and the bottom file system is realized based on the physical storage medium, so that the owner of the file can be accurately and persistently recorded, and the subsequent targeted management of the file is facilitated.
Drawings
Fig. 1 is a schematic flowchart of a method for recording file attribution information according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another file attribution information recording method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another file attribution information recording method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a file attribution information recording and acquiring process according to an embodiment of the present application;
fig. 5 is a block diagram of a file attribution information recording device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another terminal provided in the embodiment of the present application.
Detailed Description
The technical scheme of the application is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart illustrating a file attribution information recording method according to an embodiment of the present application, where the method may be executed by a file attribution information recording device, where the device may be implemented by software and/or hardware, and may be generally integrated in a terminal. As shown in fig. 1, the method includes:
step 101, monitoring the creating operation of the first file.
For example, the terminal in the embodiment of the present application may include a device such as a mobile phone, a tablet computer, and a notebook computer, which is installed with an operating system. The type of the operating system is not limited in the embodiment of the present application, and may be, for example, an Android operating system, a Windows operating system, an apple operating system (ios), and the like.
In the terminal, all installed application programs have the authority of operating the terminal to store, and more files including junk files can be generated after long-term accumulation. When managing or otherwise operating a file in a terminal, it is usually necessary to perform a targeted process according to the attribution of the file, i.e. to which application the file belongs. In the related art, the attribution condition of the file is generally determined according to the storage path of the file, however, the files of all the application programs are not stored under the corresponding storage paths of the application programs, and therefore, the determination mode is not accurate. In the embodiment of the application, the attribution information of the file is determined at the beginning of file creation starting from the source of the file, and the attribution information of the file can be accurately obtained.
For example, when creating a file, an application program generally creates the file in a terminal storage through an application layer, and the final implementation is to create the file in a file system of a system bottom layer (such as a kerel layer). The terminal storage makes multiple use of a virtual file system, such as the SDcardFS file system. The virtual file system stored in the terminal is generally used for controlling file access permission, the operation and the parameters can be converted into the operation and the parameters of the bottom layer file system, one file object is correspondingly created in the bottom layer file system after the virtual file system layer creates the file object, the file object created in the virtual file system layer is only stored in the memory and disappears after power failure, and data in the real file is stored in the bottom layer file system. In the embodiment of the application, the file creating operation of the application program can be monitored in the corresponding virtual file system layer stored in the terminal. The first file may be any type of file created by any application, and the present application is not limited thereto.
Step 102, determining a target application program initiating the creation operation.
For example, when creating a file, an application program is generally initiated by an application process in the application program, and the application program to which the process identifier belongs may be determined according to a process identifier (pid) of the application process initiating the creation operation, so as to obtain a target application program. The pid is the identity of the process, the application program may contain a plurality of processes, the pid of each process is unique, and the pid can be used to identify the identity of the application program.
Optionally, the application identifier (uid) of the application program initiating the creation operation may also be obtained directly by using an existing interface, such as current _ uid, to determine the target application program. The uid is an identification of the application, and the uid of each application is unique, and the pid can be used to identify the identity of the application.
And 103, recording the identity information of the target application program as the attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium.
As described above, the underlying file system is used for actually storing file data and needs to be implemented based on a physical storage medium, and the data stored therein is not lost after power failure. Therefore, in the embodiment of the application, after the target application program is determined, the identity information of the target application program is recorded in the underlying file system as the attribution information of the file, so that persistent storage of the attribution information of the file is realized, and the attribution information of the file is not lost when the terminal is restarted.
For example, the identity information may include an application name, an application code, and an uid of an application, and the embodiment of the present application is not limited thereto.
The file attribution information recording method provided by the embodiment of the application determines a target application program initiating a creation operation when the creation operation of a first file is monitored, and records identity information of the target application program as attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium. By adopting the technical scheme, the identity information of the application program for creating the file can be acquired when the file is created, and the identity information is stored into the bottom file system as the file attribution information, and the bottom file system is realized based on the physical storage medium, so that the owner of the file can be accurately and persistently recorded, and the file can be conveniently managed in a targeted manner.
In some embodiments, the underlying File System comprises a Fourth generation Extended File System (EXT 4) or a Flash Friendly File System (F2 FS). EXT4 is a log file system under the Linux operating system, and the android system is based on the Linux kernel, so EXT4 can be used as the underlying file system. F2FS is a new open source flash (flash) file system specifically designed for NAND-based storage devices, also supporting the Linux operating system. The EXT4 or F2FS may reside in an Embedded multimedia memory Card (EMMC or EMMC). The EMMC generally adopts a unified MMC standard interface, encapsulates the nonvolatile flash memory and the MMC controller in one chip, and is a local storage solution generally adopted by a terminal.
In some embodiments, the monitoring of the creation of the first file comprises: monitoring a creating request of a first file initiated by an application program through calling a file creating interface of an application layer through a preset function added in a preset virtual file system; and when the creation request is monitored, determining that the creation operation of the first file is monitored. The method has the advantages that the file creation request can be monitored timely and accurately, and the file attribution information can be recorded quickly. When the application program creates a file, a file creation (file creation) interface of the application layer is called to create the file in the terminal storage, for example, when a user uses a camera application to take a picture, the camera application calls the file creation interface of the application layer to create a picture related file in the terminal storage. In the embodiment of the present application, a preset function, such as an SDcardFS file system, may be added to a preset virtual file system, such as an SDcardFS-SDcardFS _ create function, to implement a creation request for monitoring a file, and further implement a creation action for automatically identifying a file.
In some embodiments, the recording the identity information of the target application as attribution information of the first file to an underlying file system includes: acquiring identity information of the target application program to obtain attribution information of the first file; and recording the attribution information of the first file into the extended attribute of the underlying file system. The extended attribute (xattr) of the bottom file system is the characteristic of the Linux bottom file system, is used for recording and storing data customized by a user, has high access speed and small memory space occupation, and can quickly realize an interface provided by kernel. Illustratively, the identity information may be the uid of the application, which may be stored in xattr in the form of a string.
In some embodiments, after recording the identity information of the target application as attribution information of the first file to an underlying file system, the method further comprises: when an acquisition request of an application layer for attribution information of a first file is monitored, acquiring attribution information of the first file from the bottom layer file system through a preset interface realized in the preset virtual file system, and returning the attribution information to the application layer. The advantage of this arrangement is that the application layer can be supported to obtain the recorded file attribution information and perform subsequent operations according to the attribution information. For example, the implementation and definition of the preset interface may be used in an SDcardFS File System of kernel to obtain the uid character string recorded in the extension attribute xattr of the underlying File System, and then provide the uid character string to the upper layer application through a Virtual File System (VFS) mechanism of the kernel standard. Optionally, when a preset application program in the terminal, such as a housekeeping application program, needs to obtain the attribution information of the file, the application layer may initiate an attribution information obtaining request for the first file, and obtain the attribution information of the first file from the underlying file system through a preset interface in the SDcardFS file system.
In some embodiments, after obtaining attribution information of the first file from the underlying file system and returning the attribution information to the application layer, the method further includes: and determining the management strategy of the first file according to the attribution information. After the attribution information of the file is obtained, the file can be managed in a targeted manner according to the application program to which the file belongs, such as operations of compressing, deleting, format conversion, encryption, hiding and the like on the file, or a display mode of the file (for example, different icons are displayed in a file manager according to the application program to which the file belongs), a storage path, an operation authority and the like are controlled.
In some embodiments, the method and the device can also be used for tracking malicious applications, for example, security applications in the terminal, such as antivirus applications, when an abnormal file (such as a virus file) is detected, the application to which the abnormal file belongs may be determined by obtaining attribution information of the abnormal file, and then corresponding processing is performed on the application, such as risk prompt, operation authority control, uninstallation, and the like. By way of example, the embodiment of the present application may further include: detecting an abnormal file through a security application program, when a first abnormal file is detected, initiating an attribution information acquisition request aiming at the first abnormal file through an application layer, acquiring attribution information of the first abnormal file from a bottom layer file system through a preset interface realized in a preset virtual file system, and returning the attribution information to the security application program; and determining a corresponding abnormal application program according to the received attribution information through the security application program, and carrying out corresponding processing on the abnormal application program.
In some embodiments, the determining the management policy of the first file according to the attribution information includes: determining whether the corresponding target application program is in an uninstalled state or not according to the attribution information; and if so, clearing the first file. The method has the advantages that the residual files of the uninstalled application programs can be accurately positioned, so that the residual files are accurately cleared, and the storage space of the terminal is saved on the premise of avoiding mistaken deletion. Optionally, if the target application is not in the uninstalled state, that is, the user needs to continue using the application, the first file is reserved.
Fig. 2 is a schematic flowchart of another file attribution information recording method according to an embodiment of the present application, where the method includes the following steps:
step 201, monitoring a creation request of a first file initiated by an application program through a file creation interface of a calling application layer through a preset function added in a preset virtual file system.
Illustratively, the default virtual file system is the SDcardFS file system. A preset function, such as SDcardFS- > SDcardFS _ create function, may be added at the SDcardFS file system level in advance, and the function is used for listening to file creation requests.
Step 202, when the creation request is monitored, determining that the creation operation of the first file is monitored.
Step 203, determine the target application program which initiates the creation operation.
For example, the application program to which the creation operation is initiated may be determined according to the process identifier of the application process, and thus the target application program may be determined.
And step 204, acquiring the identity information of the target application program to obtain the attribution information of the first file.
For example, the identity information may be a uid corresponding to the application, and the uid is taken as attribution information of the first file.
Step 205, recording the attribution information of the first file into the extended attribute of the underlying file system.
Illustratively, the underlying file system may be EXT4 or F2 FS.
Step 206, when the request for acquiring the attribution information of the first file by the application layer is monitored, acquiring the attribution information of the first file from the bottom file system through a preset interface realized in a preset virtual file system, and returning the attribution information to the application layer.
And step 207, determining the management policy of the first file according to the attribution information.
According to the file attribution information recording method provided by the embodiment of the application, a file creation request initiated by an application program through calling a file creation interface of an application layer is monitored through a preset function added in a preset virtual file system, a corresponding target application program is determined according to an initiator of the creation request, and the identity information of the target application program is recorded as the file attribution information into the extended attribute of the underlying file system, so that the accurate and persistent recording of the file attribution information is realized, and the application layer can conveniently acquire the file attribution information at any time and perform targeted management on the corresponding file.
Fig. 3 is a schematic flowchart of another file attribution information recording method according to an embodiment of the present application, where the method includes:
step 301, monitoring a creation request of a first file initiated by an application program through calling a file creation interface of an application layer through a preset function in an SDcardFS file system layer.
For example, a preset function, such as SDcardFS- > SDcardFS _ create function, may be added to the SDcardFS file system layer in advance, and the function is used for listening to a file creation request.
Step 302, when the creation request is monitored, determining to monitor the creation operation of the first file.
Step 303, obtain the uid of the target application program that initiated the create operation.
Illustratively, the creation request is initiated by the application process, and when the creation request reaches the SDcardFS file system layer, the uid of the application program corresponding to the application process can be obtained through the current _ uid interface.
And step 304, recording the acquired uid as attribution information of the first file into an extended attribute of EXT 4.
In the embodiment of the present application, EXT4 may also be F2 FS.
Step 305, when it is monitored that the file manager application program sends out an attribution information obtaining request for the first file, obtaining the attribution information of the first file from the EXT4 through a preset interface in the SDcardFS file system layer, and returning the attribution information to the file manager application program through the VFS mechanism.
Generally, in order to effectively manage files in a terminal, a housekeeping application program may be installed, where the application program may be an application program installed by default when the terminal leaves a factory, or a third-party application program downloaded and installed by a user, and the application program may have a variety of names, such as "file housekeeping", "cell phone housekeeping", and "garbage cleaning master", and all belong to the file housekeeping application program described in the embodiments of the present application.
For example, kernel may open a section of memory buffer in the expanded attribute xattr of the EXT4 or F2FS file system, and the SDcardFS file system may store the obtained string of the uid of the application in the buffer, and fetch the uid from the memory buffer of the corresponding node when necessary.
Fig. 4 is a schematic diagram of a file attribution information recording and acquiring process according to an embodiment of the present disclosure, and as shown in fig. 4, when an application creates a file, a uid of the application is automatically recognized, and the uid is recorded in an extended attribute of an underlying file system through an SDcardFS file system, and when a management application such as a manager needs to acquire the uid, the uid is acquired from the extended attribute by calling a preset interface in the SDcardFS file system.
Step 306, determining whether the corresponding target application program is in an uninstalled state or not according to the attribution information through the file manager application program, and if so, executing step 307; otherwise, step 308 is performed.
For example, a white list of the application programs may be set, information (such as a name or a uid) of the currently installed application program in the terminal is maintained in the white list, and when it is detected that the first application program is uninstalled, the information corresponding to the first application program is deleted in the white list. When judging whether the target application program is in the uninstalled state, inquiring in a white list, and if the information corresponding to the target application program is not inquired, indicating that the target application program is uninstalled and is in the uninstalled state.
And 307, deleting the first file through the file manager application program.
When the target application program is determined to be uninstalled, it is indicated that the user does not need to use the target application program any more, the file belonging to the target application program also becomes a garbage file to be cleaned, generally, the unloaded residual file is cleaned in time, the storage space of the terminal can be effectively saved, and the system burden is reduced.
And 308, displaying an icon of the target application program at a position corresponding to the first file in the file manager application program.
For example, there may be some inherent display logic in the file manager application program to display the scanned files in a sorted manner, such as in a sorted manner according to a file format, so as to facilitate a user to see which application program each file belongs to, and to display an icon of the application program to which the current file belongs at a corresponding position (e.g., in front of or behind a file name) of the current file.
The method for recording the file attribution information, provided by the embodiment of the application, acquires the attribution information of a file when the file is created and records the attribution information into the extended attribute of a bottom layer file system, so that the accurate and persistent recording of the file attribution information is realized, when a housekeeping application program needs to acquire the attribution information of the file, a uid of an application program serving as the attribution information is acquired from the bottom layer file system, the file is subjected to targeted processing according to whether the corresponding application program is in an uninstalled state, and a file management scheme in a terminal is optimized.
Fig. 5 is a block diagram of a file attribution information recording device according to an embodiment of the present application, where the device may be implemented by software and/or hardware, and is generally integrated in a terminal, and can record file attribution information by executing a file attribution information recording method. As shown in fig. 5, the apparatus includes:
a creating operation monitoring module 501, configured to monitor a creating operation of a first file;
an application determining module 502, configured to determine, when a creating operation of a first file is monitored, a target application that initiates the creating operation;
the attribution information recording module 503 is configured to record the identity information of the target application as attribution information of the first file to an underlying file system, where the underlying file system is implemented based on a physical storage medium.
The file attribution information recording device provided in the embodiment of the application determines a target application program initiating a creation operation when the creation operation of a first file is monitored, and records identity information of the target application program as attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium. By adopting the technical scheme, the identity information of the application program for creating the file can be acquired when the file is created, and the identity information is stored into the bottom file system as the file attribution information, and the bottom file system is realized based on the physical storage medium, so that the owner of the file can be accurately and persistently recorded, and the subsequent targeted management of the file is facilitated.
Optionally, the underlying file system includes a fourth generation extended file system EXT4 or a friendly flash file system F2 FS.
Optionally, the monitoring the creation operation of the first file includes:
monitoring a creating request of a first file initiated by an application program through calling a file creating interface of an application layer through a preset function added in a preset virtual file system;
and when the creation request is monitored, determining that the creation operation of the first file is monitored.
Optionally, the recording the identity information of the target application as the attribution information of the first file to an underlying file system includes:
acquiring identity information of the target application program to obtain attribution information of the first file;
and recording the attribution information of the first file into the extended attribute of the underlying file system.
Optionally, the apparatus further comprises:
and the attribution information acquisition module is used for acquiring the attribution information of the first file from the bottom layer file system through a preset interface realized in the preset virtual file system and returning the attribution information to the application layer when monitoring an attribution information acquisition request of the application layer for the first file after recording the identity information of the target application program as the attribution information of the first file into the bottom layer file system.
Optionally, the apparatus further comprises:
and the management policy determining module is used for determining the management policy of the first file according to the attribution information after acquiring the attribution information of the first file from the bottom layer file system and returning the attribution information to the application layer.
Optionally, the determining the management policy of the first file according to the attribution information includes:
determining whether the corresponding target application program is in an uninstalled state or not according to the attribution information;
and if so, clearing the first file.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for recording file attribution information, the method including:
monitoring the creating operation of the first file;
determining a target application program which initiates the creating operation;
and recording the identity information of the target application program as the attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the file attribution information recording operation described above, and may also perform related operations in the file attribution information recording method provided in any embodiment of the present application.
The embodiment of the application provides a terminal, and the terminal can be integrated with the file attribution information recording device provided by the embodiment of the application. Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application. The terminal 600 may include: the file attribution information recording method comprises a memory 601, a processor 602 and a computer program stored on the memory 601 and capable of being run by the processor 602, wherein the processor 602 executes the computer program to realize the file attribution information recording method according to the embodiment of the application.
The terminal provided by the embodiment of the application can acquire the identity information of the application program for creating the file when the file is created, and stores the identity information as the file attribution information into the bottom file system, and the bottom file system is realized based on the physical storage medium, so that the owner of the file can be accurately and persistently recorded, and the subsequent targeted management of the file is facilitated.
Fig. 7 is a schematic structural diagram of another terminal provided in the embodiment of the present application, where the terminal may include: a housing (not shown), a memory 701, a Central Processing Unit (CPU) 702 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU702 and the memory 701 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the terminal; the memory 701 is used for storing executable program codes; the CPU702 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 701 to implement the steps of:
monitoring the creating operation of the first file;
determining a target application program which initiates the creating operation;
and recording the identity information of the target application program as the attribution information of the first file to a bottom file system, wherein the bottom file system is realized based on a physical storage medium.
The terminal further comprises: peripheral interfaces 703, RF (Radio Frequency) circuitry 705, audio circuitry 706, speakers 711, power management chip 708, input/output (I/O) subsystems 709, other input/control devices 710, touch screen 712, other input/control devices 710, and external port 704, which communicate via one or more communication buses or signal lines 707.
It should be understood that the illustrated terminal 700 is merely one example of a terminal and that the terminal 700 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail the terminal for recording file attribution information provided in this embodiment, and the terminal is a mobile phone as an example.
A memory 701, the memory 701 being accessible by the CPU702, the peripheral interface 703, and the like, the memory 701 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 703, said peripheral interface 703 may connect input and output peripherals of the device to the CPU702 and the memory 701.
An I/O subsystem 709, which I/O subsystem 709 may connect input and output peripherals on the device, such as a touch screen 712 and other input/control devices 710, to the peripheral interface 703. The I/O subsystem 709 may include a display controller 7091 and one or more input controllers 7092 for controlling other input/control devices 710. Where one or more input controllers 7092 receive electrical signals from or transmit electrical signals to other input/control devices 710, the other input/control devices 710 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 7092 may be connected to any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 712, the touch screen 712 being an input interface and an output interface between the user terminal and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 7091 in the I/O subsystem 709 receives electrical signals from the touch screen 712 or transmits electrical signals to the touch screen 712. The touch screen 712 detects a contact on the touch screen, and the display controller 7091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 712, i.e., implements a human-computer interaction, and the user interface object displayed on the touch screen 712 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 705 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 705 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 705 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 705 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 706 is mainly used to receive audio data from the peripheral interface 703, convert the audio data into an electric signal, and transmit the electric signal to the speaker 711.
The speaker 711 is used to convert the voice signal received by the handset from the wireless network through the RF circuit 705 into sound and play the sound to the user.
And a power management chip 708 for supplying power and managing power to the hardware connected to the CPU702, the I/O subsystem, and the peripheral interface.
The file attribution information recording device, the storage medium and the terminal provided in the above embodiments can execute the file attribution information recording method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details that are not described in detail in the above embodiments may be referred to a file attribution information recording method provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (5)

1. A file attribution information recording method, comprising:
monitoring a creating request of a first file initiated by an application program through calling a file creating interface of an application layer through a preset function added in a preset virtual file system;
when the creation request is monitored, determining that the creation operation of the first file is monitored;
determining a target application program which initiates the creating operation;
acquiring identity information of the target application program to obtain attribution information of the first file;
recording attribution information of the first file into an extended attribute of a bottom layer file system, wherein the bottom layer file system is realized on the basis of a physical storage medium;
when an acquisition request of an application layer for attribution information of a first file is monitored, acquiring attribution information of the first file from a bottom file system through a preset interface realized in a preset virtual file system and returning the attribution information to the application layer;
determining whether the corresponding target application program is in an uninstalled state or not according to the attribution information through the file manager application program;
if so, clearing the first file; and if not, displaying an icon of the target application program at a position corresponding to the first file in the file manager application program.
2. The method of claim 1, wherein the underlying file system comprises a fourth generation extended file system EXT4 or a friendly flash file system F2 FS.
3. A file belonging information recording apparatus, comprising:
the system comprises a creating operation monitoring module, a creating operation monitoring module and a file creating module, wherein the creating operation monitoring module is used for monitoring a creating request of a first file initiated by an application program through a file creating interface of an application layer by adding a preset function in a preset virtual file system, and determining that the creating operation of the first file is monitored when the creating request is monitored;
the application program determining module is used for determining a target application program for initiating the creating operation when the creating operation of the first file is monitored;
the attribution information recording module is used for acquiring the identity information of the target application program, acquiring the attribution information of the first file, and recording the attribution information of the first file into the extended attribute of a bottom file system, wherein the bottom file system is realized on the basis of a physical storage medium;
the attribution information acquisition module is used for acquiring the attribution information of the first file from the bottom layer file system through a preset interface realized in the preset virtual file system and returning the attribution information to the application layer when monitoring an attribution information acquisition request of the application layer for the first file after recording the identity information of the target application program as the attribution information of the first file into the bottom layer file system;
the management strategy determining module is used for determining whether the corresponding target application program is in an uninstalled state or not according to the attribution information through the file manager application program; if so, clearing the first file; and if not, displaying an icon of the target application program at a position corresponding to the first file in the file manager application program.
4. A computer-readable storage medium on which a computer program is stored, the program being characterized by implementing the file attribution information recording method according to any one of claims 1-2 when executed by a processor.
5. A terminal comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the file attribution information recording method according to any one of claims 1-2 when executing the computer program.
CN201811270044.0A 2018-10-29 2018-10-29 File attribution information recording method, device, storage medium and terminal Active CN109408465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811270044.0A CN109408465B (en) 2018-10-29 2018-10-29 File attribution information recording method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811270044.0A CN109408465B (en) 2018-10-29 2018-10-29 File attribution information recording method, device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN109408465A CN109408465A (en) 2019-03-01
CN109408465B true CN109408465B (en) 2021-07-13

Family

ID=65469804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811270044.0A Active CN109408465B (en) 2018-10-29 2018-10-29 File attribution information recording method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN109408465B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569171B (en) * 2019-09-09 2023-03-31 北京安云世纪科技有限公司 File monitoring method and device
CN112817596A (en) * 2019-10-31 2021-05-18 深圳市万普拉斯科技有限公司 Method and device for quickly acquiring file information and electronic equipment
CN114996226B (en) * 2021-11-05 2023-03-31 荣耀终端有限公司 Icon detection method, electronic device, readable storage medium, and program product
CN114327662A (en) * 2021-12-30 2022-04-12 山石网科通信技术股份有限公司 Operating system processing method and device, storage medium and processor
CN115630020B (en) * 2022-12-23 2023-03-10 北京亿赛通科技发展有限责任公司 Method and device for multiplexing safety scanning result and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591680A (en) * 2011-12-19 2012-07-18 深圳桑菲消费通信有限公司 Method for automatically deleting and unloading software related files
CN107220132A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 A kind of monitor method, equipment and the storage medium of document creation information
CN107832403A (en) * 2017-11-02 2018-03-23 武汉斗鱼网络科技有限公司 Catalogue file management method, device, electric terminal and readable storage medium storing program for executing
CN108153869A (en) * 2017-12-25 2018-06-12 北京安云世纪科技有限公司 Document track method and device, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8190558B2 (en) * 2008-03-04 2012-05-29 International Business Machines Corporation Non-programmatic access to enterprise messaging administration
CN106055363B (en) * 2016-05-31 2017-11-14 广东欧珀移动通信有限公司 A kind of method and mobile terminal for identifying file
CN107766351B (en) * 2016-08-16 2020-12-25 腾讯科技(深圳)有限公司 File directory identification method and device
CN108038167A (en) * 2017-12-06 2018-05-15 云城(北京)数据科技有限公司 Identification method, device and the distributed file storage system of file directory
CN108460128B (en) * 2018-03-01 2020-11-20 Oppo广东移动通信有限公司 Document management method and device, electronic device and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591680A (en) * 2011-12-19 2012-07-18 深圳桑菲消费通信有限公司 Method for automatically deleting and unloading software related files
CN107220132A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 A kind of monitor method, equipment and the storage medium of document creation information
CN107832403A (en) * 2017-11-02 2018-03-23 武汉斗鱼网络科技有限公司 Catalogue file management method, device, electric terminal and readable storage medium storing program for executing
CN108153869A (en) * 2017-12-25 2018-06-12 北京安云世纪科技有限公司 Document track method and device, equipment and storage medium

Also Published As

Publication number Publication date
CN109408465A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109408465B (en) File attribution information recording method, device, storage medium and terminal
CN107402835B (en) Application program exception handling method and device, storage medium and mobile terminal
CN108270786B (en) Authority management method and device of application program, storage medium and intelligent terminal
CN109960507B (en) Compiling optimization method and device, storage medium, intelligent terminal and server
CN107734616B (en) Application program closing method and device, storage medium and electronic equipment
CN107748685B (en) Application program starting control method and device, terminal equipment and storage medium
CN107622203B (en) Sensitive information protection method and device, storage medium and electronic equipment
CN108153647B (en) Log processing method and device, terminal equipment and storage medium
CN107797841B (en) Window control method and device, terminal equipment and storage medium
CN108038231B (en) Log processing method and device, terminal equipment and storage medium
CN108710515B (en) Application preloading method and device, storage medium and terminal
CN108804153B (en) Application program preloading method and device, storage medium and terminal
CN107026933B (en) Multi-open application message management method and device and intelligent terminal
CN108681474B (en) Application preloading method and device, storage medium and terminal
CN106062763A (en) Method and apparatus for displaying application and picture, and electronic device
CN109033247B (en) Application program management method and device, storage medium and terminal
CN107729764A (en) Guard method, device, storage medium and the electronic equipment of sensitive information
CN107844341B (en) Process starting control method and device, storage medium and mobile terminal
KR20200140555A (en) Electronic device for switching between a dual standby mode and a single standby mode and method for the same
CN107423064A (en) Message treatment method, device, terminal device and storage medium
CN107766177A (en) Start optimization method, device, storage medium and terminal device
CN107885588B (en) Application service control method and device, storage medium and mobile terminal
EP3486823A1 (en) System notification service control method, apparatus, terminal device, and storage medium
CN106502732B (en) Application closing method and device and intelligent terminal
CN106776847B (en) Method and device for deleting media file and mobile terminal

Legal Events

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