A model file batch construction method, device and equipment and storage medium
By standardizing database table names and automatically generating basic functions, the tedious manual naming of model files in the Laravel framework is solved, enabling batch building of model files and improving efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU BAOLUN ELECTRONICS CO LTD
- Filing Date
- 2022-11-03
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, after the Laravel framework generates model files, the file names need to be manually defined, which is cumbersome and prone to errors, resulting in high development costs.
By obtaining the data table names from the database, standardizing them, generating standard model file names, and determining whether to generate basic functions based on the model configuration file, the model file is automatically created.
It enables batch construction of model files, improving development efficiency and reducing the probability of errors and development costs.
Smart Images

Figure CN115543936B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for batch construction of model files. Background Technology
[0002] In existing technologies, the existing Artisan facade based on the Laravel framework can only generate one model file at a time. After the model file is generated, the operator still needs to manually define the file name of the generated model file. This process is cumbersome and inefficient. Moreover, since the naming is done manually, the probability of error is relatively high, which leads to high development costs. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, apparatus, device and storage medium for batch construction of model files, which can create model files in batches based on existing data tables in the database, thereby improving development efficiency and reducing the probability of errors and development costs.
[0004] To address the aforementioned technical problems, this invention provides a method for batch construction of model files, comprising:
[0005] Obtain all table names in the database, generate a table name set, iterate through the table name set, determine whether the table name conforms to the naming standard, if not, standardize the table name to obtain the standard model file name corresponding to each table name;
[0006] Generate the corresponding initial model file based on the standard model file name, and obtain the model configuration file corresponding to the initial model file;
[0007] Determine if a directory model file with the same name as the standard model file exists in the directory folder. If not, obtain and determine whether to generate basic functions based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file.
[0008] In one possible implementation, after determining whether a directory model file with the same name as the standard model file exists in the directory folder, the method further includes:
[0009] If a directory model file with the same name as the standard model file exists in the directory folder, then obtain and apply the second configuration value from the model configuration file;
[0010] Determine whether the directory model file needs to be overwritten. If so, replace the directory model file with the initial model file. Obtain and determine whether basic functions need to be generated based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file.
[0011] If it is not necessary to overwrite the directory model file, then the initial model file is discarded.
[0012] In one possible implementation, it is determined whether the data table name conforms to the naming standard. If it does not, the data table name is standardized to obtain the standard model file name corresponding to each data table name, specifically including:
[0013] Determine whether the data table name contains special characters. If so, the data table name is considered to not conform to the naming standard, and the special characters are removed.
[0014] Determine whether the first letter of the data table name is an uppercase letter. If not, the data table name is considered to be inconsistent with the naming standard, and the first letter is converted to an uppercase letter to obtain the standard data table name corresponding to the data table name.
[0015] Set a first preset suffix, and concatenate the standard data table name with the first preset suffix to obtain the standard model file name.
[0016] In one possible implementation, after obtaining the standard model file name corresponding to each data table name, the following is also included:
[0017] Set a second preset suffix, and concatenate the standard data table name with the second preset suffix to obtain the standard model file class name corresponding to each data table name.
[0018] The present invention also provides a batch model file building device, comprising: a data table name processing module, an initial model file generation module, and a model file generation module;
[0019] The data table name processing module is used to obtain all data table names in the database, generate a data table name set, traverse the data table name set sequentially, determine whether the data table name conforms to the naming standard, and if it does not conform, perform standardization processing on the data table name to obtain the standard model file name corresponding to each data table name.
[0020] The initial model file generation module is used to generate a corresponding initial model file based on the standard model file name, and to obtain the model configuration file corresponding to the initial model file;
[0021] The model file generation module is used to determine whether there is a directory model file with the same name as the standard model file in the directory folder. If not, it obtains and determines whether to generate basic functions according to the first configuration value in the model configuration file. If not, it sets the initial model file as the model file. If it is needed, it generates basic functions and writes the basic functions into the initial model file to obtain the model file.
[0022] In one possible implementation, the model file generation module, after determining whether a directory model file with the same name as the standard model file exists in the directory folder, is further configured to:
[0023] If a directory model file with the same name as the standard model file exists in the directory folder, then obtain and apply the second configuration value from the model configuration file;
[0024] Determine whether the directory model file needs to be overwritten. If so, replace the directory model file with the initial model file. Obtain and determine whether basic functions need to be generated based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file.
[0025] If it is not necessary to overwrite the directory model file, then the initial model file is discarded.
[0026] In one possible implementation, the data table name processing module is used to determine whether the data table name conforms to the naming standard. If it does not conform, the data table name is standardized to obtain a standard model file name corresponding to each data table name, specifically including:
[0027] Determine whether the data table name contains special characters. If so, the data table name is considered to not conform to the naming standard, and the special characters are removed.
[0028] Determine whether the first letter of the data table name is an uppercase letter. If not, the data table name is considered to be inconsistent with the naming standard, and the first letter is converted to an uppercase letter to obtain the standard data table name corresponding to the data table name.
[0029] Set a first preset suffix, and concatenate the standard data table name with the first preset suffix to obtain the standard model file name.
[0030] In one possible implementation, the data table name processing module, after obtaining the standard model file name corresponding to each data table name, is further configured to:
[0031] Set a second preset suffix, and concatenate the standard data table name with the second preset suffix to obtain the standard model file class name corresponding to each data table name.
[0032] The present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement a batch construction method for model files as described in any of the preceding claims.
[0033] The present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform a batch construction method for model files as described in any of the preceding claims.
[0034] This invention provides a method, apparatus, device, and storage medium for batch construction of model files, which, compared with the prior art, have the following advantages:
[0035] A set of table names is generated based on the table names in the database. This set is then iterated through, and table names that do not conform to the naming standard are standardized to obtain standard model file names. A corresponding initial model file is generated based on the standard model file name, and the corresponding model configuration file is obtained. If no directory model file with the same name as the standard model file exists in the directory folder, the first configuration value in the model configuration file is used to determine whether basic functions need to be generated. If not, the initial model file is set as the model file; if so, the generated basic functions are written into the initial model file to obtain the model file. Compared with existing technologies, this method can create model files in batches based on existing tables in the database, saving time, improving development efficiency, and reducing costs. Furthermore, the standardization of model file naming automatically generates standard model file names, reducing the error rate caused by manually defining file names. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating an embodiment of a batch construction method for model files provided by the present invention;
[0037] Figure 2 This is a schematic diagram of an embodiment of a batch model file building device provided by the present invention. Detailed Implementation
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Example 1
[0040] See Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of a batch model file construction method provided by the present invention, as shown below. Figure 1 As shown, the method includes steps 101-104, as detailed below:
[0041] Step 101: Obtain all table names in the database, generate a table name set, iterate through the table name set, and determine whether the table names conform to the naming standard. If they do not conform, standardize the table names to obtain the standard model file name corresponding to each table name.
[0042] In one embodiment, all data tables in the database under the Laravel framework are obtained, and the data table name corresponding to each data table is obtained.
[0043] In one embodiment, it is determined whether the data table name contains special characters. If so, the data table name is considered to violate the naming standard, and the special characters are removed. These special characters are actual text that can be copied and pasted into text, such as mathematical symbols, unit symbols, tab characters, etc.
[0044] Preferably, it is determined whether the data table name contains an underscore; if so, the underscore is removed.
[0045] In one embodiment, it is determined whether the first letter of the data table name is an uppercase letter. If not, the data table name is considered to not conform to the naming standard, and the first letter is converted to an uppercase letter to obtain the standard data table name corresponding to the data table name.
[0046] In one embodiment, after determining whether the data table name contains special characters, the method further includes: determining whether there are words before and after the special character; if so, determining whether the first letter of the two words is a capital letter; if not, converting the first letter to a capital letter and removing the special character.
[0047] As an example in this embodiment: If the data table name is meeting_banner, and the data table name contains an underscore, and there are words before and after the underscore, and the first letter of both words is not a capital letter, then first convert the first letter of both words to a capital letter and remove the underscore to obtain the standard data table name MeetingBanner. If the data table name is banner, and the data table name does not contain special characters, and the first letter of the data table name is not a capital letter, then directly convert the first letter of the data table name to a capital letter to obtain the standard data table name.
[0048] In one embodiment, a first preset suffix is set, and the standard data table name is concatenated with the first preset suffix to obtain the standard model file name.
[0049] Preferably, the first preset suffix is Model.php, which is appended to the standard data table name.
[0050] As an example in this embodiment, the first preset suffix Model.php is appended to the standard data table name MeetingBanner to obtain the standard model file name MeetingBannerModel.php.
[0051] In one embodiment, a second preset suffix is also set, and the standard data table name is concatenated with the second preset suffix to obtain the standard model file class name corresponding to each data table name.
[0052] Preferably, the second preset suffix is named Model, which is appended to the standard data table name.
[0053] As an example in this embodiment, the standard data table name MeetingBanner is appended with the second preset suffix Model to obtain the standard model file class name MeetingBannerModel.
[0054] In this embodiment, removing special symbols from the data table names and converting the first letter of the data table names to uppercase is to better conform to the naming and development specifications of model files; it avoids the existing situation where file names need to be manually defined, which is cumbersome and has a high error rate due to manual processing.
[0055] Step 102: Generate the corresponding initial model file according to the standard model file name, and obtain the model configuration file corresponding to the initial model file.
[0056] In one embodiment, an initial model file is created for each of the obtained standard model files.
[0057] In one embodiment, when a model developer publishes a model, they need to write a configuration file. The model configuration file describes the model's purpose, computational framework, accuracy, inference code dependencies, and external API interfaces.
[0058] Step 103: Determine whether a directory model file with the same name as the standard model file exists in the directory folder. If not, obtain and determine whether to generate basic functions based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file.
[0059] In one embodiment, all directory model files in the Models directory folder under the Laravel framework are obtained, the directory model file names corresponding to all directory model files are obtained, and a directory model file name set is generated.
[0060] In one embodiment, after obtaining the standard model file name, the standard model file name is compared with all directory model file names in the directory model file name set. If the standard model file name is not the same as any directory model file name in the directory model file name set, it is determined that there is no directory model file with the same name as the standard model file name in the directory folder.
[0061] In one embodiment, a determination is made based on the first configuration value in the model configuration file to determine whether a basic function needs to be generated.
[0062] Specifically, the first configuration value is preset in the model configuration file. The first configuration value can be IS_CREATE_BASE_FUN == false, which means that no basic functions are generated. The first configuration value can also be IS_CREATE_BASE_FUN == true, which means that basic functions are generated. The basic functions are functions such as add, delete, modify, and search.
[0063] In one embodiment, if the obtained first configuration value is IS_CREATE_BASE_FUN == false, it is determined that there is no need to generate basic functions, and the initial model file is directly set as the final generated model file.
[0064] In one embodiment, if the obtained first configuration value is IS_CREATE_BASE_FUN == true, it is determined that basic functions need to be generated, and the generated basic functions are written into the initial model file so that the final generated model file can contain basic functions such as CRUD operations.
[0065] In one embodiment, based on the settings of the model configuration file, basic functions such as CRUD operations can be automatically added during the generation of the model file. This avoids the need for manual addition of basic functions to the generated model file later, saving time and improving project development efficiency.
[0066] In one embodiment, the standard model file name is compared with all directory model file names in the directory model file name set. If there is a directory model file name in the directory model file name set that is the same as the standard model file name, then it is determined that there is a directory model file in the directory folder that is the same as the standard model file name.
[0067] In one embodiment, if a directory model file with the same name as the standard model file exists in the directory folder, then the second configuration value in the model configuration file is obtained and it is determined whether the directory model file needs to be overwritten.
[0068] Specifically, the second configuration value is preset in the model configuration file. The second configuration value can be IS_COVER == false, which means that the directory model file will not be overwritten, or IS_COVER == true, which means that the directory model file will be overwritten.
[0069] In one embodiment, if the obtained second configuration value is IS_COVER == false, it is determined that there is no need to overwrite the directory model file with the same name as the standard model file. In this case, the initial model file corresponding to the standard model file is discarded, and the system waits for the next generated standard file to make a judgment.
[0070] In one embodiment, if the obtained second configuration value is IS_COVER == true, it is determined that a directory model file with the same name as the standard model file needs to be overwritten, the directory model file is replaced with the initial model file, and the directory model file is deleted.
[0071] In one embodiment, after replacing the directory model file with the initial model file, the first configuration value in the model configuration file corresponding to the initial model file is obtained. Based on the first configuration value, it is determined whether a basic function needs to be generated. If not, the initial model file is set as the model file; if so, the basic function is generated and written into the initial model file to obtain the model file.
[0072] In one embodiment, the above steps are repeated until corresponding model files are generated for all data tables in the database.
[0073] In summary, the batch model file construction method provided by this invention can create model files in batches based on existing data tables in the database, avoiding the need for manual generation of individual model files. This can save time to a large extent, improve development efficiency, reduce labor costs, and, based on the standardization of model file naming, can automatically generate standard model file names, which can also reduce the error rate caused by manually defining file names.
[0074] Example 2
[0075] See Figure 2 , Figure 2 This is a schematic diagram of an embodiment of a batch model file building device provided by the present invention, as shown below. Figure 2 As shown, the device includes a data table name processing module 201, an initial model file generation module 202, and a model file generation module 203, as detailed below:
[0076] The data table name processing module 201 is used to obtain all data table names in the database, generate a data table name set, traverse the data table name set sequentially, determine whether the data table name conforms to the naming standard, and if it does not conform, perform standardization processing on the data table name to obtain the standard model file name corresponding to each data table name.
[0077] The initial model file generation module 202 is used to generate a corresponding initial model file according to the standard model file name, and obtain the model configuration file corresponding to the initial model file.
[0078] The model file generation module 203 is used to determine whether there is a directory model file with the same name as the standard model file in the directory folder. If not, it obtains and determines whether to generate basic functions according to the first configuration value in the model configuration file. If not, it sets the initial model file as the model file. If it is needed, it generates basic functions and writes the basic functions into the initial model file to obtain the model file.
[0079] In one embodiment, the model file generation module 203, after determining whether a directory model file with the same name as the standard model file exists in the directory folder, is further configured to:
[0080] If a directory model file with the same name as the standard model file exists in the directory folder, then the second configuration value in the model configuration file is obtained and used to determine whether the directory model file needs to be overwritten. If so, the directory model file is replaced with the initial model file, and the first configuration value in the model configuration file is obtained and used to determine whether basic functions need to be generated. If not, the initial model file is set as the model file; if so, basic functions are generated and written into the initial model file to obtain the model file; if the directory model file does not need to be overwritten, the initial model file is discarded.
[0081] In one embodiment, the data table name processing module 201 is used to determine whether the data table name conforms to the naming standard. If it does not conform, the data table name is standardized to obtain a standard model file name corresponding to each data table name, specifically including:
[0082] Determine whether the data table name contains special characters. If so, the data table name is considered to not conform to the naming standard, and the special characters are removed. Determine whether the first letter of the data table name is an uppercase letter. If not, the data table name is considered to not conform to the naming standard, and the first letter is converted to an uppercase letter to obtain the standard data table name corresponding to the data table name. Set a first preset suffix and concatenate the first preset suffix into the standard data table name to obtain the standard model file name.
[0083] In one embodiment, the data table name processing module 201, after obtaining the standard model file name corresponding to each data table name, is further configured to:
[0084] Set a second preset suffix, and concatenate the standard data table name with the second preset suffix to obtain the standard model file class name corresponding to each data table name.
[0085] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0086] It should be noted that the embodiments of the above-described batch model file construction device are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] Based on the above-described embodiments of the batch model file construction method, another embodiment of the present invention provides a batch model file construction terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the batch model file construction method of any embodiment of the present invention.
[0088] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the batch construction terminal device of the model files.
[0089] The terminal device for batch building of model files can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal device for batch building of model files may include, but is not limited to, processors and memory.
[0090] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the batch construction terminal device for the model file, connecting various parts of the batch construction terminal device for the entire model file using various interfaces and lines.
[0091] The memory can be used to store the computer programs and / or modules. The processor, by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory, realizes various functions of the batch construction terminal device of the model files. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function, etc.; the data storage area may store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0092] Based on the above embodiments of the batch model file construction method, another embodiment of the present invention provides a storage medium, the storage medium including a stored computer program, wherein, when the computer program is running, the device where the storage medium is located controls the execution of the batch model file construction method of any embodiment of the present invention.
[0093] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0094] In summary, the present invention discloses a method, apparatus, device, and storage medium for batch construction of model files. It generates a set of data table names based on the data table names in a database, iterates through the set of data table names sequentially, standardizes data table names that do not conform to the naming standard, and obtains standard model file names. It then generates corresponding initial model files based on the standard model file names and obtains the corresponding model configuration file. If no directory model file with the same standard model file name exists in the directory folder, it obtains and determines whether basic functions need to be generated based on the first configuration value in the model configuration file. If not, the initial model file is set as the model file; if so, the generated basic functions are written into the initial model file to obtain the model file. Compared with existing technologies, this method can batch create model files based on existing data tables in a database, saving time, improving development efficiency, and reducing costs. Furthermore, based on the standardization of model file naming, it can automatically generate standard model file names, which also reduces the error rate caused by manually defining file names.
[0095] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.
Claims
1. A method for batch construction of model files, characterized in that, include: Obtain all table names in the database, generate a table name set, iterate through the table name set, determine whether the table name conforms to the naming standard, if not, standardize the table name to obtain the standard model file name corresponding to each table name; Generate the corresponding initial model file based on the standard model file name, and obtain the model configuration file corresponding to the initial model file; Determine if a directory model file with the same name as the standard model file exists in the directory folder. If not, obtain and determine whether to generate basic functions based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file. The step of determining whether a directory model file with the same name as the standard model file exists in the directory folder further includes: If a directory model file with the same name as the standard model file exists in the directory folder, then obtain and apply the second configuration value from the model configuration file; Determine whether the directory model file needs to be overwritten. If so, replace the directory model file with the initial model file. Obtain and determine whether basic functions need to be generated based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file. If it is not necessary to overwrite the directory model file, then the initial model file is discarded.
2. The method for batch construction of model files as described in claim 1, characterized in that, Determine if the data table name conforms to the naming standard. If not, standardize the data table name to obtain the standard model file name corresponding to each data table name, specifically including: Determine whether the data table name contains special characters. If so, the data table name is considered to not conform to the naming standard, and the special characters are removed. Determine whether the first letter of the data table name is an uppercase letter. If not, the data table name is considered to be inconsistent with the naming standard, and the first letter is converted to an uppercase letter to obtain the standard data table name corresponding to the data table name. Set a first preset suffix, and concatenate the standard data table name with the first preset suffix to obtain the standard model file name.
3. The method for batch construction of model files as described in claim 1, characterized in that, After obtaining the standard model file name corresponding to each data table name, it also includes: Set a second preset suffix, and concatenate the standard data table name with the second preset suffix to obtain the standard model file class name corresponding to each data table name.
4. A batch construction device for model files, characterized in that, include: Data table name processing module, initial model file generation module, and model file generation module; The data table name processing module is used to obtain all data table names in the database, generate a data table name set, traverse the data table name set sequentially, determine whether the data table name conforms to the naming standard, and if it does not conform, perform standardization processing on the data table name to obtain the standard model file name corresponding to each data table name. The initial model file generation module is used to generate a corresponding initial model file based on the standard model file name, and to obtain the model configuration file corresponding to the initial model file; The model file generation module is used to determine whether there is a directory model file with the same name as the standard model file in the directory folder. If not, it obtains and determines whether to generate basic functions according to the first configuration value in the model configuration file. If not, it sets the initial model file as the model file. If it is needed, it generates basic functions and writes the basic functions into the initial model file to obtain the model file. The model file generation module, after determining whether a directory model file with the same name as the standard model file exists in the directory folder, is further configured to: If a directory model file with the same name as the standard model file exists in the directory folder, then obtain and apply the second configuration value from the model configuration file; Determine whether the directory model file needs to be overwritten. If so, replace the directory model file with the initial model file. Obtain and determine whether basic functions need to be generated based on the first configuration value in the model configuration file. If not, set the initial model file as the model file. If so, generate basic functions and write the basic functions into the initial model file to obtain the model file. If it is not necessary to overwrite the directory model file, then the initial model file is discarded.
5. The batch construction device for model files as described in claim 4, characterized in that, The data table name processing module is used to determine whether the data table name conforms to the naming standard. If it does not conform, the data table name is standardized to obtain the standard model file name corresponding to each data table name, specifically including: Determine whether the data table name contains special characters. If so, the data table name is considered to not conform to the naming standard, and the special characters are removed. Determine whether the first letter of the data table name is an uppercase letter. If not, the data table name is considered to be inconsistent with the naming standard, and the first letter is converted to an uppercase letter to obtain the standard data table name corresponding to the data table name. Set a first preset suffix, and concatenate the standard data table name with the first preset suffix to obtain the standard model file name.
6. The batch construction apparatus for model files as described in claim 4, characterized in that, The data table name processing module, after obtaining the standard model file name corresponding to each data table name, is also used for: Set a second preset suffix, and concatenate the standard data table name with the second preset suffix to obtain the standard model file class name corresponding to each data table name.
7. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the batch construction method of model files as described in any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the batch construction method of model files as described in any one of claims 1 to 3.