File management method and system, readable storage medium and terminal

By judging and converting input file formats in file management, deduplication, consistency check and language screening, the problems of large workload and high error rate in the existing technology are solved, and efficient file management and database updates are achieved. Reduced maintenance costs.

CN119226227APending Publication Date: 2024-12-31SHENZHEN SEN5 TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411212521.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The prior art has problems such as high workload and high probability of error in file management, especially when processing multilingual files, it is necessary to manually copy and paste text data into the data management system.

Method used

Provide a file management method, including determining whether the input file format meets the preset format, converting it to initial data, performing deduplication, consistency check, language filtering and format conversion, and updating the database based on these processed initial data to generate the current The version of the data file and download it according to the download request.

Benefits of technology

By standardizing the input file format, the file conversion efficiency is improved, the probability of error is reduced, the operation is simplified, the maintenance cost is reduced, the work efficiency is improved, and the data is unique and consistent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226227A_ABST
    Figure CN119226227A_ABST
Patent Text Reader

Abstract

The invention provides a file management method and system, a readable storage medium and a terminal, and relates to the technical field of data processing. The file management method comprises the following steps: judging whether the format of an input file accords with a preset format or not, and if so, converting the input file into initial data in a preset form; processing the initial data, and updating the database based on the processed initial data; wherein the initial data processing comprises the steps of duplicate removal, consistency check, language screening and format conversion; generating a data file of the current version based on the updated database; and obtaining the data file of the corresponding version according to the downloading request, and downloading the data file. The file management method has the advantages of simplicity in operation, low maintenance cost and the like, and can effectively improve the working efficiency and reduce the error probability.
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 management method, system, readable storage medium and terminal. Background Art

[0002] With the development trend of internationalization, documents related to cross-border business usually need to support multiple languages, resulting in an increasing number of documents.

[0003] When managing and maintaining files, staff need to manually copy and paste relevant text data (such as texts in different languages) into the code and import it into the corresponding data management system. The above operation method has disadvantages such as large workload. In addition, due to manual copying, the probability of error is also high. Summary of the invention

[0004] The purpose of this application is to overcome the defects of the prior art and provide a file management method, system, readable storage medium and terminal to solve the problems in the prior art.

[0005] In order to solve the above problems, the first aspect of the embodiment of the present application provides a file management method, including:

[0006] Determine whether the format of the input file conforms to a preset format, and if so, convert the input file into initial data in a preset format;

[0007] Processing the initial data, and updating the database based on the processed initial data; wherein the processing of the initial data includes: deduplication, consistency check, language screening, and format conversion;

[0008] Based on the updated database, generate a data file of the current version;

[0009] According to the download request, the data file of the corresponding version is obtained and downloaded.

[0010] In an optional implementation, determining whether the format of the input file meets the requirements includes:

[0011] According to the actual type or suffix format name of the input file, it is determined whether the input file belongs to the preset format, wherein the preset format includes json format, arb format, xml format and csv format.

[0012] In an optional implementation, converting the input file into the initial data in a preset format includes:

[0013] The input file is parsed in the form of a character string to obtain the initial data; wherein the preset form of the initial data includes js object data and js array object data.

[0014] In an optional implementation, the deduplication includes: deduplicating the initial data according to one or / and multiple identification features;

[0015] The consistency check includes: determining whether the initial data is consistent with the appId of the existing data in the database, and determining whether the appId of the initial data exists in the database;

[0016] The language screening includes: determining whether the language type corresponding to the initial data is within a defined range;

[0017] The format conversion includes: converting the initial data into a format required by the database.

[0018] In an optional implementation, the generation of the data file includes:

[0019] Check whether new data is generated in the database;

[0020] At the current time, if new data is generated in the database, checking whether the data in the database is consistent with the data in the data file of the previous version;

[0021] If there is inconsistency, checking the changes between the data in the database and the data in the previous version of the data file; wherein the changes include addition, update and deletion of data;

[0022] Converting the data in the database at the current time into the data file of the current version;

[0023] The version information of the current version of the data file is stored in the version directory of the server.

[0024] In an optional implementation, the data file of the current version is compared with the data file of the previous version:

[0025] Convert the newly added data into the incremental file of the current version;

[0026] The version information of the incremental file is stored in the version directory.

[0027] In an optional implementation, downloading the data file includes:

[0028] After receiving the download request, query the version directory according to the version information of the data file and / or the incremental file to be downloaded;

[0029] Obtaining location information of the data file or / and the incremental file to be downloaded through the version directory;

[0030] Read the corresponding data file and send the data file to the front end;

[0031] After receiving the data file, the front end processes the data file and converts it into a file package;

[0032] Call the download function to save the file package to the user's local computer.

[0033] In a second aspect of the embodiment of the present application, a file management system is provided, including:

[0034] A judging module, used to judge whether the format of the input file conforms to a preset format, and if so, convert the input file into initial data in a preset format;

[0035] A processing module, used to process the initial data and update the database based on the processed initial data; wherein the processing of the initial data includes: deduplication, consistency check, language screening and format conversion;

[0036] A generating module, used for generating a data file of a current version based on the updated database;

[0037] The download module is used to obtain the data file of the corresponding version according to the download request and download it.

[0038] According to a third aspect of an embodiment of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the file management method described above is implemented.

[0039] According to a fourth aspect of an embodiment of the present application, a terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the file management method as described above when executing the computer program.

[0040] The beneficial effects of this application include:

[0041] The file management method proposed in the present application includes: screening input files and converting input files that conform to a preset format into initial data in a preset form; processing the initial data accordingly and updating the database based on the processed initial data; generating the current version of the data file based on the updated database; and obtaining the corresponding version of the data file according to a download request, and downloading and saving it.

[0042] By standardizing the format of input files, the conversion efficiency of input files is effectively improved.

[0043] The database can be updated by performing deduplication, consistency check, language screening and format conversion on the initial data. Deduplication: avoid duplicate content and ensure the uniqueness of data; consistency check: ensure data consistency, so as to facilitate the update or replacement of existing content; language screening: screen out language types within the defined range (for example, Chinese, English, etc.) to facilitate management; format conversion: convert data into the format required by the database to facilitate management and maintenance.

[0044] By generating data files, the data in the updated database is saved. Each time the database is updated, a corresponding version of the data file is generated, which makes it easier to save and search for related data.

[0045] This file management method has the advantages of simple operation and low maintenance cost, and can effectively improve work efficiency and reduce the probability of errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A flow chart of a file management method is shown;

[0048] Figure 2 A flow chart for generating a data file is shown;

[0049] Figure 3 A flow chart of data file downloading is shown;

[0050] Figure 4 A structural block diagram of a file management system is shown.

[0051] Description of main component symbols:

[0052] 100 - determination module; 200 - processing module; 300 - generation module; 400 - download module. DETAILED DESCRIPTION

[0053] The embodiments of the present application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the protection scope of the present application.

[0054] Example

[0055] See also Figure 1 In this embodiment, a file management method is proposed, including:

[0056] S11, determining whether the format of the input file conforms to a preset format, and if so, converting the input file into initial data in a preset format;

[0057] S12, processing the initial data, and updating the database based on the processed initial data;

[0058] S13, generating a data file of the current version based on the updated database;

[0059] S14, according to the download request, obtaining the data file of the corresponding version and downloading it.

[0060] By standardizing the format of input files, the conversion efficiency of input files is effectively improved.

[0061] The processing of initial data includes: deduplication, consistency check, language screening, and format conversion. Among them, by performing the above processing on the initial data, errors such as data duplication caused by manual data copying can be effectively avoided. Specifically, by performing deduplication, consistency check, language screening, and format conversion on the initial data, the database can be updated. Among them, deduplication: avoid duplicate content and ensure the uniqueness of data; consistency check: ensure the consistency of data, so as to facilitate the update or replacement of existing content; language screening: filter out language types within the defined range (for example, Chinese, English, Japanese, French, etc.), so as to facilitate management; format conversion: convert the data into the format required by the database, so as to facilitate management and maintenance.

[0062] By generating data files, the data in the updated database is saved. Each time the database is updated, a corresponding version of the data file is generated, which makes it easier to save and search for related data.

[0063] In step S11, it is determined whether the type of the input file meets the requirements, including: judging whether the input file belongs to a preset format according to the actual type or suffix format name of the input file, wherein the preset formats include json format, arb format, xml format and csv format.

[0064] The file management method can be supported by applications such as browsers. Users can use the application to manually select input files, or drag and drop input files into the input module of the application. After obtaining one or more input files, determine whether the type of the input file meets the preset format; filter out input files that meet the requirements; process the input files that meet the requirements and are in different formats respectively, and convert them into a unified data format, thereby obtaining initial data; transmit the initial data to the server, wherein the server can perform basic processing on the initial data after receiving the initial data, such as data verification, data deduplication, output attribution, creation time supplement, etc.; combine the data into a query syntax, and find all the data that meets the requirements from the database at one time; perform a cyclic comparison of the data based on the data responded by the database and the data submitted by the user, wherein when the data is consistent, the statement is updated, and when the data is inconsistent, a new statement is created; perform corresponding operations on the newly added statement and the updated statement, such as archiving, etc.

[0065] In step 11, converting the input file into initial data in a preset format includes:

[0066] The input file is parsed in the form of a string to obtain initial data; wherein the preset form of the initial data includes js object data and js array object data.

[0067] In this embodiment, the input file is converted into initial data in a preset format, that is, the input file is converted into a unified format. The conversion of data into a unified format may include the following steps:

[0068] Determine the file format based on the input file's mimetype (actual file type) or the file's suffix format name;

[0069] If the input file is in a preset format, the browser's FileReader API is used to parse the input file in the form of a string at one time.

[0070] In this embodiment, the input file can be converted into js object data or js array object data. The front-end .json or flutter.arb data can be obtained and converted into js object data by parsing with the browser's JSON.parse; Android .xml data, using the xml2js function library, converts the xml data into standard js object data; csv data, using the papaparse function library, converts the csv data into standard js array object data. The specific processing method can be referred to below.

[0071] Processing of front-end .json or flutter.arb data:

[0072] 1. Use the browser's JSON.parse to obtain and convert it into js object data.

[0073] 2. To handle nested structures, write a function called flattenObject. The function takes two parameters: obj represents the object to be flattened, and parentKey is used to track the key currently being processed. When processing each property of the object, the function checks the type of the property. If the value of the property is an object and is of object type, flattenObject is called recursively and the current key is updated. For non-object properties, the key-value pair is directly added to the result.

[0074] 3. Write a function named transfromJson, which accepts a parameter obj object data, uses the Object.keys() method to convert all the keys of the object into an array, and then uses the js array loop function forEach to loop, and uses obj[item] to get the current value, item is the key value, and then use the new fields key and value to uniformly output the array structure data.

[0075] 4. Use Feishu content text detection API to detect the country language of the first item value in the array (you can also manually select the target language), and loop again. Replace the key of all values ​​in the array with the target country mark. For example, if the target language is English, the final output is [{appId:null,cateId:null,key:"key",en:"hello",tag:null,attr:null},...].

[0076] Processing of Android .xml data:

[0077] 1. Use the xml2js function library to convert XML data into standard JS object data.

[0078] 2. Write a function named transformXMLtoJSON, which accepts a parameter, the js object after executing xml2js. Use the Object.keys() method to convert all the keys of the object into an array, and then use the js array loop function forEach to loop, and use obj[item].value to get the current value. obj[item].attr.name is the key value, and the other obj[item].attr are additional attributes. Item is the tag value, and then use the new fields key, value, tag, and attr to uniformly output the array structure data.

[0079] 3. Use the Feishu content text detection API to detect which national language the value of the first item of data in the array belongs to (you can also manually select the target language). Then loop again and replace the keys of all values in the array with the identifiers of the target country. For example, if the target language is English, the final output will be [{appId:null,cateId:null,key:"key",en:”hello",tag:null,attr:null},...].

[0080] Processing of csv data:

[0081] 1. Use the papaparse library to convert csv data into standard js array object data.

[0082] 2. The papaparse library can directly convert to the required js array data structure. Only basic verification processing needs to be done on this data. Write a validCsvData method that accepts the data processed by papaparse as a parameter. Then take the first item of data in the array and use object.keys to determine whether the object keys include key, en, zh,..., tag, attr. If these keys exist, proceed to the next step. The next step is to use the forEach method of the js array loop to perform verification and processing of the values to be processed. Due to the flexibility of csv, extra spaces may be added during use, resulting in invalid data. Therefore, all spaces on both sides of the key and value should be removed.

[0083] 3. Finally, generate data [{appId:null,cateId:null,key:"key",en:”hello",zh:"你好",tag:null,attr:null},...].

[0084] In this embodiment, an example of the unified data format is as follows:

[0085] JSON

[0086] / / tag is the corresponding Android.xml tag

[0087] / / key is the js object key

[0088] / / attr is the other attribute parameters of the corresponding Android.xml. (Convenient for restoring data later)

[0089] / / en corresponds to the value, and this key is dynamically variable. (The language type can be selected according to the user's needs. For example, if the user selects English, it is en, and if the user selects Chinese, it is zh)

[0090] / / appId is the application to which the current data belongs

[0091] / / cateId is the category of the current data [

[0093] {

[0094] "tag":null,

[0095] "key":"js object key",

[0096] "attr":{"hello":"This is an XML-specific attribute"},

[0097] "en":"value",

[0098] "appId":1,

[0099] "cateId":null

[0100] } ]

[0102] In this embodiment, the JS object data can be flattened. Using a recursive approach to achieve this goal means traversing each property of the object and recursively processing it when encountering a nested object until all nested levels are expanded into a one-dimensional structure.

[0103] A nested structure is a data structure that contains another data structure of the same or different type, forming a hierarchical or multi-level structure. This structure can be a data type in a programming language, such as an object, array, dictionary, or other data structures. The core concept of a nested structure is that elements contain other elements, forming a hierarchical relationship. In JavaScript, objects can contain properties, and the values ​​of these properties can also be objects, thus forming a nested structure.

[0104] During the recursion, check the type of each attribute. If it is an object, recursively call the object; if it is not an object, directly add the key-value pair to the result. In order to maintain the one-dimensional structure, use a dot or other separator to connect the keys of the nested objects to form a flat key. The main idea of ​​this process is to convert the nested objects into a flat, easy-to-handle form by recursively processing them, so as to facilitate subsequent operations and analysis. For example: Person: Zhou, 30 years old, address XXX, city of residence, nationality. In this example, the "Person" object has a nested structure because it contains "address". This nested structure can continue to expand to form a deeper level of nesting. Take the "Person" object as an example, which contains the "address" attribute, and the value of the "address" attribute is an object containing city and country information.

[0105] To handle the nested structure above, you can write a function called flattenObject that takes two parameters: obj, which represents the object to be flattened, and parentKey, which is used to track the key currently being processed.

[0106] When processing each property of the object, the function checks the type of the property. If the value of the property is an object and is not null, a recursive call to flattenObject is made and the current key is updated. For non-object properties, the key-value pair is directly added to the result.

[0107] By recursively processing nested objects, a flattened object is eventually obtained. In the example, the "Person" object is converted into an object that no longer contains a nested structure, where each attribute is connected by a dot to indicate its hierarchical relationship. This helps to more conveniently process and manipulate the attributes of the object.

[0108] Convert JS data to uniform fields and data types. Use JS object loop to deduplicate JS data from front-end .json or flutter.arb data and Android .xml data sources. Use js array loop to determine whether the JS data fields from csv data sources are correct and standardized.

[0109] In this embodiment, the data format and type are labeled.

[0110] / / tag is the corresponding android.xml tag;

[0111] / / key is the object key of js;

[0112] / / attr is other attribute parameters of the corresponding Android.xml, which is convenient for restoring data later;

[0113] / / en corresponds to value. This key is dynamically changeable. For example, if the user selects English, it is en, and if the user selects Chinese, it is zh;

[0114] / / appId is the application to which the current data belongs;

[0115] / / cateId is the category to which the current data belongs.

[0116] In step S12, the processing of the initial data includes: deduplication, consistency check, language screening, format conversion, etc. The initial data is transmitted to the server and processed by the server.

[0117] Deduplication includes: deduplication of initial data based on one or / and multiple identification features. For example, data can be deduplicated based on tag, key, appID, and cateId conditions, thereby ensuring data uniqueness. For another example, database data can be queried at one time based on a combination of tag deduplication data, key deduplication data, appId deduplication data, and cateId deduplication data.

[0118] The consistency check includes: determining whether the appId of the initial data is consistent with the appId of the data already in the database, and determining whether the appId of the initial data exists in the database.

[0119] Language screening includes: determining whether the language type corresponding to the initial data is within the defined range. For example, in some applications, only Chinese and English are allowed to be configured.

[0120] Format conversion includes: converting the initial data into the format required by the database.

[0121] Furthermore, the query data of the database is compared with the data just processed. If the key exists, it is considered to be updated, and if it does not exist, it is considered to be created. The newly added data and the updated data are executed separately.

[0122] like Figure 2 As shown, in this embodiment, the generation of the data file includes:

[0123] S21, initiates the command to create a version;

[0124] S22, checking whether new data is generated in the database;

[0125] S231, if new data is generated in the database at the current time, check whether the data in the database is consistent with the data in the previous version of the data file; S232, if no new data is generated in the database at the current time, remind an abnormality;

[0126] S241, if there is inconsistency, checking the changes between the data in the database and the data in the previous version of the data file, wherein the changes include the addition, update and deletion of data; S242, if there is consistency, prompting an abnormality;

[0127] S25, converting the data in the database at the current time into a data file of the current version;

[0128] S26, storing the version information of the current version of the data file in the version directory of the server.

[0129] In this embodiment, data file generation also includes comparing the data file of the current version with the data file of the previous version: converting the newly added data into an incremental file of the current version; and storing the version information of the incremental file in the version directory. For example, the data of the current database is converted into a 123 / all.json file and stored in a server directory; by comparing the current version with the previous version, the incremental data is converted into a 123 / add.json file and stored in a server directory. In this embodiment, the previous version refers to the version that was generated last before the current version in the order of generation time.

[0130] The process of data file generation is the process of version creation. In the process of data file generation, all data products at the current time (all data-related content, including data files, incremental data, version information, version directories, etc.) can be sealed to avoid the loss of related data. Data files, incremental data, version information, etc. of each version are stored in the database.

[0131] like Figure 3 As shown, downloading the data file includes:

[0132] S31, after receiving the download request, query the version directory according to the version information of the data file or / and the incremental file to be downloaded;

[0133] S32, obtaining location information of the data file or / and incremental file to be downloaded through the version directory;

[0134] S33, reading the corresponding data file and sending the data file to the front end;

[0135] S34, after receiving the data file, the front end processes the data file and converts it into a file package;

[0136] S35, calling the download function to save the file package to the user's local computer.

[0137] In this embodiment, the version information of the data file of the current version and the incremental file can be added to the file directory, wherein the file directory is associated with the version directory. Therefore, when searching for data, the file directory is queried according to the version information, thereby locating the version directory, and quickly querying to obtain relevant information.

[0138] Users can download file packages in different formats according to their needs. The file packages can be in zip or csv formats.

[0139] The process of downloading the zip format is as follows:

[0140] 1. After the user clicks to download the zip, an interface request is initiated;

[0141] 2. According to the file directory associated with the version, query the version directory of the associated server;

[0142] 3. Use the nodejs file reading API to read all json files in the directory and return the json file to the front end;

[0143] 4. After receiving the json data, the front end starts to process the data in a loop and converts the processed data into a compressed package using the js-zip plug-in;

[0144] 5. After the compressed package data is ready, call the download function to save the zip package to the user's local computer.

[0145] The process of downloading csv format is as follows:

[0146] 1. The user clicks to download the csv product and initiates an interface request;

[0147] 2. According to the file directory associated with the version, query the version directory of the associated server;

[0148] 3. Use the nodejs file reading API to read all json files in the directory and return the json file to the front end;

[0149] 4. After the front end receives the json data, it starts to process the data in a loop and uses the Papa csv processing plug-in to convert the processed data into csv format data

[0150] 5. Call the download function to save the csv package to the user's local computer.

[0151] In this embodiment, the file management method includes at least the following functions and advantages:

[0152] 1. Available for Android Java, Flutter and web front-ends;

[0153] 2. Support multiple languages, which is convenient for managing and maintaining files in different languages; it supports online creation / maintenance of multiple languages, and supports batch creation / update of multiple languages;

[0154] 3. Export multiple languages ​​to csv, and support importing csv data into the system;

[0155] 4. Import the multi-language files in the project code into the system, and export the data into multi-language files in the format of the corresponding client; among them, the input and output data are followed and standardized; the input and output of multi-language data on multiple terminals are standardized;

[0156] 5. Version management, sealing the data generated at each stage, and supporting strong binding between data and versions;

[0157] 6. A unified portal for multiple languages ​​is maintained, where staff can use AI to translate documents, which are then checked and corrected by language professionals;

[0158] 7. Reduce workload and error rate, and improve work efficiency.

[0159] like Figure 4 As shown, in this embodiment, a file management system is also proposed, including:

[0160] The judging module 100 is used to judge whether the type of the input file conforms to a preset format, and if so, convert the input file into initial data in a preset format;

[0161] The processing module 200 is used to process the initial data and update the database based on the processed initial data; wherein the processing of the initial data includes: deduplication, consistency check, language screening and format conversion;

[0162] A generating module 300, for generating a data file of a current version based on the updated database;

[0163] The download module 400 is used to obtain the data file of the corresponding version according to the download request and download it.

[0164] In this embodiment, a readable storage medium is further provided, on which a computer program is stored, wherein the computer program implements the file management method mentioned above when executed by a processor.

[0165] In this embodiment, a terminal is also proposed, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the file management method mentioned above is implemented.

[0166] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0167] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0168] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0169] The terms "first", "second", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

Claims

1. A file management method, characterized in that: include: Determine whether the format of the input file conforms to a preset format, and if so, convert the input file into initial data in a preset format; Processing the initial data, and updating the database based on the processed initial data; wherein the processing of the initial data includes: deduplication, consistency check, language screening, and format conversion; Based on the updated database, generate a data file of the current version; According to the download request, the data file of the corresponding version is obtained and downloaded.

2. The file management method according to claim 1, characterized in that: Determining whether the format of the input file meets the requirements includes: According to the actual type or suffix format name of the input file, it is determined whether the input file belongs to the preset format, wherein the preset format includes json format, arb format, xml format and csv format.

3. The file management method according to claim 2, characterized in that: Converting the input file into the initial data in a preset format includes: The input file is parsed in the form of a character string to obtain the initial data; wherein the preset form of the initial data includes js object data and js array object data.

4. The file management method according to claim 1, characterized in that: The deduplication comprises: deduplicating the initial data according to one or / and multiple identification features; The consistency check includes: determining whether the initial data is consistent with the appId of the existing data in the database, and determining whether the appId of the initial data exists in the database; The language screening includes: determining whether the language type corresponding to the initial data is within a defined range; The format conversion includes: converting the initial data into a format required by the database.

5. The file management method according to claim 1, characterized in that: The generation of the data file includes: Check whether new data is generated in the database; At the current time, if new data is generated in the database, checking whether the data in the database is consistent with the data in the data file of the previous version; If there is inconsistency, checking the changes between the data in the database and the data in the previous version of the data file; wherein the changes include addition, update and deletion of data; Converting the data in the database at the current time into the data file of the current version; The version information of the current version of the data file is stored in the version directory of the server.

6. The file management method according to claim 5, characterized in that: Compare the current version of the data file with the previous version of the data file: Convert the newly added data into the incremental file of the current version; The version information of the incremental file is stored in the version directory.

7. The file management method according to claim 6, characterized in that: Downloading the data file includes: After receiving the download request, query the version directory according to the version information of the data file and / or the incremental file to be downloaded; Obtaining location information of the data file or / and the incremental file to be downloaded through the version directory; Read the corresponding data file and send the data file to the front end; After receiving the data file, the front end processes the data file and converts it into a file package; Call the download function to save the file package to the user's local computer.

8. A file management system, characterized in that: include: A judging module, used to judge whether the format of the input file conforms to a preset format, and if so, convert the input file into initial data in a preset format; A processing module, used to process the initial data and update the database based on the processed initial data; wherein the processing of the initial data includes: deduplication, consistency check, language screening and format conversion; A generating module, used for generating a data file of a current version based on the updated database; The download module is used to obtain the data file of the corresponding version according to the download request and download it.

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

10. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the file management method according to any one of claims 1 to 7 is implemented.