CN111522780B - A method and terminal for recording file creator information - Google Patents
A method and terminal for recording file creator information Download PDFInfo
- Publication number
- CN111522780B CN111522780B CN201910105508.0A CN201910105508A CN111522780B CN 111522780 B CN111522780 B CN 111522780B CN 201910105508 A CN201910105508 A CN 201910105508A CN 111522780 B CN111522780 B CN 111522780B
- Authority
- CN
- China
- Prior art keywords
- file
- instruction
- information
- target
- creator 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.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请实施例提供了一种记录文件创建者信息的方法,用于在创建目标文件的过程中,在目标文件的元数据中写入该目标文件对应的创建者信息,从而当需要获取目标文件的创建者信息时,可以便捷地从目标文件的元数据中读取目标文件的创建者信息。本申请实施例方法包括:终端获取创建文件指令;所述终端根据所述创建文件指令创建目标文件;所述终端确定所述目标文件的创建者信息,所述目标文件的创建者信息包括创建所述目标文件的应用的标识信息或进程的标识信息;所述终端在所述目标文件对应的元数据中写入所述目标文件的创建者信息。
Embodiments of the present application provide a method for recording file creator information, which is used to write the creator information corresponding to the target file in the metadata of the target file during the process of creating the target file, so as to obtain the target file when needed. When the creator information of the target file is obtained, the creator information of the target file can be easily read from the metadata of the target file. The method of the embodiment of the present application includes: the terminal obtains a create file instruction; the terminal creates a target file according to the create file instruction; the terminal determines the creator information of the target file, and the creator information of the target file includes the creator information of the target file. The terminal writes the identification information of the application of the target file or the identification information of the process; the terminal writes the creator information of the target file in the metadata corresponding to the target file.
Description
技术领域Technical field
本申请涉及文件处理领域,尤其涉及一种记录文件创建者信息的方法及用于记录文件创建者信息的终端。The present application relates to the field of file processing, and in particular, to a method of recording file creator information and a terminal for recording file creator information.
背景技术Background technique
Unix类文件系统和windows都是利用身份标记(user identification,uid)、组标记(group identification,gid)来标记文件和权限限制。Android系统基于linux系统,也属于Unix类文件系统,因此同样采用了uid和gid机制。但Android系统中的uid、gid与linux系统中的又有所不同,Android中uid不是用于标识不同用户,而是利用uid、gid标识不同应用,并将uid、gid机制作为轻量级的沙盒技术来做隔离。Both Unix-like file systems and windows use identity tags (user identification, uid) and group tags (group identification, gid) to mark files and permission restrictions. The Android system is based on the Linux system and is also a Unix-like file system, so it also uses the uid and gid mechanisms. However, the uid and gid in the Android system are different from those in the Linux system. In Android, uid is not used to identify different users. Instead, uid and gid are used to identify different applications, and the uid and gid mechanisms are used as lightweight sandboxes. box technology for isolation.
基于Android系统中uid和gid的机制,Android系统可以通过uid、gid区分终端中不同文件的创建者,即区分不同文件对应的应用。除此之外,也可以先通过人工分析得出不同应用与其创建的文件路径的对应关系,再通过文件的文件路径与该对应关系的对比,来推测该文件的创建者。Based on the mechanism of uid and gid in the Android system, the Android system can distinguish the creators of different files in the terminal through uid and gid, that is, distinguish the applications corresponding to different files. In addition, you can also first obtain the corresponding relationship between different applications and the file paths they create through manual analysis, and then compare the file path of the file with the corresponding relationship to infer the creator of the file.
Android系统的数据可以分为内部数据和外部数据。内部数据即应用沙盒里的数据,不同应用的文件对应的uid或gid不同,可以采用uid和gid确定不同文件对应的创建者。外部数据,例如存储在安全数码卡(secure digital memory card,sdcard)的数据,是不同应用之间共享的数据,共用了uid和gid,只能采用文件路径的方式。而采用文件路径的方式确定文件的创建者并不是一种准确和便捷的方式。The data of the Android system can be divided into internal data and external data. Internal data is the data in the application sandbox. Files in different applications have different uid or gid. You can use uid and gid to determine the creator of different files. External data, such as data stored in a secure digital memory card (sdcard), is data shared between different applications. It shares uid and gid and can only use file paths. Using the file path to determine the creator of the file is not an accurate and convenient way.
发明内容Contents of the invention
本申请实施例提供了一种记录文件创建者信息的方法,用于在创建目标文件的过程中,在目标文件的元数据中写入该目标文件对应的创建者信息,从而当需要获取目标文件的创建者信息时,可以直接从目标文件的元数据中读取目标文件的创建者信息。Embodiments of the present application provide a method for recording file creator information, which is used to write the creator information corresponding to the target file in the metadata of the target file during the process of creating the target file, so as to obtain the target file when needed. When the creator information of the target file is obtained, the creator information of the target file can be read directly from the metadata of the target file.
有鉴于此,本申请实施例第一方面提供了一种记录文件创建者信息的方法,可以包括:In view of this, the first aspect of the embodiment of the present application provides a method for recording file creator information, which may include:
当终端创建目标文件时,终端获取创建文件指令,并根据该创建文件指令创建目标文件,该目标文件可以是新建的文件或者终端接收其他设备发送后保存的文件。终端创建该目标文件时,同时获取该目标文件的创建者信息,该目标文件的创建者信息可以包括创建该目标文件的应用的标识信息或进程的标识信息,即通过创建者信息可以确定该目标文件由哪一个应用所创建。之后,终端在该目标文件对应的元数据中写入所确定的创建者信息。本申请实施例中,提供了一种在创建目标文件时,记录目标文件创建者信息的方法。其中,所创建的目标文件的创建者信息记录在目标文件对应的元数据中,根据元数据的特性,终端可以便捷且准确地从该目标文件的元数据中读取其对应的创建者信息。When the terminal creates a target file, the terminal obtains the create file instruction and creates the target file according to the create file instruction. The target file can be a newly created file or a file saved after the terminal receives a file sent by another device. When the terminal creates the target file, it also obtains the creator information of the target file. The creator information of the target file may include the identification information of the application that created the target file or the identification information of the process. That is, the target can be determined through the creator information. Which application created the file. Afterwards, the terminal writes the determined creator information in the metadata corresponding to the target file. In the embodiment of the present application, a method of recording target file creator information when creating a target file is provided. Among them, the creator information of the created target file is recorded in the metadata corresponding to the target file. According to the characteristics of the metadata, the terminal can conveniently and accurately read the corresponding creator information from the metadata of the target file.
在一种可能的设计中,该终端获取创建文件指令,可以包括:当该终端运行第一进程时,该终端获取该第一进程生成的该创建文件指令;该终端确定该目标文件的创建者信息,可以包括:该终端确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息。本申请实施例中,终端在启动第一进程时,记录该第一进程的标识信息或第一进程对应的应用的标识信息,当接收到第一进程生成的创建文件指令后,终端根据该创建文件指令创建目标文件,并将先前记录的第一进程的标识信息或第一进程对应的应用的标识信息写入该目标文件的元数据中,作为该目标文件的创建者信息,从而实现了创建目标文件过程中目标文件的创建者信息的记录。In a possible design, the terminal obtains the create file instruction, which may include: when the terminal runs the first process, the terminal obtains the create file instruction generated by the first process; the terminal determines the creator of the target file The information may include: the terminal determines that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process. In the embodiment of the present application, when starting the first process, the terminal records the identification information of the first process or the identification information of the application corresponding to the first process. After receiving the create file instruction generated by the first process, the terminal The file instruction creates a target file, and writes the previously recorded identification information of the first process or the identification information of the application corresponding to the first process into the metadata of the target file as the creator information of the target file, thereby realizing the creation The record of the creator information of the target file during the target file process.
在一种可能的设计中,在该终端获取创建文件指令之前,该方法还可以包括:当该终端运行第一进程时,该终端通过该第一进程接收其他终端或网络服务器发送的该目标文件;该终端获取创建文件指令,具体为:该终端获取该第一进程的保存指令,该保存指令用于指示保存该目标文件;在该终端确定该目标文件的创建者信息之前,该方法还可以包括:该终端判断该第一进程对应的应用是否为预设应用;该终端确定该目标文件的创建者信息,可以包括:在判断该第一进程对应的应用不为预设应用的情况下,该终端确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息;在判断若该第一进程对应的应用为预设应用的情况下,该终端不设置该目标文件的元数据中的创建者信息。本申请实施例中,对创建文件的另一种情况进行了说明:当终端通过第一进程接收到其他终端或者网络服务器发送的目标文件后,终端判断该第一进程对应的应用是否为预设应用。若不为预设应用,则终端在保存目标文件时,确定目标文件的创建者信息为该第一进程的标识信息或者第一进程对应的应用的标识信息,并写入目标文件的元数据中;若为预设应用,则不设置该目标文件的创建者信息。通过预先在终端的系统中设置预设应用,从而避免了一些场景下,例如进行备份文件恢复时,不合理地修改文件创建者信息的情况。In a possible design, before the terminal obtains the file creation instruction, the method may also include: when the terminal runs a first process, the terminal receives the target file sent by other terminals or network servers through the first process. ; The terminal obtains a file creation instruction, specifically: the terminal obtains a save instruction of the first process, and the save instruction is used to instruct saving of the target file; before the terminal determines the creator information of the target file, this method can also The method includes: the terminal determines whether the application corresponding to the first process is a default application; the terminal determines the creator information of the target file, which may include: when determining that the application corresponding to the first process is not a default application, The terminal determines that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process; when judging that the application corresponding to the first process is a default application, the terminal Do not set the creator information in the target file's metadata. In the embodiment of this application, another situation of creating a file is explained: when the terminal receives a target file sent by another terminal or a network server through the first process, the terminal determines whether the application corresponding to the first process is a default application. If it is not a default application, when saving the target file, the terminal determines that the creator information of the target file is the identification information of the first process or the identification information of the application corresponding to the first process, and writes it into the metadata of the target file. ; If it is a default application, the creator information of the target file will not be set. By setting preset applications in the terminal system in advance, it is possible to avoid unreasonable modification of file creator information in some scenarios, such as when restoring backup files.
在一种可能的设计中,在该终端获取创建文件指令之前,该方法还可以包括:当该终端运行第一进程时,该终端通过该第一进程接收其他终端或网络服务器发送的该目标文件;该终端获取创建文件指令,具体为:该终端获取该第一进程的保存指令,该保存指令用于指示保存该目标文件;在该终端确定该目标文件的创建者信息之前,该方法还可以包括:该终端判断该第一进程对应的应用是否为预设应用;该终端确定该目标文件的创建者信息,可以包括:在判断该第一进程对应的应用不为预设应用的情况下,该终端确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息;在判断若该第一进程对应的应用为预设应用的情况下,该终端获取规则表信息,该规则表信息接收自该其他终端或该网络服务器,或存储于该终端中,该规则表信息用于指示不同文件的标识信息和不同的创建者信息的对应关系,该文件的标识信息用于供该终端唯一地确定该标识信息对应的文件;该终端根据该目标文件的标识信息和该规则表信息确定该目标文件的创建者信息。本申请实施例中,对终端接收其他终端或网络服务器发送的目标文件时,保存该目标文件的过程中,另一种记录创建者信息的方法进行了说明。In a possible design, before the terminal obtains the file creation instruction, the method may also include: when the terminal runs a first process, the terminal receives the target file sent by other terminals or network servers through the first process. ; The terminal obtains a file creation instruction, specifically: the terminal obtains a save instruction of the first process, and the save instruction is used to instruct saving of the target file; before the terminal determines the creator information of the target file, this method can also The method includes: the terminal determines whether the application corresponding to the first process is a default application; the terminal determines the creator information of the target file, which may include: when determining that the application corresponding to the first process is not a default application, The terminal determines that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process; when judging that the application corresponding to the first process is a default application, the terminal Obtain rule table information. The rule table information is received from the other terminal or the network server, or is stored in the terminal. The rule table information is used to indicate the corresponding relationship between the identification information of different files and different creator information. The file The identification information is used for the terminal to uniquely determine the file corresponding to the identification information; the terminal determines the creator information of the target file based on the identification information of the target file and the rule table information. In the embodiment of this application, another method of recording the creator information during the process of saving the target file when the terminal receives the target file sent by other terminals or network servers is described.
在一种可能的设计中,该方法还可以包括:该终端确定该目标文件的文件路径和该目标文件的创建者信息;该终端生成该目标文件的文件路径和该目标文件的创建者信息的对应关系,并保存在文件路径规则中,该文件路径规则用于指示不同的创建者信息与不同的文件路径的对应关系。本申请实施例中,终端在创建目标文件并记录目标文件的创建者信息后,可以生成目标文件的创建者信息和目标文件的文件路径的对应关系,并保存在文件路径规则中。该文件路径规则即指示了不同应用与所其创建文件的路径的对应关系。该文件路径规则以文件的形式保存在终端本地或网络上,随应用的更新而更新。即,终端在生成名目标文件并记录目标文件的创建者信息后,可以自动生成文件路径规则,在用户需要查询时,可以直接从本地查找该文件路径规则对应的文件,不需要再人工分析,节省了人员的工作量。In a possible design, the method may also include: the terminal determines the file path of the target file and the creator information of the target file; the terminal generates the file path of the target file and the creator information of the target file. The corresponding relationship is stored in the file path rule. The file path rule is used to indicate the corresponding relationship between different creator information and different file paths. In the embodiment of this application, after the terminal creates the target file and records the creator information of the target file, the terminal can generate a correspondence between the creator information of the target file and the file path of the target file, and save it in the file path rule. The file path rule indicates the corresponding relationship between different applications and the paths of files created by them. The file path rule is saved locally on the terminal or on the network in the form of a file, and is updated as the application is updated. That is, after the terminal generates the target file and records the creator information of the target file, it can automatically generate the file path rule. When the user needs to query, the file corresponding to the file path rule can be directly searched locally without manual analysis. Saves personnel workload.
在一种可能的设计中,该方法还可以包括:该终端获取配置指令,该配置指令用于指示该终端为待配置文件设置创建者信息;该终端根据该配置指令确定该待配置文件,该待配置文件对应的元数据中未记录该待配置文件的创建者信息;该终端根据该配置指令获取该文件路径规则;该终端根据该待配置文件的文件路径和该文件路径规则确定该待配置文件的创建者信息;该终端在该待配置文件对应的元数据中写入该待配置文件的创建者信息。本申请实施例中,当终端生成文件路径规则后,可以根据文件路径规则和待配置文件的文件路径确定待配置文件对应的创建者信息。例如,某一文件夹下,存在第一文件和第二文件,其中,第一文件的元数据中记录有第一创建者信息,第二文件的元数据中未记录创建者信息。则在文件路径规则中,该文件夹指示为第一创建者信息所对应的文件路径。因而,终端根据该文件路径规则可以确定该第二文件的创建者信息也是第一创建者信息,并写入在第二文件的元数据中,从而实现了第二文件,即待配置文件的创建者信息的记录。In a possible design, the method may also include: the terminal obtains a configuration instruction, the configuration instruction is used to instruct the terminal to set the creator information for the file to be configured; the terminal determines the file to be configured according to the configuration instruction, the The creator information of the file to be configured is not recorded in the metadata corresponding to the file to be configured; the terminal obtains the file path rule according to the configuration instruction; the terminal determines the file path to be configured based on the file path of the file to be configured and the file path rule The creator information of the file; the terminal writes the creator information of the file to be configured in the metadata corresponding to the file to be configured. In the embodiment of this application, after the terminal generates the file path rule, the creator information corresponding to the file to be configured can be determined based on the file path rule and the file path of the file to be configured. For example, under a certain folder, there are a first file and a second file, where the first creator information is recorded in the metadata of the first file, and the creator information is not recorded in the metadata of the second file. Then in the file path rule, the folder is indicated as the file path corresponding to the first creator information. Therefore, the terminal can determine that the creator information of the second file is also the first creator information according to the file path rule, and write it in the metadata of the second file, thus realizing the creation of the second file, that is, the file to be configured. record of user information.
在一种可能的设计中,该方法可以包括:当该终端运行第二进程时,该终端获取该第二进程生成的以该目标文件为操作对象的目标指令;该终端根据该目标指令创建该目标文件的关联文件,该关联文件可以包括该目标文件对应的副本文件、修改文件、加解密文件或解压缩文件;若该目标指令为预设指令,则该终端确定该关联文件的创建者信息为该目标文件的创建者信息,并在该关联文件的元数据中写入该关联文件的创建者信息;若该目标指令不为预设指令,则该终端确定该关联文件的创建者信息为该第二进程对应的应用的标识信息或该第二进程的标识信息,并在该关联文件的元数据中写入该关联文件的创建者信息。本申请实施例中,终端在创建目标文件后,可以接收第二进程生成的以该目标文件为操作对象的目标指令,该目标指令例如文件合并指令、文件分解指令、加解密或粘贴指令等。之后,终端根据该目标指令创建目标文件的关联文件,该关联文件可以包括该目标文件对应的副本文件、修改文件、加解密文件或解压缩文件等。而在创建关联文件时,终端同时判断该目标指令是否为预设指令,若为预设指令,则确定关联文件的创建者信息依然为目标文件的创建者信息,否则,则确定关联文件的创建者信息为第二进程的标识信息或第二进程对应的应用的标识信息。对目标文件进行操作生成对应的关联文件,是实际场景下常见的情况,本申请实施例对关联文件的创建者信息记录的情况进行了说明,提高了方案的实用性。In a possible design, the method may include: when the terminal runs a second process, the terminal obtains a target instruction generated by the second process with the target file as an operation object; the terminal creates the target file according to the target instruction. The associated file of the target file. The associated file may include a copy file, a modified file, an encrypted or decrypted file, or a decompressed file corresponding to the target file; if the target instruction is a preset instruction, the terminal determines the creator information of the associated file. is the creator information of the target file, and writes the creator information of the associated file in the metadata of the associated file; if the target command is not a preset command, the terminal determines that the creator information of the associated file is The identification information of the application corresponding to the second process or the identification information of the second process, and the creator information of the associated file is written in the metadata of the associated file. In the embodiment of the present application, after creating a target file, the terminal can receive a target instruction generated by the second process and taking the target file as the operation object. The target instruction is, for example, a file merging instruction, a file decomposition instruction, an encryption, decryption or pasting instruction, etc. Afterwards, the terminal creates an associated file of the target file according to the target instruction. The associated file may include a copy file, a modified file, an encrypted or decrypted file, or a decompressed file corresponding to the target file. When creating an associated file, the terminal also determines whether the target command is a preset command. If it is a preset command, it determines that the creator information of the associated file is still the creator information of the target file. Otherwise, it determines the creation of the associated file. The other information is the identification information of the second process or the identification information of the application corresponding to the second process. It is a common situation in actual scenarios to operate a target file to generate a corresponding associated file. The embodiment of this application explains the record of the creator information of the associated file, which improves the practicality of the solution.
在一种可能的设计中,该预设指令可以包括粘贴指令、重命名指令、加密指令或解密指令。本申请实施例中,对预设指令的情况进行了说明,其中,该预设指令可以预先由用户进行设置。In a possible design, the preset instructions may include paste instructions, rename instructions, encryption instructions or decryption instructions. In the embodiment of the present application, the case of a preset instruction is described, where the preset instruction can be set by the user in advance.
在一种可能的设计中,该应用的标识信息或进程的标识信息可以包括应用名信息、进程名信息或应用包的包名信息。本申请实施例中,对创建者信息中,应用的标识信息和进程的标识信息进行了说明,可以包括应用名信息、进程名信息或应用包的包名信息。需要说明的是,该创建者信息也可以由用户或者终端厂商自行定义,即创建者信息可以是任何可以唯一标识创建目标文件的应用的标识信息。In a possible design, the identification information of the application or the identification information of the process may include application name information, process name information, or package name information of the application package. In the embodiment of this application, the identification information of the application and the identification information of the process in the creator information are explained, which may include application name information, process name information or package name information of the application package. It should be noted that the creator information can also be defined by the user or the terminal manufacturer. That is, the creator information can be any identification information that can uniquely identify the application that created the target file.
在一种可能的设计中,该方法还可以包括:该终端获取修改指令,该修改指令用于指示该终端修改该目标文件的创建者信息,该修改指令携带目标创建者信息;该终端根据该修改指令将该目标文件的创建者信息修改为该目标创建者信息。本申请实施例中,对目标文件的创建者信息的修改进行了说明。终端可以在响应用户操作或者接收其他应用的指令后,生成修改指令,该修改指令中携带用户为该目标文件所设置的目标创建者信息。从而,终端在获取到该修改指令后,可以将目标文件元数据中的创建者信息修改为该目标创建者信息。In a possible design, the method may also include: the terminal obtains a modification instruction, the modification instruction is used to instruct the terminal to modify the creator information of the target file, and the modification instruction carries the target creator information; the terminal obtains the modification instruction according to the The modification instruction modifies the creator information of the target file to the target creator information. In the embodiment of this application, the modification of the creator information of the target file is explained. The terminal can generate a modification instruction after responding to user operations or receiving instructions from other applications. The modification instruction carries the target creator information set by the user for the target file. Therefore, after obtaining the modification instruction, the terminal can modify the creator information in the target file metadata to the target creator information.
在一种可能的设计中,该方法还可以包括:该终端获取显示指令,该显示指令用于指示该终端显示该目标文件的创建者信息;该终端根据该显示指令显示该目标文件的创建者信息。本申请实施例中,终端在接收到显示指令后,可以根据显示指令显示该目标文件的创建者信息,方便用户查看。In a possible design, the method may further include: the terminal obtains a display instruction, the display instruction is used to instruct the terminal to display the creator information of the target file; the terminal displays the creator of the target file according to the display instruction. information. In this embodiment of the present application, after receiving the display instruction, the terminal can display the creator information of the target file according to the display instruction to facilitate user viewing.
在一种可能的设计中,该方法还可以包括:该终端获取文件分类指令,该文件分类指令用于指示该终端按照文件的创建者分类显示多个文件;该终端根据该文件分类指令获取该多个文件的创建者信息,按照该多个文件的创建者信息分类显示该多个文件。本申请实施例中,终端在生成多个文件并记录多个文件的创建者信息后,可以根据文件分类指令获取该多个文件的创建者信息,并按照该多个文件的创建者信息分类显示该多个文件。In a possible design, the method may also include: the terminal obtains a file classification instruction, the file classification instruction is used to instruct the terminal to display multiple files according to the creator of the file; the terminal obtains the file classification instruction according to the file classification instruction. The creator information of multiple files is displayed according to the creator information of the multiple files. In the embodiment of the present application, after the terminal generates multiple files and records the creator information of the multiple files, the terminal can obtain the creator information of the multiple files according to the file classification instruction, and display the creator information according to the categories of the multiple files. The multiple files.
在一种可能的设计中,该方法还可以包括:该终端获取删除指令,该删除指令携带目标创建者信息,用于指示该终端删除待删除文件,该待删除文件为创建者信息为该目标创建者信息的文件;该终端根据该删除指令查找该待删除文件;该终端根据该删除指令删除该目标待删除文件。本申请实施例中,提供了一种删除文件的方法。当用户需要删除一些待删除的文件时,终端响应用户的操作生成删除指令,其中,该删除指令中可以携带待删除文件的创建者信息。从而,该终端可以根据该创建者信息确定待删除文件,并执行删除操作。In a possible design, the method may also include: the terminal obtains a deletion instruction, the deletion instruction carries the target creator information, and is used to instruct the terminal to delete the file to be deleted, and the creator information of the file to be deleted is the target A file with creator information; the terminal searches for the file to be deleted according to the deletion instruction; the terminal deletes the target file to be deleted according to the deletion instruction. In the embodiment of this application, a method for deleting files is provided. When the user needs to delete some files to be deleted, the terminal generates a deletion instruction in response to the user's operation, where the deletion instruction may carry the creator information of the files to be deleted. Therefore, the terminal can determine the file to be deleted based on the creator information and perform the deletion operation.
本申请实施例第二方面提供了一种用于记录文件创建者信息的终端,可以包括:The second aspect of the embodiment of the present application provides a terminal for recording file creator information, which may include:
获取单元,用于获取创建文件指令;Acquisition unit, used to obtain file creation instructions;
创建单元,用于根据该创建文件指令创建目标文件;Creation unit, used to create the target file according to the create file instruction;
确定单元,用于确定该目标文件的创建者信息,该目标文件的创建者信息可以包括创建该目标文件的应用的标识信息或进程的标识信息;a determining unit, configured to determine the creator information of the target file. The creator information of the target file may include identification information of the application that created the target file or identification information of the process;
写入单元,用于在该目标文件对应的元数据中写入该目标文件的创建者信息。The writing unit is used to write the creator information of the target file in the metadata corresponding to the target file.
在一种可能的设计中,In one possible design,
该确定单元,还用于确定该终端上运行的第一进程,该第一进程生成该创建文件指令;The determining unit is also used to determine the first process running on the terminal, and the first process generates the file creation instruction;
该确定单元,具体用于确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息。The determining unit is specifically configured to determine that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process.
在一种可能的设计中,In one possible design,
该获取单元,还用于通过该第一进程接收其他终端或网络服务器发送的该目标文件;The acquisition unit is also used to receive the target file sent by other terminals or network servers through the first process;
该获取单元,具体用于获取该第一进程的保存指令,该保存指令用于指示保存该目标文件;The acquisition unit is specifically used to obtain the save instruction of the first process, and the save instruction is used to instruct to save the target file;
该终端还可以包括:The terminal can also include:
判断单元,用于判断该第一进程对应的应用是否为预设应用;A judging unit, used to judge whether the application corresponding to the first process is a default application;
该确定单元,具体用于在判断该第一进程对应的应用不为预设应用的情况下,确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息;在判断若该第一进程对应的应用为预设应用的情况下,不设置该目标文件的元数据中的创建者信息。The determining unit is specifically configured to determine that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process when it is determined that the application corresponding to the first process is not a default application. Identification information; when it is determined that the application corresponding to the first process is a default application, the creator information in the metadata of the target file is not set.
在一种可能的设计中,In one possible design,
该获取单元,还用于通过该第一进程接收其他终端或网络服务器发送的该目标文件;在判断若该第一进程对应的应用为预设应用的情况下,获取规则表信息,该规则表信息接收自该其他终端或该网络服务器,或存储于该终端中,该规则表信息用于指示不同文件的标识信息和不同的创建者信息的对应关系,该文件的标识信息用于供该终端唯一地确定该标识信息对应的文件;The acquisition unit is also used to receive the target file sent by other terminals or network servers through the first process; when it is determined that the application corresponding to the first process is a default application, obtain the rule table information. The rule table The information is received from the other terminal or the network server, or is stored in the terminal. The rule table information is used to indicate the corresponding relationship between the identification information of different files and different creator information. The identification information of the file is used for the terminal. Uniquely determine the file corresponding to the identification information;
该获取单元,具体用于获取该第一进程的保存指令,该保存指令用于指示保存该目标文件;The acquisition unit is specifically used to obtain the save instruction of the first process, and the save instruction is used to instruct to save the target file;
该终端还可以包括:The terminal can also include:
判断单元,用于判断该第一进程对应的应用是否为预设应用;A judging unit, used to judge whether the application corresponding to the first process is a default application;
该确定单元,具体用于在判断该第一进程对应的应用不为预设应用的情况下,确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息;在判断若该第一进程对应的应用为预设应用的情况下,根据该目标文件的标识信息和该规则表信息确定该目标文件的创建者信息。The determining unit is specifically configured to determine that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process when it is determined that the application corresponding to the first process is not a default application. Identification information; when it is determined that the application corresponding to the first process is a default application, the creator information of the target file is determined based on the identification information of the target file and the rule table information.
在一种可能的设计中,In one possible design,
该确定单元,还用于确定该目标文件的文件路径和该目标文件的创建者信息;The determination unit is also used to determine the file path of the target file and the creator information of the target file;
该创建单元,还用于生成该目标文件的文件路径和该目标文件的创建者信息的对应关系,并保存在文件路径规则中,该文件路径规则用于指示不同的创建者信息与不同的文件路径的对应关系。The creation unit is also used to generate the corresponding relationship between the file path of the target file and the creator information of the target file, and save it in the file path rule. The file path rule is used to indicate different creator information and different files. Correspondence of paths.
在一种可能的设计中,In one possible design,
该获取单元,还用于获取配置指令,该配置指令用于指示为待配置文件设置创建者信息;获取该文件路径规则;The acquisition unit is also used to obtain a configuration instruction, which is used to instruct to set the creator information for the file to be configured; obtain the file path rule;
该确定单元,还用于根据该配置指令确定该待配置文件,该待配置文件对应的元数据中未记录该待配置文件的创建者信息;根据该待配置文件的文件路径和该文件路径规则确定该待配置文件的创建者信息;The determination unit is also used to determine the file to be configured according to the configuration instruction. The metadata corresponding to the file to be configured does not record the creator information of the file to be configured; according to the file path of the file to be configured and the file path rule Determine the creator information of the file to be configured;
该写入单元,还用于在该待配置文件对应的元数据中写入该待配置文件的创建者信息。The writing unit is also used to write the creator information of the file to be configured in the metadata corresponding to the file to be configured.
在一种可能的设计中,In one possible design,
该获取单元,还用于当运行第二进程时,获取该第二进程生成的以该目标文件为操作对象的目标指令;The acquisition unit is also used to acquire the target instruction generated by the second process with the target file as the operation object when running the second process;
该创建单元,还用于根据该目标指令创建该目标文件的关联文件,该关联文件可以包括该目标文件对应的副本文件、修改文件、加解密文件或解压缩文件;The creation unit is also used to create an associated file of the target file according to the target instruction. The associated file may include a copy file, a modified file, an encrypted or decrypted file, or a decompressed file corresponding to the target file;
该写入单元,还用于若该目标指令为预设指令,则确定该关联文件的创建者信息为该目标文件的创建者信息,并在该关联文件的元数据中写入该关联文件的创建者信息;若该目标指令不为预设指令,则确定该关联文件的创建者信息为该第二进程对应的应用的标识信息或该第二进程的标识信息,并在该关联文件的元数据中写入该关联文件的创建者信息。The writing unit is also configured to, if the target instruction is a preset instruction, determine the creator information of the associated file as the creator information of the target file, and write the associated file's metadata in the metadata of the associated file. Creator information; if the target instruction is not a default instruction, determine the creator information of the associated file as the identification information of the application corresponding to the second process or the identification information of the second process, and add it to the element of the associated file. The creator information of the associated file is written in the data.
在一种可能的设计中,该预设指令可以包括粘贴指令、重命名指令、加密指令或解密指令。In a possible design, the preset instructions may include paste instructions, rename instructions, encryption instructions or decryption instructions.
在一种可能的设计中,该应用的标识信息或进程的标识信息可以包括应用名信息、进程名信息或应用包的包名信息。In a possible design, the identification information of the application or the identification information of the process may include application name information, process name information, or package name information of the application package.
在一种可能的设计中,In one possible design,
该获取单元,还用于获取修改指令,该修改指令用于指示该终端修改该目标文件的创建者信息,该修改指令携带目标创建者信息;The acquisition unit is also used to acquire a modification instruction. The modification instruction is used to instruct the terminal to modify the creator information of the target file. The modification instruction carries the target creator information;
该终端还可以包括:The terminal can also include:
修改单元,用于根据该修改指令将该目标文件的创建者信息修改为该目标创建者信息。The modification unit is used to modify the creator information of the target file to the target creator information according to the modification instruction.
在一种可能的设计中,该终端还可以包括:In one possible design, the terminal could also include:
该获取单元,还用于获取显示指令,该显示指令用于指示显示该目标文件的创建者信息;The acquisition unit is also used to acquire a display instruction, which is used to instruct display of the creator information of the target file;
第一显示单元,用于根据该显示指令显示该目标文件的创建者信息。The first display unit is used to display the creator information of the target file according to the display instruction.
在一种可能的设计中,该终端还可以包括:In one possible design, the terminal could also include:
该获取单元,还用于获取文件分类指令,该文件分类指令用于指示该终端按照文件的创建者分类显示多个文件;The acquisition unit is also used to obtain a file classification instruction, which is used to instruct the terminal to display multiple files according to the creator of the file;
第二显示单元,用于根据该文件分类指令获取该多个文件的创建者信息,按照该多个文件的创建者信息分类显示该多个文件。The second display unit is configured to obtain the creator information of the multiple files according to the file classification instruction, and display the multiple files according to the creator information of the multiple files.
在一种可能的设计中,该终端还可以包括:In one possible design, the terminal could also include:
该获取单元,还用于获取删除指令,该删除指令携带目标创建者信息,该删除指令用于指示删除待删除文件,该待删除文件为创建者信息为该目标创建者信息的文件;The acquisition unit is also used to obtain a deletion instruction. The deletion instruction carries target creator information. The deletion instruction is used to instruct deletion of a file to be deleted. The file to be deleted is a file whose creator information is the target creator information;
查找单元,用于根据该删除指令查找该待删除文件;A search unit is used to search for the file to be deleted according to the deletion instruction;
删除单元,用于根据该删除指令删除该目标待删除文件。The deletion unit is used to delete the target file to be deleted according to the deletion instruction.
本申请实施例第三方面还提供了一种用于记录文件创建者信息的终端,可以包括:The third aspect of the embodiment of the present application also provides a terminal for recording file creator information, which may include:
处理器、存储器、以及收发器;所述收发器用于与所述终端之外的装置进行通信;所述存储器用于存储指令代码;所述处理器执行所述指令代码时,使得所述终端执行如本申请实施例中第一方面及任一可选方式中所述的方法。A processor, a memory, and a transceiver; the transceiver is used to communicate with a device outside the terminal; the memory is used to store instruction codes; when the processor executes the instruction codes, the terminal is caused to execute The method described in the first aspect and any optional method in the embodiments of this application.
本申请实施例第四方面还提供了一种计算机存储介质,所述介质存储有指令,当所述指令在计算机上运行时,使得计算机执行如前述第一方面及任一可选方式中所述的方法。The fourth aspect of the embodiment of the present application also provides a computer storage medium, the medium stores instructions, and when the instructions are run on the computer, the computer executes as described in the first aspect and any optional method. Methods.
本申请实施例第五方面还提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行如前述第一方面及任一可选方式中所述的方法。The fifth aspect of the embodiment of the present application also provides a computer program product containing instructions, which when the instructions are run on a computer, cause the computer to execute the method described in the first aspect and any optional manner.
从以上技术方案可以看出,本申请实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
终端在接收到创建文件指令后,根据该文件创建指令创建目标文件。在创建目标文件过程中,在目标文件对应的元数据中预先写入创建者信息,之后,当需要获取该目标文件的创建者信息时,可以直接从该目标文件的元数据中读取该目标文件的创建者信息。基于元数据的特性,实现了文件的创建者信息的便捷和准确读取。After receiving the file creation instruction, the terminal creates the target file according to the file creation instruction. During the process of creating the target file, the creator information is pre-written in the metadata corresponding to the target file. Later, when the creator information of the target file needs to be obtained, the target can be read directly from the metadata of the target file. The creator information of the file. Based on the characteristics of metadata, the creator information of the file can be read conveniently and accurately.
附图说明Description of the drawings
图1为本申请实施例中一种记录文件创建者信息的一个实施例示意图;Figure 1 is a schematic diagram of an embodiment of recording file creator information in an embodiment of the present application;
图2为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 2 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图3为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 3 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图4为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 4 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图5为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 5 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图6为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 6 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图7为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 7 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图8为本申请实施例中一种记录文件创建者信息的另一个实施例示意图;Figure 8 is a schematic diagram of another embodiment of recording file creator information in the embodiment of the present application;
图9A为本申请实施例中终端的一个实施例示意图;Figure 9A is a schematic diagram of a terminal in an embodiment of the present application;
图9B为本申请实施例中终端的另一个实施例示意图;Figure 9B is a schematic diagram of another embodiment of the terminal in the embodiment of the present application;
图9C为本申请实施例中终端的另一个实施例示意图;Figure 9C is a schematic diagram of another embodiment of the terminal in the embodiment of the present application;
图9D为本申请实施例中终端的另一个实施例示意图;Figure 9D is a schematic diagram of another embodiment of the terminal in the embodiment of the present application;
图9E为本申请实施例中终端的另一个实施例示意图;Figure 9E is a schematic diagram of another embodiment of the terminal in the embodiment of the present application;
图9F为本申请实施例中终端的另一个实施例示意图;Figure 9F is a schematic diagram of another embodiment of the terminal in the embodiment of the present application;
图10为本申请实施例中终端的另一个实施例示意图。Figure 10 is a schematic diagram of another embodiment of the terminal in the embodiment of the present application.
具体实施方式Detailed ways
下面结合附图对本申请实施例提供的一种记录文件创建者信息的方法和终端进行详细说明。A method and terminal for recording file creator information provided by embodiments of the present application will be described in detail below with reference to the accompanying drawings.
本申请实施例,可以应用于Unix类文件系统和windows系统,例如但不限于Android系统,本实施例及后续实施例中以Android系统为例进行说明。The embodiments of the present application can be applied to Unix-like file systems and windows systems, such as but not limited to Android systems. This embodiment and subsequent embodiments will take the Android system as an example for description.
用户在使用Android设备过程中,随着大量的应用的运行,在存储空间中也创建了大量的文件,创建这些文件的应用即为该文件的创建者。通过确定文件的创建者信息,可以对文件进行处理分析。例如,在进行软件卸载时,需要根据文件的创建者信息删除对应的文件。若一些文件无法确定其创建者,则在其对应的软件卸载时,该文件不会被删除,从而在软件卸载后成为卸载残留文件,占用存储空间。此外,也可以通过确定文件的创建者信息,进而根据应用分类展示文件等。When users use Android devices, as a large number of applications are run, a large number of files are also created in the storage space. The applications that create these files are the creators of the files. By determining the creator information of the file, the file can be processed and analyzed. For example, when uninstalling software, the corresponding file needs to be deleted based on the file's creator information. If the creator of some files cannot be determined, the files will not be deleted when the corresponding software is uninstalled, and will become uninstallation residual files after the software is uninstalled, occupying storage space. In addition, you can also determine the creator information of the file and then display the files according to the application classification.
目前,Android系统区分文件的创建者可以通过uid、gid的方式,也可以通过应用的文件路径的方式。采用文件路径区分文件的创建者时,首先需要人工参与:人工通过逆向分析应用创建文件的代码,或者动态调试和测试分析得到应用的文件路径规则,文件路径规则指应用和文件路径的对应关系。之后,Android设备再通过文件路径规则和文件的文件路径对比从而确定文件的创建者。Currently, the Android system can distinguish the creator of a file through uid, gid, or the file path of the application. When using a file path to distinguish the creator of a file, manual participation is first required: manual reverse analysis of the code that creates the file, or dynamic debugging and test analysis to obtain the application's file path rules. File path rules refer to the correspondence between applications and file paths. Afterwards, the Android device determines the creator of the file by comparing the file path rules with the file path.
但是通过文件路径区分文件创建者的方式,由于需要人工参与,并不是一种准确和便捷的方式,且存在遗漏和错误的可能:文件路径规则是经过人工分析获取的,在应用较多的情况下,难免存在遗漏和识别文件路径规则错误的情况;当应用更新时,该应用的文件路径规则也可能随之更新,导致一部分在应用更新前生成的文件无法采用更新后的文件路径规则确定文件的创建者。However, the method of distinguishing file creators through file paths is not an accurate and convenient method because it requires manual participation, and there is the possibility of omissions and errors: file path rules are obtained through manual analysis, and in many cases, Under the circumstances, it is inevitable that there will be omissions and errors in identifying file path rules; when the application is updated, the file path rules of the application may also be updated, causing some files generated before the application update to be unable to use the updated file path rules to determine the files. The creator of.
元数据,又称中介数据、中继数据,为描述数据的数据,主要是描述数据属性的信息,用来支持如指示存储位置、历史数据、资源查找、文件记录等一项或多项功能。元数据可以通过文件系统提供的接口查询,且与其描述的数据具有唯一对应的关系。Metadata, also known as intermediary data and relay data, is data that describes data, mainly information describing data attributes, and is used to support one or more functions such as indicating storage location, historical data, resource search, file recording, etc. Metadata can be queried through the interface provided by the file system, and has a unique corresponding relationship with the data it describes.
基于此,本申请实施例中提供了一种记录文件创建者信息的方法,用于在创建目标文件的过程中,在目标文件的元数据中写入该目标文件对应的创建者信息,从而当需要获取目标文件的创建者信息时,可以直接从目标文件的元数据中读取目标文件的创建者信息。Based on this, embodiments of the present application provide a method for recording file creator information, which is used to write the creator information corresponding to the target file in the metadata of the target file during the process of creating the target file, so that when When you need to obtain the creator information of the target file, you can directly read the creator information of the target file from the metadata of the target file.
其中,目标文件的创建者信息包括创建该目标文件的应用的标识信息或创建该目标文件的进程的标识信息,例如应用名信息、进程名信息或者应用包的包名信息等。The creator information of the target file includes identification information of the application that created the target file or identification information of the process that created the target file, such as application name information, process name information, or package name information of the application package.
此外,需要说明的是,创建目标文件的过程可以是直接创建文件的过程,也可以是终端接收其他设备发送的目标文件后保存文件的过程,下面分别进行说明。In addition, it should be noted that the process of creating a target file can be a process of directly creating the file, or a process of saving the file after the terminal receives the target file sent by other devices, which will be described separately below.
下面具体参照图1,图1为本申请实施例中一种记录文件创建者信息的方法的实施例示意图,可以包括:Referring specifically to Figure 1 below, Figure 1 is a schematic diagram of a method for recording file creator information in an embodiment of the present application, which may include:
101、当终端启动第一进程时,终端记录该第一进程的进程名信息。101. When the terminal starts the first process, the terminal records the process name information of the first process.
本实施例中,终端在启动第一应用的第一进程时,可以确定该第一进程的进程名,并记录该第一进程的进程名信息。该过程如图2中第一应用启动流程类似,系统首先调用Activity管理服务模块(activity manager service,AMS),由AMS判断该第一应用所需的第一进程是否存在,若未存在,则请求进程孵化模块(zygote)进程将第一应用所需要的第一进程启动。第一进程启动过程中,AMS负责创建管理应用框架的相关数据。在启动该第一进程前,AMS通过包管理服务模块(package manager service,PMS)读取第一应用的配置信息,该配置信息中包含该第一应用的组件信息、权限信息、应用名信息和包名等信息。AMS进而通过该配置信息确定第一应用的应用名信息和包名信息,并将该第一应用的包名或者应用名作为第一进程的进程名。确定第一进程的进程名之后,AMS调用zygote,由zygote完成第一进程的创建。而在zygote创建第一进程时,zygote也调用内核模块中的进程(process)管理模块。由进程管理模块对该第一进程进行管理,并将该第一进程的进程名记录到内核里描述进程信息的数据结构中的进程名属性中。In this embodiment, when starting the first process of the first application, the terminal may determine the process name of the first process and record the process name information of the first process. The process is similar to the first application startup process in Figure 2. The system first calls the activity management service module (activity manager service, AMS). The AMS determines whether the first process required by the first application exists. If it does not exist, the request The process incubation module (zygote) process starts the first process required by the first application. During the startup of the first process, AMS is responsible for creating and managing relevant data of the application framework. Before starting the first process, AMS reads the configuration information of the first application through the package manager service module (PMS). The configuration information includes the component information, permission information, application name information and Package name and other information. The AMS further determines the application name information and package name information of the first application through the configuration information, and uses the package name or application name of the first application as the process name of the first process. After determining the process name of the first process, AMS calls zygote, which completes the creation of the first process. When zygote creates the first process, zygote also calls the process management module in the kernel module. The process management module manages the first process, and records the process name of the first process into the process name attribute in the data structure describing process information in the kernel.
102、终端获取第一进程生成的创建文件指令。102. The terminal obtains the file creation instruction generated by the first process.
本实施例中,终端运行第一进程运行时,终端获取该第一进程对应的创建文件指令。在实际的应用场景下,该创建文件指令可以是用户点击创建文件菜单时,终端响应该用户操作生成的指令,也可以是,第一进程在运行过程中创建文件的指令In this embodiment, when the terminal runs the first process, the terminal obtains the file creation instruction corresponding to the first process. In an actual application scenario, the file creation instruction may be an instruction generated by the terminal in response to the user operation when the user clicks the create file menu, or it may be an instruction for the first process to create a file while it is running.
103、终端根据创建文件指令创建目标文件。103. The terminal creates the target file according to the create file instruction.
本实施例中,终端获取创建文件指令后,根据该创建文件指令创建目标文件,创建目标文件的过程与图2中文件创建流程类似,系统可以调用File(java提供的类)的接口,并通过该接口访问文件系统(file system,FS),进而通过File提供的接口和FS提供的接口完成文件的创建。In this embodiment, after the terminal obtains the create file instruction, it creates the target file according to the create file instruction. The process of creating the target file is similar to the file creation process in Figure 2. The system can call the interface of File (class provided by java) and pass This interface accesses the file system (FS), and then completes file creation through the interface provided by File and the interface provided by FS.
104、终端确定目标文件的创建者信息为第一进程的进程名信息,并写入目标文件的元数据中。104. The terminal determines that the creator information of the target file is the process name information of the first process, and writes it into the metadata of the target file.
本实施例中,终端在目标文件创建的过程中,FS从进程管理模块处获取先前记录的第一进程的进程名信息,确定目标文件的创建者信息为该第一进程的进程名信息,进而将该第一进程的进程名信息写入该目标文件对应的元数据中。In this embodiment, when the terminal creates the target file, the FS obtains the previously recorded process name information of the first process from the process management module, determines that the creator information of the target file is the process name information of the first process, and then Write the process name information of the first process into the metadata corresponding to the target file.
105、终端获取读取指令,该读取指令用于指示终端读取目标文件的创建者信息。105. The terminal obtains a read instruction, which is used to instruct the terminal to read the creator information of the target file.
本实施例中,当完成目标文件的创建后,如图2所示的读取文件的创建者信息流程,用户或者其他应用可以通过第二应用读取该创建的文件的创建者信息。该第二应用可以是具有读取文件创建者信息功能的应用,例如,该第二应用可以是文件管理应用,相册应用等。具体地,终端通过第二应用响应用户操作(例如用户点击读取文件信息的选项)或者接收其他软件的读取请求(例如文件分析软件在分析文件时请求读取文件创建者信息)后,生成读取指令。该读取指令是系统为File接口和FS接口(例如ioctl接口)预先定义的指令,通过该读取指令可以从FS中读取文件的创建者信息。In this embodiment, after the creation of the target file is completed, the user or other applications can read the creator information of the created file through the second application according to the process of reading the creator information of the file as shown in FIG. 2 . The second application may be an application with the function of reading file creator information. For example, the second application may be a file management application, a photo album application, etc. Specifically, after the terminal responds to a user operation through the second application (for example, the user clicks the option to read file information) or receives a read request from other software (for example, file analysis software requests to read file creator information when analyzing a file), it generates Read instructions. This read instruction is a pre-defined instruction by the system for the File interface and FS interface (such as ioctl interface). Through this read instruction, the creator information of the file can be read from FS.
106、终端根据读取指令从目标文件的元数据中读取创建者信息。106. The terminal reads the creator information from the metadata of the target file according to the read instruction.
本实施例中,终端获取读取指令后,通过File的接口,访问FS,并从对应的FS接口中读取目标文件的元数据中预先写入的创建者信息。In this embodiment, after obtaining the read instruction, the terminal accesses the FS through the File interface, and reads the creator information pre-written in the metadata of the target file from the corresponding FS interface.
进一步的,终端本地存有不同的应用名信息与不同的进程名信息的对应关系,终端获取到第一进程的进程名信息后,可以通过第一进程的进程信息和该对应关系确定目标文件对应的第一应用的应用名信息,即确定创建该目标文件对应的应用。Furthermore, the terminal locally stores the corresponding relationships between different application name information and different process name information. After the terminal obtains the process name information of the first process, it can determine the target file corresponding to the process information of the first process and the corresponding relationship. The application name information of the first application determines the application corresponding to the target file.
可选的,在一些可能的实现方式中,用户可以主动修文件的创建者信息,当用户通过终端的输入设备触发对目标文件创建者信息的修改时,所述终端获取修改指令。其中,所述修改指令中携带目标创建者信息,该目标创建者信息指示了用户为目标文件设置的创建者。之后,所述终端将所述目标文件的创建者信息修改为该目标创建者信息。Optionally, in some possible implementations, the user can actively modify the creator information of the file. When the user triggers the modification of the creator information of the target file through the input device of the terminal, the terminal obtains the modification instruction. The modification instruction carries target creator information, and the target creator information indicates the creator set by the user for the target file. Afterwards, the terminal modifies the creator information of the target file to the target creator information.
107、当终端运行第二进程时,终端获取第二进程生成的以所述目标文件为操作对象的目标指令。107. When the terminal runs the second process, the terminal obtains the target instruction generated by the second process and takes the target file as the operation object.
本实施例中,当终端的第二进程运行时,终端获取关于目标文件的目标指令,其中,该目标指令是可以是复制指令、粘贴指令、转换指令、压缩指令或修改指令等。其中,第二进程运行前,在启动时,终端记录该第二进程的进程名信息,第二进程的启动过程参照上文,同第一进程的启动过程类似,此处不再赘述。In this embodiment, when the second process of the terminal is running, the terminal obtains a target instruction regarding the target file, where the target instruction may be a copy instruction, a paste instruction, a conversion instruction, a compression instruction, a modification instruction, etc. Before the second process is run, the terminal records the process name information of the second process during startup. The startup process of the second process is as described above. It is similar to the startup process of the first process and will not be described again here.
108、终端根据目标指令创建目标文件的关联文件。108. The terminal creates an associated file of the target file according to the target instruction.
本实施例中,终端获取到目标指令后,执行对应的目标操作,并创建该目标文件的关联文件。其中,对应于目标指令,创建的该关联文件可以是副本文件、转换文件、压缩包文件或修改文件等。In this embodiment, after obtaining the target instruction, the terminal performs the corresponding target operation and creates an associated file of the target file. Wherein, corresponding to the target instruction, the associated file created may be a copy file, a conversion file, a compressed package file or a modified file, etc.
109、终端判断目标指令是否为预设指令。109. The terminal determines whether the target command is a preset command.
本实施例中,终端在获取目标指令后,判断该目标指令是否为预设指令。其中,该预设指令可以进行人工设置,例如,可以设置包括粘贴指令、加密指令、解密指令和重命名指令等。In this embodiment, after obtaining the target instruction, the terminal determines whether the target instruction is a preset instruction. The preset instructions can be set manually. For example, the preset instructions can be set to include paste instructions, encryption instructions, decryption instructions, and rename instructions.
在实际应用中,该预设指令的清单可以由网络侧维护,并定时或在有更新时推送给终端。例如,终端厂商可以在对终端进行系统更新时,将预设指令的更新内容随系统更新内容向终端推送,或在清单有更新时向终端推送,以保证清单的时效性。In practical applications, the list of preset instructions can be maintained by the network side and pushed to the terminal regularly or when there are updates. For example, the terminal manufacturer can push the updated content of the preset instructions to the terminal along with the system update content when updating the system of the terminal, or push it to the terminal when the list is updated to ensure the timeliness of the list.
需要说明的是步骤108与步骤109无必然的执行次序。It should be noted that step 108 and step 109 have no necessary order of execution.
110、若目标指令为预设指令,则终端确定关联文件的创建者信息为目标文件的创建者信息,并写入在该关联文件的元数据中。110. If the target command is a preset command, the terminal determines that the creator information of the associated file is the creator information of the target file, and writes it in the metadata of the associated file.
本实施例中,在创建目标文件的关联文件时,终端同时判断该目标指令是否为预设指令,若为预设指令,则在创建该关联文件时,终端获取目标文件的创建者信息,并将该目标文件的创建者信息写入当前创建的关联文件对应的元数据中,作为关联文件的创建者信息。In this embodiment, when creating the associated file of the target file, the terminal simultaneously determines whether the target instruction is a preset instruction. If it is a preset instruction, when creating the associated file, the terminal obtains the creator information of the target file, and Write the creator information of the target file into the metadata corresponding to the currently created associated file as the creator information of the associated file.
示例性地,在实际应用中,例如用户通过相机应用拍摄照片后,保存在本地。在保存时,也即创建照片文件时,也随之将该照片文件(目标文件)的创建者信息(即相机应用进程的进程名信息),保存在照片文件的元数据中。之后,当用户使用文件管理软件将该照片文件移动或者复制(粘贴指令)至另一文件夹时,在另一个文件夹中创建该照片文件的副本文件(关联文件),则该副本文件的创建者信息依然是相机应用进程的进程名信息。或者,用户通过加密软件加密该照片文件后,生成加密文件,该加密文件的创建者信息依然是相机应用进程的进程名信息。For example, in a practical application, for example, after the user takes a photo through a camera application, the photo is saved locally. When saving, that is, when a photo file is created, the creator information of the photo file (target file) (ie, the process name information of the camera application process) is also saved in the metadata of the photo file. Later, when the user uses file management software to move or copy (paste command) the photo file to another folder, and a copy file (associated file) of the photo file is created in another folder, the creation of the copy file The user information is still the process name information of the camera application process. Or, after the user encrypts the photo file through encryption software, an encrypted file is generated, and the creator information of the encrypted file is still the process name information of the camera application process.
再例如,备份软件进行本地备份时,终端需要在本地预设的存储空间中存储备份文件,之后,可以从该预设的存储空间读取该备份文件,并将备份文件恢复为原文件。而备份文件是原文件的副本文件,备份文件的生成过程和原文件的恢复过程中,终端实际执行的是复制指令和粘贴指令:文件备份时,终端对原文件(目标文件)进行复制,并粘贴在预设的存储空间中,生成备份文件(关联文件);原文件恢复时,终端对备份文件(目标文件)进行复制,并粘贴在原文件的原有路径中,从而将备份文件恢复为原文件(关联文件)。而由于复制指令和粘贴指令均为预设指令,因而当终端通过备份软件本地备份文件时,可以确保所备份的原文件在恢复时,不会将恢复的原文件的创建者信息修改为备份软件的标识信息,即本地备份不会改变原文件的创建者信息。For another example, when the backup software performs local backup, the terminal needs to store the backup file in a preset local storage space. Afterwards, the backup file can be read from the preset storage space and the backup file can be restored to the original file. The backup file is a copy of the original file. During the generation process of the backup file and the recovery process of the original file, the terminal actually executes the copy command and the paste command: when the file is backed up, the terminal copies the original file (target file) and Paste it in the preset storage space to generate a backup file (associated file); when restoring the original file, the terminal copies the backup file (target file) and pastes it in the original path of the original file, thereby restoring the backup file to the original File (associated file). Since both the copy command and the paste command are preset commands, when the terminal backs up files locally through the backup software, it can be ensured that when the backed up original file is restored, the creator information of the restored original file will not be modified by the backup software. identification information, that is, the local backup will not change the creator information of the original file.
111、若目标指令不为预设指令,则终端确定关联文件的创建者信息为第二进程的进程名信息,并写入在该关联文件的元数据中。111. If the target command is not a preset command, the terminal determines that the creator information of the associated file is the process name information of the second process, and writes it in the metadata of the associated file.
本实施例中,在创建目标文件的关联文件时,终端判断该目标指令是否为预设指令,若不为预设指令,则在创建该关联文件时,终端获取记录的第二进程的进程名信息,确定该关联文件的创建者信息为该第二进程的进程名信息,并将该第二进程的进程名信息写入该关联文件的元数据中。终端在获取到读取指令后,可以从该关联文件的元数据中读取该关联文件的创建者信息。其中,该预设指令的说明可以参照上文。In this embodiment, when creating the associated file of the target file, the terminal determines whether the target instruction is a preset instruction. If it is not a preset instruction, when creating the associated file, the terminal obtains the recorded process name of the second process. information, determine that the creator information of the associated file is the process name information of the second process, and write the process name information of the second process into the metadata of the associated file. After obtaining the read instruction, the terminal can read the creator information of the associated file from the metadata of the associated file. For the description of the preset instruction, please refer to the above.
示例性地,在实际场景下,例如用户通过相机应用拍摄照片后,保存在本地,则保存的照片文件(目标文件)的创建者信息即为该相机应用进程的进程名信息。若用户通过修图软件对该照片文件进行修改处理后,另存(另存为指令)为一个新文件(关联文件)。则终端在创建该新文件时,确定该新文件的创建者信息为该修图软件进程的进程名信息,并在该新文件的元数据中写入该新文件的创建者信息。或者,用户通过压缩软件将至少一个照片文件压缩(压缩指令)后,生成对应的压缩包文件(关联文件)。则终端在创建该压缩包文件时,确定该压缩包文件的创建者信息为该压缩软件进程的进程名信息,并在压缩包文件的元数据中写入该压缩包文件的创建者信息。For example, in an actual scenario, for example, after a user takes a photo through a camera application and saves it locally, the creator information of the saved photo file (target file) is the process name information of the camera application process. If the user modifies the photo file through photo editing software, save it (save as command) as a new file (associated file). When the terminal creates the new file, it determines that the creator information of the new file is the process name information of the photo editing software process, and writes the creator information of the new file in the metadata of the new file. Alternatively, the user uses compression software to compress at least one photo file (compression instruction) to generate a corresponding compressed package file (associated file). When the terminal creates the compressed package file, it determines that the creator information of the compressed package file is the process name information of the compression software process, and writes the creator information of the compressed package file in the metadata of the compressed package file.
需要说明的是,步骤107至步骤111为可选步骤。It should be noted that steps 107 to 111 are optional steps.
可选的,在一些可能的实现方式中,所述终端确定所述目标文件的文件路径和所述目标文件的创建者信息;所述终端生成所述目标文件的文件路径和所述目标文件的创建者信息的对应关系,并保存在文件路径规则中,所述文件路径规则用于指示不同的创建者信息与不同的文件路径的对应关系。Optionally, in some possible implementations, the terminal determines the file path of the target file and the creator information of the target file; the terminal generates the file path of the target file and the creator information of the target file. The corresponding relationship between the creator information is stored in the file path rule, and the file path rule is used to indicate the corresponding relationship between different creator information and different file paths.
本实施例中,终端在创建目标文件后,生成目标文件的创建者信息和目标文件的文件路径的对应关系,并保存在文件路径规则中。终端生成目标文件的文件路径规则后,以文件的形式保存在本地,可以接受用户的主动修改,同时在一些应用创建文件的路径变化时,也可以随应用的更新而更新。当终端接收到其他设备发送的文件时,若可以确定所接收的文件的创建者信息,则可以根据该文件的创建者信息和文件路径规则确定该文件对应的存放路径,并在该存放路径中保存该文件。其中,文件路径规则用于指示不同的创建者信息和不同的文件路径的对应关系,该文件路径规则的示意表可以如下表1所示。In this embodiment, after creating the target file, the terminal generates a correspondence between the creator information of the target file and the file path of the target file, and saves it in the file path rule. After the terminal generates the file path rules for the target file, it is saved locally in the form of a file, which can accept the user's active modification. At the same time, when the path of the file created by some applications changes, it can also be updated with the update of the application. When the terminal receives a file sent by another device, if the creator information of the received file can be determined, the storage path corresponding to the file can be determined based on the creator information and file path rules of the file, and the file can be stored in the storage path. Save the file. Among them, the file path rule is used to indicate the corresponding relationship between different creator information and different file paths. The schematic table of the file path rule can be shown in Table 1 below.
表1Table 1
可选的,在一些可能的实现方式中,所述终端获取显示指令,所述显示指令用于指示所述终端显示所述目标文件的创建者信息;所述终端根据所述显示指令显示所述目标文件的创建者信息。本实施例中,终端可以响应用户操作,生成显示指令,根据该显示指令查询目标文件对应的元数据,确定目标文件的创建者信息,并显示目标文件的创建者信息。该显示过程也可以以弹窗的方式弹出显示,也可以以其他方式显示。Optionally, in some possible implementations, the terminal obtains a display instruction, and the display instruction is used to instruct the terminal to display the creator information of the target file; the terminal displays the The creator information of the target file. In this embodiment, the terminal can respond to the user operation, generate a display instruction, query the metadata corresponding to the target file according to the display instruction, determine the creator information of the target file, and display the creator information of the target file. The display process can also be displayed in the form of a pop-up window or in other ways.
例如,如图3所示,用户在文件管理软件的界面浏览文件时,选定文件后,可以通过点击文件管理软件的用于显示文件的创建者信息的菜单来输入显示指令(触控操作301),文件管理器软件获取该指令之后,查询所显示的一个或多个文件的元数据,得到显示的文件的创建者信息,并将显示的一个或多个文件的创建者信息与这一个或多个文件进行对应性地显示,例如,显示在对应的文件图标的下方、上方,或者,如图3所示显示在屏幕的下方位置。For example, as shown in Figure 3, when the user browses files on the interface of the file management software, after selecting the file, the user can enter a display instruction by clicking on the menu of the file management software for displaying the creator information of the file (touch operation 301 ), after the file manager software obtains this instruction, it queries the metadata of one or more displayed files, obtains the creator information of the displayed files, and compares the displayed creator information of one or more files with this one or more files. Multiple files are displayed correspondingly, for example, displayed below or above the corresponding file icon, or displayed at the bottom of the screen as shown in FIG. 3 .
也可以如图4所示,用户在打开某一个文件时,通过的触控操作401(例如长触、双击或者预设手势)或者预设菜单输入显示指令,终端响应该触控操作401,获取该文件的创建者信息,并将创建者叠加显示在文件显示区域。例如,用户点击相册中的图片,打开一张图片时,可以通过预设手势或者预设菜单输入显示指令,终端响应该手势或菜单的选择,创建者信息可以透明或半透明的形式叠加显示在该图片之上。As shown in Figure 4, when the user opens a certain file, he or she may enter a display instruction through a touch operation 401 (such as long touch, double-click or preset gesture) or a preset menu, and the terminal responds to the touch operation 401 to obtain The creator information of the file, and the creator is overlaid and displayed in the file display area. For example, when a user clicks on a picture in the photo album and opens a picture, he or she can enter a display instruction through a preset gesture or a preset menu. The terminal responds to the gesture or menu selection, and the creator information can be displayed in a transparent or translucent form overlaid on the above the picture.
可选的,在一些可能的实现方式中,所述终端获取文件分类指令,所述文件分类指令用于指示所述终端按照文件的创建者分类显示多个文件;所述终端根据所述文件分类指令获取所述多个文件的创建者信息,按照所述多个文件的创建者信息分类显示所述多个文件。本实施例中,终端可以根据用户的操作响应或者接收其他应用调用生成文件分类指令,终端根据该文件分类指令查询目标文件对应的元数据,确定目标文件的创建者信息,进而根据目标文件的创建者信息分类显示该目标文件。在实际应用中,可以用于多种场合。例如,对不同的音乐软件保存的音乐按照不同的文件夹分类展示,对不同应用保存的图片在相册中分类展示(如图5所示),对不同编辑软件编辑的文档分类展示等。Optionally, in some possible implementations, the terminal obtains a file classification instruction, and the file classification instruction is used to instruct the terminal to display multiple files according to the creator of the file; the terminal classifies the files according to the file classification The instruction obtains the creator information of the multiple files, and displays the multiple files in categories according to the creator information of the multiple files. In this embodiment, the terminal can generate a file classification instruction based on the user's operation response or receive other application calls. The terminal queries the metadata corresponding to the target file according to the file classification instruction, determines the creator information of the target file, and then creates the target file based on the file classification instruction. The target file is displayed by category. In practical applications, it can be used in many situations. For example, music saved by different music software is classified and displayed in different folders, pictures saved by different applications are classified and displayed in photo albums (as shown in Figure 5), documents edited by different editing software are classified and displayed, etc.
可选的,在一些可能的实现方式中,所述终端获取删除指令,所述删除指令携带目标创建者信息,用于指示所述终端删除待删除文件,所述待删除文件为创建者信息为所述目标创建者信息的文件;所述终端根据所述删除指令查找所述待删除文件;所述终端根据所述删除指令删除所述目标待删除文件。本实施例中,终端可以根据用户的操作响应或者接收其他应用调用获取删除指令,该删除指令携带有目标创建者信息,终端获取该删除指令后,查找并删除创建者信息为该目标创建者信息的待删除文件,也即,删除目标创建者信息对应的应用所创建的文件。需要说明的是,该删除指令中所携带的目标创建者信息可以由用户进行设定,也可以在确定已卸载的应用后,由终端进行设定,并设定为已卸载应用的应用名、进程名或应用包的包名信息等。Optionally, in some possible implementations, the terminal obtains a deletion instruction. The deletion instruction carries target creator information and is used to instruct the terminal to delete the file to be deleted. The creator information of the file to be deleted is The file of the target creator information; the terminal searches for the file to be deleted according to the deletion instruction; the terminal deletes the target file to be deleted according to the deletion instruction. In this embodiment, the terminal can obtain the deletion instruction according to the user's operation response or receive other application calls. The deletion instruction carries the target creator information. After the terminal obtains the deletion instruction, it searches and deletes the creator information as the target creator information. The files to be deleted, that is, the files created by the application corresponding to the target creator information are deleted. It should be noted that the target creator information carried in the deletion instruction can be set by the user, or can be set by the terminal after determining the uninstalled application, and set to the application name of the uninstalled application, Process name or package name information of application package, etc.
从以上技术方案可以看出,本申请实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
终端启动第一进程时,记录第一进程的进程名信息。若终端通过该第一进程创建目标文件,则该终端确定该目标文件的创建者信息为该第一进程的进程名信息,并写入在该目标文件对应的元数据中。从而,当终端获取到读取指令后,可以从该目标文件的元数据中读取该目标文件的创建者信息。综上所述,本实施例通过在文件的元数据中记录文件的创建者信息的方式,基于元数据的特性,实现了文件的创建者信息的便捷和准确读取。When the terminal starts the first process, the process name information of the first process is recorded. If the terminal creates the target file through the first process, the terminal determines that the creator information of the target file is the process name information of the first process, and writes it in the metadata corresponding to the target file. Therefore, after the terminal obtains the read instruction, it can read the creator information of the target file from the metadata of the target file. To sum up, this embodiment achieves convenient and accurate reading of the creator information of the file based on the characteristics of the metadata by recording the creator information of the file in the metadata of the file.
上述实施例,对直接创建目标文件的过程进行了说明,下面对另一种情况进行说明。The above embodiment describes the process of directly creating a target file, and another case will be described below.
下面具体参照图6,图6为本申请实施例中一种记录文件创建者信息的方法的另一个实施例示意图,可以包括:Referring specifically to Figure 6 below, Figure 6 is a schematic diagram of another embodiment of a method for recording file creator information in an embodiment of the present application, which may include:
601、终端通过第一进程接收其他终端或网络服务器发送的目标文件。601. The terminal receives the target file sent by other terminals or network servers through the first process.
本实施例中,当终端的第一进程运行时,终端通过第一进程接收其他终端或网络服务器发送的目标文件。该第一进程可以是备份软件、蓝牙、浏览器或者及时通信软件的进程,其他终端泛指除该终端外可以与该终端进行数据交互的任意设备,例如移动电话,计算机终端等。该目标文件可以是,终端通过备份软件从预设的设备恢复的备份文件,用户使用浏览器浏览网页时缓存的图片、文档文件,或者,终端通过蓝牙软件从其他设备接收的文件等。In this embodiment, when the first process of the terminal is running, the terminal receives target files sent by other terminals or network servers through the first process. The first process may be a process of backup software, Bluetooth, browser or real-time communication software. Other terminals generally refer to any device other than the terminal that can perform data interaction with the terminal, such as mobile phones, computer terminals, etc. The target file may be a backup file restored by the terminal from a preset device through backup software, a picture or document file cached when the user uses a browser to browse the web, or a file received by the terminal from other devices through Bluetooth software, etc.
602、终端获取第一进程的保存指令,该保存指令用于指示终端保存目标文件。602. The terminal obtains the save instruction of the first process. The save instruction is used to instruct the terminal to save the target file.
本实施例中,该保存指令可以是提前设定好的指令,终端接收到目标文件后,自生成的保存指令,例如用户浏览网页时,终端通过浏览器缓存网页文件时自动产生的保存指令;也可以是响应用户操作,例如用户点击文件保存选项时终端生成的保存指令。In this embodiment, the save instruction can be a preset instruction that is automatically generated by the terminal after receiving the target file. For example, when the user browses a web page, the terminal automatically generates a save instruction when caching web page files through the browser; It can also be in response to user operations, such as a save instruction generated by the terminal when the user clicks the file save option.
603、终端根据保存指令保存目标文件。603. The terminal saves the target file according to the save instruction.
本实施例中,终端在接收到目标文件后,在本地保存该目标文件。In this embodiment, after receiving the target file, the terminal saves the target file locally.
604、终端判断第一进程对应的应用是否为预设应用。604. The terminal determines whether the application corresponding to the first process is a default application.
本实施例中,用户可以提前在终端的系统中设定预设应用清单(也可称为列表),该预设应用清单可以包括预设应用的应用名、包名或者进程名清单。从而,终端在启动第一进程时,可以通过第一进程的进程名或其对应的应用名、包名确定第一进程对应的应用是否为预设应用。In this embodiment, the user can set a default application list (also called a list) in the terminal system in advance. The default application list may include a list of application names, package names, or process names of the default applications. Therefore, when starting the first process, the terminal can determine whether the application corresponding to the first process is a default application through the process name of the first process or its corresponding application name and package name.
其中,该预设应用的清单可以由网络侧维护,并定时或有更新时推送给终端。例如,终端厂商会在其服务器侧维护应用市场上的预设软件清单及预设软件在运行时对应的进程名,定期向终端推送,或在清单有更新时向终端推送,以保证清单的时效性。The list of preset applications can be maintained by the network side and pushed to the terminal regularly or when there are updates. For example, the terminal manufacturer will maintain the default software list on the application market and the process name corresponding to the default software when running on its server side, and push it to the terminal regularly, or push it to the terminal when the list is updated to ensure the timeliness of the list. sex.
需要说明的是,步骤603与步骤604无必然的执行次序。It should be noted that there is no necessary execution order of step 603 and step 604.
605、在判断第一进程对应的应用不为预设应用的情况下,终端确定目标文件的创建者信息为第一进程的进程名信息,并写入在目标文件的元数据中。605. When it is determined that the application corresponding to the first process is not a default application, the terminal determines that the creator information of the target file is the process name information of the first process, and writes it in the metadata of the target file.
本实施例中,第一进程在启动时,终端记录该第一进程的进程名信息。若第一进程对应的应用不为预设应用,则终端确定目标文件的创建者信息为第一进程的进程名信息。终端读取记录的第一进程的进程名信息,并写入目标文件的元数据中。In this embodiment, when the first process is started, the terminal records the process name information of the first process. If the application corresponding to the first process is not a default application, the terminal determines that the creator information of the target file is the process name information of the first process. The terminal reads the recorded process name information of the first process and writes it into the metadata of the target file.
示例性地,在实际应用中,例如,若该预设应用清单可以包括备份软件。则当终端通过即时通信软件的进程接收到网络发送的文件时,终端在本地保存该文件。由于即时通信软件不在预设应用清单内,则终端在保存文件时,确定该文件的创建者信息为该即时通信软件进程的进程名信息,并在该文件的元数据中写入该文件的创建者信息。又例如,终端通过蓝牙软件接收其他设备发送的文件后,由于蓝牙软件不在预设应用清单内,则终端在保存文件时,确定该文件的创建者信息为该蓝牙软件进程的进程名信息,并在该文件的元数据中写入该文件的创建者信息。For example, in actual applications, for example, the preset application list may include backup software. Then, when the terminal receives the file sent by the network through the process of the instant messaging software, the terminal saves the file locally. Since the instant messaging software is not in the default application list, when saving the file, the terminal determines that the creator information of the file is the process name information of the instant messaging software process, and writes the creation of the file in the metadata of the file. or information. For another example, after the terminal receives a file sent by another device through Bluetooth software, because the Bluetooth software is not in the default application list, when saving the file, the terminal determines that the creator information of the file is the process name information of the Bluetooth software process, and Writes the file's creator information in the file's metadata.
606、若第一进程对应的应用为预设应用,则终端获取规则表信息。606. If the application corresponding to the first process is a default application, the terminal obtains the rule table information.
本实施例中,第一进程在启动时,终端记录该第一进程的进程名信息。若第一进程对应的应用为预设应用,则终端获取规则表信息,该规则表信息用于指示不同文件的标识信息和不同的创建者信息的对应关系,该标识信息包括文件的文件名信息、类别信息、文件的修改时间信息中的至少一个。In this embodiment, when the first process is started, the terminal records the process name information of the first process. If the application corresponding to the first process is a default application, the terminal obtains rule table information. The rule table information is used to indicate the correspondence between the identification information of different files and the different creator information. The identification information includes the file name information of the file. , category information, and at least one of file modification time information.
具体地,该对应关系可以是该目标文件的标识信息和进程名信息的对应关系。该目标文件的标识信息可以是该目标文件的特定标识,例如文件名、文件大小、文件路径或者其他可以唯一或者可以组合标识该目标文件的属性信息。该规则表文件由终端生成后,可以保存在本地,也可以发送给其他终端或者网络服务器上保存。终端可以根据目标文件的一个或多个标识信息确定该目标文件唯一对应的创建者信息。该规则表信息的示意表可以如下表2所示。Specifically, the corresponding relationship may be a corresponding relationship between the identification information of the target file and the process name information. The identification information of the target file may be a specific identification of the target file, such as file name, file size, file path or other attribute information that can uniquely or combined identify the target file. After the rule table file is generated by the terminal, it can be saved locally, or sent to other terminals or saved on a network server. The terminal may determine the creator information uniquely corresponding to the target file based on one or more identification information of the target file. A schematic table of the rule table information can be shown in Table 2 below.
表2Table 2
在实际应用中,该规则表信息可以在保存在终端内,也可以保存在其他终端或者网络服务器上。例如,若第一进程为备份软件的进程,预设应用清单中包括备份软件。用户之前通过备份软件备份目标文件,并将该备份文件保存在其他终端或者网络上。之后,终端再通过备份软件恢复文件(从其他终端或者网络接收备份文件)时,为了避免恢复的文件的创建者信息被修改为备份软件进程的进程名信息,则可以在进行备份文件的恢复前,终端根据需要备份的目标文件的创建者信息生成该规则表信息,并将该规则表保存在终端本地,或者,随备份文件保存在其他终端或者网络服务器上。从而,在进行文件恢复时,终端通过规则表确定所恢复的文件的创建者信息。In actual applications, the rule table information can be stored in the terminal, or in other terminals or network servers. For example, if the first process is a process of backup software, the default application list includes the backup software. The user previously backed up the target file through backup software and saved the backup file on other terminals or on the network. Later, when the terminal restores the file through the backup software (receiving the backup file from other terminals or the network), in order to prevent the creator information of the restored file from being modified to the process name information of the backup software process, you can restore the backup file before restoring it. , the terminal generates the rule table information according to the creator information of the target file that needs to be backed up, and saves the rule table locally on the terminal, or saves it with the backup file on other terminals or network servers. Therefore, when performing file recovery, the terminal determines the creator information of the recovered file through the rule table.
可选的,在一些可能的实现方式中,在判断若所述第一进程对应的应用为预设应用的情况下,所述终端不设置所述目标文件的元数据中的创建者信息。本实施例中,终端通过第一进程接收到其他终端或者网络服务器发送的目标文件后,若该第一进程对应的应用为预设应用,则该终端不设置该目标文件的元数据中的创建者信息。其中,不设置是指,若接收的该目标文件的元数据中已存在创建者信息,则不对该创建者信息进行修改,若接收的该目标文件的元数据中不存在创建者信息,则终端也不会在保存该目标文件过程中在目标文件的元数据中添加创建者信息。Optionally, in some possible implementations, when it is determined that the application corresponding to the first process is a default application, the terminal does not set the creator information in the metadata of the target file. In this embodiment, after the terminal receives the target file sent by other terminals or network servers through the first process, if the application corresponding to the first process is a default application, the terminal does not set the creation in the metadata of the target file. or information. Among them, not setting means that if the creator information already exists in the received metadata of the target file, the creator information will not be modified. If the creator information does not exist in the received metadata of the target file, the terminal Creator information is also not added to the target file's metadata during the save process.
在实际场景下,例如,预设应用为备份软件的应用,则终端接收到其他终端或者网络服务器发送的目标文件后,进行恢复时(保存目标文件),不在目标文件的元数据中修改或者添加创建者信息。In actual scenarios, for example, if the default application is a backup software application, after the terminal receives the target file sent by other terminals or network servers, when restoring (saving the target file), the metadata of the target file will not be modified or added. Creator information.
607、终端根据目标文件的标识信息和规则表信息确定目标文件的创建者信息,并写入在目标文件的元数据中。607. The terminal determines the creator information of the target file based on the identification information and rule table information of the target file, and writes it in the metadata of the target file.
本实施例中,终端获取到规则表信息后,可以通过接收到的目标文件的标识信息与规则表信息的对比确定所述目标文件的创建者信息。具体地,可以首先判断文件名,若仍无法确定目标文件与创建者信息的唯一对应关系,则可以再对比文件类别、文件大小或修改日期等,直至确定目标文件和创建者信息的唯一对应关系。之后,终端在目标文件的元数据中写入该目标文件的创建者信息。In this embodiment, after the terminal obtains the rule table information, the terminal can determine the creator information of the target file by comparing the received identification information of the target file with the rule table information. Specifically, the file name can be determined first. If the unique correspondence between the target file and the creator information cannot be determined, the file category, file size or modification date can be compared until the unique correspondence between the target file and the creator information is determined. . Afterwards, the terminal writes the creator information of the target file in the metadata of the target file.
可选的,在一些可能的实现方式中,若所述第一进程对应的应用为预设应用,则所述终端先确定所述目标文件的创建者信息为所述第一进程的进程名信息,并在所述目标文件的元数据中写入所述目标文件的创建者信息,但此时写入元数据的创建者信息可能不准确或者不合适,故所述终端在后续会获取规则表信息,并根据所述规则表信息更新所述目标文件的创建者信息,所述更新后的所述目标文件的创建者信息由所述终端根据所述目标文件的标识信息和所述规则表信息确定。本实施例中,若第一进程为备份软件的进程,同时预设应用清单中也包括备份软件,则终端在通过备份软件接收其他终端或者网络发送的备份文件(文件恢复)时,在保存文件时,先将保存的文件的创建者信息修改为备份软件进程的进程名信息,之后再根据规则表信息更新保存的文件的创建者信息。Optionally, in some possible implementations, if the application corresponding to the first process is a default application, the terminal first determines that the creator information of the target file is the process name information of the first process. , and write the creator information of the target file in the metadata of the target file. However, the creator information written in the metadata at this time may be inaccurate or inappropriate, so the terminal will obtain the rule table later. information, and updates the creator information of the target file according to the rule table information. The updated creator information of the target file is generated by the terminal according to the identification information of the target file and the rule table information. Sure. In this embodiment, if the first process is a backup software process, and the default application list also includes the backup software, then when the terminal receives the backup file (file recovery) sent by other terminals or the network through the backup software, it saves the file. , first modify the saved file's creator information to the process name information of the backup software process, and then update the saved file's creator information according to the rule table information.
608、终端获取读取指令。608. The terminal obtains the read instruction.
609、终端根据文件读取指令读取目标文件对应的创建者信息。609. The terminal reads the creator information corresponding to the target file according to the file reading instruction.
需要说明的是,步骤608与步骤609与图1所示实施例中步骤105与步骤106类似,此处不再赘述。It should be noted that step 608 and step 609 are similar to step 105 and step 106 in the embodiment shown in FIG. 1 and will not be described again here.
可选的,在一些可能的实现方式中,当第二进程运行时,所述终端获取第二进程生成的以所述目标文件为操作对象的目标指令;所述终端根据所述目标指令创建所述目标文件的关联文件,所述关联文件包括所述目标文件对应的副本文件、修改文件、加解密文件或解压缩文件;若所述目标指令为预设指令,则所述终端确定所述关联文件的创建者信息为所述目标文件的创建者信息,并在所述关联文件的元数据中写入所述关联文件的创建者信息;若所述目标指令不为预设指令,则所述终端确定所述关联文件的创建者信息为所述第二进程的进程名信息,并在所述关联文件的元数据中写入所述关联文件的创建者信息。Optionally, in some possible implementations, when the second process is running, the terminal obtains the target instruction generated by the second process and takes the target file as the operation object; the terminal creates the target file according to the target instruction. Associated files of the target file, the associated files include copy files, modified files, encryption and decryption files, or decompressed files corresponding to the target file; if the target instruction is a preset instruction, the terminal determines the association The creator information of the file is the creator information of the target file, and the creator information of the associated file is written in the metadata of the associated file; if the target instruction is not a preset instruction, the The terminal determines that the creator information of the associated file is the process name information of the second process, and writes the creator information of the associated file in the metadata of the associated file.
需要说明的是,该可选步骤与图1所示实施例中步骤107至步骤111类似,此处不再赘述。It should be noted that this optional step is similar to steps 107 to 111 in the embodiment shown in FIG. 1 and will not be described again here.
可选的,在一些可能的实现方式中,所述终端确定所述目标文件的文件路径和所述目标文件的创建者信息;所述终端生成所述目标文件的文件路径和所述目标文件的创建者信息的对应关系,并保存在文件路径规则中,所述文件路径规则用于指示不同的创建者信息与不同的文件路径的对应关系。Optionally, in some possible implementations, the terminal determines the file path of the target file and the creator information of the target file; the terminal generates the file path of the target file and the creator information of the target file. The corresponding relationship between the creator information is stored in the file path rule, and the file path rule is used to indicate the corresponding relationship between different creator information and different file paths.
可选的,在一些可能的实现方式中,所述终端获取显示指令,所述显示指令用于指示所述终端显示所述目标文件的创建者信息;所述终端根据所述显示指令显示所述目标文件的创建者信息。Optionally, in some possible implementations, the terminal obtains a display instruction, and the display instruction is used to instruct the terminal to display the creator information of the target file; the terminal displays the The creator information of the target file.
可选的,在一些可能的实现方式中,所述终端获取文件分类指令,所述文件分类指令用于指示所述终端按照文件的创建者分类显示多个文件;所述终端根据所述文件分类指令获取所述多个文件的创建者信息,按照所述多个文件的创建者信息分类显示所述多个文件。Optionally, in some possible implementations, the terminal obtains a file classification instruction, and the file classification instruction is used to instruct the terminal to display multiple files according to the creator of the file; the terminal classifies the files according to the file classification The instruction obtains the creator information of the multiple files, and displays the multiple files in categories according to the creator information of the multiple files.
可选的,在一些可能的实现方式中,所述终端获取删除指令,所述删除指令携带目标创建者信息,用于指示所述终端删除待删除文件,所述待删除文件为创建者信息为所述目标创建者信息的文件;所述终端根据所述删除指令查找所述待删除文件;所述终端根据所述删除指令删除所述目标待删除文件。Optionally, in some possible implementations, the terminal obtains a deletion instruction. The deletion instruction carries target creator information and is used to instruct the terminal to delete the file to be deleted. The creator information of the file to be deleted is The file of the target creator information; the terminal searches for the file to be deleted according to the deletion instruction; the terminal deletes the target file to be deleted according to the deletion instruction.
需要说明的是,以上所述可选步骤与图1所示的实施例中的可选步骤类似,此处不再赘述。It should be noted that the above optional steps are similar to the optional steps in the embodiment shown in FIG. 1 and will not be described again here.
从以上技术方案可以看出,本申请实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
当终端通过第一进程接收到其他终端发送的目标文件后,终端获取该第一进程的保存指令,并根据该保存指令保存该目标文件。之后,终端判断该第一进程对应的应用是否为预设应用,若该第一进程对应的应用为预设应用,例如,预设应用清单中包括备份软件,该第一进程为备份软件的进程时,为了避免接收到的文件被修改为第一进程的进程名信息,则终端在保存目标文件时,可以获取规则表信息,从而根据规则表信息确定目标文件的创建者信息,并在目标文件的元数据中写入该目标文件的创建者信息。或者在确定该第一进程对应的应用为预设应用,终端在保存目标文件时,不设置该目标文件的元数据中的创建者信息。若第一进程不为预设应用,则终端确定目标文件的创建者信息为第一进程的进程名信息,并在目标文件的元数据中写入该目标文件的创建者信息。之后,终端获取读取指令后,可以根据读取指令读取目标文件的创建者信息。综上所述,本实施例通过在文件的元数据中记录文件的创建者信息的方式,基于元数据的特性,实现了文件的创建者信息的便捷和准确读取。After the terminal receives the target file sent by other terminals through the first process, the terminal obtains the save instruction of the first process and saves the target file according to the save instruction. Afterwards, the terminal determines whether the application corresponding to the first process is a default application. If the application corresponding to the first process is a default application, for example, the default application list includes backup software, the first process is a process of the backup software. In order to prevent the received file from being modified to the process name information of the first process, the terminal can obtain the rule table information when saving the target file, thereby determining the creator information of the target file based on the rule table information, and in the target file Write the creator information of the target file in the metadata. Or after determining that the application corresponding to the first process is a default application, the terminal does not set the creator information in the metadata of the target file when saving the target file. If the first process is not a default application, the terminal determines that the creator information of the target file is the process name information of the first process, and writes the creator information of the target file in the metadata of the target file. Afterwards, after the terminal obtains the read instruction, it can read the creator information of the target file according to the read instruction. To sum up, this embodiment achieves convenient and accurate reading of the creator information of the file based on the characteristics of the metadata by recording the creator information of the file in the metadata of the file.
以上所述的实施例中对创建文件时,记录和读取文件创建者信息的过程进行了说明。但在实际应用中,也可能存在这样的情况:系统中已有的文件的元数据中并未记录对应的进程名信息,从而也无法从元数据中读取定文件的创建者。例如,在创建文件时,在文件的元数据中记录和读取创建者信息的方法是系统的更新功能,未更新前的系统并不具有该功能,则未更新前的系统中已创建的文件的元数据中并未记录对应的创建者信息。尤其对于sdcard上的文件而言,现有技术中,缺乏可以直接读取创建者信息的方法。基于此,下面提出提供了一种若已有文件的元数据中未记录创建者信息,记录和读取文件创建者信息的方法。The above-described embodiment describes the process of recording and reading file creator information when creating a file. However, in actual applications, there may also be situations where the corresponding process name information is not recorded in the metadata of the existing files in the system, so the creator of the file cannot be read from the metadata. For example, when creating a file, the method of recording and reading the creator information in the file's metadata is the system's update function. The system before the update does not have this function, so the files that have been created in the system before the update will The corresponding creator information is not recorded in the metadata. Especially for files on sdcard, there is a lack of method to directly read the creator information in the existing technology. Based on this, the following proposes a method for recording and reading file creator information if the creator information is not recorded in the metadata of an existing file.
下面具体参照图7,图7为本申请实施例中一种记录文件创建者信息的方法的另一个实施例示意图,可以包括:Referring specifically to Figure 7 below, Figure 7 is a schematic diagram of another embodiment of a method for recording file creator information in an embodiment of the present application, which may include:
701、终端获取配置指令,该配置指令用于指示为待配置文件设置创建者信息。701. The terminal obtains a configuration instruction, which is used to instruct to set the creator information for the file to be configured.
本实施例中,终端在响应用户输入或者其他软件的指令后,生成配置指令,其中,该配置指令用于指示终端为待配置文件设置创建者信息。该待配置文件对应的元数据中未记录对应的创建者信息。In this embodiment, the terminal generates a configuration instruction after responding to user input or instructions from other software, where the configuration instruction is used to instruct the terminal to set creator information for the file to be configured. The corresponding creator information is not recorded in the metadata corresponding to the file to be configured.
702、终端根据配置指令确定待配置文件,该待配置文件对应的元数据中未记录待配置文件的创建者信息。702. The terminal determines the file to be configured according to the configuration instruction. The metadata corresponding to the file to be configured does not record the creator information of the file to be configured.
本实施例中,终端获取配置指令后,终端查询本地保存的文件的创建者信息,并确定元数据中未记录创建者信息的待配置文件。In this embodiment, after the terminal obtains the configuration instruction, the terminal queries the creator information of the locally saved files, and determines the files to be configured that do not have creator information recorded in the metadata.
703、终端根据配置指令获取文件路径规则。703. The terminal obtains file path rules according to the configuration instructions.
本实施例中,终端获取配置指令后,从本地查找并获取文件路径规则文件。需要说明的是,该文件路径规则文件可以参照上文,如如图1或图6所示实施例对应的可选步骤中,所描述的文件路径规则,即该获取的文件路径规则可以是终端在创建目标文件后,根据目标文件元数据中记录的创建者信息和对应的文件路径生成的文件路径规则。In this embodiment, after obtaining the configuration instruction, the terminal searches for and obtains the file path rule file locally. It should be noted that the file path rule file can refer to the above. For example, in the optional steps corresponding to the embodiment shown in Figure 1 or Figure 6, the file path rule described, that is, the obtained file path rule can be a terminal After the target file is created, file path rules are generated based on the creator information recorded in the target file metadata and the corresponding file path.
可选的,该文件路径规则也可以是用户通过逆向分析应用创建文件的代码,或者动态调试和测试分析得到应用的文件路径规则。在终端获取配置指令后,该终端从本地获取用户保存的该文件路径规则。Optionally, the file path rule can also be the code of the file created by the user through reverse analysis application, or the file path rule applied by dynamic debugging and test analysis. After the terminal obtains the configuration instruction, the terminal obtains the file path rule saved by the user locally.
704、终端根据待配置文件的文件路径和文件路径规则确定待配置文件的创建者信息。704. The terminal determines the creator information of the file to be configured based on the file path of the file to be configured and the file path rule.
本实施例中,终端确定待配置文件后,可以通过待配置文件的文件路径从文件路径规则中所指示的对应关系中,确定该待配置文件对应的创建者信息。例如,待配置文件包括第一文件,其中,第一文件的文件路径为:/storage/emulated/app1/cache,如表1所示,则根据表1所示的文件路径规则,确定第一文件对应的创建者信息为应用名APP1。此外,需要说明的是,若第一文件的文件路径为:/storage/我的文档,根据表1所示的文件路径规则,由于其对应的创建者信息包含APP1和APP2,终端无法确定该第一文件对应的创建者信息为哪一个应用名信息,则如图8所示,终端可以弹窗显示(弹窗800,其中第一文件的文件名为:67gfdfgdfg),并提示用户输入该第一文件的创建者信息。In this embodiment, after the terminal determines the file to be configured, it can determine the creator information corresponding to the file to be configured from the correspondence relationship indicated in the file path rule through the file path of the file to be configured. For example, the file to be configured includes the first file, where the file path of the first file is: /storage/emulated/app1/cache, as shown in Table 1, then the first file is determined according to the file path rules shown in Table 1 The corresponding creator information is the application name APP1. In addition, it should be noted that if the file path of the first file is: /storage/My Documents, according to the file path rules shown in Table 1, because its corresponding creator information includes APP1 and APP2, the terminal cannot determine the first file. Which application name information corresponds to the creator information of a file, as shown in Figure 8, the terminal can display a pop-up window (pop-up window 800, in which the file name of the first file is: 67gfdfgdfg), and prompt the user to enter the first The creator information of the file.
需要说明的是,当待配置文件为sdcard上的文件时,终端可以通过执行步骤703与步骤704获取待配置文件的创建者信息;若待配置文件为内部数据,终端也可以通过获取文件的uid、gid的方式,再根据待配置文件的uid和gid确定待配置文件对应的应用名信息。It should be noted that when the file to be configured is a file on the sdcard, the terminal can obtain the creator information of the file to be configured by executing steps 703 and 704; if the file to be configured is internal data, the terminal can also obtain the uid of the file. , gid method, and then determine the application name information corresponding to the file to be configured based on the uid and gid of the file to be configured.
705、终端在待配置文件对应的元数据中写入待配置文件的创建者信息。705. The terminal writes the creator information of the file to be configured in the metadata corresponding to the file to be configured.
本实施例中,终端确定待配置文件对应的创建者信息后,在待配置文件的元数据中写入该待配置文件的创建者信息。In this embodiment, after determining the creator information corresponding to the file to be configured, the terminal writes the creator information of the file to be configured in the metadata of the file to be configured.
706、终端获取读取指令。706. The terminal obtains the read instruction.
707、终端根据文件读取指令读取待配置文件对应的创建者信息。707. The terminal reads the creator information corresponding to the file to be configured according to the file reading instruction.
需要说明的是,步骤706与步骤707与图1所示实施例中步骤105与步骤106中读取目标文件的创建者信息的过程类似,此处不再赘述。It should be noted that steps 706 and 707 are similar to the process of reading the creator information of the target file in steps 105 and 106 in the embodiment shown in FIG. 1 , and will not be described again here.
可选的,在一些可能的实现方式中,当第二进程运行时,所述终端获取第二进程生成的以所述目标文件为操作对象的目标指令;所述终端根据所述目标指令创建所述目标文件的关联文件,所述关联文件包括所述目标文件对应的副本文件、修改文件、加解密文件或解压缩文件;若所述目标指令为预设指令,则所述终端确定所述关联文件的创建者信息为所述目标文件的创建者信息,并在所述关联文件的元数据中写入所述关联文件的创建者信息;若所述目标指令不为预设指令,则所述终端确定所述关联文件的创建者信息为所述第二进程的进程名信息,并在所述关联文件的元数据中写入所述关联文件的创建者信息。Optionally, in some possible implementations, when the second process is running, the terminal obtains the target instruction generated by the second process and takes the target file as the operation object; the terminal creates the target file according to the target instruction. Associated files of the target file, the associated files include copy files, modified files, encryption and decryption files, or decompressed files corresponding to the target file; if the target instruction is a preset instruction, the terminal determines the association The creator information of the file is the creator information of the target file, and the creator information of the associated file is written in the metadata of the associated file; if the target instruction is not a preset instruction, the The terminal determines that the creator information of the associated file is the process name information of the second process, and writes the creator information of the associated file in the metadata of the associated file.
需要说明的是,该可选步骤与图1所示实施例中步骤107至步骤111类似,此处不再赘述。It should be noted that this optional step is similar to steps 107 to 111 in the embodiment shown in FIG. 1 and will not be described again here.
可选的,在一些可能的实现方式中,所述终端获取显示指令,所述显示指令用于指示所述终端显示所述目标文件的创建者信息;所述终端根据所述显示指令显示所述目标文件的创建者信息。Optionally, in some possible implementations, the terminal obtains a display instruction, and the display instruction is used to instruct the terminal to display the creator information of the target file; the terminal displays the The creator information of the target file.
可选的,在一些可能的实现方式中,所述终端获取文件分类指令,所述文件分类指令用于指示所述终端按照文件的创建者分类显示多个文件;所述终端根据所述文件分类指令获取所述多个文件的创建者信息,按照所述多个文件的创建者信息分类显示所述多个文件。Optionally, in some possible implementations, the terminal obtains a file classification instruction, and the file classification instruction is used to instruct the terminal to display multiple files according to the creator of the file; the terminal classifies the files according to the file classification The instruction obtains the creator information of the multiple files, and displays the multiple files in categories according to the creator information of the multiple files.
可选的,在一些可能的实现方式中,所述终端获取删除指令,所述删除指令携带目标创建者信息,用于指示所述终端删除待删除文件,所述待删除文件为创建者信息为所述目标创建者信息的文件;所述终端根据所述删除指令查找所述待删除文件;所述终端根据所述删除指令删除所述目标待删除文件。Optionally, in some possible implementations, the terminal obtains a deletion instruction. The deletion instruction carries target creator information and is used to instruct the terminal to delete the file to be deleted. The creator information of the file to be deleted is The file of the target creator information; the terminal searches for the file to be deleted according to the deletion instruction; the terminal deletes the target file to be deleted according to the deletion instruction.
需要说明的是,以上所述可选步骤与图1所示的实施例中的可选步骤类似,此处不再赘述。It should be noted that the above optional steps are similar to the optional steps in the embodiment shown in FIG. 1 and will not be described again here.
从以上技术方案可以看出,本申请实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
当系统中一些文件的元数据中不存在创建者信息时,终端确定这些文件为待配置文件。终端在接收到配置指令后,终端根据该配置指令确定该待配置文件,通过该待配置文件的文件路径从终端中已存在的文件路径规则中,查询出该待配置文件对应的创建者信息,并在待配置文件的元数据中写入该待配置文件的创建者信息。从而,当终端获取到读取指令后,可以从该待配置文件的元数据中读取其对应的创建者信息。综上所述,本实施例通过在文件的元数据中记录文件的创建者信息的方式,基于元数据的特性,实现了文件的创建者信息的便捷和准确读取。When the metadata of some files in the system does not contain creator information, the terminal determines that these files are files to be configured. After the terminal receives the configuration instruction, the terminal determines the file to be configured according to the configuration instruction, and queries the creator information corresponding to the file to be configured from the file path rules that already exist in the terminal through the file path of the file to be configured. And write the creator information of the file to be configured in the metadata of the file to be configured. Therefore, after the terminal obtains the read instruction, it can read its corresponding creator information from the metadata of the file to be configured. To sum up, this embodiment achieves convenient and accurate reading of the creator information of the file based on the characteristics of the metadata by recording the creator information of the file in the metadata of the file.
下面具体参照图9A,图9A为本申请实施例中终端的一个实施例示意图,包括:Referring specifically to Figure 9A below, Figure 9A is a schematic diagram of a terminal in an embodiment of the present application, including:
获取单元901,用于获取创建文件指令;Obtaining unit 901, used to obtain file creation instructions;
创建单元902,用于根据该创建文件指令创建目标文件;Creation unit 902, used to create a target file according to the create file instruction;
确定单元903,用于确定该目标文件的创建者信息,该目标文件的创建者信息包括创建该目标文件的应用的标识信息或进程的标识信息;Determining unit 903, configured to determine the creator information of the target file. The creator information of the target file includes identification information of the application that created the target file or identification information of the process;
写入单元904,用于在该目标文件对应的元数据中写入该目标文件的创建者信息。The writing unit 904 is configured to write the creator information of the target file in the metadata corresponding to the target file.
在一种可能的设计中,In one possible design,
确定单元903,还用于确定该终端上运行的第一进程,该第一进程生成所述创建文件指令;The determination unit 903 is also used to determine the first process running on the terminal, and the first process generates the create file instruction;
确定单元903,具体用于确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息。The determining unit 903 is specifically configured to determine that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process.
在一种可能的设计中,In one possible design,
获取单元901,还用于通过该第一进程接收其他终端或网络服务器发送的该目标文件;The acquisition unit 901 is also configured to receive the target file sent by other terminals or network servers through the first process;
获取单元901,具体用于获取该第一进程的保存指令,该保存指令用于指示保存该目标文件;The obtaining unit 901 is specifically used to obtain the saving instruction of the first process, and the saving instruction is used to instruct saving of the target file;
该终端还包括:The terminal also includes:
判断单元,用于判断该第一进程对应的应用是否为预设应用;A judging unit, used to judge whether the application corresponding to the first process is a default application;
确定单元903,具体用于在判断该第一进程对应的应用不为预设应用的情况下,确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息;在判断若该第一进程对应的应用为预设应用的情况下,不设置该目标文件的元数据中的创建者信息。The determining unit 903 is specifically configured to determine that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process when it is determined that the application corresponding to the first process is not a default application. Identification information; when it is determined that the application corresponding to the first process is a default application, the creator information in the metadata of the target file is not set.
在一种可能的设计中,具体参照图9B,图9B为本申请实施例中终端的另一个实施例示意图,In one possible design, specifically referring to Figure 9B, Figure 9B is a schematic diagram of another embodiment of the terminal in the embodiment of the present application,
获取单元901,还用于通过该第一进程接收其他终端或网络服务器发送的该目标文件;在判断若该第一进程对应的应用为预设应用的情况下,获取规则表信息,该规则表信息接收自该其他终端或该网络服务器,或存储于该终端中,该规则表信息用于指示不同文件的标识信息和不同的创建者信息的对应关系,该文件的标识信息用于供该终端唯一地确定该标识信息对应的文件;The acquisition unit 901 is also configured to receive the target file sent by other terminals or network servers through the first process; when it is determined that the application corresponding to the first process is a default application, obtain the rule table information. The rule table The information is received from the other terminal or the network server, or is stored in the terminal. The rule table information is used to indicate the corresponding relationship between the identification information of different files and different creator information. The identification information of the file is used for the terminal. Uniquely determine the file corresponding to the identification information;
获取单元901,具体用于获取该第一进程的保存指令,该保存指令用于指示保存该目标文件;The obtaining unit 901 is specifically used to obtain the saving instruction of the first process, and the saving instruction is used to instruct saving of the target file;
该终端还可以包括:The terminal can also include:
判断单元905,用于判断该第一进程对应的应用是否为预设应用;The judging unit 905 is used to judge whether the application corresponding to the first process is a default application;
确定单元903,具体用于在判断该第一进程对应的应用不为预设应用的情况下,确定该目标文件的创建者信息为该第一进程对应的应用的标识信息或该第一进程的标识信息;在判断若该第一进程对应的应用为预设应用的情况下,根据该目标文件的标识信息和该规则表信息确定该目标文件的创建者信息。The determining unit 903 is specifically configured to determine that the creator information of the target file is the identification information of the application corresponding to the first process or the identification information of the first process when it is determined that the application corresponding to the first process is not a default application. Identification information; when it is determined that the application corresponding to the first process is a default application, the creator information of the target file is determined based on the identification information of the target file and the rule table information.
在一种可能的设计中,In one possible design,
确定单元903,还用于确定该目标文件的文件路径和该目标文件的创建者信息;The determining unit 903 is also used to determine the file path of the target file and the creator information of the target file;
创建单元902,还用于生成该目标文件的文件路径和该目标文件的创建者信息的对应关系,并保存在文件路径规则中,该文件路径规则用于指示不同的创建者信息与不同的文件路径的对应关系。The creation unit 902 is also used to generate the corresponding relationship between the file path of the target file and the creator information of the target file, and save it in the file path rule. The file path rule is used to indicate different creator information and different files. Correspondence of paths.
在一种可能的设计中,In one possible design,
获取单元901,还用于获取配置指令,该配置指令用于指示为待配置文件设置创建者信息;获取该文件路径规则;The acquisition unit 901 is also used to obtain a configuration instruction, which is used to instruct to set the creator information for the file to be configured; obtain the file path rule;
确定单元903,还用于根据该配置指令确定该待配置文件,该待配置文件对应的元数据中未记录该待配置文件的创建者信息;根据该待配置文件的文件路径和该文件路径规则确定该待配置文件的创建者信息;The determining unit 903 is also configured to determine the file to be configured according to the configuration instruction. The metadata corresponding to the file to be configured does not record the creator information of the file to be configured; according to the file path of the file to be configured and the file path rule Determine the creator information of the file to be configured;
写入单元904,还用于在该待配置文件对应的元数据中写入该待配置文件的创建者信息。The writing unit 904 is also configured to write the creator information of the file to be configured in the metadata corresponding to the file to be configured.
在一种可能的设计中,In one possible design,
获取单元901,还用于当运行第二进程时,获取该第二进程生成的以该目标文件为操作对象的目标指令;The acquisition unit 901 is also configured to acquire the target instruction generated by the second process with the target file as the operation object when running the second process;
创建单元902,还用于根据该目标指令创建该目标文件的关联文件,该关联文件包括该目标文件对应的副本文件、修改文件、加解密文件或解压缩文件;The creation unit 902 is also configured to create an associated file of the target file according to the target instruction. The associated file includes a copy file, a modified file, an encryption/decryption file, or a decompression file corresponding to the target file;
写入单元904,还用于若该目标指令为预设指令,则确定该关联文件的创建者信息为该目标文件的创建者信息,并在该关联文件的元数据中写入该关联文件的创建者信息;若该目标指令不为预设指令,则确定该关联文件的创建者信息为该第二进程对应的应用的标识信息或该第二进程的标识信息,并在该关联文件的元数据中写入该关联文件的创建者信息。The writing unit 904 is also configured to, if the target instruction is a preset instruction, determine the creator information of the associated file as the creator information of the target file, and write the associated file's metadata in the metadata of the associated file. Creator information; if the target instruction is not a default instruction, determine the creator information of the associated file as the identification information of the application corresponding to the second process or the identification information of the second process, and add it to the element of the associated file. The creator information of the associated file is written in the data.
在一种可能的设计中,该预设指令包括粘贴指令、重命名指令、加密指令或解密指令。In a possible design, the preset instruction includes a paste instruction, a rename instruction, an encryption instruction or a decryption instruction.
在一种可能的设计中,该应用的标识信息或进程的标识信息包括应用名信息、进程名信息或应用包的包名信息。In a possible design, the identification information of the application or the identification information of the process includes application name information, process name information, or package name information of the application package.
在一种可能的设计中,具体参照图9C,图9C为本申请实施例中终端的另一个实施例示意图,In one possible design, specifically referring to Figure 9C, Figure 9C is a schematic diagram of another embodiment of the terminal in the embodiment of the present application,
获取单元901,还用于获取修改指令,该修改指令用于指示该终端修改该目标文件的创建者信息,该修改指令携带目标创建者信息;The acquisition unit 901 is also used to obtain a modification instruction, which is used to instruct the terminal to modify the creator information of the target file, and the modification instruction carries the target creator information;
该终端还可以包括:The terminal can also include:
修改单元906,用于根据该修改指令将该目标文件的创建者信息修改为该目标创建者信息。The modification unit 906 is configured to modify the creator information of the target file to the target creator information according to the modification instruction.
在一种可能的设计中,具体参照图9D,图9D为本申请实施例中终端的另一个实施例示意图,In one possible design, specifically referring to Figure 9D, Figure 9D is a schematic diagram of another embodiment of the terminal in the embodiment of the present application,
获取单元901,还用于获取显示指令,该显示指令用于指示显示该目标文件的创建者信息;The acquisition unit 901 is also used to acquire a display instruction, which is used to instruct display of the creator information of the target file;
该终端还可以包括:The terminal can also include:
第一显示单元907,用于根据该显示指令显示该目标文件的创建者信息。The first display unit 907 is configured to display the creator information of the target file according to the display instruction.
在一种可能的设计中,具体参照图9E,图9E为本申请实施例中终端的另一个实施例示意图,In one possible design, specifically refer to FIG. 9E, which is a schematic diagram of another embodiment of a terminal in an embodiment of the present application.
获取单元901,还用于获取文件分类指令,该文件分类指令用于指示该终端按照文件的创建者分类显示多个文件;The obtaining unit 901 is also used to obtain a file classification instruction, which is used to instruct the terminal to display multiple files according to the creator of the file;
该终端还可以包括:The terminal can also include:
第二显示单元908,用于根据该文件分类指令获取该多个文件的创建者信息,按照该多个文件的创建者信息分类显示该多个文件。The second display unit 908 is configured to obtain the creator information of the multiple files according to the file classification instruction, and display the multiple files according to the creator information of the multiple files.
在一种可能的设计中,具体参照图9F,图9F为本申请实施例中终端的另一个实施例示意图,In a possible design, specifically refer to FIG. 9F, which is a schematic diagram of another embodiment of a terminal in an embodiment of the present application.
获取单元901,还用于获取删除指令,该删除指令携带目标创建者信息,用于指示删除待删除文件,该待删除文件为创建者信息为该目标创建者信息的文件;The acquisition unit 901 is also used to obtain a deletion instruction. The deletion instruction carries the target creator information and is used to instruct the deletion of the file to be deleted. The file to be deleted is a file whose creator information is the target creator information;
该终端还可以包括:The terminal can also include:
查找单元909,用于根据该删除指令查找该待删除文件;The search unit 909 is used to search for the file to be deleted according to the deletion instruction;
删除单元910,用于根据该删除指令删除该目标待删除文件。The deletion unit 910 is configured to delete the target file to be deleted according to the deletion instruction.
下面具体参照图10,图10为本申请实施例中终端的另一个实施例示意图,可以包括:Referring specifically to Figure 10 below, Figure 10 is a schematic diagram of another embodiment of a terminal in an embodiment of the present application, which may include:
处理器1001、存储器1002、以及收发器1003;所述收发器1003用于与所述终端之外的装置进行通信;所述存储器1002用于存储指令代码;所述处理器1001执行所述指令代码时,使得所述终端执行如图1、图6或图7所示实施例及任一可选方式中终端所执行的方法。Processor 1001, memory 1002, and transceiver 1003; the transceiver 1003 is used to communicate with devices outside the terminal; the memory 1002 is used to store instruction codes; the processor 1001 executes the instruction codes When, the terminal is caused to execute the method executed by the terminal in the embodiment shown in Figure 1, Figure 6 or Figure 7 and any optional manner.
本申请实施例还提供了一种计算机存储介质,所述介质存储有指令,当所述指令在计算机上运行时,使得计算机执行如图1、图6或图7所示实施例及任一可选方式中终端所执行的方法。Embodiments of the present application also provide a computer storage medium. The medium stores instructions. When the instructions are run on a computer, the computer is caused to execute the embodiments shown in Figure 1, Figure 6 or Figure 7 and any possible The method executed by the terminal in the selected mode.
本申请实施例还提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行如图1、图6或图7所示实施例及任一可选方式中终端所执行的方法。Embodiments of the present application also provide a computer program product containing instructions. When the instructions are run on a computer, the computer causes the computer to execute the embodiments shown in Figure 1, Figure 6 or Figure 7 and the terminal in any optional manner. The method performed.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使响应技术方案的本质脱离本申请各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still make the foregoing technical solutions. The technical solutions described in each embodiment may be modified, or some of the technical features thereof may be equivalently replaced; however, these modifications or substitutions shall not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910105508.0A CN111522780B (en) | 2019-02-01 | 2019-02-01 | A method and terminal for recording file creator information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910105508.0A CN111522780B (en) | 2019-02-01 | 2019-02-01 | A method and terminal for recording file creator information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111522780A CN111522780A (en) | 2020-08-11 |
CN111522780B true CN111522780B (en) | 2024-01-30 |
Family
ID=71900600
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910105508.0A Active CN111522780B (en) | 2019-02-01 | 2019-02-01 | A method and terminal for recording file creator information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111522780B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473277A (en) * | 2013-08-27 | 2013-12-25 | 华为技术有限公司 | Snapshot method and device for file systems |
US8620861B1 (en) * | 2008-09-30 | 2013-12-31 | Google Inc. | Preserving file metadata during atomic save operations |
CN104133641A (en) * | 2014-07-24 | 2014-11-05 | 深圳市同洲电子股份有限公司 | External storage equipment file deleting method and device |
CN104516974A (en) * | 2014-12-26 | 2015-04-15 | 华为技术有限公司 | Management method and device for file system directory entry |
CN105095478A (en) * | 2015-08-12 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Method and device for obtaining establishing time of file in distributed file system |
CN105786805A (en) * | 2014-12-15 | 2016-07-20 | 乐视移动智能信息技术(北京)有限公司 | Intelligent mobile terminal, document manager and file display method of same |
CN106202367A (en) * | 2016-07-07 | 2016-12-07 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device of object information |
CN106775887A (en) * | 2016-12-27 | 2017-05-31 | 努比亚技术有限公司 | The discharging method and device of a kind of application program |
CN106991130A (en) * | 2017-03-07 | 2017-07-28 | 广东欧珀移动通信有限公司 | A file processing method, device and intelligent terminal |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5259780B2 (en) * | 2010-09-14 | 2013-08-07 | 株式会社東芝 | Video file creation apparatus and video file creation method |
US10061863B2 (en) * | 2010-12-17 | 2018-08-28 | Verizon Patent And Licensing Inc. | Asset manager |
US8914334B2 (en) * | 2012-09-12 | 2014-12-16 | International Business Machines Corporation | Using a metadata image of a file system and archive instance to restore data objects in the file system |
-
2019
- 2019-02-01 CN CN201910105508.0A patent/CN111522780B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8620861B1 (en) * | 2008-09-30 | 2013-12-31 | Google Inc. | Preserving file metadata during atomic save operations |
CN103473277A (en) * | 2013-08-27 | 2013-12-25 | 华为技术有限公司 | Snapshot method and device for file systems |
CN104133641A (en) * | 2014-07-24 | 2014-11-05 | 深圳市同洲电子股份有限公司 | External storage equipment file deleting method and device |
CN105786805A (en) * | 2014-12-15 | 2016-07-20 | 乐视移动智能信息技术(北京)有限公司 | Intelligent mobile terminal, document manager and file display method of same |
CN104516974A (en) * | 2014-12-26 | 2015-04-15 | 华为技术有限公司 | Management method and device for file system directory entry |
CN105095478A (en) * | 2015-08-12 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Method and device for obtaining establishing time of file in distributed file system |
CN106202367A (en) * | 2016-07-07 | 2016-12-07 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device of object information |
CN106775887A (en) * | 2016-12-27 | 2017-05-31 | 努比亚技术有限公司 | The discharging method and device of a kind of application program |
CN106991130A (en) * | 2017-03-07 | 2017-07-28 | 广东欧珀移动通信有限公司 | A file processing method, device and intelligent terminal |
Also Published As
Publication number | Publication date |
---|---|
CN111522780A (en) | 2020-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10496609B2 (en) | Systems and methods for automatic synchronization of recently modified data | |
US12003591B2 (en) | Automatic discovery and registration of service applications for files introduced to a user interface | |
US9864736B2 (en) | Information processing apparatus, control method, and recording medium | |
US10242045B2 (en) | Filtering content using synchronization data | |
RU2646334C2 (en) | File management using placeholders | |
US10057318B1 (en) | System, method, and computer program for enabling a user to access and edit via a virtual drive objects synchronized to a plurality of synchronization clients | |
US20190108103A9 (en) | Computing device replication using file system change detection methods and systems | |
JP2016529599A (en) | Content clipboard synchronization | |
KR101682738B1 (en) | Managed system extensibility | |
CN107402846B (en) | File processing method and device | |
CN113204558B (en) | Automatic data table structure updating method and device | |
US7945535B2 (en) | Automatic publishing of digital content | |
US12099886B2 (en) | Techniques for performing clipboard-to-file paste operations | |
CN110119386B (en) | Data processing method, data processing apparatus, medium, and computing device | |
CN110018761B (en) | Method, device and terminal for managing recently used files | |
JP5975113B2 (en) | Information processing apparatus, work environment cooperation method, and work environment cooperation program | |
CN111522780B (en) | A method and terminal for recording file creator information | |
TWI571754B (en) | Method for performing file synchronization control, and associated apparatus | |
CN113505153B (en) | Memorandum backup method based on iOS system and related equipment | |
CN116010364B (en) | Method and device for updating network disk file state, network disk and storage medium | |
US11822580B2 (en) | System and method for operating a digital storage system | |
CN107749892A (en) | Network reading method and device for conference record, intelligent tablet and storage medium | |
CN114363324A (en) | File sharing 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 |