CN109408465A - The recording method of file attaching information, device, storage medium and terminal - Google Patents

The recording method of file attaching information, device, storage medium and terminal Download PDF

Info

Publication number
CN109408465A
CN109408465A CN201811270044.0A CN201811270044A CN109408465A CN 109408465 A CN109408465 A CN 109408465A CN 201811270044 A CN201811270044 A CN 201811270044A CN 109408465 A CN109408465 A CN 109408465A
Authority
CN
China
Prior art keywords
file
attaching information
application
underlying
information
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.)
Granted
Application number
CN201811270044.0A
Other languages
Chinese (zh)
Other versions
CN109408465B (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

Landscapes

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

Abstract

The embodiment of the present application discloses the recording method of file attaching information, device, storage medium and terminal.This method comprises: listening to the creation operation of the first file;Determine the destination application for initiating the creation operation;Using the identity information of the destination application as the attaching information of first file, underlying file systems are recorded, wherein the underlying file systems are realized based on physical storage medium.The embodiment of the present application is by using above-mentioned technical proposal, the identity information of the application program of creation this document can be obtained in document creation, and it stores the identity information as file attaching information into underlying file systems, underlying file systems are realized based on physical storage medium, it is capable of the owner of accurately persistence record file, facilitates and subsequent file is targetedly managed.

Description

The recording method of file attaching information, device, storage medium and terminal
Technical field
The invention relates to art file management technology field more particularly to the recording method of file attaching information, device, deposit Storage media and terminal.
Background technique
Currently, intelligent terminal has become electronic equipment indispensable in most users daily life.With intelligent terminal technology Fast development, the function in intelligent terminal is also more and more perfect, can meet the use demand of user's multiplicity.
For many users, many application programs can be generally installed in an intelligent terminal, for daily life and work It uses.In general, application program all has the permission stored in operating terminal, accumulating over a long period will be generated compared with multifile, and wherein It is no lack of useless garbage files.For some files, terminal does not provide the effective scheme for recording its attaching information, Inconvenience is brought for file management etc..
Summary of the invention
The embodiment of the present application provides a kind of file attaching information recording method, device, storage medium and terminal, can be to end The attaching information of file is recorded in end, is convenient for file management.
In a first aspect, the embodiment of the present application provides a kind of file attaching information recording method, comprising:
Listen to the creation operation of the first file;
Determine the destination application for initiating the creation operation;
Using the identity information of the destination application as the attaching information of first file, bottom document is recorded System, wherein the underlying file systems are realized based on physical storage medium.
Second aspect, the embodiment of the present application provide a kind of file attaching information recording device, comprising:
Module is monitored in creation operation, and the creation for monitoring the first file operates;
Application program determining module, for determining and initiating the creation behaviour in the creation operation for listening to the first file The destination application of work;
Attaching information logging modle, for returning using the identity information of the destination application as first file Belong to information, underlying file systems are recorded, wherein the underlying file systems are realized based on physical storage medium.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the file attaching information recording method as described in the embodiment of the present application when the program is executed by processor.
Fourth aspect, the embodiment of the present application provide a kind of terminal, including memory, and processor and storage are on a memory And the computer program that can be run in processor, the processor realize such as the embodiment of the present application when executing the computer program The file attaching information recording method.
The file attaching information record scheme provided in the embodiment of the present application, when listening to the creation operation of the first file, It determines the destination application for initiating creation operation, believes the identity information of destination application as the ownership of the first file Breath, is recorded underlying file systems, wherein underlying file systems are realized based on physical storage medium.By using above-mentioned technology Scheme can obtain the identity information of the application program of creation this document in document creation, and using the identity information as text Part attaching information is stored into underlying file systems, and underlying file systems are realized based on physical storage medium, can accurately be held The owner of long property record file facilitates and subsequent is targetedly managed file.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of file attaching information recording method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another file attaching information recording method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another file attaching information recording method provided by the embodiments of the present application;
Fig. 4 is the schematic diagram of a kind of file attaching information record and acquisition process provided by the embodiments of the present application;
Fig. 5 is a kind of structural block diagram of file attaching information recording device provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of another terminal provided by the embodiments of the present application.
Specific embodiment
Further illustrate the technical solution of the application below with reference to the accompanying drawings and specific embodiments.It is understood that It is that specific embodiment described herein is used only for explaining the application, rather than the restriction to the application.It further needs exist for illustrating , part relevant to the application is illustrated only for ease of description, in attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
Fig. 1 is a kind of flow diagram of file attaching information recording method provided by the embodiments of the present application, and this method can To be executed by file attaching information recording device, wherein the device be can be implemented by software and/or hardware, and can generally be integrated in terminal In.As shown in Figure 1, this method comprises:
Step 101, the creation operation for listening to the first file.
Illustratively, the terminal in the embodiment of the present application may include the installation such as mobile phone, tablet computer and laptop There is the equipment of operating system.The embodiment of the present application without limitation, such as can be Android (Android) to the type of operating system Operating system, window (Windows) operating system and apple (ios) operating system etc. for ease of description below will be with It is illustrated for Android operation system.
In the terminal, the application program installed all have operating terminal storage permission, accumulate over a long period will generate compared with Multifile, including garbage files.When being managed to the file in terminal or other operations, it usually needs according to returning for file Belong to situation namely which application program file belongs to, is targetedly handled.In the related technology, generally according to file Store path determines that it belongs to situation, deposits however, the file of not all application program is stored in corresponding application program It stores up under path, therefore, this method of determination is inaccurate.In the embodiment of the present application, start with from the source of file, in document creation At the beginning of determine that its attaching information, can accurately obtain the attaching information of file.
Illustratively, application program generally can create file by application layer, most when creating file in terminal storage Realize it is to create file in the file system of system bottom (such as kerel layers) eventually.Terminal storage uses Virtual File System more, Such as SDcardFS file system.The effect of the Virtual File System of terminal storage is generally used for the permission of control file access, A file pair can be created in virtual file system operation and Parameter Switch at the operation and parameter of underlying file systems One object of creation can be corresponded in underlying file systems as after, and the file object that virtual file system is created only saves It inside memory, can disappear after power-off, the data inside real file are stored in inside underlying file systems.The embodiment of the present application In, the file creation operation of application program can be monitored in terminal storage corresponding virtual file system.First text Part can be any type of file of any application creation, and the application is without limitation.
Step 102 determines the destination application for initiating the creation operation.
Illustratively, application program is generally initiated by the application process in application program, Ke Yigen when creating file It according to the process identification (PID) (pid) for the application process for initiating creation operation, and then determines application program belonging to the process identification (PID), obtains Destination application.Pid is the identity of process, may include multiple processes in application program, the pid of each process is only One, the identity that pid carrys out recognition application can be used.
Optionally, existing interface, such as current_uid can also be utilized, directly to obtain the application journey for initiating creation operation The application identities (uid) of sequence, and then determine destination application.Uid is the identity of application program, each application program Uid is uniquely, the identity that pid carrys out recognition application to can be used.
Step 103, using the identity information of the destination application as the attaching information of first file, be recorded Underlying file systems, wherein the underlying file systems are realized based on physical storage medium.
As it was noted above, underlying file systems are used for actual storage file data, need to realize based on physical storage medium, The data wherein stored after a loss of power will not lose.Therefore, in the embodiment of the present application, after determining destination application, by mesh Attaching information of the identity information of application program as file is marked, is recorded in underlying file systems, to realize file ownership letter The persistence of breath saves, and when terminal is restarted, file attaching information will not be lost.
Illustratively, identity information may include the uid of application name, application program code name and application program Deng the embodiment of the present application is without limitation.
File attaching information recording method provided by the embodiments of the present application, when listening to the creation operation of the first file, really The fixed destination application for initiating creation operation, using the identity information of destination application as the attaching information of the first file, Underlying file systems are recorded, wherein underlying file systems are realized based on physical storage medium.By using above-mentioned technical side Case can obtain the identity information of the application program of creation this document in document creation, and using the identity information as file Attaching information is stored into underlying file systems, and underlying file systems are realized based on physical storage medium, can accurately persistently Property record file the owner, it is convenient that file is targetedly managed.
In some embodiments, the underlying file systems include forth generation extension file system (Fourth Extended File System, EXT4) or friendly flash memory file system (Flash Friendly File System, F2FS).EXT4 is Log file system under (SuSE) Linux OS, Android system are based on linux kernel, therefore, EXT4 can be used as bottom text Part system.F2FS is novel open source flash memory (flash) file system exclusively for the storage equipment design based on NAND, same to prop up Hold (SuSE) Linux OS.EXT4 or F2FS can reside in built-in multimedia storage card (Embedded Multi Media Card, EMMC or eMMC) in.EMMC generally uses unified MMC standard interface, non-volatile flash memory and MMC controller Be encapsulated in a chips, be terminal generally use solution is locally stored.
In some embodiments, the creation operation for listening to the first file, comprising: by default virtual file system Increased preset function in system passes through the first file for calling the document creation interface of application layer to initiate to monitor application program Request to create;When listening to the request to create, the creation operation for listening to first file is determined.What is be arranged in this way is good Place is that it is possible to timely and accurately listen to document creation request, and then fast recording file attaching information.Application program is being created When building file, document creation (file.create) interface of application layer can be called to create file in terminal storage, for example, with When being taken pictures using camera applications, camera applications will call the file.create interface of application layer to create in terminal storage at family Build relevant file of taking pictures.In the embodiment of the present application, can in default Virtual File System, such as SDcardFS file system, Increase preset function, such as sdcardfs- > sdcardfs_create function, the request to create of Lai Shixian monitoring file, Jin Ershi The creation movement of existing automatic identification file.
In some embodiments, described using the identity information of the destination application as the ownership of first file Underlying file systems are recorded in information, comprising: the identity information for obtaining the destination application obtains first file Attaching information;The attaching information of first file is recorded in the extended attribute of underlying file systems.Bottom document system The extended attribute (xattr) of system is the characteristic of Linux underlying file systems, for recording and saving customized data, is visited Ask that speed is fast, memory headroom occupies less, and the interface that kernel is provided can fast implement.Illustratively, identity information can be with It is the uid of application program, can be stored in xattr in the form of character string.
In some embodiments, believe using the identity information of the destination application as the ownership of first file Breath, is recorded after underlying file systems, further includes: listens to the attaching information acquisition request that application layer is directed to the first file When, by the preset interface being implemented in the default Virtual File System, described is obtained from the underlying file systems The attaching information of one file simultaneously returns to the application layer.The advantages of this arrangement are as follows application layer can be supported to being recorded File attaching information obtained, and subsequent operation is carried out according to attaching information.Illustratively, the realization of preset interface and Definition can be recorded in underlying file systems extended attribute xattr in the SDcardFS file system of kernel for obtaining In uid character string, then mentioned by Virtual File System (Virutal File System, VFS) mechanism of kernel standard Upper layer application is supplied to use.Optionally, when the default application program in terminal, as house keeper's class application program needs to obtain file When attaching information, the attaching information acquisition request for being directed to the first file can be initiated by application layer, passes through SDcardFS file Preset interface in system obtains the attaching information of the first file from underlying file systems.
In some embodiments, the attaching information of first file and return are being obtained from the underlying file systems After the application layer, further includes: determine the management strategy of first file according to the attaching information.Getting text After the attaching information of part, targetedly file can be managed according to the application program belonging to file, such as to file into Row compression, deletions, format conversion, encryption and it is hiding etc. operate, or control the display mode of file (such as in file management Different icons is shown in device according to application program belonging to file), store path and operating right etc..
In some embodiments, it may also be used for the tracking to malicious application, for example, the security classes application journey in terminal Sequence, application program of such as killing virus can be believed when detecting abnormal document (such as virus document) by obtaining the ownership of abnormal document Breath performs corresponding processing the application program to determine affiliated application program, as indicating risk, operating right control And the operation such as unloading.Illustratively, the embodiment of the present application, which may also include that, detects abnormal document by security classes application program, When detecting the first abnormal document, the attaching information acquisition request for being directed to first abnormal document is initiated by application layer, By the preset interface being implemented in the default Virtual File System, it is different that described first is obtained from the underlying file systems The attaching information of normal file simultaneously returns to the security classes application program;By the security classes application program according to receiving Attaching information determines corresponding abnormal application program, performs corresponding processing to the abnormal application program.
In some embodiments, the management strategy that first file is determined according to the attaching information, comprising: root Determine whether corresponding destination application is in unloaded state according to the attaching information;If being in, to first file It is purged processing.The advantages of this arrangement are as follows the Stub File of unloaded application program can be accurately navigated to, thus Accurately Stub File is purged, under the premise of avoiding accidentally deleting, saves the memory space of terminal.Optionally, if target Application program is not in unloaded state, that is to say, that user needs to continue to use the application program, then carrying out to the first file Retain.
Fig. 2 is the flow diagram of another file attaching information recording method provided by the embodiments of the present application, this method Include the following steps:
Step 201, by the increased preset function in default Virtual File System, pass through calling to monitor application program The request to create for the first file that the document creation interface of application layer is initiated.
Illustratively, presetting Virtual File System is SDcardFS file system.It can be in advance in SDcardFS file system Layer increases preset function, such as sdcardfs- > sdcardfs_create function, which is used for the request to create of monitoring file.
Step 202, when listening to request to create, determine listen to the first file creation operation.
Step 203 determines the destination application for initiating creation operation.
Illustratively, affiliated application program can be determined according to the process identification (PID) for the application process for initiating creation operation, And then determine destination application.
Step 204, the identity information for obtaining destination application, obtain the attaching information of the first file.
Illustratively, identity information can be the corresponding uid of application program, using uid as the attaching information of the first file.
The attaching information of first file is recorded in the extended attribute of underlying file systems step 205.
Illustratively, underlying file systems can be EXT4 or F2FS.
Step 206, when listening to application layer and being directed to the attaching information acquisition request of the first file, by being implemented in default void Preset interface in quasi- file system, the attaching information of the first file is obtained from underlying file systems and returns to application layer.
Step 207, the management strategy that the first file is determined according to attaching information.
File attaching information recording method provided by the embodiments of the present application, by increased in default Virtual File System Preset function is requested to monitor application program by the document creation for calling the document creation interface of application layer to initiate, according to creation The promoter of request determines corresponding destination application, remembers the identity information of destination application as file attaching information It records in the extended attribute of underlying file systems, realizes the accurate persistence record of file attaching information, facilitate application layer at any time It obtains and corresponding document is targetedly managed.
Fig. 3 is the flow diagram of another file attaching information recording method provided by the embodiments of the present application, this method Include:
Step 301 monitors application program by calling application layer by the preset function in SDcardFS file system layer Document creation interface initiate the first file request to create.
Illustratively, preset function, such as sdcardfs- > sdcardfs_ can be increased in SDcardFS file system layer in advance Create function, the function are used for the request to create of monitoring file.
Step 302, when listening to request to create, determine listen to the first file creation operation.
Step 303 obtains the uid for initiating the destination application of creation operation.
Illustratively, request to create is initiated by application process, when request to create reaches SDcardFS file system When layer, the uid of the corresponding application program of application process can be obtained by current_uid interface.
Step 304, the uid that will acquire are recorded in the extended attribute of EXT4 as the attaching information of the first file.
In the embodiment of the present application, EXT4 is also possible to F2FS.
Step 305, listen to file house keeper's application program issue be directed to the first file attaching information acquisition request when, lead to The preset interface in SDcardFS file system layer is crossed, the attaching information of the first file is obtained from EXT4, and pass through VFS mechanism Return to file house keeper's application program.
In general, can install house keeper's class application program in order to effectively be managed file in terminal, such applies journey The application program of default installation, is also possible to the third-party application journey that user voluntarily downloads and installs when sequence can be terminal factory Sequence, title that there are many such application program possibility, such as " file house keeper ", " mobile phone house keeper " and " rubbish clears up great master ", Belong to file house keeper application program described in the embodiment of the present application.
Illustratively, kernel can open up one section of memory in the extended attribute xattr of EXT4 or F2FS file system Buffer, SDcardFS file system can be stored in the character string of the uid of obtained application program in this buffer, when Uid is taken out from the memory buffer of corresponding node when needing.
Fig. 4 is the schematic diagram of a kind of file attaching information record and acquisition process provided by the embodiments of the present application, such as Fig. 4 institute Show, when application program creates file, by SDcardFS file system bottom is recorded in uid by the uid of automatic identification application program In the extended attribute of layer file system, when the management-type applications program such as house keeper needs to obtain uid, by calling SDcardFS text Preset interface in part system obtains uid from extended attribute.
Step 306 determines whether corresponding destination application is located according to attaching information by file house keeper application program In unloaded state, if so, thening follow the steps 307;Otherwise, step 308 is executed.
Illustratively, the white list that application program can be set currently has been installed in maintenance terminal in the white list and has been answered First is applied in white list when detecting that the first application program is unloaded with the information (such as title or uid) of program The corresponding information deletion of program.When judging whether destination application is in unloaded state, can be looked into white list It askes, if not inquiring the corresponding information of destination application, illustrates that destination application has been unloaded, be in unloaded state.
Step 307 deletes the first file by file house keeper application program.
When determining that destination application has been unloaded, illustrate that user no longer needs to belong to using destination application The file of destination application also just becomes garbage files for clearance, the Stub File after usually unloading, to residual text Part is cleared up in time, can mitigate system burden with the memory space of effectively save terminal.
Step 308, in file house keeper's application program the corresponding position displaying target application program of the first file icon.
Illustratively, some intrinsic display logics may carry out the file scanned in file house keeper application program Classification display checks which application program each file belongs to such as according to file format classification display in order to facilitate user, can be with And the icon of the application program belonging to corresponding position (such as filename front or behind) the display current file of current file.
File attaching information recording method provided by the embodiments of the present application obtains its attaching information in document creation and remembers It records in the extended attribute of underlying file systems, the accurate persistence record of file attaching information is realized, when house keeper's class application journey When sequence needs to obtain the attaching information of file, the uid of the application program as attaching information is obtained from underlying file systems, and Whether unloaded state has been according to corresponding application program and file has targetedly been handled, and has been optimized in terminal Package management file.
Fig. 5 is a kind of structural block diagram of file attaching information recording device provided by the embodiments of the present application, which can be by Software and or hardware realization is typically integrated in terminal, can belong to letter by executing the recording method of file attaching information come file The record of breath.As shown in figure 5, the device includes:
Module 501 is monitored in creation operation, and the creation for monitoring the first file operates;
Application program determining module 502, for determining and initiating the creation in the creation operation for listening to the first file The destination application of operation;
Attaching information logging modle 503, for using the identity information of the destination application as first file Attaching information, underlying file systems are recorded, wherein the underlying file systems based on physical storage medium realize.
The file attaching information recording device provided in the embodiment of the present application, when listening to the creation operation of the first file, It determines the destination application for initiating creation operation, believes the identity information of destination application as the ownership of the first file Breath, is recorded underlying file systems, wherein underlying file systems are realized based on physical storage medium.By using above-mentioned technology Scheme can obtain the identity information of the application program of creation this document in document creation, and using the identity information as text Part attaching information is stored into underlying file systems, and underlying file systems are realized based on physical storage medium, can accurately be held The owner of long property record file facilitates and subsequent is targetedly managed file.
Optionally, the underlying file systems include forth generation extension file system EXT4 or friendly flash memory file system F2FS。
Optionally, the creation operation for listening to the first file, comprising:
By the increased preset function in default Virtual File System, to monitor application program by calling application layer The request to create for the first file that document creation interface is initiated;
When listening to the request to create, the creation operation for listening to first file is determined.
Optionally, described using the identity information of the destination application as the attaching information of first file, note Record underlying file systems, comprising:
The identity information for obtaining the destination application obtains the attaching information of first file;
The attaching information of first file is recorded in the extended attribute of underlying file systems.
Optionally, the device further include:
Attaching information obtains module, for using the identity information of the destination application as first file Attaching information is recorded after underlying file systems, when listening to attaching information acquisition request of the application layer for the first file, By the preset interface being implemented in the default Virtual File System, first text is obtained from the underlying file systems The attaching information of part simultaneously returns to the application layer.
Optionally, the device further include:
Management strategy determining module, in the attaching information for obtaining first file from the underlying file systems And after returning to the application layer, the management strategy of first file is determined according to the attaching information.
Optionally, the management strategy that first file is determined according to the attaching information, comprising:
Determine whether corresponding destination application is in unloaded state according to the attaching information;
If being in, processing is purged to first file.
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, and the computer is executable Instruction is used to execute file attaching information recording method when being executed by computer processor, this method comprises:
Listen to the creation operation of the first file;
Determine the destination application for initiating the creation operation;
Using the identity information of the destination application as the attaching information of first file, bottom document is recorded System, wherein the underlying file systems are realized based on physical storage medium.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (example Such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other types Memory or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, or It can be located in different second computer systems, second computer system is connected to the first meter by network (such as internet) Calculation machine system.Second computer system can provide program instruction to the first computer for executing.Term " storage medium " can To include two or more that may reside in different location (such as in the different computer systems by network connection) Storage medium.Storage medium can store the program instruction that can be performed by one or more processors and (such as be implemented as counting Calculation machine program).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application The file attaching information that executable instruction is not limited to the described above records operation, and the application any embodiment can also be performed and mentioned Relevant operation in the file attaching information recording method of confession.
The embodiment of the present application provides a kind of terminal, and file ownership letter provided by the embodiments of the present application can be integrated in the terminal Cease recording device.Fig. 6 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application.Terminal 600 may include: memory 601, processor 602 and the computer program that is stored on memory 601 and can be run in processor 602, the processor 602 The file attaching information recording method as described in the embodiment of the present application is realized when executing the computer program.
Terminal provided by the embodiments of the present application can obtain the identity of the application program of creation this document in document creation Information, and store the identity information as file attaching information into underlying file systems, underlying file systems are based on physics Storage medium realizes, is capable of the owner of accurately persistence record file, facilitates and subsequent targetedly managed to file Reason.
Fig. 7 is the structural schematic diagram of another terminal provided by the embodiments of the present application, which may include: shell (figure In be not shown), memory 701, central processing unit (central processing unit, CPU) 702 (also known as processor, with Lower abbreviation CPU), circuit board (not shown) and power circuit (not shown).The circuit board is placed in the shell The space interior surrounded;The CPU702 and the memory 701 are arranged on the circuit board;The power circuit, is used for It powers for each circuit or device of the terminal;The memory 701, for storing executable program code;It is described CPU702 is run and the executable program code pair by reading the executable program code stored in the memory 701 The computer program answered, to perform the steps of
Listen to the creation operation of the first file;
Determine the destination application for initiating the creation operation;
Using the identity information of the destination application as the attaching information of first file, bottom document is recorded System, wherein the underlying file systems are realized based on physical storage medium.
The terminal further include: Peripheral Interface 703, RF (Radio Frequency, radio frequency) circuit 705, voicefrequency circuit 706, loudspeaker 711, power management chip 708, input/output (I/O) subsystem 709, other input/control devicess 710, touching Touch screen 712, other input/control devicess 710 and outside port 704, these components pass through one or more communication bus or Signal wire 707 communicates.
It should be understood that graphic terminal 700 is only an example of terminal, and terminal 700 can have than figure Shown in more or less component, two or more components can be combined, or can have different portions Part configuration.Various parts shown in the drawings can be including one or more signal processings and/or specific integrated circuit Hardware, software or hardware and software combination in realize.
Below just it is provided in this embodiment for file attaching information record terminal be described in detail, the terminal with For mobile phone.
Memory 701, the memory 701 can be accessed by CPU702, Peripheral Interface 703 etc., and the memory 701 can It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU702 and deposited by Peripheral Interface 703, the Peripheral Interface 703 Reservoir 701.
I/O subsystem 709, the I/O subsystem 709 can be by the input/output peripherals in equipment, such as touch screen 712 With other input/control devicess 710, it is connected to Peripheral Interface 703.I/O subsystem 709 may include 7091 He of display controller For controlling one or more input controllers 7092 of other input/control devicess 710.Wherein, one or more input controls Device 7092 processed receives electric signal from other input/control devicess 710 or sends electric signal to other input/control devicess 710, Other input/control devicess 710 may include physical button (push button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks idler wheel.It is worth noting that input controller 7092 can with it is following any one connect: keyboard, infrared port, The indicating equipment of USB interface and such as mouse.
Touch screen 712, the touch screen 712 are the input interface and output interface between user terminal and user, can It is shown to user depending on output, visual output may include figure, text, icon, video etc..
Display controller 7091 in I/O subsystem 709 receives electric signal from touch screen 712 or sends out to touch screen 712 Electric signals.Touch screen 712 detects the contact on touch screen, and the contact that display controller 7091 will test is converted to and is shown The interaction of user interface object on touch screen 712, i.e. realization human-computer interaction, the user interface being shown on touch screen 712 Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 705 is mainly used for establishing the communication of mobile phone Yu wireless network (i.e. network side), realizes mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuit 705 receives and sends RF letter Number, RF signal is also referred to as electromagnetic signal, and RF circuit 705 converts electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuit 705 may include for executing The known circuit of these functions comprising but it is not limited to antenna system, RF transceiver, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 706 is mainly used for receiving audio data from Peripheral Interface 703, which is converted to telecommunications Number, and the electric signal is sent to loudspeaker 711.
Loudspeaker 711 is reduced to sound for mobile phone to be passed through RF circuit 705 from the received voice signal of wireless network And the sound is played to user.
Power management chip 708, the hardware for being connected by CPU702, I/O subsystem and Peripheral Interface are powered And power management.
It is any that the application can be performed in file attaching information recording device, storage medium and the terminal provided in above-described embodiment File attaching information recording method provided by embodiment has and executes the corresponding functional module of this method and beneficial effect.Not The technical detail of detailed description in the above-described embodiments, reference can be made to file attaching information provided by the application any embodiment is remembered Recording method.
Note that above are only the preferred embodiment and institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, be able to carry out for a person skilled in the art it is various it is apparent variation, The protection scope readjusted and substituted without departing from the application.Therefore, although being carried out by above embodiments to the application It is described in further detail, but the application is not limited only to above embodiments, in the case where not departing from the application design, also It may include more other equivalent embodiments, and scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. a kind of file attaching information recording method characterized by comprising
Listen to the creation operation of the first file;
Determine the destination application for initiating the creation operation;
Using the identity information of the destination application as the attaching information of first file, bottom document system is recorded System, wherein the underlying file systems are realized based on physical storage medium.
2. the method according to claim 1, wherein the underlying file systems include forth generation extension file system Unite EXT4 or friendly flash memory file system F2FS.
3. the method according to claim 1, wherein the creation operation for listening to the first file, comprising:
By the increased preset function in default Virtual File System, pass through the file of calling application layer to monitor application program Create the request to create for the first file that interface is initiated;
When listening to the request to create, the creation operation for listening to first file is determined.
4. the method according to claim 1, wherein it is described using the identity information of the destination application as The attaching information of first file, is recorded underlying file systems, comprising:
The identity information for obtaining the destination application obtains the attaching information of first file;
The attaching information of first file is recorded in the extended attribute of underlying file systems.
5. according to the method described in claim 3, it is characterized in that, using the identity information of the destination application as institute The attaching information for stating the first file, is recorded after underlying file systems, further includes:
When listening to attaching information acquisition request of the application layer for the first file, by being implemented in the default virtual file system Preset interface in system obtains the attaching information of first file from the underlying file systems and returns to the application Layer.
6. according to the method described in claim 5, it is characterized in that, obtaining first text from the underlying file systems The attaching information of part and after returning to the application layer, further includes:
The management strategy of first file is determined according to the attaching information.
7. according to the method described in claim 6, it is characterized in that, described determine first file according to the attaching information Management strategy, comprising:
Determine whether corresponding destination application is in unloaded state according to the attaching information;
If being in, processing is purged to first file.
8. a kind of file attaching information recording device characterized by comprising
Module is monitored in creation operation, and the creation for monitoring the first file operates;
Application program determining module, for determining and initiating the creation operation in the creation operation for listening to the first file Destination application;
Attaching information logging modle, for believing the identity information of the destination application as the ownership of first file Breath, is recorded underlying file systems, wherein the underlying file systems are realized based on physical storage medium.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The file attaching information recording method as described in any in claim 1-7 is realized when row.
10. a kind of terminal, which is characterized in that including memory, processor and storage can be run on a memory and in processor Computer program, the processor realizes that file as claimed in claim 1 is returned when executing the computer program Belong to information recording method.
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 true CN109408465A (en) 2019-03-01
CN109408465B 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)

Cited By (5)

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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120130951A1 (en) * 2008-03-04 2012-05-24 International Business Machines Corporation Non-programmatic access to enterprise messaging administration
CN102591680A (en) * 2011-12-19 2012-07-18 深圳桑菲消费通信有限公司 Method for automatically deleting and unloading software related files
CN106055363A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method for identifying file and mobile terminal
CN107220132A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 A kind of monitor method, equipment and the storage medium of document creation information
CN107766351A (en) * 2016-08-16 2018-03-06 腾讯科技(深圳)有限公司 The recognition methods of file directory and device
CN107832403A (en) * 2017-11-02 2018-03-23 武汉斗鱼网络科技有限公司 Catalogue file management method, device, electric terminal and readable storage medium storing program for executing
CN108038167A (en) * 2017-12-06 2018-05-15 云城(北京)数据科技有限公司 Identification method, device and the distributed file storage system of file directory
CN108153869A (en) * 2017-12-25 2018-06-12 北京安云世纪科技有限公司 Document track method and device, equipment and storage medium
CN108460128A (en) * 2018-03-01 2018-08-28 广东欧珀移动通信有限公司 Document management method and device, electronic device and readable storage medium storing program for executing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120130951A1 (en) * 2008-03-04 2012-05-24 International Business Machines Corporation Non-programmatic access to enterprise messaging administration
CN102591680A (en) * 2011-12-19 2012-07-18 深圳桑菲消费通信有限公司 Method for automatically deleting and unloading software related files
CN106055363A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method for identifying file and mobile terminal
CN107766351A (en) * 2016-08-16 2018-03-06 腾讯科技(深圳)有限公司 The recognition methods of file directory and device
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
CN108038167A (en) * 2017-12-06 2018-05-15 云城(北京)数据科技有限公司 Identification method, device and the distributed file storage system of file directory
CN108153869A (en) * 2017-12-25 2018-06-12 北京安云世纪科技有限公司 Document track method and device, equipment and storage medium
CN108460128A (en) * 2018-03-01 2018-08-28 广东欧珀移动通信有限公司 Document management method and device, electronic device and readable storage medium storing program for executing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张海霞: "文件的动态管理在应用程序中的实现", 《内蒙古科技与经济》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569171A (en) * 2019-09-09 2019-12-13 北京安云世纪科技有限公司 File monitoring method and device
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
CN114996226A (en) * 2021-11-05 2022-09-02 荣耀终端有限公司 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
CN115630020A (en) * 2022-12-23 2023-01-20 北京亿赛通科技发展有限责任公司 Method and device for multiplexing safety scanning result and electronic equipment
CN115630020B (en) * 2022-12-23 2023-03-10 北京亿赛通科技发展有限责任公司 Method and device for multiplexing safety scanning result and electronic equipment

Also Published As

Publication number Publication date
CN109408465B (en) 2021-07-13

Similar Documents

Publication Publication Date Title
EP3575962B1 (en) Method and device for preloading application, storage medium and intelligent terminal
CN109960507B (en) Compiling optimization method and device, storage medium, intelligent terminal and server
CN109408465A (en) The recording method of file attaching information, device, storage medium and terminal
WO2019119985A1 (en) Method for preloading application, storage medium, and terminal device
CN107734616B (en) Application program closing method and device, storage medium and electronic equipment
US10922102B2 (en) Method of controlling applications in a terminal and terminal
US20190370022A1 (en) Application preloading method and device, storage medium and terminal
KR102148948B1 (en) Multi tasking method of electronic apparatus and electronic apparatus thereof
CN109947496B (en) Application program preloading method and device, storage medium and mobile terminal
CN110888821B (en) Memory management method and device
CN108132735B (en) Terminal and application control method
US10198057B2 (en) Electronic device and method for measuring position change
CN107943269B (en) Scheduling job control method, device, terminal equipment and storage medium
CN107729764A (en) Guard method, device, storage medium and the electronic equipment of sensitive information
WO2019137252A1 (en) Memory processing method, electronic device, and computer-readable storage medium
CN104426944A (en) Method and device for information feedback, and terminal
JP2021506016A (en) Methods and devices for processing memory and storage media
CN106484518A (en) A kind of display methods, device and terminal for opening application more
CN110018900A (en) Internal memory processing method and device, electronic equipment, computer readable storage medium
CN110032321A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN109992399B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN106650409B (en) A kind of terminal control method and terminal
CN111104180A (en) Application program optimization method and device, storage medium and electronic equipment
WO2021254200A1 (en) Page thrashing protection method and apparatus for memory reclaim of operating system
CN107832131B (en) Application program closing method and device, storage medium and electronic equipment

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