Data verification method, device, electronic device and storage medium

The cell rule attributes in the EXCEL file are output through the BERT model, which solves the problem of low data verification efficiency and accuracy in the existing technology, and achieves fast and accurate data verification and rule attribute maintenance.

CN112926296BActive Publication Date: 2024-12-24PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110343063.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-30
Publication Date
2024-12-24
Estimated Expiration
2041-03-30

AI Technical Summary

Technical Problem

In the prior art, when importing EXCEL files into a database, it takes a lot of time to write code to check the regular properties of cells, which is prone to errors, resulting in low data verification efficiency and accuracy.

Method used

The BERT model outputs the rule attributes of each cell, avoiding coding maintenance, and the rule attributes of each cell, improving the efficiency and accuracy of data verification.

Benefits of technology

It realizes fast and accurate data verification, improves the maintenance efficiency of cell rule attributes and the accuracy of data verification, and simplifies the maintenance process of rule attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112926296B_ABST
    Figure CN112926296B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and provides a data verification method, device, electronic device and storage medium, the method comprising: loading multiple target data to be verified in a verification request into an EXCEL template; reading the key field of each cell corresponding to the rule column of the EXCEL template; inputting the key field of each cell into a pre-trained BERT model, and obtaining the rule attribute of each cell output by the BERT model; merging the rule attributes of all cells to obtain a verification rule table of the EXCEL template; and verifying the target data to be verified in each cell in the EXCEL template according to the verification rule table. The present invention uses the rule attribute of each cell output by the BERT model, and does not need to encode and maintain the rule attribute of each cell, thereby ensuring the accuracy of the rule attribute of each cell, thereby improving the efficiency and accuracy of data verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a data verification method, device, electronic equipment and storage medium. Background Art

[0002] EXCEL files can be used to easily create various tables and are widely used. When an EXCEL file is imported into a database in the prior art, a lot of time and code writing are required to verify the rule attributes of cells in the EXCEL file.

[0003] However, due to the high complexity of the cell rule attributes of EXCEL files, errors are prone to occur during code writing, and the accuracy of the cell rule attributes cannot be ensured, resulting in low efficiency and accuracy of data verification.

[0004] Therefore, it is necessary to provide a fast and accurate data verification method. Summary of the invention

[0005] In view of the above content, it is necessary to propose a data verification method, device, electronic device and storage medium. The rule attributes of each cell output by the BERT model do not need to be encoded and maintained, thereby ensuring the accuracy of the rule attributes of each cell, thereby improving the efficiency and accuracy of data verification.

[0006] A first aspect of the present invention provides a data verification method, the method comprising:

[0007] Load multiple target verification data in the verification request into the EXCEL template;

[0008] Read the key field of each cell corresponding to the rule column of the EXCEL template;

[0009] Input the key field of each cell into a pre-trained BERT model, and obtain the rule attributes of each cell output by the BERT model;

[0010] Merging the rule attributes of all cells to obtain the verification rule table of the EXCEL template;

[0011] The target data to be verified in each cell in the EXCEL template is verified according to the verification rule table.

[0012] Optionally, inputting the key field of each cell into a pre-trained BERT model, and obtaining the rule attribute of each cell output by the BERT model includes:

[0013] Perform word segmentation on the key fields of each cell to obtain word chunk embedding;

[0014] Obtaining the segment number embedding of each word block and the position embedding of each word block according to the contextual relationship of the key field of each cell;

[0015] Superimposing the word block embedding, the segment number embedding and the position embedding to form a word embedding vector;

[0016] Input the word embedding vector into the pre-trained BERT model for semantic recognition to obtain the target word vector;

[0017] The target word vector is input into a preset named entity attribute recognition model to perform named entity attribute recognition to obtain the rule attributes of each cell.

[0018] Optionally, the verification rule table of the EXCEL template obtained by merging the rule attributes of all cells includes:

[0019] The rule attributes of all the cells are merged according to the position coordinates of each cell to obtain the verification rule table of the EXCEL template.

[0020] Optionally, verifying the target data to be verified in each cell in the EXCEL template according to the verification rule table includes:

[0021] Obtain the target position coordinates corresponding to the target data to be verified in each cell in the EXCEL template;

[0022] Acquire the rule attribute corresponding to each cell from the verification rule table according to the target position coordinates;

[0023] Verify the target data to be verified in the corresponding cell according to the rule attributes of each cell.

[0024] Optionally, the method further comprises:

[0025] When the target data to be verified in each cell meets the rule attribute requirements of the corresponding cell, determining the verification result is that the target data to be verified in each cell is successfully verified; or

[0026] When the target data to be verified in each cell does not meet the rule attribute requirements of the corresponding cell, it is determined that the verification result is that the target data to be verified in each cell fails to be verified.

[0027] Optionally, the step of loading the multiple target data to be verified in the verification request into an EXCEL template includes:

[0028] Receive a verification request sent by a requester;

[0029] Parse the verification request to obtain the name of the EXCEL template, a plurality of initial data to be verified, and a first position coordinate corresponding to each of the initial data to be verified;

[0030] Determine an EXCEL template corresponding to the EXCEL template name from a preset database;

[0031] Convert each of the initial data to be verified according to a preset conversion rule to obtain each target data to be verified;

[0032] Determine a second position coordinate matching the first position coordinate from the Excel template;

[0033] The data to be verified for each target is written into the second position coordinates corresponding to the EXCEL template.

[0034] Optionally, the method further comprises:

[0035] Determine the corresponding business worksheet according to the EXCEL template name;

[0036] Select the successfully verified target data to be verified from the verification results, and obtain the first target cell corresponding to the successfully verified target data to be verified;

[0037] Determine a second target cell matching the first target cell from the business worksheet;

[0038] According to the read logic corresponding to the second target cell, read the successfully verified target data to be verified corresponding to the first target cell from the EXCEL template;

[0039] The successfully verified target data to be verified that is read is converted into target business data according to a preset data format of the second target cell, and the target business data is written into the second target cell corresponding to the business worksheet.

[0040] A second aspect of the present invention provides a data verification device, the device comprising:

[0041] The loading module is used to load multiple target verification data in the verification request into the EXCEL template;

[0042] A reading module, used for reading the key field of each cell corresponding to the rule column of the EXCEL template;

[0043] An input module, used to input the key field of each cell into a pre-trained BERT model, and obtain the rule attributes of each cell output by the BERT model;

[0044] A merging module, used for merging the rule attributes of all cells to obtain a verification rule table of the EXCEL template;

[0045] The verification module is used to verify the target data to be verified in each cell in the EXCEL template according to the verification rule table.

[0046] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement the data verification method when executing a computer program stored in the memory.

[0047] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the data verification method when executed by a processor.

[0048] In summary, the data verification method, device, electronic device and storage medium described in the present invention, on the one hand, by inputting the key fields of each cell into a pre-trained BERT model and obtaining the rule attributes of each cell output by the BERT model, there is no need to spend manpower to maintain the rule attributes of each cell, and the rule attributes of each cell are directly maintained using a perfect model algorithm, which further improves the maintenance efficiency of the rule attributes of each cell and improves the efficiency and accuracy of data verification; on the other hand, by merging the rule attributes of all cells to obtain the verification rule table of the EXCEL template, it is convenient to quickly locate the rule attributes of the corresponding cell according to the position coordinates of each cell during later maintenance, thereby improving the maintenance efficiency of the rule attributes; finally, according to the verification rule table, the target data to be verified in each cell in the EXCEL template is verified, different cells correspond to different verification rules, and the target data to be verified in each cell is verified according to the corresponding rule attributes, thereby improving the accuracy of data verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a flow chart of a data verification method provided in Embodiment 1 of the present invention.

[0050] Figure 2 It is a structural diagram of a data verification device provided in Embodiment 2 of the present invention.

[0051] Figure 3 It is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0052] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0054] Embodiment 1

[0055] Figure 1 It is a flow chart of a data verification method provided in Embodiment 1 of the present invention.

[0056] In this embodiment, the data verification method can be applied to electronic devices. For electronic devices that need to perform data verification, the data verification function provided by the method of the present invention can be directly integrated into the electronic device, or run in the electronic device in the form of a software development kit (SDK).

[0057] like Figure 1 As shown, the data verification method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0058] S11, loading multiple target data to be verified in the verification request into an EXCEL template.

[0059] In this embodiment, when performing data verification, the requester sends a verification request to the server, and the server parses the verification request to determine multiple target data to be verified, and loads the multiple target data to be verified into a corresponding EXCEL template.

[0060] In an optional embodiment, the step of loading the multiple target data to be verified in the verification request into the EXCEL template includes:

[0061] Receive a verification request sent by a requester;

[0062] Parse the verification request to obtain the name of the EXCEL template, a plurality of initial data to be verified, and a first position coordinate corresponding to each of the initial data to be verified;

[0063] Determine an EXCEL template corresponding to the EXCEL template name from a preset database;

[0064] Convert each of the initial data to be verified according to a preset conversion rule to obtain each target data to be verified;

[0065] Determine a second position coordinate matching the first position coordinate from the Excel template;

[0066] The data to be verified for each target is written into the second position coordinates corresponding to the EXCEL template.

[0067] In this embodiment, the target data to be verified is obtained by parsing the verification request to obtain a plurality of initial data to be verified, and converting each initial data to be verified according to a preset conversion rule.

[0068] In this embodiment, the first position coordinates refer to the first position coordinates corresponding to each of the initial data to be verified contained in the verification request, and the second position coordinates are used to represent the position coordinates of each of the initial data to be verified in the EXCEL template.

[0069] In this embodiment, different EXCEL templates can be set in advance according to different business attributes, and a template name can be set for each EXCEL template. Specifically, the EXCEL template is set according to the basic attributes of the business and the non-basic attributes of the business. The basic attributes of the business include, but are not limited to, insurance, loan finance, investment and financial management, credit cards and life. For example, an EXCEL template corresponding to insurance is set for the basic attribute of the business; the non-basic attributes of the business include, but are not limited to, customer management, company management, channel characteristics, channel areas, product management and product association. For example, an EXCEL template corresponding to customer management is set for the non-basic attribute of the business, customer management.

[0070] In this embodiment, a conversion rule may be set in advance for each initial data to be verified, and each initial data to be verified is converted according to the preset conversion rule to obtain each target data to be verified.

[0071] In other optional embodiments, the initial data to be verified may also be one.

[0072] In this embodiment, each of the initial data to be verified is converted according to a preset conversion rule to obtain each target data to be verified, thereby unifying the format of each target data to be verified and improving the readability of the target data to be verified.

[0073] S12, reading the key field of each cell corresponding to the rule column of the EXCEL template.

[0074] In this embodiment, the server reads and parses the corresponding content in the EXCEL template through POI. Specifically, the rule column is identified from the specific content, and the key field of each cell corresponding to the rule column is read. Generally, the rule column is located in the second row of the EXCEL template, and the content of the rule column in the second row can be read directly. The key field of each cell in the read rule column and the Chinese name corresponding to the key field of each cell and the corresponding worksheet name are associated and stored.

[0075] S13, input the key field of each cell into a pre-trained BERT model, and obtain the rule attributes of each cell output by the BERT model.

[0076] In this embodiment, BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained model. When processing a word, it can take into account the information of the words before and after the word, so as to obtain the semantics of the context. After reading the key field of each cell corresponding to the rule column of the EXCEL template, the key field of each cell is input into the pre-trained BERT model to obtain the rule attributes of each cell.

[0077] In this embodiment, the rule attributes of each cell include, but are not limited to, a standard value drop-down option, the ability to enter multiple standard values, the ability to only enter numbers, the number of digits to be retained, whether it is a percentage, and the Excel cell type.

[0078] In an optional embodiment, inputting the key field of each cell into a pre-trained BERT model and obtaining the rule attribute of each cell output by the BERT model includes:

[0079] Perform word segmentation on the key fields of each cell to obtain word chunk embedding;

[0080] Obtaining the segment number embedding of each word block and the position embedding of each word block according to the contextual relationship of the key field of each cell;

[0081] Superimposing the word block embedding, the segment number embedding and the position embedding to form a word embedding vector;

[0082] Input the word embedding vector into the pre-trained BERT model for semantic recognition to obtain the target word vector;

[0083] The target word vector is input into a preset named entity attribute recognition model to perform named entity attribute recognition to obtain the rule attributes of each cell.

[0084] In this embodiment, since the BERT model expects the input data to have a specific format, special tags can be used to mark the beginning of the key field of each cell ([CLS]) and the separation / end of the key field of each cell ([SEP]), tokens that conform to the fixed vocabulary used in BERT, token IDs provided by BERT's token generator, mask IDs to indicate which elements in the sequence are tokens and which are filler elements, field IDs for distinguishing different key fields, and positional embeddings for showing the positions of tokens in the sequence. Specifically, the BERT input representation is the sum of the chunk embedding, the segment number embedding, and the position embedding.

[0085] In this embodiment, the word embedding vector is input into a pre-trained BERT model for semantic recognition to obtain a target word vector, and named entity attribute recognition is performed on the target word vector. In the subsequent training process, the BERT model and the named entity attribute recognition model continuously train and improve the model algorithm by submitting new EXCEL templates, thereby improving the recognition accuracy of the rule attributes of each cell. At the same time, there is no need to spend manpower to maintain the rule attributes of each cell. The perfect model algorithm is directly used to maintain the rule attributes of each cell, which further improves the maintenance efficiency of the rule attributes of each cell and improves the efficiency and accuracy of data verification.

[0086] S14, merging the rule attributes of all cells to obtain a verification rule table of the EXCEL template.

[0087] In this embodiment, the verification rule table contains the rule attributes of each cell corresponding to the EXCEL template. According to the rule attributes of each cell, the data to be verified in the corresponding cell can be verified, thereby improving the accuracy of data verification.

[0088] In an optional embodiment, the step of merging the rule attributes of all cells to obtain the verification rule table of the EXCEL template includes:

[0089] The rule attributes of all the cells are merged according to the position coordinates of each cell to obtain the verification rule table of the EXCEL template.

[0090] In this embodiment, the EXCEl template contains at least one cell, and the rule attributes of the corresponding cell are merged according to the position coordinates of each cell to obtain a verification rule table, which is convenient for later maintenance. The rule attributes of the corresponding cell can be quickly located according to the position coordinates of each cell, thereby improving the maintenance efficiency of the rule attributes.

[0091] S15, verifying the target data to be verified in each cell in the EXCEL template according to the verification rule table.

[0092] In this embodiment, since a plurality of target data to be verified have been loaded into the EXCEL template, the target data to be verified in the corresponding cell is verified according to the rule attribute corresponding to each cell.

[0093] In an optional embodiment, verifying the target data to be verified in each cell in the EXCEL template according to the verification rule table includes:

[0094] Obtain the target position coordinates corresponding to the target data to be verified in each cell in the EXCEL template;

[0095] Acquire the rule attribute corresponding to each cell from the verification rule table according to the target position coordinates;

[0096] Verify the target data to be verified in the corresponding cell according to the rule attributes of each cell.

[0097] Furthermore, the method further comprises:

[0098] When the target data to be verified in each cell meets the rule attribute requirements of the corresponding cell, determining the verification result is that the target data to be verified in each cell is successfully verified; or

[0099] When the target data to be verified in each cell does not meet the rule attribute requirements of the corresponding cell, it is determined that the verification result is that the target data to be verified in each cell fails to be verified.

[0100] In this embodiment, different cells correspond to different verification rules, and the verification rule of each cell is uniquely determined. The target data to be verified in each cell is verified according to the corresponding rule attributes, thereby improving the accuracy of data verification.

[0101] Furthermore, the method further comprises:

[0102] Determine the corresponding business worksheet according to the EXCEL template name;

[0103] Select the successfully verified target data to be verified from the verification results, and obtain the first target cell corresponding to the successfully verified target data to be verified;

[0104] Determine a second target cell matching the first target cell from the business worksheet;

[0105] According to the read logic corresponding to the second target cell, read the successfully verified target data to be verified corresponding to the first target cell from the EXCEL template;

[0106] The successfully verified target data to be verified that is read is converted into target business data according to a preset data format of the second target cell, and the target business data is written into the second target cell corresponding to the business worksheet.

[0107] In this embodiment, after verifying the target data to be verified, it is necessary to convert the target data to be verified in the EXCEL template into a corresponding business worksheet, so the corresponding business worksheet to be converted is determined according to the name of the EXCEL template.

[0108] In this embodiment, since the preset data format of each cell in different business worksheets is different, the diversity of the cell format in the business worksheet is improved, the first target cell corresponding to the successfully verified target data to be verified is obtained, and the second target cell is matched in the business worksheet according to the first target cell, and the successfully verified target data to be verified that needs to be converted is read from the EXCEL template according to the read logic of the second target cell, and the successfully verified target data to be verified that is read is converted into target business data according to the preset data format of the second target cell, and the target business data is written into the second target cell corresponding to the business worksheet, thereby improving the efficiency and accuracy of business data reading.

[0109] Furthermore, the method further comprises:

[0110] Selecting target data to be verified that failed verification from the verification results;

[0111] Obtain the rule attributes corresponding to the target data to be verified that failed the verification;

[0112] Send the target data to be verified that failed the verification and the corresponding rule attributes to the requester;

[0113] Receive the target data to be verified reported by the requester and updated according to the rule attributes.

[0114] In this embodiment, by providing the target data to be verified that failed verification and the corresponding rule attributes to the requester, the requester is assisted in quickly updating the provided target data to be verified, thereby improving the requester's experience and further improving the efficiency and accuracy of data verification.

[0115] In summary, the data verification method described in this embodiment, on the one hand, by inputting the key fields of each cell into a pre-trained BERT model and obtaining the rule attributes of each cell output by the BERT model, there is no need to spend manpower to maintain the rule attributes of each cell, and the perfect model algorithm is directly used to maintain the rule attributes of each cell, which further improves the maintenance efficiency of the rule attributes of each cell and improves the efficiency and accuracy of data verification; on the other hand, by merging the rule attributes of all cells to obtain the verification rule table of the EXCEL template, it is convenient to quickly locate the rule attributes of the corresponding cell according to the position coordinates of each cell during later maintenance, thereby improving the maintenance efficiency of the rule attributes; finally, according to the verification rule table, the target data to be verified in each cell in the EXCEL template is verified, different cells correspond to different verification rules, and the target data to be verified in each cell is verified according to the corresponding rule attributes, thereby improving the accuracy of data verification.

[0116] Embodiment 2

[0117] Figure 2 It is a structural diagram of a data verification device provided in Embodiment 2 of the present invention.

[0118] In some embodiments, the data verification device 20 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the data verification device 20 may be stored in a memory of the electronic device and executed by the at least one processor to perform (see Figure 1 Description) Data verification function.

[0119] In this embodiment, the data verification device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a loading module 201, a reading module 202, an input module 203, a merging module 204, a verification module 205, a determination module 206 and a conversion module 207. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0120] The loading module 201 is used to load multiple target to-be-verified data in the verification request into an EXCEL template.

[0121] In this embodiment, when performing data verification, the requester sends a verification request to the server, and the server parses the verification request to determine multiple target data to be verified, and loads the multiple target data to be verified into a corresponding EXCEL template.

[0122] In an optional embodiment, the loading module 201 loads the multiple target to-be-verified data in the verification request into the EXCEL template, including:

[0123] Receive a verification request sent by a requester;

[0124] Parse the verification request to obtain the name of the EXCEL template, a plurality of initial data to be verified, and a first position coordinate corresponding to each of the initial data to be verified;

[0125] Determine an EXCEL template corresponding to the EXCEL template name from a preset database;

[0126] Convert each of the initial data to be verified according to a preset conversion rule to obtain each target data to be verified;

[0127] Determine a second position coordinate matching the first position coordinate from the Excel template;

[0128] The data to be verified for each target is written into the second position coordinates corresponding to the EXCEL template.

[0129] In this embodiment, the target data to be verified is obtained by parsing the verification request to obtain a plurality of initial data to be verified, and converting each initial data to be verified according to a preset conversion rule.

[0130] In this embodiment, the first position coordinates refer to the first position coordinates corresponding to each of the initial data to be verified contained in the verification request, and the second position coordinates are used to represent the position coordinates of each of the initial data to be verified in the EXCEL template.

[0131] In this embodiment, different EXCEL templates can be set in advance according to different business attributes, and a template name can be set for each EXCEL template. Specifically, the EXCEL template is set according to the basic attributes of the business and the non-basic attributes of the business. The basic attributes of the business include, but are not limited to, insurance, loan finance, investment and financial management, credit cards and life. For example, an EXCEL template corresponding to insurance is set for the basic attribute of the business; the non-basic attributes of the business include, but are not limited to, customer management, company management, channel characteristics, channel areas, product management and product association. For example, an EXCEL template corresponding to customer management is set for the non-basic attribute of the business, customer management.

[0132] In this embodiment, a conversion rule may be set in advance for each initial data to be verified, and each initial data to be verified is converted according to the preset conversion rule to obtain each target data to be verified.

[0133] In other optional embodiments, the initial data to be verified may also be one.

[0134] In this embodiment, each of the initial data to be verified is converted according to a preset conversion rule to obtain each target data to be verified, thereby unifying the format of each target data to be verified and improving the readability of the target data to be verified.

[0135] The reading module 202 is used to read the key field of each cell corresponding to the rule column of the EXCEL template.

[0136] In this embodiment, the server reads and parses the corresponding content in the EXCEL template through POI. Specifically, the rule column is identified from the specific content, and the key field of each cell corresponding to the rule column is read. Generally, the rule column is located in the second row of the EXCEL template, and the content of the rule column in the second row can be read directly. The key field of each cell in the read rule column and the Chinese name corresponding to the key field of each cell and the corresponding worksheet name are associated and stored.

[0137] The input module 203 is used to input the key field of each cell into a pre-trained BERT model and obtain the rule attributes of each cell output by the BERT model.

[0138] In this embodiment, BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained model. When processing a word, it can take into account the information of the words before and after the word, so as to obtain the semantics of the context. After reading the key field of each cell corresponding to the rule column of the EXCEL template, the key field of each cell is input into the pre-trained BERT model to obtain the rule attributes of each cell.

[0139] In this embodiment, the rule attributes of each cell include, but are not limited to, a standard value drop-down option, the ability to enter multiple standard values, the ability to only enter numbers, the number of digits to be retained, whether it is a percentage, and the Excel cell type.

[0140] In an optional embodiment, the input module 203 inputs the key field of each cell into a pre-trained BERT model, and obtains the rule attributes of each cell output by the BERT model, including:

[0141] Perform word segmentation on the key fields of each cell to obtain word chunk embedding;

[0142] Obtaining the segment number embedding of each word block and the position embedding of each word block according to the contextual relationship of the key field of each cell;

[0143] Superimposing the word block embedding, the segment number embedding and the position embedding to form a word embedding vector;

[0144] Input the word embedding vector into the pre-trained BERT model for semantic recognition to obtain the target word vector;

[0145] The target word vector is input into a preset named entity attribute recognition model to perform named entity attribute recognition to obtain the rule attributes of each cell.

[0146] In this embodiment, since the BERT model expects the input data to have a specific format, special tags can be used to mark the beginning of the key field of each cell ([CLS]) and the separation / end of the key field of each cell ([SEP]), tokens that conform to the fixed vocabulary used in BERT, token IDs provided by BERT's token generator, mask IDs to indicate which elements in the sequence are tokens and which are filler elements, field IDs for distinguishing different key fields, and positional embeddings for showing the positions of tokens in the sequence. Specifically, the BERT input representation is the sum of the chunk embedding, the segment number embedding, and the position embedding.

[0147] In this embodiment, the word embedding vector is input into a pre-trained BERT model for semantic recognition to obtain a target word vector, and named entity attribute recognition is performed on the target word vector. In the subsequent training process, the BERT model and the named entity attribute recognition model continuously train and improve the model algorithm by submitting new EXCEL templates, thereby improving the recognition accuracy of the rule attributes of each cell. At the same time, there is no need to spend manpower to maintain the rule attributes of each cell. The perfect model algorithm is directly used to maintain the rule attributes of each cell, which further improves the maintenance efficiency of the rule attributes of each cell and improves the efficiency and accuracy of data verification.

[0148] The merging module 204 is used to merge the rule attributes of all cells to obtain the verification rule table of the EXCEL template.

[0149] In this embodiment, the verification rule table contains the rule attributes of each cell corresponding to the EXCEL template. According to the rule attributes of each cell, the data to be verified in the corresponding cell can be verified, thereby improving the accuracy of data verification.

[0150] In an optional embodiment, the merging module 204 merges the rule attributes of all cells to obtain the verification rule table of the EXCEL template including:

[0151] The rule attributes of all the cells are merged according to the position coordinates of each cell to obtain the verification rule table of the EXCEL template.

[0152] In this embodiment, the EXCEl template contains at least one cell, and the rule attributes of the corresponding cell are merged according to the position coordinates of each cell to obtain a verification rule table, which is convenient for later maintenance. The rule attributes of the corresponding cell can be quickly located according to the position coordinates of each cell, thereby improving the maintenance efficiency of the rule attributes.

[0153] The verification module 205 is used to verify the target data to be verified in each cell in the EXCEL template according to the verification rule table.

[0154] In this embodiment, since a plurality of target data to be verified have been loaded into the EXCEL template, the target data to be verified in the corresponding cell is verified according to the rule attribute corresponding to each cell.

[0155] In an optional embodiment, the verification module 205 verifies the target data to be verified in each cell in the EXCEL template according to the verification rule table, including:

[0156] Obtain the target position coordinates corresponding to the target data to be verified in each cell in the EXCEL template;

[0157] Acquire the rule attribute corresponding to each cell from the verification rule table according to the target position coordinates;

[0158] Verify the target data to be verified in the corresponding cell according to the rule attributes of each cell.

[0159] Furthermore, when the target data to be verified in each cell meets the rule attribute requirements of the corresponding cell, the verification result is determined to be that the target data to be verified in each cell is successfully verified; when the target data to be verified in each cell does not meet the rule attribute requirements of the corresponding cell, the verification result is determined to be that the target data to be verified in each cell fails to be verified.

[0160] In this embodiment, different cells correspond to different verification rules, and the verification rule of each cell is uniquely determined. The target data to be verified in each cell is verified according to the corresponding rule attributes, thereby improving the accuracy of data verification.

[0161] The determination module 206 is used to determine the corresponding business worksheet according to the name of the EXCEL template; select the successfully verified target data to be verified from the verification results, and obtain the first target cell corresponding to the successfully verified target data to be verified, and determine the second target cell matching the first target cell from the business worksheet.

[0162] The reading module 202 is further configured to read the successfully verified target data to be verified corresponding to the first target cell from the EXCEL template according to the reading logic corresponding to the second target cell.

[0163] The conversion module 207 is used to convert the successfully verified target data to be verified into target business data according to the preset data format of the second target cell, and write the target business data into the second target cell corresponding to the business worksheet.

[0164] In this embodiment, after verifying the target data to be verified, it is necessary to convert the target data to be verified in the EXCEL template into a corresponding business worksheet, so the corresponding business worksheet to be converted is determined according to the name of the EXCEL template.

[0165] In this embodiment, since the preset data format of each cell in different business worksheets is different, the diversity of the cell format in the business worksheet is improved, the first target cell corresponding to the successfully verified target data to be verified is obtained, and the second target cell is matched in the business worksheet according to the first target cell, and the successfully verified target data to be verified that needs to be converted is read from the EXCEL template according to the read logic of the second target cell, and the successfully verified target data to be verified that is read is converted into target business data according to the preset data format of the second target cell, and the target business data is written into the second target cell corresponding to the business worksheet, thereby improving the efficiency and accuracy of business data reading.

[0166] Further, the target data to be verified that failed the verification is selected from the verification results; the rule attributes corresponding to the target data to be verified that failed the verification are obtained; the target data to be verified that failed the verification and the corresponding rule attributes are sent to the requester; and the target data to be verified updated according to the rule attributes and reported by the requester are received.

[0167] In this embodiment, by providing the target data to be verified that failed verification and the corresponding rule attributes to the requester, the requester is assisted in quickly updating the provided target data to be verified, thereby improving the requester's experience and further improving the efficiency and accuracy of data verification.

[0168] In summary, the data verification device described in this embodiment, on the one hand, by inputting the key fields of each cell into a pre-trained BERT model and obtaining the rule attributes of each cell output by the BERT model, does not need to spend manpower to maintain the rule attributes of each cell, and directly uses a perfect model algorithm to maintain the rule attributes of each cell, thereby further improving the maintenance efficiency of the rule attributes of each cell and improving the efficiency and accuracy of data verification; on the other hand, by merging the rule attributes of all cells to obtain the verification rule table of the EXCEL template, it is convenient to quickly locate the rule attributes of the corresponding cell according to the position coordinates of each cell during later maintenance, thereby improving the maintenance efficiency of the rule attributes; finally, according to the verification rule table, the target data to be verified in each cell in the EXCEL template is verified, different cells correspond to different verification rules, and the target data to be verified in each cell is verified according to the corresponding rule attributes, thereby improving the accuracy of data verification.

[0169] Embodiment 3

[0170] See also Figure 3 FIG. 2 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. In a preferred embodiment of the present invention, the electronic device 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .

[0171] Those skilled in the art should understand that Figure 3 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present invention, and may be a bus structure or a star structure. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0172] In some embodiments, the electronic device 3 is an electronic device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 3 may also include client devices, which include but are not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0173] It should be noted that the electronic device 3 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0174] In some embodiments, the memory 31 is used to store program codes and various data, such as the data verification device 20 installed in the electronic device 3, and to achieve high-speed and automatic access to programs or data during the operation of the electronic device 3. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0175] In some embodiments, the at least one processor 32 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The at least one processor 32 is the control core (Control Unit) of the electronic device 3, and uses various interfaces and lines to connect various components of the entire electronic device 3, and executes various functions and processes data of the electronic device 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31.

[0176] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.

[0177] Although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to each component. Optionally, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0178] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0179] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute a part of the method described in each embodiment of the present invention.

[0180] In a further embodiment, in combination Figure 2 The at least one processor 32 can execute the operating device of the electronic device 3 and various installed application programs (such as the data verification device 20), program codes, etc., for example, the above-mentioned modules.

[0181] The memory 31 stores program codes, and the at least one processor 32 can call the program codes stored in the memory 31 to execute related functions. For example, Figure 2 The modules described in the embodiment are program codes stored in the memory 31 and are executed by the at least one processor 32, thereby realizing the functions of the modules and achieving the purpose of data verification.

[0182] In one embodiment of the present invention, the memory 31 stores a plurality of instructions, and the plurality of instructions are executed by the at least one processor 32 to implement a data verification function.

[0183] Specifically, the specific implementation method of the at least one processor 32 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0184] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0185] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0187] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. The multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A data verification method, characterized in that: The method comprises: Load multiple target verification data in the verification request into the EXCEL template; Read the key field of each cell corresponding to the rule column of the EXCEL template; Input the key field of each cell into a pre-trained BERT model, and obtain the rule attributes of each cell output by the BERT model, including: performing word segmentation processing on the key field of each cell to obtain word block embedding; obtaining the segment number embedding of each word block and the position embedding of each word block according to the contextual relationship of the key field of each cell; superimposing the word block embedding, the segment number embedding and the position embedding to form a word embedding vector; inputting the word embedding vector into the pre-trained BERT model for semantic recognition to obtain a target word vector; inputting the target word vector into a preset named entity attribute recognition model for named entity attribute recognition to obtain the rule attributes of each cell; Merging the rule attributes of all cells to obtain the verification rule table of the EXCEL template; The target data to be verified in each cell in the EXCEL template is verified according to the verification rule table.

2. The data verification method according to claim 1, characterized in that: The verification rule table of the EXCEL template obtained by merging the rule attributes of all cells includes: The rule attributes of all the cells are merged according to the position coordinates of each cell to obtain the verification rule table of the EXCEL template.

3. The data verification method according to claim 1, characterized in that: The verifying the target data to be verified in each cell in the EXCEL template according to the verification rule table includes: Obtain the target position coordinates corresponding to the target data to be verified in each cell in the EXCEL template; Acquire the rule attribute corresponding to each cell from the verification rule table according to the target position coordinates; Verify the target data to be verified in the corresponding cell according to the rule attributes of each cell.

4. The data verification method according to claim 3, characterized in that: The method further comprises: When the target data to be verified in each cell meets the rule attribute requirements of the corresponding cell, determining the verification result is that the target data to be verified in each cell is successfully verified; or When the target data to be verified in each cell does not meet the rule attribute requirements of the corresponding cell, it is determined that the verification result is that the target data to be verified in each cell fails to be verified.

5. The data verification method according to claim 1, characterized in that: The step of loading the multiple target data to be verified in the verification request into the EXCEL template includes: Receive a verification request sent by a requester; Parse the verification request to obtain the name of the EXCEL template, a plurality of initial data to be verified, and a first position coordinate corresponding to each of the initial data to be verified; Determine an EXCEL template corresponding to the EXCEL template name from a preset database; Convert each of the initial data to be verified according to a preset conversion rule to obtain each target data to be verified; Determine a second position coordinate matching the first position coordinate from the EXCEL template; The data to be verified for each target is written into the second position coordinates corresponding to the EXCEL template.

6. The data verification method as claimed in claim 5, characterized in that: The method further comprises: Determine the corresponding business worksheet according to the EXCEL template name; Select the successfully verified target data to be verified from the verification results, and obtain the first target cell corresponding to the successfully verified target data to be verified; Determine a second target cell matching the first target cell from the business worksheet; According to the read logic corresponding to the second target cell, read the successfully verified target data to be verified corresponding to the first target cell from the EXCEL template; The successfully verified target data to be verified that is read is converted into target business data according to a preset data format of the second target cell, and the target business data is written into the second target cell corresponding to the business worksheet.

7. A data verification device, characterized in that: The device is used to implement the data verification method according to any one of claims 1 to 6, and the device includes: The loading module is used to load multiple target verification data in the verification request into the EXCEL template; A reading module, used for reading the key field of each cell corresponding to the rule column of the EXCEL template; An input module, used to input the key field of each cell into a pre-trained BERT model, and obtain the rule attributes of each cell output by the BERT model; A merging module, used for merging the rule attributes of all cells to obtain a verification rule table of the EXCEL template; The verification module is used to verify the target data to be verified in each cell in the EXCEL template according to the verification rule table.

8. An electronic device, characterized in that: The electronic device comprises a processor and a memory, and the processor is used to implement the data verification method according to any one of claims 1 to 6 when executing a computer program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data verification method according to any one of claims 1 to 6 is implemented.