CN116263767A - Database table generation method and system - Google Patents

Database table generation method and system Download PDF

Info

Publication number
CN116263767A
CN116263767A CN202111539910.3A CN202111539910A CN116263767A CN 116263767 A CN116263767 A CN 116263767A CN 202111539910 A CN202111539910 A CN 202111539910A CN 116263767 A CN116263767 A CN 116263767A
Authority
CN
China
Prior art keywords
header information
database table
target
conversion
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111539910.3A
Other languages
Chinese (zh)
Inventor
冯成会
卢在贺
李成旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Easy Sight Technology Co Ltd
Original Assignee
Wuhan Easy Sight Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Easy Sight Technology Co Ltd filed Critical Wuhan Easy Sight Technology Co Ltd
Priority to CN202111539910.3A priority Critical patent/CN116263767A/en
Publication of CN116263767A publication Critical patent/CN116263767A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a database table generation method and a database table generation system, wherein the method comprises the following steps: extracting header information from a target table file, and performing format conversion on the header information; splicing the header information after conversion and before conversion to form an SQL sentence; and generating a database table of the target table file according to the SQL statement. The invention automatically extracts the header information from the target table file, then carries out format conversion on the header information, splices the header information after conversion and before conversion into the SQL sentence, executes or calls the SQL sentence, and automatically generates the database table of the target table file, thereby improving the generation efficiency of the database table, effectively reducing the labor cost and the development period of the database table, and having less influence of manual interference, so that the generated database table is more accurate.

Description

Database table generation method and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a database table generating method and system.
Background
With the development and progress of computer technology, more and more data information is stored in databases to perform unified management on data.
In practical engineering applications, data information is stored in a database, and defect data is stored in the database by using a table template. However, because of the differences among the fields in the various form templates, the form templates are not fixed in structure, and it is difficult to satisfy the data import requirement.
In this case, the database table structure corresponding to each form template is typically created manually; and then, importing the data information into a database according to the database table structure. And the form templates are usually various in style, and database tables are created manually, so that the labor cost is increased and the development period is prolonged.
Disclosure of Invention
The invention provides a database table generation method and a database table generation system, which are used for solving the defects that the labor cost is increased and the development period is prolonged by manually creating a database table in the prior art and realizing automatic and accurate generation of the database table.
The invention provides a database table generation method, which comprises the following steps:
extracting header information from a target table file, and performing format conversion on the header information;
splicing the header information after conversion and before conversion to form an SQL sentence;
and generating a database table of the target table file according to the SQL statement.
According to the database table generating method provided by the invention, the header information is extracted from the target table file, and the method comprises the following steps:
determining the position of the header information in the target table file;
and extracting the cell content corresponding to the position in the target table file to obtain the header information.
According to the method for generating the database table provided by the invention, the format conversion of the header information comprises the following steps:
acquiring the pinyin initial of each Chinese character in the header information, and converting the pinyin initial into capital letters;
splicing capital letters corresponding to all Chinese characters in the header information to obtain converted header information.
According to the method for generating the database table provided by the invention, before the header information after conversion and before conversion is spliced to form the SQL sentence, the method further comprises the following steps:
if any two pieces of converted header information are repeated, performing de-duplication processing on the any two pieces of converted header information by using a target character;
the de-duplication processing includes inserting target characters into any one of the two converted header information, or inserting different target characters into the two converted header information.
According to the database table generation method provided by the invention, the target characters comprise one or more capital letters and/or one or more lowercase letters.
According to the method for generating the database table provided by the invention, after the database table of the target table file is generated according to the SQL sentence, the method further comprises the following steps:
and according to the database table, the target table file is mounted in an application system so that the application system can display the target table file.
The invention also provides a database table generation system, which comprises:
the format conversion module is used for extracting header information from the target table file and carrying out format conversion on the header information;
the first generation module is used for splicing the header information after conversion and before conversion to form an SQL sentence;
and the second generation module is used for generating a database table of the target table file according to the SQL statement.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the database table generating methods described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a database table generation method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor carries out the steps of a database table generation method as described in any one of the above.
According to the database table generation method and system, the header information is automatically extracted from the target table file, format conversion is carried out on the header information, the header information after conversion and before conversion are spliced to form the SQL sentence, and the SQL sentence is executed or called, so that the database table of the target table file is automatically generated, the generation efficiency of the database table is improved, the labor cost and the development period of the database table are effectively reduced, and the generated database table is less affected by manual interference, so that the generated database table is more accurate.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a database table generating method according to the present invention;
FIG. 2 is a schematic diagram of a database table in the database table generating method according to the present invention;
FIG. 3 is a second flowchart of the database table generating method according to the present invention;
FIG. 4 is a schematic diagram of a database table generation system according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The database table generation method of the present invention is described below with reference to fig. 1, and includes:
step 101, extracting header information from a target table file, and performing format conversion on the header information;
the database table generating method in this embodiment may be used in various fields, such as a pipeline defect table file, an industrial equipment operation table file, and the like, which is not specifically limited in this embodiment.
The database table generating method in the present embodiment can be applied to different systems or devices, such as an actuator; the actuator may be a computer, a server, a cloud, or the like, which is not particularly limited in this embodiment.
The target table file is a table file to be generated by the database table, and may be a table file of a pipeline defect video class, a table file of an industrial equipment operation data class, or the like, which is not particularly limited in this embodiment.
The target table file contains one or more header information, which is not specifically limited in this embodiment.
Table 1 examples of target table files
Figure BDA0003413683090000051
As shown in table 1, an exemplary target table file is a table file of a pipeline defect video class, and header information includes a video number, a video name, a road name, a pipe section number, a monitoring date, a detection direction, and a detection remark.
Optionally, when the target table file needs to be stored in the database, firstly, circularly reading the target table file to extract header information in the target table file; then, converting the format of the header information according to a preset rule to obtain converted header information;
the format conversion method includes converting the header information from chinese to english, converting the header information to a description language corresponding to the database, such as english for short, or converting the header information to digital code, which is not limited in this embodiment.
Step 102, splicing the header information after conversion and before conversion to form an SQL sentence;
wherein SQL (Structured Query Language structured query language) statements are used to build database tables.
Optionally, after the header information after format conversion is obtained, splicing the header information after format conversion and the header information before format conversion to form an SQL sentence;
optionally, the header information after format conversion is used as a primary key, and the header information before format conversion is used as comment information, so as to form an SQL sentence.
As shown in fig. 2, the header information before format conversion is a road name, and the header information after format conversion is DLMC;
and taking the header information DLMC after format conversion as a main key and taking the header information road name before format conversion as the annotation of the main key DLMC, so that a user can acquire the original annotation information when looking up any header information in the database table.
And step 103, generating a database table of the target table file according to the SQL statement.
Optionally, after the SQL statement for creating the database table is obtained, the SQL statement corresponding to all the header information may be called or executed, each piece of converted header information is used as a primary key of the database table according to a table creating rule in the SQL statement, each piece of converted header information is written into a corresponding field according to an arrangement sequence of each piece of header information in the target table file, and each piece of header information before conversion is used as corresponding piece of header information after conversion as comment information.
It should be noted that, according to the SQL statement, the attribute information of each converted header information can also be written into the database table; the attribute information includes, but is not limited to, a type, a length, a ratio, status information of whether empty, and the like, which is not specifically limited in the present embodiment.
Taking the target table file shown in fig. 2 as an example, the database table generating method in the present embodiment is described in the following;
the header information before conversion comprises a video number, a video name, a road name, a pipe section number, a monitoring date, a detection direction and a detection remark, the header information after conversion comprises SPBH, SPMC, DLMC, GDBH, JCRQ, JCFX, JCBZ, SPBH, SPMC, DLMC, GDBH, JCRQ, JCFX, JCBZ is written into corresponding columns in sequence according to SQL sentences, and corresponding attribute information and annotation information are added to each header information after conversion.
According to the embodiment, the header information is automatically extracted from the target table file, format conversion is carried out on the header information, the header information after conversion and before conversion is spliced to form the SQL sentence, the SQL sentence is executed or called, the database table of the target table file is automatically generated, the generation efficiency of the database table is improved, the labor cost and the development period of the database table are effectively reduced, the influence of manual interference is small, and the generated database table is more accurate.
On the basis of the foregoing embodiment, the extracting header information from the target table file in this embodiment includes: determining the position of the header information in the target table file; and extracting the cell content corresponding to the position in the target table file to obtain the header information.
The table header of the target table file comprises a longitudinal table header, a transverse table header and a mixed table header consisting of the longitudinal table header and the transverse table header; accordingly, the position of the header information in the target table file includes the row of the header and/or the column of the header, i.e., the header information is at the upper end of the target table file, the left end of the target table file, or both the upper end and the left end of the target table file.
Optionally, the step of extracting header information from the target table file includes,
firstly, determining the position of header information in a target table file according to the header type of the target table file; i.e. determining that the target table is at the upper end of the target table file, at the left end of the target table file or at both the upper and left ends of the target table file.
And then, circularly extracting cell contents corresponding to the position of the header information in the target table file according to the position of the header information in the target table file to obtain header information, and adding the extracted header information into a character string set to obtain all the header information of the target table file.
According to the embodiment, the position of the header information in the target table file is firstly determined, and then the header information is circularly extracted according to the position, so that the header information can be rapidly and accurately obtained.
On the basis of the above implementation, the format conversion of the header information in this embodiment includes: acquiring the pinyin initial of each Chinese character in the header information, and converting the pinyin initial into capital letters; splicing capital letters corresponding to all Chinese characters in the header information to obtain converted header information.
Optionally, the step of performing format conversion on the header information includes, first, converting each Chinese character of the header information into pinyin in a process of circularly extracting the header information; then extracting the pinyin initial of each Chinese character from the pinyin; then, the pinyin initial of each Chinese character is converted into uppercase letters, and uppercase letters corresponding to all Chinese characters of the header information are spliced to form character strings so as to obtain the header information after format conversion; and adding the converted header information to the new character string set to obtain all the converted header information of the target table file.
For example, the header information is a road name, and the corresponding converted header information is DLMC.
Compared with the prior art that the header information is directly converted into the corresponding pinyin character string, the header information is converted into the capital letter character string formed by spelling, so that the ratio of the header information in the database table can be reduced, the header information can be simplified, the readability is improved, and the experience of a user is further improved; in addition, the header information after format conversion can be suitable for the language specification of the database table, so that the success rate of database table establishment is improved. In addition, when the field character string of the database table is too long, the error of too long identifier can be reported when the query is executed, so that the problem of query failure caused by too long field character string of the database table can be effectively avoided, and the fault tolerance rate is greatly improved.
Based on the foregoing embodiments, before the splicing the header information after conversion and before conversion to form the SQL statement, the method further includes: if any two pieces of converted header information are repeated, performing de-duplication processing on the any two pieces of converted header information by using a target character; the de-duplication processing includes inserting target characters into any one of the two converted header information, or inserting different target characters into the two converted header information.
Optionally, in order to avoid that character strings after conversion of different header information are consistent, performance of a database table is affected; before splicing the header information after format conversion and before format conversion to form an SQL sentence, repeated any two pieces of header information after conversion need to be subjected to de-duplication processing.
Optionally, comparing and judging whether the header information after any two conversions is repeated or not in a circulating way;
if any two pieces of converted header information are repeated, target characters can be inserted into the tail part of one piece of converted header information, or different target characters can be respectively inserted into the tail parts of any two pieces of converted header information, so that new converted header information is formed; forming a new table set according to the converted header information after the de-duplication treatment;
and then, splicing the new table set and the character string set of the header information before conversion to form an SQL sentence so as to generate a database table of the target table file.
If all the converted header information is not repeated, directly splicing a table building set formed by the converted header information and a character string set formed by the header information before conversion to form an SQL sentence so as to generate a database table of the target table file.
In the embodiment, the duplicate removal judgment is performed on the converted header information, and duplicate removal processing is performed on any two repeated converted header information, so that the uniqueness of the database table is ensured, and the performance of the database table is improved.
Based on the above embodiments, the target character in this embodiment includes one or more capital letters, and/or one or more lowercase letters.
Alternatively, the target character may be one capital letter, a combined string of a plurality of capital letters, one lowercase letter, a combined string of a plurality of lowercase letters, or a combination of different capital and lowercase letters, which is not particularly limited in this embodiment.
For example, the header information before any two conversion is respectively the detection direction and the detection analysis, the character strings after the two header information conversion are JCFX, and the repetition exists; the upper case letter A can be added at the tail part of the converted header information corresponding to the detection direction to form new converted header information JCFXA; and/or adding capital letter B at the tail of the converted header information corresponding to detection and analysis to form new converted header information JCFXB.
According to the embodiment, the upper case letters and/or the lower case letters are inserted into the tail parts of any two repeated converted header information, so that the duplicate removal processing can be performed on any two converted header information, the operation is simple, and the practicability is good.
On the basis of the foregoing embodiment, in this embodiment, after the generating, according to the SQL statement, the database table of the target table file further includes: and according to the database table, the target table file is mounted in an application system so that the application system can display the target table file.
Optionally, after generating the database table of the target table file, the data content of the target table file may be imported into a database according to the database table; and then, the application system reads the data content imported by the target table file from the database so as to display the data content of the target table file to the front end, and the target table file is hung.
According to the database table, the method and the device can realize automatic mounting of the target table file into the application system, and can effectively improve mounting efficiency.
As shown in fig. 3, a complete flow diagram of a database table generating method is shown, and the main steps include:
step 1, circularly reading rows and/or columns of the table head of a target table file, extracting cell contents of the rows and/or columns of the table head to obtain table head information of the target table file, and adding all the table head information into a character string set;
step 2, circularly extracting the pinyin initial of each Chinese character in the header information, converting the pinyin initial into uppercase letters, and splicing the uppercase letters corresponding to all Chinese characters of the header information into a new character string to obtain converted header information; forming a table building set by all the converted header information;
step 3, recursively and circularly processing the converted header information in the table building set, and performing de-duplication processing on any two repeated converted header information to obtain a new table building set;
and 4, splicing the new table building set and the character string set obtained in the step 1 to form an SQL sentence, and finally calling or executing the SQL sentence to generate a database table of the target table file.
The database table generating system provided by the invention is described below, and the database table generating system described below and the database table generating method described above can be referred to correspondingly.
As shown in fig. 4, the present embodiment provides a database table generating system, which includes: a format conversion module 401, a first generation module 402, and a second generation module 403, wherein:
the format conversion module 401 is configured to extract header information from a target table file, and perform format conversion on the header information;
the database table generating method in this embodiment may be used in various fields, such as a pipeline defect table file, an industrial equipment operation table file, and the like, which is not specifically limited in this embodiment.
The database table generating method in the present embodiment can be applied to different systems or devices, such as an actuator; the actuator may be a computer, a server, a cloud, or the like, which is not particularly limited in this embodiment.
The target table file is a table file to be generated by the database table, and may be a table file of a pipeline defect video class, a table file of an industrial equipment operation data class, or the like, which is not particularly limited in this embodiment.
The target table file contains one or more header information, which is not specifically limited in this embodiment.
Optionally, when the target table file needs to be stored in the database, firstly, circularly reading the target table file to extract header information in the target table file; then, converting the format of the header information according to a preset rule to obtain converted header information;
the format conversion method includes converting the header information from chinese to english, converting the header information to a description language corresponding to the database, such as english for short, or converting the header information to digital code, which is not limited in this embodiment.
The first generation module 402 is configured to splice header information after conversion and before conversion to form an SQL statement;
wherein, SQL statements are used to build database tables.
Optionally, after the header information after format conversion is obtained, splicing the header information after format conversion and the header information before format conversion to form an SQL sentence;
optionally, the header information after format conversion is used as a primary key, and the header information before format conversion is used as comment information, so as to form an SQL sentence.
As shown in fig. 2, the header information before format conversion is a road name, and the header information after format conversion is DLMC;
and taking the header information DLMC after format conversion as a main key and taking the header information road name before format conversion as the annotation of the main key DLMC, so that a user can acquire the original annotation information when looking up any header information in the database table.
The second generating module 403 is configured to generate a database table of the target table file according to the SQL statement.
Optionally, after the SQL statement for creating the database table is obtained, the SQL statement corresponding to all the header information may be called or executed, each piece of converted header information is used as a primary key of the database table according to a table creating rule in the SQL statement, each piece of converted header information is written into a corresponding field according to an arrangement sequence of each piece of header information in the target table file, and each piece of header information before conversion is used as corresponding piece of header information after conversion as comment information.
It should be noted that, according to the SQL statement, the attribute information of each converted header information can also be written into the database table; the attribute information includes, but is not limited to, a type, a length, a ratio, status information of whether empty, and the like, which is not specifically limited in the present embodiment.
Taking the target table file shown in fig. 2 as an example, the database table generating method in the present embodiment is described in the following;
the header information before conversion comprises a video number, a video name, a road name, a pipe section number, a monitoring date, a detection direction and a detection remark, the header information after conversion comprises SPBH, SPMC, DLMC, GDBH, JCRQ, JCFX, JCBZ, SPBH, SPMC, DLMC, GDBH, JCRQ, JCFX, JCBZ is written into corresponding columns in sequence according to SQL sentences, and corresponding attribute information and annotation information are added to each header information after conversion.
According to the embodiment, the header information is automatically extracted from the target table file, format conversion is carried out on the header information, the header information after conversion and before conversion is spliced to form the SQL sentence, the SQL sentence is executed or called, the database table of the target table file is automatically generated, the generation efficiency of the database table is improved, the labor cost and the development period of the database table are effectively reduced, the influence of manual interference is small, and the generated database table is more accurate.
On the basis of the above embodiment, the format conversion module in this embodiment is specifically configured to: determining the position of the header information in the target table file; and extracting the cell content corresponding to the position in the target table file to obtain the header information.
On the basis of the above embodiment, the format conversion module in this embodiment is further configured to: acquiring the pinyin initial of each Chinese character in the header information, and converting the pinyin initial into capital letters; splicing capital letters corresponding to all Chinese characters in the header information to obtain converted header information.
On the basis of the above embodiments, the present embodiment further includes a deduplication processing module, configured to: if any two pieces of converted header information are repeated, performing de-duplication processing on the any two pieces of converted header information by using a target character; the de-duplication processing includes inserting target characters into any one of the two converted header information, or inserting different target characters into the two converted header information.
Based on the above embodiments, the target character in this embodiment includes one or more capital letters, and/or one or more lowercase letters.
On the basis of the above embodiments, the present embodiment further includes a mounting module, configured to: and according to the database table, the target table file is mounted in an application system so that the application system can display the target table file.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: a processor (processor) 501, a communication interface (Communications Interface) 502, a memory (memory) 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other via the communication bus 504. The processor 501 may invoke logic instructions in the memory 503 to perform a database table generation method comprising: extracting header information from a target table file, and performing format conversion on the header information; splicing the header information after conversion and before conversion to form an SQL sentence; and generating a database table of the target table file according to the SQL statement.
Further, the logic instructions in the memory 503 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the database table generating method provided by the above methods, the method comprising: extracting header information from a target table file, and performing format conversion on the header information; splicing the header information after conversion and before conversion to form an SQL sentence; and generating a database table of the target table file according to the SQL statement.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a database table generation method provided by the above methods, the method comprising: extracting header information from a target table file, and performing format conversion on the header information; splicing the header information after conversion and before conversion to form an SQL sentence; and generating a database table of the target table file according to the SQL statement.
The system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A database table generation method, comprising:
extracting header information from a target table file, and performing format conversion on the header information;
splicing the header information after conversion and before conversion to form an SQL sentence;
and generating a database table of the target table file according to the SQL statement.
2. The database table generating method according to claim 1, wherein the extracting header information from the target table file comprises:
determining the position of the header information in the target table file;
and extracting the cell content corresponding to the position in the target table file to obtain the header information.
3. The database table generating method according to claim 1, wherein said performing format conversion on said header information comprises:
acquiring the pinyin initial of each Chinese character in the header information, and converting the pinyin initial into capital letters;
splicing capital letters corresponding to all Chinese characters in the header information to obtain converted header information.
4. A method for generating a database table according to any one of claims 1 to 3, further comprising, before the splicing of header information after conversion and before conversion to form an SQL statement:
if any two pieces of converted header information are repeated, performing de-duplication processing on the any two pieces of converted header information by using a target character;
the de-duplication processing includes inserting target characters into any one of the two converted header information, or inserting different target characters into the two converted header information.
5. The database table generating method according to claim 4, wherein the target character includes one or more capital letters, and/or one or more lowercase letters.
6. A method of generating a database table according to any one of claims 1-3, further comprising, after said generating a database table of said target table file from said SQL statement:
and according to the database table, the target table file is mounted in an application system so that the application system can display the target table file.
7. A database table generation system, comprising:
the format conversion module is used for extracting header information from the target table file and carrying out format conversion on the header information;
the first generation module is used for splicing the header information after conversion and before conversion to form an SQL sentence;
and the second generation module is used for generating a database table of the target table file according to the SQL statement.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the database table generation method according to any of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the database table generation method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the database table generation method according to any of claims 1 to 6.
CN202111539910.3A 2021-12-15 2021-12-15 Database table generation method and system Pending CN116263767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111539910.3A CN116263767A (en) 2021-12-15 2021-12-15 Database table generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111539910.3A CN116263767A (en) 2021-12-15 2021-12-15 Database table generation method and system

Publications (1)

Publication Number Publication Date
CN116263767A true CN116263767A (en) 2023-06-16

Family

ID=86722652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111539910.3A Pending CN116263767A (en) 2021-12-15 2021-12-15 Database table generation method and system

Country Status (1)

Country Link
CN (1) CN116263767A (en)

Similar Documents

Publication Publication Date Title
TWI636452B (en) Method and system of voice recognition
US10402402B2 (en) Method, device, server and storage apparatus of reviewing SQL
CN107729480B (en) Text information extraction method and device for limited area
CN111177184A (en) Structured query language conversion method based on natural language and related equipment thereof
CN107145481B (en) Electronic equipment, storage medium, and method and device for filling webpage form
CN107341102B (en) Test case file generation method and device
CN111079408A (en) Language identification method, device, equipment and storage medium
CN111026815B (en) Entity pair specific relation extraction method based on user-assisted correction
CN111143642A (en) Webpage classification method and device, electronic equipment and computer readable storage medium
CN111611788B (en) Data processing method and device, electronic equipment and storage medium
CN110543641B (en) Chinese and foreign language information comparison method and device
CN113032371A (en) Database grammar analysis method and device and computer equipment
CN116521621A (en) Data processing method and device, electronic equipment and storage medium
CN112507721A (en) Method, device and equipment for generating text theme and computer readable storage medium
CN116263767A (en) Database table generation method and system
CN111191469A (en) Large-scale corpus cleaning and aligning method and device
CN115146634A (en) Processing method for converting emergency plan into to-be-processed flow chart and related device
CN112733508B (en) Standard text labeling and standard map building method and device
CN114281761A (en) Data file loading method and device, computer equipment and storage medium
CN111695350B (en) Word segmentation method and word segmentation device for text
CN111401005B (en) Text conversion method and device and readable storage medium
CN113378544A (en) Text analysis method, text data acquisition method, device, medium and equipment
CN109992293B (en) Method and device for assembling Android system component version information
CN117235345B (en) Open format document OFD searching method and device and electronic equipment
CN112949283B (en) Text processing method, device, nonvolatile storage medium and processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination