Method and device for importing table data into database, storage medium and electronic equipment

Through the detailed verification and error reasons for the form data of the table data, it is marked with the cause of error, and the downloadable error form is generated, which solves the problem of low efficiency of table data in the existing technology, and improves the ability of user identification and correcting error data.

CN119336756APending Publication Date: 2025-01-21DONGTU TECH (YICHANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411360660.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, the efficiency of importing table data into the database is low, and users cannot identify and correct erroneous data in a timely manner.

Method used

After obtaining the target table, check each data under each field of each sub -table, export the target line data when you find the error data, and add the cause of the error in the subsequent column, generate the downloadable table for users to view and Revise.

Benefits of technology

By generating a downloadable table with error reasons, users can easily identify and correct error data, thereby improving the efficiency of the form data import to the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336756A_ABST
    Figure CN119336756A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for importing table data into a database, a storage medium and electronic equipment. The method comprises the steps that under the condition that a target table is obtained, each piece of data under each field of each sub-table in the target table is verified; under the condition that the error data are verified, exporting data of a target row where the error data are located; adding an error reason of the error data to the column behind the exported data of the target row; and generating a downloadable table from the exported data of the target line and the added error reason for a user to download. The technical problem that the efficiency of importing the table data into the database is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database data import, and in particular to a method, device, storage medium and electronic device for importing table data into a database. Background Art

[0002] In the prior art, data in a table can be imported into a database. For example, data of multiple students in a class can be imported into a school database for storage through a table. However, since the table data is generally filled in manually or copied in batches, errors are prone to occur. At this time, it is necessary to verify the table data when importing it into the database.

[0003] However, in the prior art, if there is an error in the table data, the verification fails and the user cannot know where the error is and how to correct it, thus resulting in low efficiency when importing the table data into the database. Summary of the invention

[0004] The present application provides a method, device, storage medium and electronic device for importing table data into a database, so as to solve the technical problem of low efficiency in importing table data into a database.

[0005] In a first aspect, the present application provides a method for importing table data into a database, comprising: when a target table is obtained, verifying each data under each field of each sub-table in the above target table; when erroneous data is verified, exporting the data of the target row where the erroneous data is located; adding the error cause of the erroneous data in the subsequent column of the exported data of the above target row; generating the exported target row data and the added error cause into a downloadable table for downloading by users.

[0006] In a second aspect, the present application provides a device for importing table data into a database, comprising: a verification module, which is used to verify each data under each field of each sub-table in the target table when the target table is obtained; an export module, which is used to export the data of the target row where the erroneous data is located when the erroneous data is verified; an adding module, which is used to add the error cause of the erroneous data in the next column of the exported data of the target row; and a generating module, which is used to generate the exported target row data and the added error cause into a downloadable table for downloading by users.

[0007] As an optional example, the above-mentioned device also includes: a processing module, which is used to divide the data in the above-mentioned target table into multiple parts in the process of obtaining the target table and verifying each data under each field of each sub-table in the above-mentioned target table; verifying each part in turn; obtaining the verification progress once every predetermined time period; and displaying the above-mentioned verification progress on the front end.

[0008] As an optional example, the above-mentioned processing module includes: a processing unit, used to determine the first data volume of the first part that has been verified and the first data volume of the current part being verified at predetermined time intervals; determine the total data volume of the above-mentioned target table; and determine the ratio of the above-mentioned first data volume to the above-mentioned total data volume as the above-mentioned verification progress.

[0009] As an optional example, the above-mentioned verification module includes: a first verification unit, used to determine each field in the above-mentioned target table as the current field; determine the first verification method matching the current field from the preset basic verification methods; and verify each data under the above-mentioned current field through the above-mentioned first verification method.

[0010] As an optional example, the above-mentioned verification module also includes: a second verification unit, which is used to determine each row in the above-mentioned target table as the current row after verifying each data under the above-mentioned current field through the above-mentioned first verification method; determine a second verification method matching the current row from the preset custom verification method; and verify the data relationship between each data in the above-mentioned current row through the above-mentioned second verification method.

[0011] As an optional example, the above-mentioned verification module also includes: a third verification unit, which is used to determine the target column in the above-mentioned target table as the current column after verifying the data relationship between each data in the above-mentioned current row through the above-mentioned second verification method; determine a third verification method matching the current column from the preset custom verification methods; and verify each data in the above-mentioned current column through the above-mentioned third verification method.

[0012] As an optional example, the above-mentioned adding module includes: an adding unit, which is used to determine the verification method used when the above-mentioned error data is generated; and determine the error information matching the above-mentioned verification method as the above-mentioned error data.

[0013] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor is configured to implement any one of the above-mentioned methods for importing tabular data into a database when executing the computer program.

[0014] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute any of the above methods for importing tabular data into a database of the present application.

[0015] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the scheme provided by the embodiment of the present application, by verifying each data under each field of each sub-table in the above-mentioned target table when the target table is obtained; when the erroneous data is verified, the data of the target row where the above-mentioned erroneous data is located is exported; the error cause of the above-mentioned erroneous data is added to the latter column of the exported data of the above-mentioned target row; the exported target row data and the added error cause are generated into a downloadable table for users to download, so that when the table data is imported into the database, if some data fails the verification, a downloadable table with the error cause can be generated for users to view and modify, thereby improving the efficiency of importing the table data into the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0019] Figure 1 A flowchart of a method for importing table data into a database provided in an embodiment of the present application;

[0020] Figure 2A downloadable table diagram of a method for importing table data into a database provided in an embodiment of the present application;

[0021] Figure 3 A diagram of the causes of errors in a method for importing table data into a database provided in an embodiment of the present application;

[0022] Figure 4 A flowchart of a method for importing table data into a database provided in an embodiment of the present application;

[0023] Figure 5 A schematic diagram of the structure of a device for importing table data into a database provided in an embodiment of the present application;

[0024] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0026] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0027] In order to solve the technical problem of low efficiency in importing tabular data into a database in the prior art, the present application provides a method for importing tabular data into a database, which can achieve the effect of improving the efficiency of importing tabular data into a database.

[0028] Figure 1 A flowchart of a method for importing table data into a database provided in an embodiment of the present application. Figure 1 As shown, the above table data importing method into the database includes:

[0029] S102, when the target table is obtained, verify each data under each field of each sub-table in the target table;

[0030] S104, when erroneous data is detected, exporting the data of the target row where the erroneous data is located;

[0031] S106, adding the error cause of the erroneous data to the next column of the exported data of the target row;

[0032] S108, generating a downloadable table with the exported target row data and the added error reasons for the user to download.

[0033] Optionally, the target table in this embodiment can be a data table consisting of multiple data input boxes, each data in the top row of the data table is a data field, and the data in the data field column is the data marked by the data field. The target table can be an Excel table, or a WPS table, etc.

[0034] The above target table includes field rows, which include multiple data fields, and multiple data rows under the field rows, and the data in the data rows correspond to the above data fields. For example, a target table is an information table of students in a class, which includes multiple fields such as student name, student gender, and student age. The name, gender, and age of each student constitute the data information of one student, which occupies one row in the target table.

[0035] If the student input in the target table is imported into the school database, the data in the target table must be verified and then imported into the school database.

[0036] If the data in the target table is found to be incorrect, the target row where the incorrect data is located will be exported. For example, taking the information of students in the above class as an example, the gender column of a student is filled with 16 (it may be filled with age). After verification, it is found that the data type filled in is incorrect. Therefore, the student's data will be exported, and the error reason of the data will be added to the column after the last column of the row of data, such as data type error. After filling in the error reason, the exported target row and error reason will be generated as a downloadable table for users to download. For example, if Figure 2 As shown, Figure 2 Schematic diagram of an exemplary downloadable table. The downloadable table includes the target row where the error data is located and the error reason. In another example, the downloadable table includes all the data in the target table, wherein the row where the error data is located is marked with the error reason, and the data row that does not include the error data is not marked with the error reason.

[0037] Figure 3 The following is an example of an error cause diagram. The error cause is marked after the row where the error data is located for the user to view.

[0038] The solution provided by the embodiment of the present application verifies each data under each field of each sub-table in the target table when the target table is acquired; when erroneous data is verified, the data of the target row where the erroneous data is located is exported; the error cause of the erroneous data is added in the latter column of the exported data of the target row; the exported data of the target row and the added error cause are generated as a downloadable table for users to download, so that when the table data is imported into the database, if some data fails the verification, a downloadable table with the error cause can be generated for users to view and modify, thereby improving the efficiency of importing the table data into the database.

[0039] As an optional example, in the process of obtaining the target table and verifying each data under each field of each sub-table in the above target table, the above method also includes: dividing the data in the above target table into multiple parts; verifying each part in turn; obtaining the verification progress once every predetermined time period; and displaying the above verification progress on the front end.

[0040] In this embodiment, after obtaining the target table, first check whether the target table contains a subtable. If the target table contains one subtable, the table can be regarded as the target table. If the target table contains multiple subtables, each subtable must be checked and imported into the database.

[0041] In this embodiment, the sub-table of the target table may be divided into multiple parts, and the data volume of each part may be the same or different. The parts may be divided according to the sub-tables or according to the data fields.

[0042] After dividing into multiple parts, each part contains a part of the data of the target table. Each part can be imported into the database in sequence. The purpose of sequential import is that if erroneous data is found, you can jump to the next part for import, and the part with erroneous data can be suspended for import.

[0043] The system background can monitor the data that has been imported, the data that is being imported, and the total amount of data in the target table, so that the data that has been imported can be compared with the total data in the target table to obtain a verification progress, and the verification progress can be displayed in the foreground. For example, the verification progress can be displayed in the form of a percentage or a progress bar.

[0044] As an optional example, obtaining the verification progress once every predetermined period of time includes: determining the first data volume of the first part that has been verified and the first data volume of the current part being verified every predetermined period of time; determining the total data volume of the target table; and determining the ratio of the first data volume to the total data volume as the verification progress.

[0045] In this embodiment, the system background can monitor the data part that has been imported, the data part that is being imported, and the total amount of data in the target table, so that the data part that has been imported can be compared with the total data of the target table to obtain a verification progress.

[0046] For example, taking the above-mentioned example of dividing the target table into multiple data parts, the target table can be divided into one part for every 10 rows of data, and then the target table is divided into multiple parts, and finally data with less than 10 rows is divided into one part.

[0047] Then, in the process of verifying the data, at the current moment, you can check the verified parts, each part is 10 rows of data, and the number of rows that have been verified in the part currently being verified, and get the first amount of data that has been verified. The total number of rows of data in the target table is the total data volume, and the ratio of the first amount of data to the middle amount of data is determined as the verification progress. For example, 40 rows have been verified, and there are a total of 100 rows of data, so the verification progress is 40%. By displaying 40% on the front-end interface, or displaying a progress bar, the user can intuitively see the current verification progress.

[0048] As an optional example, when the target table is obtained, verifying each data under each field of each sub-table in the target table includes: determining each field in the target table as the current field; determining a first verification method that matches the current field from preset basic verification methods; and verifying each data under the current field by using the first verification method.

[0049] In this embodiment, there are multiple verification methods for the data in the target table. As one of the verification methods, the first verification method mentioned above can be to verify the data length, type and format of the data in the target table, that is, to verify whether each data is correct. If the length of the data does not meet the standard, or the format is incorrect, it means that the data is erroneous data. In addition, for erroneous data, the error type can also be marked.

[0050] For example, in the table of student information in the above class, the number "16" entered in the student's gender column can be checked and found to be of incorrect data type. The gender that needs to be entered should be "male" or "female". In this case, the incorrect data can be marked as incorrect data type. Alternatively, in the ID number column, if the ID number entered is one digit less or more, it can be determined that the data format is incorrect, and a mark can be added to indicate that the data length is incorrect.

[0051] After verification by the first verification method, data with incorrect data length, type and format can be marked as erroneous data, and the error type is marked.

[0052] As an optional example, after verifying each data under the current field through the first verification method, the method further includes: determining each row in the target table as the current row; determining a second verification method matching the current row from a preset custom verification method; and verifying the data relationship between each data in the current row through the second verification method.

[0053] In this embodiment, there are multiple verification methods for the data in the target table. As one of the verification methods, the second verification method mentioned above can be a comprehensive verification of a row of data in the target table. After the first verification method, it can be determined that the length, type and format of the data in the target table are correct. Then, in the second verification method, a comprehensive verification can be performed on the data in a row. The comprehensive verification can verify the previous and next associations in the row of data. For example, for a student with a name of so-and-so, an age of 16, and a gender of male, after verification, it is found that the date of birth in the ID number indicates that the student is 40 years old, which can clearly indicate that there is an error in the row of data. The type of error may be that the age is filled in incorrectly, or the ID number is filled in incorrectly. At this time, according to the table to which the data belongs, it can be known that the table is a student information table, and it can be determined that the ID number is filled in incorrectly. In addition, for example, for a worker information table, in the worker's belonging part, it is determined that the worker belongs to a certain department, and in this row, the worker's work number number does indicate that the worker belongs to another department, then it can be determined that one of the worker's department or work number number is wrong. The department and work number number can be marked as mismatched. By performing correlation verification on the positive row data, the accuracy of data verification can be improved.

[0054] As an optional example, after verifying the data relationship between each data in the current row through the second verification method, the method further includes: determining the target column in the target table as the current column; determining a third verification method matching the current column from the preset custom verification methods; and verifying each data in the current column through the third verification method.

[0055] In this embodiment, there are multiple verification methods for the data in the target table. As one of the verification methods, the third verification method mentioned above can be used to verify whether the data is repeated. The verification has two levels. The first level is to verify whether the data is unique in the target table or in certain columns of the target table. For example, the numbers of students in a class, each class can have numbers from 1 to dozens, each number corresponds to a student, and the numbers of different classes can be repeated. The second level is to verify whether the data is unique in the database. At this time, the data in the target table needs to be uniquely verified with all the data in the database. For example, the identity card number is unique, so it needs to be uniquely verified with all the data in the database.

[0056] As an optional example, the error reason for adding the above-mentioned error data in the latter column of the exported data of the above-mentioned target row includes: determining the verification method used when the above-mentioned error data is generated; and determining the error information matching the above-mentioned verification method as the above-mentioned error data.

[0057] After the above three verification methods are verified, for the erroneous data, the error reasons are added, and for the data without errors, it can be imported into the database. The erroneous data can generate a table and add the error reasons. The user can directly adjust it in the added table. After the adjustment, the adjusted data is imported into the database. When importing, the system can automatically delete the error reason column. If an error is found, add the error reason column again, or keep the column and delete it when the data is found to be error-free during verification.

[0058] Figure 4 This is a flow chart of the present embodiment. The present embodiment hopes to simplify the development process when the target table, such as an Excel table, is imported into the database, standardize and normalize the development process, improve the verification logic, optimize the error message prompt method, and add the display of the overall execution progress of the task. Therefore, the user can customize the verification content to verify the data. The user can also set the template of the target table to specify the format, length, type, etc. of the data, and verify it according to the customized content. If the user does not customize it, the default template and default verification rules can be used.

[0059] This embodiment provides three verification methods. The first is the basic verification of the imported data in the target table to be imported into the database, such as length, format, etc. If the requirements are not met, the error message will be displayed in the error information file according to the preset error prompt, that is, Figure 2The downloadable table is shown. When the first step of verification is passed, the second and third verification methods will be carried out, such as detailed database verification, such as global uniqueness of data, data relevance, data existence, etc. Similarly, when the requirements are not met, there will be corresponding error prompts according to the specific business, and finally presented in the error information file. After the verification is completed, save or modify the data, and the entire import business is completed.

[0060] The first verification method can implement general basic verification through annotations: use custom annotation technology plus reflection programming to add annotations to model objects, which can limit the length of data, enumeration values, or regular matching. According to the reflection principle, the annotation information added to the model class is obtained, and verification is performed according to the rules. If it fails, the error prompt pre-made in the message field is returned.

[0061] The second type of verification can be the verification of a row of data, which is verified based on the correlation between the data. This verification is an extensible custom verification: different businesses have their own business attributes, which must have their own correlation and particularity. This architecture provides an extensible abstract solution checkInDb to allow specific businesses to perform sub-customized verification when there are business restrictions. For example, for a student with a name of so-and-so, age of 16, and gender of male, after verification, it is found that the date of birth in the ID number indicates that the student is 40 years old, which can clearly indicate that there is an error in the data in this row. The type of error may be that the age is filled in incorrectly, or the ID number is filled in incorrectly. The cause of the error may be that the age does not match the ID number.

[0062] The third type of validation is usually used to verify the uniqueness of data in the current table. This method can be rewritten for attributes that require uniqueness. Usually, a collection class is defined and the field data is placed in the collection class. When the next object is validated, it is first determined whether the same attribute already exists in the collection class. If so, an error message is given, that is, the cause of the error. In addition, the uniqueness check of the entire database can also be included.

[0063] In this embodiment, a task execution status can be globally defined. When there is error data in the task execution, the original file data and error prompt information will be written into a new Excel spreadsheet, uploaded to the file system, and a file download link will be returned to the client. The client display effect is as follows Figure 2 As shown, the serial number can correspond to the name of the sheet page of the target table. The number of successes and the number of failures respectively indicate the number of data items processed successfully and failed on the current sheet page. By clicking the Download Import Error Information button, you can clearly see at the end of the line in the Excel file that this row of data cannot be imported due to a problem, such as Figure 3, and can give specific error prompts. When the error is fixed, you can successfully import the data by importing the modified file again.

[0064] The import task will generally read and process the row data of the Excel table in batches, and obtain the proportion of data that has been processed based on the current number of rows processed and the total number of rows. This value is stored in the redis cache, and the front end calls the interface to query and update the progress every 5 seconds. For tasks with a small overall data volume, this progress prompt is of little significance and is frequently closed. When the task execution takes more than 3 minutes, this data is very intuitive on the interface, and people will not have misunderstandings such as whether the system is stuck.

[0065] In this embodiment, the sheet page handler parser can be defined according to Excel to implement the BaseImportHandler abstract method. In the parser, some basic information of the parser is improved, such as sheet name, header information, etc., the basic verification detailed verification logic is improved, and data processing is added. After these tasks are completed, the doImport method of EasyExcelUtil can be called to complete the entire import process.

[0066] Figure 5 This is a schematic diagram of a structure of a device for importing table data into a database provided in an embodiment of the present application. Figure 5 As shown, the above-mentioned table data importing database device includes:

[0067] The verification module 502 is used to verify each data under each field of each sub-table in the target table when the target table is obtained;

[0068] An export module 504 is used to export the data of the target row where the erroneous data is located when the erroneous data is verified;

[0069] An adding module 506 is used to add the error cause of the error data in the next column of the data of the exported target row;

[0070] The generating module 508 is used to generate the exported target row data and the added error reasons into a downloadable table for users to download.

[0071] Optionally, the target table in this embodiment can be a data table consisting of multiple data input boxes, each data in the top row of the data table is a data field, and the data in the data field column is the data marked by the data field. The target table can be an Excel table, or a WPS table, etc.

[0072] The above target table includes field rows, which include multiple data fields, and multiple data rows under the field rows, and the data in the data rows correspond to the above data fields. For example, a target table is an information table of students in a class, which includes multiple fields such as student name, student gender, and student age. The name, gender, and age of each student constitute the data information of one student, which occupies one row in the target table.

[0073] If the student input in the target table is imported into the school database, the data in the target table must be verified and then imported into the school database.

[0074] If the data in the target table is found to be incorrect, the target row where the incorrect data is located will be exported. For example, taking the information of students in the above class as an example, the gender column of a student is filled with 16 (it may be filled with age). After verification, it is found that the data type filled in is incorrect. Therefore, the student's data will be exported, and the error reason of the data will be added to the column after the last column of the row of data, such as data type error. After filling in the error reason, the exported target row and error reason will be generated as a downloadable table for users to download. For example, if Figure 2 As shown, Figure 2 Schematic diagram of an exemplary downloadable table. The downloadable table includes the target row where the error data is located and the error reason. In another example, the downloadable table includes all the data in the target table, wherein the row where the error data is located is marked with the error reason, and the data row that does not include the error data is not marked with the error reason.

[0075] Figure 3 The following is an example of an error cause diagram. The error cause is marked after the row where the error data is located for the user to view.

[0076] The solution provided by the embodiment of the present application verifies each data under each field of each sub-table in the target table when the target table is acquired; when erroneous data is verified, the data of the target row where the erroneous data is located is exported; the error cause of the erroneous data is added in the latter column of the exported data of the target row; the exported data of the target row and the added error cause are generated as a downloadable table for users to download, so that when the table data is imported into the database, if some data fails the verification, a downloadable table with the error cause can be generated for users to view and modify, thereby improving the efficiency of importing the table data into the database.

[0077] For other examples of this embodiment, please refer to the above examples and will not be described in detail here.

[0078] like Figure 6As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0079] Memory 113, used for storing computer programs;

[0080] In one embodiment of the present application, the processor 111 is used to implement the method for importing table data into a database provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113.

[0081] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for importing tabular data into a database provided in any of the aforementioned method embodiments is implemented.

[0082] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0084] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0085] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for importing table data into a database, characterized in that: include: When the target table is obtained, verify each data under each field of each sub-table in the target table; In the case where erroneous data is verified, the data of the target row where the erroneous data is located is exported; Add the error cause of the error data in the next column of the exported data of the target row; The data of the exported target row and the added error cause are generated into a downloadable table for downloading by the user.

2. The method according to claim 1, characterized in that In the process of obtaining the target table and verifying each data under each field of each sub-table in the target table, the method further includes: Dividing the data in the target table into a plurality of parts; Verify each part in turn; Get the verification progress once every predetermined time; The verification progress is displayed on the front end.

3. The method according to claim 2, characterized in that The obtaining of the verification progress once every predetermined time period includes: At predetermined time intervals, determining a first data amount of a first part that has been verified and a current part that is being verified; Determine the total data volume of the target table; The ratio of the first data amount to the total data amount is determined as the verification progress.

4. The method according to claim 1, characterized in that: In the case where the target table is obtained, verifying each data under each field of each sub-table in the target table includes: Determine each field in the target table as a current field; Determine a first verification method that matches the current field from among the preset basic verification methods; Each data under the current field is verified by the first verification method.

5. The method according to claim 4, characterized in that After verifying each data under the current field by using the first verification method, the method further includes: Determine each row in the target table as a current row; Determine a second validation method that matches the current row from the preset custom validation methods; The data relationship between each data in the current row is verified by the second verification method.

6. The method according to claim 5, characterized in that After verifying the data relationship between each data in the current row by using the second verification method, the method further includes: Determine the target column in the target table as the current column; From the preset custom validation methods, determine a third validation method that matches the current column; Each data in the current column is verified by the third verification method.

7. The method according to claim 6, characterized in that The error reasons for adding the erroneous data in the latter column of the exported target row of data include: Determine the verification method used when the erroneous data is generated; The error information matching the verification mode is determined as the error data.

8. A device for importing table data into a database, characterized in that: include: A verification module, for verifying each data under each field of each sub-table in the target table when the target table is acquired; An export module is used to export the data of the target row where the erroneous data is located when the erroneous data is verified; An adding module, used for adding the error cause of the error data in the next column of the exported data of the target row; The generating module is used to generate the exported target row data and the added error cause into a downloadable table for users to download.

9. An electronic device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the memory stores a computer program, and when the processor executes the computer program, the method for importing tabular data into a database as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing computer-executable instructions for executing the method for importing table data into a database as described in any one of claims 1 to 7 of the present application.