File management method, system, device, cluster, product and medium
By building a main directory and configuration files to manage database files, the problem of code repository management systems being unable to uniformly manage file operations across multiple platforms is solved, enabling cross-platform file information access and efficient management.
Patent Information
- Application Number
- CN202410546970.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-10-31
AI Technical Summary
Existing code repository management systems cannot uniformly manage file operations on code repositories by users across multiple platforms, requiring switching between multiple platforms.
By constructing a main directory to display file information from the database and recording user operations in a configuration file, unified management of database files is achieved. This supports the conversion of non-text format files and the formulation of rules, thereby enhancing file inspection capabilities.
Users can access database file information without switching between different platforms, improving the functionality and efficiency of file management.
Smart Images

Figure CN120872902A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more particularly to a file management method, system, device, cluster, product, and medium. Background Technology
[0002] A code repository management system is used to version control, collaborate on, and manage repositories containing source code, documentation, and other related files from software projects. Therefore, during software project development, code repository management facilitates team collaboration and version control, thereby improving development efficiency, ensuring code quality, and reducing code conflicts and errors. Code repository management is a general software project management technology applicable to database system management in many fields, such as data products, web applications, mobile applications, game applications, and artificial intelligence projects. However, existing code repository management systems cannot uniformly manage user operations on code repository files across multiple platforms, requiring switching between platforms. Summary of the Invention
[0003] This application provides a file management method, system, device, cluster, product, and media that allows users to access database file information without switching between different platforms and update the file information recorded in the main directory via configuration files.
[0004] Firstly, a file management method is provided. This method is applied to a database system, which includes multiple files. These files can be data tables, etc. The method includes the following steps:
[0005] The client sends the main directory of the database system. This main directory records file information for the various files within the database system.
[0006] The management system obtains the main directory of the database system and the configuration information of the database. The configuration information records the configuration operations that the user needs to perform on at least one of the multiple files.
[0007] The management system parses the configuration information and updates the file information of the file corresponding to the configuration information in the main directory with the configuration information.
[0008] In the above solution, a main directory is built to display information about the files in the database, and user operations on the database are recorded in a configuration file. The main directory is updated through the configuration file, so users can understand the information about the database files without switching between different platforms and update the file information recorded in the main directory through the configuration file.
[0009] In some possible embodiments, updating the file information of the file corresponding to the configuration information in the main directory with the configuration information includes at least two methods:
[0010] In the first scenario, the main directory includes file structure information, which records the structure of each file in the database system. The configuration information records structure modification information for at least one of the multiple files. Therefore, the file structure modification information recorded in the configuration information can be used to update the file structure information corresponding to the configuration information in the main directory.
[0011] In the second scenario, the main directory also includes operation content information. This operation content records the operations to be performed on the content of each file in the database system. The configuration information records information on modifying the content of at least one of the multiple files. Therefore, the operation content information of the file corresponding to the modification operation information in the main directory can be updated using the modification operation information.
[0012] Using the two methods described above, when modifying the structure or content of files in a database system, the file information corresponding to the configuration information is updated accordingly.
[0013] In some possible embodiments, the method further includes: after obtaining the target settings file in the database, converting the target settings file from Excel format to text format, wherein the target settings file includes at least one of the main directory settings file in the main directory and the incremental directory settings file in the incremental directory.
[0014] Since the code repository management system can only compare text files and not non-text files such as Excel files, the target configuration file needs to be converted from Excel to text format to facilitate comparison.
[0015] In some possible embodiments, at least one of the files in the main directory and the files in the incremental directory is detected using preset rules to determine whether the files in the main directory and the files in the incremental directory conform to the preset rules, and an error report is output for information that does not conform to the preset rules.
[0016] Compared with the existing technology which can only compare text files, the above solution can formulate different rules according to different needs, thereby enabling different checks on files as needed, which greatly improves the functionality of the product.
[0017] In some possible embodiments, the order of configuration operations in the configuration information of each file in the configuration information is determined, and configuration rules for each configuration operation are generated;
[0018] Generate a configuration file, which includes the order of the configuration operations and the configuration rules;
[0019] Configure the corresponding files in the database system using the configuration file.
[0020] Secondly, a file management system is provided. This file management system includes a client and a management system.
[0021] The client is used to send the main directory of the database system, which records file information of the multiple files in the database system.
[0022] The acquisition module is used to acquire the main directory of the database system.
[0023] The acquisition module is used to acquire the configuration information of the database, which records the configuration operations that the user needs to perform on at least one of the multiple files.
[0024] The parsing and updating module is used to parse the configuration information and update the file information of the file corresponding to the configuration information in the main directory with the configuration information.
[0025] The working mechanism of the parsing update module will be explained in detail below, taking into account two different scenarios:
[0026] In the first scenario, the main directory includes file structure information, which records the structure of each file in the database system. The configuration information records structure modification information for at least one of the multiple files. Therefore, the parsing module can be used to update the structure information of the file corresponding to the configuration information in the main directory using the file structure modification information recorded in the configuration information.
[0027] In the second scenario, the main directory also includes operation content information. This operation content records the operations to be performed on the content of each file in the database system. The configuration information records information on performing modification operations on the content of at least one of the multiple files. Therefore, the parsing module can be used to update the operation content information of the file corresponding to the modification operation information in the main directory using the modification operation information.
[0028] In some possible embodiments, the system further includes a conversion module, which converts the target settings file from Excel format to text format after obtaining the target settings file from the database. The target settings file includes at least one of a main directory settings file in the main directory and an incremental directory settings file in the incremental directory.
[0029] Since the code repository management system can only compare text files and not non-text files such as Excel files, the target configuration file needs to be converted from Excel to text format to facilitate comparison.
[0030] In some possible embodiments, the system further includes a detection module that uses preset rules to detect at least one of the files in the main directory and the files in the incremental directory, determines whether the files in the main directory and the files in the incremental directory conform to the preset rules, and outputs an error report for the detected information that does not conform to the preset rules.
[0031] In some possible embodiments, the system further includes a generation module and a configuration module.
[0032] The acquisition module is used to determine the order of configuration operations in the configuration information of each file in the configuration information, and generate configuration rules for each configuration operation;
[0033] The generation module is used to generate a configuration file, which includes the order of the configuration operations and the configuration rules.
[0034] The configuration module is used to configure the corresponding files in the database system using the configuration file.
[0035] Thirdly, a chip system is provided, the chip system including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to perform operational steps as described in any of the methods in the first aspect.
[0036] Fourthly, a computing device is provided, the computing device including a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform operational steps as described in any of the methods in the first aspect.
[0037] Fifthly, a computing device cluster includes at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to perform operational steps as described in any of the methods in the first aspect.
[0038] In a sixth aspect, a computer program product containing instructions is provided, which, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the operational steps of any of the methods described in the first aspect.
[0039] In a seventh aspect, a computer-readable storage medium is provided, including computer program instructions that, when executed by a cluster of computing devices, perform operational steps as described in any of the methods in the first aspect. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the structure of a document management system provided in this application;
[0041] Figure 2 This is a flowchart illustrating a document management method provided in this application;
[0042] Figure 3 This is a flowchart illustrating a method for converting target settings files provided in this application;
[0043] Figure 4 This is a flowchart illustrating a detection method provided in this application;
[0044] Figure 5 This is a flowchart illustrating an automatic packaging method provided in this application;
[0045] Figure 6 This is a schematic diagram of another document management system provided in this application;
[0046] Figure 7 This is a schematic diagram of the structure of a computing device provided in this application;
[0047] Figure 8 This is a schematic diagram of the structure of a computing device cluster provided in this application;
[0048] Figure 9 This is a schematic diagram of another computing device cluster provided in this application. Detailed Implementation
[0049] The following section, with reference to the accompanying diagram, details the development system for data products.
[0050] See Figure 1 , Figure 1 This is a schematic diagram of the structure of a document management system provided in this application. For example... Figure 1 As shown, the document management system of this application includes: a client 100, a management system 200, and a database system 300.
[0051] Client 100 is used to implement human-computer interaction and can be deployed on terminal devices or computing devices. Terminal devices include personal computers, smartphones, wearable devices, handheld processors, tablets, mobile laptops, augmented reality (AR) devices, virtual reality (VR) devices, all-in-one handheld consoles, wearable devices, in-vehicle devices, smart conferencing devices, smart advertising devices, smart home appliances, etc. Smart home appliances can be robot vacuums, robot mops, etc., and are not specifically limited here. Computing devices are described in the next paragraph.
[0052] Client 100 may be software or application running on a terminal device or computing device controlled by the user, such as a personal computer (PC) client, a web client accessed through a browser, an application (APP) client running on a mobile terminal, or a console of a cloud platform. This application does not make any specific limitations.
[0053] Client 100 can also be a client of a cloud platform, such as a cloud platform console. Specifically, it can be a console based on the World Wide Web (web) or a console based on an application programming interface (API). This application does not make any specific limitations.
[0054] The management system 200 can be deployed on computing devices, computing device clusters, or terminal devices. Computing devices include servers, virtual machines, containers, or edge computing devices. Virtual machines and containers both refer to computing systems composed of hardware resources such as computing, storage, and networking that are virtualized through a virtualization platform. Edge computing devices are devices that are closer to the data source and end users, featuring low latency and high bandwidth, such as intelligent routers and edge servers. A computing device cluster may include multiple of the above-mentioned computing devices, such as a data center; this application does not specifically limit this. The description of terminal devices can be found in the foregoing content and will not be repeated here.
[0055] Database system 300 can be deployed on computing devices, computing device clusters, or terminal devices.
[0056] Optionally, the client 100, management system 200, and database system 300 may be deployed on the same computing device; or, the management system 200 and database system may be deployed on the computing device, and the client 100 may be deployed on the terminal device; or, the management system 200 and business system may be deployed on a computing device cluster, and the client 100 may be deployed on the computing device. It should be understood that the above examples are for illustration purposes, and the specific deployment of the client 100, management system 200, and database system 300 may be determined according to the actual application scenario.
[0057] Understandable. Figure 1 The file management system shown is merely a specific example. In practical applications, a file management system can include more devices and systems, such as storage systems, and the number of clients can also be greater. No specific limitations are made here.
[0058] Furthermore, Figure 1 The management system 200 can be further divided into multiple unit modules, for example, such as Figure 1 As shown, the management system 200 includes an acquisition module 210, a parsing and updating module 220, a conversion module 230, a detection module 240, a generation module 250, and a configuration module 260. It should be understood that... Figure 1 This is an exemplary division method. The management system 200 may also include more or fewer units, and this application does not make any specific limitations.
[0059] It needs to be explained that, Figure 1 The structure shown can be an implementation of the management system 200 deployed on a single computing device. When the management system 200 is deployed in a computing device cluster composed of multiple computing devices, different computing devices in the cluster can store instructions for implementing the acquisition module 210, parsing and updating module 220, conversion module 230, detection module 240, generation module 250, and configuration module 260, respectively. For example, computing device A in the cluster stores instructions for the acquisition module 210 and parsing and updating module 220, computing device B stores instructions for the conversion module 230 and detection module 240, and computing device C includes instructions for the generation module 250 and configuration module 260. The above examples are for illustration only and are not specifically limited in this application. Of course, different computing devices can also store the same instructions. For example, computing devices B and D both store instructions for the conversion module 230 and detection module 240, which are used to combine and implement the functions of the parsing and conversion module 230 and detection module 240. This application is not specifically limited in this application.
[0060] In order to make this application better understandable Figure 1Only one client 100 is shown establishing a communication connection with the management system 200. In reality, there may be one or more clients establishing a communication connection with the management system 200. The steps and processes for other clients to communicate with the management system 200 are the same as those for client 100, and will not be repeated here.
[0061] The functions of each unit module in the management system 200 are explained below.
[0062] The acquisition module 210 is used to acquire the main directory of the database system and the configuration information of the database system, determine the order of configuration operations in the configuration information of each file in the configuration information, and generate configuration rules for each configuration operation.
[0063] Database systems typically consist of multiple files, such as table files. When a database system uses a star schema, it often includes a master table and multiple dimension tables. Because database systems are often very large, development often requires multiple developers working simultaneously; therefore, database systems typically include a master directory and incremental directories.
[0064] The main directory is used to record file information for multiple files within the database system. In a specific embodiment, the file information in the main directory may include a main directory setup file and a main directory code file. The main directory setup file can store database system settings, etc., and is typically a non-text file, such as an Excel file. An Excel file is a binary file, and its extension is usually ".xls" or ".xlsx". The main directory code file stores Structured Query Language (SQL) statements used to operate the database system, etc., and is typically a text file, such as an SQL file. An SQL file is a plain text file, and its extension is usually ".sql".
[0065] The main directory settings file can include multiple fields, such as project name, sub-project name, project code, and sub-project code, etc., and each field can include multiple values. For example, the sub-project code field can have values such as 0001, 0010, and 0011, etc.
[0066] Table 1 Main Directory Settings File
[0067] Project Name Sub-project name Project Code Sub-project coding Financial Project 1 Sub-project 1 0001 0001 Financial Project 1 Sub-project 2 0001 0010 Financial Project 1 Sub-project 3 0001 0011
[0068] It is understood that the home directory settings file shown in Table 1 is only a specific example. In actual applications, the home directory settings file may include more, fewer, or other fields, and the values in each field may also be more, fewer, or other values. No specific limitations are made here.
[0069] The main directory code file can contain multiple code statements. Each code statement implements a different function, and the combination of multiple code statements enables the functionality of the database system. For example, the main directory code file can contain two code statements:
[0070] (1) The first code statement can be a statement that creates a table:
[0071] Create table if not exists A(
[0072] company varchar(100), -- defines the company
[0073] `month int` -- defines the month.
[0074] `project varchar(500)` -- defines the project. );
[0076] Here, the first code statement creates table A if it does not already exist. Table A contains three fields: company, month, and project.
[0077] (2) The second code statement can be a statement that creates a view:
[0078] Create view B as
[0079] select com,pro
[0080] from A;
[0081] Here, the second code statement is used to create the B view. The B view includes two fields: company and project.
[0082] In summary, this main directory code file enables the creation of table A and view B. It's important to understand that the main directory code file described above is merely an example; in practical applications, it can include more statements and other types of statements, which are not specifically limited here.
[0083] The incremental directory records configuration information for the database system. In a specific embodiment, the configuration information in the incremental directory may include an incremental directory settings file and an incremental directory code file. The incremental directory settings file can be used to store database system settings, etc., and is typically a non-text file. The incremental directory code file is used to store SQL statements for operating the database system, etc., and is typically a text file. The configuration information in the incremental directory can be used to update file information in the main directory. For example, the incremental directory settings file in the incremental directory can be used to update the main directory settings file in the main directory. Similarly, the incremental directory code file in the incremental directory can be used to update the main directory code file in the main directory.
[0084] An incremental directory setup file is a complete setup file. That is, in addition to the fields in the main directory setup file, the incremental setup file also includes the content that modifies the main directory setup file. For example, when a date field needs to be added to the main directory setup file shown in Table 1, the fields in the incremental directory setup file will include not only the project name, sub-project name, project code, and sub-project code from the main directory setup file, but also the date field to be added in this modification. Therefore, an incremental directory setup file can be:
[0085] Table 2 Incremental Directory Setup File
[0086] Project Name Sub-project name Project Code Sub-project coding date Financial Project 1 Sub-project 1 0001 0001 2024.4.25 Financial Project 1 Sub-project 2 0001 0010 2024.4.28 Financial Project 1 Sub-project 3 0001 0011 2024.4.30
[0087] It is understood that the incremental directory settings file shown in Table 2 is only a specific example. In actual applications, the incremental directory settings file may include more, fewer, or other fields, and the values in each field may also be more, fewer, or other values. No specific limitations are made here.
[0088] An incremental directory code file can include one or more code statements. Besides statements that create tables and views, it can also include statements that modify tables. Specific examples of statements that create tables and views can be found in the descriptions of the first and second code statements above.
[0089] Statements that modify a table can include the following three types:
[0090] (1) Statements that add content to a table. For example, alter table A add subproject varchar(500) is used to add a field named subproject to table A.
[0091] (2) Statements for deleting content from a table. For example, `alter table A drop month` is used to delete the field named "month" from table A.
[0092] (3) Statements that modify content in a table. For example, `alter table A rename column project to subproject` is used to change the key named "project" in table A to a key named "subproject".
[0093] It is understood that the three table modification statements mentioned above are merely specific examples. In actual applications, the type of table to be modified, and the content to be added, deleted, or modified, can be set according to the actual situation, without specific limitations here. Furthermore, "add", "drop", and "rename" are also just specific examples; others can also be used, such as "modify".
[0094] The incremental directory code file is not a complete file; therefore, it only includes statements related to updates. For example, if you want to modify table A based on the main directory code file, the incremental directory code file will only include statements that modify the table, and will not include the data defining tables A and B in the main directory code file (i.e., the first and second code statements).
[0095] The parsing and updating module 220 is used to parse the configuration information and update the file information of the file corresponding to the configuration information in the main directory with the configuration information.
[0096] In one specific embodiment, the parsing and updating module 220 updates the file information of the file corresponding to the configuration information in the main directory using configuration information in at least two ways:
[0097] In the first scenario, the main directory includes file structure information, which records the structure of each file in the database system. The configuration information records structure modification information for at least one of the multiple files. Therefore, the file structure modification information recorded in the configuration information can be used to update the file structure information corresponding to the configuration information in the main directory.
[0098] In the second scenario, the main directory also includes operation content information. This operation content records the operations to be performed on the content of each file in the database system. The configuration information records information on modifying the content of at least one file among multiple files. Therefore, the operation content information of the file corresponding to the modification operation information in the main directory can be updated using the modification operation information.
[0099] In a more specific embodiment, the parsing update module 220 is used to replace the main directory setting file in the main directory with the incremental directory setting file in the incremental directory, and to update the main directory code file in the main directory with the incremental directory code file in the incremental directory. Since the incremental directory setting file in the incremental directory contains all the fields, it can be directly used to replace the main directory setting file in the main directory. However, the incremental directory code file is not a complete file and cannot be used to replace the main directory code file in the main directory. Therefore, the parsing update module 220 can update the main directory code file in the main directory using the incremental directory code file in the incremental directory in the following way:
[0100] The parsing update module 220 determines whether the keywords in the found incremental directory code files are of the first type or the second type. First-type keywords can include "createtable" in statements that create tables and "view" in statements that create views, etc. Second-type keywords can include "altertable" in statements that modify tables, etc. Statements corresponding to first-type keywords can contain both structural modification information and modification operation information.
[0101] If the parsing update module 220 determines that the keyword in the found incremental directory code file is a first-class keyword, it copies the statement containing the first-class keyword to the main directory code file.
[0102] Since the main directory code file does not contain corresponding code statements for creating new tables and views, you can simply copy the statements containing the first type of keywords into the main directory code file. For example, suppose the main directory code file includes the statements for creating tables A and B as described above, and the incremental directory code file also contains two code statements: a statement to create a table named C and a statement to create a view named D.
[0103] (1) The statement to create a table named C:
[0104] Create table if not exists C(
[0105] payment numeric -- defines the expenditure
[0106] Income numeric -- defines income
[0107] This statement creates table C if it does not already exist. Table C contains two fields: payment and income.
[0108] (2) The statement to create a view named D:
[0109] Create view D as
[0110] select payment
[0111] from C;
[0112] This statement is used to create view D. View D includes one field, which is the payment field from table C.
[0113] Therefore, in the main directory code file containing the statements of the first type of keywords, you can copy the statement to create a table named C and the statement to create a view named D to the end of the main directory code file, resulting in the updated main directory code file as shown below:
[0114] Create table if not exists A(
[0115] company varchar(100), -- defines the company
[0116] `month int` -- defines the month.
[0117] `project varchar(500)` -- defines the project. );
[0119] Create view B as
[0120] select com,pro
[0121] from A;
[0122] Create table if not exists C(
[0123] payment numeric -- defines the expenditure
[0124] Income numeric -- defines income );
[0126] Create table if not exists C(
[0127] payment numeric -- defines the expenditure
[0128] Income numeric -- defines income );
[0130] Create view D as
[0131] select payment
[0132] from C;
[0133] It is understandable that, in addition to copying the statement for creating a table named C and the statement for creating a view named D to the end of the main directory code file, the statement for creating a table named C and the statement for creating a view named D can also be copied to other places in the main directory code file, such as the beginning of the main directory code file, etc., without making any specific restrictions here.
[0134] When the parsing update module 220 determines that the keyword in the found incremental directory code file is a second type of keyword, it modifies the main directory code file according to the statement containing the second keyword to obtain the updated main directory code file.
[0135] Corresponding to the three statements that modify the table, the parsing and updating module 220 modifies the main directory code file according to the statement containing the second keyword, including at least the following three methods:
[0136] (1) Corresponding to the statement that adds content to the table, the parsing update module 220 can modify the main directory code file based on the statement containing the second keyword to obtain the updated main directory code file. Here, the statement that adds content to the table includes structural modification information and modification operation information.
[0137] First, the parsing update module 220 can use the first regular expression to extract the table name and the added content from the statement containing the second keyword. For example, with the second keyword being "alter table", the first regular expression can be expressed as:
[0138] alter table\s+(\w+)\s+add\s+(\w+)
[0139] Among them, altertable is used to match the string "altertable", (\w+) is used to capture one or more letters, numbers or underscores, add is used to match the string "add", and \s+ is used to match one or more whitespace characters.
[0140] Therefore, taking the statement containing the second keyword as alter table A add subproject varchar(500); as an example, the parsing update module 220 uses the first regular expression to search the statement containing the second keyword, and will extract the table name A and the added field subproject.
[0141] Then, the parsing and updating module 220 searches the main directory code file based on the table name to find the statement that creates the table. Here, a second regular expression containing the table name and "create table" can be used to search the main directory code file. The second regular expression can be:
[0142] create table\s+(if not exists)? \s+(\w+)\s+(\w+)
[0143] Among them, `create table` is used to match the string "create table", `(\w+)` is used to capture one or more letters, numbers, or underscores, `\s+` is used to match one or more whitespace characters, and `(if not exists)?` is used to capture zero or one string "if not exists".
[0144] Taking the main directory code file in the example above as an example, using the second regular expression to search in the main directory code file will find the statement "create table if not exists A", thus finding the table creation statement that creates table A.
[0145] Finally, add "subproject varchar(500)" to the last line of the table creation statement for table A, thereby updating the table creation statement for table A to:
[0146] Create table if not exists A(
[0147] company varchar(100), -- defines the company
[0148] `month int` -- defines the month.
[0149] project varchar(500), -- defines the project
[0150] `subproject varchar(500)` -- defines a subproject. );
[0152] After the update, a line "subprojectvarchar(500) -- defines a subproject" has been added to the table creation statement of table A in the main directory code file, while other statements in the main directory code file can remain unchanged.
[0153] (2) Corresponding to the statement that deletes content in the table, the parsing update module 220 can modify the main directory code file based on the statement containing the second keyword to obtain the updated main directory code file. Here, the statement that deletes content in the table includes structural modification information and modification operation information.
[0154] First, a third regular expression can be used to extract the table name and deleted content from the statement containing the second keyword. For example, with the second keyword "alter table", the third regular expression can be expressed as:
[0155] alter table(\w+)\s+drop\s+(\w+)
[0156] Among them, altertable is used to match the string "altertable", (\w+) is used to capture one or more letters, numbers or underscores, drop is used to match the string "drop", and \s+ is used to match one or more whitespace characters.
[0157] Therefore, taking the statement containing the second keyword, "alter table A drop month," as an example, the parsing and update module 220 uses the third regular expression to search the statement containing the second keyword, and will extract the table name "Atable" and the deleted content "mon."
[0158] Then, search the main directory code file for the table name to find the statement that creates the table. Here, you can use a fourth regular expression containing the table name and "create table" to search the main directory code file. The fourth regular expression can be:
[0159] create table\s+(if not exists)? \s+(\w+)\s+(\w+)
[0160] Among them, `create table` is used to match the string "create table", `(\w+)` is used to capture one or more letters, numbers, or underscores, `\s+` is used to match one or more whitespace characters, and `(if not exists)?` is used to capture zero or one string "if not exists".
[0161] Therefore, taking the main directory code file in the example above as an example, using the fourth regular expression to search in the main directory code file will find the statement "create table if not exists A", thus finding the table creation statement that creates table A.
[0162] Finally, locate the row containing the deleted content in the table creation statement of table A, delete the entire row, and update the table creation statement of table A as follows:
[0163] Create table if not exists A(
[0164] company varchar(100), -- defines the company
[0165] `project varchar(500)` -- defines the project. );
[0167] After the update, a line was deleted from the table creation statement for table A in the main directory code file. ", while other statements in the main directory code file can remain unchanged.
[0168] (3) Corresponding to the statement that modifies the content in the table, the parsing update module 220 can modify the main directory code file according to the statement containing the second keyword to obtain the updated main directory code file. Here, the statement that modifies the content in the table contains information about the modification operation.
[0169] First, we can use the fifth regular expression to extract the table name, the content before modification, and the content after modification from the statement containing the second keyword. For example, with the second keyword being "alter table", the fifth regular expression can be represented as:
[0170] alter table(\w+)\s+rename column\s+(\w+)\s+to\s+(\w+)
[0171] Among them, altertable is used to match the string "altertable", (\w+) is used to capture one or more letters, numbers or underscores, rename is used to match the string "rename", and \s+ is used to match one or more whitespace characters.
[0172] Therefore, taking the statement containing the second keyword, "alter table Arename column project tosubproject", as an example, the parsing and update module uses the fifth regular expression to search the statement containing the second keyword, and will extract the table name A, the content before modification "pro", and the content after modification "subproject".
[0173] Then, search the main directory code file for the table name to find the statement that creates the table. Here, you can use the sixth regular expression, which contains the table name and "create table", to search the main directory code file. The sixth regular expression can be:
[0174] create table\s+(if not exists)? \s+(\w+)\s+(\w+)
[0175] Among them, `create table` is used to match the string "create table", `(\w+)` is used to capture one or more letters, numbers, or underscores, `\s+` is used to match one or more whitespace characters, and `(if not exists)?` is used to capture zero or one string "if not exists".
[0176] Therefore, taking the main directory code file in the example above as an example, using the sixth regular expression to search in the main directory code file will find the statement "create table if not exists A", thus finding the table creation statement that creates table A.
[0177] Finally, find the original content in the CREATE TABLE statement for table A, and change it to the updated content, thus updating the CREATE TABLE statement for table A as follows:
[0178] Create table if not exists A(
[0179] company varchar(100), -- defines the company
[0180] `month int` -- defines the month.
[0181] subproject varchar(500) -- defines the project );
[0183] After the update, in the table creation statement of table A in the main directory code file, "project" is changed to "subproject", while other statements in the main directory code file can remain unchanged.
[0184] The conversion module 230 is used to convert the target settings file from Excel format to text format after obtaining the target settings file from the database. The target settings file includes at least one of a main directory settings file in the main directory and an incremental directory settings file in the incremental directory.
[0185] When developing using a code repository management system, the development process assumes that the source code, documentation, and other related files in the database system are all in text file format. Therefore, the code repository management system can only compare text files and cannot compare non-text files, such as Excel files, image files, and video files. In other words, the code repository management system can only compare text files in the database system, such as main directory code files and incremental directory code files, and cannot compare non-text files in the database system, such as main directory configuration files and incremental directory configuration files.
[0186] To solve this problem, the conversion module 230 needs to convert the target settings file from Excel format to text format. In a specific embodiment, the conversion module 230 converts the target settings file from Excel format to text format by including the following steps:
[0187] First, the conversion module 230 obtains the file path and file name of the target settings file.
[0188] The filename of the target configuration file is its identifier. For example, target configuration file 1 is named target configuration file 1.xls, target configuration file 2 is named target configuration file 2.xls, and target configuration file 3 is named target configuration file 3.xls. This means that when the target configuration files are further subdivided, the home directory configuration file 1 is named home directory configuration file 1.xls, the home directory configuration file 2 is named home directory configuration file 2.xls, and the home directory configuration file 3 is named home directory configuration file 3.xls; similarly, the incremental directory configuration file 1 is named incremental directory configuration file 1.xls, the incremental directory configuration file 2 is named incremental directory configuration file 2.xls, and the incremental directory configuration file 3 is named incremental directory configuration file 3.xls.
[0189] The file path of the target configuration file is used to indicate the location of the target configuration file, starting from the root directory and listing the folder names level by level. The following example illustrates this: the database system includes a main directory and incremental directories. The main directory stores the main directory configuration file and the main directory code file, while the incremental directories store the incremental directory configuration file and the incremental directory code file. Therefore, when the target configuration file's file path is the main directory configuration file, the file path is "\main directory\main directory configuration file.xls"; when the target configuration file's file path is the incremental directory configuration file, the file path is "\incremental directory\incremental directory configuration file.xls".
[0190] The conversion module 230 may obtain the file path of the target configuration file of the database system in the following ways:
[0191] (1) The conversion module 230 obtains the file path of the target configuration file of the database system, which is manually input. Here, the conversion module 230 can obtain the file path of the target configuration file of the database system input by the user through the human-computer interaction interface, or it can obtain the file path of the target configuration file of the database system input by the user from the conversion configuration file. The file path of the target configuration file of the database system in the conversion configuration file is pre-input by the user.
[0192] (2) The conversion module 230 locates the file path of the target configuration file of the database system by scanning. For example, the conversion module 230 can scan files with the extension ".xls" in the database folder to obtain the file path of the target configuration file of the database system.
[0193] It is understood that the two methods mentioned above are merely examples. In practical applications, other methods can be used to obtain the file path of the target settings file of the database system, which are not specifically limited here.
[0194] Secondly, the conversion module 230 extracts the main fields from the target settings file.
[0195] The primary field can be any field in the target configuration file. Taking the Excel file shown in Table 1 as an example, the primary field can be any of the following: Project Name, Sub-project Name, Project Code, and Sub-project Code, etc. However, for ease of use later, it's preferable to choose a field with multiple distinct values as the primary field. For example, if the three values for the Sub-project Name are Sub-project 1, Sub-project 2, and Sub-project 3, all of which are different, then Sub-project Name can be chosen as the primary field. Conversely, if the three keys for the Project Name are Financial Project 1, Financial Project 1, and Financial Project 1, all of which have the same value, then Project Name should be avoided as the primary field. Similarly, Sub-project Code can be preferred as the primary field, while Project Code should be avoided.
[0196] The conversion module 230 may extract the following main fields from the target settings file:
[0197] (1) The conversion module 230 extracts all fields from the target settings file and sends each field to the user, who then selects one or more fields as the main field. The conversion module 230 can extract all fields from the target settings file using, for example, the SQL statement "select column_name from 'table'".
[0198] (2) The conversion module 230 obtains the position of the main field in the target settings file from the conversion configuration file, and then extracts the main field from the target settings file according to its position. The user can pre-input the position in the target settings file from which to obtain the main field, as specified in the conversion configuration file.
[0199] It is understandable that the above example of extracting the main field from the target settings file is merely a specific example. In practical applications, other methods can also be used, which are not specifically limited here.
[0200] Then, the conversion module 230 obtains the output path.
[0201] The output path is the path where the target settings file will be stored after being converted from Excel format to text format. The output path can be an existing path or a newly created path. For example, when the output path is an existing path, it can be "\Home Directory\" or "\Incremental Directory\", etc. When the output path is a new path, it can be "\New Directory\", etc.
[0202] The conversion module 230 may obtain the output path in the following ways: It may obtain the output path input manually. Specifically, the conversion module 230 can obtain the output path input by the user through a human-computer interaction interface, or it can obtain the manually input output path from a conversion configuration file. The output path in the conversion configuration file is pre-input by the user.
[0203] Finally, the conversion module 230 converts the target settings file of the database from Excel format to text format based on the main field.
[0204] Text formats are file formats that are easy for humans to read. For example, they can include human-readable language (YAML) files, JavaScript object notation (JSON) files, extensible markup language (XML) files, comma-separated values (CSV) files, text (TXT) files, hypertext markup language (HTML) files, markup language (Markdown) files, and so on.
[0205] The conversion module 230 can convert the target configuration file from Excel format to text format using a conversion tool and based on the main field. The conversion tool can include a Hex editor, the OPEN function in the Python programming language, or a specific conversion tool. Specific conversion tools can include excel2yaml, Bin2Txt, Bin2TxtConverter, etc. The same target configuration file can produce different file formats when using different conversion tools. For example, if the target configuration file is in Excel format and needs to be converted to YAML format, the excel2yaml tool can be used to convert it. The input parameters of the excel2yaml tool include: input path, worksheet name, header row, output path, etc. The input path is the file path of the target configuration file to be converted. The output path is the save path of the generated YAML format target configuration file. The worksheet name is the worksheet name specified in the Excel format target configuration file to be converted. The header row specifies which row or column in the Excel format target configuration file will be used as the section name in the YAML format target configuration file. Therefore, the file path of the obtained Excel-formatted target settings file is used as the input path, the file name of the obtained target settings file is used as the worksheet name, the obtained main field is used as the header row, and the obtained output path is used as the path of the YAML-formatted target settings file. The excel2yaml tool is called to convert the target settings file from Excel format to text format and save it according to the output path. If the output path already exists in the directory, it is entered; otherwise, the directory is created and entered.
[0206] The following example uses the sub-item codes in the target settings file of Table 1 as the main field to illustrate the conversion of the target settings file shown in Table 1 from Excel format to YAML format using the excel2yaml tool. Since the sub-item codes include three values, "0001", "0010", and "0011", three text files can be generated: "0001.yaml", "0010.yaml", and "0011.yaml".
[0207] The text file “0001.yaml” converts the contents of the configuration file, including “Project Name: Financial Project 1”, “Sub-project Name: Sub-project 1”, “Project Code: 0001”, and “Sub-project Code: 0001”, into YAML format.
[0208] The text file “0010.yaml” converts the contents of the configuration file, including “Project Name: Financial Project 1”, “Sub-project Name: Sub-project 2”, “Project Code: 0001”, and “Sub-project Code: 0010”, into YAML format.
[0209] The text file “0011.yaml” converts the contents of the configuration file, including “Project Name: Financial Project 1”, “Sub-project Name: Sub-project 3”, “Project Code: 0001”, and “Sub-project Code: 0011”, into YAML format.
[0210] It is understandable that the text format obtained by the above conversion is merely a specific example. In practical applications, the text format obtained by conversion can be in other ways. The above example is based on the premise that all values of the primary key field are different. If the primary key field contains the same value, then the corresponding text files will be merged together. For example, if the above example uses the project name as the primary key field, since all values in the project name are the same, then only one text file will be generated. This text file will convert the entire contents of the target settings file, "Project Name: Financial Project 1", "Sub-project Name: Sub-project 1", "Project Code: 0001" and "Sub-project Code: 0001", "Project Name: Financial Project 1", "Sub-project Name: Sub-project 2", "Project Code: 0001" and "Sub-project Code: 0010", "Project Name: Financial Project 1", "Sub-project Name: Sub-project 2", "Project Code: 0001" and "Sub-project Code: 0011", into YAML format.
[0211] This example only demonstrates the conversion of the main directory configuration file. In practical applications, all main directory configuration files and incremental directory configuration files can be converted to obtain text-formatted versions of both. After obtaining these text-formatted versions, the automatic comparison function of existing code repository management systems can be used to compare them.
[0212] In the example above, the file path and filename of the target settings file are sent by the client to the conversion module 230. In practical applications, they can also be preset in the conversion module 230, or the file path and filename of the target settings file can be defaulted. No specific limitation is made here.
[0213] The detection module 240 is used to detect at least one of the files in the main directory and the incremental directory using preset rules, determine whether the files in the main directory and the incremental directory conform to the preset rules, and output an error report for the detected information that does not conform to the preset rules.
[0214] The detection module 240 can detect at least one of the files in the main directory and the incremental directory using preset rules in the following ways:
[0215] First, the detection module 240 obtains the preset rules.
[0216] Rules can be implemented using detection classes. For example, there can be one or more rules, and each rule can be a detection class, the code of which can be stored in a text file. This detection class can include class properties, methods, and constructors, etc. Rules are represented through one or more of the detection class's properties, methods, and constructor. For instance, suppose the rule is to check for the presence of the sensitive word A. Then, a sensitive word detection class can be set up, and its methods can contain code that "detects whether the text file contains the sensitive word A; if it contains A, then indicates the presence of sensitive word A; if it does not contain A, then indicates that sensitive word A does not exist." Rules can be written by the user as needed; the user can write as many rules as they require.
[0217] The detection module 240 can acquire rules in the following ways:
[0218] (1) The detection module 240 obtains the rules from the compressed package.
[0219] The detection module 240 can package the text files containing the detection classes corresponding to multiple rules into a compressed package, such as a JAR file, and store it in a specified location, recording the storage location in the detection configuration file. When a rule needs to be used, the path of this compressed package is obtained from the detection configuration file, a new class loader is created using the URLClassLoader class, and the path of the compressed package is used as a parameter for this new class loader. Then, using Java reflection, the class is loaded using the Class.forName() method based on the fully qualified class name in the text file within the compressed package.
[0220] (2) The detection module 240 obtains rules from the detection configuration file.
[0221] The detection module 240 can write multiple rules in the detection configuration file. When a rule needs to be used, the code repository management system can read the class in the detection configuration file through Java's Properties class, and load the class using the Class.forName() method based on the fully qualified class name in the detection configuration file through Java reflection.
[0222] (3) The detection module 240 retrieves rules from the database.
[0223] The code repository management system stores the detection classes corresponding to multiple rules in a specified location in the database, and records the specified location in the detection configuration file. When a rule needs to be used, the code repository management system can connect to the database using Java Database Connectivity (JDBC). Then, based on the specified location in the detection configuration file, it uses an SQL query to retrieve the fully qualified name of the detection class from the specified location in the database and stores the fully qualified name of the detection class in an object. Finally, it retrieves the fully qualified name of the detection class from the object and loads the class using the `Class.forName()` method.
[0224] It is understandable that the above methods of obtaining rules are merely specific examples. In practical applications, rules can be obtained in many other ways, such as through application programming interfaces (APIs).
[0225] Secondly, the detection module 240 obtains the path of the file to be tested.
[0226] The files to be tested may include one or more of the following: a text-formatted main directory settings file and a main directory code file in the main directory; and a text-formatted incremental directory settings file and an incremental directory code file in the incremental directory.
[0227] The path to the file to be tested and the file path to the target settings file are similar. For details, please refer to the information regarding the file path of the target settings file.
[0228] The detection module 240 can obtain the path of the file to be tested in the following ways: the detection module 240 obtains the path of the file to be tested that is manually entered. Here, the detection module 240 can obtain the path of the file to be tested that is entered by the user through a human-computer interaction interface, etc.
[0229] Finally, the detection module 240 uses the acquisition rules to detect the files corresponding to the paths of the files under test and obtains the output results.
[0230] Since the detection class corresponding to the rule has already been loaded, we can continue to create instances of the detection class and call the methods in the detection class to detect the files corresponding to the paths of the files to be tested.
[0231] The output can include the rule name and the detection result. The rule name reflects the item being detected; for example, the rule name could be a duplicate rule, an error word rule, etc. A duplicate rule detects duplicate words, while an error word rule detects errors. The detection result indicates whether the detection passed. Optionally, the detection result may also include the location of the error, etc. It is understood that the above rules and detection results are merely specific examples; in practical applications, more, fewer, or other rules and detection results may be included.
[0232] The output results can include the following implementation forms:
[0233] (1) The output can be the name of the rule and the detection result.
[0234] (2) The output can be a report template obtained by filling in the rule name and detection results, etc., into the error template. The report template can include fixed items and fillable items. The content of the fixed items is unchanged, and users can set the content and format of the fixed items as needed. The fillable items are used to fill in the rule name and detection results, etc.
[0235] (3) The output results can include the name of the rule, the detection result, and the statistical results obtained after statistical analysis of the detection result. For example, the total number of rules with a detection result of failure and the number of rules with a detection result of failure in each category can be counted, and the proportion of rules with a detection result of failure in each category can be calculated and a pie chart can be drawn accordingly.
[0236] It is understood that the above-mentioned output results are only specific implementations. In actual applications, there may be fewer or more or other implementations. For example, implementations (2) and (3) can be combined. That is, the name of the rule and the detection results are filled into the error template to obtain the report template, and the statistical results are obtained after statistical analysis of the detection results. The report template and the statistical results are then displayed to the user.
[0237] When the detection module 240 needs to add, remove, or modify rules, it can do so in the following ways:
[0238] (1) Corresponding to the acquisition method (1) of the rules obtained by the detection module 240, the detection module 240 may add, reduce, or modify rules in the following ways. Specifically,
[0239] When adding rules, a new text file can be added, containing the code for the new detection class. Then, the new text file and the original text file containing the old detection class code are packaged together into a new compressed file, replacing the old one. Finally, Java reflection is used to retrieve the rules again.
[0240] When you need to reduce the number of rules, locate the text file containing the detection classes of the rules that need to be reduced and delete it. Then, package the remaining text files corresponding to the detection classes into a new compressed file, replace the old compressed file with the new one, and then use Java's reflection mechanism to retrieve the rules again.
[0241] When rules need to be modified, locate the text file containing the detection class whose rules need modification. Open the text file and modify at least one of the attributes, methods, and constructors in the code of the detection class to obtain a new text file. Then, package the new text file and the text files corresponding to the remaining detection classes together into a new compressed package, replace the old compressed package with the new one, and then re-use Java's reflection mechanism to obtain the rules.
[0242] (2) Corresponding to the acquisition method (2) of the rules obtained by the detection module 240, the detection module 240 may add, reduce, or modify rules in the following ways. Specifically,
[0243] When you need to add rules, you can open the detection configuration file, add the code for the new detection class to the detection configuration file, and then read the class in the detection configuration file again through Java's Properties class. Then, use Java's reflection mechanism to load the class using the Class.forName() method based on the fully qualified name of the class in the detection configuration file.
[0244] When you need to add a rule, you can open the detection configuration file, find the code corresponding to the detection class of the rule that needs to be reduced in the detection configuration file, delete the code from the detection configuration file, and then read the class in the detection configuration file again through Java's Properties class. Then, use Java's reflection mechanism to load the class using the Class.forName() method based on the fully qualified name of the class in the detection configuration file.
[0245] When it is necessary to modify the rules, you can open the detection configuration file, find the code corresponding to the detection class of the rule that needs to be modified in the detection configuration file, and modify at least one of the properties, methods and constructors in the code. Then, read the class in the detection configuration file again through Java's Properties class, and use the Class.forName() method to load the class based on the fully qualified name of the class in the detection configuration file through Java's reflection mechanism.
[0246] (3) Corresponding to the acquisition method (3) of the rules obtained by the detection module 240, the detection module 240 may add, reduce, or modify rules in the following ways. Specifically,
[0247] When rules need to be added, the code for the new detection class can be added to a specified location in the database using SQL statements. This allows the code repository management system to reconnect to the database using Java Database Connectivity (JDBC). Then, based on the specified location in the detection configuration file, it uses an SQL query to retrieve the fully qualified class names of the detection classes, including the newly added detection class, from the specified location in the database and stores these fully qualified class names in an object. Finally, it retrieves the fully qualified class names of the detection classes, including the newly added detection class, from the object and loads the class using the `Class.forName()` method.
[0248] When a rule needs to be deleted, the code of the detection class to be deleted can be located using SQL statements and removed from the specified location in the database. This allows the code repository management system to reconnect to the database using Java Database Connectivity (JDBC). Then, based on the specified location in the detection configuration file, it uses an SQL query to retrieve the fully qualified class names of the remaining detection classes from the specified location in the database and stores these fully qualified class names in an object. Finally, it retrieves the fully qualified class names of the remaining detection classes from the object and loads the classes using the `Class.forName()` method.
[0249] When rules need to be modified, the code of the detection class to be modified can be located in a specified location in the database using SQL statements. At least one of the attributes, methods, and constructors in that code can then be modified using SQL statements. This allows the code repository management system to reconnect to the database using Java Database Connectivity (JDBC). Then, based on the specified location in the detection configuration file, it uses an SQL query to retrieve the fully qualified class name of the detection classes, including the modified detection class, from the specified location in the database and stores the retrieved fully qualified class name in an object. Finally, it retrieves the fully qualified class name of the detection classes, including the modified detection class, from the object and loads the class using the `Class.forName()` method.
[0250] It is understood that the above-mentioned addition, reduction or modification of rules are only specific examples. In actual applications, there can be more ways to add, reduce or modify rules. When the detection module 240 obtains rules in other ways, there can also be more ways to add, reduce or modify rules.
[0251] The generation module 250 is used to generate a configuration file. This configuration file includes the order of configuration operations and the configuration rules. Before generating the configuration file, file information needs to be obtained from the packaged file, and then the order of configuration operations and the configuration rules are determined based on this file information.
[0252] The process of packaging the files to obtain a pre-packaged file is as follows:
[0253] First, obtain the files that need to be packaged, the packaging order, the output names, and the mapping rules from the database system.
[0254] The files that need to be packaged can be part or all of the main directory settings file, main directory code file in the main directory, incremental directory settings file, and incremental directory code file in the incremental directory.
[0255] The files to be packaged can be obtained as follows: Obtain the path to the files to be packaged and their file types from the deployment configuration file. Then, locate the corresponding directory based on the path of the files to be packaged, and check if a file with the same file type as the files to be packaged exists in that directory. If so, retrieve it as the file to be packaged. The path to the files to be packaged and their file types can be manually entered beforehand.
[0256] The packaging order at least indicates the sorting of the main directory code files and incremental directory code files in the resulting compressed archive. The sorting of the main directory code files and incremental directory code files in the compressed archive is the same as the sorting of the main directory code files and incremental directory code files obtained after decompression. The sorting of the decompressed main directory code files and incremental directory code files is the execution order of these main directory code files and incremental directory code files. For example, assuming the packaged files include main directory code file 1, incremental directory code file 1, and incremental directory code file 2, then the packaging order could be main directory code file 1, incremental directory code file 1, and incremental directory code file 2. The packaging order can also indicate the sorting of the main directory settings files and incremental directory settings files in the resulting compressed archive. Furthermore, the main directory code files and incremental directory code files can be sorted separately, the main directory settings files and incremental directory settings files can be sorted separately, or a combination of main directory settings files, main directory code files, incremental directory settings files, and incremental directory code files can be sorted together.
[0257] The packaging order can be obtained from the deployment configuration file. The packaging order in the deployment configuration file can be manually pre-entered.
[0258] The output name is the filename of the compressed package obtained from packaging, or it can be the name of the folder obtained from decompressing the compressed package.
[0259] The output name can be obtained from the deployment configuration file. The output name in the deployment configuration file can be manually entered beforehand.
[0260] Mapping rules are used to indicate the mapping relationship between the main directory setup files and incremental directory setup files applicable to the test environment and the main directory setup files and incremental directory setup files applicable to the production environment. For example, a mapping rule can include multiple mapping relationships, each representing the correspondence between values in the main directory setup file for the test environment and values in the incremental directory setup file for the production environment. Taking the main directory setup files shown in Table 1 as an example, the mapping rule can include two mapping relationships: the first is project code "0001" -> project code "1", where project code "0001" is the value in the main directory setup file for the test environment, project code "1" is the value in the main directory setup file for the production environment, and "->" indicates that they have a corresponding relationship; the second mapping relationship is project name "Financial Project 1" -> project name "Project 1", where project name "Financial Project 1" is the value in the main directory setup file for the test environment, and project name "Project 1" is the value in the main directory setup file for the production environment, and "->" indicates that they have a corresponding relationship. It is understood that the mapping rules are merely specific examples. In practical applications, mapping rules may include more or fewer mapping relationships, and the content of the mapping relationships may also be other than that specified here.
[0261] Mapping rules can be obtained from the deployment configuration file. These mapping rules can be manually entered beforehand.
[0262] Secondly, the main directory setup files and incremental directory setup files used for the test environment are converted into main directory setup files and incremental directory setup files used for the production environment according to the mapping rules. For example, the first mapping relationship in the mapping rules is obtained. Based on the first mapping relationship, the value in the main directory setup file used for the test environment that is the same as the value in the main directory setup file used for the test environment in the first mapping relationship (that is, the value to the left of the -> symbol in the first mapping relationship) is found. Then, the found value is replaced with the value in the main directory setup file used for the production environment in the first mapping relationship (that is, the value to the right of the -> symbol in the first mapping relationship). Then, the second mapping relationship is found, and the above operation is repeated until all mapping relationships are traversed. Taking the main directory setup file shown in Table 1 as the main directory setup file used for the test environment, and the mapping rule as mentioned above, the project code "0001" in Table 1 can be replaced with the project code "1", and the project name "Financial Project 1" in Table 1 can be replaced with the project name "Project 1", resulting in the main directory setup file used for the production environment shown in Table 3.
[0263] Table 3 shows the main directory setup file for the production environment.
[0264] Project Name Sub-project name Project Code Sub-project coding Project 1 Sub-project 1 1 0001 Project 1 Sub-project 2 1 0010 Project 1 Sub-project 3 1 0011
[0265] It is understood that the above-mentioned main directory setup file for the production environment is merely a specific example. In actual applications, the main directory setup file for the production environment may include more tables, and the tables in the main directory setup file may include more or fewer keys and values. No specific limitations are made here.
[0266] Finally, the obtained files that need to be packaged are packaged in the order they were packaged to obtain a compressed package named the output name. Specifically, the first file to be packaged is obtained, and its "original filename 1" is modified to "serial number + original filename 1". The serial number can be set to an initial value. The serial number is incremented by 1. Then, the second file to be packaged is obtained, and its "original filename 2" is modified to "serial number + original filename 2", and so on, until the filenames of all files to be packaged have been modified. Finally, all the files to be packaged are packaged into a compressed package, and the compressed package name is set as the output name. Here, adding a serial number to the beginning of the filenames of the files to be packaged is to ensure that the files in the resulting folder are in the same order as when the compressed package is decompressed. For example, suppose the files to be packaged include main directory code file 1, main directory code file 2, and main directory code file 3, and the packaging order is main directory code file 1, main directory code file 2, and main directory code file 3. Therefore, the filename of the main directory setting file in the compressed package will be renamed to "1 + Main Directory Code File 1", the filename of main directory code file 2 will be renamed to "2 + Main Directory Code File 2", and the filename of main directory code file 3 will be renamed to "3 + Main Directory Code File 3". After decompressing the compressed package, since the files are sorted alphabetically by their filenames, the decompressed folder will be sorted by filename as "1 + Main Directory Code File 1", "2 + Main Directory Code File 2", and "3 + Main Directory Code File 3". Thus, the decompressed files will be ordered as Main Directory Code File 1, Main Directory Code File 2, and Main Directory Code File 3. When running the data product, Main Directory Code File 1 will be run first, followed by Main Directory Code File 2 and then Main Directory Code File 3 in sequence.
[0267] It is understood that the above example merely illustrates the packaging process for a set of code files. In practical applications, incremental directory code files, main directory configuration files, and incremental directory configuration files can be packaged in the same way as the main directory code files. Furthermore, the number of files packaged can be more or less, and the packaging order can also be different; no specific limitations are made here.
[0268] Configuration module 260 is used to configure the corresponding files in the database system using configuration files.
[0269] See Figure 2 , Figure 2 This is a flowchart illustrating a document management method provided in this application. Figure 2 As shown, the document management method of this application includes:
[0270] S101: The client sends the main directory and incremental directory to the management system. Correspondingly, the management system receives the main directory and incremental directory sent by the client.
[0271] The main directory records file information for multiple files within the database system. The incremental directory records the database system's configuration information. Detailed definitions of the main and incremental directories, the files they contain, their formats, and their contents can be found in [link to documentation]. Figure 1 The relevant descriptions in the illustrated embodiments will not be repeated here.
[0272] S102: The management system retrieves files from the main directory based on the main directory.
[0273] The main directory can contain main directory configuration files and main directory code files. The main directory configuration file can be a non-text file, while the main directory code file can be a text file. The main directory configuration file can include multiple fields. The main directory code file can include multiple code statements. Each code statement implements a different function; the combination of multiple code statements enables the functionality of the database system. For details on the contents of the main directory configuration file and the main directory code file, please refer to [link to relevant documentation]. Figure 1 And related descriptions, which will not be elaborated here.
[0274] S103: The management system obtains the configuration information of the database system based on the incremental catalog.
[0275] The configuration information records the configuration operations that the user needs to perform on at least one of several files. This configuration information is primarily stored in the incremental directory. The configuration information in the incremental directory can include incremental directory setup files and incremental directory code files. The incremental directory setup files can store database system settings, etc., and are typically non-text files. The incremental directory code files store SQL statements for operating the database system, etc., and are typically text files. For details on the contents of the incremental directory setup files and incremental directory code files, please refer to [link to documentation / reference]. Figure 1 And related descriptions, which will not be elaborated here.
[0276] S104: The system parses the configuration information and updates the file information of the corresponding file in the main directory with the configuration information.
[0277] Since the incremental directory settings file in the incremental directory contains all fields, it can be used directly to replace the main directory settings file in the main directory. However, the incremental directory code file is not a complete file and cannot be used to replace the main directory code file in the main directory. Therefore, the main directory code file in the main directory can be updated using the incremental directory code file in the incremental directory in the following way:
[0278] The management system can parse incremental directory code files and update the main directory code files in the main directory with the incremental directory code files, which may include the following:
[0279] In the first scenario, the main directory includes file structure information, which records the structure of each file in the database system. The configuration information records structure modification information for at least one of the multiple files. Therefore, the file structure modification information recorded in the configuration information can be used to update the file structure information corresponding to the configuration information in the main directory.
[0280] In the second scenario, the main directory also includes operation content information. This operation content records the operations to be performed on the content of each file in the database system. The configuration information records information on modifying the content of at least one file among multiple files. Therefore, the operation content information of the file corresponding to the modification operation information in the main directory can be updated using the modification operation information.
[0281] When the incremental directory code file contains keywords of the first type, it includes both structural modification information and operation content information. When the incremental directory code file contains keywords of the second type, it can include both structural modification information and operation content information, or only operation content information. The first type of keyword can be statements such as "create table" or "create view". The second type of keyword can be statements such as "modify table".
[0282] The process by which the management system parses configuration information and updates the file information of the corresponding files in the main directory with the configuration information can be found in [reference needed]. Figure 1 The relevant descriptions in the text will not be elaborated upon here.
[0283] See Figure 3 , Figure 3 This is a flowchart illustrating a method for converting target settings files provided in this application. Figure 3 As shown, the conversion method for the target settings file in this application includes the following steps:
[0284] S201: The client sends the file path and filename of the target settings file to the management system. Correspondingly, the management system receives the file path and filename of the target settings file sent by the client.
[0285] The target settings file's filename serves as its identifier. The target settings file's path indicates the location of the folders listed sequentially from the root directory until the target settings file is reached. Detailed information regarding the target settings file path and filename can be found in the preceding text and will not be elaborated upon here.
[0286] S202: The management system extracts the main fields from the target settings file.
[0287] The primary field can be any field in the configuration file. Taking the Excel file shown in Table 1 as an example, the configuration file can include multiple keys, such as project name, sub-project name, project code, and sub-project code fields, etc. Furthermore, each field can include multiple values; for example, the sub-project code value can include 0001, 0010, and 0011, etc. For simplicity, the primary field is not described in detail here. For a more comprehensive introduction to primary fields, please refer to [link to documentation / reference]. Figure 1 And related descriptions.
[0288] For information on how the management system extracts master fields from the target settings file, please refer to [link / reference]. Figure 1 The relevant information regarding extracting master fields from the target settings file will not be elaborated upon here.
[0289] S203: The system obtains the output path.
[0290] The output path is the path where the target settings file will be stored after being converted from Excel format to text format. The output path can be an existing path or a newly created path. For example, when the output path is an existing path, it can be "\Home Directory\" or "\Incremental Directory\", etc. When the output path is a new path, it can be "\New Directory\", etc. For a detailed introduction to output paths, please refer to [link to relevant documentation]. Figure 1 And related introductions, which will not be elaborated here.
[0291] The management system can obtain output paths in several ways, including: obtaining manually entered output paths. This can be done through a human-computer interaction interface or by retrieving manually entered output paths from a conversion configuration file. The output paths in the conversion configuration file are pre-entered by the user. For more information on how the management system obtains output paths, please refer to [link to relevant documentation]. Figure 1 The description of the management system's output path, as well as the related introduction, will not be repeated here.
[0292] S204: The management system converts the target settings file from Excel format to text format based on the main field.
[0293] Text formats are file formats that are easy for humans to read. For example, they can include human-readable language (YAML) files, JavaScript object notation (JSON) files, extensible markup language (XML) files, comma-separated values (CSV) files, text (TXT) files, hypertext markup language (HTML) files, markup language (Markdown) files, and so on.
[0294] The management system can convert target configuration files from Excel format to text format using conversion tools based on master fields. These conversion tools can include Hex editors, the OPEN function in the Python programming language, or specific conversion tools. Specific conversion tools can include excel2yaml, Bin2Txt, Bin2Txt Converter, etc. Different conversion tools can produce different file formats for the same target configuration file. For example, if the target configuration file is in Excel format and needs to be converted to YAML format, the excel2yaml tool can be used to convert it from Excel to YAML. For an introduction on how the management system converts target configuration files from Excel format to text format based on master fields, please refer to [link to relevant documentation]. Figure 1 And related descriptions, which will not be repeated here.
[0295] See Figure 4 , Figure 4 This is a flowchart illustrating a detection method provided in this application. Figure 3 As shown, the detection method provided in this application includes the following steps:
[0296] S301: The client sends rules to the management system. Correspondingly, the management system receives the rules sent by the client.
[0297] Rules can be implemented using check classes. For example, there can be one or more rules, and each rule can be a check class, the code of which can be stored in a text file. The check class can include class attributes, methods, and constructors, etc. Rules are represented by one or more of the check class attributes, methods, and constructors. For an introduction to rules, please refer to [link to relevant documentation]. Figure 1 And related introductions, which will not be elaborated here.
[0298] For information on how to obtain rules from the management system, please refer to [link / reference]. Figure 1 And related introductions, which will not be elaborated here.
[0299] S302: The client sends the path to the file to be tested to the management system. Correspondingly, the management system receives the path to the file to be tested sent by the client.
[0300] The files to be tested may include one or more of the following: a text-formatted main directory settings file and a main directory code file in the main directory; and a text-formatted incremental directory settings file and an incremental directory code file in the incremental directory.
[0301] The path to the file to be tested and the file path to the target settings file are similar. For details, please refer to the information regarding the file path of the target settings file.
[0302] S303: The management system uses the acquisition rules to detect the file under test and obtain the output results.
[0303] Since the detection class corresponding to the rule has already been loaded in step S301, we can continue to create an instance of the detection class and call the methods in the detection class to detect the file corresponding to the path of the file to be tested.
[0304] The output can include the rule name and the detection result. The rule name reflects the item being detected; for example, the rule name could be a duplicate rule, an error word rule, etc. The duplicate rule detects duplicate words, while the error word rule detects errors. For a description of the output and its various display methods, please refer to [link to relevant documentation]. Figure 1 And related descriptions, which will not be elaborated here.
[0305] See Figure 5 , Figure 5 This is a flowchart illustrating an automatic packaging method provided in this application. Figure 5 As shown, the automatic packaging method of this application includes:
[0306] S401: The client sends the files to be packaged, the packaging order, the output name, and the mapping rules to the management system. Correspondingly, the management system receives the files to be packaged, the packaging order, the output name, and the mapping rules from the client.
[0307] The definitions of the files to be packaged, the packaging order, the output names, and the mapping rules can be found in [reference needed]. Figure 1 In addition to the relevant descriptions, you can also refer to the documentation for obtaining the files to be packaged, the packaging order, the output names, and the mapping rules. Figure 1 And related descriptions, which will not be elaborated here.
[0308] S402: The management system converts the target configuration file used for the test environment into a target configuration file used for the production environment according to the mapping rules.
[0309] The management system converts the target configuration file used for the test environment into a target configuration file for the production environment according to the mapping rules as follows: The main directory configuration file and incremental directory configuration file used for the test environment are converted into main directory configuration files and incremental directory configuration files for the production environment according to the mapping rules. For example, the first mapping relationship in the mapping rules is obtained. Based on the first mapping relationship, a value is found in the main directory configuration file used for the test environment that is the same as the value in the main directory configuration file used for the test environment in the first mapping relationship (that is, the value to the left of the -> symbol in the first mapping relationship). Then, the found value is replaced with the value in the main directory configuration file used for the production environment in the first mapping relationship (that is, the value to the right of the -> symbol in the first mapping relationship). Then, the second mapping relationship is found, and the above operation is repeated until all mapping relationships are traversed. Taking the main directory configuration file shown in Table 1 as the main directory configuration file used for the test environment, and the mapping rule as mentioned above, as an example, the project code "0001" in Table 1 can be replaced with the project code "1", and the project name "Financial Project 1" in Table 1 can be replaced with the project name "Project 1", resulting in the main directory configuration file for the production environment shown in Table 3.
[0310] The specific process by which the management system converts the target configuration file used for the test environment into a target configuration file used for the production environment can be found in [link to documentation]. Figure 1 And related descriptions.
[0311] S403: The management system will package the files that need to be packaged according to the packaging order to obtain a compressed package named as the output name.
[0312] The management system packages the obtained files into a compressed file named "output" according to the packaging order. The process can be as follows: First, retrieve the first file to be packaged and modify its "original filename 1" to "serial number + original filename 1" (the serial number can be set to an initial value). Increment the serial number by 1. Then, retrieve the second file to be packaged and modify its "original filename 2" to "serial number + original filename 2", and so on, until all files have been renamed. Finally, package all the files into a compressed file and set the name of this compressed file as the output name.
[0313] The management system packages the files that need to be packaged according to the packaging order to obtain a compressed package named "output name". For details, please refer to [link to documentation / reference]. Figure 1 And related descriptions.
[0314] See Figure 6 , Figure 6This is a schematic diagram of another document management system provided in this application. For example... Figure 6 As shown, the file management system in this embodiment includes a client 410 and a management system 420.
[0315] Client 410 is used to send the main directory of the database system, wherein the main directory records the file information of the multiple files in the database system, and the database system includes multiple files.
[0316] The management system 420 is used to obtain the main directory of the database system, obtain the configuration information of the database, the configuration information records the configuration operations that the user needs to perform on at least one of the multiple files, parse the configuration information, and update the file information of the file corresponding to the configuration information in the main directory with the configuration information.
[0317] Both the client 410 and the management system 420 can be implemented through software or hardware. For example, the implementation of the management system will be described below. Similarly, the implementation of the client can refer to the implementation of the management system.
[0318] As an example of a software functional unit, a module in a management system can include code running on computing instances. These computing instances can be at least one of the following: physical hosts (computing devices), virtual machines, containers, etc. Furthermore, there can be one or more computing devices. For example, a management system can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application can be distributed within the same region or in different regions. Similarly, the multiple hosts / virtual machines / containers used to run the code can be distributed within the same Availability Zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region can include multiple AZs.
[0319] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a single region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0320] As an example of a hardware functional unit, a module in a management system can include at least one computing device, such as a server. Alternatively, the management system can also be a device implemented using a CPU, ASIC, PLD, CPLD, FPGA, GAL, DPU, NPU, SoC, offloading card, accelerator card, etc. The aforementioned PLD can be implemented using a CPLD, FPGA, GAL, or any combination thereof.
[0321] The management system 420 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the management system 420 includes multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the management system 420 includes multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.
[0322] Furthermore, the management system 420 includes an acquisition module 421 and a parsing and updating module 422.
[0323] The acquisition module 421 is used to acquire the main directory of the database system, which records file information of multiple files in the database system, and to acquire the database configuration information, which records the configuration operations that the user needs to perform on at least one of the multiple files.
[0324] The parsing and updating module 422 is used to parse the configuration information and update the file information of the file corresponding to the configuration information in the main directory with the configuration information.
[0325] Both the acquisition module 421 and the parsing and updating module 422 can be implemented in software or in hardware. For example, the implementation of the parsing and updating module 422 will be described below. Similarly, the implementation of the acquisition module 421 can be referenced from the implementation of the parsing and updating module 422.
[0326] As an example of a software functional unit, the parsing and updating module 422 may include code running on a compute instance. The compute instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, the aforementioned compute instance may be one or more. For example, the parsing and updating module 422 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0327] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0328] As an example of a hardware functional unit, the parsing and updating module 422 may include at least one computing device, such as a server. Alternatively, the parsing and updating module 422 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.
[0329] The multiple computing devices included in the parsing and updating module 422 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the parsing and updating module 422 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the parsing and updating module 422 can be distributed in the same VPC or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.
[0330] It should be noted that, in other embodiments, the parsing update module 422 can be used to perform... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 Any step in the automatic packaging method can be used to obtain module 421 for execution. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 In the automatic packaging method, any step, the steps implemented by the acquisition module 421 and the parsing update module 422 can be specified as needed, and implemented by the acquisition module 421 and the parsing update module 422 respectively. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The different steps in the automatic packaging method are used to implement all the functions of the management system 420.
[0331] This application also provides a chip system including a processor and a power supply circuit, wherein the power supply circuit supplies power to the processor, and the processor performs... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The steps involved in the automatic packaging method are detailed below. For simplicity, they will not be elaborated upon here. The processor can be implemented using a GPU, or through computing devices such as a DPU, NPU, XPU, SoC, offloading card, or accelerator card.
[0332] This application also provides a computing device 500. For example... Figure 7As shown, the computing device 500 includes a bus 502, a processor 504, a memory 506, and a communication interface 508. The processor 504, the memory 506, and the communication interface 508 communicate with each other via the bus 502. The computing device 500 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 500.
[0333] Bus 502 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. The Unified Bus is also known as the Lingqu Bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus 502 is represented by only one line, but this does not mean that there is only one bus or one type of bus. The bus 502 may include a path for transmitting information between various components of the computing device 500 (e.g., memory 506, processor 504, communication interface 508). The unified bus may also be called the Lingqu bus.
[0334] Processor 504 may include any one or more computing devices such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP) or digital signal processor (DSP), ASIC, FPGA, CPLD, NPU, SoC, offload card, accelerator card, etc.
[0335] Memory 506 may include volatile memory, such as random access memory (RAM). Processor 504 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 506 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.
[0336] It is worth noting that the same type of storage medium can be configured in the same computing device to realize the function of memory 506, or two or more types of storage media can be configured to realize the function of memory 506. This application does not limit this.
[0337] The memory 506 stores executable program code, and the processor 504 executes this executable program code to implement the functions of the aforementioned acquisition module and parsing update module, thereby achieving... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The automatic packaging method in the memory. That is, the memory 506 stores the method for executing... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0338] Alternatively, the memory 506 stores executable code, and the processor 504 executes the executable code to implement the functions of the aforementioned file management system or management system, thereby achieving... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The automatic packaging method in the memory. That is, the memory 506 stores the method for executing... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0339] The communication interface 508 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 500 and other devices or communication networks.
[0340] As one possible implementation, the computing device 500 may also include a chip system, which includes a processor and a power supply circuit. The power supply circuit provides power to the processor, and the processor performs execution... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The steps involved in the automatic packaging method are detailed below. For simplicity, they will not be elaborated upon here. The processor can be implemented using a GPU, or through computing devices or AI chips such as a DPU, NPU, XPU, SoC, offloading card, or accelerator card.
[0341] As one possible implementation, the computing device 500 may include multiple types of processors 504, that is, the computing device 500 is a heterogeneous device. For example, the computing device 500 includes a CPU and a GPU, and can be executed by at least one of the processors 504. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The steps involved in the automatic packaging method are described below. For the sake of brevity, they will not be repeated here.
[0342] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0343] like Figure 8 As shown, the computing device cluster includes at least one computing device 500. The memory 506 of one or more computing devices 500 in the computing device cluster may store the same memory for executing... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0344] In some possible implementations, the memory 506 of one or more computing devices 500 in the computing device cluster may also store memory for execution. Figure 2 File management methods in China Figure 3The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the document / system] are included. In other words, a combination of one or more computing devices 500 can jointly execute [the instructions / methods] for [the purpose of] executing [the software / system]. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0345] It should be noted that the memory 506 in different computing devices 500 within the computing device cluster can store different instructions, each used to execute a portion of the system's functions. That is, the instructions stored in the memory 506 of different computing devices 500 can implement the functions of one or more modules, including the acquisition module and the parsing / update module.
[0346] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 9 One possible implementation is shown. For example... Figure 9 As shown, two computing devices 500A and 500B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 506 in computing device 500A stores instructions for executing the functions of the acquisition module. Simultaneously, the memory 506 in computing device 500B stores instructions for executing the functions of the parsing update module.
[0347] Figure 9 The connection method between the computing device clusters shown can be that, considering that the parsing update module provided in this application needs to perform a lot of calculations and needs to store a lot of data, the functions implemented by the parsing update module are to be performed by the computing device 500B.
[0348] It should be understood that Figure 9 The functions of computing device 500A shown can also be performed by multiple computing devices 500. Similarly, the functions of computing device 500B can also be performed by multiple computing devices 500.
[0349] This application also provides another computing device cluster. The connection relationships between the computing devices in this computing device cluster can be similarly referred to... Figure 7 and Figure 8 The connection method of the computing device cluster is different. In that, the memory 506 of one or more computing devices 500 in this computing device cluster can store the same information for execution. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0350] In some possible implementations, the memory 506 of one or more computing devices 500 in the computing device cluster may also store memory for execution. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the document / system] are included. In other words, a combination of one or more computing devices 500 can jointly execute [the instructions / methods] for [the purpose of] executing [the software / system]. Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0351] It should be noted that the memory 506 in different computing devices 500 within the computing device cluster can store different instructions for executing some functions of the file management system. That is, the instructions stored in the memory 506 of different computing devices 500 can implement the functions of one or more devices in the management system and client.
[0352] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5 The instructions for the automatic packaging method in [the system / platform].
[0353] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute... Figure 2 File management methods in China Figure 3 The conversion method of the target setting file in Figure 4 Detection methods in Figure 5One or more of the automatic packaging methods in [the system / process].
Claims
1. A file management method applied to a database system, the database system comprising multiple files, characterized in that, include: Obtain the main directory of the database system, which records the file information of the multiple files in the database system; Obtain the configuration information of the database system, wherein the configuration information records the configuration operations that the user needs to perform on at least one of the multiple files; The configuration information is parsed, and the file information of the file corresponding to the configuration information in the main directory is updated using the configuration information.
2. The method according to claim 1, characterized in that, The main directory includes file structure information, which records the structure of each file in the database system, and the configuration information records structure modification information for at least one of the multiple files; The step of updating the file information of the file corresponding to the configuration information in the main directory with the configuration information includes: The structure information of the file corresponding to the configuration information in the main directory is updated using the file structure modification information recorded in the configuration information.
3. The method according to claim 2, characterized in that, The main directory also includes operation content information, which records the operations to be performed on the content of each file in the database system. The configuration information records information on performing modification operations on the content of at least one of the multiple files. The method of updating the file information corresponding to the modification operation information in the main directory using the configuration information further includes: Update the operation content information of the file corresponding to the modification operation information in the main directory with the information of the modification operation.
4. The method according to any one of claims 1-3, characterized in that, The database system includes multiple operating versions, and each operating version corresponds to a configuration information; The process of obtaining the database configuration information includes: In response to the user's action, select one of the multiple operation versions to obtain the configuration information of the database.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: After obtaining the target settings file from the database, the target settings file is converted from Excel format to text format. The target settings file includes at least one of the main directory settings file in the main directory and the incremental directory settings file in the incremental directory.
6. The method according to any one of claims 5, characterized in that, The method further includes: The system uses preset rules to detect at least one file in the main directory and at least one file in the incremental directory to determine whether the file in the main directory and at least one file in the incremental directory conform to the preset rules, and outputs an error report for the detected information that does not conform to the preset rules.
7. The method according to any one of claims 5, characterized in that, The method further includes: Determine the order of configuration operations in the configuration information of each file in the configuration information; Generate configuration rules for each configuration operation; Generate a configuration file, which includes the order of the configuration operations and the configuration rules; Configure the corresponding files in the database system using the configuration file.
8. A file management method, characterized in that, The client sends the main directory of the database system, wherein the main directory records the file information of the multiple files in the database system, and the database system includes multiple files; The management system obtains the main directory of the database system and the configuration information of the database. The configuration information records the configuration operations that the user needs to perform on at least one of the multiple files. The management system parses the configuration information and updates the file information of the file corresponding to the configuration information in the main directory with the configuration information.
9. A management system, characterized in that, The system includes: The acquisition module is used to acquire the main directory of the database system, wherein the main directory records the file information of the multiple files in the database system; The acquisition module is used to acquire the configuration information of the database, the configuration information recording the configuration operations that the user needs to perform on at least one of the multiple files; The parsing and updating module is used to parse the configuration information and update the file information of the file corresponding to the configuration information in the main directory with the configuration information.
10. A document management system, characterized in that, The system includes: A client is used to send the main directory of the database system, wherein the main directory records file information of the multiple files in the database system, and the database system includes multiple files; The management system is used to obtain the main directory of the database system; The management system is used to obtain configuration information of the database, the configuration information recording the configuration operations that the user needs to perform on at least one of the multiple files; The management system is used to parse the configuration information and update the file information of the file corresponding to the configuration information in the main directory with the configuration information.
11. A chip system, characterized in that, The chip system includes a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, and the processor being used to perform the operation steps of the method as described in any one of claims 1 to 7.
12. A computing device, further comprising a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the computing device to perform the operational steps of the method as described in any one of claims 1 to 7.
13. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the operational steps of the method as described in any one of claims 1 to 7.
14. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the operation steps of the method as described in any one of claims 1 to 7.
15. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a cluster of computing devices, perform the operational steps of the method as described in any one of claims 1 to 7.