CN112667244A - Data verification method and device, electronic equipment and computer readable storage medium - Google Patents

Data verification method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN112667244A
CN112667244A CN202011642729.0A CN202011642729A CN112667244A CN 112667244 A CN112667244 A CN 112667244A CN 202011642729 A CN202011642729 A CN 202011642729A CN 112667244 A CN112667244 A CN 112667244A
Authority
CN
China
Prior art keywords
verification
data
logic
verified
data verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011642729.0A
Other languages
Chinese (zh)
Inventor
李婧雯
刘永铭
赵阳
古立夫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Securities Co Ltd
Original Assignee
Ping An Securities Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Securities Co Ltd filed Critical Ping An Securities Co Ltd
Priority to CN202011642729.0A priority Critical patent/CN112667244A/en
Publication of CN112667244A publication Critical patent/CN112667244A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to big data technology, and discloses a data verification method, which comprises the following steps: acquiring data verification conditions configured in a data verification tool based on service types, wherein the data verification conditions comprise: the verification object and the verification logic and the verification mode corresponding to the verification object; generating a verification logic script according to the verification logic of the verification object; and acquiring data to be verified, responding to the verification logic script and the verification mode, executing data verification of the data to be verified, and acquiring a data verification result. The invention also relates to a block chain technology, and the data to be checked can be stored in the block chain nodes. The invention can realize the configurability of the data verification logic and improve the data verification efficiency.

Description

Data verification method and device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a data verification method and apparatus, an electronic device, and a computer-readable storage medium.
Background
In the development process of the information application system, data verification is an essential process in the development of the application system, and correct data can be obtained in a correct mode through the data verification, so that the safety of the system is improved.
However, the conventional data verification method has the following disadvantages: the configurability of the data check logic cannot be realized, and the data check logic needs to be developed manually by a user, so that the redundancy phenomenon occurs when the server identifies the data check logic, and the efficiency of the data check is influenced.
Disclosure of Invention
The invention provides a data verification method, a data verification device, electronic equipment and a computer readable storage medium, and mainly aims to realize the configurability of data verification logic so as to improve the data verification efficiency.
In order to achieve the above object, the present invention provides a data verification method, including:
acquiring data verification conditions configured in a data verification tool based on service types, wherein the data verification conditions comprise: the verification object and the verification logic and the verification mode corresponding to the verification object;
generating a verification logic script according to the verification logic of the verification object;
and acquiring data to be verified, responding to the verification logic script and the verification mode, executing data verification of the data to be verified, and acquiring a data verification result.
Optionally, the generating a verification logic script according to the data verification logic of the verification object includes:
if the verification logic is identified to be common attribute, obtaining the common attribute verification logic of the verification object from the packaged verification logic in the data verification tool according to the common attribute, converting the common attribute verification logic into a corresponding first request message, and generating a corresponding verification logic script after analyzing the first request message.
Optionally, the generating a verification logic script according to the data verification logic of the verification object includes:
if the verification logic is identified to be in a non-common attribute, inquiring a target character matched with the inspection object in a preset storage list in the data verification tool;
if the target character matched with the inspection object is inquired, acquiring non-common attribute check logic matched with the target character from the packaged check logic in the data check tool, converting the non-common attribute check logic into a corresponding second request message, and analyzing the second request message to generate a corresponding check logic script.
Optionally, the generating a verification logic script according to the data verification logic of the verification object includes:
if the target character matched with the inspection object is not inquired, searching a character with similar semantics with the inspection object in a preset storage list in the data inspection tool, and displaying the inspection logic of the character with similar semantics on a user interface;
receiving the modification of the check logic of the characters with similar semantics on a user interface by a user to obtain the modified check logic;
and converting the modified check logic into a corresponding third request message, and analyzing the third request message to generate a corresponding check logic script.
Optionally, the performing, in response to the target verification logic script and the data verification manner, data verification of the data to be verified to obtain a data verification result includes:
identifying an object to be verified in the data to be verified;
calculating the similarity between the object to be verified and the verification object in the verification logic script, and selecting the verification logic script corresponding to the verification object with the similarity larger than the preset similarity;
and verifying the object to be verified according to the selected verification logic script corresponding to the verification object and the data verification mode to obtain a data verification result.
Optionally, the calculating the similarity between the object to be verified and the verification object in the verification logic script includes:
calculating the similarity between the object to be verified and the verification object in the verification logic script by using the following method:
Figure BDA0002872623580000021
wherein x represents the object to be verified, y represents the verification object in the verification logic script, and xiRepresenting the i-th vector value, y, of the object to be verifiediAnd checking the ith vector value of the object in the logic script.
Optionally, after obtaining the data verification result, the method further includes: performing visualization processing on the data verification result to generate a visualization interface, wherein the visualization interface comprises one or more of the following combinations:
acquiring a verification result indicating a problematic object to be verified, and displaying the reason of the problem and the method information for suggesting modification on a user interface;
and counting error types with preset digits in the prior error arrangement according to the check result, and displaying the error types to a user.
In order to solve the above problem, the present invention further provides a data verification apparatus, including:
an obtaining module, configured to obtain a data verification condition configured based on a service type in a data verification tool, where the data verification condition includes: the verification object is used for verifying the corresponding verification logic and verification mode of the object;
the generating module is used for generating a verification logic script according to the verification logic of the verification object;
and the execution module is used for acquiring the data to be verified, responding to the verification logic script and the verification mode, executing the data verification of the data to be verified, and obtaining a data verification result.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the data verification method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium comprising a storage data area and a storage program area, the storage data area storing the created data, and the storage program area storing a computer program, wherein the computer program realizes the above data verification method when executed by a processor.
The embodiment of the invention firstly obtains the data verification condition configured based on the service type in the data verification tool, wherein the data verification condition comprises the following steps: the verification object, the verification logic and the verification mode corresponding to the verification object can configure corresponding data verification according to different service types, a user does not need to repeatedly configure the internal verification logic, and redundancy is reduced, so that convenience is provided for developers, and the reliability of subsequent data verification is improved; secondly, according to the verification logic of the verification object, the embodiment of the invention generates the corresponding verification logic script, and according to the generation of different verification logic scripts, the configurability of the data verification logic can be realized, the flexibility of the subsequent data verification is improved, and the efficiency of the subsequent data verification is improved.
Drawings
Fig. 1 is a schematic flow chart of a data verification method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating a step S3 of the data verification method provided in fig. 1 according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a visual interface combining method according to a second embodiment of the present invention;
fig. 4 is a schematic block diagram of a data verification apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an internal structure of an electronic device implementing a data verification method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The execution subject of the data verification method provided by the embodiment of the present application includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiment of the present application, such as a server and a terminal. In other words, the data verification method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
The invention provides a data checking method. Fig. 1 is a schematic flow chart of a data verification method according to an embodiment of the present invention.
In this embodiment, the data verification method includes:
s1, acquiring data verification conditions configured in the data verification tool based on the service types, wherein the data verification conditions include: the verification object and the verification logic and the verification mode corresponding to the verification object.
In the preferred embodiment of the present invention, the data verification tool is essentially an independent item of software, compiled using java language. The embodiment of the invention introduces the data verification tool into each application of the client and/or the server in a jar packet form, and is used for executing data verification of the client and/or the server. The data verification tool provides a user interface, a plurality of service scenes are included on the user interface, and corresponding data verification can be configured according to different service types, so that a user does not need to repeatedly configure internal verification logic, redundancy is reduced, and convenience is provided for developers.
In an optional embodiment, the data verification tool comprises: md5 data verification tool. Optionally, the md5 data verification tool may be: sendto md 5.
Further, since different service types are included in different service scenes, the invention acquires the data verification condition configured in the data verification tool based on the service types to determine the verification object of the subsequent data verification, thereby improving the accuracy and reliability of the subsequent data verification. Wherein the data verification condition comprises: the verification object, the verification logic and the verification mode corresponding to the verification object.
For example, if the service type is order verification, the verification object that can obtain the order verification includes: the order number, the order format, the order type and the like are checked, and the accuracy and the reliability of order checking can be greatly improved.
In an optional embodiment, the check logic comprises: whether the value of the data is necessary to be filled, whether the letters of the data filling are necessary to be upper and lower cases, the length of the characters of the data filling can not exceed a preset threshold value and the like.
In an optional embodiment, the verification method includes: the method comprises the following steps of firstly, immediately stopping checking the remaining configuration items of the subsequent data when an error is encountered; and secondly, the method is not stopped when an error is encountered until all the configuration items of the data are verified, and all the configuration items of the data with the error are summarized and returned.
And S2, generating a verification logic script according to the verification logic of the verification object.
In at least one embodiment of the present invention, the verification logic script refers to an application program that performs logic verification, and preferably, the verification logic script is compiled through a scripting language, where the scripting language may be a JavaScript scripting language.
In detail, the generating a verification logic script according to the verification logic of the data object includes:
acquiring a request parameter object of the verification logic, and identifying the attribute of the verification logic according to the request parameter object;
if the verification logic is identified to be common attribute, acquiring the common attribute verification logic of the verification object from the packaged verification logic in the data verification tool according to the common attribute, converting the common attribute verification logic into a corresponding first request message by using a session method, and generating a corresponding verification logic script after analyzing the first request message by the JavaScript scripting language;
if the verification logic is identified to be in a non-common attribute, inquiring a target character matched with the inspection object in a preset storage list in the data verification tool;
if a target character matched with the inspection object is inquired, acquiring non-common attribute check logic matched with the target character from the packaged check logic in the data check tool, converting the non-common attribute check logic into a corresponding second request message by using a session method, and analyzing the second request message through the JavaScript scripting language to generate a corresponding check logic script;
if the target character matched with the inspection object is not inquired, searching a character with similar semantics with the inspection object in a preset storage list in the data inspection tool, displaying the inspection logic of the character with similar semantics on a user interface, receiving the modification of the inspection logic of the character with similar semantics on the user interface by a user to obtain the modified inspection logic, converting the modified inspection logic into a corresponding third request message by using a session method, and analyzing the third request message through the JavaScript scripting language to generate a corresponding inspection logic script. In the embodiment, if the corresponding data verification logic cannot be found, the data can be automatically recommended to the user according to the stored historical verification logic, and the user can directly modify the recommended verification logic, so that convenience and data verification reliability are improved.
In an alternative embodiment, the attributes include: fields, ids, and primary keys, etc.
According to the embodiment of the invention, the corresponding verification logic script is generated through different attributes of the verification logic, so that the configurability of the data verification logic is realized, the flexibility of the subsequent data verification is improved, and the efficiency of the subsequent data verification is improved.
And S3, acquiring the data to be verified, responding to the verification logic script and the verification mode, executing data verification of the data to be verified, and obtaining a data verification result.
In at least one embodiment of the present invention, the data to be verified is generated according to an actual service scenario, for example, for a service scenario of an order page, the data to be verified includes: order information verification and user identity verification. Wherein, the order information verification comprises: checking the type of the order, the format of the order, the date of the order and the like; the user identity verification comprises the following steps: user account verification, user password verification, user contact information verification and the like. It is emphasized that, to further ensure the privacy and security of the data to be verified, the data to be verified may also be stored in a node of a block chain.
Specifically, as shown in fig. 2, the performing data verification on the data to be verified in response to the verification logic script and the verification manner to obtain a data verification result includes:
s30, identifying the object to be verified in the data to be verified;
in an optional embodiment, the object to be checked in the data to be checked is identified by using an sql statement.
S31, calculating the similarity between the object to be verified and the verification object in the verification logic script, and selecting the verification logic script corresponding to the verification object with the similarity larger than the preset similarity;
in an optional embodiment, the following method is used to calculate the similarity between the object to be verified and the verification object in the verification logic script:
Figure BDA0002872623580000071
wherein x represents the object to be verified, y represents the verification pair in the standard verification logic scriptElephant, xiRepresenting the i-th vector value, y, of the object to be verifiediAnd checking the ith vector value of the object in the standard checking logic script.
Optionally, the preset similarity is 0.75.
And S32, verifying the object to be verified according to the verification logic script corresponding to the selected verification object and the data verification mode to obtain a data verification result.
It is to be noted that the verification method may be a verification method selected from the first and/or second verification methods according to a user requirement, which is not limited herein.
Further, in another embodiment of the present invention, after obtaining the data verification result, the method may further include: and carrying out visualization processing on the data verification result to generate a visualization interface.
In an alternative embodiment, the visualization interface is presented in the form of a table, chart, or the like.
In detail, as shown in fig. 3, the visualization interface includes one or more of the following combinations:
s330, obtaining a checking result indicating a problematic object to be checked, and displaying the reason of the problem and the method information for suggesting modification on a user interface;
and S331, counting error types with preset digits according to the check result, and displaying the error types to a user.
The verification logic of the current data can be reflected to the server developer based on the visual interface, so that the server developer can more visually find out which errors exist in the data transmitted to the server instead of only one error report message, the feedback of the error report message is enriched, and the developer calling the server interface can perfect self logic and modify the data.
In an alternative embodiment, the visualization interface is generated by a server-side template engine (Ejs template).
To sum up, in the embodiments of the present invention, a data verification condition configured based on a service type in a data verification tool is first obtained, where the data verification condition includes: the verification object, the verification logic and the verification mode corresponding to the verification object can configure corresponding data verification according to different service types, a user does not need to repeatedly configure the internal verification logic, and redundancy is reduced, so that convenience is provided for developers, and the reliability of subsequent data verification is improved; secondly, according to the verification logic of the verification object, the embodiment of the invention generates the corresponding verification logic script, and according to the generation of different verification logic scripts, the configurability of the data verification logic can be realized, the flexibility of the subsequent data verification is improved, and the efficiency of the subsequent data verification is improved.
Fig. 4 is a functional block diagram of the data verification apparatus according to the present invention.
The data verification apparatus 100 of the present invention may be installed in an electronic device. According to the implemented functions, the data verification apparatus may include an obtaining module 101, a generating module 102, and an executing module 103. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the obtaining module 101 is configured to obtain a data verification condition configured based on a service type in a data verification tool, where the data verification condition includes: the verification object and the verification logic and the verification mode corresponding to the verification object.
In the preferred embodiment of the present invention, the data verification tool is essentially an independent item of software, compiled using java language. The embodiment of the invention introduces the data verification tool into each application of the client and/or the server in a jar packet form, and is used for executing data verification of the client and/or the server. The data verification tool provides a user interface, a plurality of service scenes are included on the user interface, and corresponding data verification can be configured according to different service types, so that a user does not need to repeatedly configure internal verification logic, redundancy is reduced, and convenience is provided for developers.
In an optional embodiment, the data verification tool comprises: md5 data verification tool. Optionally, the md5 data verification tool may be: sendto md 5.
Further, since different service types are included in different service scenes, the invention acquires the data verification condition configured in the data verification tool based on the service types to determine the verification object of the subsequent data verification, thereby improving the accuracy and reliability of the subsequent data verification. Wherein the data verification condition comprises: the verification object, the verification logic and the verification mode corresponding to the verification object.
For example, if the service type is order verification, the verification object that can obtain the order verification includes: the order number, the order format, the order type and the like are checked, and the accuracy and the reliability of order checking can be greatly improved.
In an optional embodiment, the check logic comprises: whether the value of the data is necessary to be filled, whether the letters of the data filling are necessary to be upper and lower cases, the length of the characters of the data filling can not exceed a preset threshold value and the like.
In an optional embodiment, the verification method includes: the method comprises the following steps of firstly, immediately stopping checking the remaining configuration items of the subsequent data when an error is encountered; and secondly, the method is not stopped when an error is encountered until all the configuration items of the data are verified, and all the configuration items of the data with the error are summarized and returned.
The generating module 102 is configured to generate a verification logic script according to the verification logic of the verification object.
In at least one embodiment of the present invention, the verification logic script refers to an application program that performs logic verification, and preferably, the verification logic script is compiled through a scripting language, where the scripting language may be a JavaScript scripting language.
In detail, the generating a verification logic script according to the verification logic of the data object includes:
acquiring a request parameter object of the verification logic, and identifying the attribute of the verification logic according to the request parameter object;
if the verification logic is identified to be common attribute, acquiring the common attribute verification logic of the verification object from the packaged verification logic in the data verification tool according to the common attribute, converting the common attribute verification logic into a corresponding first request message by using a session method, and generating a corresponding verification logic script after analyzing the first request message by the JavaScript scripting language;
if the verification logic is identified to be in a non-common attribute, inquiring a target character matched with the inspection object in a preset storage list in the data verification tool;
if a target character matched with the inspection object is inquired, acquiring non-common attribute check logic matched with the target character from the packaged check logic in the data check tool, converting the non-common attribute check logic into a corresponding second request message by using a session method, and analyzing the second request message through the JavaScript scripting language to generate a corresponding check logic script;
if the target character matched with the inspection object is not inquired, searching a character with similar semantics with the inspection object in a preset storage list in the data inspection tool, displaying the inspection logic of the character with similar semantics on a user interface, receiving the modification of the inspection logic of the character with similar semantics on the user interface by a user to obtain the modified inspection logic, converting the modified inspection logic into a corresponding third request message by using a session method, and analyzing the third request message through the JavaScript scripting language to generate a corresponding inspection logic script. In the embodiment, if the corresponding data verification logic cannot be found, the data can be automatically recommended to the user according to the stored historical verification logic, and the user can directly modify the recommended verification logic, so that convenience and data verification reliability are improved.
In an alternative embodiment, the attributes include: fields, ids, and primary keys, etc.
According to the embodiment of the invention, the corresponding verification logic script is generated through different attributes of the verification logic, so that the configurability of the data verification logic is realized, the flexibility of the subsequent data verification is improved, and the efficiency of the subsequent data verification is improved.
The execution module 103 is configured to acquire data to be verified, and execute data verification of the data to be verified in response to the verification logic script and the verification manner to obtain a data verification result.
In at least one embodiment of the present invention, the data to be verified is generated according to an actual service scenario, for example, for a service scenario of an order page, the data to be verified includes: order information verification and user identity verification. Wherein, the order information verification comprises: checking the type of the order, the format of the order, the date of the order and the like; the user identity verification comprises the following steps: user account verification, user password verification, user contact information verification and the like. It is emphasized that, to further ensure the privacy and security of the data to be verified, the data to be verified may also be stored in a node of a block chain.
Specifically, as shown in fig. 2, the performing data verification on the data to be verified in response to the verification logic script and the verification manner to obtain a data verification result includes:
s30, identifying the object to be verified in the data to be verified;
in an optional embodiment, the object to be checked in the data to be checked is identified by using an sql statement.
S31, calculating the similarity between the object to be verified and the verification object in the verification logic script, and selecting the verification logic script corresponding to the verification object with the similarity larger than the preset similarity;
in an optional embodiment, the following method is used to calculate the similarity between the object to be verified and the verification object in the verification logic script:
Figure BDA0002872623580000101
wherein x represents the object to be verified, y represents the verification object in the standard verification logic script, and xiRepresenting the i-th vector value, y, of the object to be verifiediAnd checking the ith vector value of the object in the standard checking logic script.
Optionally, the preset similarity is 0.75.
And S32, verifying the object to be verified according to the verification logic script corresponding to the selected verification object and the data verification mode to obtain a data verification result.
It is to be noted that the verification method may be a verification method selected from the first and/or second verification methods according to a user requirement, which is not limited herein.
Further, in another embodiment of the present invention, after obtaining the data verification result, the method may further include: and carrying out visualization processing on the data verification result to generate a visualization interface.
In an alternative embodiment, the visualization interface is presented in the form of a table, chart, or the like.
In detail, as shown in fig. 3, the visualization interface includes one or more of the following combinations:
s330, obtaining a checking result indicating a problematic object to be checked, and displaying the reason of the problem and the method information for suggesting modification on a user interface;
and S331, counting error types with preset digits according to the check result, and displaying the error types to a user.
The verification logic of the current data can be reflected to the server developer based on the visual interface, so that the server developer can more visually find out which errors exist in the data transmitted to the server instead of only one error report message, the feedback of the error report message is enriched, and the developer calling the server interface can perfect self logic and modify the data.
In an alternative embodiment, the visualization interface is generated by a server-side template engine (Ejs template).
To sum up, in the embodiments of the present invention, a data verification condition configured based on a service type in a data verification tool is first obtained, where the data verification condition includes: the verification object, the verification logic and the verification mode corresponding to the verification object can configure corresponding data verification according to different service types, a user does not need to repeatedly configure the internal verification logic, and redundancy is reduced, so that convenience is provided for developers, and the reliability of subsequent data verification is improved; secondly, according to the verification logic of the verification object, the embodiment of the invention generates the corresponding verification logic script, and according to the generation of different verification logic scripts, the configurability of the data verification logic can be realized, the flexibility of the subsequent data verification is improved, and the efficiency of the subsequent data verification is improved.
Fig. 5 is a schematic structural diagram of an electronic device implementing the method for verifying data according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a data checking program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of a data verification program, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged 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. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., data checking programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The data verification program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions, which when executed in the processor 10, can implement:
acquiring data verification conditions configured in a data verification tool based on service types, wherein the data verification conditions comprise: the verification object is used for verifying the corresponding verification logic and verification mode of the object;
generating a verification logic script according to the verification logic of the verification object;
and acquiring data to be verified, responding to the verification logic script and the verification mode, executing data verification of the data to be verified, and acquiring a data verification result.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for data verification, the method comprising:
acquiring data verification conditions configured in a data verification tool based on service types, wherein the data verification conditions comprise: the verification object and the verification logic and the verification mode corresponding to the verification object;
generating a verification logic script according to the verification logic of the verification object;
and acquiring data to be verified, responding to the verification logic script and the verification mode, executing data verification of the data to be verified, and acquiring a data verification result.
2. The data verification method of claim 1, wherein generating a verification logic script based on the data verification logic of the verification object comprises:
if the verification logic is identified to be common attribute, obtaining the common attribute verification logic of the verification object from the packaged verification logic in the data verification tool according to the common attribute, converting the common attribute verification logic into a corresponding first request message, and generating a corresponding verification logic script after analyzing the first request message.
3. The data verification method of claim 1, wherein generating a verification logic script based on the data verification logic of the verification object comprises:
if the verification logic is identified to be in a non-common attribute, inquiring a target character matched with the inspection object in a preset storage list in the data verification tool;
if the target character matched with the inspection object is inquired, acquiring non-common attribute check logic matched with the target character from the packaged check logic in the data check tool, converting the non-common attribute check logic into a corresponding second request message, and analyzing the second request message to generate a corresponding check logic script.
4. The data verification method of claim 3, wherein generating a verification logic script based on the data verification logic of the verification object comprises:
if the target character matched with the inspection object is not inquired, searching a character with similar semantics with the inspection object in a preset storage list in the data inspection tool, and displaying the inspection logic of the character with similar semantics on a user interface;
receiving the modification of the check logic of the characters with similar semantics on a user interface by a user to obtain the modified check logic;
and converting the modified check logic into a corresponding third request message, and analyzing the third request message to generate a corresponding check logic script.
5. The data verification method of claim 1, wherein the performing data verification of the data to be verified in response to the target verification logic script and the data verification manner to obtain a data verification result comprises:
identifying an object to be verified in the data to be verified;
calculating the similarity between the object to be verified and the verification object in the verification logic script, and selecting the verification logic script corresponding to the verification object with the similarity larger than the preset similarity;
and verifying the object to be verified according to the selected verification logic script corresponding to the verification object and the data verification mode to obtain a data verification result.
6. The data verification method of claim 5, wherein the calculating the similarity between the object to be verified and the verification object in the verification logic script comprises:
calculating the similarity between the object to be verified and the verification object in the verification logic script by using the following method:
Figure FDA0002872623570000021
wherein x represents the object to be verified, y represents the verification object in the verification logic script, and xiAn ith vector value representing an object to be verified,yiand checking the ith vector value of the object in the logic script.
7. The data verification method of any one of claims 1 to 6, wherein after obtaining the data verification result, the method further comprises: performing visualization processing on the data verification result to generate a visualization interface, wherein the visualization interface comprises one or more of the following combinations:
acquiring a verification result indicating a problematic object to be verified, and displaying the reason of the problem and the method information for suggesting modification on a user interface;
and counting error types with preset digits in the prior error arrangement according to the check result, and displaying the error types to a user.
8. A data verification apparatus, the apparatus comprising:
an obtaining module, configured to obtain a data verification condition configured based on a service type in a data verification tool, where the data verification condition includes: the verification object is used for verifying the corresponding verification logic and verification mode of the object;
the generating module is used for generating a verification logic script according to the verification logic of the verification object;
and the execution module is used for acquiring the data to be verified, responding to the verification logic script and the verification mode, executing the data verification of the data to be verified, and obtaining a data verification result.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a data verification method as claimed in any one of claims 1 to 7.
10. The present invention also provides a computer-readable storage medium comprising a storage data area storing created data and a storage program area storing a computer program, wherein the computer program, when executed by a processor, implements the data verification method of any one of claims 1 to 7.
CN202011642729.0A 2020-12-30 2020-12-30 Data verification method and device, electronic equipment and computer readable storage medium Pending CN112667244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011642729.0A CN112667244A (en) 2020-12-30 2020-12-30 Data verification method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011642729.0A CN112667244A (en) 2020-12-30 2020-12-30 Data verification method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112667244A true CN112667244A (en) 2021-04-16

Family

ID=75412229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011642729.0A Pending CN112667244A (en) 2020-12-30 2020-12-30 Data verification method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112667244A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113362040A (en) * 2021-06-30 2021-09-07 平安普惠企业管理有限公司 Approval chain configuration updating method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007317096A (en) * 2006-05-29 2007-12-06 Fujitsu Ltd Verification scenario producing program, recording medium, verification scenario producing system, and verification scenario producing method
CN108345511A (en) * 2017-01-24 2018-07-31 阿里巴巴集团控股有限公司 A kind of application data verification method, device and electronic equipment
CN109325045A (en) * 2018-09-21 2019-02-12 中国银行股份有限公司 A kind of method and device of issuing bank
CN110633160A (en) * 2019-08-22 2019-12-31 浙江大搜车软件技术有限公司 Interface calling method and device, computer equipment and storage medium
CN111222942A (en) * 2019-12-27 2020-06-02 天津幸福生命科技有限公司 Data processing method and device, readable medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007317096A (en) * 2006-05-29 2007-12-06 Fujitsu Ltd Verification scenario producing program, recording medium, verification scenario producing system, and verification scenario producing method
CN108345511A (en) * 2017-01-24 2018-07-31 阿里巴巴集团控股有限公司 A kind of application data verification method, device and electronic equipment
CN109325045A (en) * 2018-09-21 2019-02-12 中国银行股份有限公司 A kind of method and device of issuing bank
CN110633160A (en) * 2019-08-22 2019-12-31 浙江大搜车软件技术有限公司 Interface calling method and device, computer equipment and storage medium
CN111222942A (en) * 2019-12-27 2020-06-02 天津幸福生命科技有限公司 Data processing method and device, readable medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
M. IYAMA, H. KIRINUKI, H. TANNO AND T. KURABAYASHI: "Automatically Generating Test Scripts for GUI Testing", 2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION WORKSHOPS (ICSTW), 19 July 2018 (2018-07-19) *
王巍: "基于DSL的一种数据合法性校验框架的设计与实现", 中国优秀硕士学位论文全文数据库, 15 January 2019 (2019-01-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113362040A (en) * 2021-06-30 2021-09-07 平安普惠企业管理有限公司 Approval chain configuration updating method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112134739B (en) Link state tracking method and device, electronic equipment and computer storage medium
CN113704665B (en) Dynamic service release method and device, electronic equipment and storage medium
CN112528307A (en) Service request checking method and device, electronic equipment and storage medium
CN112506779A (en) Software interface testing method and device, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN112579098A (en) Software release method and device, electronic equipment and readable storage medium
CN113051171A (en) Interface test method, device, equipment and storage medium
CN113806434A (en) Big data processing method, device, equipment and medium
CN115129753A (en) Data blood relationship analysis method and device, electronic equipment and storage medium
CN115081016A (en) Log desensitization method and device, electronic equipment and storage medium
CN112464619B (en) Big data processing method, device and equipment and computer readable storage medium
CN114385497A (en) Test environment generation method and device, electronic equipment and storage medium
CN114138243A (en) Function calling method, device, equipment and storage medium based on development platform
CN113434542A (en) Data relation identification method and device, electronic equipment and storage medium
CN113051224A (en) File transmission method and device, electronic equipment and computer readable storage medium
CN112579452A (en) Software automation test method, device, equipment and storage medium
CN112541688A (en) Service data checking method and device, electronic equipment and computer storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN114942855A (en) Interface calling method and device, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN115145870A (en) Method and device for positioning reason of failed task, electronic equipment and storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN114510400A (en) Task execution method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination