WO2019085591A1 - Intelligent hardware device, intelligent disk data processing method, and storage medium - Google Patents

Intelligent hardware device, intelligent disk data processing method, and storage medium Download PDF

Info

Publication number
WO2019085591A1
WO2019085591A1 PCT/CN2018/101272 CN2018101272W WO2019085591A1 WO 2019085591 A1 WO2019085591 A1 WO 2019085591A1 CN 2018101272 W CN2018101272 W CN 2018101272W WO 2019085591 A1 WO2019085591 A1 WO 2019085591A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
directory
data
node
class
Prior art date
Application number
PCT/CN2018/101272
Other languages
French (fr)
Chinese (zh)
Inventor
朱世伟
Original Assignee
深圳市网心科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市网心科技有限公司 filed Critical 深圳市网心科技有限公司
Publication of WO2019085591A1 publication Critical patent/WO2019085591A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system

Definitions

  • the present application relates to the field of intelligent hardware technologies, and in particular, to an intelligent hardware device, a disk data intelligent processing method, and a computer readable storage medium.
  • intelligent hardware refers to the transformation of traditional equipment through the combination of software and hardware, so that it has intelligent functions, after the intelligence, the hardware has the ability to connect.
  • big data such as smart phones, smart watches, smart TVs, smart bracelets, etc.
  • client devices often need to perform data interaction with embedded devices (eg, file query, storage, deletion, etc.).
  • the main purpose of the present application is to provide an intelligent hardware device, a disk data intelligent processing method, and a computer readable storage medium, which are designed to effectively reduce the system resource consumption of file query and greatly improve the speed of file query.
  • the present application provides an intelligent hardware device including a memory and a processor, wherein the memory stores a disk data intelligent processing program, and the disk data intelligent processing program is executed by the processor. The following steps are implemented:
  • Scanning step scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, the data file being stored in communication with the intelligent hardware device Connected electronic device;
  • a sorting step classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
  • Querying step in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  • the present application further provides an intelligent hardware device, where the smart hardware device includes a memory and a processor, where the disk data intelligent processing program is stored, and the disk data intelligent processing program is The processor implements the following steps when it executes:
  • Scanning step real-time or timing, or after receiving the data file processing instruction, scanning a file directory of the data file to obtain preset type attribute information of each data file, the data file is stored in the memory;
  • a sorting step classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
  • Querying step in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  • the present application further provides a disk data intelligent processing method, which is applicable to an intelligent hardware device storing a data file, or an intelligent hardware device suitable for communicating with an electronic device storing the data file.
  • the method includes the steps of:
  • Scanning step scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, where the data file is stored in the smart hardware device or The electronic device in which the intelligent hardware device is communicatively connected;
  • a sorting step classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
  • Querying step in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  • the present application further provides a computer readable storage medium storing a disk data intelligent processing program, the disk data intelligent processing program being executable by at least one processor, Having the at least one processor perform the following steps:
  • Scanning step scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, the data file being stored in communication with the intelligent hardware device Connected electronic device;
  • a sorting step classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
  • Querying step in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  • the real-time or timing of the application or after receiving the data file processing instruction, scanning the file directory of the data file to obtain the preset type attribute information of each data file; according to the preset type attribute information of each of the data files and the advance Determining a file classification rule, classifying all the data files to obtain a plurality of file classes; and in response to the file query request with the file class sent by the user terminal, querying and referring to the data file corresponding to the file class The file queries the corresponding data file, and feeds the queried data file to the user terminal.
  • the present application classifies the data file, and only needs to query the data file corresponding to the file class provided by the user terminal when querying the data file, instead of querying all the data files in the storage space one by one. Therefore, the efficiency of file query is improved and system resource consumption is reduced.
  • FIG. 1 is a schematic diagram of an optional application environment of an intelligent hardware device of the present application
  • FIG. 2 is a schematic diagram of another optional application environment of the smart hardware device of the present application.
  • FIG. 3 is a schematic diagram of an embodiment of an intelligent hardware device of the present application.
  • FIG. 4 is a block diagram of a program of a first embodiment of a disk data intelligent processing program of the present application
  • FIG. 5 is a program module diagram of a second embodiment of a disk data intelligent processing program of the present application.
  • FIG. 6 is a block diagram showing a program module of a third embodiment of the disk data intelligent processing program of the present application.
  • FIG. 7 is a schematic diagram of a node tree of a file directory
  • FIG. 8 is a schematic flowchart of a first embodiment of a disk data intelligent processing method according to the present application.
  • FIG. 9 is a schematic flowchart of a second embodiment of a disk data intelligent processing method according to the present application.
  • FIG. 10 is a schematic flowchart diagram of a third embodiment of a method for intelligently processing disk data according to the present application.
  • FIG. 1 is a schematic diagram of an optional application environment of the smart hardware device 1 of the present application.
  • the smart hardware device 1 is in communication connection with the user terminal 2.
  • FIG. 2 is a schematic diagram of another optional application environment of the smart hardware device 1 of the present application.
  • the smart hardware device 1 is communicatively coupled to the user terminal 2 and the electronic device 3, respectively.
  • the application proposes an intelligent hardware device.
  • FIG. 3 is a schematic diagram of an embodiment of the smart hardware device 1 of the present application.
  • the smart hardware device 1 may be a smart phone, a smart watch, a smart TV, a smart bracelet, or the like.
  • the smart hardware device 1 may include, but is not limited to, a memory 11 and a processor 12 that communicate with each other through a program bus.
  • Figure 3 shows only the smart hardware device 1 with the components 11, 12, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 may in some embodiments be an internal storage unit of the smart hardware device 1, such as a hard disk or memory of the smart hardware device 1.
  • the memory 11 may also be an external storage device of the smart hardware device 1 in other embodiments, such as a plug-in hard disk equipped on the smart hardware device 1, a smart memory card (SMC), and a secure digital (Secure Digital, SD) card, flash card, etc.
  • the memory 11 may also include both an internal storage unit of the smart hardware device 1 and an external storage device.
  • the memory 11 is used to store application software and various types of data installed in the smart hardware device 1, such as program code of the disk data intelligent processing program 10.
  • the memory 11 can also be used to temporarily store data that has been output or is about to be output.
  • the processor 12 in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing disk data intelligence. Processing program 10, etc.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing disk data intelligence. Processing program 10, etc.
  • FIG. 4 is a program module diagram of the first embodiment of the disk data intelligent processing program 10 of the present application.
  • the disk data intelligent processing program 10 may be divided into one or more modules, one or more modules being stored in the memory 11 and being processed by one or more processors (this embodiment is the processor 12) ) is performed to complete the application.
  • the disk data intelligent processing program 10 can be divided into a scanning module 101, a classification module 102, and a first query module 103.
  • the module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the disk data intelligent processing program 10 in the smart hardware device 1, wherein:
  • the scanning module 101 is configured to scan the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file.
  • the above data file may be stored in an internal or external memory of the smart hardware device 1 (for example, the memory 11 shown in FIG. 3), or may be stored in an electronic device communicatively connected to the smart hardware device 1 (for example, in FIG. 2) In the illustrated electronic device 3).
  • the file directory of the above data file may be stored in an internal or external memory of the smart hardware device 1 (for example, the memory 11 shown in FIG. 3), and may also be stored in the smart device.
  • the hardware device 1 is communicatively connected to an electronic device (for example, the electronic device 3 shown in FIG. 2). It should be noted that the storage location of the data file and its file directory may be the same or different.
  • the preset type attribute information includes a storage path, a creation time, a file size, a picture capturing time, a picture GPS information, a picture rotation angle, a video duration, a file calling time point record, a file modification time point record, and/or a file extension. name.
  • the classification module 102 is configured to classify all the data files according to preset type attribute information of each of the data files and a predetermined file classification rule to obtain a plurality of file classes.
  • the above file class can be exemplified by a jpg format picture class, a pdf format document class, a word format document class, and/or an xls format document class.
  • the above predetermined file classification rules include:
  • the predetermined file extension is included in the preset type attribute information, and the predetermined file extension can be exemplified by ".jpg”, “.pdf”, “.doc “, “.xls”, etc.) and the file class mapping relationship, determine the file class corresponding to each of the data files. Then, each data file is respectively classified into a corresponding file class, for example, a classification label is set for each data file, and file type data of the data file is stored in each category label, or a file data between the file data and the file class is established. The relationship is mapped and the mapping relationship data is stored.
  • the first query module 103 is configured to respond to a file query request with a file class sent by the user terminal, query a data file corresponding to the file query request in a data file corresponding to the file class, and query the data.
  • the file is fed back to the user terminal.
  • the step of the first query module 103 feeding back the queried data file to the user terminal includes:
  • the first query module 103 feeds back the data file of the query to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list that is fed back, if the user selects the data file in the file list.
  • a data file that is, a data retrieval request for sending the data file to the first query module 103, for the first query module 103 to send the data of the data file to the user terminal for display.
  • the preset type attribute information includes the sortable file attribute information (for example, a photo shooting time, a file creation time, a file name, a file size, and the like), and the first query module 103 is further configured to:
  • the data file corresponding to the file query request is queried in the data file corresponding to the file class.
  • the queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result.
  • the data file of the query is fed back to the user terminal in the form of a list, and the data files in the file list are displayed in a sorted order, and a user of the user terminal can select a data file to be viewed based on the returned file list. If the user selects a data file in the file list, the data query request of the data file is sent to the first query module 103, and the first query module 103 sends the data of the data file to the user terminal for display. .
  • the file directory of the data file is scanned in real time or periodically, or after receiving the data file processing instruction, to obtain the preset type attribute information of each data file; according to the preset type attribute information of each of the data files and Predetermining the file classification rule, classifying all the data files to obtain a plurality of file classes; responding to the file query request with the file class sent by the user terminal, querying and searching in the data file corresponding to the file class
  • the file query requests a corresponding data file, and feeds the queried data file to the user terminal.
  • the data file is classified and processed in the embodiment. When the data file is queried, only the data file corresponding to the file class provided by the user terminal needs to be queried, and no data file is required in the storage space. Query, therefore, improves the efficiency of file queries and reduces system resource consumption.
  • FIG. 5 is a block diagram of a program of a second embodiment of the disk data intelligent processing program of the present application.
  • the preset type attribute information includes a file call time point record, and/or a file modification time point record
  • the first query module 103 includes an analysis unit 1031.
  • the analyzing unit 1031 is configured to call a time point record and/or a file modification time point record according to the file of each data file corresponding to each of the file classes, and analyze each of the file types according to a predetermined common file analysis rule. Corresponding common data files and less common data files.
  • the predetermined common file analysis rules include:
  • the file class is selected one by one.
  • the time point record and/or the file modification time point record are called according to the file of each data file corresponding to the selected file class, and each of the selected file classes is respectively calculated.
  • the number of file calls and/or file modifications for the data file within a preset time for example, within the last 3 months).
  • the data file corresponding to the file file is a non-use data file other than the common data file
  • the first preset condition is that the number of file calls of the data file within a preset time is greater than the first preset number of times.
  • the second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times.
  • first preset number of times and the second preset number of times may be equal or not equal.
  • the mapping update unit 1032 is configured to release the pre-established mapping relationship between each of the file classes and the corresponding infrequent data files, and maintain a pre-established mapping relationship between each of the file classes and the corresponding common data files.
  • the query unit 1033 is configured to respond to the file query request with the file class sent by the user terminal, query the common data file corresponding to the file query request from the common data file corresponding to the file class, and query the query data.
  • the commonly used data file is fed back to the user terminal.
  • the query unit 1033 feeds back the commonly used data file of the query to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list fed back, if the user selects the file list.
  • a data file that is, a data retrieval request for sending the data file to the query unit 1033, for the query unit 1033 to send the data of the data file to the user terminal for display.
  • the common data file and the non-common data file corresponding to each file class are analyzed.
  • the file query request sent by the user terminal only the common data file corresponding to the file class in the file query request is queried and fed back to the user.
  • the system resource consumption of the file query is further reduced and the speed of the file query is further improved.
  • mapping update unit 1032 respectively pre-establishes the mapping relationship between each of the file classes and the corresponding infrequent data files, and pre-establishes the pre-establishment between each of the file classes and the corresponding common data files.
  • the steps of the mapping relationship can be replaced by the following steps:
  • the mapping update unit 1032 establishes a mapping relationship between the file class and the corresponding common data file and saves it.
  • the pre-established mapping relationship between the file class and the infrequently used data file is not needed, that is, the pre-established mapping relationship between the original file class and the data file is retained, and each file class and corresponding are established on the basis of this.
  • the mapping relationship between common data files is saved in a new mapping table. When a query is needed, the common data files corresponding to each file class can be found directly in the new mapping table.
  • query unit 1033 is further configured to:
  • the data file corresponding to the file query request is queried from the data file corresponding to the file class, and the queried data file is fed back to The user terminal.
  • the user terminal may send a resume query request to the query unit 1033, and the query unit 1033 responds to the resume query request in the file. All data files corresponding to the class are queried to the user terminal for querying the data file corresponding to the file query request.
  • FIG. 6 is a block diagram of a program of a third embodiment of the disk data intelligent processing program 10 of the present application.
  • the program further includes an extraction module 104, a mapping establishment module 105, and a second query module 106, where:
  • the extracting module 104 is configured to extract one or more directory tags from the file directories of the respective data files according to a predetermined label extraction rule.
  • a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-” in FIG. X5-X6", “X1-X2-X5-X7", “X1-Z1-Z2-Z3", “X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a subdirectory node, each A superior directory node is a home directory node of its lower directory node.
  • node X1 in FIG. 7 is a home directory node of nodes X1, Z1, and Y1
  • node X2 is a home directory node of nodes X3 and X5.
  • the lowest-level shared directory node in each directory node branch is determined, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-shares that are shared with other directory node branches and corresponding to the directory node branch.
  • Directory nodes are not directory nodes for shared directory nodes. For example, the lowest-level shared directory node corresponding to the directory node branch "X1-X2-X3-X4" in FIG. 7 is node X2, and the most corresponding to "X1-X2-X5-X6" and "X1-X2-X5-X7"
  • the lower-level common directory nodes are all nodes X5.
  • the determined node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes are respectively combined according to the position order of the corresponding directory node branches to generate a combined name, and the combined name
  • This is the directory label of the corresponding directory node branch.
  • the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
  • a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-X5-” in FIG. X6", “X1-X2-X5-X7", “X1-Z1-Z2-Z3", “X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a sub-directory node, each of which is a superior
  • the directory node is the home directory node of the lower directory node.
  • node X1 in FIG. 7 is the home directory node of node X1, Z1, Y1, and node X2 is the home directory node of node X3, X5.
  • i is a positive integer greater than 1, for example, i can be 2, and the second node of the directory node branch "X1-X2-X3-X4" in FIG.
  • the level directory node is "X2".
  • the determined i-th directory node of each directory node branch and the node names of all corresponding upper-level directory nodes are sequentially combined according to the position of the corresponding directory node branch to generate a combined name, the combination
  • the name is the directory label of the corresponding directory node branch.
  • the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
  • the mapping establishing module 105 is configured to map the directory labels of the data files and the corresponding file classes, and establish a mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping, and save the mapping relationship.
  • the mapping establishing module 105 marks the directory label of the corresponding data file for each file class. For example, if the file class M includes the data files M1 and M2, the directory label corresponding to the data file M1 is a1, and the directory corresponding to the data file M2. The label is a2, and the file class M marks the directory tags a1 and a2.
  • the map creation module 105 stores the preset type file information of each data file corresponding to the file class M and the file class M, and the mapping relationship data of the directory tags a1 and a2 corresponding to the file class M.
  • the storage location of the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label may be the same as or different from the storage location of the data file.
  • the memory of the smart hardware device 1 (for example, the memory 11 in FIG. 3) is divided into a first storage area and a second storage area, or an electronic device (for example, the electronic device 3 in FIG. 2) that communicatively connects the smart hardware device 1
  • the memory divides the first storage area and the second storage area.
  • the first storage area is used to store the data file
  • the second storage area is used to store the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label.
  • the second query module 106 is configured to respond to the file query request with the directory label and the file class sent by the user terminal, according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. Determining the preset type attribute information of each data file corresponding to the file class and the directory label in the query request, and generating a file query result corresponding to the query request (for example, a file query list), and querying the file result Feedback to the user terminal.
  • a mapping relationship between the file type, the preset type attribute information of the data file, and the directory label is established.
  • the directory label and the file type provided by the user terminal can be quickly and accurately queried.
  • the corresponding data file further improves the efficiency and accuracy of the file query.
  • the present application proposes a disk data intelligent processing method.
  • the method is applicable to smart application devices that store data files, or to smart hardware devices that are communicatively coupled to electronic devices that store data files.
  • FIG. 8 is a schematic flowchart of a first embodiment of a disk data intelligent processing method according to the present application.
  • the method includes:
  • Step S10 Scan the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file.
  • the above data file may be stored in an internal or external memory of the smart hardware device, or may be stored in an electronic device (for example, the electronic device 3 shown in FIG. 2) communicatively coupled to the smart hardware device.
  • the file directory of the above data file may be stored in an internal or external memory of the smart hardware device, or may be stored in an electronic device communicatively connected to the smart hardware device (for example, in FIG. 2) In the illustrated electronic device 3). It should be noted that the storage location of the data file and its file directory may be the same or different.
  • the foregoing preset type attribute information includes a storage path, a creation time, a file size, a picture capturing time, a picture GPS information, a picture rotation angle, a video duration, a file calling time point record, a file modification time point record, and/or a file extension. name.
  • Step S20 Perform classification processing on all the data files according to preset type attribute information of each of the data files and a predetermined file classification rule to obtain a plurality of file classes.
  • the above file class can be exemplified by a jpg format picture class, a pdf format document class, a word format document class, and/or an xls format document class.
  • the above predetermined file classification rules include:
  • the predetermined file extension is included in the preset type attribute information, and the predetermined file extension can be exemplified by ".jpg”, “.pdf”, “.doc “, “.xls”, etc.) and the file class mapping relationship, determine the file class corresponding to each of the data files. Then, each data file is respectively classified into a corresponding file class, for example, a classification label is set for each data file, and file type data of the data file is stored in each category label, or a file data between the file data and the file class is established. The relationship is mapped and the mapping relationship data is stored.
  • Step S30 in response to the file query request with the file class sent by the user terminal, query the data file corresponding to the file query request in the data file corresponding to the file class, and feed back the queried data file to the User terminal.
  • the step of feeding back the queried data file to the user terminal is as follows:
  • the data file of the query is fed back to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list fed back, and if the user selects a data file in the file list, Sending a data retrieval request of the data file to the smart hardware device, where the smart hardware device sends the data of the data file to the user terminal for display.
  • the preset type attribute information includes sortable file attribute information (for example, a photo shooting time, a file creation time, a file name, a file size, and the like), and the step S30 includes:
  • the data file corresponding to the file query request is queried in the data file corresponding to the file class.
  • the queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result.
  • the data file of the query is fed back to the user terminal in the form of a list, and the data files in the file list are displayed in a sorted order, and a user of the user terminal can select a data file to be viewed based on the returned file list. If the user selects a data file in the file list, the data acquisition request of the data file is sent to the smart hardware device, and the smart hardware device sends the data of the data file to the user terminal for display.
  • the file directory of the data file is scanned in real time or periodically, or after receiving the data file processing instruction, to obtain the preset type attribute information of each data file; according to the preset type attribute information of each of the data files and Predetermining the file classification rule, classifying all the data files to obtain a plurality of file classes; responding to the file query request with the file class sent by the user terminal, querying and searching in the data file corresponding to the file class
  • the file query requests a corresponding data file, and feeds the queried data file to the user terminal.
  • the data file is classified and processed in the embodiment. When the data file is queried, only the data file corresponding to the file class provided by the user terminal needs to be queried, and no data file is required in the storage space. Query, therefore, improves the efficiency of file queries and reduces system resource consumption.
  • FIG. 9 is a schematic flowchart diagram of a second embodiment of a disk data intelligent processing method according to the present application.
  • the preset type attribute information includes a file call time point record, and/or a file modification time point record
  • the step S30 includes the following steps:
  • Step S31 invoking a time point record and/or a file modification time point record according to the file of each data file corresponding to each of the file classes, and analyzing, according to a predetermined common file analysis rule, respectively, respectively, corresponding to each of the file types Data files and less common data files.
  • the predetermined common file analysis rules include:
  • the file class is selected one by one.
  • the time point record and/or the file modification time point record are called according to the file of each data file corresponding to the selected file class, and each of the selected file classes is respectively calculated.
  • the number of file calls and/or file modifications for the data file within a preset time for example, within the last 3 months).
  • the data file corresponding to the file file is a non-use data file other than the common data file
  • the first preset condition is that the number of file calls of the data file within a preset time is greater than the first preset number of times.
  • the second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times.
  • first preset number of times and the second preset number of times may be equal or not equal.
  • step S32 the pre-established mapping relationship between each of the file classes and the corresponding infrequent data files is released, and the pre-established mapping relationship between each of the file classes and the corresponding common data files is retained.
  • Step S33 in response to the file query request with the file class sent by the user terminal, querying the common data file corresponding to the file query request from the common data file corresponding to the file class, and querying the commonly used data.
  • the file is fed back to the user terminal.
  • the commonly used data file of the query is fed back to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list fed back, if the user selects a data in the file list.
  • the file is a data retrieval request for sending the data file to the intelligent hardware device, and the smart hardware device sends the data of the data file to the user terminal for display.
  • the common data file and the non-common data file corresponding to each file class are analyzed.
  • the file query request sent by the user terminal only the common data file corresponding to the file class in the file query request is queried and fed back to the user.
  • the system resource consumption of the file query is further reduced and the speed of the file query is further improved.
  • step S32 can be replaced by the following steps:
  • mapping relationship between the file class and the corresponding common data file and save it.
  • the pre-established mapping relationship between the file class and the infrequently used data file is not needed, that is, the pre-established mapping relationship between the original file class and the data file is retained, and each file class and corresponding are established on the basis of this.
  • the mapping relationship between common data files is saved in a new mapping table. When a query is needed, the common data files corresponding to each file class can be found directly in the new mapping table.
  • step S33 the method further includes the following steps:
  • the data file corresponding to the file query request is queried from the data file corresponding to the file class, and the queried data file is fed back to The user terminal.
  • the user terminal may send a resume query request to the smart hardware device, and the smart hardware device responds to the resume query request in the file. All data files corresponding to the class are queried to the user terminal for querying the data file corresponding to the file query request.
  • FIG. 10 is a schematic flowchart diagram of a third embodiment of a disk data intelligent processing method according to the present application.
  • the present embodiment is based on the first embodiment and the second embodiment. After the step S20, the method further includes:
  • Step S40 Extract one or more directory tags from the file directories of the respective data files according to a predetermined label extraction rule.
  • a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-” in FIG. X5-X6", “X1-X2-X5-X7", “X1-Z1-Z2-Z3", “X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a subdirectory node, each A superior directory node is a home directory node of its lower directory node.
  • node X1 in FIG. 7 is a home directory node of nodes X1, Z1, and Y1
  • node X2 is a home directory node of nodes X3 and X5.
  • the lowest-level shared directory node in each directory node branch is determined, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-shares that are shared with other directory node branches and corresponding to the directory node branch.
  • Directory nodes are not directory nodes for shared directory nodes. For example, the lowest-level shared directory node corresponding to the directory node branch "X1-X2-X3-X4" in FIG. 7 is node X2, and the most corresponding to "X1-X2-X5-X6" and "X1-X2-X5-X7"
  • the lower-level common directory nodes are all nodes X5.
  • the determined node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes are respectively combined according to the position order of the corresponding directory node branches to generate a combined name, and the combined name
  • This is the directory label of the corresponding directory node branch.
  • the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
  • a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-X5-” in FIG. X6", “X1-X2-X5-X7", “X1-Z1-Z2-Z3", “X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a sub-directory node, each of which is a superior
  • the directory node is the home directory node of the lower directory node.
  • node X1 in FIG. 7 is the home directory node of node X1, Z1, Y1, and node X2 is the home directory node of node X3, X5.
  • i is a positive integer greater than 1, for example, i can be 2, and the second node of the directory node branch "X1-X2-X3-X4" in FIG.
  • the level directory node is "X2".
  • the determined i-th directory node of each directory node branch and the node names of all corresponding upper-level directory nodes are sequentially combined according to the position of the corresponding directory node branch to generate a combined name, the combination
  • the name is the directory label of the corresponding directory node branch.
  • the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
  • step S50 the directory labels of the data files are associated with the corresponding file classes, and the mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping is established, and the file class and data are saved.
  • the mapping relationship between the preset type attribute information of the file and the directory label is established, and the file class and data are saved.
  • the directory label of the corresponding data file is marked for each file class. For example, if the file type M includes the data files M1 and M2, the directory label corresponding to the data file M1 is a1, and the directory label corresponding to the data file M2 is a2.
  • the directory tags a1 and a2 are marked for the file class M.
  • the file type M, the file type M, the preset type file information of each data file, and the mapping relationship data of the directory tags a1 and a2 corresponding to the file class M are stored.
  • the storage location of the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label may be the same as or different from the storage location of the data file.
  • a memory of an intelligent hardware device eg, memory 11 in FIG. 3
  • a memory of an electronic device eg, electronic device 3 in FIG. 2 in which the smart hardware device is communicatively coupled
  • the first storage area and the second storage area are divided.
  • the first storage area is used to store the data file
  • the second storage area is used to store the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label.
  • Step S60 after responding to the file query request with the directory label and the file class sent by the user terminal, determining the query according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. And the file type query result corresponding to the query file (for example, a file query list), and the file query result is fed back to the user terminal.
  • the query file for example, a file query list
  • a mapping relationship between the file type, the preset type attribute information of the data file, and the directory label is established.
  • the directory label and the file type provided by the user terminal can be quickly and accurately queried.
  • the corresponding data file further improves the efficiency and accuracy of the file query.
  • the present application further provides a computer readable storage medium storing a disk data intelligent processing program, the disk data intelligent processing program being executable by at least one processor to enable the at least one A processor executes the steps of the disk data intelligent processing method in any of the above embodiments.

Landscapes

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

Abstract

An intelligent hardware device, an intelligent disk data processing method, and a computer-readable storage medium. The method comprises: S10 scanning file directories of data files in real time, or at a set time or after a data file processing instruction is received, so as to acquire pre-set type attribute information of each of the data files; S20 according to the pre-set type attribute information of each of the data files and a predetermined file classification rule, performing classification processing on all of the data files, so as to obtain several file classes; and S30 in response to a file query request, with a file class, sent by a user terminal, querying, from data files corresponding to the file class, a data file corresponding to the file query request, and feeding the queried data file back to the user terminal. The present invention improves the file query efficiency, and reduces system resource consumption.

Description

智能硬件设备、磁盘数据智能处理方法和存储介质Intelligent hardware device, disk data intelligent processing method and storage medium
优先权申明Priority claim
本申请基于巴黎公约申明享有2017年11月2日递交的申请号为CN2017110610750、名称为“基于扩展名分类并去冗余的方法及系统”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application is based on the priority of the Chinese Patent Application entitled "Method and System Based on Extension Classification and Deduplication", filed on November 2, 2017, with the application number CN2017110610750 submitted on November 2, 2017. It is incorporated herein by reference.
技术领域Technical field
本申请涉及智能硬件技术领域,特别涉及一种智能硬件设备、磁盘数据智能处理方法和计算机可读存储介质。The present application relates to the field of intelligent hardware technologies, and in particular, to an intelligent hardware device, a disk data intelligent processing method, and a computer readable storage medium.
背景技术Background technique
随着人们生活水平的提高,人们对智能硬件(智能硬件指的是通过软硬件结合的方式,对传统设备进行改造,进而让其拥有智能化的功能,智能化之后,硬件具备连接的能力,实现互联网服务的加载,具备了大数据等附加价值,例如,智能手机、智能手表、智能电视、智能手环等)的需求也越来越强大。智能硬件为用户提供的最便捷的功能之一是可以通过远程访问的方式实现远程控制智能硬件。例如,在由智能硬件设备、服务器、客户端设备组成的通信系统架构中,客户端设备往往需要与嵌入式设备进行数据交互(例如,文件的查询、存储、删除等)。With the improvement of people's living standards, people are smart hardware (Intelligent hardware refers to the transformation of traditional equipment through the combination of software and hardware, so that it has intelligent functions, after the intelligence, the hardware has the ability to connect, The demand for loading Internet services, with added value such as big data, such as smart phones, smart watches, smart TVs, smart bracelets, etc., is also growing. One of the most convenient features that intelligent hardware provides to users is the ability to remotely control intelligent hardware through remote access. For example, in a communication system architecture consisting of intelligent hardware devices, servers, and client devices, client devices often need to perform data interaction with embedded devices (eg, file query, storage, deletion, etc.).
然而,现有的智能硬件设备的磁盘中存储有大量数据文件(例如,图片、视频、音乐、文档等),并且随着使用时间的增加,磁盘中存储的数据文件占用的磁盘空间越来越庞大,从而导致诸多问题,例如,运行性能降低,文件查询过程复杂、耗时、占用大量系统资源。However, existing intelligent hardware devices store a large number of data files (eg, pictures, videos, music, documents, etc.) on the disk, and as the usage time increases, the data files stored on the disk take up more and more disk space. Large, resulting in many problems, such as reduced performance, complex file query process, time-consuming, and a large amount of system resources.
因此,如何对智能硬件设备的磁盘中存储的数据文件进行处理,以有效提高系统性能,有效降低文件查询的系统资源消耗的同时大幅提升文件查询的速度,已经成为一个亟待解决的技术问题。Therefore, how to process the data files stored in the disk of the intelligent hardware device to effectively improve the system performance, effectively reduce the system resource consumption of the file query and greatly increase the speed of the file query has become a technical problem to be solved urgently.
发明内容Summary of the invention
本申请的主要目的是提供一种智能硬件设备、磁盘数据智能处理方法和计算机可读存储介质,旨在有效降低文件查询的系统资源消耗的同时大幅提升文件查询的速度。The main purpose of the present application is to provide an intelligent hardware device, a disk data intelligent processing method, and a computer readable storage medium, which are designed to effectively reduce the system resource consumption of file query and greatly improve the speed of file query.
为实现上述目的,本申请提出一种智能硬件设备,所述智能硬件设备包括存储器和处理器,所述存储器上存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序被所述处理器执行时实现如下步骤:To achieve the above object, the present application provides an intelligent hardware device including a memory and a processor, wherein the memory stores a disk data intelligent processing program, and the disk data intelligent processing program is executed by the processor. The following steps are implemented:
扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于与所述智能硬件设备通信连接的电子设备中;Scanning step: scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, the data file being stored in communication with the intelligent hardware device Connected electronic device;
分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
此外,为实现上述目的,本申请还提出一种智能硬件设备,所述智能硬件设备包括存储器和处理器,所述存储器上存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序被所述处理器执行时实现如下步骤:In addition, in order to achieve the above object, the present application further provides an intelligent hardware device, where the smart hardware device includes a memory and a processor, where the disk data intelligent processing program is stored, and the disk data intelligent processing program is The processor implements the following steps when it executes:
扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于所述存储器中;Scanning step: real-time or timing, or after receiving the data file processing instruction, scanning a file directory of the data file to obtain preset type attribute information of each data file, the data file is stored in the memory;
分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
此外,为实现上述目的,本申请还提出一种磁盘数据智能处理方法,适用于存储有数据文件的智能硬件设备,或者,适用于与存储有所述数据文件的电子设备通信连接的智能硬件设备,该方法包括步骤:In addition, to achieve the above object, the present application further provides a disk data intelligent processing method, which is applicable to an intelligent hardware device storing a data file, or an intelligent hardware device suitable for communicating with an electronic device storing the data file. , the method includes the steps of:
扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于所述智能硬件设备或与所述智能硬件设备通信连接的电子设备中;Scanning step: scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, where the data file is stored in the smart hardware device or The electronic device in which the intelligent hardware device is communicatively connected;
分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
此外,为实现上述目的,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:In addition, in order to achieve the above object, the present application further provides a computer readable storage medium storing a disk data intelligent processing program, the disk data intelligent processing program being executable by at least one processor, Having the at least one processor perform the following steps:
扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于与所述智能硬件设备通信连接的电子设备中;Scanning step: scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, the data file being stored in communication with the intelligent hardware device Connected electronic device;
分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
本申请实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息;根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。相较于现有技术,本申请将数据文件进行分类处理,在进行数据文件查询时,只需要查询用户终端提供的文件类对应的数据文件,而不需在存储空间的所有数据文件中逐一查询,因此,提高了文件查询的效率,且降低了系统资源消耗。The real-time or timing of the application, or after receiving the data file processing instruction, scanning the file directory of the data file to obtain the preset type attribute information of each data file; according to the preset type attribute information of each of the data files and the advance Determining a file classification rule, classifying all the data files to obtain a plurality of file classes; and in response to the file query request with the file class sent by the user terminal, querying and referring to the data file corresponding to the file class The file queries the corresponding data file, and feeds the queried data file to the user terminal. Compared with the prior art, the present application classifies the data file, and only needs to query the data file corresponding to the file class provided by the user terminal when querying the data file, instead of querying all the data files in the storage space one by one. Therefore, the efficiency of file query is improved and system resource consumption is reduced.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the structures shown in the drawings without any creative work for those skilled in the art.
图1为本申请智能硬件设备一可选的应用环境示意图;1 is a schematic diagram of an optional application environment of an intelligent hardware device of the present application;
图2为本申请智能硬件设备另一可选的应用环境示意图;2 is a schematic diagram of another optional application environment of the smart hardware device of the present application;
图3为本申请智能硬件设备一实施例的示意图;3 is a schematic diagram of an embodiment of an intelligent hardware device of the present application;
图4为本申请磁盘数据智能处理程序第一实施例的程序模块图;4 is a block diagram of a program of a first embodiment of a disk data intelligent processing program of the present application;
图5为本申请磁盘数据智能处理程序第二实施例的程序模块图;5 is a program module diagram of a second embodiment of a disk data intelligent processing program of the present application;
图6为本申请磁盘数据智能处理程序第三实施例的程序模块图;6 is a block diagram showing a program module of a third embodiment of the disk data intelligent processing program of the present application;
图7为文件目录的节点树示意图;7 is a schematic diagram of a node tree of a file directory;
图8为本申请磁盘数据智能处理方法第一实施例的流程示意图;8 is a schematic flowchart of a first embodiment of a disk data intelligent processing method according to the present application;
图9为本申请磁盘数据智能处理方法第二实施例的流程示意图;9 is a schematic flowchart of a second embodiment of a disk data intelligent processing method according to the present application;
图10为本申请磁盘数据智能处理方法第三实施例的流程示意图。FIG. 10 is a schematic flowchart diagram of a third embodiment of a method for intelligently processing disk data according to the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
以下结合附图对本申请的原理和特征进行描述,所举实例只用于解释本申请,并非用于限定本申请的范围。The principles and features of the present application are described in the following with reference to the accompanying drawings, which are only used to explain the present application and are not intended to limit the scope of the application.
参阅图1,图1是本申请智能硬件设备1一可选的应用环境示意图。在图1的应用环境中,智能硬件设备1与用户终端2之间通信连接。Referring to FIG. 1, FIG. 1 is a schematic diagram of an optional application environment of the smart hardware device 1 of the present application. In the application environment of FIG. 1, the smart hardware device 1 is in communication connection with the user terminal 2.
参阅图2,图2是本申请智能硬件设备1另一可选的应用环境示意图。在图2的应用环境中,智能硬件设备1分别与用户终端2及电子设备3通信连接。Referring to FIG. 2, FIG. 2 is a schematic diagram of another optional application environment of the smart hardware device 1 of the present application. In the application environment of FIG. 2, the smart hardware device 1 is communicatively coupled to the user terminal 2 and the electronic device 3, respectively.
下面,基于上述应用环境,提出本申请的各个实施例。Hereinafter, various embodiments of the present application are proposed based on the above application environment.
本申请提出一种智能硬件设备。The application proposes an intelligent hardware device.
请参阅图3,图3是本申请智能硬件设备1一实施例的示意图。Please refer to FIG. 3. FIG. 3 is a schematic diagram of an embodiment of the smart hardware device 1 of the present application.
在本实施例中,智能硬件设备1可以是智能手机、智能手表、智能电视、智能手环等。该智能硬件设备1可包括,但不仅限于,通过程序总线相互通信的存储器11及处理器12。图3仅示出了具有组件11、12的智能硬件设备1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In this embodiment, the smart hardware device 1 may be a smart phone, a smart watch, a smart TV, a smart bracelet, or the like. The smart hardware device 1 may include, but is not limited to, a memory 11 and a processor 12 that communicate with each other through a program bus. Figure 3 shows only the smart hardware device 1 with the components 11, 12, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
存储器11在一些实施例中可以是智能硬件设备1的内部存储单元,例如该智能硬件设备1的硬盘或内存。存储器11在另一些实施例中也可以是智能硬件设备1的外部存储设备,例如智能硬件设备1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括智能硬件设备1的内部存储单元也包括外部存储设备。存储器11用于存储安装于智能硬件设备1的应用软件及各类数据,例如磁盘数据智能处理程序10的程序代码等。存储器11还可以用于暂时地存储已经输出或者将要输出的数据。The memory 11 may in some embodiments be an internal storage unit of the smart hardware device 1, such as a hard disk or memory of the smart hardware device 1. The memory 11 may also be an external storage device of the smart hardware device 1 in other embodiments, such as a plug-in hard disk equipped on the smart hardware device 1, a smart memory card (SMC), and a secure digital (Secure Digital, SD) card, flash card, etc. Further, the memory 11 may also include both an internal storage unit of the smart hardware device 1 and an external storage device. The memory 11 is used to store application software and various types of data installed in the smart hardware device 1, such as program code of the disk data intelligent processing program 10. The memory 11 can also be used to temporarily store data that has been output or is about to be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行磁盘数据智能处理程序10等。The processor 12, in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing disk data intelligence. Processing program 10, etc.
请参阅图4,是本申请磁盘数据智能处理程序10第一实施例的程序模块图。在本实施例中,磁盘数据智能处理程序10可以被分割成一个或多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行,以完成本申请。例如,在图4中,磁盘数据智能处理程序10可以被分割成扫描模块101、分类模块102及第一查询模块103。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述磁盘数据智能处理程序10在智能硬件设备1中的执行过程,其中:Please refer to FIG. 4, which is a program module diagram of the first embodiment of the disk data intelligent processing program 10 of the present application. In the present embodiment, the disk data intelligent processing program 10 may be divided into one or more modules, one or more modules being stored in the memory 11 and being processed by one or more processors (this embodiment is the processor 12) ) is performed to complete the application. For example, in FIG. 4, the disk data intelligent processing program 10 can be divided into a scanning module 101, a classification module 102, and a first query module 103. The module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the disk data intelligent processing program 10 in the smart hardware device 1, wherein:
扫描模块101,用于实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息。The scanning module 101 is configured to scan the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file.
上述数据文件可存储于智能硬件设备1的内部或外部存储器(例如,图3中所示的存储器11)中,也可存储于与智能硬件设备1通信连接的电子设备(例如,图2中所示的电子设备3)中。The above data file may be stored in an internal or external memory of the smart hardware device 1 (for example, the memory 11 shown in FIG. 3), or may be stored in an electronic device communicatively connected to the smart hardware device 1 (for example, in FIG. 2) In the illustrated electronic device 3).
上述数据文件的文件目录(例如,D:\PDF\Setup Files),可存储于智能硬件设备1的内部或外部存储器(例如,图3中所示的存储器11)中,也可存储于与智能硬件设备1通信连接的电子设备(例如,图2中所示的电子设备3)中。且需要注意的是,数据文件与其文件目录的存储位置可以相同也可以不同。The file directory of the above data file (for example, D:\PDF\Setup Files) may be stored in an internal or external memory of the smart hardware device 1 (for example, the memory 11 shown in FIG. 3), and may also be stored in the smart device. The hardware device 1 is communicatively connected to an electronic device (for example, the electronic device 3 shown in FIG. 2). It should be noted that the storage location of the data file and its file directory may be the same or different.
上述预设类型属性信息包括存储路径、创建时间、文件大小、图片的拍摄时间、图片GPS信息、图片旋转角度、视频时长、文件调用时间点记录、 文件修改时间点记录,和/或,文件扩展名。The preset type attribute information includes a storage path, a creation time, a file size, a picture capturing time, a picture GPS information, a picture rotation angle, a video duration, a file calling time point record, a file modification time point record, and/or a file extension. name.
分类模块102,用于根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类。The classification module 102 is configured to classify all the data files according to preset type attribute information of each of the data files and a predetermined file classification rule to obtain a plurality of file classes.
上述文件类可举例为jpg格式图片类、pdf格式文档类、word格式文档类和/或xls格式文档类等。The above file class can be exemplified by a jpg format picture class, a pdf format document class, a word format document class, and/or an xls format document class.
上述预先确定的文件分类规则包括:The above predetermined file classification rules include:
首先,根据预先确定的文件扩展名(该预先确定的文件扩展名包含于预设类型属性信息中,且该预先确定的文件扩展名可举例为“.jpg”、“.pdf”、“.doc”、“.xls”等)和文件类之间的映射关系,确定各个所述数据文件对应的文件类。然后,分别将各个数据文件分类至对应的文件类,例如,为各个数据文件设置分类标签,各个分类标签中存储有该数据文件的文件类数据,或者,建立各个文件数据与其文件类之间的映射关系,并将该映射关系数据进行存储处理。First, according to a predetermined file extension (the predetermined file extension is included in the preset type attribute information, and the predetermined file extension can be exemplified by ".jpg", ".pdf", ".doc ", ".xls", etc.) and the file class mapping relationship, determine the file class corresponding to each of the data files. Then, each data file is respectively classified into a corresponding file class, for example, a classification label is set for each data file, and file type data of the data file is stored in each category label, or a file data between the file data and the file class is established. The relationship is mapped and the mapping relationship data is stored.
第一查询模块103,用于响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。The first query module 103 is configured to respond to a file query request with a file class sent by the user terminal, query a data file corresponding to the file query request in a data file corresponding to the file class, and query the data. The file is fed back to the user terminal.
上述第一查询模块103将查询到的数据文件反馈给所述用户终端的步骤包括:The step of the first query module 103 feeding back the queried data file to the user terminal includes:
第一查询模块103将查询的数据文件以列表的形式反馈给该用户终端,该用户终端的一个用户可以基于反馈来的文件列表,选择要查看的数据文件,若该用户选中该文件列表中的一个数据文件,即向该第一查询模块103发送该数据文件的数据调取请求,供该第一查询模块103发送该数据文件的数据给该用户终端显示。The first query module 103 feeds back the data file of the query to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list that is fed back, if the user selects the data file in the file list. A data file, that is, a data retrieval request for sending the data file to the first query module 103, for the first query module 103 to send the data of the data file to the user terminal for display.
进一步地,所述预设类型属性信息包括可排序的文件属性信息(例如,照片拍摄时间,文件创建时间,文件名称,文件大小等),所述第一查询模块103还用于:Further, the preset type attribute information includes the sortable file attribute information (for example, a photo shooting time, a file creation time, a file name, a file size, and the like), and the first query module 103 is further configured to:
首先,响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件。First, in response to the file query request with the file class sent by the user terminal, the data file corresponding to the file query request is queried in the data file corresponding to the file class.
然后,按照查询到的所述数据文件对应的文件属性信息,将查询到的所述数据文件进行排序,并按照排序结果将查询到的所述数据文件反馈给所述用户终端。例如,将查询的数据文件以列表的形式反馈给该用户终端,该文件列表中的数据文件按照排序顺序展示,该用户终端的一个用户可以基于反馈来的该文件列表,选择要查看的数据文件,若该用户选中该文件列表中的一个数据文件,即向该第一查询模块103发送该数据文件的数据调取请求,供该第一查询模块103发送该数据文件的数据给该用户终端显示。Then, the queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result. For example, the data file of the query is fed back to the user terminal in the form of a list, and the data files in the file list are displayed in a sorted order, and a user of the user terminal can select a data file to be viewed based on the returned file list. If the user selects a data file in the file list, the data query request of the data file is sent to the first query module 103, and the first query module 103 sends the data of the data file to the user terminal for display. .
本实施例实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息;根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;响应用户终端发送的带有文件类的文件查 询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。相较于现有技术,本实施例将数据文件进行分类处理,在进行数据文件查询时,只需要查询用户终端提供的文件类对应的数据文件,而不需在存储空间的所有数据文件中逐一查询,因此,提高了文件查询的效率,且降低了系统资源消耗。In this embodiment, the file directory of the data file is scanned in real time or periodically, or after receiving the data file processing instruction, to obtain the preset type attribute information of each data file; according to the preset type attribute information of each of the data files and Predetermining the file classification rule, classifying all the data files to obtain a plurality of file classes; responding to the file query request with the file class sent by the user terminal, querying and searching in the data file corresponding to the file class The file query requests a corresponding data file, and feeds the queried data file to the user terminal. Compared with the prior art, the data file is classified and processed in the embodiment. When the data file is queried, only the data file corresponding to the file class provided by the user terminal needs to be queried, and no data file is required in the storage space. Query, therefore, improves the efficiency of file queries and reduces system resource consumption.
参照图5,图5为本申请磁盘数据智能处理程序第二实施例的程序模块图。Referring to FIG. 5, FIG. 5 is a block diagram of a program of a second embodiment of the disk data intelligent processing program of the present application.
本实施例与第一实施例的区别在于,所述预设类型属性信息包括文件调用时间点记录,和/或,文件修改时间点记录,且所述第一查询模块103包括分析单元1031、映射更新单元1032及查询单元1033:The difference between the embodiment and the first embodiment is that the preset type attribute information includes a file call time point record, and/or a file modification time point record, and the first query module 103 includes an analysis unit 1031. Update unit 1032 and query unit 1033:
分析单元1031,用于根据各个所述文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,并基于预先确定的常用文件分析规则,分别分析出各个所述文件类对应的常用数据文件和不常用数据文件。The analyzing unit 1031 is configured to call a time point record and/or a file modification time point record according to the file of each data file corresponding to each of the file classes, and analyze each of the file types according to a predetermined common file analysis rule. Corresponding common data files and less common data files.
所述预先确定的常用文件分析规则包括:The predetermined common file analysis rules include:
首先,逐一选择文件类,在一个文件类被选择后,根据选择的文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,分别计算出选择的文件类对应的各个数据文件在预设时间内(例如,最近3个月内)的文件调用次数和/或文件修改次数。First, the file class is selected one by one. After a file class is selected, the time point record and/or the file modification time point record are called according to the file of each data file corresponding to the selected file class, and each of the selected file classes is respectively calculated. The number of file calls and/or file modifications for the data file within a preset time (for example, within the last 3 months).
然后,在选择的文件类对应的数据文件中查找出所有满足第一预设条件和/或第二预设条件的数据文件,将查找出的所有数据文件作为常用数据文件,且将所述选择的文件类对应的数据文件中除所述常用数据文件外的其他数据文件作为非常用数据文件,所述第一预设条件为数据文件在预设时间内的文件调用次数大于第一预设次数,所述第二预设条件为数据文件在预设时间内的文件修改次数大于第二预设次数。Then, all data files satisfying the first preset condition and/or the second preset condition are found in the data file corresponding to the selected file class, and all the data files found are used as common data files, and the selection is performed. The data file corresponding to the file file is a non-use data file other than the common data file, and the first preset condition is that the number of file calls of the data file within a preset time is greater than the first preset number of times. The second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times.
最后,判断是否存在未被选择过的文件类,当存在时,返回继续选择一文件类,当不存在时,输出所有常用数据文件及非常用数据文件。Finally, it is determined whether there is a file class that has not been selected. When it exists, it returns to continue to select a file class, and when it does not exist, outputs all common data files and very useful data files.
需要注意的是,上述第一预设次数和第二预设次数可以相等,也可以不相等。It should be noted that the first preset number of times and the second preset number of times may be equal or not equal.
映射更新单元1032,用于分别解除各个所述文件类与对应的不常用数据文件之间预先建立的映射关系,且保留各个所述文件类与对应的常用数据文件之间预先建立的映射关系。The mapping update unit 1032 is configured to release the pre-established mapping relationship between each of the file classes and the corresponding infrequent data files, and maintain a pre-established mapping relationship between each of the file classes and the corresponding common data files.
查询单元1033,用于响应用户终端发送的带有文件类的文件查询请求,从所述文件类对应的常用数据文件中查询出与该文件查询请求对应的常用数据文件,并将查询到的所述常用数据文件反馈给所述用户终端。The query unit 1033 is configured to respond to the file query request with the file class sent by the user terminal, query the common data file corresponding to the file query request from the common data file corresponding to the file class, and query the query data. The commonly used data file is fed back to the user terminal.
例如,查询单元1033将查询的常用数据文件以列表的形式反馈给该用户终端,该用户终端的一个用户可以基于反馈来的文件列表,选择要查看的数据文件,若该用户选中该文件列表中的一个数据文件,即向该查询单元1033发送该数据文件的数据调取请求,供该查询单元1033发送该数据文件的数据给该用户终端显示。For example, the query unit 1033 feeds back the commonly used data file of the query to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list fed back, if the user selects the file list. A data file, that is, a data retrieval request for sending the data file to the query unit 1033, for the query unit 1033 to send the data of the data file to the user terminal for display.
本实施例分析出各个文件类对应的常用数据文件和不常用数据文件,在执行用户终端发送的文件查询请求时,只需查询出文件查询请求中文件类对应的常用数据文件并反馈至用户即可,进一步降低了文件查询的系统资源消耗并进一步提升了文件查询的速度。In this embodiment, the common data file and the non-common data file corresponding to each file class are analyzed. When performing the file query request sent by the user terminal, only the common data file corresponding to the file class in the file query request is queried and fed back to the user. However, the system resource consumption of the file query is further reduced and the speed of the file query is further improved.
在本实施例中,上述映射更新单元1032分别解除各个所述文件类与对应的不常用数据文件之间预先建立的映射关系,且保留各个所述文件类与对应的常用数据文件之间预先建立的映射关系的步骤可替换为如下步骤:In this embodiment, the mapping update unit 1032 respectively pre-establishes the mapping relationship between each of the file classes and the corresponding infrequent data files, and pre-establishes the pre-establishment between each of the file classes and the corresponding common data files. The steps of the mapping relationship can be replaced by the following steps:
映射更新单元1032建立文件类与对应的常用数据文件之间的映射关系并保存。该步骤中不需解除文件类与不常用数据文件之间的预先建立的映射关系,即保留原有文件类与数据文件之间预先建立的映射关系,且在此基础上建立各个文件类与对应的常用数据文件之间的映射关系,并保存在新的映射表中,当需要查询时,直接在该新的映射表中即可查找出各文件类对应的常用数据文件。The mapping update unit 1032 establishes a mapping relationship between the file class and the corresponding common data file and saves it. In this step, the pre-established mapping relationship between the file class and the infrequently used data file is not needed, that is, the pre-established mapping relationship between the original file class and the data file is retained, and each file class and corresponding are established on the basis of this. The mapping relationship between common data files is saved in a new mapping table. When a query is needed, the common data files corresponding to each file class can be found directly in the new mapping table.
进一步的,上述查询单元1033还用于:Further, the query unit 1033 is further configured to:
当接收到用户终端发送的携带文件类的继续查询请求时,将从所述文件类对应的数据文件中查询出与该文件查询请求对应的数据文件,并将查询到的所述数据文件反馈给所述用户终端。When receiving the continuation query request of the file carrying class sent by the user terminal, the data file corresponding to the file query request is queried from the data file corresponding to the file class, and the queried data file is fed back to The user terminal.
当用户在查询单元1033发送的包含常用数据文件的文件列表中未选择出满意的数据文件时,可通过用户终端发送继续查询请求至查询单元1033,查询单元1033响应该继续查询请求,在该文件类对应的所有数据文件中查询出与该文件查询请求对应的数据文件反馈至用户终端。When the user does not select a satisfactory data file in the file list containing the common data file sent by the query unit 1033, the user terminal may send a resume query request to the query unit 1033, and the query unit 1033 responds to the resume query request in the file. All data files corresponding to the class are queried to the user terminal for querying the data file corresponding to the file query request.
参照图6,图6为本申请磁盘数据智能处理程序10第三实施例的程序模块图。Referring to FIG. 6, FIG. 6 is a block diagram of a program of a third embodiment of the disk data intelligent processing program 10 of the present application.
本实施例在第一实施例及第二实施例的基础上,该程序还包括提取模块104、映射建立模块105及第二查询模块106,其中:In this embodiment, based on the first embodiment and the second embodiment, the program further includes an extraction module 104, a mapping establishment module 105, and a second query module 106, where:
提取模块104,用于根据预先确定的标签提取规则,分别从各个所述数据文件的文件目录中提取一个或多个目录标签。The extracting module 104 is configured to extract one or more directory tags from the file directories of the respective data files according to a predetermined label extraction rule.
上述预先确定的标签提取规则可参照下列两种方案:The above predetermined label extraction rules can refer to the following two schemes:
方案一:Option One:
首先,为所述文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支(例如,图7中的目录节点分支“X1-X2-X3-X4”、“X1-X2-X5-X6”、“X1-X2-X5-X7”、“X1-Z1-Z2-Z3”、“X1-Y1-Y2”等),每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点,例如,图7中节点X1是节点X1、Z1、Y1的主目录节点、节点X2是节点X3、X5的主目录节点。First, a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-" in FIG. X5-X6", "X1-X2-X5-X7", "X1-Z1-Z2-Z3", "X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a subdirectory node, each A superior directory node is a home directory node of its lower directory node. For example, node X1 in FIG. 7 is a home directory node of nodes X1, Z1, and Y1, and node X2 is a home directory node of nodes X3 and X5.
然后,确定每一个目录节点分支中的最下级共有目录节点,一个目录节点分支的最下级共有目录节点指的是与其他目录节点分支共有的、且在所述目录节点分支中对应的所有下级子目录节点均不是共有目录节点的目录节点。 例如,图7中目录节点分支“X1-X2-X3-X4”对应的最下级共有目录节点为节点X2,“X1-X2-X5-X6”和“X1-X2-X5-X7”对应的最下级共有目录节点均为节点X5。Then, the lowest-level shared directory node in each directory node branch is determined, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-shares that are shared with other directory node branches and corresponding to the directory node branch. Directory nodes are not directory nodes for shared directory nodes. For example, the lowest-level shared directory node corresponding to the directory node branch "X1-X2-X3-X4" in FIG. 7 is node X2, and the most corresponding to "X1-X2-X5-X6" and "X1-X2-X5-X7" The lower-level common directory nodes are all nodes X5.
最后,分别将确定的每一个目录节点分支的最下级共有目录节点及其对应的所有上级目录节点的节点名称,按照对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。例如,目录节点分支“X1-X2-X3-X4”对应的目录标签为“X1-X2”。Finally, the determined node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes are respectively combined according to the position order of the corresponding directory node branches to generate a combined name, and the combined name This is the directory label of the corresponding directory node branch. For example, the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
方案二:Option II:
首先,为文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支(例如,图7中的目录节点分支“X1-X2-X3-X4”、“X1-X2-X5-X6”、“X1-X2-X5-X7”、“X1-Z1-Z2-Z3”、“X1-Y1-Y2”等),每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点,例如,图7中节点X1是节点X1、Z1、Y1的主目录节点、节点X2是节点X3、X5的主目录节点。First, a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-X5-" in FIG. X6", "X1-X2-X5-X7", "X1-Z1-Z2-Z3", "X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a sub-directory node, each of which is a superior The directory node is the home directory node of the lower directory node. For example, node X1 in FIG. 7 is the home directory node of node X1, Z1, Y1, and node X2 is the home directory node of node X3, X5.
然后,分别确定每一个目录节点分支中的第i级目录节点,i为大于1的正整数,例如,i可以为2,图7中目录节点分支“X1-X2-X3-X4”的第2级目录节点是“X2”。Then, respectively determine the i-th directory node in each directory node branch, i is a positive integer greater than 1, for example, i can be 2, and the second node of the directory node branch "X1-X2-X3-X4" in FIG. The level directory node is "X2".
最后,分别将确定的每一个目录节点分支的第i级目录节点及其对应的所有上级目录节点的节点名称,按照在对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签,例如,目录节点分支“X1-X2-X3-X4”对应的目录标签为“X1-X2”。Finally, the determined i-th directory node of each directory node branch and the node names of all corresponding upper-level directory nodes are sequentially combined according to the position of the corresponding directory node branch to generate a combined name, the combination The name is the directory label of the corresponding directory node branch. For example, the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
映射建立模块105,用于分别将各个所述数据文件的目录标签与对应的文件类关联映射,且建立每一个数据文件的预设类型属性信息与关联映射的目录标签之间的映射关系,保存文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系。The mapping establishing module 105 is configured to map the directory labels of the data files and the corresponding file classes, and establish a mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping, and save the mapping relationship. The mapping relationship between the file type, the default type attribute information of the data file, and the directory label.
首先,映射建立模块105分别为各个文件类标记对应的数据文件的目录标签,例如,若文件类M下包括数据文件M1和M2,数据文件M1对应的目录标签为a1,数据文件M2对应的目录标签为a2,则为文件类M标记目录标签a1和a2。First, the mapping establishing module 105 marks the directory label of the corresponding data file for each file class. For example, if the file class M includes the data files M1 and M2, the directory label corresponding to the data file M1 is a1, and the directory corresponding to the data file M2. The label is a2, and the file class M marks the directory tags a1 and a2.
接着,映射建立模块105将文件类M、文件类M对应的各个数据文件的预设类型文件信息、文件类M对应的目录标签a1和a2的映射关系数据进行存储。Next, the map creation module 105 stores the preset type file information of each data file corresponding to the file class M and the file class M, and the mapping relationship data of the directory tags a1 and a2 corresponding to the file class M.
上述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系的存储位置可以与数据文件的存储位置相同,也可以不同。例如,将智能硬件设备1的存储器(例如图3中存储器11)划分出第一存储区和第二存储区,或者将智能硬件设备1通信连接的电子设备(例如图2中的电子设备3)的存储器划分出第一存储区和第二存储区。上述第一存储区用于存储数据文件,第二存储区则可用于存储上述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系。The storage location of the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label may be the same as or different from the storage location of the data file. For example, the memory of the smart hardware device 1 (for example, the memory 11 in FIG. 3) is divided into a first storage area and a second storage area, or an electronic device (for example, the electronic device 3 in FIG. 2) that communicatively connects the smart hardware device 1 The memory divides the first storage area and the second storage area. The first storage area is used to store the data file, and the second storage area is used to store the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label.
第二查询模块106,用于响应用户终端发送的带有目录标签和文件类的文件查询请求后,根据所述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系,确定所述查询请求中的文件类和目录标签对应的各个数据文件的预设类型属性信息,并生成所述查询请求对应的文件查询结果(例如,文件查询列表),将所述文件查询结果反馈给所述用户终端。The second query module 106 is configured to respond to the file query request with the directory label and the file class sent by the user terminal, according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. Determining the preset type attribute information of each data file corresponding to the file class and the directory label in the query request, and generating a file query result corresponding to the query request (for example, a file query list), and querying the file result Feedback to the user terminal.
本实施例将文件类、数据文件的预设类型属性信息及目录标签三者之间建立映射关系,在进行文件查询时,根据用户终端提供的目录标签及文件类,即可快速准确的查询出对应的数据文件,进一步提高了文件查询的效率及准确率。In this embodiment, a mapping relationship between the file type, the preset type attribute information of the data file, and the directory label is established. When the file is queried, the directory label and the file type provided by the user terminal can be quickly and accurately queried. The corresponding data file further improves the efficiency and accuracy of the file query.
此外,本申请提出一种磁盘数据智能处理方法。该方法适用于存储有数据文件的智能应用设备,或者,适用于与存储有数据文件的电子设备通信连接的智能硬件设备。In addition, the present application proposes a disk data intelligent processing method. The method is applicable to smart application devices that store data files, or to smart hardware devices that are communicatively coupled to electronic devices that store data files.
如图8所示,图8为本申请磁盘数据智能处理方法第一实施例的流程示意图。As shown in FIG. 8, FIG. 8 is a schematic flowchart of a first embodiment of a disk data intelligent processing method according to the present application.
本实施例中,该方法包括:In this embodiment, the method includes:
步骤S10,实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息。Step S10: Scan the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file.
上述数据文件可存储于智能硬件设备的内部或外部存储器中,也可存储于与智能硬件设备通信连接的电子设备(例如,图2中所示的电子设备3)中。The above data file may be stored in an internal or external memory of the smart hardware device, or may be stored in an electronic device (for example, the electronic device 3 shown in FIG. 2) communicatively coupled to the smart hardware device.
上述数据文件的文件目录(例如,D:\PDF\Setup Files),可存储于智能硬件设备的内部或外部存储器中,也可存储于与智能硬件设备通信连接的电子设备(例如,图2中所示的电子设备3)中。且需要注意的是,数据文件与其文件目录的存储位置可以相同也可以不同。The file directory of the above data file (for example, D:\PDF\Setup Files) may be stored in an internal or external memory of the smart hardware device, or may be stored in an electronic device communicatively connected to the smart hardware device (for example, in FIG. 2) In the illustrated electronic device 3). It should be noted that the storage location of the data file and its file directory may be the same or different.
上述预设类型属性信息包括存储路径、创建时间、文件大小、图片的拍摄时间、图片GPS信息、图片旋转角度、视频时长、文件调用时间点记录、文件修改时间点记录,和/或,文件扩展名。The foregoing preset type attribute information includes a storage path, a creation time, a file size, a picture capturing time, a picture GPS information, a picture rotation angle, a video duration, a file calling time point record, a file modification time point record, and/or a file extension. name.
步骤S20,根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类。Step S20: Perform classification processing on all the data files according to preset type attribute information of each of the data files and a predetermined file classification rule to obtain a plurality of file classes.
上述文件类可举例为jpg格式图片类、pdf格式文档类、word格式文档类和/或xls格式文档类等。The above file class can be exemplified by a jpg format picture class, a pdf format document class, a word format document class, and/or an xls format document class.
上述预先确定的文件分类规则包括:The above predetermined file classification rules include:
首先,根据预先确定的文件扩展名(该预先确定的文件扩展名包含于预设类型属性信息中,且该预先确定的文件扩展名可举例为“.jpg”、“.pdf”、“.doc”、“.xls”等)和文件类之间的映射关系,确定各个所述数据文件对应的文件类。然后,分别将各个数据文件分类至对应的文件类,例如,为各个数据文件设置分类标签,各个分类标签中存储有该数据文件的文件类数据,或者,建立各个文件数据与其文件类之间的映射关系,并将该映射关系数据进行存储处理。First, according to a predetermined file extension (the predetermined file extension is included in the preset type attribute information, and the predetermined file extension can be exemplified by ".jpg", ".pdf", ".doc ", ".xls", etc.) and the file class mapping relationship, determine the file class corresponding to each of the data files. Then, each data file is respectively classified into a corresponding file class, for example, a classification label is set for each data file, and file type data of the data file is stored in each category label, or a file data between the file data and the file class is established. The relationship is mapped and the mapping relationship data is stored.
步骤S30,响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Step S30, in response to the file query request with the file class sent by the user terminal, query the data file corresponding to the file query request in the data file corresponding to the file class, and feed back the queried data file to the User terminal.
上述将查询到的数据文件反馈给所述用户终端的步骤包括:The step of feeding back the queried data file to the user terminal is as follows:
将查询的数据文件以列表的形式反馈给该用户终端,该用户终端的一个用户可以基于反馈来的文件列表,选择要查看的数据文件,若该用户选中该文件列表中的一个数据文件,即向该智能硬件设备发送该数据文件的数据调取请求,供该智能硬件设备发送该数据文件的数据给该用户终端显示。The data file of the query is fed back to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list fed back, and if the user selects a data file in the file list, Sending a data retrieval request of the data file to the smart hardware device, where the smart hardware device sends the data of the data file to the user terminal for display.
进一步地,所述预设类型属性信息包括可排序的文件属性信息(例如,照片拍摄时间,文件创建时间,文件名称,文件大小等),所述步骤S30包括:Further, the preset type attribute information includes sortable file attribute information (for example, a photo shooting time, a file creation time, a file name, a file size, and the like), and the step S30 includes:
首先,响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件。First, in response to the file query request with the file class sent by the user terminal, the data file corresponding to the file query request is queried in the data file corresponding to the file class.
然后,按照查询到的所述数据文件对应的文件属性信息,将查询到的所述数据文件进行排序,并按照排序结果将查询到的所述数据文件反馈给所述用户终端。例如,将查询的数据文件以列表的形式反馈给该用户终端,该文件列表中的数据文件按照排序顺序展示,该用户终端的一个用户可以基于反馈来的该文件列表,选择要查看的数据文件,若该用户选中该文件列表中的一个数据文件,即向该智能硬件设备发送该数据文件的数据调取请求,供该智能硬件设备发送该数据文件的数据给该用户终端显示。Then, the queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result. For example, the data file of the query is fed back to the user terminal in the form of a list, and the data files in the file list are displayed in a sorted order, and a user of the user terminal can select a data file to be viewed based on the returned file list. If the user selects a data file in the file list, the data acquisition request of the data file is sent to the smart hardware device, and the smart hardware device sends the data of the data file to the user terminal for display.
本实施例实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息;根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。相较于现有技术,本实施例将数据文件进行分类处理,在进行数据文件查询时,只需要查询用户终端提供的文件类对应的数据文件,而不需在存储空间的所有数据文件中逐一查询,因此,提高了文件查询的效率,且降低了系统资源消耗。In this embodiment, the file directory of the data file is scanned in real time or periodically, or after receiving the data file processing instruction, to obtain the preset type attribute information of each data file; according to the preset type attribute information of each of the data files and Predetermining the file classification rule, classifying all the data files to obtain a plurality of file classes; responding to the file query request with the file class sent by the user terminal, querying and searching in the data file corresponding to the file class The file query requests a corresponding data file, and feeds the queried data file to the user terminal. Compared with the prior art, the data file is classified and processed in the embodiment. When the data file is queried, only the data file corresponding to the file class provided by the user terminal needs to be queried, and no data file is required in the storage space. Query, therefore, improves the efficiency of file queries and reduces system resource consumption.
参照图9,图9为本申请磁盘数据智能处理方法第二实施例的流程示意图。Referring to FIG. 9, FIG. 9 is a schematic flowchart diagram of a second embodiment of a disk data intelligent processing method according to the present application.
本实施例与第一实施例的区别在于,所述预设类型属性信息包括文件调用时间点记录,和/或,文件修改时间点记录,所述步骤S30包括如下步骤:The difference between the embodiment and the first embodiment is that the preset type attribute information includes a file call time point record, and/or a file modification time point record, and the step S30 includes the following steps:
步骤S31,根据各个所述文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,并基于预先确定的常用文件分析规则,分别分析出各个所述文件类对应的常用数据文件和不常用数据文件。Step S31, invoking a time point record and/or a file modification time point record according to the file of each data file corresponding to each of the file classes, and analyzing, according to a predetermined common file analysis rule, respectively, respectively, corresponding to each of the file types Data files and less common data files.
所述预先确定的常用文件分析规则包括:The predetermined common file analysis rules include:
首先,逐一选择文件类,在一个文件类被选择后,根据选择的文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,分别计算出选择的文件类对应的各个数据文件在预设时间内(例如,最近3个月内) 的文件调用次数和/或文件修改次数。First, the file class is selected one by one. After a file class is selected, the time point record and/or the file modification time point record are called according to the file of each data file corresponding to the selected file class, and each of the selected file classes is respectively calculated. The number of file calls and/or file modifications for the data file within a preset time (for example, within the last 3 months).
然后,在选择的文件类对应的数据文件中查找出所有满足第一预设条件和/或第二预设条件的数据文件,将查找出的所有数据文件作为常用数据文件,且将所述选择的文件类对应的数据文件中除所述常用数据文件外的其他数据文件作为非常用数据文件,所述第一预设条件为数据文件在预设时间内的文件调用次数大于第一预设次数,所述第二预设条件为数据文件在预设时间内的文件修改次数大于第二预设次数。Then, all data files satisfying the first preset condition and/or the second preset condition are found in the data file corresponding to the selected file class, and all the data files found are used as common data files, and the selection is performed. The data file corresponding to the file file is a non-use data file other than the common data file, and the first preset condition is that the number of file calls of the data file within a preset time is greater than the first preset number of times. The second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times.
最后,判断是否存在未被选择过的文件类,当存在时,返回继续选择一文件类,当不存在时,输出所有常用数据文件及非常用数据文件。Finally, it is determined whether there is a file class that has not been selected. When it exists, it returns to continue to select a file class, and when it does not exist, outputs all common data files and very useful data files.
需要注意的是,上述第一预设次数和第二预设次数可以相等,也可以不相等。It should be noted that the first preset number of times and the second preset number of times may be equal or not equal.
步骤S32,分别解除各个所述文件类与对应的不常用数据文件之间预先建立的映射关系,且保留各个所述文件类与对应的常用数据文件之间预先建立的映射关系。In step S32, the pre-established mapping relationship between each of the file classes and the corresponding infrequent data files is released, and the pre-established mapping relationship between each of the file classes and the corresponding common data files is retained.
步骤S33,响应用户终端发送的带有文件类的文件查询请求,从所述文件类对应的常用数据文件中查询出与该文件查询请求对应的常用数据文件,并将查询到的所述常用数据文件反馈给所述用户终端。Step S33, in response to the file query request with the file class sent by the user terminal, querying the common data file corresponding to the file query request from the common data file corresponding to the file class, and querying the commonly used data. The file is fed back to the user terminal.
例如,将查询的常用数据文件以列表的形式反馈给该用户终端,该用户终端的一个用户可以基于反馈来的文件列表,选择要查看的数据文件,若该用户选中该文件列表中的一个数据文件,即向该智能硬件设备发送该数据文件的数据调取请求,供该智能硬件设备发送该数据文件的数据给该用户终端显示。For example, the commonly used data file of the query is fed back to the user terminal in the form of a list, and a user of the user terminal can select a data file to be viewed based on the file list fed back, if the user selects a data in the file list. The file is a data retrieval request for sending the data file to the intelligent hardware device, and the smart hardware device sends the data of the data file to the user terminal for display.
本实施例分析出各个文件类对应的常用数据文件和不常用数据文件,在执行用户终端发送的文件查询请求时,只需查询出文件查询请求中文件类对应的常用数据文件并反馈至用户即可,进一步降低了文件查询的系统资源消耗并进一步提升了文件查询的速度。In this embodiment, the common data file and the non-common data file corresponding to each file class are analyzed. When performing the file query request sent by the user terminal, only the common data file corresponding to the file class in the file query request is queried and fed back to the user. However, the system resource consumption of the file query is further reduced and the speed of the file query is further improved.
在本实施例中,上述步骤S32可替换为如下步骤:In this embodiment, the above step S32 can be replaced by the following steps:
建立文件类与对应的常用数据文件之间的映射关系并保存。该步骤中不需解除文件类与不常用数据文件之间的预先建立的映射关系,即保留原有文件类与数据文件之间预先建立的映射关系,且在此基础上建立各个文件类与对应的常用数据文件之间的映射关系,并保存在新的映射表中,当需要查询时,直接在该新的映射表中即可查找出各文件类对应的常用数据文件。Establish a mapping relationship between the file class and the corresponding common data file and save it. In this step, the pre-established mapping relationship between the file class and the infrequently used data file is not needed, that is, the pre-established mapping relationship between the original file class and the data file is retained, and each file class and corresponding are established on the basis of this. The mapping relationship between common data files is saved in a new mapping table. When a query is needed, the common data files corresponding to each file class can be found directly in the new mapping table.
进一步的,在步骤S33之后,该方法还包括如下步骤:Further, after step S33, the method further includes the following steps:
当接收到用户终端发送的携带文件类的继续查询请求时,将从所述文件类对应的数据文件中查询出与该文件查询请求对应的数据文件,并将查询到的所述数据文件反馈给所述用户终端。When receiving the continuation query request of the file carrying class sent by the user terminal, the data file corresponding to the file query request is queried from the data file corresponding to the file class, and the queried data file is fed back to The user terminal.
当用户在智能硬件设备发送的包含常用数据文件的文件列表中未选择出满意的数据文件时,可通过用户终端发送继续查询请求至智能硬件设备,智能硬件设备响应该继续查询请求,在该文件类对应的所有数据文件中查询出 与该文件查询请求对应的数据文件反馈至用户终端。When the user does not select a satisfactory data file in the file list of the common data file sent by the smart hardware device, the user terminal may send a resume query request to the smart hardware device, and the smart hardware device responds to the resume query request in the file. All data files corresponding to the class are queried to the user terminal for querying the data file corresponding to the file query request.
参照图10,图10为本申请磁盘数据智能处理方法第三实施例的流程示意图。Referring to FIG. 10, FIG. 10 is a schematic flowchart diagram of a third embodiment of a disk data intelligent processing method according to the present application.
本实施例在第一实施例及第二实施例的基础上,在步骤S20之后,该方法还包括:The present embodiment is based on the first embodiment and the second embodiment. After the step S20, the method further includes:
步骤S40,根据预先确定的标签提取规则,分别从各个所述数据文件的文件目录中提取一个或多个目录标签。Step S40: Extract one or more directory tags from the file directories of the respective data files according to a predetermined label extraction rule.
上述预先确定的标签提取规则可参照下列两种方案:The above predetermined label extraction rules can refer to the following two schemes:
方案一:Option One:
首先,为所述文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支(例如,图7中的目录节点分支“X1-X2-X3-X4”、“X1-X2-X5-X6”、“X1-X2-X5-X7”、“X1-Z1-Z2-Z3”、“X1-Y1-Y2”等),每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点,例如,图7中节点X1是节点X1、Z1、Y1的主目录节点、节点X2是节点X3、X5的主目录节点。First, a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-" in FIG. X5-X6", "X1-X2-X5-X7", "X1-Z1-Z2-Z3", "X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a subdirectory node, each A superior directory node is a home directory node of its lower directory node. For example, node X1 in FIG. 7 is a home directory node of nodes X1, Z1, and Y1, and node X2 is a home directory node of nodes X3 and X5.
然后,确定每一个目录节点分支中的最下级共有目录节点,一个目录节点分支的最下级共有目录节点指的是与其他目录节点分支共有的、且在所述目录节点分支中对应的所有下级子目录节点均不是共有目录节点的目录节点。例如,图7中目录节点分支“X1-X2-X3-X4”对应的最下级共有目录节点为节点X2,“X1-X2-X5-X6”和“X1-X2-X5-X7”对应的最下级共有目录节点均为节点X5。Then, the lowest-level shared directory node in each directory node branch is determined, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-shares that are shared with other directory node branches and corresponding to the directory node branch. Directory nodes are not directory nodes for shared directory nodes. For example, the lowest-level shared directory node corresponding to the directory node branch "X1-X2-X3-X4" in FIG. 7 is node X2, and the most corresponding to "X1-X2-X5-X6" and "X1-X2-X5-X7" The lower-level common directory nodes are all nodes X5.
最后,分别将确定的每一个目录节点分支的最下级共有目录节点及其对应的所有上级目录节点的节点名称,按照对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。例如,目录节点分支“X1-X2-X3-X4”对应的目录标签为“X1-X2”。Finally, the determined node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes are respectively combined according to the position order of the corresponding directory node branches to generate a combined name, and the combined name This is the directory label of the corresponding directory node branch. For example, the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
方案二:Option II:
首先,为文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支(例如,图7中的目录节点分支“X1-X2-X3-X4”、“X1-X2-X5-X6”、“X1-X2-X5-X7”、“X1-Z1-Z2-Z3”、“X1-Y1-Y2”等),每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点,例如,图7中节点X1是节点X1、Z1、Y1的主目录节点、节点X2是节点X3、X5的主目录节点。First, a node tree is established for each directory node of the file directory, and the node tree includes a plurality of directory node branches (for example, the directory node branch "X1-X2-X3-X4", "X1-X2-X5-" in FIG. X6", "X1-X2-X5-X7", "X1-Z1-Z2-Z3", "X1-Y1-Y2", etc.), each directory node branch includes a home directory node and a sub-directory node, each of which is a superior The directory node is the home directory node of the lower directory node. For example, node X1 in FIG. 7 is the home directory node of node X1, Z1, Y1, and node X2 is the home directory node of node X3, X5.
然后,分别确定每一个目录节点分支中的第i级目录节点,i为大于1的正整数,例如,i可以为2,图7中目录节点分支“X1-X2-X3-X4”的第2级目录节点是“X2”。Then, respectively determine the i-th directory node in each directory node branch, i is a positive integer greater than 1, for example, i can be 2, and the second node of the directory node branch "X1-X2-X3-X4" in FIG. The level directory node is "X2".
最后,分别将确定的每一个目录节点分支的第i级目录节点及其对应的所有上级目录节点的节点名称,按照在对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签, 例如,目录节点分支“X1-X2-X3-X4”对应的目录标签为“X1-X2”。Finally, the determined i-th directory node of each directory node branch and the node names of all corresponding upper-level directory nodes are sequentially combined according to the position of the corresponding directory node branch to generate a combined name, the combination The name is the directory label of the corresponding directory node branch. For example, the directory label corresponding to the directory node branch "X1-X2-X3-X4" is "X1-X2".
步骤S50,分别将各个所述数据文件的目录标签与对应的文件类关联映射,且建立每一个数据文件的预设类型属性信息与关联映射的目录标签之间的映射关系,保存文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系。In step S50, the directory labels of the data files are associated with the corresponding file classes, and the mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping is established, and the file class and data are saved. The mapping relationship between the preset type attribute information of the file and the directory label.
首先,分别为各个文件类标记对应的数据文件的目录标签,例如,若文件类M下包括数据文件M1和M2,数据文件M1对应的目录标签为a1,数据文件M2对应的目录标签为a2,则为文件类M标记目录标签a1和a2。First, the directory label of the corresponding data file is marked for each file class. For example, if the file type M includes the data files M1 and M2, the directory label corresponding to the data file M1 is a1, and the directory label corresponding to the data file M2 is a2. The directory tags a1 and a2 are marked for the file class M.
接着,将文件类M、文件类M对应的各个数据文件的预设类型文件信息、文件类M对应的目录标签a1和a2的映射关系数据进行存储。Next, the file type M, the file type M, the preset type file information of each data file, and the mapping relationship data of the directory tags a1 and a2 corresponding to the file class M are stored.
上述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系的存储位置可以与数据文件的存储位置相同,也可以不同。例如,将智能硬件设备的存储器(例如图3中存储器11)划分出第一存储区和第二存储区,或者将智能硬件设备通信连接的电子设备(例如图2中的电子设备3)的存储器划分出第一存储区和第二存储区。上述第一存储区用于存储数据文件,第二存储区则可用于存储上述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系。The storage location of the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label may be the same as or different from the storage location of the data file. For example, a memory of an intelligent hardware device (eg, memory 11 in FIG. 3) is divided into a first storage area and a second storage area, or a memory of an electronic device (eg, electronic device 3 in FIG. 2) in which the smart hardware device is communicatively coupled The first storage area and the second storage area are divided. The first storage area is used to store the data file, and the second storage area is used to store the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label.
步骤S60,响应用户终端发送的带有目录标签和文件类的文件查询请求后,根据所述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系,确定所述查询请求中的文件类和目录标签对应的各个数据文件的预设类型属性信息,并生成所述查询请求对应的文件查询结果(例如,文件查询列表),将所述文件查询结果反馈给所述用户终端。Step S60, after responding to the file query request with the directory label and the file class sent by the user terminal, determining the query according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. And the file type query result corresponding to the query file (for example, a file query list), and the file query result is fed back to the user terminal.
本实施例将文件类、数据文件的预设类型属性信息及目录标签三者之间建立映射关系,在进行文件查询时,根据用户终端提供的目录标签及文件类,即可快速准确的查询出对应的数据文件,进一步提高了文件查询的效率及准确率。In this embodiment, a mapping relationship between the file type, the preset type attribute information of the data file, and the directory label is established. When the file is queried, the directory label and the file type provided by the user terminal can be quickly and accurately queried. The corresponding data file further improves the efficiency and accuracy of the file query.
进一步地,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序可被至少一个处理器执行,以使所述至少一个处理器执行上述任一实施例中的磁盘数据智能处理方法的步骤。Further, the present application further provides a computer readable storage medium storing a disk data intelligent processing program, the disk data intelligent processing program being executable by at least one processor to enable the at least one A processor executes the steps of the disk data intelligent processing method in any of the above embodiments.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是在本申请的发明构思下,利用本申请说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本申请的专利保护范围内。The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the patents of the present application, and the equivalent structural transformation, or direct/indirect use, of the present application and the contents of the drawings is used in the present invention. All other related technical fields are included in the patent protection scope of the present application.

Claims (25)

  1. 一种智能硬件设备,所述智能硬件设备包括存储器和处理器,其特征在于,所述存储器上存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序被所述处理器执行时实现如下步骤:An intelligent hardware device, comprising: a memory and a processor, wherein the memory stores a disk data intelligent processing program, and the disk data intelligent processing program is executed by the processor to implement the following steps :
    扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于与所述智能硬件设备通信连接的电子设备中;Scanning step: scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, the data file being stored in communication with the intelligent hardware device Connected electronic device;
    分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
    查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  2. 如权利要求1所述的智能硬件设备,其特征在于,所述预设类型属性信息包括文件扩展名,所述预先确定的文件分类规则包括:The intelligent hardware device according to claim 1, wherein the preset type attribute information comprises a file extension, and the predetermined file classification rule comprises:
    根据预先确定的文件扩展名和文件类之间的映射关系,确定各个所述数据文件对应的文件类。The file class corresponding to each of the data files is determined according to a mapping relationship between the predetermined file extension and the file class.
  3. 如权利要求1或2所述的智能硬件设备,其特征在于,所述预设类型属性信息包括可排序的文件属性信息,所述查询步骤包括:The intelligent hardware device according to claim 1 or 2, wherein the preset type attribute information comprises sortable file attribute information, and the querying step comprises:
    响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件;Responsive to the file query request with the file class sent by the user terminal, querying the data file corresponding to the file query request in the data file corresponding to the file class;
    按照查询到的所述数据文件对应的文件属性信息,将查询到的所述数据文件进行排序,并按照排序结果将查询到的所述数据文件反馈给所述用户终端。The queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result.
  4. 如权利要求1或2所述的智能硬件设备,其特征在于,所述预设类型属性信息包括文件调用时间点记录,和/或,文件修改时间点记录,所述查询步骤包括如下步骤:The intelligent hardware device according to claim 1 or 2, wherein the preset type attribute information comprises a file call time point record, and/or a file modification time point record, and the query step comprises the following steps:
    根据各个所述文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,并基于预先确定的常用文件分析规则,分别分析出各个所述文件类对应的常用数据文件和不常用数据文件;The time point record and/or the file modification time point record are called according to the file of each data file corresponding to each of the file classes, and the common data files corresponding to each of the file classes are respectively analyzed based on a predetermined common file analysis rule. Not commonly used data files;
    分别解除各个所述文件类与对应的不常用数据文件之间预先建立的映射关系,且保留各个所述文件类与对应的常用数据文件之间预先建立的映射关系;Separating the pre-established mapping relationship between each of the file classes and the corresponding unusable data files, and pre-establishing a mapping relationship between each of the file classes and corresponding common data files;
    响应用户终端发送的带有文件类的文件查询请求,从所述文件类对应的常用数据文件中查询出与该文件查询请求对应的常用数据文件,并将查询到的所述常用数据文件反馈给所述用户终端。Responding to a file query request with a file class sent by the user terminal, querying a common data file corresponding to the file query request from a common data file corresponding to the file class, and feeding back the commonly used data file to the query The user terminal.
  5. 如权利要求4所述的智能硬件设备,其特征在于,所述预先确定的常用文件分析规则包括:The intelligent hardware device according to claim 4, wherein the predetermined common file analysis rule comprises:
    选择步骤:逐一选择文件类,在一个文件类被选择后,根据选择的文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,分 别计算出选择的文件类对应的各个数据文件在预设时间内的文件调用次数和/或文件修改次数;Selection step: selecting a file class one by one, and after selecting a file class, calling a time point record and/or a file modification time point record according to the file of each data file corresponding to the selected file class, respectively calculating the corresponding file class corresponding The number of file calls and/or file modification times of each data file within a preset time;
    分析步骤:在选择的文件类对应的数据文件中查找出所有满足第一预设条件和/或第二预设条件的数据文件,将查找出的所有数据文件作为常用数据文件,且将所述选择的文件类对应的数据文件中除所述常用数据文件外的其他数据文件作为非常用数据文件,所述第一预设条件为数据文件在预设时间内的文件调用次数大于第一预设次数,所述第二预设条件为数据文件在预设时间内的文件修改次数大于第二预设次数;The analyzing step: searching all the data files satisfying the first preset condition and/or the second preset condition in the data file corresponding to the selected file class, and using all the data files found as common data files, and The data file corresponding to the selected file class is a non-use data file other than the common data file, and the first preset condition is that the number of times the file is called in the preset time is greater than the first preset. The second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times;
    判断步骤:判断是否存在未被选择过的文件类,当存在时,返回继续执行所述选择步骤,当不存在时,输出所有常用数据文件及非常用数据文件。Judgment step: judging whether there is a file class that has not been selected, and when present, returning to continue performing the selecting step, and when not present, outputting all common data files and very useful data files.
  6. 如权利要求1或2所述的智能硬件设备,其特征在于,在所述分类步骤之后,该方法还包括:The intelligent hardware device according to claim 1 or 2, wherein after the classifying step, the method further comprises:
    根据预先确定的标签提取规则,分别从各个所述数据文件的文件目录中提取一个或多个目录标签;Extracting one or more directory tags from a file directory of each of the data files according to a predetermined label extraction rule;
    分别将各个所述数据文件的目录标签与对应的文件类关联映射,且建立每一个数据文件的预设类型属性信息与关联映射的目录标签之间的映射关系,保存文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系;Separating the directory tags of each of the data files with the corresponding file class, and establishing a mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping, and preserving the file class and the data file. Set the mapping relationship between the type attribute information and the directory label;
    响应用户终端发送的带有目录标签和文件类的文件查询请求后,根据所述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系,确定所述查询请求中的文件类和目录标签对应的各个数据文件的预设类型属性信息,并生成所述查询请求对应的文件查询结果,将所述文件查询结果反馈给所述用户终端。Determining, in response to the file query request with the directory label and the file class sent by the user terminal, determining the query request according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. The file type and the directory tag correspond to the preset type attribute information of each data file, and generate a file query result corresponding to the query request, and feed back the file query result to the user terminal.
  7. 如权利要求6所述的智能硬件设备,其特征在于,所述预先确定的标签提取规则为:The intelligent hardware device of claim 6, wherein the predetermined tag extraction rule is:
    为所述文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支,每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点;Establishing a node tree for each directory node of the file directory, the node tree includes a plurality of directory node branches, each directory node branch includes a home directory node and a subdirectory node, and each of the upper directory nodes is a lower directory node thereof Home directory node;
    确定每一个目录节点分支中的最下级共有目录节点,一个目录节点分支的最下级共有目录节点指的是与其他目录节点分支共有的、且在所述目录节点分支中对应的所有下级子目录节点均不是共有目录节点的目录节点;Determining the lowest-level shared directory node in each directory node branch, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-directory nodes common to other directory node branches and corresponding to the directory node branch Are not directory nodes of a common directory node;
    分别将确定的每一个目录节点分支的最下级共有目录节点及其对应的所有上级目录节点的节点名称,按照对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。Separating the node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes, according to the position order of the corresponding directory node branches, respectively, to generate a combination name, where the combination name is The directory label of the corresponding directory node branch.
  8. 如权利要求6所述的智能硬件设备,其特征在于,所述预先确定的标签提取规则为:The intelligent hardware device of claim 6, wherein the predetermined tag extraction rule is:
    为文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支,每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点;Establishing a node tree for each directory node of the file directory, the node tree includes a plurality of directory node branches, each directory node branch includes a home directory node and a subdirectory node, and each of the upper directory nodes is a home directory of the lower directory node node;
    分别确定每一个目录节点分支中的第i级目录节点,i为大于1的正整数;Determining the i-th directory node in each directory node branch, where i is a positive integer greater than one;
    分别将确定的每一个目录节点分支的第i级目录节点及其对应的所有上级目录节点的节点名称,按照在对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。Separating the node names of the i-th directory nodes of each directory node branch and the corresponding node names of all the corresponding directory nodes in the order of the corresponding directory node branches, respectively, to generate a combination name, where the combination name is The directory label for the corresponding directory node branch.
  9. 一种智能硬件设备,所述智能硬件设备包括存储器和处理器,其特征在于,所述存储器上存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序被所述处理器执行时实现如下步骤:An intelligent hardware device, comprising: a memory and a processor, wherein the memory stores a disk data intelligent processing program, and the disk data intelligent processing program is executed by the processor to implement the following steps :
    扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于所述存储器中;Scanning step: real-time or timing, or after receiving the data file processing instruction, scanning a file directory of the data file to obtain preset type attribute information of each data file, the data file is stored in the memory;
    分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
    查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  10. 一种磁盘数据智能处理方法,适用于存储有数据文件的智能硬件设备,或者,适用于与存储有所述数据文件的电子设备通信连接的智能硬件设备,其特征在于,该方法包括步骤:A method for intelligently processing a disk data, which is applicable to an intelligent hardware device storing a data file, or an intelligent hardware device suitable for communicating with an electronic device storing the data file, wherein the method comprises the steps of:
    扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于所述智能硬件设备或与所述智能硬件设备通信连接的电子设备中;Scanning step: scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, where the data file is stored in the smart hardware device or The electronic device in which the intelligent hardware device is communicatively connected;
    分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
    查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  11. 如权利要求10所述的磁盘数据智能处理方法,其特征在于,所述预设类型属性信息包括文件扩展名,所述预先确定的文件分类规则包括:The disk data intelligent processing method according to claim 10, wherein the preset type attribute information comprises a file extension, and the predetermined file classification rule comprises:
    根据预先确定的文件扩展名和文件类之间的映射关系,确定各个所述数据文件对应的文件类。The file class corresponding to each of the data files is determined according to a mapping relationship between the predetermined file extension and the file class.
  12. 如权利要求10或11所述的磁盘数据智能处理方法,其特征在于,所述预设类型属性信息包括可排序的文件属性信息,所述查询步骤包括:The disk data intelligent processing method according to claim 10 or 11, wherein the preset type attribute information comprises sortable file attribute information, and the querying step comprises:
    响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件;Responsive to the file query request with the file class sent by the user terminal, querying the data file corresponding to the file query request in the data file corresponding to the file class;
    按照查询到的所述数据文件对应的文件属性信息,将查询到的所述数据文件进行排序,并按照排序结果将查询到的所述数据文件反馈给所述用户终端。The queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result.
  13. 如权利要求10或11所述的磁盘数据智能处理方法,其特征在于,所述预设类型属性信息包括文件调用时间点记录,和/或,文件修改时间点记录,所述查询步骤包括如下步骤:The method for intelligently processing a disk data according to claim 10 or 11, wherein the preset type attribute information includes a file call time point record, and/or a file modification time point record, and the query step includes the following steps. :
    根据各个所述文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,并基于预先确定的常用文件分析规则,分别分析出各个所述文件类对应的常用数据文件和不常用数据文件;The time point record and/or the file modification time point record are called according to the file of each data file corresponding to each of the file classes, and the common data files corresponding to each of the file classes are respectively analyzed based on a predetermined common file analysis rule. Not commonly used data files;
    分别解除各个所述文件类与对应的不常用数据文件之间预先建立的映射关系,且保留各个所述文件类与对应的常用数据文件之间预先建立的映射关系;Separating the pre-established mapping relationship between each of the file classes and the corresponding unusable data files, and pre-establishing a mapping relationship between each of the file classes and corresponding common data files;
    响应用户终端发送的带有文件类的文件查询请求,从所述文件类对应的常用数据文件中查询出与该文件查询请求对应的常用数据文件,并将查询到的所述常用数据文件反馈给所述用户终端。Responding to a file query request with a file class sent by the user terminal, querying a common data file corresponding to the file query request from a common data file corresponding to the file class, and feeding back the commonly used data file to the query The user terminal.
  14. 如权利要求13所述的磁盘数据智能处理方法,其特征在于,所述预先确定的常用文件分析规则包括:The disk data intelligent processing method according to claim 13, wherein the predetermined common file analysis rule comprises:
    选择步骤:逐一选择文件类,在一个文件类被选择后,根据选择的文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,分别计算出选择的文件类对应的各个数据文件在预设时间内的文件调用次数和/或文件修改次数;Selection step: selecting a file class one by one, and after selecting a file class, calling a time point record and/or a file modification time point record according to the file of each data file corresponding to the selected file class, respectively calculating the corresponding file class corresponding The number of file calls and/or file modification times of each data file within a preset time;
    分析步骤:在选择的文件类对应的数据文件中查找出所有满足第一预设条件和/或第二预设条件的数据文件,将查找出的所有数据文件作为常用数据文件,且将所述选择的文件类对应的数据文件中除所述常用数据文件外的其他数据文件作为非常用数据文件,所述第一预设条件为数据文件在预设时间内的文件调用次数大于第一预设次数,所述第二预设条件为数据文件在预设时间内的文件修改次数大于第二预设次数;The analyzing step: searching all the data files satisfying the first preset condition and/or the second preset condition in the data file corresponding to the selected file class, and using all the data files found as common data files, and The data file corresponding to the selected file class is a non-use data file other than the common data file, and the first preset condition is that the number of times the file is called in the preset time is greater than the first preset. The second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times;
    判断步骤:判断是否存在未被选择过的文件类,当存在时,返回继续执行所述选择步骤,当不存在时,输出所有常用数据文件及非常用数据文件。Judgment step: judging whether there is a file class that has not been selected, and when present, returning to continue performing the selecting step, and when not present, outputting all common data files and very useful data files.
  15. 如权利要求10或11所述的磁盘数据智能处理方法,其特征在于,在所述分类步骤之后,该方法还包括:The method for processing disk data intelligently according to claim 10 or 11, wherein after the classifying step, the method further comprises:
    根据预先确定的标签提取规则,分别从各个所述数据文件的文件目录中提取一个或多个目录标签;Extracting one or more directory tags from a file directory of each of the data files according to a predetermined label extraction rule;
    分别将各个所述数据文件的目录标签与对应的文件类关联映射,且建立每一个数据文件的预设类型属性信息与关联映射的目录标签之间的映射关系,保存文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系;Separating the directory tags of each of the data files with the corresponding file class, and establishing a mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping, and preserving the file class and the data file. Set the mapping relationship between the type attribute information and the directory label;
    响应用户终端发送的带有目录标签和文件类的文件查询请求后,根据所述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系,确定所述查询请求中的文件类和目录标签对应的各个数据文件的预设类型属性信息,并生成所述查询请求对应的文件查询结果,将所述文件查询结果反馈给所述用户终端。Determining, in response to the file query request with the directory label and the file class sent by the user terminal, determining the query request according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. The file type and the directory tag correspond to the preset type attribute information of each data file, and generate a file query result corresponding to the query request, and feed back the file query result to the user terminal.
  16. 如权利要求15所述的磁盘数据智能处理方法,其特征在于,所述预先确定的标签提取规则为:The disk data intelligent processing method according to claim 15, wherein the predetermined label extraction rule is:
    为所述文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支,每一个目录节点分支中包括主目录节点和子目录节点,每一个上 级目录节点均是其下级目录节点的主目录节点;Establishing a node tree for each directory node of the file directory, the node tree includes a plurality of directory node branches, each directory node branch includes a home directory node and a subdirectory node, and each of the upper directory nodes is a lower directory node thereof Home directory node;
    确定每一个目录节点分支中的最下级共有目录节点,一个目录节点分支的最下级共有目录节点指的是与其他目录节点分支共有的、且在所述目录节点分支中对应的所有下级子目录节点均不是共有目录节点的目录节点;Determining the lowest-level shared directory node in each directory node branch, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-directory nodes common to other directory node branches and corresponding to the directory node branch Are not directory nodes of a common directory node;
    分别将确定的每一个目录节点分支的最下级共有目录节点及其对应的所有上级目录节点的节点名称,按照对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。Separating the node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes, according to the position order of the corresponding directory node branches, respectively, to generate a combination name, where the combination name is The directory label of the corresponding directory node branch.
  17. 如权利要求15所述的磁盘数据智能处理方法,其特征在于,所述预先确定的标签提取规则为:The disk data intelligent processing method according to claim 15, wherein the predetermined label extraction rule is:
    为文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支,每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点;Establishing a node tree for each directory node of the file directory, the node tree includes a plurality of directory node branches, each directory node branch includes a home directory node and a subdirectory node, and each of the upper directory nodes is a home directory of the lower directory node node;
    分别确定每一个目录节点分支中的第i级目录节点,i为大于1的正整数;Determining the i-th directory node in each directory node branch, where i is a positive integer greater than one;
    分别将确定的每一个目录节点分支的第i级目录节点及其对应的所有上级目录节点的节点名称,按照在对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。Separating the node names of the i-th directory nodes of each directory node branch and the corresponding node names of all the corresponding directory nodes in the order of the corresponding directory node branches, respectively, to generate a combination name, where the combination name is The directory label for the corresponding directory node branch.
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有磁盘数据智能处理程序,所述磁盘数据智能处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores a disk data intelligent processing program, the disk data intelligent processing program being executable by at least one processor to cause the at least one processor Perform the following steps:
    扫描步骤:实时或定时,或在收到数据文件处理指令后,扫描数据文件的文件目录,以获取每个数据文件的预设类型属性信息,所述数据文件存储于与所述智能硬件设备通信连接的电子设备中;Scanning step: scanning the file directory of the data file in real time or timing, or after receiving the data file processing instruction, to obtain preset type attribute information of each data file, the data file being stored in communication with the intelligent hardware device Connected electronic device;
    分类步骤:根据各个所述数据文件的预设类型属性信息及预先确定的文件分类规则,对所有所述数据文件进行分类处理,得到若干个文件类;a sorting step: classifying all the data files according to preset attribute information of each of the data files and a predetermined file classification rule, and obtaining a plurality of file types;
    查询步骤:响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件,并将查询到的数据文件反馈给所述用户终端。Querying step: in response to a file query request with a file class sent by the user terminal, querying a data file corresponding to the file query request in a data file corresponding to the file class, and feeding back the queried data file to the User terminal.
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述预设类型属性信息包括文件扩展名,所述预先确定的文件分类规则包括:The computer readable storage medium according to claim 18, wherein the preset type attribute information comprises a file extension, and the predetermined file classification rule comprises:
    根据预先确定的文件扩展名和文件类之间的映射关系,确定各个所述数据文件对应的文件类。The file class corresponding to each of the data files is determined according to a mapping relationship between the predetermined file extension and the file class.
  20. 如权利要求18或19所述的计算机可读存储介质,其特征在于,所述预设类型属性信息包括可排序的文件属性信息,所述查询步骤包括:The computer readable storage medium according to claim 18 or 19, wherein the preset type attribute information comprises sortable file attribute information, and the querying step comprises:
    响应用户终端发送的带有文件类的文件查询请求,在所述文件类对应的数据文件中查询与所述文件查询请求对应的数据文件;Responsive to the file query request with the file class sent by the user terminal, querying the data file corresponding to the file query request in the data file corresponding to the file class;
    按照查询到的所述数据文件对应的文件属性信息,将查询到的所述数据文件进行排序,并按照排序结果将查询到的所述数据文件反馈给所述用户终端。The queried data files are sorted according to the file attribute information corresponding to the queried data file, and the queried data file is fed back to the user terminal according to the sorting result.
  21. 如权利要求18或19所述的计算机可读存储介质,其特征在于,所 述预设类型属性信息包括文件调用时间点记录,和/或,文件修改时间点记录,所述查询步骤包括如下步骤:The computer readable storage medium according to claim 18 or 19, wherein the preset type attribute information comprises a file call time point record, and/or a file modification time point record, the query step comprising the following steps :
    根据各个所述文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,并基于预先确定的常用文件分析规则,分别分析出各个所述文件类对应的常用数据文件和不常用数据文件;The time point record and/or the file modification time point record are called according to the file of each data file corresponding to each of the file classes, and the common data files corresponding to each of the file classes are respectively analyzed based on a predetermined common file analysis rule. Not commonly used data files;
    分别解除各个所述文件类与对应的不常用数据文件之间预先建立的映射关系,且保留各个所述文件类与对应的常用数据文件之间预先建立的映射关系;Separating the pre-established mapping relationship between each of the file classes and the corresponding unusable data files, and pre-establishing a mapping relationship between each of the file classes and corresponding common data files;
    响应用户终端发送的带有文件类的文件查询请求,从所述文件类对应的常用数据文件中查询出与该文件查询请求对应的常用数据文件,并将查询到的所述常用数据文件反馈给所述用户终端。Responding to a file query request with a file class sent by the user terminal, querying a common data file corresponding to the file query request from a common data file corresponding to the file class, and feeding back the commonly used data file to the query The user terminal.
  22. 如权利要求21所述的计算机可读存储介质,其特征在于,所述预先确定的常用文件分析规则包括:The computer readable storage medium of claim 21, wherein the predetermined common file analysis rules comprise:
    选择步骤:逐一选择文件类,在一个文件类被选择后,根据选择的文件类对应的各个数据文件的文件调用时间点记录和/或文件修改时间点记录,分别计算出选择的文件类对应的各个数据文件在预设时间内的文件调用次数和/或文件修改次数;Selection step: selecting a file class one by one, and after selecting a file class, calling a time point record and/or a file modification time point record according to the file of each data file corresponding to the selected file class, respectively calculating the corresponding file class corresponding The number of file calls and/or file modification times of each data file within a preset time;
    分析步骤:在选择的文件类对应的数据文件中查找出所有满足第一预设条件和/或第二预设条件的数据文件,将查找出的所有数据文件作为常用数据文件,且将所述选择的文件类对应的数据文件中除所述常用数据文件外的其他数据文件作为非常用数据文件,所述第一预设条件为数据文件在预设时间内的文件调用次数大于第一预设次数,所述第二预设条件为数据文件在预设时间内的文件修改次数大于第二预设次数;The analyzing step: searching all the data files satisfying the first preset condition and/or the second preset condition in the data file corresponding to the selected file class, and using all the data files found as common data files, and The data file corresponding to the selected file class is a non-use data file other than the common data file, and the first preset condition is that the number of times the file is called in the preset time is greater than the first preset. The second preset condition is that the number of file modification times of the data file in the preset time is greater than the second preset number of times;
    判断步骤:判断是否存在未被选择过的文件类,当存在时,返回继续执行所述选择步骤,当不存在时,输出所有常用数据文件及非常用数据文件。Judgment step: judging whether there is a file class that has not been selected, and when present, returning to continue performing the selecting step, and when not present, outputting all common data files and very useful data files.
  23. 如权利要求18或19所述的计算机可读存储介质,其特征在于,在所述分类步骤之后,该方法还包括:The computer readable storage medium according to claim 18 or 19, wherein after the classifying step, the method further comprises:
    根据预先确定的标签提取规则,分别从各个所述数据文件的文件目录中提取一个或多个目录标签;Extracting one or more directory tags from a file directory of each of the data files according to a predetermined label extraction rule;
    分别将各个所述数据文件的目录标签与对应的文件类关联映射,且建立每一个数据文件的预设类型属性信息与关联映射的目录标签之间的映射关系,保存文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系;Separating the directory tags of each of the data files with the corresponding file class, and establishing a mapping relationship between the preset type attribute information of each data file and the directory label of the associated mapping, and preserving the file class and the data file. Set the mapping relationship between the type attribute information and the directory label;
    响应用户终端发送的带有目录标签和文件类的文件查询请求后,根据所述文件类、数据文件的预设类型属性信息及目录标签三者之间的映射关系,确定所述查询请求中的文件类和目录标签对应的各个数据文件的预设类型属性信息,并生成所述查询请求对应的文件查询结果,将所述文件查询结果反馈给所述用户终端。Determining, in response to the file query request with the directory label and the file class sent by the user terminal, determining the query request according to the mapping relationship between the file type, the preset type attribute information of the data file, and the directory label. The file type and the directory tag correspond to the preset type attribute information of each data file, and generate a file query result corresponding to the query request, and feed back the file query result to the user terminal.
  24. 如权利要求23所述的计算机可读存储介质,其特征在于,所述预先确定的标签提取规则为:The computer readable storage medium of claim 23, wherein the predetermined label extraction rule is:
    为所述文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支,每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点;Establishing a node tree for each directory node of the file directory, the node tree includes a plurality of directory node branches, each directory node branch includes a home directory node and a subdirectory node, and each of the upper directory nodes is a lower directory node thereof Home directory node;
    确定每一个目录节点分支中的最下级共有目录节点,一个目录节点分支的最下级共有目录节点指的是与其他目录节点分支共有的、且在所述目录节点分支中对应的所有下级子目录节点均不是共有目录节点的目录节点;Determining the lowest-level shared directory node in each directory node branch, and the lowest-level shared directory node of one directory node branch refers to all lower-level sub-directory nodes common to other directory node branches and corresponding to the directory node branch Are not directory nodes of a common directory node;
    分别将确定的每一个目录节点分支的最下级共有目录节点及其对应的所有上级目录节点的节点名称,按照对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。Separating the node names of the lowest-level common directory nodes of each directory node branch and the corresponding node names of all the upper-level directory nodes, according to the position order of the corresponding directory node branches, respectively, to generate a combination name, where the combination name is The directory label of the corresponding directory node branch.
  25. 如权利要求23所述的计算机可读存储介质,其特征在于,所述预先确定的标签提取规则为:The computer readable storage medium of claim 23, wherein the predetermined label extraction rule is:
    为文件目录的各个目录节点建立节点树,所述节点树包括多个目录节点分支,每一个目录节点分支中包括主目录节点和子目录节点,每一个上级目录节点均是其下级目录节点的主目录节点;Establishing a node tree for each directory node of the file directory, the node tree includes a plurality of directory node branches, each directory node branch includes a home directory node and a subdirectory node, and each of the upper directory nodes is a home directory of the lower directory node node;
    分别确定每一个目录节点分支中的第i级目录节点,i为大于1的正整数;Determining the i-th directory node in each directory node branch, where i is a positive integer greater than one;
    分别将确定的每一个目录节点分支的第i级目录节点及其对应的所有上级目录节点的节点名称,按照在对应的目录节点分支的位置顺序组合在一起,生成组合名称,所述组合名称即为对应的目录节点分支的目录标签。Separating the node names of the i-th directory nodes of each directory node branch and the corresponding node names of all the corresponding directory nodes in the order of the corresponding directory node branches, respectively, to generate a combination name, where the combination name is The directory label for the corresponding directory node branch.
PCT/CN2018/101272 2017-11-02 2018-08-20 Intelligent hardware device, intelligent disk data processing method, and storage medium WO2019085591A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711061075.0A CN108009204A (en) 2017-11-02 2017-11-02 Method and system based on extension name classification and de-redundancy
CN201711061075.0 2017-11-02

Publications (1)

Publication Number Publication Date
WO2019085591A1 true WO2019085591A1 (en) 2019-05-09

Family

ID=62052193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101272 WO2019085591A1 (en) 2017-11-02 2018-08-20 Intelligent hardware device, intelligent disk data processing method, and storage medium

Country Status (2)

Country Link
CN (1) CN108009204A (en)
WO (1) WO2019085591A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009204A (en) * 2017-11-02 2018-05-08 深圳市网心科技有限公司 Method and system based on extension name classification and de-redundancy
CN111143849B (en) * 2019-12-31 2022-06-24 奇安信科技集团股份有限公司 File type identification method and device applied to electronic equipment and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080082525A1 (en) * 2006-09-29 2008-04-03 Cha Myung Hoon File storage system, file storing method and file searching method therein
CN104408163A (en) * 2014-12-05 2015-03-11 浪潮(北京)电子信息产业有限公司 Data hierarchical storage method and device
CN105677871A (en) * 2016-01-08 2016-06-15 珠海格力电器股份有限公司 Audio file classifying method and device and file manager
CN105808770A (en) * 2016-03-22 2016-07-27 北京北方微电子基地设备工艺研究中心有限责任公司 File management method and device
CN106503008A (en) * 2015-09-07 2017-03-15 网宿科技股份有限公司 File memory method and device and file polling method and apparatus
CN107784108A (en) * 2017-10-31 2018-03-09 郑州云海信息技术有限公司 A kind of data storage and management method, device and equipment
CN108009204A (en) * 2017-11-02 2018-05-08 深圳市网心科技有限公司 Method and system based on extension name classification and de-redundancy

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1360267A (en) * 2002-01-30 2002-07-24 北京大学 Sorting and searching method for files
CN101599986B (en) * 2008-06-02 2012-08-08 宏碁股份有限公司 Method for increasing transmission speed of files and computer system
CN103646072A (en) * 2013-12-10 2014-03-19 河南博仕达通信技术有限公司 Automatic file classification method and mobile terminal
CN104978369B (en) * 2014-04-14 2020-02-18 腾讯科技(深圳)有限公司 File searching method and device
CN106254403A (en) * 2015-06-09 2016-12-21 中兴通讯股份有限公司 The moving method of data and device
CN106101271A (en) * 2016-08-08 2016-11-09 北京小米移动软件有限公司 Optimize the method and device of memory space

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080082525A1 (en) * 2006-09-29 2008-04-03 Cha Myung Hoon File storage system, file storing method and file searching method therein
CN104408163A (en) * 2014-12-05 2015-03-11 浪潮(北京)电子信息产业有限公司 Data hierarchical storage method and device
CN106503008A (en) * 2015-09-07 2017-03-15 网宿科技股份有限公司 File memory method and device and file polling method and apparatus
CN105677871A (en) * 2016-01-08 2016-06-15 珠海格力电器股份有限公司 Audio file classifying method and device and file manager
CN105808770A (en) * 2016-03-22 2016-07-27 北京北方微电子基地设备工艺研究中心有限责任公司 File management method and device
CN107784108A (en) * 2017-10-31 2018-03-09 郑州云海信息技术有限公司 A kind of data storage and management method, device and equipment
CN108009204A (en) * 2017-11-02 2018-05-08 深圳市网心科技有限公司 Method and system based on extension name classification and de-redundancy

Also Published As

Publication number Publication date
CN108009204A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
US20210279274A1 (en) Systems and Methods of Building and Using an Image Catalog
US10885100B2 (en) Thumbnail-based image sharing method and terminal
US20180365489A1 (en) Automatically organizing images
WO2017129018A1 (en) Picture processing method and apparatus, and smart terminal
AU2014384636B2 (en) Systems and methods for ephemeral eventing
US8874596B2 (en) Image processing system and method
US8170987B2 (en) Methods, systems and computer program products for automatically identifying and backing up user device content
US7945535B2 (en) Automatic publishing of digital content
US9558401B2 (en) Scanbox
WO2019127832A1 (en) Intelligent search method and apparatus, terminal, server, and storage medium
KR20160044470A (en) Method, server and system for setting background image
WO2017067485A1 (en) Picture management method and device, and terminal
WO2019085591A1 (en) Intelligent hardware device, intelligent disk data processing method, and storage medium
CN113051460A (en) Elasticissearch-based data retrieval method and system, electronic device and storage medium
US8922828B2 (en) Determining scan priority of documents
CN105653674B (en) File management method and system of intelligent terminal
CN109189728B (en) Intelligent hardware device, magnetic disk data processing method and storage medium
US20190272336A1 (en) Delivering information about an image corresponding to an object at a particular location
CN110969000A (en) Data merging processing method and device
CN109063215B (en) Data retrieval method and device
CN110737794A (en) Image query method, system, server and storage medium
WO2016168961A1 (en) Theme replacement method and apparatus for intelligent terminal
US9659041B2 (en) Model for capturing audit trail data with reduced probability of loss of critical data
CN111143293B (en) Metadata acquisition method, device, equipment and computer readable storage medium
CN111444253A (en) Data import method and device, computer readable storage medium and computer equipment

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18872123

Country of ref document: EP

Kind code of ref document: A1