File storage method and device and electronic equipment

By automatically determining the storage path and concatenating file attribute data, the problem of low storage efficiency and limited query methods in traditional file management is solved, realizing intelligent classification and flexible query file management.

CN119271637APending Publication Date: 2025-01-07BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411419593.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Traditional file management software requires manual creation of storage directories, which reduces file storage efficiency, and the file query method is limited, affecting query efficiency and user experience.

Method used

The system automatically determines the storage path based on the file type, extracts the file's metadata, file tags, and file content, and concatenates them with the filename to form the target storage file. It supports multiple query methods.

Benefits of technology

It enables intelligent file classification and batch storage, improving file storage efficiency and query flexibility, and supports precise queries based on time, tags, and content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271637A_ABST
    Figure CN119271637A_ABST
Patent Text Reader

Abstract

The invention provides a file storage method and device and electronic equipment, and relates to the technical field of data processing. In the application, firstly, a to-be-stored file is received, and a storage path of the to-be-stored file is determined based on a file type of the to-be-stored file; then extracting attribute data of the to-be-stored file, and splicing the attribute data with the to-be-stored file to obtain a spliced target storage file; finally, the target storage file is stored according to the storage path, in this way, the storage path corresponding to the file type can be selected according to the file type of the to-be-stored file, classification and batch storage of different files are achieved, manual participation is not needed, and the file storage rate is increased; the attribute data of the to-be-stored file and the to-be-stored file are spliced, so that the queriable related information of the to-be-stored file can be increased, and the flexibility of subsequent file query is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a file storage method, device and electronic device. Background Art

[0002] With the rapid development of the information age, we are increasingly relying on computers to handle various matters in work and life. Especially for modern office environments, computer office work has become a norm.

[0003] In the process of computer office, we inevitably need to store and process a large number of files, such as Word documents, PDF files, PPT slides, TXT texts, Excel spreadsheets, JSON data files, and Markdown (MD) files, etc. As time goes by, the number of these files is also increasing.

[0004] In traditional file management software, it is usually necessary to manually create storage directories for files and manually maintain the created storage directories, which reduces the storage efficiency of files. In addition, for stored files, in order to facilitate subsequent users to query historical files, traditional file query software usually provides a query method for querying target files based on file names. This file query method is relatively simple, which reduces the efficiency of target file queries and the user experience of using the file query (retrieval) function.

[0005] At present, there is an urgent need for an efficient and convenient file management method to store and manage files. Summary of the invention

[0006] The present invention provides a file storage method, device and electronic device to improve the efficiency of file storage and enhance the flexibility of file query. The specific technical solution is as follows:

[0007] In a first aspect, the present application provides a file storage method, comprising:

[0008] Receiving a file to be stored, and determining a storage path of the file to be stored based on the file type of the file to be stored;

[0009] Extracting attribute data of the file to be stored, and splicing the attribute data with the file to be stored to obtain a spliced ​​target storage file;

[0010] The target storage file is stored according to the storage path.

[0011] Based on the above method, it is possible to select a storage path corresponding to the file type for file storage according to the file type of the file to be stored, thereby realizing the classification and batch storage of different files without human intervention, thereby improving the file storage rate; splicing the attribute data of the file to be stored with the file to be stored can increase the queryable related information of the file to be stored and improve the flexibility of subsequent file queries.

[0012] In a possible implementation, after storing the target storage file according to the storage path, the method further includes:

[0013] Receive query content input by the user;

[0014] Determining a target query method that matches the query content based on the degree of association between the query content and the attribute data, wherein one category of the attribute data corresponds to one target query method;

[0015] The target file is queried according to the target query method.

[0016] Based on the above method, the target file can be queried according to different file query modes, thereby improving the flexibility of file query.

[0017] In a possible implementation, extracting the attribute data of the file to be stored includes:

[0018] Extracting metadata of the file to be stored, wherein the metadata includes creation time and update time of the file to be stored; or,

[0019] Extracting a file tag associated with the file to be stored from a preset tag library; or,

[0020] Extract the file content of the file to be stored.

[0021] Based on the above method, the metadata, file tags and file contents of the files to be stored can be extracted, and the target files can be queried using richer query methods.

[0022] In a possible implementation, if the attribute data includes any one of the metadata, the file tag, and the file content, then the step of splicing the attribute data with the file to be stored to obtain a spliced ​​target storage file includes:

[0023] concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain the target storage file; or,

[0024] The file tag is concatenated with the file name of the file to be stored to obtain the target storage file; or,

[0025] The file content is concatenated with the file name of the file to be stored to obtain the target storage file.

[0026] Based on the above method, data preparation can be made for subsequent query of target files based on the creation time, update time, file tag or file content of the files.

[0027] In a possible implementation, if the attribute data includes the metadata and the file tag, then the step of splicing the attribute data with the file to be stored to obtain a spliced ​​target storage file includes:

[0028] Concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain a first storage file;

[0029] Concatenate the file tag with the file name of the file to be stored to obtain a second storage file;

[0030] The first storage file and the second storage file are combined according to a linked list structure to obtain the target storage file.

[0031] Based on the above method, data preparation can be made for subsequent query of target files based on the creation time, update time, file tag or file content of the file.

[0032] In a possible implementation, determining a target query mode matching the query content based on the correlation between the query content and the attribute data includes:

[0033] If the query content is a numerical value, determining the target query method is to query the target file based on the creation time and update time of the file;

[0034] If the query content is the same as the tag in the tag library, determining that the target query method is to query the target file based on the file tag;

[0035] If the query content is other content, the target query method is determined to be a query for a target file based on the file content.

[0036] Based on the above approach, the target file can be queried based on the correlation between the query content and the attribute data, that is, based on the creation time, update time, file tag or file content of the file, thereby improving the flexibility of querying the target file.

[0037] In a possible implementation, when storing the target storage file according to the storage path, the method further includes:

[0038] Obtaining path information of the storage path;

[0039] The path information is added to the target storage file.

[0040] Based on the above method, the queryable information contained in the target storage file can be enriched.

[0041] In a second aspect, the present application provides a file storage device, comprising:

[0042] A data receiving module, used for receiving a file to be stored, and determining a storage path of the file to be stored based on the file type of the file to be stored;

[0043] A data splicing module, used for extracting attribute data of the file to be stored, and splicing the attribute data with the file to be stored to obtain a spliced ​​target storage file;

[0044] A data storage module is used to store the target storage file according to the storage path.

[0045] In a possible implementation, the system further includes a data query module, and the data query module is specifically used to:

[0046] Receive query content input by the user;

[0047] Determining a target query method that matches the query content based on the degree of association between the query content and the attribute data, wherein one category of the attribute data corresponds to one target query method;

[0048] The target file is queried according to the target query method.

[0049] In a possible implementation, the data splicing module is specifically used to:

[0050] Extracting metadata of the file to be stored, wherein the metadata includes creation time and update time of the file to be stored; or,

[0051] Extracting a file tag associated with the file to be stored from a preset tag library; or,

[0052] Extract the file content of the file to be stored.

[0053] In a possible implementation, if the attribute data includes any one of the metadata, the file tag, and the file content, the data splicing module is specifically used to:

[0054] concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain the target storage file; or,

[0055] The file tag is concatenated with the file name of the file to be stored to obtain the target storage file; or,

[0056] The file content is concatenated with the file name of the file to be stored to obtain the target storage file.

[0057] In a possible implementation, if the attribute data includes the metadata and the file tag, the data splicing module is specifically used to:

[0058] Concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain a first storage file;

[0059] Concatenate the file tag with the file name of the file to be stored to obtain a second storage file;

[0060] The first storage file and the second storage file are combined according to a linked list structure to obtain the target storage file.

[0061] In a possible implementation, the data query module is specifically used to:

[0062] If the query content is a numerical value, determining the target query method is to query the target file based on the creation time and update time of the file;

[0063] If the query content is the same as the tag in the tag library, determining that the target query method is to query the target file based on the file tag;

[0064] If the query content is other content, the target query method is determined to be a query for a target file based on the file content.

[0065] In a possible implementation, the data storage module is specifically used for:

[0066] Obtaining path information of the storage path;

[0067] The path information is added to the target storage file.

[0068] In a third aspect, the present application provides an electronic device, including:

[0069] Memory, used to store computer programs;

[0070] The processor is used to implement the steps of the above-mentioned file storage method when executing the computer program stored in the memory.

[0071] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned file storage method are implemented.

[0072] For each aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 A flowchart of a file storage method provided for this application;

[0074] Figure 2 A flowchart for processing files to be stored provided for this application;

[0075] Figure 3 A flowchart for extracting metadata of files to be stored provided by this application;

[0076] Figure 4 A flowchart for extracting file tags of files to be stored provided by this application;

[0077] Figure 5 A flowchart for extracting the file content of the file to be stored provided by this application;

[0078] Figure 6 A flowchart for obtaining a target storage file provided by this application;

[0079] Figure 7 A flowchart of the query target file provided for this application;

[0080] Figure 8 A schematic diagram of the structure of a file storage device provided by this application;

[0081] Fig. 9 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0083] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0084] With the rapid development of the information age, we are increasingly relying on computers to handle various matters in work and life. Especially for modern office environments, computer office work has become a norm.

[0085] In the process of computer office, we inevitably need to store and process a large number of files, such as Word documents, PDF files, PPT slides, TXT texts, Excel spreadsheets, JSON data files, and Markdown (MD) files, etc. As time goes by, the number of these files is also increasing.

[0086] In traditional file management software, it is usually necessary to manually create storage directories for files and manually maintain the created storage directories, which reduces the storage efficiency of files. In addition, for stored files, in order to facilitate subsequent users to query historical files, traditional file query software usually provides a query method for querying target files based on file names. This file query method is relatively simple, which reduces the efficiency of target file queries and the user experience of using the file query (retrieval) function.

[0087] At present, there is an urgent need for an efficient and convenient file management method to store and manage files.

[0088] In view of this, in order to facilitate file management, improve the efficiency of file storage and enhance the flexibility of file query, the present application provides a file storage method, which specifically includes: first receiving the file to be stored, and based on the file type of the file to be stored, determining the storage path of the file to be stored; then extracting the attribute data of the file to be stored, and splicing the attribute data with the file to be stored to obtain the spliced ​​target storage file; finally, storing the target storage file according to the storage path.

[0089] Through the method provided in the present application, it is possible to select a storage path corresponding to the file type for file storage according to the file type of the file to be stored, thereby realizing the classification and batch storage of different files without human intervention, thereby improving the rate of file storage; splicing the attribute data of the file to be stored with the file to be stored can increase the queryable related information of the file to be stored and improve the flexibility of subsequent file queries.

[0090] Reference Figure 1 As shown, it is a flowchart of a file storage method provided by an embodiment of the present application, the method comprising:

[0091] S1, receiving a file to be stored, and determining a storage path of the file to be stored based on the file type of the file to be stored.

[0092] In the traditional file management process, it is difficult to quickly archive different types of files into corresponding folders. For example, in a directory containing multiple subfolders, you need to manually drag and drop pictures, Word documents, PPT and other files into their respective corresponding folders, which will inevitably lead to human errors and misplacement of files. In addition, the traditional file processing method cannot process a large number of files in batches, but processes the files manually, which has low file storage efficiency.

[0093] In the embodiments of this application, see the attached Figure 2 As shown, in order to improve the storage efficiency of files, the file storage server can first receive the files to be stored. The files to be stored can be a single file or multiple files (batch files). This application does not impose any specific restrictions on the number of files to be stored.

[0094] The file storage server determines whether the file to be stored is a single file. If so, it determines the file type of the file to be stored based on the file suffix of the file to be stored, and determines the storage path of the file to be stored based on the file type; if not, after batch processing the files to be stored, it determines the file type of the file to be stored based on the file suffix of the file to be stored, and determines the storage path of the file to be stored based on the file type.

[0095] When determining the storage path of the file to be stored, if it is determined that there is a folder corresponding to the file type of the file to be stored in the storage directory, the file to be stored can be moved to the folder; otherwise, a new folder is created and the file to be stored is moved to the new folder.

[0096] Through the above method, manual operations on the stored files can be avoided, batch file automatic storage can be achieved, and the efficiency of file storage can be improved.

[0097] S2, extracting attribute data of the file to be stored, and concatenating the attribute data with the file to be stored to obtain a concatenated target storage file.

[0098] Traditional file query software usually provides a query method based on the file name to query the target file. The query method is single and has the following disadvantages:

[0099] 1. It does not support efficient retrieval based on specific dates. For example, the user may clearly remember that certain files were classified and stored on January x, 2024, but the user cannot quickly locate the target file based on this date.

[0100] 2. It is impossible to search based on the file's attributes or content tags. For example, there is a storage file named "Reporting Plan for 2024 Safety Production Plan" stored in the directory. When the user enters keywords such as "important documents" and "reporting documents", if these keywords do not directly appear in the file name of the storage file, the user may not be able to search for the target file the user needs through the keyword.

[0101] 3. Retrieval based on file content is not possible. For example, a user may clearly remember that a PDF file contains the content of "reporting scheme of production safety plan", but cannot find the file directly when searching because he forgets the file name. The user cannot search for the target file he needs by entering "production safety plan" or "reporting scheme". For another example, a picture containing the name "Zhang San" is stored on the user's computer. When the user tries to search for the picture by entering "Zhang San", the query result is empty.

[0102] In the embodiment of the present application, in order to facilitate users to query the target file and improve the flexibility of file query, the file storage server can extract attribute data of the file to be stored, wherein the attribute data includes: metadata, file tags and file content of the file to be stored;

[0103] Further, see the attached Figure 3 As shown, the file storage server can first extract the metadata of the file to be stored. The metadata records the date when each file is stored, and the date when each file is stored can be the creation time, update time, etc. Finally, the creation time and update time are stored in the file or database. In addition, if the file storage server detects that the current file is changed, the update time of the current file is changed to the time when the current file is saved, and the file or database is updated at the same time.

[0104] For further information, see Appendix Figure 4As shown, the file storage server can also formulate multiple file tags for the files to be stored from a pre-set tag library, bind the multiple file tags to the files to be stored, and store them in the database. In addition, when the files to be stored are modified, the tag data will be updated to the file record in the database to ensure that the tag information of each file is the latest.

[0105] For further information, see Appendix Figure 5 As shown, the file storage server can also extract the file content of the file to be stored. Exemplarily, the file storage server can select different data reading methods to read the file content according to the different types of stored files (e.g., if the stored file is a picture, the picture is scanned to read the text, and if the stored file is a PDF file, the file is scanned to read the content); then the read file content is stored in the database together with the file. In addition, when the file to be stored is modified, the file content will be updated to the file record in the database to ensure that the file content of each file is the latest.

[0106] In an embodiment of the present application, after extracting the metadata, file tags and file contents of the file to be stored, the file storage server may splice the above attribute data with the file to be stored to obtain a spliced ​​target storage file in order to facilitate subsequent query of the target file.

[0107] Exemplarily, if the attribute data includes any one of metadata, file tags, and file content, the attribute data is concatenated with the file to be stored to obtain a concatenated target storage file, including:

[0108] The creation time in the metadata, the update time and the file name of the file to be stored are concatenated to obtain the target storage file; or,

[0109] Concatenate the file tag with the file name of the file to be stored to obtain the target storage file; or,

[0110] Concatenate the file content with the file name to be stored to obtain the target storage file.

[0111] Through the above method, it is possible to facilitate subsequent query of target files based on the creation time, file tags or file contents of the files, thereby improving the flexibility of file query.

[0112] In a possible implementation, if the attribute data includes metadata and file tags, the attribute data is concatenated with the file to be stored to obtain a concatenated target storage file, including:

[0113] Concatenate the creation time and update time in the metadata with the file name of the file to be stored to obtain a first storage file;

[0114] Concatenate the file tag with the file name of the file to be stored to obtain a second storage file;

[0115] The first storage file and the second storage file are combined according to the linked list structure to obtain a target storage file.

[0116] In the embodiment of the present application, if the attribute data includes metadata, file tags and file content, the attribute data is spliced ​​with the file to be stored, and the method of obtaining the spliced ​​target storage file can refer to the above-mentioned method of splicing the attribute data including metadata and file tags, and the repeated parts are not repeated. The obtained target storage file can refer to the attached Figure 6 shown.

[0117] S3, stores the target storage file according to the storage path.

[0118] In an embodiment of the present application, after the file storage server obtains the spliced ​​target storage file, it can obtain the path information of the storage path, then add the path information to the target storage file, and finally store the target storage file according to the storage path.

[0119] In an embodiment of the present application, after the target storage file is stored in the database, in order to facilitate the query of the target file in the database, the file storage server can first receive the query content input by the user; then, based on the correlation between the query content and the attribute data (the more similar the query content and the attribute data, the higher the correlation), determine the target query method that matches the query content, wherein one category of the attribute data corresponds to one target query method; finally, the target file is queried according to the target query method.

[0120] Further, see the attached Figure 7 As shown, the target query method provided by this application is as follows:

[0121] If the query content entered by the user is a numerical value, the file storage server queries the index database based on the file creation time or file update time, and returns the queried target file name and target file path to the user.

[0122] If the query content entered by the user is the same as the tag in the preset tag library, the file storage server will first query the index database based on the file tag and return the queried target file name and target file path to the user.

[0123] If the query content entered by the user is other content, the file storage server queries the index database based on the file content and returns the queried target file name and target file path to the user.

[0124] In summary, the file storage method provided by this application has the following beneficial effects:

[0125] 1. Intelligent file classification function: The intelligent file classification function includes intelligent classification of single files and intelligent classification of batch files, which is convenient and fast to classify and store files.

[0126] 2. File preprocessing function: The file preprocessing function includes extracting and storing metadata of files, labeling files when storing them, extracting the contents of files of specific file types, and adding searchable content to files.

[0127] 3. Search function: The search function includes file storage and file query. File storage adopts a chain structure, storing the file creation time, update time, file tag, file content, file name and storage path in a linked list. When searching for target files, the optimal query method is used to provide accurate query results based on the search content entered by the user, thereby improving the flexibility of file query.

[0128] Based on the method provided in the above embodiment, the embodiment of the present application also provides a file storage device, such as Figure 8 The figure is a schematic diagram of the structure of a file storage device in an embodiment of the present application, the device comprising:

[0129] The data receiving module 801 is used to receive a file to be stored, and determine a storage path of the file to be stored based on the file type of the file to be stored;

[0130] The data splicing module 802 is used to extract the attribute data of the file to be stored, and splice the attribute data with the file to be stored to obtain a spliced ​​target storage file;

[0131] The data storage module 803 is used to store the target storage file according to the storage path.

[0132] In a possible implementation, the system further includes a data query module 804, and the data query module is specifically used to:

[0133] Receive query content input by the user;

[0134] Determining a target query method that matches the query content based on the degree of association between the query content and the attribute data, wherein one category of the attribute data corresponds to one target query method;

[0135] The target file is queried according to the target query method.

[0136] In a possible implementation, the data splicing module 802 is specifically used for:

[0137] Extracting metadata of the file to be stored, wherein the metadata includes creation time and update time of the file to be stored; or,

[0138] Extracting a file tag associated with the file to be stored from a preset tag library; or,

[0139] Extract the file content of the file to be stored.

[0140] In a possible implementation, if the attribute data includes any one of the metadata, the file tag, and the file content, the data splicing module 802 is specifically used to:

[0141] concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain the target storage file; or,

[0142] The file tag is concatenated with the file name of the file to be stored to obtain the target storage file; or,

[0143] The file content is concatenated with the file name of the file to be stored to obtain the target storage file.

[0144] In a possible implementation, if the attribute data includes the metadata and the file tag, the data splicing module 802 is specifically used to:

[0145] Concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain a first storage file;

[0146] Concatenate the file tag with the file name of the file to be stored to obtain a second storage file;

[0147] The first storage file and the second storage file are combined according to a linked list structure to obtain the target storage file.

[0148] In a possible implementation, the data query module 804 is specifically used to:

[0149] If the query content is a numerical value, determining the target query method is to query the target file based on the creation time and update time of the file;

[0150] If the query content is the same as the tag in the tag library, determining that the target query method is to query the target file based on the file tag;

[0151] If the query content is other content, the target query method is determined to be a query for a target file based on the file content.

[0152] In a possible implementation, the data storage module 803 is specifically used for:

[0153] Obtaining path information of the storage path;

[0154] The path information is added to the target storage file.

[0155] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the functions of the aforementioned file storage device, referring to Fig. 9 , the electronic device comprises:

[0156] At least one processor 901, and a memory 902 connected to the at least one processor 901. The specific connection medium between the processor 901 and the memory 902 is not limited in the embodiment of the present application. Fig. 9 In the example, the processor 901 and the memory 902 are connected via a bus 900. Fig. 9 The bus 900 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 900 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 901 can also be called a controller, and there is no limitation on the name.

[0157] In the embodiment of the present application, the memory 902 stores instructions that can be executed by at least one processor 901. The at least one processor 901 can execute the file storage method discussed above by executing the instructions stored in the memory 902. The processor 901 can implement Figure 8 The functions of each module in the device shown.

[0158] Among them, processor 901 is the control center of the device, and can use various interfaces and lines to connect various parts of the entire control device. By running or executing instructions stored in memory 902 and calling data stored in memory 902, various functions of the device and processing data, the device can be monitored as a whole.

[0159] In one possible design, the processor 901 may include one or more processing units, and the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 901. In some embodiments, the processor 901 and the memory 902 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0160] Processor 901 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the file storage method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0161] The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 902 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 902 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0162] By designing and programming the processor 901, the code corresponding to the file storage method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 1 The steps of the file storage method of the embodiment shown are as follows: How to design and program the processor 901 is a technique known to those skilled in the art and will not be described in detail here.

[0163] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the file storage method discussed above.

[0164] In some possible implementations, various aspects of the file storage method provided by the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the file storage method according to various exemplary implementations of the present application described above in this specification.

[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0166] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0169] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A file storage method, characterized in that: include: Receiving a file to be stored, and determining a storage path of the file to be stored based on the file type of the file to be stored; Extracting attribute data of the file to be stored, and splicing the attribute data with the file to be stored to obtain a spliced ​​target storage file; The target storage file is stored according to the storage path.

2. The method according to claim 1, characterized in that After storing the target storage file according to the storage path, the method further includes: Receive query content input by the user; Determining a target query method that matches the query content based on the degree of association between the query content and the attribute data, wherein one category of the attribute data corresponds to one target query method; The target file is queried according to the target query method.

3. The method according to claim 1, characterized in that The extracting the attribute data of the file to be stored includes: Extracting metadata of the file to be stored, wherein the metadata includes creation time and update time of the file to be stored; or, Extracting a file tag associated with the file to be stored from a preset tag library; or, Extract the file content of the file to be stored.

4. The method according to claim 3, characterized in that If the attribute data includes any one of the metadata, the file tag, and the file content, then the attribute data is concatenated with the file to be stored to obtain a concatenated target storage file, including: concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain the target storage file; or, The file tag is concatenated with the file name of the file to be stored to obtain the target storage file; or, The file content is concatenated with the file name of the file to be stored to obtain the target storage file.

5. The method according to claim 3, characterized in that If the attribute data includes the metadata and the file tag, then the attribute data is spliced ​​with the file to be stored to obtain a spliced ​​target storage file, including: Concatenate the creation time and the update time in the metadata with the file name of the file to be stored to obtain a first storage file; Concatenate the file tag with the file name of the file to be stored to obtain a second storage file; The first storage file and the second storage file are combined according to a linked list structure to obtain the target storage file.

6. The method according to claim 2, characterized in that The determining of a target query method matching the query content based on the correlation between the query content and the attribute data includes: If the query content is a numerical value, determining the target query method is to query the target file based on the creation time and update time of the file; If the query content is the same as the tag in the tag library, determining that the target query method is to query the target file based on the file tag; If the query content is other content, the target query method is determined to be a query for a target file based on the file content.

7. The method according to claim 2, characterized in that When storing the target storage file according to the storage path, the method further includes: Obtaining path information of the storage path; The path information is added to the target storage file.

8. A file storage device, characterized in that: include: A data receiving module, used for receiving a file to be stored, and determining a storage path of the file to be stored based on the file type of the file to be stored; A data splicing module, used for extracting attribute data of the file to be stored, and splicing the attribute data with the file to be stored to obtain a spliced ​​target storage file; A data storage module is used to store the target storage file according to the storage path.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 7 when executing the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.