File processing method and device, equipment, medium and program product

By automatically calculating the similarity between the file name and the project name in the project database and matching the keywords in the file directory, the automatic classification and storage of files is realized, solving the problems of low file processing efficiency and high error rate in the existing technology, and improving the efficiency and accuracy of file management.

CN120123334APending Publication Date: 2025-06-10CHINA LIFE ASSET MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510043746.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

In the prior art, file processing efficiency and high error rate have been affected, resulting in the impact of file management efficiency and accuracy.

Method used

By obtaining the name of the pending file, calculating its similarity with the project name in the preset project database, determining the target project name, and matching the file directory according to the keywords in the file directory, realizing automatic classification and storage of files.

Benefits of technology

It realizes efficient and accurate document management, reduces the workload and error rate of business personnel, and improves the efficiency of file processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123334A_ABST
    Figure CN120123334A_ABST
Patent Text Reader

Abstract

The invention provides a file processing method and device, equipment, a medium and a program product. The method comprises the steps of obtaining a name of a to-be-processed target file; the similarity between the name and each item name in a preset item database is determined, a target item name matched with the name is determined according to the similarity, and the item database comprises item names corresponding to various different items; determining a target item to which the target item name belongs, and obtaining at least one first keyword corresponding to each file directory included in the target item; according to the first keyword corresponding to each file directory, determining a target file directory matched with the target file; and storing the target file to the project database according to the target file directory. According to the method and the device, the files can be automatically classified and stored, and the files can be efficiently and accurately managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information processing, and particularly to a file processing method, apparatus, device, medium, and program product. Background Art

[0002] In the daily operation of enterprises, file management is a basic and crucial task, especially for the management systems in the financial field. In traditional file management methods, business personnel need to manually collect, sort, and upload offline files to the management system for classified storage for subsequent viewing and auditing. However, with the increasingly strict management requirements and the sharp increase in the number of documents, this process has become increasingly cumbersome and time-consuming: business personnel need to first collect various types of documents offline, such as project approval reports, review reports, etc., conduct integrity statistics, and then find a suitable storage location in the system according to the type of the file for uploading. This process not only has a large workload but also is error-prone, seriously affecting the efficiency and accuracy of file management. Therefore, in order to meet the growing file management needs, improve the work efficiency of business personnel, and reduce the error rate, there is an urgent need for a method that can automatically process files to achieve efficient and accurate management of documents. Summary of the Invention

[0003] The present application provides a file processing method, apparatus, device, medium, and program product, which is used to solve the defects of low file processing efficiency and high error rate in the prior art. Through automatic classification and storage of files, efficient and accurate management of files can be achieved.

[0004] The present application provides a file processing method, including the following steps: Obtain the name of the target file to be processed; Determine the similarity between the name and each project name in the preset project database, and determine the target project name that matches the name according to the similarity. The project database includes the project names corresponding to various different projects; Determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project; Determine the target file directory that matches the target file according to the first keywords corresponding to each file directory; Store the target file in the project database according to the target file directory.

[0005] According to the file processing method provided by the present application, the determining the similarity between the name and each project name in the preset project database includes: Extract all the second keywords in the name; Determine the invalid keywords in the second keyword according to each project name in the project database, where the invalid second keywords are not included in any project name in the project database; Remove the invalid keywords in the second keyword to obtain the second target keyword; Determine the similarity between the second target keyword in the name and each project name in the preset project database.

[0006] According to a file processing method provided by the present application, the determining the similarity between the second target keyword in the name and each project name in the preset project database, and determining the target project name matching the name according to the similarity includes: Determine the minimum number of operations for transforming the second target keyword to each project name in the project database according to any one of the preset text operations. The types of the preset text operations include replacement, deletion, and insertion, and the minimum number of operations represents the similarity; Determine the project name corresponding to the minimum value in the minimum number of operations as the target project name matching the name.

[0007] According to a file processing method provided by the present application, the determining the target file directory matching the target file according to the first keyword corresponding to each file directory includes: Determine the regular expression corresponding to each file directory according to the first keyword corresponding to each file directory; Match the second target keyword with each regular expression to obtain a target regular expression, where the second target keyword conforms to the definition of the target regular expression; Determine the file target corresponding to the target regular expression as the target file directory matching the target file.

[0008] According to a file processing method provided by the present application, after removing the invalid keywords in the second keyword to obtain the second target keyword, the method further includes: If the second target keyword does not exist, extract the third keyword with the highest matching degree with the name of the target file from the content of the first preset number of pages of the target file through a pre-trained semantic analysis model, where the third keyword is different from the second keyword; The determining the similarity between the name and each project name in the preset project database includes: Determine the similarity between the third target keyword and each project name in the preset project database.

[0009] A file processing method provided by the present application, storing the target file according to the target file directory includes: Determine a storage location corresponding to the target file directory in the project database; Store the target file at the storage location.

[0010] The present application further provides a file processing device, including the following modules: An acquisition module, configured to acquire the name of a target file to be processed; A first determination module, configured to determine the similarity between the name and each project name in a preset project database, and determine a target project name matching the name according to the similarity, where the project database includes project names corresponding to multiple different projects; A second determination module, configured to determine a target project to which the target project name belongs, and acquire at least one first keyword corresponding to each file directory included in the target project; A third determination module, configured to determine a target file directory matching the target file according to the first keywords corresponding to each file directory; A storage module, configured to store the target file in the project database according to the target file directory.

[0011] The present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the file processing method described in any one of the above is implemented.

[0012] The present application further provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the file processing method described in any one of the above is implemented.

[0013] The present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the file processing method described in any one of the above is implemented.

[0014] The present application provides a file processing method, apparatus, device, medium, and program product. When implementing the file processing method of the present application, first, obtain the name of the target file to be processed, determine the similarity between the name and each project name in the preset project database, and determine the target project name that matches the name according to the similarity. The project database includes the project names corresponding to various different projects; then, determine the target project to which the target project name belongs, obtain at least one first keyword corresponding to each file directory included in the target project, and then determine the target file directory that matches the target file according to the first keyword corresponding to each file directory. Finally, store the target file in the project database according to the target file directory. The present application can achieve automatic classification and storage of files, overcome the problems of low file processing efficiency and high error rate in the prior art, and can achieve efficient and accurate management of files. Description of the Drawings

[0015] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 is a flowchart of a file processing method shown in an embodiment of the present application; Figure 2 is a structural block diagram of a file processing apparatus shown in an embodiment of the present application; Figure 3 is a schematic structural diagram of an electronic device shown in an embodiment of the present application. Detailed Embodiments

[0017] To make the objectives, technical solutions, and advantages of the present application clearer, the following will clearly and completely describe the technical solutions in the present application with reference to the drawings in the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.

[0018] The execution subject of the method of the present application is an electronic device of any type or a device for processing files. Hereinafter, taking the execution subject as an electronic device as an example, the file processing method of the present application will be described in detail.

[0019] Figure 1 is a flowchart of a file processing method shown in an embodiment of the present application. Refer to Figure 1, the file processing method of this application may include the following steps: Step 101, obtain the name of the target file to be processed.

[0020] Among them, the number of target files can be one or more. If the number of target files is multiple, each target file needs to be processed according to steps 101 - 105.

[0021] The target file to be processed refers to a file that has not been classified and stored.

[0022] The name of the target file can be, for example, "Supervision Report on the Subway Bond Plan in City X in the First Quarter of 2024.pdf".

[0023] Step 102, determine the similarity between the name and each project name in the preset project database, and determine the target project name that matches the name according to the similarity. The project database includes the project names corresponding to various different projects.

[0024] In this embodiment, the project database stores the project names corresponding to various different projects. By implementing step 102, the similarity between the name of the target file and the project name corresponding to each project in the project database can be calculated, and the project name with the highest similarity can be determined as the target project name.

[0025] When calculating the similarity, methods such as string - matching - based methods (edit distance, regular expression matching), vector - based methods (bag - of - words model and TF - IDF, word embeddings), or deep - learning - based methods (pre - trained language models such as BERT) can be used.

[0026] Among them, the edit distance refers to the minimum number of edit operations required to convert one string into another. The smaller the minimum number of edit operations, the higher the similarity. Regular expression matching refers to using regular expressions to match specific patterns in strings. It is highly flexible and can define complex matching rules. The bag-of-words model and TF-IDF (Term Frequency-Inverse Document Frequency) refer to converting strings into term frequency vectors and using TF-IDF for weighting to reflect the importance of words. This method takes into account the frequency of words in strings and their prevalence in the entire corpus, and can better capture the semantic information of strings. Word embedding refers to mapping words into a high-dimensional vector space so that words with similar semantics are closer in the vector space. This method can capture the semantic relationships between words and give a higher similarity for strings with similar semantics. Pre-trained language models such as BERT (Bidirectional Encoder Representations from Transformers) refer to using pre-trained deep learning models to encode strings and calculate the similarity between the encoded vectors. This method can capture the complex semantic relationships between strings and give a higher similarity for strings with similar semantics.

[0027] When selecting a method for calculating similarity, various factors such as the length of the name of the target file and the performance of the electronic device can be comprehensively considered to select a suitable method. The specific method to be used can be set according to the actual business requirements.

[0028] Step 103: Determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project.

[0029] Among them, each project in the project database contains one or more file directories, which are used to achieve classified storage of files.

[0030] This application can pre-set at least one first keyword for each file directory in each project, so as to achieve rapid matching between the name of the file and the file directory when processing a certain file to be processed.

[0031] Step 104: Determine the target file directory that matches the target file according to the first keywords corresponding to each file directory.

[0032] In this embodiment, if the name of the target file contains the largest number of first keywords corresponding to a certain file directory, then it can be determined that this file directory is the target file directory. For example, if the name of the target file contains 1 first keyword in file directory 1 and 2 first keywords in file directory 2, then it can be determined that file directory 2 is the target file directory.

[0033] Of course, if the target file directory cannot be quickly determined in the above manner, this application can also determine the target file directory through other means, which will be described in detail later.

[0034] Step 105: Store the target file in the project database according to the target file directory.

[0035] Specifically, step 105 may include: In the project database, determine the storage location corresponding to the target file directory; Store the target file in the storage location.

[0036] In this embodiment, each file directory has a corresponding storage location. Therefore, after determining the target file directory corresponding to the target file, the target file can be automatically uploaded to the preset storage location.

[0037] After the upload of the target file is achieved, the electronic device can also generate review information based on the name of the target file, the corresponding target project, the target project name, the target file directory, the upload time, etc., and output the review information on the display screen so that the review personnel can timely review whether there are any abnormalities in the upload process of the target file.

[0038] Implementing the file processing method of this application, first obtain the name of the target file to be processed, determine the similarity between the name and each project name in the preset project database, and determine the target project name that matches the name according to the similarity. The project database includes the project names corresponding to various different projects; then, determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project. Then, according to the first keywords corresponding to each file directory, determine the target file directory that matches the target file. Finally, store the target file in the project database according to the target file directory. This application can achieve automatic classification and storage of files, overcome the problems of low file processing efficiency and high error rate in the prior art, and can achieve efficient and accurate management of files.

[0039] Combined with the above embodiments, in one implementation, determining the similarity between the name and each project name in the preset project database includes: Extract all the second keywords in the name; Determine the invalid keywords in the second keyword according to each project name in the project database, where the invalid second keywords are not included in any project name in the project database; Remove the invalid keywords in the second keyword to obtain the second target keyword; Determine the similarity between the second target keyword in the name and each project name in the preset project database.

[0040] In actual implementation, if the name of the target file is directly matched with the project name using a similarity algorithm, since the number of words in the name of the target file is generally much more than the number of words in the project name, the calculated similarity values are generally low, and it is difficult to enter the next processing flow.

[0041] Therefore, in this embodiment, first extract all the keywords in the name of the target file (hereinafter referred to as the second keyword), then determine all the keywords that do not appear in any project name in the project database, and use these keywords as invalid keywords. Then, remove all the invalid keywords from all the second keywords, and use the remaining second keywords as the second target keyword. Finally, determine the similarity between the second target keyword and each project name in the project database.

[0042] Exemplarily, the name of the target file is "Supervision Report on the X City Subway Bond Plan in the First Quarter of 2024.pdf", and all the determined second keywords are "the first quarter of 2024", "X City Subway Bond Plan", and "Supervision Report.pdf". Among them, both "the first quarter of 2024" and "Supervision Report.pdf" do not exist in any project name in the project database, while "X City Subway Bond Plan" exists in a certain project name. Therefore, both "the first quarter of 2024" and "Supervision Report.pdf" are invalid keywords, and the finally obtained second target keyword is "X City Subway Bond Plan".

[0043] In this embodiment, preprocessing the name of the target file can significantly improve the matching degree between the name of the target file and each project name in the project database, which helps to quickly find the target project to which the target file belongs.

[0044] Combined with the above embodiments, in one implementation manner, determining the similarity between the second target keyword in the name and each project name in the preset project database, and determining the target project name that matches the name according to the similarity may specifically include: Determine the minimum number of operations for transforming the second target keyword to each project name in the project database according to any one of the preset text operations. The types of preset text operations include replacement, deletion, and insertion, and the minimum number of operations represents the similarity; Determine the project name corresponding to the minimum value among the minimum operation counts as the target project name that matches the name.

[0045] In this embodiment, a text similarity algorithm is adopted. Specifically, the similarity is calculated according to the edit distance. The smaller the edit distance, the higher the similarity. First, determine the minimum operation count for transforming the second target keyword into each project name in the project database according to any one of the preset text operations, and then determine the project name corresponding to the minimum value among the minimum operation counts as the target project name.

[0046] Among them, the types of preset text operations include replacement, deletion, and insertion. In one transformation operation, any one of the above three preset text operations can be used. Among them, replacement means replacing one character with another character. For example, replacing the k in the string kitten with s to get sitten. Insertion means inserting a character. For example, adding g at the end of the string sittin to get sitting. Deletion means deleting a character. For example, deleting the e in the string sitten to get sittn.

[0047] For example, if it takes 10 operations to transform the second target keyword to project name 1 and 1 operation to transform the second target keyword to project name 2, assuming that both project name 1 and project name 2 have 20 characters, then the similarity between the second target keyword and project name 1 is 1 - 10 / 20 = 50%, and the similarity between the second target keyword and project name 2 is 1 - 1 / 20 = 95%. Then project name 2 is the target project name. It can be seen that the fewer the transformation times, the higher the text similarity.

[0048] As another example, if the second target keyword is "X City Subway Bond Plan", by performing a global match with the project names in the project database, it is found that the similarity between "X City Subway Bond Plan" and the project name "Wuhan Subway Bond Investment Plan" is the highest, then "Wuhan Subway Bond Investment Plan" is the target project name.

[0049] In actual implementation, in addition to calculating the similarity according to the edit distance, other methods can also be used to calculate the similarity, which can be specifically set according to actual needs.

[0050] Combining the above embodiments, in one implementation manner, determining the target file directory that matches the target file according to the first keyword corresponding to each file directory includes: Determine the regular expression corresponding to each file directory according to the first keyword corresponding to each file directory; Match the second target keyword with each regular expression to obtain the target regular expression, and the second target keyword conforms to the definition of the target regular expression; Determine the file target corresponding to the target regular expression as the target file directory that matches the target file.

[0051] In this embodiment, the naming rule of the target file name does not necessarily completely follow the naming rule of the file directory. Therefore, if the name of the target file is directly matched with each file directory included in the target project, the matching degree may not be very high. Therefore, in this application, a set of keywords is first defined for each file directory. These keywords are usually words or phrases closely related to the content of the file directory. Then, a regular expression is constructed based on these keywords.

[0052] A regular expression can contain ordinary characters (i.e., directly matched keywords) and special characters (such as wildcards, quantifiers, etc.) to define a more complex matching pattern. Regarding wildcards, for example, '.' represents any single character, and '*' represents any number of characters. Exemplarily, when directly matching keywords, the regular expression can be: Supervisory Report. When matching keywords and any file extension, the regular expression can be: Supervisory Report\.\w+, where '\.' matches the dot character, and '\w+' matches one or more alphanumeric characters (including the underscore), which can capture names such as Supervisory Report.pdf, Supervisory Report.docx, etc. When achieving more flexible matching (considering that there may be other characters before and after), the regular expression can be:.*Supervisory Report\.\w+, where '.*' represents any number of any characters (including zero characters), which allows any characters before the Supervisory Report, and this method can match names such as 2023 Supervisory Report.pdf, Project A - Supervisory Report.docx, etc.

[0053] There can be multiple regular expressions for a file directory. Which specific regular expressions are used for each file directory in the project database can be set according to actual needs, and this embodiment does not limit it.

[0054] Next, use the constructed regular expression to match the name of the target file (specifically the second target keyword). If the name of the target file conforms to the definition of the regular expression, that is, contains the keyword or a certain variation of the keyword, then it is considered that the target file matches the file directory, and this file directory is the target file directory. Finally, classify the target file under this target file directory according to the matching result. Exemplarily, if a keyword "Supervisory Report" is set in the regular expression, then "Supervisory Report.pdf" in the second target keyword can be matched through the regular expression.

[0055] Through this embodiment, the target file can be accurately classified into a certain file directory under the target project, which helps to store the target file in the correct position in the project database.

[0056] Combined with the above embodiments, in one implementation, after eliminating the invalid keywords in the second keyword to obtain the second target keyword, the method of the present application may further include: If there is no second target keyword, through a pre-trained semantic analysis model, in the content of the first preset number of pages of the target file, extract the third keyword with the highest matching degree to the name of the target file, and the third keyword is different from the second keyword; Determine the similarity between the name and each project name in the preset project database, including: Determine the similarity between the third target keyword and each project name in the preset project database.

[0057] In this embodiment, if all the second keywords are invalid keywords, then through a pre-trained semantic analysis model, in the content of the first preset number of pages (such as the first 2 pages) of the target file, extract the third keyword with the highest matching degree to the name of the target file, and then determine the similarity between the third target keyword and each project name in the preset project database.

[0058] Among them, the semantic analysis model can be selected from BERT, GPT series (such as GPT-3, GPT-4) or T5, etc., and then use a corpus containing project names and related files (which should include documents in various formats and contents to ensure that the model can process different types of files) to train or fine-tune the model. During the training process, the project names in the files can be marked as targets to let the model learn how to extract the keywords most likely to be project names from the text.

[0059] When using the semantic analysis model to extract the third keyword with the highest matching degree to the name of the target file, input the preprocessed target file into the trained semantic analysis model, and use the named entity recognition ability of the model to extract the keywords that may be project names. The semantic analysis model can identify specific types of entities in the text (such as person names, place names, organization names, etc.). In this embodiment, the focus is on project names. Then, screen out the candidate names related to the project name from the extracted entities, and then sort them according to features such as the occurrence frequency, context information or relationship with other entities of the candidate names, and then screen out the candidate name ranked first as the third keyword with the highest matching degree to the name of the target file.

[0060] Through this embodiment, the target project name suitable for the target file can be accurately matched in the project database, which helps the subsequent accurate classification and storage of the target file.

[0061] The present application provides a file processing method, apparatus, device, medium, and program product. When implementing the file processing method of the present application, first, the name of the target file to be processed is obtained, the similarity between the name and each project name in the preset project database is determined, and the target project name that matches the name is determined according to the similarity. The project database includes the project names corresponding to various different projects. Then, the target project to which the target project name belongs is determined, and at least one first keyword corresponding to each file directory included in the target project is obtained. Next, according to the first keywords corresponding to each file directory, the target file directory that matches the target file is determined. Finally, according to the target file directory, the target file is stored in the project database. The present application can achieve automatic classification and storage of files, overcome the problems of low file processing efficiency and high error rate in the prior art, and can achieve efficient and accurate management of files.

[0062] A description of an apparatus provided by the present application is given below. The file processing apparatus described below can be correspondingly referred to the file processing method described above.

[0063] Figure 2 is a structural block diagram of a file processing apparatus shown in an embodiment of the present application. Refer to Figure 2 , a file processing apparatus provided by the present application may include: An acquisition module 201, configured to acquire the name of the target file to be processed; A first determination module 202, configured to determine the similarity between the name and each project name in the preset project database, and determine the target project name that matches the name according to the similarity. The project database includes the project names corresponding to various different projects; A second determination module 203, configured to determine the target project to which the target project name belongs, and acquire at least one first keyword corresponding to each file directory included in the target project; A third determination module 204, configured to determine the target file directory that matches the target file according to the first keywords corresponding to each file directory; A storage module 205, configured to store the target file in the project database according to the target file directory.

[0064] According to a file processing apparatus 200 provided by the present application, the first determination module 202 includes: A first extraction sub-module, configured to extract all the second keywords in the name; A first determination sub-module, configured to determine the invalid keywords in the second keywords according to each project name in the project database. The invalid second keywords are not included in any project name in the project database; A rejection sub-module, configured to reject the invalid keywords in the second keyword to obtain a second target keyword; A second determination sub-module, configured to determine the similarity between the second target keyword in the name and each project name in a preset project database.

[0065] According to a file processing apparatus 200 provided by the present application, the first determination module 202 includes: A third determination sub-module, configured to determine the minimum number of operations for transforming the second target keyword to each project name in the project database according to any one of preset text operations, where the types of the preset text operations include replacement, deletion, and insertion, and the minimum number of operations represents the similarity; A fourth determination sub-module, configured to determine the project name corresponding to the minimum value in the minimum number of operations as the target project name matching the name.

[0066] According to a file processing apparatus 200 provided by the present application, the third determination module 204 includes: A fifth determination sub-module, configured to determine a regular expression corresponding to each file directory according to the first keyword corresponding to each file directory; A matching sub-module, configured to match the second target keyword with each regular expression to obtain a target regular expression, where the second target keyword conforms to the definition of the target regular expression; A sixth determination sub-module, configured to determine the file target corresponding to the target regular expression as the target file directory matching the target file.

[0067] According to a file processing apparatus 200 provided by the present application, the first determination module 202 further includes: A second extraction sub-module, configured to, if the second target keyword does not exist, extract a third keyword with the highest matching degree with the name of the target file from the content of the first preset number of pages of the target file through a pre-trained semantic analysis model, where the third keyword is different from the second keyword; The second determination sub-module is further configured to determine the similarity between the third target keyword and each project name in a preset project database.

[0068] According to a file processing apparatus 200 provided by the present application, the storage module 205 includes: A seventh determination sub-module, configured to determine a storage location corresponding to the target file directory in the project database; A storage sub-module, configured to store the target file to the storage location.

[0069] Figure 3 This is a schematic structural diagram of an electronic device shown in an embodiment of the present application. As Figure 3 shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340. Among them, the processor 310, the communication interface 320, and the memory 330 complete communication with each other through the communication bus 340. The processor 310 may call logical instructions in the memory 330 to execute a file processing method, and the method includes: obtaining the name of a target file to be processed; determining the similarity between the name and each project name in a preset project database, and determining a target project name that matches the name according to the similarity. The project database includes project names corresponding to multiple different projects; determining the target project to which the target project name belongs, and obtaining at least one first keyword corresponding to each file directory included in the target project; determining a target file directory that matches the target file according to the first keyword corresponding to each file directory; storing the target file in the project database according to the target file directory.

[0070] In addition, when the logical instructions in the above-mentioned memory 330 are implemented in the form of software functional units and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.

[0071] On the other hand, the present application also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a file processing method provided by the above-mentioned various methods. The method includes: obtaining the name of a target file to be processed; Determine the similarity between the said name and each project name in a preset project database, and determine a target project name that matches the said name according to the similarity. The project database includes project names corresponding to various different projects; Determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project; Determine a target file directory that matches the target file according to the first keyword corresponding to each of the said file directories; Store the target file in the project database according to the target file directory.

[0072] In another aspect, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a file processing method provided by the above-mentioned various methods. The method includes: obtaining the name of a target file to be processed; Determine the similarity between the said name and each project name in a preset project database, and determine a target project name that matches the said name according to the similarity. The project database includes project names corresponding to various different projects; Determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project; Determine a target file directory that matches the target file according to the first keyword corresponding to each of the said file directories; Store the target file in the project database according to the target file directory.

[0073] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0074] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.

Claims

1. A file processing method, characterized in that: include: Get the name of the target file to be processed; Determine the similarity between the name and each project name in a preset project database, and determine a target project name matching the name according to the similarity, wherein the project database includes project names corresponding to a plurality of different projects; Determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project; Determine a target file directory matching the target file according to the first keyword corresponding to each of the file directories; According to the target file directory, the target file is stored in the project database.

2. The file processing method according to claim 1, characterized in that: Determining the similarity between the name and each project name in a preset project database includes: Extracting all second keywords in the name; Determine, according to each project name in the project database, an invalid keyword in the second keyword, wherein the invalid second keyword is not included in any project name in the project database; Eliminate the invalid keywords from the second keywords to obtain second target keywords; Determine the similarity between the second target keyword in the name and each project name in a preset project database.

3. The file processing method according to claim 2, characterized in that: The determining of the similarity between the second target keyword in the name and each project name in a preset project database, and determining a target project name matching the name according to the similarity, includes: Determine the minimum number of operations required for the second target keyword to be transformed into each of the project names in the project database according to any one of the preset text operations, wherein the types of the preset text operations include replacement, deletion, and insertion, and the minimum number of operations represents the similarity; The project name corresponding to the minimum value of the minimum number of operations is determined as the target project name that matches the name.

4. The file processing method according to claim 2, characterized in that: The step of determining a target file directory matching the target file according to the first keywords corresponding to each of the file directories includes: Determine, according to the first keyword corresponding to each of the file directories, a regular expression corresponding to each of the file directories; Matching the second target keyword with each of the regular expressions to obtain a target regular expression, wherein the second target keyword conforms to a definition of the target regular expression; The file target corresponding to the target regular expression is determined as a target file directory that matches the target file.

5. The file processing method according to claim 2, characterized in that: After removing the invalid keywords from the second keywords to obtain the second target keywords, the method further includes: If the second target keyword does not exist, extracting a third keyword with the highest matching degree with the name of the target file from the contents of the first preset number of pages of the target file through a pre-trained semantic analysis model, wherein the third keyword is different from the second keyword; Determining the similarity between the name and each project name in a preset project database includes: Determine the similarity between the third target keyword and each project name in a preset project database.

6. The file processing method according to any one of claims 1 to 5, characterized in that: The storing of the target file according to the target file directory includes: In the project database, determining a storage location corresponding to the target file directory; The target file is stored in the storage location.

7. A file processing device, characterized in that: include: An acquisition module is used to obtain the name of the target file to be processed; A first determination module is used to determine the similarity between the name and each project name in a preset project database, and determine a target project name matching the name according to the similarity, wherein the project database includes project names corresponding to multiple different projects; A second determination module is used to determine the target project to which the target project name belongs, and obtain at least one first keyword corresponding to each file directory included in the target project; A third determination module, configured to determine a target file directory matching the target file according to the first keywords corresponding to each of the file directories; A storage module is used to store the target file in the project database according to the target file directory.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the file processing method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a file processing method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a file processing method according to any one of claims 1 to 6 is implemented.