Data verification method and device, electronic equipment and storage medium

By establishing a verification data table and generating verification codes, the verification module is solved separately written by multiple data dimensions, which improves the efficiency and simplicity of data verification.

CN119148990APending Publication Date: 2024-12-17SHANGHAI WEIWENJIA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310676180.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

During data processing, due to the large number of data dimensions, technicians need to write a verification module for each dimension, which is time-consuming and labor-intensive and inefficient.

Method used

By establishing a verification data table, using the data dimension name and field name to determine the corresponding class file, and generating verification codes in the class file to verify the data, avoiding writing verification modules for each dimension separately.

Benefits of technology

Improves the efficiency of data verification, reduces development and maintenance costs, and simplifies the verification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119148990A_ABST
    Figure CN119148990A_ABST
Patent Text Reader

Abstract

The invention provides a data verification method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the method comprises the steps: building a verification data table; the verification data table comprises a data dimension name, a dimension field name and verification logic; the verification data table is scanned, and whether the verification data table needs to be updated or not is determined; if the verification data table does not need to be updated, obtaining to-be-verified data, and determining a class file corresponding to the to-be-verified data based on the data dimension name and the dimension field name; generating a verification code in the class file based on the verification logic; and verifying the to-be-verified data based on the verification code. The verification data table is established, the class file corresponding to the to-be-verified data is determined through the data dimension name and the dimension field name under the condition that the verification data table does not need to be updated, the verification code is generated in the class file based on the verification logic, and the to-be-verified data is verified through the verification code, so that trouble and labor are saved, and the verification efficiency is improved. And the verification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When submitting data, in order to ensure the quality of the data, the data will be verified. In related technologies, technicians usually develop verification modules based on the dimensions of the data and use the verification modules to verify the data. However, some companies have more data dimensions, and technicians write a separate verification module for each dimension, which is not only time-consuming and labor-intensive, but also inefficient. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a data verification method, device, electronic device and storage medium. By establishing a verification data table, the corresponding class file is determined by using the data dimension name and dimension field name in the verification data table, and the data is verified according to the verification code generated in the class file, thereby avoiding writing a separate verification module for each dimension, saving time and effort, and improving verification efficiency.

[0004] In a first aspect, an embodiment of the present invention provides a data verification method, including: establishing a verification data table; the verification data table includes a data dimension name, a dimension field name and a verification logic; scanning the verification data table to determine whether the verification data table needs to be updated; if the verification data table does not need to be updated, obtaining the data to be verified, and determining the class file corresponding to the data to be verified based on the data dimension name and the dimension field name; generating a verification code in the class file based on the verification logic; and verifying the data to be verified based on the verification code.

[0005] In a preferred embodiment of the present invention, the above-mentioned establishment of a verification data table includes: determining a data dimension name corresponding to a data dimension of the data based on the type of data; determining a dimension field name based on a sub-type of the data; setting a verification logic for the data based on the dimension field name as the verification logic for the data corresponding to the dimension field name; associating the data dimension name, the dimension field name and the verification logic to obtain a verification data table.

[0006] In a preferred embodiment of the present invention, the method further includes: responding to a modification operation of the target verification logic, modifying the target dimension field name referenced by the target verification logic; and setting the target verification logic based on the modified target dimension field name.

[0007] In a preferred embodiment of the present invention, the method also includes: responding to the adding operation of the target data dimension, determining the data dimension name, dimension field name and verification logic corresponding to the target data dimension; adding the data dimension name, dimension field name and verification logic corresponding to the target data dimension to the verification data table.

[0008] In a preferred embodiment of the present invention, the method further comprises: responding to an update operation of the verification data table, determining target data corresponding to the update operation; and updating a class file corresponding to the target data.

[0009] In a preferred embodiment of the present invention, the method further comprises: in response to a data adding operation of the verification data table, generating a class file based on the newly added data.

[0010] In the second aspect, an embodiment of the present invention also provides a data verification device, including: a verification data table establishment module, used to establish a verification data table; the verification data table includes a data dimension name, a dimension field name and a verification logic; a verification data table scanning module, used to scan the verification data table to determine whether the verification data table needs to be updated; a class file determination module, used to obtain the data to be verified if the verification data table does not need to be updated, and determine the class file corresponding to the data to be verified based on the data dimension name and the dimension field name; a verification code generation module, used to generate verification code in the class file based on the verification logic; a data verification module, used to verify the data to be verified based on the verification code.

[0011] In a preferred embodiment of the present invention, the above-mentioned verification data table establishment module includes: a data dimension name determination module, which is used to determine the data dimension name corresponding to the data dimension of the data based on the type of data; a dimension field name determination module, which is used to determine the dimension field name based on the sub-type of the data; a verification logic determination module, which is used to set the verification logic of the data based on the dimension field name as the verification logic of the data corresponding to the dimension field name; an association module, which is used to associate the data dimension name, the dimension field name and the verification logic to obtain a verification data table.

[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the data verification method of the first aspect.

[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the data verification method of the first aspect mentioned above.

[0014] The embodiments of the present invention bring the following beneficial effects:

[0015] The embodiments of the present invention provide a data verification method, device, electronic device and storage medium. By establishing a verification data table, the class file corresponding to the data to be verified is determined by the data dimension name and the dimension field name under the condition that the verification data table does not need to be updated, and a verification code is generated in the class file based on the verification logic. The verification code is used to verify the data to be verified, which not only saves time and effort, but also improves the verification efficiency.

[0016] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0017] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A flow chart of a data verification method provided by an embodiment of the present invention;

[0020] Figure 2 A flowchart of another data verification method provided by an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of the structure of a data verification device provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0024] When entering data into relevant systems for data reporting, the data will be verified in order to ensure data quality. In related technologies, technicians usually develop verification modules based on the dimensions of the data and use the verification modules to verify the data. However, some companies have more data dimensions, and technicians write a separate verification module for each dimension, which is not only time-consuming and labor-intensive, but also inefficient.

[0025] Based on this, a data verification method provided by an embodiment of the present invention can establish a verification data table, determine the class file corresponding to the data to be verified through the data dimension name and the dimension field name under the condition that the verification data table does not need to be updated, and generate a verification code in the class file based on the verification logic, and use the verification code to verify the data to be verified, which not only saves time and effort, but also improves the verification efficiency.

[0026] To facilitate understanding of this embodiment, a data verification method disclosed in an embodiment of the present invention is first introduced in detail.

[0027] Example 1

[0028] The embodiment of the present invention provides a data verification method. Figure 1 A flow chart of a data verification method provided by an embodiment of the present invention. Figure 1 As shown, the data verification method may include the following steps:

[0029] Step S101, establishing a verification data table.

[0030] The verification data table is established in the database, and may include data dimension names, dimension field names, and verification logic, which are associated with each other. The verification logic may be preset, for example, it cannot be empty, the text must conform to the format of the mailbox, etc. The verification logic may also be customized, for example, the data corresponding to the dimension field name is equal to the specified length, date, number, etc.

[0031] In actual applications, the validation data table can be represented by t_data_validation, the data dimension name can be represented by dimension_name, the dimension field name can be represented by field_name, the validation logic can be represented by validation_group, the preset validation logic can be represented by NotNull (cannot be empty), Email (the text must conform to the format of the mailbox), etc., and the custom validation logic can be represented by $field_name!='undefined', $field_name!=1997.

[0032] Step S102: Scan the verification data table to determine whether the verification data table needs to be updated.

[0033] Among them, when performing data verification, the verification data table will be scanned first, specifically, it can be scanned whether there is an update instruction. The update instruction can include an update operation and an add operation, wherein the update operation indicates a specified modification to the verification data table, and the add operation indicates adding specified data to the verification data table. If there is an update instruction, it can be determined that the verification data table needs to be updated. If there is no update instruction, it can be determined that the verification data table does not need to be updated.

[0034] Step S103: If the verification data table does not need to be updated, the data to be verified is obtained, and the class file corresponding to the data to be verified is determined based on the data dimension name and the dimension field name.

[0035] The data to be inspected may be input by the user, input by a technician, or automatically imported, and there is no limitation here.

[0036] Wherein, determining the class file corresponding to the data to be verified based on the data dimension name and the dimension field name may include: determining the data dimension name and the dimension field name corresponding to the data to be verified, and determining the class file corresponding to the data dimension name and the dimension field name based on a preset corresponding relationship. For example, if the data to be verified is data under the dimension field name of telephone number in the data dimension name of the first enterprise, then there will be a class file corresponding to the first enterprise-telephone number.

[0037] After the verification data table is updated, the corresponding class file also needs to be adjusted. Specifically, when the received update instruction is an update operation, respond to the update operation of the verification data table, determine the target data corresponding to the update operation, and update the class file corresponding to the target data. When the received update instruction is a new operation, respond to the data new operation of the verification data table, generate a class file based on the new data, and after the class file is generated, associate the class file with the data dimension name and dimension field name corresponding to the new data and store them in a pre-set correspondence for subsequent verification.

[0038] In actual applications, if you need to update the validation logic of the data under a dimension field name in a data dimension name in the validation data table, you only need to change the validation logic after the data dimension name and dimension field name are determined, such as [NotNull, $field_name! = 'undefined']->[NotEmpty, $field_name == true].

[0039] In actual applications, when you need to add a new data dimension, you only need to determine the corresponding data dimension name, dimension field name and validation logic. For example, when the data dimension name is "customer information", the dimension field name is "contact information", and the validation logic is "not empty", it can be expressed as dimension_name = (customInfo) customer information, field_name = (contact) contact information, validation_group = [NotEmpty, Mobile, Phone, Email].

[0040] Through the above method, there is no need to change the verification logic for the data in a certain data dimension. You only need to change the verification logic based on the data dimension name and dimension field name in the database, making data verification simpler and more efficient.

[0041] Step S104: Generate verification code in the class file based on the verification logic.

[0042] According to the verification logic, the corresponding verification code can be automatically generated in the class file using the encoder.

[0043] Step S105: verifying the data to be verified based on the verification code.

[0044] The verification code can be used to verify the data to be verified. For example, in the verification data table, there is a row of data {dimension_name: "Business Information", field_name: "Contact Information", validation_group = [NotEmpty, Mobile]}, where the data dimension name is "Business Information", the dimension field name is "Contact Information", and the above data corresponds to the entInfo class file in the pre-set correspondence relationship. Then the following code can be generated in the entInfo class file:

[0045] public boolean valid(){

[0046] If(this.cotanct==null||this.cotanct==""){ / / If the contact information is empty or empty character NotEmpty

[0047] return false; / / return failure

[0048] }

[0049] If (this.cotanct.length()! = 11 || this.cotanct.startWith("1")) { / / If the length of the contact information is not 11 or the first digit is not 11Mobile

[0050] return false; / / return failure

[0051] }

[0052] return true; / / Return success

[0053] }

[0054] The valid() method will be called during data verification, and false will be returned if the verification fails, and true will be returned if the verification succeeds. The technical staff will determine whether an error occurs in the verification process or in the input data.

[0055] The data verification method provided by the embodiment of the present invention establishes a verification data table, determines the class file corresponding to the data to be verified by the data dimension name and the dimension field name under the condition that the verification data table does not need to be updated, and generates a verification code in the class file based on the verification logic, and uses the verification code to verify the data to be verified, which not only saves time and effort but also improves the verification efficiency.

[0056] Example 2

[0057] The embodiment of the present invention also provides another data verification method; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing the specific implementation method of establishing a verification data table.

[0058] Figure 2 A flowchart of another data verification method provided by an embodiment of the present invention, such as Figure 2 As shown, the data verification method may include the following steps:

[0059] Step S201, determining the data dimension name corresponding to the data dimension of the data based on the type of data.

[0060] Among them, the types of data can be divided according to the source of the data, such as the enterprise to which the data belongs. When the enterprise to which the data belongs is the first enterprise, the data dimension name can be the first enterprise information. It can also be divided according to the field to which the data belongs. For example, when the field to which the data belongs is the industrial and commercial field, the data dimension name can be industrial and commercial information. The specific division conditions are not limited here.

[0061] Step S202, determining the dimension field name based on the sub-category of the data.

[0062] Among them, the sub-category of data is based on the type of data. The sub-category of data is further divided after the data type is divided. For example, the data can be divided into the first enterprise information according to the type of data, and then the data can be further divided according to the sub-category of data, such as enterprise contacts, then the dimension field name can be enterprise contacts.

[0063] Step S203, setting the data verification logic based on the dimension field name as the data verification logic corresponding to the dimension field name.

[0064] The dimension field name may represent a type of data under the corresponding category. By using the dimension field name to set the verification logic, the set verification logic may be directly used to verify the type of data under the dimension field name.

[0065] Step S204, associating the data dimension name, dimension field name and verification logic to obtain a verification data table.

[0066] A data dimension name can correspond to multiple dimension field names, and multiple dimension field names can correspond to a validation logic respectively. The validation logic can be one logic or a collection of multiple logics. For example, when the validation logic is one logic, it can be validation_group = [NotNull]; when the validation logic is a collection of multiple logics, it can be validation_group = [NotNull, $field_name! = 'undefined']. There is no limitation here.

[0067] In actual applications, there may be a need to modify the verification data table. Specifically, in response to the modification operation of the target verification logic, the target dimension field name referenced by the target verification logic is modified; and the target verification logic is set based on the modified target dimension field name.

[0068] Among them, the modification operation may include the corresponding situation of the target verification logic before the modification, for example, the data dimension name corresponding to the target to be verified before the modification is industrial and commercial information, and the corresponding dimension field name is enterprise contact person, and the corresponding situation of the target verification logic after the modification, for example, the data dimension name corresponding to the target to be verified after the modification is industrial and commercial information, and the corresponding dimension field name is enterprise auditor. The target verification logic that needs to be modified can be determined by the corresponding situation of the target verification logic before the modification to avoid modifying other verification logics, and the correctness of the modification can be further verified by the corresponding situation of the target verification logic after the modification.

[0069] In actual applications, there may be a need to add data dimensions to the verification data table. Specifically, in response to the addition operation of the target data dimension, the data dimension name, dimension field name and verification logic corresponding to the target data dimension are determined; and the data dimension name, dimension field name and verification logic corresponding to the target data dimension are added to the verification data table.

[0070] Among them, the adding operation may include the data dimension name, dimension field name and verification logic corresponding to the target data dimension. Specifically, the method for determining the data dimension name, dimension field name and verification logic corresponding to the target data dimension is the same as the aforementioned steps S201-S203, and will not be repeated here.

[0071] The data verification method provided by the embodiment of the present invention determines the data dimension name, the dimension field name, and associates the data dimension name, the dimension field name and the verification logic to obtain a verification data table. When the target verification logic needs to be modified and the target data dimension needs to be added, the verification data table can be directly adjusted in the database to adjust the verification logic of a class of data. There is no need to adjust the verification logic of the data separately, which not only saves time and effort, but also improves the efficiency of verification.

[0072] Example 3

[0073] Corresponding to the above method embodiment, the embodiment of the present invention provides a data verification device, Figure 3 A schematic diagram of the structure of a data verification device provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the data verification device may include:

[0074] The verification data table establishment module 301 is used to establish a verification data table; the verification data table includes a data dimension name, a dimension field name and a verification logic.

[0075] The verification data table scanning module 302 is used to scan the verification data table to determine whether the verification data table needs to be updated in some embodiments.

[0076] The class file determination module 303 is used to obtain the data to be verified if the verification data table does not need to be updated, and determine the class file corresponding to the data to be verified based on the data dimension name and the dimension field name.

[0077] The verification code generation module 304 is used to generate verification code based on the verification logic in the class file.

[0078] The data verification module 305 is used to verify the data to be verified based on the verification code.

[0079] The data verification device provided by the embodiment of the present invention can establish a verification data table, determine the class file corresponding to the data to be verified by the data dimension name and the dimension field name under the condition that the verification data table does not need to be updated, and generate a verification code in the class file based on the verification logic, and use the verification code to verify the data to be verified, which not only saves time and effort, but also improves the verification efficiency.

[0080] In some embodiments, the verification data table establishment module is also used to establish a verification data table; the verification data table includes a data dimension name, a dimension field name and a verification logic.

[0081] In some embodiments, the verification data table establishment module is also used to respond to the modification operation of the target verification logic, modify the target dimension field name referenced by the target verification logic; and set the target verification logic based on the modified target dimension field name.

[0082] In some embodiments, the verification data table establishment module is also used to respond to the addition operation of the target data dimension, determine the data dimension name, dimension field name and verification logic corresponding to the target data dimension; and add the data dimension name, dimension field name and verification logic corresponding to the target data dimension to the verification data table.

[0083] In some embodiments, the verification data table scanning module is further used to respond to an update operation of the verification data table, determine target data corresponding to the update operation, and update a class file corresponding to the target data.

[0084] In some embodiments, the verification data table scanning module is further used to respond to a data adding operation in the verification data table and generate a class file based on the newly added data.

[0085] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0086] Example 4

[0087] The embodiment of the present invention also provides an electronic device for executing the above data verification method; see Figure 4 A structural schematic diagram of an electronic device is shown, which includes a memory 400 and a processor 401, wherein the memory 400 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 401 to implement the above-mentioned data verification method.

[0088] Further, Figure 4 The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 401 , the communication interface 403 and the memory 400 are connected via the bus 402 .

[0089] The memory 400 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0090] The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 401. The above processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 400, and the processor 401 reads the information in the memory 400 and completes the steps of the method of the above embodiment in combination with its hardware.

[0091] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned data verification method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0092] The computer program product for performing a data verification method provided in an embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0094] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

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

[0096] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0097] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0098] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data verification method, characterized in that: include: Establishing a verification data table; the verification data table includes data dimension names, dimension field names and verification logic; Scanning the verification data table to determine whether the verification data table needs to be updated; If the verification data table does not need to be updated, the data to be verified is obtained, and a class file corresponding to the data to be verified is determined based on the data dimension name and the dimension field name; Generate a verification code in the class file based on the verification logic; The data to be verified is verified based on the verification code.

2. The method according to claim 1, characterized in that The step of establishing a verification data table comprises: Determine the data dimension name corresponding to the data dimension of the data based on the type of data; Determining the dimension field name based on the subcategory of the data; Setting the validation logic of the data based on the dimension field name as the validation logic of the data corresponding to the dimension field name; The data dimension name, the dimension field name and the verification logic are associated to obtain the verification data table.

3. The method according to claim 1, characterized in that: The method further comprises: In response to a modification operation of the target verification logic, modify the target dimension field name referenced by the target verification logic; The target validation logic is set based on the modified target dimension field name.

4. The method according to claim 1, characterized in that The method further comprises: In response to the adding operation of the target data dimension, determine the data dimension name, dimension field name and verification logic corresponding to the target data dimension; The data dimension name, dimension field name and verification logic corresponding to the target data dimension are added to the verification data table.

5. The method according to claim 1, characterized in that After scanning the verification data table to determine whether the verification data table needs to be updated, the method includes: In response to an update operation of the verification data table, determining target data corresponding to the update operation; Update the class file corresponding to the target data.

6. The method according to claim 1, characterized in that After scanning the verification data table to determine whether the verification data table needs to be updated, the method includes: In response to the data adding operation of the verification data table, a class file is generated based on the newly added data.

7. A data verification device, characterized in that: include: A verification data table establishment module is used to establish a verification data table; the verification data table includes a data dimension name, a dimension field name and a verification logic; A verification data table scanning module, used to scan the verification data table to determine whether the verification data table needs to be updated; A class file determination module, configured to obtain the data to be verified if the verification data table does not need to be updated, and determine the class file corresponding to the data to be verified based on the data dimension name and the dimension field name; A verification code generation module, used to generate a verification code based on the verification logic in the class file; A data verification module is used to verify the data to be verified based on the verification code.

8. The device according to claim 7, characterized in that The verification data table establishment module includes: A data dimension name determination module, used to determine the data dimension name corresponding to the data dimension of the data based on the type of data; A dimension field name determination module, used to determine the dimension field name based on the sub-category of the data; A verification logic determination module, used to set the verification logic of the data based on the dimension field name as the verification logic of the data corresponding to the dimension field name; An association module is used to associate the data dimension name, the dimension field name and the verification logic to obtain the verification data table.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the data verification method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the data verification method according to any one of claims 1 to 6.