Table data augmentation method, device, equipment and medium

By masking the tabular data and replacing the predicted values, diverse and consistent augmented tabular data is generated, solving the problem of monotonous augmented data in existing technologies and improving the data augmentation effect.

CN115983210BActive Publication Date: 2026-02-03CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211638471.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-19
Publication Date
2026-02-03
Estimated Expiration
2042-12-19

AI Technical Summary

Technical Problem

Existing tabular data augmentation methods generate augmented data that is monotonous and lacks diversity, especially under low-resource conditions.

Method used

The data augmentation model performs a masking operation on the tabular data, predicts the data in the masked fields, determines the target predicted value based on the confidence level of the candidate predicted values, and replaces the masked fields with the target predicted value to generate augmented tabular data with diversity and consistency.

Benefits of technology

It improves the diversity and consistency of tabular data augmentation, thereby enhancing the effectiveness of data augmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115983210B_ABST
    Figure CN115983210B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a table data enhancement method and device, equipment and medium, applied to the field of data processing, using a data enhancement model to perform a mask operation on table data to obtain masked table data, performing data prediction on the masked fields in the masked table data to obtain a plurality of candidate predicted values, determining a plurality of target predicted values from the plurality of candidate predicted values according to the confidence of the candidate predicted values, and using the plurality of target predicted values to replace the masked fields to obtain a plurality of enhanced table data; by setting a masked field for a plurality of cell data of the table data, and predicting the masked field to obtain a plurality of corresponding predicted values, the masked field is replaced by the predicted values, thereby ensuring the diversity of the enhanced data; in addition, when predicting the masked field, a plurality of corresponding predicted values are selected according to the confidence, thereby ensuring the consistency of the enhanced data and improving the data enhancement effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to methods, apparatus, devices and media for tabular data enhancement. Background Technology

[0002] Data augmentation methods utilize a small amount of sample data to generate a large amount of augmented data with data consistency with the sample data. Data augmentation methods are widely used in downstream tasks related to tables, providing more training data and improving the performance of models for these tasks. However, current data augmentation methods often generate augmented data that is homogeneous and lacks diversity, especially under low-resource conditions where the homogeneity of the augmented data becomes more pronounced. Summary of the Invention

[0003] The purpose of this application is to at least partially solve one of the technical problems existing in the related art.

[0004] Therefore, one objective of the embodiments of this application is to provide a method, apparatus, device, and medium for enhancing tabular data, which can ensure the diversity and consistency of the enhanced data.

[0005] To achieve the above objectives, a first aspect of this application provides a method for enhancing tabular data, comprising:

[0006] Retrieve table data;

[0007] Input the table data into the data augmentation model;

[0008] According to the data augmentation model, the table data is masked to obtain masked table data. Data prediction is performed on the mask field in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on the confidence level of the candidate predicted values. The mask field is replaced by the multiple target predicted values ​​to obtain multiple augmented table data, wherein the number of target predicted values ​​is less than the number of candidate predicted values.

[0009] In some embodiments, performing a masking operation on the table data to obtain masked table data includes:

[0010] Select multiple target cell data from multiple cell data in the table data, wherein the number of target cell data is less than the number of cell data;

[0011] The target cell data is replaced with a mask field to obtain the masked table data.

[0012] In some embodiments, the step of performing data prediction on the mask field in the mask table data to obtain multiple candidate predicted values ​​includes:

[0013] The cell data in the mask table data that is in the same column as the mask field is determined as the target column data, and the other cell data in the target column data other than the mask field is determined as the first cell data;

[0014] The cell data in the mask table data that is in the same row as the mask field is determined as the target row data, and the other cell data in the target row data other than the mask field is determined as the second cell data;

[0015] Based on the data in the first cell and the data in the second cell, data prediction is performed on the mask field to match multiple candidate predicted values ​​corresponding to the mask field from a preset vocabulary.

[0016] In some embodiments, determining a plurality of target predicted values ​​from a plurality of candidate predicted values ​​based on the confidence level of the candidate predicted values ​​includes:

[0017] The confidence level of the candidate predicted value is calculated to determine the confidence level of the candidate predicted value;

[0018] The candidate predicted values ​​are sorted according to their confidence levels, and the candidate predicted values ​​that are sorted within a preset range are determined as the target predicted values.

[0019] In some embodiments, replacing the mask field with multiple target predicted values ​​to obtain multiple enhanced table data includes:

[0020] A normalization operation is performed on the multiple target prediction values ​​to obtain multiple normalized values;

[0021] Multiple enhanced table data are obtained by replacing the mask field with multiple normalized values ​​respectively.

[0022] In some embodiments, the tabular data augmentation method further includes:

[0023] The first loss value is obtained by calculating the loss value based on the cell data replaced by the mask field and the word embedding value of the mask field;

[0024] The parameters of the data augmentation model are adjusted based on the first loss value.

[0025] In some embodiments, adjusting the parameters of the data augmentation model based on the first loss value includes:

[0026] Based on the labels of the table data and the first predicted value of the table data by the data augmentation model, a second loss value is calculated to obtain the second loss value.

[0027] The loss value is calculated based on the labels of the table data, the position of the mask field, and the target prediction value to obtain a third loss value;

[0028] The total loss value is obtained by summing the first loss value, the second loss value, and the third loss value;

[0029] The parameters of the data augmentation model are adjusted based on the total loss value.

[0030] To achieve the above objectives, a second aspect of this application provides a tabular data enhancement apparatus, comprising:

[0031] The data acquisition module is used to acquire table data;

[0032] The data input module is used to input the table data into the data augmentation model;

[0033] The data augmentation module is used to perform a masking operation on the table data according to the data augmentation model to obtain masked table data, perform data prediction on the mask field in the masked table data to obtain multiple candidate predicted values, determine multiple target predicted values ​​from the multiple candidate predicted values ​​according to the confidence level of the candidate predicted values, and replace the mask field with the target predicted values ​​to obtain multiple augmented table data, wherein the number of target predicted values ​​is less than the number of candidate predicted values.

[0034] To achieve the above objectives, a third aspect of this application provides an electronic device, the electronic device including a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, wherein the program, when executed by the processor, implements the tabular data enhancement method as described above.

[0035] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions for causing a computer to perform the tabular data enhancement method as described above.

[0036] The table data augmentation method, apparatus, device, and medium of this application embodiment utilize a data augmentation model to perform a masking operation on table data to obtain masked table data. Data prediction is then performed on the masked fields in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on their confidence levels. The multiple target predicted values ​​are then used to replace the masked fields to obtain multiple augmented table data. By setting masked fields for multiple cells of the table data and predicting the masked fields to obtain multiple corresponding predicted values, and replacing the masked fields with the predicted values, the diversity of the augmented data is ensured. Furthermore, when predicting the masked fields, multiple corresponding predicted values ​​are selected based on their confidence levels, ensuring the consistency of the augmented data and improving the data augmentation effect. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of this application or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0038] Figure 1 This is a flowchart illustrating the steps of the tabular data augmentation method provided in an embodiment of this application;

[0039] Figure 2 This is a diagram showing the sub-steps of obtaining masked table data by performing a masking operation on tabular data using a data augmentation model.

[0040] Figure 3 This is a diagram showing the sub-steps of predicting multiple candidate predicted values ​​by performing data prediction on the mask field in the mask table data.

[0041] Figure 4 This is a diagram showing the sub-steps for determining multiple target prediction values ​​from multiple candidate prediction values ​​based on the confidence level of the candidate prediction values.

[0042] Figure 5 This is a diagram illustrating the sub-steps of obtaining multiple enhanced tabular data by replacing the mask field with multiple target predicted values.

[0043] Figure 6 This is a diagram of the sub-steps of the parameter tuning process;

[0044] Figure 7 This is a sub-step diagram of step S420;

[0045] Figure 8 This is a structural diagram of the tabular data enhancement device provided in the embodiments of this application;

[0046] Figure 9 This is a structural diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0049] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0050] In the description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0051] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0052] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0054] The table data augmentation method, apparatus, device, and medium of this application embodiment utilize a data augmentation model to perform a masking operation on table data to obtain masked table data. Data prediction is then performed on the masked fields in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on their confidence levels. The multiple target predicted values ​​are then used to replace the masked fields to obtain multiple augmented table data. By setting masked fields for multiple cells of the table data and predicting the masked fields to obtain multiple corresponding predicted values, and replacing the masked fields with the predicted values, the diversity of the augmented data is ensured. Furthermore, when predicting the masked fields, multiple corresponding predicted values ​​are selected based on their confidence levels, ensuring the consistency of the augmented data and improving the data augmentation effect.

[0055] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0056] Embodiments of this application provide a method for enhancing tabular data.

[0057] Table data augmentation methods include the following steps:

[0058] Step S100: Obtain table data;

[0059] Step S200: Input the tabular data into the data augmentation model;

[0060] Step S300: According to the data augmentation model, the table data is masked to obtain masked table data. Data prediction is performed on the mask field in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on the confidence of the candidate predicted values. The mask field is replaced by the multiple target predicted values ​​to obtain multiple augmented table data. The number of target predicted values ​​is less than the number of candidate predicted values.

[0061] For step S100, obtain tabular data. Tabular data is data composed of rows (samples) and columns (features), such as data in an Excel spreadsheet, which is sample data composed of multiple rows and columns, or data in a machine learning scenario, which is sample data composed of multiple features applied to a machine learning model.

[0062] For example, a table of data looks like this:

[0063] Table 1 Example Table Data

[0064]

[0065] In step S200, the tabular data is input into the data augmentation model so that the subsequent data augmentation model can perform data augmentation processing on the tabular data.

[0066] In step S300, the tabular data is augmented using a data augmentation model to obtain multiple augmented tabular data sets.

[0067] Specifically, a masked table data is obtained by masking the table data through a data augmentation model. Data prediction is performed on the mask field in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on the confidence level of the candidate predicted values. The mask field is replaced by the multiple target predicted values ​​to obtain multiple augmented table data.

[0068] Specifically, masked table data is obtained by performing a masking operation on the table data using a data augmentation model, including but not limited to the following steps:

[0069] Step S311: Select multiple target cell data from multiple cell data in the table data, wherein the number of target cell data is less than the number of cell data;

[0070] Step S312: Replace the target cell data with the mask field to obtain the masked table data.

[0071] For step S311, multiple target cell data are selected from multiple cell data in the table data. For example, for Table 1, which has 36 cell data, any number of cell data are randomly selected from the 36 cell data as target cell data. For example, the cell data in the third row and third column and the cell data in the fourth row and fourth column are selected from the 36 cell data as target cell data.

[0072] It is understood that this embodiment provides the selection of cell data in the third row and third column, and cell data in the fourth row and fourth column as target cell data, but this does not limit the target cell data in this embodiment. In other embodiments, cell data in the second row and third column can be selected as target cell data, and the target cell data can be selected from the cell data.

[0073] It is understood that this embodiment provides an example of selecting two target cell data points, but this does not limit the number of target cell data points in this embodiment. In other embodiments, the number of target cell data points can be three, provided that the number of target cell data points is less than the number of cell data points.

[0074] For step S312, the target cell data is replaced using a mask field. For example, if the cell data in the third row and third column and the cell data in the fourth row and fourth column are determined as the target cell data in step S311, then the "800" in the cell data in the third row and third column is masked with a mask field, and the "400" in the cell data in the fourth row and fourth column is masked with a mask field to obtain the masked table data.

[0075] Data prediction is performed on the mask field in the mask table data to obtain multiple candidate predicted values, including but not limited to the following steps:

[0076] Step S321: Determine the cell data in the mask table data that is in the same column as the mask field as the target column data, and determine the other cell data in the target column data other than the mask field as the first cell data;

[0077] Step S322: Determine the cell data in the mask table data that is in the same row as the mask field as the target row data, and determine the other cell data in the target row data other than the mask field as the second cell data;

[0078] Step S323: Perform data prediction on the mask field based on the data in the first cell and the data in the second cell to match multiple candidate predicted values ​​of the corresponding mask field from a preset vocabulary.

[0079] For step S321, the cell data in the mask table data that is in the same column as the mask field is determined as the target column data, and the other cell data in the target column data other than the mask field is determined as the first cell data. For example, for the mask field of the cell data corresponding to the third row and third column, the cell data in the third column is determined as the target column data, and the other cell data in the third column data other than the mask field is determined as the first cell data, that is, the cell data in the second row and third column, the cell data in the fourth row and third column, the cell data in the fifth row and third column, and the cell data in the sixth row and third column are determined as the first cell data.

[0080] Understandably, if there are two or more mask fields in the same column, for example, a mask field corresponding to the cell data in the second row and third column, and a mask field corresponding to the cell data in the third row and third column, then the other cell data in the third column besides the mask fields corresponding to the cell data in the second row and third column, and the mask fields corresponding to the cell data in the third row and third column, will be determined as the first cell data. That is, the cell data in the fourth row and third column, the cell data in the fifth row and third column, and the cell data in the sixth row and third column will be determined as the first cell data.

[0081] For step S322, the cell data in the mask table data that is in the same row as the mask field is determined as the target row data, and the other cell data in the target row data other than the mask field is determined as the second cell data. For example, for the mask field of the cell data corresponding to the third row and third column, the cell data in the third row is determined as the target column data, and the other cell data in the third row data other than the mask field is determined as the second cell data. That is, the cell data in the first column of the third row, the second column of the third row, the fourth column of the third row, the fifth column of the third row, the sixth column of the third row, and the seventh column of the third row are determined as the first cell data.

[0082] Understandably, if there are two or more mask fields in the same row, for example, a mask field corresponding to the cell data in the first column of the third row and a mask field corresponding to the cell data in the third column of the third row, then the cell data in the third column other than the mask fields corresponding to the cell data in the first column of the third row and the cell data in the third column of the third row will be determined as the second cell data. That is, the cell data in the second column of the third row, the fourth column of the third row, the fifth column of the third row, the sixth column of the third row, and the seventh column of the third row will be determined as the second cell data.

[0083] For step S323, natural language processing technology or other data prediction technology is used to perform data prediction on the mask field based on the data of the first cell and the data of the second cell, so as to match multiple candidate predicted values ​​of the corresponding mask field from the preset vocabulary.

[0084] For example, for the mask field of the cell data corresponding to the third row and third column, the mask field of the corresponding cell data in the third row and third column is predicted based on the data in the first and second cells, namely "research", "700", "600", "500", "2021", "KDD", "500", "25", "40", and "1365". The vocabulary stores multiple fields related to "research", "700", "600", "500", "2021", "KDD", "500", "25", "40", and "1365". Through data analysis and prediction, multiple candidate predicted values ​​with the highest relevance can be matched from these multiple fields.

[0085] Of course, if there are few non-masked fields in the table data, in other embodiments, the masked fields can be predicted directly based on the non-masked fields of all the table data to match multiple candidate predicted values ​​of the corresponding masked fields from a preset vocabulary.

[0086] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Since the natural language involved in this field is the language people use in daily life, it is closely related to linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.

[0087] Multiple target predicted values ​​are determined from multiple candidate predicted values ​​based on the confidence level of the candidate predicted values, including but not limited to the following steps:

[0088] Step S331: Calculate the confidence level of the candidate predicted values ​​and determine the confidence level of the candidate predicted values;

[0089] Step S332: Sort the candidate predicted values ​​according to their confidence levels, and determine the multiple candidate predicted values ​​that are ranked within a preset range as the target predicted values.

[0090] In step S331, the confidence level of the candidate predicted values ​​is calculated to determine the confidence level of each candidate predicted value. It can be understood that a confidence interval for a probability sample is an interval estimate of a certain population parameter for that sample. The confidence interval shows the degree to which the true value of this parameter has a certain probability of falling around the measurement result. The confidence interval gives the range of confidence in the measured value of the measured parameter; this probability is called the confidence level.

[0091] For step S332, the candidate predicted values ​​are sorted according to their confidence levels, and the candidate predicted values ​​that fall within a preset range are determined as the target predicted values. For example, the candidate predicted values ​​are sorted from largest to smallest according to their confidence levels, and the top three candidate predicted values ​​are determined as the target predicted values; or, for another example, the candidate predicted values ​​are sorted from smallest to largest according to their confidence levels, and the bottom three candidate predicted values ​​are determined as the target predicted values.

[0092] Understandably, the n candidate predicted values ​​with the highest confidence levels are selected as the target predicted values.

[0093] Multiple enhanced table data are obtained by replacing the mask field with multiple target predicted values, including but not limited to the following steps:

[0094] Step S341: Normalize the multiple target prediction values ​​to obtain multiple normalized values;

[0095] Step S342: Replace the mask field with multiple normalized values ​​to obtain multiple enhanced table data.

[0096] For step S341, the target predicted value is normalized using the softmax function to obtain the normalized value of the target predicted value. For example, the one-hot encoding value of the cell data in the third row and third column is [0 10]. When the cell data in the third row and third column is masked by a mask field, the predicted value is [.1.7.2] based on the context. The normalized value [.1.7.2] is then normalized to obtain the normalized value [00.78 0.22].

[0097] For step S342, an enhanced table data is obtained by replacing a corresponding mask field with a normalized value. If a table data has a mask field and a mask field has b normalized values, then a*b enhanced table data can be generated.

[0098] By setting mask fields for multiple cells in the table data and predicting the mask fields to obtain multiple corresponding predicted values, the diversity of the augmented data is ensured by replacing the mask fields with the predicted values. In addition, when predicting the mask fields, multiple corresponding predicted values ​​are selected based on the confidence level to ensure the consistency of the augmented data and improve the effect of data augmentation.

[0099] Tabular data augmentation methods also include parameter tuning of the data augmentation model. This parameter tuning can be performed during model training or concurrently with online application of the model.

[0100] The parameter tuning process includes, but is not limited to, the following steps:

[0101] Step S410: Calculate the loss value based on the cell data replaced by the masked field and the word embedding value of the masked field to obtain the first loss value;

[0102] Step S420: Adjust the parameters of the data augmentation model based on the first loss value.

[0103] For step S420, the parameters of the data augmentation model are adjusted based on the first loss value, including but not limited to the following steps:

[0104] Step S421: Calculate the loss value of the first predicted value of the table data based on the labels of the table data and the data augmentation model to obtain the second loss value;

[0105] Step S422: Calculate the loss value based on the position of the label and mask fields in the table data and the target prediction value to obtain the third loss value;

[0106] Step S423: Obtain the total loss value based on the sum of the first loss value, the second loss value, and the third loss value;

[0107] Step S424: Adjust the parameters of the data augmentation model based on the total loss value.

[0108] For step S410, the first loss value can be expressed by the following formula: Where, m t e represents the cell data at position t that has been replaced by the masked field. t is the word embedding value of the mask field, M is the number of cells in the table data, T is the number of mask fields, and f() represents the prediction value of the data augmentation model for the table data.

[0109] For step S421, the second loss value can be expressed by the following formula: Where M is the number of cells in the table data, x iFor the data in the i-th cell, y i Let be the label of the data in the i-th cell.

[0110] For step S422, the third loss value can be expressed by the following formula: Where M is the number of cells in the table data, x i For the data in the i-th cell, y i Let B be the label of the i-th cell; let B be the number of positions of the mask field of the i-th cell; f(x) ij ) represents the target predicted value of the mask field at the j-th position of the data in the i-th cell by the data augmentation model.

[0111] For step S423, the total loss value can be expressed by the following formula: loss total = loss1 + loss2 + loss3.

[0112] For step S424, the parameters of the data augmentation model are adjusted according to the total loss value through the backpropagation algorithm, thereby optimizing the data augmentation model and further ensuring the data consistency between the augmented table data output by the model and the input table data.

[0113] Embodiments of this application provide a tabular data enhancement device.

[0114] The tabular data enhancement device includes a data acquisition module 110, a data input module 120, and a data enhancement module 130.

[0115] The data acquisition module 110 is used to acquire tabular data; the data input module 120 is used to input the tabular data into the data augmentation model; the data augmentation module 130 is used to perform a masking operation on the tabular data according to the data augmentation model to obtain masked tabular data, perform data prediction on the mask field in the masked tabular data to obtain multiple candidate predicted values, determine multiple target predicted values ​​from the multiple candidate predicted values ​​according to the confidence of the candidate predicted values, and replace the mask field with the target predicted values ​​to obtain multiple augmented tabular data, wherein the number of target predicted values ​​is less than the number of candidate predicted values.

[0116] In this embodiment, by setting mask fields for multiple cells of table data and predicting the mask fields to obtain multiple corresponding predicted values, the diversity of the augmented data is ensured by replacing the mask fields with the predicted values. In addition, when predicting the mask fields, multiple corresponding predicted values ​​are selected according to the confidence level to ensure the consistency of the augmented data and improve the effect of data augmentation.

[0117] For the data augmentation module 130, the tabular data is augmented using a data augmentation model to obtain multiple augmented tabular data.

[0118] Specifically, a masked table data is obtained by masking the table data through a data augmentation model. Data prediction is performed on the mask field in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on the confidence level of the candidate predicted values. The mask field is replaced by the multiple target predicted values ​​to obtain multiple augmented table data.

[0119] Select multiple target cells from multiple cells in the table data, where the number of target cells is less than the number of cells; replace the target cells with a mask field to obtain masked table data.

[0120] Specifically, multiple target cells are selected from multiple cells in a table. For example, in Table 1, which has 36 cells, any number of cells are randomly selected as target cells. For instance, the cells in the third row and third column and the cells in the fourth row and fourth column are selected as target cells from the 36 cells.

[0121] It is understood that this embodiment provides the selection of cell data in the third row and third column, and cell data in the fourth row and fourth column as target cell data, but this does not limit the target cell data in this embodiment. In other embodiments, cell data in the second row and third column can be selected as target cell data, and the target cell data can be selected from the cell data.

[0122] It is understood that this embodiment provides an example of selecting two target cell data points, but this does not limit the number of target cell data points in this embodiment. In other embodiments, the number of target cell data points can be three, provided that the number of target cell data points is less than the number of cell data points.

[0123] Replace the target cell data using a mask field; for example, if the cell data in the third row and third column and the cell data in the fourth row and fourth column are determined as the target cell data in step S311, then the "800" in the cell data in the third row and third column is masked with a mask field, and the "400" in the cell data in the fourth row and fourth column is masked with a mask field, and the masked table data can be obtained.

[0124] The data in the mask table data that is in the same column as the mask field is determined as the target column data, and the data in the target column data that is other than the mask field is determined as the first cell data; the data in the mask table data that is in the same row as the mask field is determined as the target row data, and the data in the target row data that is other than the mask field is determined as the second cell data; the mask field is predicted based on the first cell data and the second cell data to match multiple candidate predicted values ​​of the corresponding mask field from a preset vocabulary.

[0125] Specifically, the cell data in the mask table data that is in the same column as the mask field is determined as the target column data, and the other cell data in the target column data, excluding the mask field, is determined as the first cell data. For example, for the mask field corresponding to the cell data in the third row and third column, the cell data in the third column is determined as the target column data, and the other cell data in the third column, excluding the mask field, is determined as the first cell data. That is, the cell data in the second row and third column, the fourth row and third column, the fifth row and third column, and the sixth row and third column are determined as the first cell data.

[0126] Understandably, if there are two or more mask fields in the same column, for example, a mask field corresponding to the cell data in the second row and third column, and a mask field corresponding to the cell data in the third row and third column, then the other cell data in the third column besides the mask fields corresponding to the cell data in the second row and third column, and the mask fields corresponding to the cell data in the third row and third column, will be determined as the first cell data. That is, the cell data in the fourth row and third column, the cell data in the fifth row and third column, and the cell data in the sixth row and third column will be determined as the first cell data.

[0127] In the mask table data, the cell data in the same row as the mask field is determined as the target row data, and the other cell data in the target row data excluding the mask field is determined as the second cell data. For example, for the mask field corresponding to the cell data in the third row and third column, the cell data in the third row is determined as the target column data, and the other cell data in the third row data excluding the mask field is determined as the second cell data. That is, the cell data in the first column of the third row, the second column of the third row, the fourth column of the third row, the fifth column of the third row, the sixth column of the third row, and the seventh column of the third row are determined as the first cell data.

[0128] Understandably, if there are two or more mask fields in the same row, for example, a mask field corresponding to the cell data in the first column of the third row and a mask field corresponding to the cell data in the third column of the third row, then the cell data in the third column other than the mask fields corresponding to the cell data in the first column of the third row and the cell data in the third column of the third row will be determined as the second cell data. That is, the cell data in the second column of the third row, the fourth column of the third row, the fifth column of the third row, the sixth column of the third row, and the seventh column of the third row will be determined as the second cell data.

[0129] Using natural language processing or other data prediction techniques, data prediction is performed on the mask field based on the data in the first cell and the data in the second cell, so as to match multiple candidate predicted values ​​of the corresponding mask field from a preset vocabulary.

[0130] For example, for the mask field of the cell data corresponding to the third row and third column, the mask field of the corresponding cell data in the third row and third column is predicted based on the data in the first and second cells, namely "research", "700", "600", "500", "2021", "KDD", "500", "25", "40", and "1365". The vocabulary stores multiple fields related to "research", "700", "600", "500", "2021", "KDD", "500", "25", "40", and "1365". Through data analysis and prediction, multiple candidate predicted values ​​with the highest relevance can be matched from these multiple fields.

[0131] Of course, if there are few non-masked fields in the table data, in other embodiments, the masked fields can be predicted directly based on the non-masked fields of all the table data to match multiple candidate predicted values ​​of the corresponding masked fields from a preset vocabulary.

[0132] Calculate the confidence level of the candidate predicted values ​​to determine their confidence level; sort the candidate predicted values ​​according to their confidence level values, and determine the target predicted values ​​as the multiple candidate predicted values ​​that are ranked within a preset range.

[0133] Specifically, confidence levels are calculated for candidate predicted values ​​to determine their confidence scores. In essence, a confidence interval for a probability sample is an interval estimate of a population parameter within that sample. The confidence interval shows the degree to which the true value of this parameter has a certain probability of falling within the range of the measured result. The confidence interval provides the range of confidence in the measured value of the measured parameter; this probability is called the confidence level.

[0134] Candidate predicted values ​​are sorted according to their confidence levels, and the candidate predicted values ​​that fall within a preset range are selected as target predicted values. For example, candidate predicted values ​​are sorted from highest to lowest confidence level, and the top three candidate predicted values ​​are selected as target predicted values; conversely, candidate predicted values ​​are sorted from lowest to highest confidence level, and the bottom three candidate predicted values ​​are selected as target predicted values.

[0135] Understandably, the n candidate predicted values ​​with the highest confidence levels are selected as the target predicted values.

[0136] Normalize multiple target prediction values ​​to obtain multiple normalized values; use these normalized values ​​to replace the mask field to obtain multiple enhanced table data.

[0137] Specifically, the target predicted value is normalized using the softmax function to obtain the normalized value of the target predicted value. For example, the one-hot encoding value of the cell data in the third row and third column is [0 1 0]. When the cell data in the third row and third column is masked by a mask field, the predicted value is [.1.7.2] based on the context. The normalized value [.1.7.2] is then normalized to obtain the normalized value [0 0.78 0.22].

[0138] An enhanced table data is obtained by replacing a corresponding mask field with a normalized value. If a table data has a mask field and a mask field has b normalized values, then a*b enhanced table data can be generated.

[0139] By setting mask fields for multiple cells in the table data and predicting the mask fields to obtain multiple corresponding predicted values, the diversity of the augmented data is ensured by replacing the mask fields with the predicted values. In addition, when predicting the mask fields, multiple corresponding predicted values ​​are selected based on the confidence level to ensure the consistency of the augmented data and improve the effect of data augmentation.

[0140] The tabular data augmentation device also performs parameter tuning of the data augmentation model. This parameter tuning can be performed during model training or concurrently with online application of the data augmentation model.

[0141] Furthermore, a first loss value is calculated based on the cell data replaced by the masked field and the word embedding value of the masked field; a second loss value is calculated based on the labels of the table data and the first predicted value of the table data by the data augmentation model; a third loss value is calculated based on the labels of the table data, the position of the masked field, and the target predicted value; the total loss value is obtained by summing the first, second, and third loss values; and the parameters of the data augmentation model are adjusted based on the total loss value.

[0142] Specifically, the first loss value can be expressed by the following formula: Where, m t e represents the cell data at position t that has been replaced by the masked field. t is the word embedding value of the mask field, M is the number of cells in the table data, T is the number of mask fields, and f() represents the prediction value of the data augmentation model for the table data.

[0143] The second loss value can be expressed by the following formula: Where M is the number of cells in the table data, x i For the data in the i-th cell, y i Let be the label of the data in the i-th cell.

[0144] The third loss value can be expressed by the following formula: Where M is the number of cells in the table data, x i For the data in the i-th cell, y i Let B be the label of the i-th cell; let B be the number of positions of the mask field of the i-th cell; f(x) ij ) represents the target predicted value of the mask field at the j-th position of the data in the i-th cell by the data augmentation model.

[0145] The total loss value can be expressed by the following formula: loss total = loss1 + loss2 + loss3.

[0146] The parameters of the data augmentation model are adjusted based on the total loss value using the backpropagation algorithm, thereby optimizing the data augmentation model.

[0147] It is understood that the content of the table data augmentation method embodiment is applicable to the table data augmentation device embodiment. The specific functions implemented by the table data augmentation device embodiment are the same as those of the table data augmentation method embodiment, and the beneficial effects achieved are also the same as those achieved by the table data augmentation method embodiment.

[0148] Embodiments of this application also provide an electronic device. The electronic device includes a memory 220, a processor 210, a program stored in the memory 220 and executable on the processor 210, and a data bus 230 for enabling communication between the processor 210 and the memory 220. When the program is executed by the processor 210, it implements the tabular data enhancement method described above.

[0149] The aforementioned electronic device sets mask fields for multiple cells of table data and predicts multiple corresponding predicted values ​​for the mask fields. The predicted values ​​are then used to replace the mask fields, ensuring the diversity of the augmented data. In addition, when predicting the mask fields, multiple corresponding predicted values ​​are selected based on the confidence level, ensuring the consistency of the augmented data and improving the effect of data augmentation.

[0150] This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0151] In general, for the hardware structure of electronic devices, the processor 210 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs in order to implement the technical solutions provided in the embodiments of this application.

[0152] The memory 220 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 220 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 220 and is called and executed by the processor 210 to execute the table data enhancement method of the embodiments of this application.

[0153] Input / output interfaces are used to implement information input and output.

[0154] The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0155] Bus 230 transmits information between various components of the device (e.g., processor 210, memory 220, input / output interface, and communication interface). Processor 210, memory 220, input / output interface, and communication interface are interconnected within the device via bus 230.

[0156] Embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the tabular data augmentation method as described above.

[0157] The aforementioned computer-readable storage medium sets mask fields for multiple cells of table data and predicts multiple corresponding predicted values ​​for the mask fields. The predicted values ​​are then used to replace the mask fields, ensuring the diversity of the augmented data. In addition, when predicting the mask fields, multiple corresponding predicted values ​​are selected based on the confidence level, ensuring the consistency of the augmented data and improving the effect of data augmentation.

[0158] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0159] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0160] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0161] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0162] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0163] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0164] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

[0165] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for augmenting tabular data, characterized in that, include: Retrieve table data; Input the table data into the data augmentation model; According to the data augmentation model, the table data is masked to obtain masked table data. Data prediction is performed on the mask field in the masked table data to obtain multiple candidate predicted values. Multiple target predicted values ​​are determined from the multiple candidate predicted values ​​based on the confidence level of the candidate predicted values. The mask field is replaced by the multiple target predicted values ​​to obtain multiple augmented table data, wherein the number of target predicted values ​​is less than the number of candidate predicted values. The first loss value is obtained by calculating the loss value based on the cell data replaced by the mask field and the word embedding value of the mask field; Based on the labels of the table data and the first predicted value of the table data by the data augmentation model, a second loss value is calculated to obtain the second loss value. The loss value is calculated based on the labels of the table data, the position of the mask field, and the target prediction value to obtain a third loss value; The total loss value is obtained by summing the first loss value, the second loss value, and the third loss value; The parameters of the data augmentation model are adjusted based on the total loss value using the backpropagation algorithm; The step of performing data prediction on the mask field in the mask table data to obtain multiple candidate predicted values ​​includes: The cell data in the mask table data that is in the same column as the mask field is determined as the target column data, and the other cell data in the target column data other than the mask field is determined as the first cell data; The cell data in the mask table data that is in the same row as the mask field is determined as the target row data, and the other cell data in the target row data other than the mask field is determined as the second cell data; Based on the data in the first cell and the data in the second cell, data prediction is performed on the mask field to match multiple candidate predicted values ​​corresponding to the mask field from a preset vocabulary.

2. The tabular data augmentation method according to claim 1, characterized in that, The process of performing a masking operation on the table data to obtain masked table data includes: Select multiple target cell data from multiple cell data in the table data, wherein the number of target cell data is less than the number of cell data; The target cell data is replaced with a mask field to obtain the masked table data.

3. The tabular data augmentation method according to claim 1, characterized in that, The step of determining multiple target predicted values ​​from multiple candidate predicted values ​​based on the confidence level of the candidate predicted values ​​includes: The confidence level of the candidate predicted value is calculated to determine the confidence level of the candidate predicted value; The candidate predicted values ​​are sorted according to their confidence levels, and the candidate predicted values ​​that are sorted within a preset range are determined as the target predicted values.

4. The tabular data augmentation method according to claim 1, characterized in that, The process of replacing the mask field with multiple target predicted values ​​to obtain multiple enhanced table data includes: A normalization operation is performed on the multiple target prediction values ​​to obtain multiple normalized values; Multiple enhanced table data are obtained by replacing the mask field with multiple normalized values ​​respectively.

5. A tabular data enhancement device, characterized in that, include: The data acquisition module is used to acquire table data; The data input module is used to input the table data into the data augmentation model; The data augmentation module is used to perform a masking operation on the table data according to the data augmentation model to obtain masked table data, perform data prediction on the mask field in the masked table data to obtain multiple candidate predicted values, determine multiple target predicted values ​​from the multiple candidate predicted values ​​according to the confidence level of the candidate predicted values, and replace the mask field with the target predicted values ​​to obtain multiple augmented table data, wherein the number of target predicted values ​​is less than the number of candidate predicted values; The first loss value is obtained by calculating the loss value based on the cell data replaced by the mask field and the word embedding value of the mask field; Based on the labels of the table data and the first predicted value of the table data by the data augmentation model, a second loss value is calculated to obtain the second loss value. The loss value is calculated based on the labels of the table data, the position of the mask field, and the target prediction value to obtain a third loss value; The total loss value is obtained by summing the first loss value, the second loss value, and the third loss value; The parameters of the data augmentation model are adjusted based on the total loss value using the backpropagation algorithm; The step of performing data prediction on the mask field in the mask table data to obtain multiple candidate predicted values ​​includes: The cell data in the mask table data that is in the same column as the mask field is determined as the target column data, and the other cell data in the target column data other than the mask field is determined as the first cell data; The cell data in the mask table data that is in the same row as the mask field is determined as the target row data, and the other cell data in the target row data other than the mask field is determined as the second cell data; Based on the data in the first cell and the data in the second cell, data prediction is performed on the mask field to match multiple candidate predicted values ​​corresponding to the mask field from a preset vocabulary.

6. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the tabular data enhancement method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the tabular data augmentation method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Language model pre-training method and system for table pattern analysis and sequence masks

    CN112559556A

  • Self-supervised learning method and device for table data, equipment and medium

    CN115130670A