CN112131100A - Metadata-based front-end and back-end verification method and device - Google Patents

Metadata-based front-end and back-end verification method and device Download PDF

Info

Publication number
CN112131100A
CN112131100A CN202010826908.3A CN202010826908A CN112131100A CN 112131100 A CN112131100 A CN 112131100A CN 202010826908 A CN202010826908 A CN 202010826908A CN 112131100 A CN112131100 A CN 112131100A
Authority
CN
China
Prior art keywords
verification
rule
check
data
determining
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
CN202010826908.3A
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.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information Technology 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN202010826908.3A priority Critical patent/CN112131100A/en
Publication of CN112131100A publication Critical patent/CN112131100A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs

Abstract

The application discloses a front-end and back-end verification method and device based on metadata, which are used for solving the problems that in the front-end and back-end data verification process, the front-end and back-end performances are inconsistent, verification errors are easily caused, and the like. The method comprises the steps of receiving a data verification request, and determining a front-end model and a rear-end entity corresponding to the data verification request; determining a front-end check rule corresponding to the front end according to the front-end model and the rear-end entity, determining a corresponding front-end interpreter according to the type of the front-end check rule, and performing front-end check on data; and determining a back-end check rule corresponding to the back end according to the front-end model and the back-end entity, determining a corresponding back-end interpreter according to the type of the back-end check rule, and performing back-end check on the data. The method unifies the data verification process of the front end and the back end, and is beneficial to providing the accuracy of data verification.

Description

Metadata-based front-end and back-end verification method and device
Technical Field
The present application relates to the field of front-end and back-end data verification, and in particular, to a front-end and back-end verification method and apparatus based on metadata.
Background
In a system with a front-end and back-end separation architecture, in order to ensure the accuracy of data, data needs to be verified at the front end and the back end of the system respectively.
At present, in the process of system development, developers usually develop the front end and the back end of a system respectively, and adopt different codes and logics to perform front end verification and back end verification on data respectively.
However, this not only increases the workload of developers, but also may cause the same business rule of data, and different logic expressions exist at the front and back ends, respectively, so that the front and back ends do not express the same logic expression, thereby causing problems such as omission in the data verification process.
Disclosure of Invention
The embodiment of the application provides a front-end and back-end verification method and device based on metadata, and aims to solve the problems that in the front-end and back-end data verification process, the front-end and back-end performances are inconsistent, verification errors are easily caused, and the like.
The metadata-based front-end and back-end verification method provided by the embodiment of the application comprises the following steps:
receiving a data verification request, and determining a front-end model and a rear-end entity corresponding to the data verification request;
determining a front-end check rule corresponding to the front end according to the front-end model and the rear-end entity, determining a corresponding front-end interpreter according to the type of the front-end check rule, and performing front-end check on data;
and determining a back-end check rule corresponding to the back end according to the front-end model and the back-end entity, determining a corresponding back-end interpreter according to the type of the back-end check rule, and performing back-end check on the data.
In one example, before determining a front-end verification rule corresponding to a front end according to the front-end model and a back-end entity, the method further includes: initializing a front page; determining a check rule set corresponding to the front-end model according to the front-end model corresponding to the front-end page; storing the set of check rules in a cache.
In one example, before determining a front-end verification rule corresponding to a front end according to the front-end model and a back-end entity, the method further includes: and grouping the check rule sets according to the identifiers of the rear-end entities.
In one example, front-end verification of data includes: establishing a check rule context according to the entity data corresponding to the front-end model and the determined rule parameters corresponding to the front-end check rule; and transmitting the checking rule context to a front-end interpreter for front-end checking.
In one example, front-end verification of data includes: calling a predefined check rule base interface according to the configuration of the front-end interpreter; and performing front-end verification according to the verification rule base interface and the verification rule context.
In one example, the method further comprises: respectively determining whether the check of each check rule passes in the front-end check and the back-end check; and if the verification fails, recording the entity data and the verification result.
In one example, the method further comprises: determining whether the check of all the check rules passes; and if the verification rule that the verification fails exists, rejecting the operation corresponding to the data verification request.
In one example, before back-end checking the data, the method further comprises: and after the verification of all the front-end verification rules is determined to pass, carrying out back-end verification.
In one example, before determining the corresponding front-end interpreter according to the type of the front-end check rule, the method further includes: determining a corresponding interpreter set according to the types of all the check rules in the check rule set; storing the set of interpreters in a cache.
The embodiment of the application provides a front-end and back-end verification device based on metadata, include:
the receiving module is used for receiving a data verification request and determining a front-end model and a rear-end entity corresponding to the data verification request;
the front-end checking module is used for determining a front-end checking rule corresponding to the front end according to the front-end model and the rear-end entity, determining a corresponding front-end interpreter according to the type of the front-end checking rule and performing front-end checking on data;
and the back-end checking module is used for determining a back-end checking rule corresponding to the back end according to the front-end model and the back-end entity, determining a corresponding back-end interpreter according to the type of the back-end checking rule and performing back-end checking on the data.
The embodiment of the application provides a front-end and back-end verification method and device based on metadata, which at least have the following beneficial effects:
by establishing a uniform check rule interface of the front end and the back end, the processing process of the front end and the back end for data check is unified. And the front-end interpreter and the back-end interpreter are established according to the type of the check rule, so that the interpretation of the check rule described by the metadata is unified. Therefore, the front end and the back end can be ensured to have consistent performance on the same service rule, the problems of verification omission and the like are avoided, the data verification accuracy is favorably provided, the workload of developers can be saved, and the processing efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart of a metadata-based front-end and back-end verification method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a front-end and back-end verification apparatus based on metadata according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of a metadata-based front-end and back-end verification method provided in an embodiment of the present application, which specifically includes the following steps:
s101: and receiving a data verification request, and determining a front-end model and a rear-end entity corresponding to the data verification request.
In the embodiment of the application, the server side can determine the predefined interface standards to be followed when performing front-end and back-end verification on data, including mapping configuration of a front-end model and a verification rule, configuration of a verification rule interpreter, context of the verification rule, a verification rule base interface, a verification rule type and the like.
Specifically, the client may initiate a data verification request to the server based on an operation of the user, so as to request the server to execute a corresponding operation. Therefore, the server can receive the data verification request from the client, and accordingly determine the front-end model corresponding to the front end of the system and the back-end entity corresponding to the back end, which are involved in the data verification process. The data check request may include a front-end model identifier and a back-end entity identifier.
It should be noted that in the system, one front-end model may correspond to a plurality of back-end entities. A data verification process typically involves one front-end model, and more than one back-end entity.
S102: and determining a front-end check rule corresponding to the front end according to the front-end model and the rear-end entity, determining a corresponding front-end interpreter according to the type of the front-end check rule, and performing front-end check on the data.
In this embodiment, the server may determine a front-end verification rule corresponding to the front-end verification according to the front-end model identifier and the back-end entity identifier in the data verification request. And then, the server side can determine a front-end interpreter corresponding to the corresponding type according to the type of the obtained front-end verification rule, and perform front-end verification on the data by adopting the front-end interpreter.
The method specifically comprises the following steps:
first, the server may invoke a predefined operation of "obtaining a front-end model verification rule" in the "mapping configuration of front-end model and verification rule" service in the interface standard according to the front-end model identifier, and obtain a set of all verification rules corresponding to the front-end model.
The "mapping configuration of the front-end model and the check rule" is used to define the mapping relationship configuration of the front-end model and the check rule, and may include attributes such as an identifier, a front-end model identifier, an entity identifier, and a check rule identifier. The 'identification' is used for uniquely identifying the mapping relation between one front-end model and the check rule; the "front-end model identifier" is used to represent the front-end model included in the mapping relationship; the "entity identifier" is used to indicate an identifier of an entity corresponding to the current mapping relationship configuration; the "check rule identification" is used to uniquely identify a check rule that is applied to the current front-end model.
The server side can group all sets of the check rules corresponding to the obtained front-end model according to the entity identification, and the check rules corresponding to the corresponding entity identification are stored in each group. And then, the server side can determine a verification rule matched with the back-end entity identifier from the set according to the back-end entity identifier corresponding to the data verification request.
It can be known that the finally determined verification rules are all the verification rules corresponding to the data verification request, which are determined according to the front-end model identifier and the back-end entity identifier.
In an embodiment, in the process of initializing the front-end page, after obtaining the set of check rules corresponding to the front-end model, the server may store the set of check rules in the cache. Therefore, the subsequent server side can directly call the check rule set from the cache, so that the check process of the front and rear ends is accelerated, and the check efficiency is improved.
Secondly, the server can call the operation of acquiring the front-end check rule in the predefined check rule configuration service in the interface standard, and determine the front-end check rule applied to the front end from all the check rules determined in the first step.
The 'verification rule configuration' is used for recording metadata information of a verification rule, and comprises attributes such as an identifier, an entity attribute, a verification rule type identifier, a first rule parameter value, a second rule parameter value, whether a front end is applicable or not, whether a rear end is applicable or not, prompt information, a sequence number and the like.
The 'identification' is used for uniquely identifying one check rule; "entity identification" is used to indicate the identification of the entity to which the current verification rule applies; the "entity attribute" is used to indicate the attribute of the entity, i.e. the attribute for which the current check rule is applied; the "verification rule type identifier" is used for indicating the type of the current verification rule; "first rule parameter value" is used to indicate the value of a particular parameter of a verification rule; "second rule parameter value" is used to indicate the value of another specific parameter of the verification rule; aiming at the same check rule type, the parameter values corresponding to different entity attributes are different; whether the front end is applicable or not is used for indicating whether the current check rule is applicable to the front end check, and if so, the current check rule is the front end check rule; whether the back end is applicable or not is used for indicating whether the current check rule is applicable to the back end check, and if so, the current check rule is the back end check rule; the prompt information is used for showing prompt information to a user when the rule is violated; the "sequence number" is used to indicate the order of action of the current check rule.
Thirdly, the server can traverse the obtained front-end check rule to determine the type of the corresponding front-end check rule.
The check rule type is used for checking the type of the rule, and different types of check rules need to be processed by different rule interpreters. The check rule type may include attributes such as a check rule type identifier, a check rule code, a check rule type name, and a description. The checking rule type identifier is used for uniquely identifying one checking rule type; "check rule code" is used to indicate the code of the check rule; "check rule type name" is used to indicate the name of the check rule type; "description" is used to simply describe the purpose and characteristics of the type of verification rule.
Fourthly, the service end can call the operation of acquiring the configuration of the front-end interpreter in the service of 'configuration of the check rule interpreter' predefined in the interface standard, and the corresponding front-end interpreter is determined according to the type of the front-end check rule.
The 'verification rule interpreter configuration' is used for defining the configuration relationship between the verification rule type and the front-end interpreter and the back-end interpreter. A check rule type is respectively provided with a front-end interpreter and a back-end interpreter which are used for the front-end interpretation work and the back-end interpretation work of the corresponding check rule.
The configuration of the check rule interpreter can comprise attributes such as identification, check rule type identification, configuration of a front-end interpreter, configuration of a back-end interpreter, the number of rule parameters and the like. Wherein, the 'identification' is used for uniquely identifying one check rule interpreter configuration; the "check rule type identifier" is used to indicate the check rule type included in the current configuration; the "front-end interpreter configuration" is used for representing the configuration of the front-end interpreter corresponding to the check rule type, and includes the full name of the implementation class of the front-end interpreter; the "configuration of the backend interpreter" is used for representing the configuration of the backend interpreter corresponding to the check rule type, and includes the full name of the implementation class of the backend interpreter; the "number of rule parameters" is used to indicate the number of parameters required for the type of check rule.
In an embodiment, after determining all the check rules (i.e., the check rule set) corresponding to the front-end model, the server may determine a corresponding set of interpreters according to the types of all the check rules, including all the corresponding front-end interpreters and the corresponding back-end interpreters. And then, the server side can store the determined interpreter set in the cache so as to call the interpreter set from the cache directly in the following process, so that the data verification process is accelerated, and the verification efficiency is improved.
Fifthly, the server can load the front-end interpreter program according to the determined configuration description of the front-end interpreter so as to realize the calling of the verification rule base interface. The server side can carry out front-end verification through the verification operation in the verification rule base interface. And if true is returned, the check is passed, otherwise, the check is not passed.
In an embodiment, when the server performs front-end verification on data, a verification rule context may be constructed according to entity data corresponding to the front-end model and the determined rule parameters corresponding to the front-end verification rule. And then, the server side can transmit the check rule context to a corresponding front-end interpreter, the front-end interpreter calls a check rule base interface, and front-end check is carried out according to the check rule context.
The check rule context is used for recording context information required by check, and comprises attributes such as an object to be checked, a field and a check rule parameter list. The object to be verified is the object to be verified, the object to be verified is front-end model object data in the front-end verification process, and the object to be verified is back-end entity object data in the back-end verification process; the "field" indicates a specific field in which the check rule is implemented, and if the check rule is not implemented for the specific field, the attribute value is null; "verification rule parameter list" means a list of parameters to which a verification rule relates.
S103: and determining a back-end check rule corresponding to the back end according to the front-end model and the back-end entity, determining a corresponding back-end interpreter according to the type of the back-end check rule, and performing back-end check on the data.
In this embodiment, the server may determine a back-end verification rule corresponding to the verification performed at the back-end according to the front-end model identifier and the back-end entity identifier in the data verification request. And then, the server side can determine a back-end interpreter corresponding to the corresponding type according to the type of the obtained back-end verification rule, and perform back-end verification on the data by adopting the back-end interpreter.
The method specifically comprises the following steps:
first, the server may invoke a "obtain backend check rule" operation in a "check rule configuration" service predefined in the interface standard, and determine a front-end check rule applied to the backend from the check rule set determined in S102.
Secondly, the server can traverse the obtained backend verification rules to determine the types of the corresponding backend verification rules.
And thirdly, the server side can call the operation of acquiring the configuration of the back-end interpreter in the service of 'configuration of the check rule interpreter' predefined in the interface standard, and the corresponding back-end interpreter is determined according to the type of the back-end check rule.
In one embodiment, the server may first determine whether a predetermined interpreter set exists in the cache, and if so, the server may directly call the interpreter set, and if not, the server may perform corresponding determination again.
Fourthly, the server side can load the program of the back-end interpreter according to the determined configuration description of the back-end interpreter so as to realize the calling of the verification rule base interface. The server side can carry out back-end verification through the verification operation in the verification rule base interface. And if true is returned, the check is passed, otherwise, the check is not passed.
In an embodiment, when the server performs the backend verification on the data, the server may construct a verification rule context according to the entity data corresponding to the backend entity and the determined rule parameters corresponding to the backend verification rule. And then, the server side can transmit the check rule context to a corresponding back-end interpreter, the back-end interpreter calls a check rule base interface, and the back-end check is carried out according to the check rule context.
It should be noted that, in the embodiment of the present application, the front-end verification process described in S102 is substantially similar to the back-end verification process described in S103, and therefore, reference may be made to relevant descriptions in S102 for parts that are not described in detail in S103.
In the embodiment of the application, the processing process of the front end and the back end for data verification is unified by establishing the unified verification rule interface of the front end and the back end. And the front-end interpreter and the back-end interpreter are established according to the type of the check rule, so that the interpretation of the check rule described by the metadata is unified. Therefore, the front end and the back end can be ensured to be consistent in performance of the same business rule, the problems of verification omission and the like are avoided, meanwhile, the workload of developers can be saved, and the development efficiency is improved.
In an embodiment, in the process of performing front-end verification and back-end verification, the server needs to perform verification respectively according to each verification rule to determine whether each verification rule passes verification. If the verification is passed, the server can continue to verify the next verification rule. If the verification fails, the server side can record corresponding entity data and the verification result through the violation collector to form violation collection records.
The violation collection record is used for recording information violating the verification rule, namely information that the verification fails, and the information includes attributes such as a verification rule name, a verification entity, a verification field and prompt information. Wherein, the "verification rule name" is used for indicating the name of the verification rule which fails to pass the verification; "checking entity" is used to denote the related entity that violates (i.e., fails the check); "check field" is used to indicate the relevant field of violation; the "prompt message" is used to indicate that the verification failure is a prompt message to be presented to the user.
In an embodiment, during the process of performing front-end verification or back-end verification, the server needs to determine whether all verification rules needing to be verified pass verification. And in the same way, the verification of the front end is passed only if all the verification rules corresponding to the front end pass the verification, and the verification of the rear end is passed only if all the verification rules corresponding to the rear end pass the verification. If any check rule which does not pass the check exists, the server side can judge that the data check request does not conform to the check rule and can refuse the operation corresponding to the data check request.
In one embodiment, the server side needs to determine that all the front-end verification rules pass verification, and can perform subsequent back-end verification operation after the front-end verification is completed. If any front-end check rule in the front-end check fails, the back-end check cannot be performed.
For ease of understanding, the present application is described with front-end and back-end verification of sales orders as an example.
In the front-end verification process, the method comprises the following steps:
first, when initializing a front-end page, the server may invoke a "obtain front-end model check rule" operation in "mapping configuration of front-end model and check rule" service according to a front-end model identifier, and obtain a set of all check rules corresponding to the front-end model.
As shown in table 1, all the verification rules corresponding to the sales order entity. Wherein, the 1 st line represents the attribute, and the 2 nd to 4 th lines represent the corresponding attribute value. It can be known that the check rule set corresponding to the front-end model of the sales order entity includes 3 check rules.
TABLE 1
Figure BDA0002636545600000101
Secondly, the server can call the operation of acquiring the front-end check rule in the predefined check rule configuration service in the interface standard, and the front-end check rule applied to the front end is determined from the check rule set determined in the first step.
It can be seen that the two verification rules identified as 1, 3 in table 1 apply to front-end verification.
Thirdly, the server can traverse the obtained front-end check rule to determine the type of the corresponding front-end check rule.
As shown in table 2, a verification rule type information table corresponding to the determined verification rule is provided. In the table, the 1 st row represents an attribute, and the 2 nd and 3 rd rows represent corresponding attribute values. It can be seen that the type of the check rule identified as 1 in the second step is different from the type of the check rule identified as 3.
TABLE 2
Figure BDA0002636545600000102
Figure BDA0002636545600000111
Fourthly, the service end can call the operation of acquiring the configuration of the front-end interpreter in the service of 'configuration of the check rule interpreter' predefined in the interface standard, and the corresponding front-end interpreter is determined according to the type of the front-end check rule.
As shown in table 3 and table 4, the interpreter configurations corresponding to two different types of verification rules are respectively configured. The first columns of tables 3 and 4 each represent an attribute, and the second columns each represent a corresponding attribute value.
TABLE 3
Properties Value of
Identification 1
Verification rule type identification Range
Front end interpreter configuration valid.RangeInterpreter,RangeInterpreter.js
Back-end interpreter configuration com.demo.erp.valid.RangeRule
Number of rule parameters 2
TABLE 4
Figure BDA0002636545600000112
Figure BDA0002636545600000121
It can be seen that the front-end interpreter of the verification rule identified as 1 in the first step is configured as valid.
Fifthly, the server side can construct a check rule context according to the entity data, the field of the current rule and the parameter value. And the server loads the front-end interpreter program according to the determined configuration description of the front-end interpreter, and transmits the check rule context to the front-end interpreter program so as to realize the calling of the check rule base interface. The server side can carry out front-end verification through the verification operation in the verification rule base interface. And if true is returned, the check is passed, otherwise, the check is not passed.
Therefore, the server can check according to the above steps and all front-end check rules in sequence. If all the rules pass the verification, the data can be submitted to the back end for the back end verification.
It should be noted that, since the front-end verification process and the back-end verification process are substantially the same, the back-end verification process is not described in detail herein, and specific reference may be made to the steps of the front-end verification process and the related description of the foregoing S103.
After the server side carries out back-end verification, if the verification is passed, the entity data can be persisted into the database, otherwise, the data verification request can be refused.
Based on the same inventive concept, the metadata-based front-end and back-end verification method provided in the embodiment of the present application further provides a corresponding metadata-based front-end and back-end verification device, as shown in fig. 2.
Fig. 2 is a schematic structural diagram of a front-end and back-end verification apparatus based on metadata according to an embodiment of the present application, which specifically includes:
the receiving module 201 receives a data verification request, and determines a front-end model and a back-end entity corresponding to the data verification request;
the front-end checking module 202 determines a front-end checking rule corresponding to the front end according to the front-end model and the rear-end entity, determines a corresponding front-end interpreter according to the type of the front-end checking rule, and performs front-end checking on the data;
and the back-end checking module 203 determines a back-end checking rule corresponding to the back end according to the front-end model and the back-end entity, determines a corresponding back-end interpreter according to the type of the back-end checking rule, and performs back-end checking on the data.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A front-end and back-end verification method based on metadata is characterized by comprising the following steps:
receiving a data verification request, and determining a front-end model and a rear-end entity corresponding to the data verification request;
determining a front-end check rule corresponding to the front end according to the front-end model and the rear-end entity, determining a corresponding front-end interpreter according to the type of the front-end check rule, and performing front-end check on data;
and determining a back-end check rule corresponding to the back end according to the front-end model and the back-end entity, determining a corresponding back-end interpreter according to the type of the back-end check rule, and performing back-end check on the data.
2. The method of claim 1, wherein before determining the front-end verification rule corresponding to the front end according to the front-end model and the back-end entity, the method further comprises:
initializing a front page;
determining a check rule set corresponding to the front-end model according to the front-end model corresponding to the front-end page;
storing the set of check rules in a cache.
3. The method of claim 2, wherein before determining the front-end verification rule corresponding to the front end according to the front-end model and the back-end entity, the method further comprises:
and grouping the check rule sets according to the identifiers of the rear-end entities.
4. The method of claim 1, wherein performing a front-end check on the data comprises:
establishing a check rule context according to the entity data corresponding to the front-end model and the determined rule parameters corresponding to the front-end check rule;
and transmitting the checking rule context to a front-end interpreter for front-end checking.
5. The method of claim 4, wherein performing a front-end check on the data comprises:
calling a predefined check rule base interface according to the configuration of the front-end interpreter;
and performing front-end verification according to the verification rule base interface and the verification rule context.
6. The method of claim 1, further comprising:
respectively determining whether the check of each check rule passes in the front-end check and the back-end check;
and if the verification fails, recording the entity data and the verification result.
7. The method of claim 6, further comprising:
determining whether the check of all the check rules passes;
and if the verification rule that the verification fails exists, rejecting the operation corresponding to the data verification request.
8. The method of claim 6, wherein prior to back-end checking the data, the method further comprises:
and after the verification of all the front-end verification rules is determined to pass, carrying out back-end verification.
9. The method of claim 2, wherein before determining the corresponding front-end interpreter according to the type of the front-end validation rule, the method further comprises:
determining a corresponding interpreter set according to the types of all the check rules in the check rule set;
storing the set of interpreters in a cache.
10. A front-end and back-end verification device based on metadata, comprising:
the receiving module is used for receiving a data verification request and determining a front-end model and a rear-end entity corresponding to the data verification request;
the front-end checking module is used for determining a front-end checking rule corresponding to the front end according to the front-end model and the rear-end entity, determining a corresponding front-end interpreter according to the type of the front-end checking rule and performing front-end checking on data;
and the back-end checking module is used for determining a back-end checking rule corresponding to the back end according to the front-end model and the back-end entity, determining a corresponding back-end interpreter according to the type of the back-end checking rule and performing back-end checking on the data.
CN202010826908.3A 2020-08-17 2020-08-17 Metadata-based front-end and back-end verification method and device Pending CN112131100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010826908.3A CN112131100A (en) 2020-08-17 2020-08-17 Metadata-based front-end and back-end verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010826908.3A CN112131100A (en) 2020-08-17 2020-08-17 Metadata-based front-end and back-end verification method and device

Publications (1)

Publication Number Publication Date
CN112131100A true CN112131100A (en) 2020-12-25

Family

ID=73851536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010826908.3A Pending CN112131100A (en) 2020-08-17 2020-08-17 Metadata-based front-end and back-end verification method and device

Country Status (1)

Country Link
CN (1) CN112131100A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115825A (en) * 2021-10-08 2022-03-01 北京能科瑞元数字技术有限公司 Front-end and back-end data verification method compatible with software

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115825A (en) * 2021-10-08 2022-03-01 北京能科瑞元数字技术有限公司 Front-end and back-end data verification method compatible with software
CN114115825B (en) * 2021-10-08 2022-09-02 北京能科瑞元数字技术有限公司 Front-end and back-end data verification method compatible with software

Similar Documents

Publication Publication Date Title
CN111104392B (en) Database migration method and device, electronic equipment and storage medium
CN107633016B (en) Data processing method and device and electronic equipment
CN111752846A (en) Interface testing method and device
CN112131100A (en) Metadata-based front-end and back-end verification method and device
CN111767543B (en) Replay attack vulnerability determination method, device, equipment and readable storage medium
CN107016613B (en) Data modification method and device
CN112433936A (en) Test method, test device and storage medium
CN115544132A (en) Data import method and system and electronic equipment
CN110264357B (en) Account moving processing method, device, equipment and computer readable storage medium
CN113032836A (en) Data desensitization method and apparatus
CN112488562A (en) Service implementation method and device
CN110287191B (en) Data alignment method and device, storage medium and electronic device
CN116932569A (en) Data query method, device, electronic equipment and storage medium
CN117573337A (en) Vendor settlement method and system based on health management service and electronic equipment
CN117032646A (en) Index configuration method, index execution method and system
CN116109262A (en) Small and micro enterprise qualification identification method and device based on third party data validity
CN114519090A (en) Stop word management method and device and electronic equipment
CN113947393A (en) Transfer data processing method and device, storage medium and electronic equipment
CN114693449A (en) Block chain based transaction request processing method and device and storage medium
CN112990868A (en) Method, system, equipment and storage medium for automatic vehicle insurance claims
CN113052574A (en) Workflow data processing method and device, storage medium and electronic equipment
CN115391214A (en) Test case detection method and device
CN114610281A (en) Financial rule engine system based on script and processing method
CN116820934A (en) Database specification detection method and device, electronic equipment and storage medium
CN116401630A (en) Data verification method and device, storage medium and computer equipment

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