A table data correction method, device, equipment and storage medium
By acquiring the target table and determining the set of equations, and using the set of equations to verify and correct the table data, the problem of inaccurate location and correction of erroneous table data in existing technologies is solved, thereby improving the accuracy of table data.
Patent Information
- Application Number
- CN202210729565.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-06-24
AI Technical Summary
Existing technologies cannot accurately locate and correct erroneous data in tables, resulting in low accuracy of table data.
By acquiring the target table and preprocessing it, we determine the set of equations corresponding to the table, and use the set of equations to verify the original table data, accurately locate and correct erroneous data.
It enables accurate location and correction of erroneous data in tables, thereby improving the accuracy of table data.
Smart Images

Figure CN115796153B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a table data correction method and device, equipment and storage medium. BACKGROUND
[0002] With the continuous development and popularization of computer technology, electronic data such as tables grows exponentially, and how to ensure the accuracy of table data has always been the focus of industry insiders.
[0003] At present, the table header data is extracted, and the accuracy of the table data is verified according to the possible business relationship between each table header data.
[0004] However, this method has low accuracy and cannot accurately locate the error data in the table and correct the error data. SUMMARY
[0005] Embodiments of the present application provide a table data correction method, device, equipment and storage medium to accurately locate error data in a table and correct the error data.
[0006] In a first aspect, embodiments of the present application provide a table data correction method, which comprises:
[0007] Obtaining a target table and preprocessing the target table to obtain original table data corresponding to the target table;
[0008] Determining an equation set corresponding to the target table according to the data characteristics of each original table data;
[0009] Verifying each original table data by each target equation in the equation set to obtain target data to be corrected, and correcting the target data.
[0010] In a second aspect, embodiments of the present application also provide a table data correction device, which comprises:
[0011] A target table acquisition module is configured to obtain a target table and preprocess the target table to obtain original table data corresponding to the target table;
[0012] An equation set determination module is configured to determine an equation set corresponding to the target table according to the data characteristics of each original table data;
[0013] A verification module is configured to verify each original table data by each target equation in the equation set to obtain target data to be corrected, and correct the target data.
[0014] In a third aspect, an embodiment of the present application provides a table data correction device, comprising:
[0015] one or more processors;
[0016] a storage device configured to store one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the table data correction method according to any one of the embodiments of the present application.
[0018] In a fourth aspect, an embodiment of the present application provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, perform the table data correction method according to any one of the embodiments of the present application.
[0019] The embodiments of the present application obtain a target table, and pre-process the target table to obtain original table data corresponding to the target table; determine an equation set corresponding to the target table according to data characteristics of each of the original table data; verify each of the original table data by each target equation in the equation set to obtain target data to be corrected, and correct the target data, so that the error data in the table can be accurately located and corrected. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is a flowchart of a table data correction method according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of a table data correction method according to an embodiment of the present application;
[0022] Figure 3 is a flowchart of a table data correction method according to an embodiment of the present application;
[0023] Figure 4 is a structural schematic diagram of a table data correction device according to an embodiment of the present application;
[0024] Figure 5 is a structural schematic diagram of a table data correction device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The application examples are further described in detail below with reference to the drawings and examples. It can be understood that the specific examples described herein are only used to explain the application examples, and not to limit the application examples. In addition, it should be noted that, for the convenience of description, only the parts related to the application examples are shown in the drawings, not all the structures.
[0026] Example one
[0027] Figure 1 is a flowchart of a table data correction method in the application example one. The present example can be applicable to the case of locating and correcting error data in a table. The method can be executed by a table data correction device, which can be realized by software and / or hardware, and integrated in a table data correction equipment for executing the method. In the present example, the table data correction equipment can be an electronic device such as a computer, a server or a tablet computer, which is not limited in the present example. Specifically, referring to Figure 1 , the method specifically includes the following steps:
[0028] Step 110, obtaining a target table and pre-processing the target table to obtain original table data corresponding to the target table.
[0029] In the present example, the target table can be a financial table, a score table or a production data table, which is not limited in the present example.
[0030] In an optional implementation manner of the present example, after obtaining the target table, the obtained target table can be further pre-processed to obtain the original table data corresponding to the target table.
[0031] Optionally, the pre-processing of the obtained target table can include eliminating the header data of the target table to obtain a target table not containing the header data. In the present example, the header data of the target table can be the first row data, the first column data or the first row data and the first column data containing string information in the target table. For example, in a score table, the first row data is subject and the first column data is name. The pre-processed original table data corresponding to the target table is a score table data not containing the name and the subject. In an import and export table, the first row data is import and export item and the first column data is time. The pre-processed original table data corresponding to the target table is an amount table not containing the import and export item and the time.
[0032] Step 120, determining an equation set corresponding to the target table according to the data characteristics of each original table data.
[0033] The data characteristics of each original table data can be a maximum value, a minimum value, or an average value in each original table data, and are not limited in the embodiment.
[0034] In an optional implementation of the embodiment, after obtaining the original table data corresponding to the target table, the data characteristics of each original table data can be further obtained, and the equation set corresponding to the target table is determined according to the obtained data characteristics.
[0035] For example, if the target table is an import and export table, the maximum value, the minimum value, or the average value of each column in the amount table obtained by preprocessing can be determined, so as to obtain the data characteristics of each column, and the equation set corresponding to the import and export table is determined according to the data characteristics.
[0036] It should be noted that in the embodiment, the equation set corresponding to different tables is different, which is related to the data characteristics of the table data, and is irrelevant to the generation time, size, and other attribute information of the table.
[0037] In an optional implementation of the embodiment, determining the equation set corresponding to the target table according to the data characteristics of each original table data can include extracting each original table data in the target table by row or column to obtain row original table data or column original table data; performing feature analysis on the target row original table data or the target column original table data to obtain the data characteristics corresponding to the target row original table data or the target column original table data; analyzing the data characteristics to obtain the target equation set corresponding to the target row original table data or the target column original table data, and adding the target equation set to the equation set corresponding to the target table.
[0038] Optionally, after obtaining the original table data corresponding to the target table, each column data of the original table data can be further extracted to obtain a plurality of column original table data; and further, the data characteristics analysis can be performed on each column original table data to obtain the data characteristics corresponding to each column original table data.
[0039] Further, the equation set corresponding to each column of the original table data can be induced according to the data characteristics of each column of the original table data; for example, if the target table contains two columns of original table data, and the equation set corresponding to the first column of original table data can be "Array[0]+Array[1]+Array[2]=Array[3], Array[3]+Array[7]+Array
[11] =Array
[12] "; the equation set corresponding to the second column of original table data can be "Array[0]+Array[1]+Array[2]=Array[3], Array[8]+Array[9]+Array
[10] =Array
[11] ", then the equation set corresponding to the target table is "Array[0]+Array[1]+Array[2]=Array[3], Array[3]+Array[7]+Array
[11] =Array
[12] , Array[8]+Array[9]+Array
[10] =Array
[11] ".
[0040] Step 130, verifying each original table data through each target equation in the equation set to obtain target data to be corrected, and correcting the target data.
[0041] In an optional implementation of the embodiment, after determining the equation set corresponding to the target table according to the data characteristics of each original table data, each target equation in the equation set can be further verified to obtain target data to be corrected, and the target data is corrected, thereby ensuring the accuracy of the table data in the target table.
[0042] The scheme of the embodiment obtains a target table, pre-processes the target table to obtain original table data corresponding to the target table, determines an equation set corresponding to the target table according to the data characteristics of each original table data, verifies each original table data through each target equation in the equation set to obtain target data to be corrected, and corrects the target data, which can accurately locate the error data in the table and correct the error data.
[0043] Embodiment Two
[0044] Figure 2 is a flowchart of a table data correction method in the embodiment two of the present application, and the embodiment is a further refinement of the above technical solutions. The technical solution in the embodiment can be combined with one or more optional schemes in the above embodiments. As shown in Figure 2 The table data correction method can include the following steps:
[0045] In step 210, the target table is obtained and preprocessed to obtain original table data corresponding to the target table.
[0046] In step 220, each original table data in the target table is extracted according to a row or a column to obtain row original table data or column original table data; feature analysis is performed on the target row original table data or the target column original table data to obtain data features corresponding to the target row original table data or the target column original table data; analysis is performed on the data features to obtain a target equation set corresponding to the target row original table data or the target column original table data, and the target equation set is added to an equation set corresponding to the target table.
[0047] In step 230, frequency features corresponding to each reference equation in the equation set are determined; and when a target frequency feature corresponding to a target reference equation does not satisfy a preset relationship, the target reference equation is filtered out from the equation set.
[0048] In an optional implementation of the embodiment, after the target equation set corresponding to each column original table data or row original table data is added to the equation set corresponding to the target table, frequency features of each reference equation in the equation set can be further determined; the reference equation can be any equation in the equation set; the frequency feature of the reference equation can be a frequency of occurrence, for example, 1 time, 2 times, or 3 times, etc.; or can be a frequency of occurrence, for example, 0.5, 0.6, or 0.67, etc., which is not limited in the embodiment.
[0049] Further, when the target frequency feature corresponding to the target reference equation does not satisfy the preset relationship, the target reference equation can be filtered out from the equation set; the target reference equation can be any equation in the equation set, and the preset relationship can be a threshold relationship; for example, the threshold is set to 0.6 and the preset relationship is greater than the set threshold; if the target frequency feature corresponding to the target reference equation is 0.5, which is less than the set threshold 0.6, the target reference equation is an illegal equation, which can be filtered out from the equation set.
[0050] In one specific example of the embodiment, if the target table contains three columns of original table data, and the equation set corresponding to the first column of original table data can be "Array[0]+Array[1]+Array[2]=Array[3], Array[3]+Array[7]+Array
[11] =Array
[12] ", the equation set corresponding to the second column of original table data can be "Array[0]+Array[1]+Array[2]=Array[3], Array[8]+Array[9]+Array
[10] =Array
[11] ", and the equation set corresponding to the second column of original table data can be "Array[4]+Array[5]+Array[6]=Array[7]". The frequency of the equation Array[0]+Array[1]+Array[2]=Array[3] is 2, and the frequency feature is 2 / 3=0.67, where 0.67 is greater than the set threshold 0.6, so the equation Array[0]+Array[1]+Array[2]=Array[3] is a legal equation and does not need to be filtered out.
[0051] Step 240, verifying each original table data by each target equation in the equation set to obtain target data to be corrected, and correcting the target data.
[0052] The target equation is any legal equation in the equation set, which is not limited in the embodiment.
[0053] In one optional implementation of the embodiment, after determining the equation set corresponding to the target table according to the data features of the original table data, each original table data can be further verified by each target equation in the equation set, so as to obtain target data to be corrected, and the target data to be corrected is corrected; the target data to be corrected can be one or more, which is not limited in the embodiment.
[0054] In one optional implementation of the embodiment, verifying each original table data by each target equation in the equation set can include: if the target table data in the target row original table data or the target column original table data satisfies the target equation, the target table data is accurate data, and the target table data is added to the accurate item set; if the target table data in the target row original table data or the target column original table data does not satisfy the target equation, the target table data is suspicious data, and the target table data is added to the suspicious item set; wherein the target equation is a legal equation satisfying a preset relationship.
[0055] Further, when the number of suspicious data in the suspicious item set is greater than 1, the edit distance of each suspicious data and the corresponding target table data is determined respectively, and when the target edit distance satisfies the preset edit distance condition, it is determined whether the suspicious data corresponding to the target edit distance is the target data to be corrected; when the number of suspicious data in the suspicious item set is 1, the suspicious data is the target data to be corrected.
[0056] In an optional implementation of the embodiment, the correction of the target data can include: correcting the target data by at least one target equation in the equation set.
[0057] In a specific example of the embodiment, all verified legal equations can be used to confirm each column data in the table, if the first equation is verified correctly, the item corresponding to the first equation is added to the accurate item set; further, the second legal equation in the equation set can be used to confirm each column data in the target table, if the second legal equation fails to be verified, the item corresponding to the second legal equation is added to the suspicious item set; further, the accurate item obtained in the previous step is subtracted, and the final suspicious item is obtained.
[0058] Optionally, if there is only one suspicious item, it can be automatically corrected to the correct answer according to the equation; otherwise, the edit distance of each item in the suspicious item and the table value needs to be calculated, if there is only one item with an edit distance less than or equal to 1, it can be considered that the suspicious item is incorrect, and is the target data to be corrected, which needs to be automatically corrected; otherwise, the suspicious item can be added to the error prompt list.
[0059] The technical scheme of the embodiment can accurately determine the equation set corresponding to the target table by determining the frequency characteristics corresponding to each reference equation in the equation set, and filtering out the target reference equation from the equation set when the target frequency characteristics corresponding to the target reference equation do not satisfy the preset relationship, thereby providing a basis for correcting the error data in the table subsequently.
[0060] In order for those skilled in the art to better understand the table data correction method provided by the embodiments of the present application, a specific example is used for illustration as follows: in the following table, the import and export amount in 2013 and the subtotal export amount in 2012-2014 have deviations after character recognition, and can be corrected according to the following steps:
[0061]
[0062]
[0063] Step 1: Preprocess the above table to obtain the following table.
[0064] 46991 15407 31584 43947 13918 30029 40745 13617 27128 131683 42942 88741 40053 13461 26592 33824 13020 20794 30422 12699 17723 104289 39180 65189 28875 12936 15939 28035 11954 16081 24369 10845 13524 81279 35735 45544 317251 117857 199394
[0065] Step 2: Traverse all columns of data in the table above. In this example, taking column 0 as an example, we can obtain the following array:
[0066] 46991 43947 40745 131683 40053 33824 30422 104289 28875 28035 24369 81279 317251
[0067] It can be seen that the following equation exists in the above array:
[0068] 46991+43947+40745=131683 that is Array[0]+Array[1]+Array[2]=Array[3];
[0069] 28875+28035+24369=81279 that is Array[8]+Array[9]+Array
[10] =Array
[11] ;
[0070] 131683+104289+81279=317251, that is, Array[3]+Array[7]+Array
[11] =Array
[12] .
[0071] Therefore, we can extract the equation "0+1+2=3,8+9+10=11,3+7+11=12" from the data in column 0; similarly, traversing the data in column 1 yields the equation "0+1+2=3,4+5+6=7,8+9+10=11,3+7+11=12,0+1+2+4+5+6+8+9+10=12"; traversing the data in column 2 yields the equation "0+1+2=3,8+9+10=11,0+1+2+4+5+6+8+9+10=12".
[0072] Step 3: Taking the equation 3+7+11=12 as an example, the frequency of this equation is 2. Therefore, its corresponding frequency characteristic is 2 / 3=0.67>0.6 (where 3 is the total number of columns in the table above). Thus, the equation 3+7+11=12 is added to the set of equations. Accordingly, the set of equations corresponding to the table above is "0+1+2=3, 8+9+10=11, 3+7+11=12, 0+1+2+4+5+6+8+9+10=12".
[0073] Step 4: Determine the exact items in the table based on the set of equations. For the data in column 0, the set of exact items can be obtained using the equations "0+1+2=3, 8+9+10=11, 3+7+11=12":
[0074] {(0,0),(0,1),(0,2),(0,3),(0,7),(0,8),(0,9),(0,11),(0,12)};
[0075] Similarly, the exact sets of items for the data in column 1 and column 2 are as follows:
[0076] {(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(1,10),(1,11),(1,12)},
[0077] {(2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(2,8),(2,9),(2,10),(2,11),(2,12)}.
[0078] Step 5: Determine the erroneous items in the table based on the set of equations. For the data in column 0, the set of suspicious items can be obtained by using the equations “0+1+2=3,8+9+10=11,3+7+11=12,0+1+2+4+5+6+8+9+10=12”: {(0,4), (0,5), (0,6)}.
[0079] Similarly, the sets of suspicious items in column 1 and column 2 are as follows:
[0080] {};
[0081] {(2,7)}.
[0082] Step 6: For the data in column 2, since the only suspicious item is (2,7), the 7th number in column 2, 65189, can be corrected to 65109 using the equation "3+7+11=12" (where 65109=199394-88741-45544). For the data in column 0, since it is impossible to determine which of the three items (0,4), (0,5), and (0,6) is problematic, it is necessary to calculate the edit distance of these three items. The calculated edit distance is:
[0083] 40053, 33824, 30422;
[0084] 40043, 33814, 30412;
[0085] As can be seen, the edit distance of each item is 1, so the suspicious set cannot be excluded. Therefore, these three data items will continue to be kept in the suspicious set.
[0086] Step 7: Transpose the above table by rows and columns to obtain the following:
[0087] 46991 43947 40745 131683 40053 33824 30422 104289 28875 28035 24369 81279 317251 15407 13918 13617 42942 13461 13020 12699 39180 12936 11954 10845 35735 117857 31584 30029 27128 88741 26592 20794 17723 65109 15939 16081 13524 45544 199394
[0088] Repeat steps 1-6, it can be found that the equation 0 = 1 + 2, and after checking, it can be found that 13020 + 20794 = 33814 ≠ 33824, it can be found that the suspicious items {(0, 5), (1, 5), (2, 5)} exist, and there is an intersection {(0, 5)} with the suspicious items before the transpose again, and the calculated values of the two are both 33814, the item is automatically corrected, and after rechecking the other suspicious items, they can meet the requirements of the equation, and after removing them, the suspicious item set before and after the transpose is {}.
[0089] Step 8, output all the automatically corrected items and error prompt items:
[0090] (0, 5) is automatically corrected from 33824 to 33814;
[0091] (2, 7) is automatically corrected from 65189 to 65109.
[0092] In order to make those skilled in the art better understand the table data correction method provided by the embodiments of the present application, Figure 3 is a flowchart of a table data correction method in the second embodiment of the present application, referring to Figure 3 , the method specifically comprises the following steps:
[0093] Step 310, pre-processing to obtain table data without headers.
[0094] Step 320, traversing all columns of the table data to obtain the entire equation set of each column.
[0095] Step 330, counting the number of occurrences of each equation in the equation set to determine the legal equation set.
[0096] Step 340, determining the accurate items of the table data by using the equation set.
[0097] Step 350, determining the suspicious items of the table data by using the equation set.
[0098] Step 351, whether the number of suspicious items is 1;
[0099] If yes, step 352 is executed;
[0100] Otherwise, step 353 is executed.
[0101] Step 352, correcting the item and adding the item to the accurate item set.
[0102] Step 353, calculating the edit distance between the suspicious item and the calculated value.
[0103] Step 360, whether only one item has an edit distance less than or equal to 1;
[0104] If yes, step 352 is performed;
[0105] Otherwise, step 370 is performed.
[0106] Step 370, whether the table has been transposed;
[0107] If yes, step 380 is performed;
[0108] Otherwise, step 390 is performed.
[0109] Step 380, outputting all automatically corrected items and error prompt items.
[0110] Step 390, transposing the table, and swapping rows and columns.
[0111] The scheme of the embodiments of the present application can find equations by searching for features between internal data of a table, and find errors of internal data of the table by using the equations, without the help of special and complex business knowledge and complex matching of table headers and fields, and can well solve error correction and troubleshooting problems encountered in specific application scenarios.
[0112] Embodiment three
[0113] Figure 4 is a structural schematic diagram of a table data correction device in the third embodiment of the present application, which can perform the table data correction method involved in each of the above embodiments. Referring to Figure 4 The device includes a target table acquisition module 410, an equation set determination module 420, and a verification module 430.
[0114] The target table acquisition module 410 is configured to acquire a target table, and pre-process the target table to obtain original table data corresponding to the target table.
[0115] The equation set determination module 420 is configured to determine an equation set corresponding to the target table according to data features of each of the original table data.
[0116] The verification module 430 is configured to verify each of the original table data by using each target equation in the equation set, to obtain target data to be corrected, and correct the target data.
[0117] The scheme of the embodiment obtains a target table through a target table acquisition module, pre-processes the target table, and obtains original table data corresponding to the target table; determines an equation set corresponding to the target table according to data characteristics of each original table data through an equation set determination module; verifies each original table data through a verification module, obtains target data to be corrected, and corrects the target data, so that the error data in the table can be accurately located and corrected.
[0118] In an optional implementation of the embodiment, the target table acquisition module 410 is specifically configured to remove table header data of the target table to obtain the target table, wherein the table header data is first row data and / or first column data including string information.
[0119] In an optional implementation of the embodiment, the equation set determination module 420 is specifically configured to extract each original table data in the target table according to rows or columns to obtain row original table data or column original table data.
[0120] The target row original table data or the target column original table data is subjected to feature analysis to obtain data characteristics corresponding to the target row original table data or the target column original table data.
[0121] The data characteristics are analyzed to obtain a target equation set corresponding to the target row original table data or the target column original table data, and the target equation set is added to an equation set corresponding to the target table.
[0122] In an optional implementation of the embodiment, the equation set determination module 420 is further specifically configured to determine frequency characteristics corresponding to each reference equation in the equation set.
[0123] When a target frequency characteristic corresponding to a target reference equation does not satisfy a preset relationship, the target reference equation is filtered out from the equation set.
[0124] In an optional implementation of the embodiment, the verification module 430 is specifically configured to, if target table data in the target row original table data or the target column original table data satisfies a target equation, the target table data is accurate data, and the target table data is added to an accurate item set.
[0125] If the target table data in the target row original table data or the target column original table data does not satisfy the target equation, the target table data is suspicious data, and the target table data is added to a suspicious item set.
[0126] The target equation is a legal equation satisfying a preset relationship.
[0127] In an optional implementation of the embodiment of the present application, the verification module 430 is further configured to: when the number of suspicious data in the suspicious item set is greater than 1, respectively determine a calculation value of each suspicious data and an edit distance of the corresponding target table data, and when the target edit distance satisfies a preset edit distance condition, determine whether the suspicious data corresponding to the target edit distance is the target data to be corrected.
[0128] When the number of suspicious data in the suspicious item set is 1, the suspicious data is the target data to be corrected.
[0129] In an optional implementation of the embodiment of the present application, the verification module 430 is further configured to correct the target data by using at least one target equation in the equation set.
[0130] The table data correction device provided in the embodiment of the present application can execute the table data correction method provided in any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0131] Embodiment four
[0132] Figure 5 is a structural schematic diagram of a table data correction device in the embodiment four of the present application, as shown in the figure, the table data correction device includes a processor 50, a memory 51, an input device 52 and an output device 53; the number of processors 50 in the table data correction device can be one or more, Figure 5 for example, one processor 50 in the figure; the processor 50, the memory 51, the input device 52 and the output device 53 in the table data correction device can be connected through a bus or other means, Figure 5 for example, connected through a bus in the figure. Figure 5
[0133] The memory 51 is a kind of computer readable storage medium, which can be used to store software programs, computer executable programs and modules, such as program instructions / modules (for example, target table acquisition module 410, equation set determination module 420 and verification module 430 in the table data correction device) corresponding to the table data correction method in the embodiment of the present application. The processor 50 executes the software program, instruction and module stored in the memory 51, thereby executing various function applications and data processing of the table data correction device, i.e. realizing the table data correction method described above.
[0134] The memory 51 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; and the data storage area can store data created according to the use of the terminal and the like. In addition, the memory 51 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 51 can further include a memory disposed remotely with respect to the processor 50, and these remote memories can be connected to the table data correction device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0135] The input device 52 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function controls of the table data correction device. The output device 53 can include a display device such as a display screen.
[0136] Embodiment five
[0137] The embodiment five of the present application also provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used to execute a table data correction method, the method comprising:
[0138] obtaining a target table, and pre-processing the target table to obtain original table data corresponding to the target table;
[0139] determining an equation set corresponding to the target table according to data characteristics of each of the original table data;
[0140] verifying each of the original table data by each target equation in the equation set to obtain target data to be corrected, and correcting the target data.
[0141] Of course, the computer executable instructions of the storage medium provided by the embodiment of the present application are not limited to the method operations as described above, and can also perform related operations in the table data correction method provided by any embodiment of the present application.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disk, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.
[0143] It is worth noting that in the above embodiment of the correction device of table data, each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation, and do not limit the protection scope of the present application.
[0144] Note that the above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method of correcting tabular data, characterized by, The method comprises the following steps: obtaining a target table and preprocessing the target table to obtain original table data corresponding to the target table; determining an equation set corresponding to the target table according to data characteristics of each of the original table data; verifying each of the original table data through each target equation in the equation set to obtain target data to be corrected, and correcting the target data; the step of determining the equation set corresponding to the target table according to the data characteristics of each of the original table data comprises: extracting each of the original table data in the target table according to rows or columns to obtain row original table data or column original table data; performing feature analysis on target row original table data or target column original table data to obtain data characteristics corresponding to the target row original table data or the target column original table data; analyzing the data characteristics to obtain a target equation set corresponding to the target row original table data or the target column original table data, and adding the target equation set to the equation set corresponding to the target table; the step of verifying each of the original table data through each target equation in the equation set to obtain target data to be corrected comprises: if target table data in the target row original table data or the target column original table data satisfies a target equation, the target table data is accurate data, and the target table data is added to an accurate item set; if the target table data in the target row original table data or the target column original table data does not satisfy the target equation, the target table data is suspicious data, and the target table data is added to a suspicious item set; wherein the target equation is a legal equation satisfying a preset relationship; when the number of suspicious data in the suspicious item set is greater than 1, the calculation value of each of the suspicious data and the edit distance of the corresponding target table data are determined respectively, and when the target edit distance satisfies a preset edit distance condition, the suspicious data corresponding to the target edit distance is determined as the target data to be corrected; when the number of suspicious data in the suspicious item set is 1, the suspicious data is the target data to be corrected.
2. The method of claim 1, wherein, the step of preprocessing the target table to obtain original table data corresponding to the target table comprises: eliminating table header data of the target table to obtain the original table data; wherein the table header data is the first row data and / or the first column data including string information.
3. The method of claim 1, wherein, after adding the target equation set to the equation set corresponding to the target table, further comprising: determining a frequency characteristic corresponding to each reference equation in the equation set; when a target frequency characteristic corresponding to a target reference equation does not satisfy a preset relationship, filtering out the target reference equation from the equation set.
4. The method of claim 1, wherein, the step of correcting the target data comprises: correcting the target data through at least one target equation in the equation set.
5. A table data correction device characterized by comprising: The method comprises the following steps: a target table acquisition module is configured to obtain a target table and preprocess the target table to obtain original table data corresponding to the target table; An equation set determination module is configured to determine an equation set corresponding to the target table according to data features of each of the original table data; A verification module is configured to verify each of the original table data by using each target equation in the equation set to obtain target data to be corrected, and correct the target data; The equation set determination module is specifically configured to extract each original table data in the target table according to rows or columns to obtain row original table data or column original table data; The data features corresponding to the target row original table data or the target column original table data are obtained by performing feature analysis on the target row original table data or the target column original table data; The target equation set corresponding to the target row original table data or the target column original table data is obtained by analyzing the data features, and the target equation set is added to the equation set corresponding to the target table; The verification module is specifically configured to, if target table data in the target row original table data or the target column original table data satisfies a target equation, the target table data is accurate data, and the target table data is added to an accurate item set; If the target table data in the target row original table data or the target column original table data does not satisfy the target equation, the target table data is suspicious data, and the target table data is added to a suspicious item set; The target equation is a legal equation satisfying a preset relationship; When the number of suspicious data in the suspicious item set is greater than 1, a calculation value of each of the suspicious data and an edit distance of corresponding target table data are determined, and when the target edit distance satisfies a preset edit distance condition, the suspicious data corresponding to the target edit distance is determined as target data to be corrected; When the number of suspicious data in the suspicious item set is 1, the suspicious data is target data to be corrected.
6. A table data correction device characterized by comprising: The table data correction device comprises: One or more processors; A storage device configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the table data correction method according to any one of claims 1-4.
7. A storage medium containing computer-executable instructions, wherein: The computer executable instructions, when executed by a computer processor, are used to perform the table data correction method according to any one of claims 1-4.
Citation Information
Patent Citations
Spreadsheet formula synthesis and error detection method based on video dynamic analysis
CN111144256A
Bank flow processing method and device, computer equipment and storage medium
CN114119209A