WO2017000828A1 - Rule-based data object verification method, apparatus, system and electronic device - Google Patents

Rule-based data object verification method, apparatus, system and electronic device Download PDF

Info

Publication number
WO2017000828A1
WO2017000828A1 PCT/CN2016/086867 CN2016086867W WO2017000828A1 WO 2017000828 A1 WO2017000828 A1 WO 2017000828A1 CN 2016086867 W CN2016086867 W CN 2016086867W WO 2017000828 A1 WO2017000828 A1 WO 2017000828A1
Authority
WO
WIPO (PCT)
Prior art keywords
verification
sub
rule
data object
rules
Prior art date
Application number
PCT/CN2016/086867
Other languages
French (fr)
Chinese (zh)
Inventor
欧舟
Original Assignee
阿里巴巴集团控股有限公司
欧舟
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 阿里巴巴集团控股有限公司, 欧舟 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017000828A1 publication Critical patent/WO2017000828A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the present application relates to the field of data verification technologies, and in particular, to a rule-based data object verification method and apparatus.
  • the application also relates to a rule-based data object verification system and an electronic device.
  • the existing method includes the following steps: 1) applying each sub-verification rule included in the verification rule one by one to verify the data object to be verified, and obtaining the verification result corresponding to each sub-verification rule; 2) Calculate and obtain the verification result corresponding to the entire verification rule according to the verification result corresponding to each sub-verification rule and the logical relationship between each sub-validation rule.
  • the inventors have found through analysis that since the above methods need to execute each sub-verification rule included in the verification rule one by one, the calculation amount in the whole verification process is large, which brings about a problem of slow verification speed, high system load, and high computational resource consumption.
  • the prior art when applying the preset verification rule to verify the verification data object, the prior art has a problem that the verification data object needs to execute all the sub-validation rules included in the verification rule.
  • the present application provides a rule-based data object verification method and apparatus, in order to solve the application of the preset verification rule to verify the data object to be verified, the existing technology to be verified data object needs to execute all the children included in the verification rule Verify the problem with the rule.
  • the application additionally provides a rule based data object verification system, and an electronic device.
  • the application provides a rule-based data object verification method, including:
  • the sorting criterion refers to the sub-query enabling the sub-verification result to be quickly determined
  • the sorting criteria include:
  • the logical relationship between the sub-verification rules is an AND relationship
  • the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed;
  • the atomic verification rule refers to a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • the execution order of the sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • the execution order of the first-level sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value;
  • the atomic verification A rule is a verification rule that includes only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • W is the first integrated priority score
  • X is a normalized value of the verification pass rate corresponding to the sub-verification rule
  • Y is a normalized response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • W is the first comprehensive priority score
  • X is a verification pass corresponding to the sub-verification rule.
  • the normalized value of the overshoot Y is the normalized value of the response time of the data object attribute value that the sub-verification rule depends on
  • N1 is the weight of the verification pass rate
  • N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • the execution order of the sub-verification rules is sorted in a descending manner of the verification pass rate corresponding to the atomic verification rule, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the sub-verification rules with high verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • the execution order of the first level sub-verification rules is sorted in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value is performed.
  • the atomic verification rule refers to a verification rule that includes only one comparison relationship
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • W is the second comprehensive priority score
  • X is a normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • W is the second comprehensive priority score
  • X is a normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • sorting the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node, and obtaining the execution order of the sub-verification rules .
  • the execution order of each atomic verification rule under the current node is sorted in a descending manner of the verification pass rate corresponding to the atomic verification rule;
  • Determining whether the child node of the current node includes an intermediate node if yes, using the child node of the current node as a child node of the intermediate node as the current node, and returning to determine whether the logical relationship of the current node is For the step of the relationship, the order of execution of the atomic verification rules under each intermediate node of the rule tree is sorted.
  • the sorting criteria include:
  • the atomic verification rule refers to a verification rule that includes only one comparison relationship
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • the sub-verification rules for each level of the predetermined number of stages are stepped down, in accordance with the ascending order of the response time of the data object attribute values that the atomic verification rule depends on, and the sub-verification rules are The execution order is sorted to obtain the execution order of the sub-verification rules.
  • the sorting criteria include:
  • the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules including:
  • the execution order of the first level sub-verification rules is sorted in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rules depend on, and the execution order of the sub-verification rules is obtained.
  • the verification pass rate corresponding to the sub-verification rule is calculated by using the following steps:
  • the ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule can be applied is used as the verification corresponding to the sub-verification rule. Passing rate.
  • the data object to which the sub-verification rule is applicable includes all data objects to which the sub-verification rule can be applied, or a preset sampling sampled from all data objects to which the sub-verification rule can be applied. Part of the data object of the scale.
  • the verification pass rate corresponding to the sub-verification rule is calculated by using the following steps:
  • the weighted average obtained by the calculation is used as the verification pass rate corresponding to the sub-verification rule.
  • sampling data verification pass rate corresponding to the sub-verification rule is generated by the following steps:
  • the ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification pass rate corresponding to the sub-verification rule.
  • the verification pass rate corresponding to the sub-verification rule is calculated by using the following steps:
  • the weighted average obtained by the calculation is used as the verification pass rate corresponding to the sub-verification rule.
  • the corresponding real-time verification pass rate of the sub-verification rule in the preset time interval is generated by the following steps:
  • the ratio of the real-time verification pass times to the real-time verification run times is used as a real-time verification pass rate corresponding to the sub-verification rules in the preset time interval range.
  • the real-time verification pass times and the real-time verification run times are generated by the following steps:
  • the real-time verification pass times of the sub-verification rules in the preset time interval range are cumulatively increased by one;
  • the number of real-time verification runs of the sub-verification rule within the preset time interval is cumulatively increased by one.
  • the verification pass rate of each sub-verification rule is calculated.
  • the preset condition is as follows:
  • the time interval between the current time and the last verification of the verification pass rate of each sub-verification rule is greater than the preset time interval.
  • the calculating according to the logical relationship between the foregoing judgment result and the sub-verification rule, the verification result of acquiring the data object to be verified, adopting one of the following rules:
  • the verification result is that the data object to be verified does not meet the verification rule
  • the verification result is that the data object to be verified conforms to the verification rule.
  • the present application also provides a rule-based data object verification apparatus, including:
  • An obtaining unit configured to obtain a data object to be verified and a corresponding verification rule thereof
  • a sorting unit configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling quick verification a sorting criterion in which the sub-verification rules of the result are preferentially executed;
  • a verification unit configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
  • a calculating unit configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
  • the sorting criteria include:
  • the logical relationship between the sub-verification rules is an AND relationship
  • the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed;
  • the atomic verification rule refers to a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
  • Judging is a subunit, if used, the rise of the verification pass rate corresponding to the atom verification rule In the order mode, the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship
  • the determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
  • the sorting criteria include:
  • the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value;
  • the atomic verification A rule is a verification rule that includes only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
  • W is the first integrated priority score
  • X is a normalized value of the verification pass rate corresponding to the sub-verification rule
  • Y is a normalized response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship
  • the determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the first comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining a sub-verification rule Order of execution;
  • W is the first integrated priority score
  • X is a normalized value of the verification pass rate corresponding to the sub-verification rule
  • Y is a normalized response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in a descending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
  • the sorting criteria include:
  • the sub-verification rules with high verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship
  • the determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
  • the sorting criteria include:
  • the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value;
  • the atomic verification A rule is a verification rule that includes only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
  • W is the second comprehensive priority score
  • X is a normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship
  • the determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining the sub-verification rule Order of execution;
  • W is the second comprehensive priority score
  • X is a normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, construct a rule tree; a root node and an intermediate node of the rule tree are logical relationships, a leaf node is the sub-verification rule, and a child node of the root node or an intermediate node is The sub-verification rule or the next-level intermediate node related to the logical relationship of the root node or the intermediate node;
  • a sorting subunit configured to start from a root node of the rule tree, and sequentially sort the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node The order in which sub-verification rules are executed.
  • the ordering subunit includes:
  • a first determining subunit configured to determine whether a logical relationship of the current node is a relationship
  • the determining is a subunit, and if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
  • a second determining subunit configured to determine whether the child node of the current node includes an intermediate node; If yes, the child node of the current node is the child node of the intermediate node as the current node, and returns a step of determining whether the logical relationship of the current node is a relationship, and each step of the rule tree
  • the execution order of the atomic verification rules under the intermediate nodes is sorted.
  • the sorting criteria include:
  • the atomic verification rule refers to a verification rule that includes only one comparison relationship
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • a sorting sub-unit for starting from the first-level sub-verification rule, stepping down the sub-verification rules of the predetermined level of the sub-levels, in accordance with the ascending order of the response time of the data object attribute values of the atomic verification rule, The execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the sorting unit includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a sorting sub-unit configured to sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules .
  • the device further includes:
  • the verification pass rate unit is configured to calculate a verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit includes:
  • Obtaining a subunit configured to acquire a data object to which the sub-verification rule can be applied;
  • a determining subunit configured to determine whether the data object attribute value causes the sub-verification rule to be established
  • the determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
  • a calculating subunit configured to, when traversing all the data objects to which the sub-verification rule is applicable, a ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule is applicable The verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit includes:
  • Obtaining a subunit configured to obtain a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
  • a calculating subunit configured to calculate a weighted average value of the pass rate of each of the sampled data according to a preset weight of each pass sampling data corresponding to the sub-verification rule
  • the assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit further includes:
  • Generating a subunit configured to generate a sampling data verification pass rate corresponding to the sub-verification rule
  • the generating subunit includes:
  • a sampling subunit for sampling out all data objects to which the sub-verification rule can be applied a partial data object of a preset sampling ratio
  • a determining subunit configured to determine whether the data object attribute value causes the sub-verification rule to be established
  • the determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
  • a calculating subunit configured to, when traversing all the partial data objects of the preset sampling ratio, a ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio as the sub-verification rule Verification pass rate.
  • the calculating the verification pass rate unit includes:
  • Obtaining a sub-unit configured to obtain a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
  • a calculating subunit configured to calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate
  • the assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit further includes:
  • Generating a subunit configured to generate a real-time verification pass rate corresponding to the sub-verification rule within a preset time interval
  • the generating subunit includes:
  • Obtaining a sub-unit configured to obtain a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule within the preset time interval;
  • a calculation subunit configured to use a ratio of the number of real-time verification passes to the number of real-time verification runs as a real-time verification pass rate corresponding to the sub-verification rule within the preset time interval.
  • the generating subunit further includes:
  • a first generation subunit configured to generate the real-time verification pass times and the real-time verification run times
  • the first generating subunit includes:
  • a determining subunit configured to determine whether the newly added data object satisfies the sub-verification rule when a data object to which the sub-verification rule is applicable is added within the preset time interval
  • the determining is a sub-unit, configured to: if the result of the foregoing determination is yes, accumulating the number of real-time verification passes of the sub-verification rule within the preset time interval range by one;
  • a counting subunit configured to add one of the real-time verification running times of the sub-verification rule within the preset time interval.
  • the present application further provides a rule-based data object verification system, comprising: the above rule-based data object verification apparatus.
  • an electronic device including:
  • a memory for storing a rule-based data object verification device, when the rule-based data object verification device is executed by the processor, comprising the steps of: acquiring a data object to be verified and a corresponding verification rule thereof;
  • the sorting criterion sorts the execution order of the respective sub-verification rules included in the verification rule to obtain an execution order of the sub-verification rules;
  • the sorting criterion refers to the sub-verification rule that enables the quick determination of the verification result to be prioritized Execution of the sorting criteria; determining, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting criterion is reached or the execution is completed All the sub-verification rules are calculated according to the logical relationship between the judgment result and the sub-validation rule, and the verification result of the data object to be verified is obtained.
  • the rule-based data object verification apparatus includes:
  • An obtaining unit configured to obtain a data object to be verified and a corresponding verification rule thereof
  • a sorting unit configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling the priority execution to be fast Determining an ordering criterion of the sub-verification rules of the verification result;
  • a verification unit configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
  • a calculating unit configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
  • the rule-based data object verification method, device, system, and electronic device provided by the present application sort the execution order of each sub-verification rule included in the verification rule corresponding to the verification data object by using a preset sorting criterion, and obtain sub-verification.
  • the logical relationship between the judgment result and the sub-validation rule is obtained, and the verification result of the data object to be verified is obtained.
  • the method provided by the present application preferentially executes the sub-verification rule capable of quickly determining the verification result, the execution quantity and execution time of the sub-validation rule are greatly reduced in probability, and all sub-verification rules are avoided, thereby improving data verification speed and reducing System load and save the effect of computing resources.
  • FIG. 1 is a flow chart of an embodiment of a rule-based data object verification method of the present application
  • step S103 is a specific flowchart of step S103 in Embodiment A of the rule-based data object verification method of the present application;
  • step S103 in Embodiment B of the rule-based data object verification method of the present application is a specific flowchart of step S103 in Embodiment B of the rule-based data object verification method of the present application
  • step S103 in Embodiment C of the rule-based data object verification method of the present application is a specific flowchart of step S103 in Embodiment C of the rule-based data object verification method of the present application
  • step S103 in Embodiment D of the rule-based data object verification method of the present application is a specific flowchart of step S103 in Embodiment D of the rule-based data object verification method of the present application
  • FIG. 6 is a specific flowchart of a verification pass rate corresponding to a calculation sub-verification rule in Embodiment A of the rule-based data object verification method of the present application;
  • FIG. 7 is a specific flowchart of a verification pass rate corresponding to a calculation sub-verification rule in Embodiment B of the rule-based data object verification method of the present application;
  • FIG. 9 is a specific flowchart of a verification pass rate corresponding to a calculation sub-verification rule in Embodiment C of the rule-based data object verification method of the present application.
  • FIG. 10 is a specific flowchart of a real-time verification pass rate corresponding to a calculated sub-verification rule in a preset time interval according to Embodiment C of the rule-based data object verification method of the present application;
  • 11 is a specific flowchart of the real-time verification pass times and the real-time verification run times of the calculation sub-verification rule of the embodiment of the rule-based data object verification method of the present application in a preset time interval;
  • FIG. 12 is a schematic diagram of an embodiment of a rule-based data object verification apparatus of the present application.
  • FIG. 13 is a detailed schematic diagram of an embodiment of a rule-based data object verification apparatus of the present application.
  • FIG. 14 is a schematic diagram of an embodiment of an electronic device of the present application.
  • the core idea of the rule-based data object verification method provided by the present application is: when applying the preset verification rule to verify the data object to be verified, the sub-verification rule included in the verification rule capable of quickly determining the verification result is preferentially executed. Reduce the number of executions and execution time of sub-verification rules, and avoid executing all sub-verification rules, thereby improving data verification speed, reducing system load, and saving computing resources.
  • FIG. 1 is a flowchart of an embodiment of a rule-based data object verification method according to the present application. The method includes the following steps:
  • Step S101 Acquire a data object to be verified and its corresponding verification rule.
  • the data object to be verified described in the embodiment of the present application represents a thing having a series of different properties or attributes, rather than a thing having only a single value.
  • a data object can be an external entity (eg, anything that generates or uses information), a thing (eg, a report), an action (eg, a phone call), an event (eg, an alarm), a role (eg, a teacher, a student), Unit (for example, accounting), location (for example, warehouse) or structure (for example, file), etc.
  • an entity that can be defined by a set of attributes can be considered a data object, for example, defining a data object to be verified including attribute 1 to attribute 20.
  • the verification rule corresponding to the data object to be verified described in the embodiment of the present application refers to the verification rule to be applied when verifying the data object to be verified.
  • the verification rule described in the embodiment of the present application includes one or more sub-verification rules, and the verification rules are formed by each sub-validation rule and a logical relationship between them.
  • the sub-verification rules described in the embodiments of the present application may be an atomic verification rule or a composite verification rule.
  • Atomic verification A rule is a validation rule that includes only one comparison relationship
  • a composite verification rule is a validation rule that includes at least two atomic verification rules.
  • the logical relationship between sub-validation rules can be a logical relationship with AND, OR, and NOT.
  • the verification rule corresponding to the data object to be verified is essentially composed of multiple atomic verification rules through different logical relationships.
  • the order of calculation is: non, AND, or , and the arithmetic operators and bit operators take precedence over logical operators.
  • the parentheses have the effect of changing the order of operations, and those with parentheses are preferred for calculation.
  • the verification rule is: sub-verification rule 1or sub-verification rule 2 and sub-verification rule 3, the verification order of the verification rule is first calculated and the relationship "sub-validation rule 2 and sub-verification rule 3", and then count or relationship;
  • Parentheses the verification rules are changed to: (sub-verification rule 1or sub-verification rule 2) and sub-verification rule 3, the verification order of this verification rule is to first calculate the relationship or relationship in the parentheses, and then calculate the relationship between the parentheses; The order of operations before and after the parentheses changed.
  • the verification rule described in the embodiment of the present application is expanded step by step until it is expanded to each atom verification rule, and then a verification rule can be converted into a tree, and the root node of the tree is the first level.
  • the logical relationship between the sub-validation rules, the internal nodes of the tree correspond to the logical relationship between the sub-verification rules of the various levels, and the leaf nodes of the tree are atomic verification rules.
  • the sub-verification rules located at different levels are referred to as the first-level sub-verification rules, the second-level sub-verification rules, and the N-th sub-verification rules according to the number of layers of the sub-validation rules relative to the verification rules.
  • the data object to be verified and its corresponding verification rule are obtained.
  • the data object to be verified may be derived from the retrieval result of the database, the structured data transmitted by the World Wide Web (for example, XML document, JSON data, etc.), and the electronic form.
  • the verification rule may be directly written into the verification program or may be stored in the file. In order to actually verify the rules by reading the file.
  • the different data sources of the data objects to be verified and the different storage methods of the verification rules are only changes of the specific implementation manner, and do not deviate from the core of the present application, and therefore are all within the protection scope of the present application.
  • Step S103 Sort the execution order of each sub-verification rule included in the verification rule by using a preset sorting criterion, and obtain an execution order of the sub-verification rules.
  • the sorting standard described in the embodiment of the present application refers to a sorting criterion that enables the sub-verification rule that can quickly determine the verification result to be preferentially executed. To build the above sorting criteria, you first need to analyze the validation rules to find the various factors that affect the speed of data validation.
  • the verification pass rate corresponding to the sub-verification rule described in the embodiment of the present application refers to the proportion of the data object that can pass the sub-verification rule among the data objects of the pre-stored applicable sub-verification rule.
  • a validation rule will contain several, dozens, or even hundreds of atomic validation rules, each of which is a constraint or threshold for the data object to be validated.
  • different atomic verification rules have different degrees of constraint on the data objects to be validated.
  • the verification rule is composed of multiple atomic verification rules through different logical relationships, and the logical relationship between the sub-validation rules can be a logical relationship of AND, OR, and NOT.
  • a logical operation if the logical relationship between the sub-validation rules of a verification rule is AND, as long as the verification result of one of the sub-validation rules is false, the verification result of the entire verification rule is also false; if a verification rule is The logical relationship between the sub-validation rules is or, as long as the verification result of one of the sub-validation rules is true, the verification result of the entire verification rule is also true.
  • the verification result of the entire verification rule can be quickly determined;
  • the logical relationship between the verification rules is or, the verification result of the entire verification rule can be quickly determined if the sub-verification rule with the greater probability that the verification result is true is performed preferentially.
  • one of the factors affecting the speed of data verification is: the verification pass rate of the sub-verification rules. If the verification pass rate of the sub-verification rule is high, it indicates that the verification result of the sub-validation rule has a large probability of being true; if the verification pass rate of the sub-validation rule is low, it indicates that the verification result of the sub-validation rule has a large probability false.
  • An atomic validation rule consists of three parts: the attribute name, the operator, and the comparison value.
  • an atomic verification rule 30 days of trading volume > 100, the attribute name is "30 days of trading volume”, the operator is ">”, and the comparison value is "100".
  • a 30-day transaction amount of a data object to be verified needs to be obtained from the business system. If the actual value of the attribute is 200, by comparing the actual value with the comparison value, It can be determined that the verification result of the verification rule is true.
  • the response time of the data object attribute value has an influence on the data verification speed. It can be seen that the second factor affecting the speed of data verification is the response time of the data object attribute value associated with the sub-validation rule.
  • the factors affecting the speed of data verification include at least two aspects: 1) the verification pass rate of the sub-verification rule; 2) the response time of the data object attribute value associated with the sub-validation rule.
  • the preset sorting criteria are determined, and the execution order of each sub-verification rule included in the verification rule is sorted according to a preset sorting criterion, and the execution order of the sub-verification rules is obtained.
  • the sorting criterion 1 includes: if the logical relationship between the sub-verification rules is a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the atomic verification rule are preferentially executed. According to the sorting standard, the execution order of each sub-verification rule included in a pair of verification rules is sorted, and the execution order of the sub-verification rules is obtained, first First, you need to calculate the verification pass rate corresponding to each atom verification rule.
  • the theoretical basis for adopting the standard is: if the logical relationship between the sub-validation rules of a verification rule is AND, then if the verification result of one sub-validation rule is false, the verification result of the entire verification rule is also false, thus,
  • the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed, which helps to quickly determine the verification result of the verification rule. If the verification pass rate corresponding to the atom verification rule is low, it indicates that the verification result of the sub-validation rule has a large probability of being false.
  • the stop verification condition corresponding to the sorting criterion includes: the data object to be verified does not satisfy the sub-verification rule.
  • a sub-verification rule is applied to verify a data object, if the data object does not satisfy the sub-verification rule, and the logical relationship between the sub-verification rules is AND, the parent verification rule to which the sub-validation rule belongs may be directly determined.
  • the verification result is false, that is, the data object to be verified does not satisfy the parent verification rule to which the sub-validation rule belongs.
  • FIG. 2 is a specific flowchart of step S103 in Embodiment A of the rule-based data object verification method of the present application. Specifically, the execution order of each sub-verification rule included in the verification rule is sorted according to the sorting criterion, and the execution order of the sub-verification rule is obtained, including:
  • Step S201 Parse the verification rule to obtain a logical relationship between the sub-validation rules.
  • the verification rule may be represented by a tree structure or the like.
  • the root node of the tree is the logical relationship between the first level of sub-verification rules
  • the internal nodes of the tree correspond to the logical relationship between the sub-verification rules of the levels
  • the leaf nodes of the tree are atomic verification. rule.
  • Step S203 Starting from the first level sub-verification rule, determining whether the logical relationship between the sub-validation rules of the predetermined level is a relational relationship.
  • the first level sub-verification rule described in the embodiment of the present application refers to a sub-verification rule directly included in the verification rule.
  • a tree structure indicates a verification rule, and each sub-node of the root node is a first-level sub-verification rule.
  • the root node is the logical relationship between each first-level sub-verification rule.
  • the first-level sub-verification rule can be either an atomic verification rule or a composite verification rule.
  • the sorting criterion only the first-level atomic verification rules included in the verification rule may be sorted, and the atomic verification rule in the composite verification rules included in the verification rule may be the composite verification rule to which the verification rule belongs.
  • the groups are sorted separately, and finally the order of execution of all atomic verification rules is obtained. If only the first-level atomic verification rules included in the validation rule are sorted, the predetermined number of levels Is 1; if only the first two levels of atomic verification rules included in the verification rule are sorted, the predetermined number of levels is 2, and so on, and the number of sub-validation rules that are valid for sorting can be arbitrarily set.
  • Step S205 If yes, sort the execution order of the sub-verification rules in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtain an execution order of the sub-verification rules.
  • the execution order of the sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtained. The execution order of each sub-verification rule included in the composite verification rule.
  • the sorting criterion firstly performs the sub-verification rule with low verification pass rate corresponding to the atomic verification rule when the logical relationship between the sub-verification rules is a relationship, the verification speed of the data object can be effectively improved.
  • the sorting criterion 2 includes: if the logical relationship between the first-level sub-verification rules is a relationship, the sub-verification rules having a low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed. According to the sorting criterion 2, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the verification pass rate corresponding to each first-level sub-verification rule needs to be calculated.
  • the sorting criterion 2 is basically consistent with the theoretical basis of the sorting criterion 1. The difference between the two is that the sorting criterion only performs the sub-verification rules with low verification pass rate corresponding to the atomic verification rule, and the sub-verification of the sorting standard two is preferentially executed. Rules can be either atomic verification rules or compound verification rules.
  • the stop verification condition corresponding to the sorting criterion 2 is that the data object to be verified does not satisfy the sub-verification rule.
  • FIG. 3 is a specific flowchart of step S103 in Embodiment B of the rule-based data object verification method of the present application. Specifically, the execution order of the sub-verification rules included in the verification rule is sorted according to the sorting criterion 2, and the execution order of the sub-verification rules is obtained, including:
  • Step S301 Parse the verification rule to obtain a logical relationship between the first level sub-verification rules.
  • the operation priority rule based on the logical operator, parsing the verification rule, and obtaining the logical relationship between the first level sub-verification rules. After the resolution of the verification rule is calculated, the first one can be obtained. The logical relationship between the level verification rules.
  • Step S303 Determine whether the logical relationship between the first level sub-verification rules is a relationship.
  • the sorting criterion 2 is only for the first level sub-verification rules included in the verification rule, and judges whether the logical relationship between them is a relationship, and the sorting criterion 1 needs to respectively judge each sub-inclusion of the multi-level verification rule according to the predetermined level. Verify the logical relationship between the rules.
  • Step S305 If yes, sort the execution order of the first-level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level verification rule, and obtain an execution order of the first-level sub-verification rules.
  • the execution order of the sub-verification rules is sorted in an ascending manner corresponding to the verification pass rate of the sub-verification rules, and the sub-verification rules are obtained. Execution order.
  • the sorting criterion 2 Compared with the data object verification speed of the sorting criterion one, since the sorting criterion 2 preferentially executes the sub-verification rules with low verification pass rate corresponding to all the first-level sub-verification rules, the sorting criterion 2 is faster than the sorting standard one. Faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion 2, the verification pass rate corresponding to the first-level compound verification rule needs to be calculated in advance, and therefore, the pre-calculation amount corresponding to the sorting criterion 2 is larger than the sorting standard.
  • the sorting criterion 3 includes: if the logical relationship between the sub-verification rules is a relationship, the sub-verification rule having a low response pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value is preferentially executed.
  • the method provided by the embodiment of the present application comprehensively scores the response pass rate corresponding to the sub-verification rule and the response time of the dependent data object attribute value by using the first integrated priority score.
  • the first comprehensive priority score described in the embodiment of the present application refers to a weighted average of various factors that affect the verification speed of the data object. The lower the first comprehensive priority score, the lower the verification pass rate corresponding to the sub-verification rule and the shorter the response time of the data object attribute value that the sub-verification rule depends on; otherwise, if the comprehensive priority score is higher, the sub-representation is The higher the verification pass rate corresponding to the verification rule and the longer the response time of the data object attribute value that the sub-validation rule depends on.
  • the first comprehensive priority score is generated by using the following calculation formula:
  • W is the first comprehensive priority score and X is the return of the verification pass rate corresponding to the sub-verification rule A value, Y is the normalized value of the response time of the data object attribute value that the sub-validation rule depends on, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the verification pass rate and the response time are respectively normalized.
  • the different ways of the normalization process described above are only the modifications of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
  • the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained.
  • the first comprehensive priority score corresponding to each atom verification rule needs to be calculated.
  • the sorting criterion 3 is basically consistent with the theoretical basis of the sorting criterion 1. The difference between the two is that the sorting criterion first performs the sub-verification rules with low verification pass rate corresponding to the atomic verification rule, and the sorting standard three performs the atomic verification rule correspondingly.
  • the sub-verification rule with low response pass rate and short response time of the dependent data object attribute value, that is, the sub-verification rule with the first comprehensive priority score corresponding to the atomic verification rule is preferentially executed.
  • the stop verification condition corresponding to the sorting criterion three is that the data object to be verified does not satisfy the sub-verification rule.
  • the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion three is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion, wherein the first step It is exactly the same as step 2.
  • the sorting criterion 3 is an ascending order of the first comprehensive priority score corresponding to the atomic verification rule, and the order of execution of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
  • the sorting criteria 3 is faster than the sorting standard one for data objects.
  • the sorting standard 3 has a larger pre-calculation amount corresponding to the sorting standard.
  • the sorting criterion 4 includes: if the logical relationship between the first level sub-verification rules is a relationship, the verification pass rate corresponding to the first-level sub-verification rule is preferentially executed, and the response time of the dependent data object attribute value is short.
  • the sub-verification rules The first comprehensive priority score in the ranking criterion 4 is the same as the first comprehensive priority score in the ranking criterion 3, and will not be described here. For details, see the corresponding part in the sorting criterion 1.
  • the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained.
  • the first comprehensive priority score corresponding to each first-level sub-verification rule needs to be calculated.
  • the sorting criterion 4 is basically consistent with the theoretical basis of the sorting criterion 3. The difference between the two is that the sorting criterion 3 only preferentially executes the sub-verification rule with the first comprehensive priority score corresponding to the atomic verification rule, and the sorting criterion 4 is preferentially executed.
  • the sub-verification rules can be either atomic verification rules or compound verification rules.
  • the stop verification condition corresponding to the sorting criterion 4 is that the data object to be verified does not satisfy the sub-verification rule.
  • the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion 4 is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion 2, wherein the first step It is exactly the same as step 2. The similarities are not repeated here. For details, see the corresponding part in Sorting Standard 2. The difference between the two is only that in the third step, the sorting criterion 4 is an ascending manner of the first comprehensive priority score corresponding to the sub-verification rule, and the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
  • the sub-verification of the response time of the data object attribute value which is low by the first-level sub-verification rule and the response time of the data object attribute value of the sub-verification rule is short Rules, so sorting standard four is faster than data object validation from one to three standard criteria.
  • the first comprehensive priority score corresponding to the first level sub-verification rule needs to be calculated in advance, and therefore, the ranking standard 4 is larger than the pre-calculation amount corresponding to the sorting standard one to the standard three.
  • the sorting criterion 5 includes: if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the atomic verification rule are preferentially executed. According to the sorting criterion 5, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the verification pass rate corresponding to each atom verification rule needs to be calculated.
  • the sorting criterion 5 corresponds to the sorting standard.
  • the theoretical basis for adopting the standard is: if the logical relationship between the sub-verifying rules of a verification rule is OR, then the verification is true as long as the verification result of one sub-verification rule is true. The verification result of the rule is also true. Therefore, the sub-verification rule with high verification pass rate corresponding to the atomic verification rule is preferentially executed, which helps to quickly determine the verification result of the verification rule. If the verification pass rate corresponding to the atomic verification rule is high, it indicates that the verification result of the sub-verification rule has a large probability of being true.
  • the stop verification condition corresponding to the sorting criterion 5 is that the data object to be verified satisfies the sub-verification rule. It can be seen that the stop verification condition corresponding to the sorting criterion five is different from the stop verification condition corresponding to the above sorting criteria one to four.
  • the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion 5 is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting standard, and the same is true. It will not be repeated here.
  • the sorting criterion 5 is to determine whether the logical relationship between the sub-verification rules is or is related; in the third step, the sorting criterion 5 is the verification pass rate corresponding to the atomic verification rule. In descending mode, the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  • the sorting criterion 5 is that the logical relationship between the sub-verification rules is or is related, the sub-verification rule with high verification pass rate corresponding to the atomic verification rule is preferentially executed, so that the verification speed of the data object can be effectively improved.
  • the sorting criterion 6 includes: if the logical relationship between the first level sub-verification rules is or a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the first-level sub-verification rules are preferentially executed. According to the sorting criteria The order of execution of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the verification pass rate corresponding to each first-level sub-verification rule needs to be calculated.
  • the sorting criterion 6 is basically consistent with the theoretical basis of the sorting criterion 5. The difference between the two is that the sorting criterion 5 only performs the sub-verification rules with high verification pass rate corresponding to the atomic verification rule, and the sub-verification of the sorting standard six priority execution. Rules can be either atomic verification rules or compound verification rules.
  • the stop verification condition corresponding to the sorting criterion 6 is that the data object to be verified satisfies the sub-verification rule.
  • the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion 6 is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion 2, and the same is the same. It will not be repeated here.
  • the sorting criterion 6 is to determine whether the logical relationship between the sub-verification rules is or is related; in the third step, the sorting criterion 6 is the verification corresponding to the first-level sub-verification rules. Through the descending order of the rate, the execution order of the first level sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  • the sorting standard 6 compares the data object verification speed of the sorting standard five. Faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion 6, it is necessary to calculate the verification pass rate corresponding to the first-level compound verification rule in advance, and therefore, the sorting criterion 6 is larger than the pre-calculation amount corresponding to the sorting standard five.
  • the sorting criterion 7 includes: if the logical relationship between the sub-verification rules is or is related, the sub-verification rule having a high response pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value is preferentially executed.
  • the method provided by the embodiment of the present application performs a comprehensive evaluation of the response time of the verification pass rate corresponding to the sub-verification rule and the response time of the dependent data object attribute value by the second comprehensive priority score.
  • the second comprehensive priority score described in the embodiment of the present application refers to another weighted average value of each factor that affects the verification speed of the data object. The lower the second comprehensive priority score, the higher the verification pass rate corresponding to the sub-verification rule and the shorter the response time of the data object attribute value that the sub-verification rule depends on; Conversely, if the composite priority score is higher, it means that the lower the verification pass rate corresponding to the sub-verification rule and the longer the response time of the data object attribute value that the sub-verification rule depends.
  • the second comprehensive priority score is generated by using the following calculation formula:
  • W is the second comprehensive priority score
  • X is the normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is the normalized value of the response time of the data object attribute value dependent on the sub-validation rule
  • N1 is the verification
  • the weight of the pass rate, N2 is the weight of the response time.
  • the verification failure rate described in the embodiment of the present application refers to the supplementary value of the verification pass rate. For example, if the verification pass rate is 20%, the verification failure rate is 80%.
  • the verification failure rate and the response time are respectively required. Normalization is performed to enable weighting calculations for both.
  • the different ways of the normalization process described above are only the modifications of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
  • the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained.
  • the second comprehensive priority score corresponding to each atom verification rule needs to be calculated.
  • the sorting criterion 7 is basically consistent with the theoretical basis of the sorting criterion five. The difference between the two is that the sorting standard five preferentially executes the sub-verification rules corresponding to the high verification pass rate corresponding to the atomic verification rule, and the sorting standard seven performs the atomic verification rule correspondingly.
  • the sub-verification rule with high response pass rate and short response time of the dependent data object attribute value, that is, the sub-verification rule with the second comprehensive priority score corresponding to the atomic verification rule is preferentially executed.
  • the stop verification condition corresponding to the sorting standard seven is: the data object to be verified satisfies the sub-verification rule.
  • the execution of each sub-verification rule included in the verification rule is performed.
  • the method of ordering is basically the same as the method of sorting the execution order of each sub-verification rule according to the sorting criteria.
  • the first step and the second step are completely identical, and the similarities are not repeated here. Sort the corresponding part of the standard one.
  • the sorting criterion 7 is an ascending order of the second comprehensive priority score corresponding to the atomic verification rule, and the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  • the sorting standard 7 Compared with the data object verification speed of the sorting standard five, the sorting standard 7 performs the sub-verification rule corresponding to the sub-verification rule corresponding to the high verification pass rate and the sub-validation rule-dependent data object attribute value has a short response time, so the sorting criterion Seven data objects with sorting criteria of five are faster.
  • the sorting criterion 7 is larger than the pre-calculation amount corresponding to the sorting standard five.
  • the sorting criterion 8 includes: if the logical relationship between the first level sub-verification rules is or is related, the verification pass rate corresponding to the first-level sub-verification rule is preferentially executed, and the response time of the dependent data object attribute value is short.
  • the sub-verification rules The second comprehensive priority score in the ranking criterion 8 is the same as the second comprehensive priority score in the ranking criterion 7, and will not be described here.
  • the related description items are detailed in the corresponding part of the sorting standard 7.
  • the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained.
  • the second comprehensive priority score corresponding to each first-level sub-verification rule needs to be calculated.
  • the sorting criterion 8 is basically consistent with the theoretical basis of the sorting criterion 7. The difference between the two is that the sorting criterion 7 only preferentially executes the sub-verification rule with the second comprehensive priority score corresponding to the atomic verification rule, and the sorting criterion is prioritized.
  • the sub-verification rules can be either atomic verification rules or compound verification rules.
  • the stop verification condition corresponding to the sorting criterion eight is that the data object to be verified satisfies the sub-verification rule.
  • the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion eight is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion, wherein the first step It is exactly the same as step 2. The same thing is not repeated here. See the corresponding section in Sorting Standard 6 for details. The only difference between the two is that in the third step, the sorting criterion 8 is an ascending manner of the second comprehensive priority score corresponding to the sub-verification rule, and the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
  • the sorting criterion eight preferentially executes the sub-authentication rule corresponding to the first-level sub-verification rule and the sub-validation rule depends on the data object attribute value with a short response time. Validation rules, so the sorting criteria eight are faster than the data objects of the sorting criteria five to seven.
  • the second comprehensive priority score corresponding to the first-level sub-verification rule needs to be calculated in advance, and therefore, the pre-calculation amount corresponding to the sorting criterion 8 to the sorting standard 5 to the standard 7 is required. Bigger.
  • the sorting criterion 9 includes: the sub-verification rule that prioritizes that the response time of the data object attribute value on which the atomic verification rule depends is short. According to the sorting criteria, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the response time of the data object attribute value that each atom verification rule depends on is obtained.
  • the stop verification condition corresponding to the sorting criterion nine is determined according to a logical relationship between the sub-verification rules. Specifically, if the logical relationship between the sub-verification rules is a relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule; if the logical relationship between the sub-validation rules For the relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • FIG. 4 is a specific flowchart of step S103 in Embodiment C of the rule-based data object verification method of the present application. Specifically, the execution order of each sub-verification rule included in the verification rule is sorted according to the sorting criterion, and the execution order of the sub-verification rules is obtained, including:
  • Step S401 Parse the verification rule to obtain a logical relationship between the sub-validation rules.
  • This step is the same as the corresponding step in the sorting standard one, and will not be described here. For details, refer to the corresponding part in the sorting standard 1.
  • Step S403 Starting from the first-level sub-verification rule, step-by-step down to the sub-verification rules of the predetermined level of the sub-verification rules, in accordance with the ascending order of the response time of the data object attribute values that the atomic verification rule depends on, The execution order of the verification rules is sorted to obtain the execution order of the sub-validation rules.
  • the first-level sub-verification rule in the sorting standard nine is the same concept as the first-level sub-verification rule in the sorting standard one, and is not described here again. For related description items, see the corresponding part in the sorting standard one.
  • the sorting criterion only the first-level atomic verification rules included in the verification rule may be sorted, and the atomic verification rule in the composite verification rules included in the verification rule may be the composite verification rule to which the verification rule belongs.
  • the groups are sorted separately, and finally the order of execution of all atomic verification rules is obtained. If only the first-level atomic verification rules included in the verification rule are sorted, the predetermined number of levels is 1; if only the first two levels of atomic verification rules included in the verification rule are sorted, the predetermined number of levels is 2, and so on.
  • the number of sub-validation rules that are valid for sorting can be arbitrarily set.
  • the sorting criterion 9 Since the sorting criterion 9 firstly verifies the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short, the verification speed of the data object can be effectively improved.
  • the sorting criterion ten includes: the sub-verification rule that preferentially verifies that the response time of the data object attribute value that the first-level sub-verification rule depends on is short. According to the sorting criteria, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the response time of the data object attribute values that each first-level sub-verification rule depends on is obtained.
  • the sorting standard ten is basically consistent with the theoretical basis of the sorting criterion. The difference between the two is that the sorting criterion 9 only preferentially executes the sub-verification rules with short response time of the data object attribute values that the atomic verification rule depends on, and the sorting criterion is ten.
  • the sub-verification rules that are executed can be either atomic verification rules or compound verification rules.
  • the stop verification condition corresponding to the sorting criterion ten is determined according to the logical relationship between the first level sub-verification rules; specifically: if the logical relationship between the first level sub-verification rules For the relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule; if the logical relationship between the first-level sub-validation rules is or a relationship, the stop verification condition is The data object to be verified satisfies the sub-verification rule.
  • FIG. 5 is a specific flowchart of step S103 in Embodiment D of the rule-based data object verification method of the present application. Specifically, the order of execution of each sub-verification rule included in the verification rule is sorted by the sorting criterion, and the execution order of the sub-verification rules is obtained, including:
  • Step S501 Parse the verification rule to obtain a logical relationship between the first level sub-verification rules.
  • This step is the same as the corresponding step in the sorting standard 2, and will not be described here. See the corresponding part of Sorting Standard 2.
  • Step S503 Sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules.
  • the response time of the data object attribute value that the first-level sub-verification rule depends on is: each sub-validation rule included in the first-level sub-verification rule.
  • the maximum response time of the dependent data object property value is:
  • the sorting criterion ten performs the sub-verification rules with short response time of the data object attribute values that all the first-level sub-verification rules depend on, the sorting criterion is ten compared to the sorting standard nine Data object validation is faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion ten, it is necessary to calculate in advance the response time of the data object attribute values that the first-level compound verification rule depends on, and therefore, the sorting standard ten is larger than the pre-calculation amount corresponding to the sorting standard nine. .
  • the sorting criterion 11 includes: if the logical relationship between the sub-verification rules is a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logic between the sub-verification rules If the relationship is or relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed.
  • the sorting criterion eleven is essentially a combination of the sorting standard one and the sorting standard five, so that all the sub-verifying rules can be comprehensively sorted.
  • the stop verification condition corresponding to the sorting criterion eleven is determined according to the logical relationship between the sub-verification rules. Specifically, if the logical relationship between the sub-verification rules is a relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule; if the logical relationship between the sub-validation rules For the relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the execution order of the sub-verification rules included in the verification rule is sorted according to the sorting criterion eleven, and the execution order of the sub-verification rules is obtained, including: 1) parsing the verification rule, constructing a rule tree; The root node and the intermediate node of the rule tree are logical relationships, the leaf node is the sub-verification rule, and the child node of the root node or the intermediate node is the sub-verification related to the logical relationship of the root node or the intermediate node a rule or a lower-level intermediate node; 2) starting from the root node of the rule tree, stepping down the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node Sort and get the execution order of the sub-verification rules.
  • sorting the execution order of the sub-verification rules step by step according to the sorting criterion and the logical relationship of the root node or the intermediate node
  • Obtaining the execution order of the sub-verification rules including: 1) determining the root node as the current node; 2) determining whether the logical relationship of the current node is a relationship; if so, verifying by the atom verification rule Rate ascending mode, sorting the execution order of each atomic verification rule under the current node; if the logical relationship of the current node is or a relationship, the descending order of the verification pass rate corresponding to the atomic verification rule is Sorting the execution order of each atomic verification rule under the current node; 3) determining whether the child node of the current node includes an intermediate node; if so, the child node of the current node is a child node of the intermediate node one by one As the current node, and returning to the step of determining whether the logical relationship of the
  • the sorting standard eleven is essentially a combination of the sorting standard one and the sorting standard five, the same points are not repeated here, and the related descriptions are detailed in the corresponding parts of the sorting standard one and the sorting standard five.
  • the above-mentioned sorting standards one to eleven are only some of the specific standards that are optional in the embodiment. In practical applications, various factors affecting the data verification speed can be combined, one or several factors are selected for combination, and the pre-setting is reasonably set.
  • the sorting criteria set The combination of different factors can produce a variety of specific ordering criteria, and these specific sorting standards are only changes of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
  • the verification pass rate corresponding to the sub-verification rule can also be obtained by a plurality of different specific calculation methods.
  • the following part of the specific calculation method optional in the embodiment is listed below.
  • FIG. 6 is a specific flowchart of the verification pass rate corresponding to the calculation sub-verification rule in the method A of the rule-based data object verification method of the present application.
  • the verification pass rate corresponding to the sub-verification rule includes the following steps:
  • Step S601 Acquire a data object to which the sub-verification rule can be applied.
  • the verification pass rate corresponding to the sub-verification rule described in the embodiment of the present application refers to the proportion of the data object that can pass the sub-verification rule among the data objects of the pre-stored applicable sub-verification rule. Therefore, to calculate the verification pass rate corresponding to the sub-verification rule, it is first necessary to obtain a data object to which the sub-verification rule can be applied.
  • the data object to which the sub-verification rule is applicable includes an applicable sub-verification rule Then, all data objects, or partial data objects of a preset sampling ratio selected from all data objects to which the sub-verification rules can be applied.
  • the data object of the applicable sub-validation rule includes all data objects to which the sub-verification rule can be applied, the number of data objects passing through the sub-validation rule in all data objects needs to be calculated in advance. As you can see, selecting all data objects for calculation will result in a larger amount of offline calculations.
  • the verification pass rate of the sub-verification rule is not calculated according to all the data objects, but a partial data object of a preset sampling ratio is sampled from all data objects, for example, random. Take out 5% of the data objects to calculate the verification pass rate of the sub-verification rules.
  • the data object included in the data object of the applicable sub-verification rule may be determined according to a specific application requirement.
  • Step S602 Traversing the data objects to which the sub-verification rules are applicable, and acquiring data object attribute values that the sub-verification rules depend on from the currently verified data objects.
  • the sub-verification rules are applied to each data object for each of the data objects, and the data objects that can pass the sub-verification rule are obtained. Specifically, when performing rule verification on a data object, it is first necessary to obtain a data object attribute value that the sub-validation rule depends on in the data object.
  • Step S603 Determine whether the data object attribute value makes the sub-verification rule establish.
  • Step S604 If the result of the above determination is yes, the number of verification passes corresponding to the sub-verification rule is increased by one.
  • the sub-verification rule may be applied to determine whether the data object attribute value makes the sub-verification rule establish, and if the judgment result in step S603 is yes, the sub-verification is performed. The number of verification passes corresponding to the rule is increased by one.
  • Step S605 After traversing all the data objects to which the sub-verification rules are applicable, the ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rules are applicable is used as the sub-verification rule. Corresponding verification pass rate.
  • the sub-verification rule is used to perform rule verification on each data object, and the cumulative number of verification passes is obtained, and the cumulative number of verification passes and the applicable sub-validation rule are obtained.
  • the ratio of the number of data objects is used as the verification pass rate corresponding to the sub-verification rule.
  • the data object to which the sub-verification rule can be applied includes the sub-authentication rule from the applicable sub-verification. Then, part of the data objects of the preset sampling ratios selected by all the data objects saves a lot of offline calculations, but brings about the error of the calculation results.
  • the basic idea of the second method is: to overcome the error problem of the verification pass rate obtained by calculating the sampled data object, the weighted average of the multiple known verification pass rates calculated according to the sampled data object is used as the sub-verification rule Pass verification pass rate.
  • the daily verification pass rate is calculated according to the sampled data object, and a predetermined number of verification pass rate sequences are obtained, and the weighted average of the known verification pass rates in the pass rate sequence is verified as the sub-verification rule. Verify the pass rate.
  • FIG. 7 is a specific flowchart of the verification pass rate corresponding to the calculation sub-verification rule in the method B of the rule-based data object verification method of the present application.
  • the verification pass rate corresponding to the sub-verification rule includes the following steps:
  • Step S701 Acquire a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times.
  • sampling data verification pass rate corresponding to the sub-verification rule described in the embodiment of the present application refers to the verification pass rate corresponding to the obtained sub-verification rule calculated according to the sampled data object.
  • FIG. 8 is a specific flowchart of the sampling data verification pass rate corresponding to the calculation sub-verification rule of the embodiment B of the rule-based data object verification method of the present application. Specifically, the sampling data verification pass rate corresponding to the sub-verification rule is generated by the following steps:
  • Step S801 sampling a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule is applicable.
  • Step S802 traverse the partial data objects of each of the preset sampling ratios, and obtain the data object attribute values that the sub-verification rules depend on from the currently verified data objects.
  • Step S803 Determine whether the data object attribute value makes the sub-verification rule establish.
  • Step S804 If the result of the above determination is YES, the number of verification passes corresponding to the sub-verification rule is increased by one.
  • Step S805 After traversing all the partial data objects of the preset sampling ratio, the ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification corresponding to the sub-verification rule. rate.
  • Step S801 to step S805 and the optimized embodiment in the first mode that is, the data object on which the verification pass rate is calculated is a partial data object of a preset sampling ratio selected from all data objects of the applicable sub-verification rule, wherein Steps S802 to S805 are in one-to-one correspondence with steps S602 to S605 in the first mode, and the same portions are not described herein again.
  • Steps S802 to S805 are in one-to-one correspondence with steps S602 to S605 in the first mode, and the same portions are not described herein again.
  • Step S703 Calculate a weighted average of the verification pass rates of the subsampled data according to the weights respectively determined by the verification of the pass rates for the subsample data corresponding to the sub-verification rules.
  • the recent sampling data verification pass rate has a greater impact on the current calculation result, so it can be given to the recent sampling data verification pass rate. Larger weights give less weight to the earlier sample data validation pass rate. If the difference in the effect of the sampling data verification pass rate at different times is relatively small, it can be simplified, that is, the same weight is taken. In the present embodiment, in order to simplify the explanation, the same weight is taken.
  • Step S705 Calculate the obtained weighted average value as the verification pass rate corresponding to the sub-verification rule.
  • the method 2 calculates the verification pass rate corresponding to the sub-verification rule.
  • the data object on which the pass-through rate is verified by each offline calculation is a sampled data object, the number of data objects is not large, thereby reducing offline resources. Consumption; on the other hand, since each calculation is based on the sampled data object, and then the current pass rate is dynamically predicted by the moving weighted average, the verification pass rate corresponding to the sub-verification rule can be continuously updated and corrected, thereby Make the verification pass rate consistent with the real trend.
  • the application method 2 calculates the verification pass rate corresponding to the sub-verification rule, which can reduce the calculation cost of the verification pass rate, and can also take into account the accuracy and dynamic trend change.
  • the calculation methods of modes one and two are all offline and calculate the verification pass rate of the sub-verification rules, both of which result in consumption of certain offline computing resources.
  • the verification pass rate of the sub-verification rule is calculated by using the third method.
  • the basic idea of the third method is: verifying the newly added data object in real time, accumulating the number of newly added data objects within the preset time interval and the number of newly added data objects that have passed the verification, and at the end of the time interval range, according to The number of verified data objects in real time and the number of validated data objects, and the corresponding verification pass rate of the sub-verification rules within the time interval.
  • FIG. 9 is a specific flowchart of the verification pass rate corresponding to the calculation sub-verification rule in the method C of the rule-based data object verification method of the present application.
  • the verification pass rate corresponding to the sub-verification rule is calculated and obtained by the following steps:
  • Step S901 Acquire a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval.
  • two parameters need to be preset: 1) a preset time interval range, for each data object that is added within the time interval to which the sub-verification rule can be applied, when newly added
  • the data object is verified in real time, and the number of data objects verified in the time interval and the number of data objects verified by the time interval are accumulated; 2) the preset number of times, when the preset number of times is 1, the sub-verification rule corresponds
  • the verification pass rate is: the real-time verification pass rate of the sub-verification rule within the preset time interval.
  • the verification pass rate corresponding to the sub-verification rule is: each sub-validation rule is at the preset time interval.
  • the verification pass rate corresponding to the sub-verification rule obtained by the mode 3 calculation is: real-time verification corresponding to the daily sub-verification rule in the past 5 days.
  • the weighted average of the pass rates is:
  • FIG. 10 is a specific flowchart of the real-time verification pass rate of the calculation sub-verification rule in the preset time interval range in the method C of the rule-based data object verification method of the present application. Specifically, the corresponding real-time verification pass rate of the sub-verification rule in the preset time interval is generated by the following steps:
  • Step S1001 Acquire a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule in the preset time interval range.
  • FIG. 11 is a specific flowchart of the real-time verification pass times and the real-time verification run times of the calculation sub-verification rules in the preset time interval of the embodiment C of the rule-based data object verification method of the present application.
  • the real-time verification pass times and the real-time verification run times are generated by the following steps:
  • Step S1101 When a data object to which the sub-verification rule can be applied is added within the preset time interval, it is determined whether the newly added data object satisfies the sub-verification rule.
  • Step S1103 If the result of the above determination is yes, the real-time verification pass times of the sub-verification rules in the preset time interval range are cumulatively increased by one.
  • Step S1105 Accumulate the number of real-time verification runs of the sub-verification rule within the preset time interval by one.
  • step S1101 to the step S1105 when a data object to which the sub-verification rule can be applied is added within the preset time interval, the real-time verification pass times and the real-time verification run times are accumulated in real time.
  • Step S1003 taking the ratio of the number of real-time verification passes to the number of real-time verification runs as The sub-verification rule corresponds to a real-time verification pass rate within the preset time interval.
  • the ratio of the real-time verification pass times to the real-time verification run times can be calculated, and the real-time verification pass rate corresponding to the sub-verification rules in the preset time interval range is calculated.
  • Step S903 Calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate.
  • Step S905 Calculate the obtained weighted average value as the verification pass rate corresponding to the sub-verification rule.
  • the recent verification pass rate has a greater impact on the calculation result, so it can give greater weight to the recent verification pass rate. Give less weight to earlier verification pass rates. If the difference in the verification pass rate at different times is relatively small, it can be simplified, that is, the same weight is taken. In the present embodiment, in order to simplify the explanation, the same weight is taken.
  • the advantage of the third method is that a large amount of offline calculation is not required in advance, so that offline resources can be saved.
  • any one of the foregoing methods 1 to 3 may be selected according to specific application requirements, and the verification pass rate corresponding to the sub-verification rule is calculated.
  • the verification pass rate of each sub-verification rule included in the verification rule is calculated.
  • the preset condition adopts the condition that the current time and the time interval of verifying the verification pass rate of each sub-verification rule are greater than a preset time interval.
  • the preset time interval can be set to days or weeks, that is, the verification pass rate of each sub-verification rule is updated daily or weekly.
  • Step S105 sequentially determining, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or all sub-executions are performed. Verify the rules.
  • step S103 the execution order of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and after the execution order of the sub-verification rules is obtained, the execution order of the obtained sub-verification rules may be sequentially determined to be verified. Whether the data object satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting standard is reached or all sub-verification rules are executed.
  • the sorting standard described in the embodiment of the present application refers to a sorting criterion that enables priority execution of a sub-verification rule capable of quickly determining a verification result, and thus different sorting standards correspond to different stopping verification conditions.
  • the stop verification condition of the composite verification rule is as long as one of the first-level sub-validation rules If the verification result is false, the verification result of the composite verification rule is also false; if the logical relationship between the first-level sub-validation rules included is OR, the stop verification condition of the composite verification rule is: as long as one of them If the verification result of the first-level sub-verification rule is true, the verification result of the composite verification rule is also true.
  • Step S107 Calculate the verification result of acquiring the data object to be verified according to the logical relationship between the foregoing judgment result and the sub-verification rule.
  • step S105 When the step S105 is executed, if the preset stop verification condition corresponding to the sorting criterion is reached or all the sub-verification rules are executed, according to the logical relationship between the judgment result and the sub-verification rule, whether the data object to be verified passes the verification may be finally determined. Rule, obtain the verification result of the data object to be verified.
  • the calculating, according to the logical relationship between the foregoing judgment result and the sub-verification rule, the verification result of acquiring the data object to be verified adopting one of the following rules: 1) if the judgment result is no and If the logical relationship is a relationship, the verification result is that the data object to be verified does not meet the verification rule; 2) if the determination result is yes and the logical relationship is or relationship, the verification result is The data object to be verified complies with the validation rules.
  • a rule-based data object verification method is provided.
  • the present application further provides a rule-based data object verification apparatus.
  • the device corresponds to an embodiment of the above method.
  • FIG. 12 is a schematic diagram of an embodiment of a rule-based data object verification apparatus of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative.
  • the obtaining unit 101 is configured to obtain a data object to be verified and a corresponding verification rule thereof;
  • the sorting unit 103 is configured to sort the execution order of each sub-verification rule included in the verification rule by using a preset sorting criterion, and obtain an execution order of the sub-verification rule;
  • the sorting standard refers to enabling quick determination a sorting criterion in which the sub-verification rules of the verification result are preferentially executed;
  • the verification unit 105 is configured to sequentially determine, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or executed Complete all sub-verification rules;
  • the calculating unit 107 is configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
  • the sorting criteria include:
  • the logical relationship between the sub-verification rules is an AND relationship
  • the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed;
  • the atomic verification rule refers to a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
  • the sorting criteria include:
  • the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship
  • the determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
  • the sorting criteria include:
  • the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value;
  • the atomic verification A rule is a verification rule that includes only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
  • W is the first integrated priority score
  • X is a normalized value of the verification pass rate corresponding to the sub-verification rule
  • Y is a normalized response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified does not satisfy the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship
  • the determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the first comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining a sub-verification rule Order of execution;
  • W is the first integrated priority score
  • X is a normalized value of the verification pass rate corresponding to the sub-verification rule
  • Y is a normalized response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in a descending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
  • the sorting criteria include:
  • the first level is preferentially executed.
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship
  • the determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
  • the sorting criteria include:
  • the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value;
  • the atomic verification A rule is a verification rule that includes only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • the determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
  • the determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
  • W is the second integrated priority score
  • X is a normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is the response time of the data object attribute value dependent on the sub-verification rule.
  • a value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
  • the stop verification condition corresponding to the sorting criterion includes:
  • the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a determining subunit configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship
  • the determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining the sub-verification rule Order of execution;
  • W is the second comprehensive priority score
  • X is a normalized value of the verification failure rate corresponding to the sub-verification rule
  • Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule.
  • the value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  • the sorting criteria include:
  • the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules
  • the stop verification condition is the The data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, construct a rule tree; a root node and an intermediate node of the rule tree are logical relationships, a leaf node is the sub-verification rule, and a child node of the root node or an intermediate node is The sub-verification rule or the next-level intermediate node related to the logical relationship of the root node or the intermediate node;
  • a sorting subunit configured to start from a root node of the rule tree, and sequentially sort the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node The order in which sub-verification rules are executed.
  • the ordering subunit includes:
  • a first determining subunit configured to determine whether a logical relationship of the current node is a relationship
  • the determining is a subunit, and if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
  • a second determining subunit configured to determine whether the child node of the current node includes an intermediate node; if yes, the child node of the current node is a child node of the intermediate node as the current node, and returns the judgment Whether the logical relationship of the current node is a step of relationship, and sorting the execution order of the atomic verification rules under each intermediate node of the rule tree.
  • the sorting criteria include:
  • the atomic verification rule refers to a verification rule that includes only one comparison relationship
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules
  • a sorting sub-unit for starting from the first-level sub-verification rule, stepping down the sub-verification rules of the predetermined level of the sub-levels, in accordance with the ascending order of the response time of the data object attribute values of the atomic verification rule, The execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  • the sorting criteria include:
  • the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
  • the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules
  • the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule
  • the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  • the sorting unit 103 includes:
  • a parsing subunit configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules
  • a sorting sub-unit configured to sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules .
  • FIG. 13 is a specific schematic diagram of an embodiment of a rule-based data object verification apparatus according to the present application.
  • the device further includes:
  • Calculating the verification pass rate unit 201 configured to calculate and obtain the verification corresponding to the sub-verification rule rate.
  • the calculating the verification pass rate unit 201 includes:
  • Obtaining a subunit configured to acquire a data object to which the sub-verification rule can be applied;
  • a determining subunit configured to determine whether the data object attribute value causes the sub-verification rule to be established
  • the determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
  • a calculating subunit configured to, when traversing all the data objects to which the sub-verification rule is applicable, a ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule is applicable The verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit 201 includes:
  • Obtaining a subunit configured to obtain a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
  • a calculating subunit configured to calculate a weighted average value of the pass rate of each of the sampled data according to a preset weight of each pass sampling data corresponding to the sub-verification rule
  • the assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit 201 further includes:
  • Generating a subunit configured to generate a sampling data verification pass rate corresponding to the sub-verification rule
  • the generating subunit includes:
  • a sampling subunit configured to sample a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule is applicable;
  • a determining subunit configured to determine whether the data object attribute value causes the sub-verification rule to be established
  • the determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
  • Calculating a subunit for use after traversing all of the data objects of the preset sampling ratio The ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit 201 includes:
  • Obtaining a sub-unit configured to obtain a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
  • a calculating subunit configured to calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate
  • the assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
  • the calculating the verification pass rate unit 201 further includes:
  • Generating a subunit configured to generate a real-time verification pass rate corresponding to the sub-verification rule within a preset time interval
  • the generating subunit includes:
  • Obtaining a sub-unit configured to obtain a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule within the preset time interval;
  • a calculation subunit configured to use a ratio of the number of real-time verification passes to the number of real-time verification runs as a real-time verification pass rate corresponding to the sub-verification rule within the preset time interval.
  • the generating subunit further includes:
  • a first generation subunit configured to generate the real-time verification pass times and the real-time verification run times
  • the first generating subunit includes:
  • a determining subunit configured to determine whether the newly added data object satisfies the sub-verification rule when a data object to which the sub-verification rule is applicable is added within the preset time interval
  • the determining is a sub-unit, configured to: if the result of the foregoing determination is yes, accumulating the number of real-time verification passes of the sub-verification rule within the preset time interval range by one;
  • a counting subunit configured to add one of the real-time verification running times of the sub-verification rule within the preset time interval.
  • the present application also provides a rule-based data object verification system, comprising: the rule-based data object verification apparatus of claim 32.
  • a rule-based data object verification method and corresponding device are provided.
  • the application also provides an electronic device.
  • the device corresponds to the embodiment of the above method and corresponding device.
  • FIG. 14 is a flowchart of an embodiment of an electronic device of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the device embodiments described below are merely illustrative.
  • the present application also provides an electronic device, including: a display 301; a processor 302; and a memory 303, configured to store a rule-based data object verification device, wherein the rule-based data object verification device is
  • the method includes the following steps: acquiring a data object to be verified and a corresponding verification rule thereof; sorting an execution order of each sub-verification rule included in the verification rule by using a preset sorting criterion, and obtaining the sub-verification
  • the order of execution of the rules; the sorting criterion refers to a sorting criterion that enables the sub-verification rules that can quickly determine the verification result to be preferentially executed; and sequentially determines whether the data object to be verified is in accordance with the execution order of the sub-verification rules Satisfying the sub-verification rule until the preset stop verification condition corresponding to the sorting criterion is reached or all sub-verification rules are executed; and the acquisition relationship is calculated according to the logical relationship between the judgment
  • the rule-based data object verification apparatus includes:
  • An obtaining unit configured to obtain a data object to be verified and a corresponding verification rule thereof
  • a sorting unit configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling the priority execution to be fast Determining an ordering criterion of the sub-verification rules of the verification result;
  • a verification unit configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
  • a calculating unit configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
  • the electronic device includes a terminal device such as a personal computer, a PAD, an iPad, and a mobile communication device, that is, a so-called mobile phone or a smart phone.
  • a terminal device such as a personal computer, a PAD, an iPad, and a mobile communication device, that is, a so-called mobile phone or a smart phone.
  • the electronic device described in this embodiment of the present application may be any electronic device capable of running a verification based on a verification rule to verify a data object.
  • the rule-based data object verification method, device, system and electronic device provided by the present application treat each sub-verification included in the verification rule corresponding to the data object by using a preset sorting criterion
  • the execution order of the rules is sorted, and the execution order of the sub-verification rules is obtained; and according to the execution order of the sub-verification rules, it is sequentially determined whether the data object to be verified satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting standard is reached. Or executing all the sub-verification rules; obtaining the verification result of the data object to be verified according to the logical relationship between the above judgment result and the sub-validation rule.
  • the method provided by the present application preferentially executes the sub-verification rule capable of quickly determining the verification result, the execution quantity and execution time of the sub-validation rule are greatly reduced in probability, and all sub-verification rules are avoided, thereby improving data verification speed and reducing System load and save the effect of computing resources.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media including both permanent and non-persistent, removable and non-removable media may be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Abstract

A rule-based data object verification method, apparatus, system and electronic device. The rule-based data object verification method comprises: acquiring a data object to be verified and a validation rule corresponding thereto (S101); ranking the execution sequence of each sub-validation-rule included in the validation rule according to a preset ranking standard, so as to obtain the execution sequence of the sub-validation-rule (S103); according to the execution sequence of the sub-validation-rule, sequentially judging whether the data object to be verified satisfies the sub-validation-rules, until a preset verification stopping condition corresponding to the ranking standard is reached or all the sub-validation-rules are executed (S105); and according to a logical relationship between the judgement result and the sub-validation-rules, conducting calculation to acquire a verification result of the data object to be verified (S107). A sub-validation-rule capable of quickly determining a verification result is preferentially executed, so as to prevent executing all the sub-validation-rules, thereby achieving the effect of improving the data validation speed.

Description

基于规则的数据对象验证方法、装置、系统及电子设备Rule-based data object verification method, device, system and electronic device 技术领域Technical field
本申请涉及数据验证技术领域,具体涉及一种基于规则的数据对象验证方法和装置。本申请同时涉及一种基于规则的数据对象验证系统,以及一种电子设备。The present application relates to the field of data verification technologies, and in particular, to a rule-based data object verification method and apparatus. The application also relates to a rule-based data object verification system and an electronic device.
背景技术Background technique
应用预设的验证规则对待验证数据对象进行验证时,现有方法包括如下步骤:1)逐个应用验证规则包括的各个子验证规则去验证待验证数据对象,获取每个子验证规则对应的验证结果;2)根据每个子验证规则对应的验证结果,以及各个子验证规则之间的逻辑关系,计算获取整个验证规则对应的验证结果。When applying the preset verification rule to verify the data object to be verified, the existing method includes the following steps: 1) applying each sub-verification rule included in the verification rule one by one to verify the data object to be verified, and obtaining the verification result corresponding to each sub-verification rule; 2) Calculate and obtain the verification result corresponding to the entire verification rule according to the verification result corresponding to each sub-verification rule and the logical relationship between each sub-validation rule.
发明人通过分析发现,由于上述方法需要逐个执行验证规则包括的各个子验证规则,因而整个验证过程中的计算量大,从而带来验证速度慢、系统负荷高且计算资源消耗多的问题。The inventors have found through analysis that since the above methods need to execute each sub-verification rule included in the verification rule one by one, the calculation amount in the whole verification process is large, which brings about a problem of slow verification speed, high system load, and high computational resource consumption.
综上所述,应用预设的验证规则对待验证数据对象进行验证时,现有技术存在对待验证数据对象需要执行所述验证规则包括的所有子验证规则的问题。In summary, when applying the preset verification rule to verify the verification data object, the prior art has a problem that the verification data object needs to execute all the sub-validation rules included in the verification rule.
发明内容Summary of the invention
本申请提供一种基于规则的数据对象验证方法和装置,以解决应用预设的验证规则对待验证数据对象进行验证时,现有技术存在的对待验证数据对象需要执行所述验证规则包括的所有子验证规则的问题。本申请另外提供基于规则的数据对象验证系统,以及一种电子设备。The present application provides a rule-based data object verification method and apparatus, in order to solve the application of the preset verification rule to verify the data object to be verified, the existing technology to be verified data object needs to execute all the children included in the verification rule Verify the problem with the rule. The application additionally provides a rule based data object verification system, and an electronic device.
本申请提供一种基于规则的数据对象验证方法,包括:The application provides a rule-based data object verification method, including:
获取待验证数据对象及其对应的验证规则;Obtaining the data object to be verified and its corresponding verification rule;
以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;Sorting the execution order of each sub-verification rule included in the verification rule by a preset sorting criterion to obtain an execution order of the sub-verification rule; the sorting criterion refers to the sub-query enabling the sub-verification result to be quickly determined The sorting criteria that the validation rules are prioritized;
按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;Determining, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or all sub-verification rules are executed;
根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验 证数据对象的验证结果。Calculating and obtaining the pending test according to the logical relationship between the judgment result and the sub-verification rule The verification result of the data object.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule refers to a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;Starting from the first level sub-verification rule, it is determined step by step to determine whether the logical relationship between the sub-validation rules of the predetermined level is a relationship;
若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
判断所述第一级子验证规则之间的逻辑关系是否为与关系;Determining whether the logical relationship between the first level sub-verification rules is a relationship;
若是,则以所述第一级子验证规则对应的验证通过率的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the first-level sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则; If the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;Starting from the first level sub-verification rule, it is determined step by step to determine whether the logical relationship between the sub-validation rules of the predetermined level is a relationship;
若是,则以所述原子验证规则对应的第一综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
判断所述第一级子验证规则之间的逻辑关系是否为与关系;Determining whether the logical relationship between the first level sub-verification rules is a relationship;
若是,则以所述第一级子验证规则对应的第一综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the first integrated priority score corresponding to the first-level sub-verification rule, and obtaining an execution order of the sub-verification rules;
所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通 过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Wherein, W is the first comprehensive priority score, and X is a verification pass corresponding to the sub-verification rule. The normalized value of the overshoot, Y is the normalized value of the response time of the data object attribute value that the sub-verification rule depends on, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;And if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;Starting from the first level sub-verification rule, determining whether the logical relationship between the sub-validation rules of the predetermined level is determined to be a relationship or a relationship;
若是,则以所述原子验证规则对应的验证通过率的降序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the sub-verification rules is sorted in a descending manner of the verification pass rate corresponding to the atomic verification rule, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高的所述子验证规则;If the logical relationship between the first level sub-verification rules is a relationship, the sub-verification rules with high verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
判断所述第一级子验证规则之间的逻辑关系是否为或关系;Determining whether the logical relationship between the first level sub-verification rules is or is a relationship;
若是,则以所述第一级子验证规则对应的验证通过率的降序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the first level sub-verification rules is sorted in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规 则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is or is related, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value is performed. The atomic verification rule refers to a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;Starting from the first level sub-verification rule, determining whether the logical relationship between the sub-validation rules of the predetermined level is determined to be a relationship or a relationship;
若是,则以所述原子验证规则对应的第二综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is or is related, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
判断所述第一级子验证规则之间的逻辑关系是否为或关系;Determining whether the logical relationship between the first level sub-verification rules is or is a relationship;
若是,则以所述第一级子验证规则对应的第二综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining an execution order of the sub-verification rules;
所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2 W=X*N1+Y*N2
其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is a relationship, the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
具体包括:Specifically include:
若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,构造规则树;所述规则树的根节点和中间节点为逻辑关系,叶节点为所述子验证规则,所述根节点或中间节点的子节点为与所述根节点或中间节点的逻辑关系相关的所述子验证规则或下一级中间节点;Parsing the verification rule, constructing a rule tree; the root node and the intermediate node of the rule tree are logical relationships, the leaf node is the sub-verification rule, and the child node of the root node or the intermediate node is the root node or The sub-verification rule or the next-level intermediate node related to the logical relationship of the intermediate node;
自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Starting from the root node of the rule tree, sorting the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node, and obtaining the execution order of the sub-verification rules .
可选的,所述自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,包括:Optionally, starting from the root node of the rule tree, according to the logical relationship between the sorting criterion and the root node or the intermediate node, sequentially sorting the execution order of the sub-verification rules to obtain The order in which sub-verification rules are executed, including:
将所述根节点作为当前节点;Using the root node as a current node;
判断所述当前节点的逻辑关系是否为与关系;若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序; Determining whether the logical relationship of the current node is a relationship; if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
若所述当前节点的逻辑关系为或关系,则以所述原子验证规则对应的验证通过率的降序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;If the logical relationship of the current node is a relationship, the execution order of each atomic verification rule under the current node is sorted in a descending manner of the verification pass rate corresponding to the atomic verification rule;
判断所述当前节点的子节点是否包括中间节点;若是,则逐个将所述当前节点的子节点是中间节点的子节点作为所述当前节点,并返回所述判断所述当前节点的逻辑关系是否为与关系的步骤,对所述规则树的每个中间节点下的原子验证规则的执行顺序进行排序。Determining whether the child node of the current node includes an intermediate node; if yes, using the child node of the current node as a child node of the intermediate node as the current node, and returning to determine whether the logical relationship of the current node is For the step of the relationship, the order of execution of the atomic verification rules under each intermediate node of the rule tree is sorted.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;Priorityly verifying the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short; the atomic verification rule refers to a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
具体包括:Specifically include:
若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
自第一级子验证规则开始,逐级向下对预定级数的各级子验证规则,按照所述原子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Starting from the first level sub-verification rule, the sub-verification rules for each level of the predetermined number of stages are stepped down, in accordance with the ascending order of the response time of the data object attribute values that the atomic verification rule depends on, and the sub-verification rules are The execution order is sorted to obtain the execution order of the sub-verification rules.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
优先验证第一级子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;Preferably, the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述第一级子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules;
具体包括: Specifically include:
若所述第一级子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述第一级子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the first level sub-verification rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Optionally, the performing the order of execution of the sub-verification rules included in the verification rule by using a preset sorting criterion, and obtaining an execution sequence of the sub-verification rules, including:
解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
以所述第一级子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The execution order of the first level sub-verification rules is sorted in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rules depend on, and the execution order of the sub-verification rules is obtained.
可选的,所述子验证规则对应的验证通过率采用如下步骤计算获取:Optionally, the verification pass rate corresponding to the sub-verification rule is calculated by using the following steps:
获取可应用所述子验证规则的数据对象;Obtaining a data object to which the sub-verification rule can be applied;
遍历各个所述可应用所述子验证规则的数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing each of the data objects to which the sub-verification rule is applicable, and acquiring, from the currently verified data object, a data object attribute value that the sub-verification rule depends on;
判断所述数据对象属性值是否使得所述子验证规则成立;Determining whether the data object attribute value causes the sub-verification rule to be established;
若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;If the result of the above determination is yes, the number of verification passes corresponding to the sub-verification rule is cumulatively increased by one;
当遍历完所有所述可应用所述子验证规则的数据对象后,将累计的验证通过次数与所述可应用所述子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。After traversing all the data objects to which the sub-verification rule can be applied, the ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule can be applied is used as the verification corresponding to the sub-verification rule. Passing rate.
可选的,所述可应用所述子验证规则的数据对象包括可应用所述子验证规则的所有数据对象,或者从可应用所述子验证规则的所有数据对象中抽样选取出的预设抽样比例的部分数据对象。Optionally, the data object to which the sub-verification rule is applicable includes all data objects to which the sub-verification rule can be applied, or a preset sampling sampled from all data objects to which the sub-verification rule can be applied. Part of the data object of the scale.
可选的,所述子验证规则对应的验证通过率采用如下步骤计算获取:Optionally, the verification pass rate corresponding to the sub-verification rule is calculated by using the following steps:
获取预设次数的所述子验证规则对应的抽样数据验证通过率;Obtaining a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
根据为所述子验证规则对应的各次抽样数据验证通过率分别预设的权重,计算所述各次抽样数据验证通过率的加权平均值;Calculating a weighted average value of the verification pass rate of each sampling data according to a preset weight of each sampling data for each sub-sample data corresponding to the sub-validation rule;
将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The weighted average obtained by the calculation is used as the verification pass rate corresponding to the sub-verification rule.
可选的,所述子验证规则对应的抽样数据验证通过率采用如下步骤生成:Optionally, the sampling data verification pass rate corresponding to the sub-verification rule is generated by the following steps:
从可应用所述子验证规则的所有数据对象中抽样选取出预设抽样比例的部分数据对象; Extracting a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule can be applied;
遍历各个所述预设抽样比例的部分数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing a partial data object of each of the preset sampling ratios, and acquiring, from the currently verified data object, a data object attribute value that the sub-verification rule depends on;
判断所述数据对象属性值是否使得所述子验证规则成立;Determining whether the data object attribute value causes the sub-verification rule to be established;
若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;If the result of the above determination is yes, the number of verification passes corresponding to the sub-verification rule is cumulatively increased by one;
当遍历完所有所述预设抽样比例的部分数据对象后,将累计的验证通过次数与所述预设抽样比例的部分数据对象的数量的比值作为所述子验证规则对应的验证通过率。After traversing all the partial data objects of the preset sampling ratio, the ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification pass rate corresponding to the sub-verification rule.
可选的,所述子验证规则对应的验证通过率采用如下步骤计算获取:Optionally, the verification pass rate corresponding to the sub-verification rule is calculated by using the following steps:
获取预设次数的所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Obtaining a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
根据为各次实时验证通过率分别预设的权重,计算所述各次实时验证通过率的加权平均值;Calculating a weighted average of the respective real-time verification pass rates according to weights respectively preset for each real-time verification pass rate;
将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The weighted average obtained by the calculation is used as the verification pass rate corresponding to the sub-verification rule.
可选的,所述子验证规则在预设时间间隔范围内对应的实时验证通过率采用如下步骤生成:Optionally, the corresponding real-time verification pass rate of the sub-verification rule in the preset time interval is generated by the following steps:
获取预先生成的所述子验证规则在所述预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数;Acquiring the number of real-time verification passes and the number of real-time verification runs corresponding to the pre-generated sub-verification rules in the preset time interval range;
将所述实时验证通过次数与所述实时验证运行次数的比值作为所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。The ratio of the real-time verification pass times to the real-time verification run times is used as a real-time verification pass rate corresponding to the sub-verification rules in the preset time interval range.
可选的,所述实时验证通过次数和实时验证运行次数采用如下步骤生成:Optionally, the real-time verification pass times and the real-time verification run times are generated by the following steps:
当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,判断新增的数据对象是否满足所述子验证规则;When a data object to which the sub-verification rule can be applied is added within the preset time interval, it is determined whether the newly added data object satisfies the sub-verification rule;
若上述判断结果为是,则将所述子验证规则在所述预设时间间隔范围内的实时验证通过次数累计加一;If the result of the foregoing determination is yes, the real-time verification pass times of the sub-verification rules in the preset time interval range are cumulatively increased by one;
将所述子验证规则在所述预设时间间隔范围内的实时验证运行次数累计加一。The number of real-time verification runs of the sub-verification rule within the preset time interval is cumulatively increased by one.
可选的,当预设条件成立时,计算各个子验证规则的验证通过率。Optionally, when the preset condition is met, the verification pass rate of each sub-verification rule is calculated.
可选的,所述预设条件,采用如下条件:Optionally, the preset condition is as follows:
当前时间与上次计算各个子验证规则的验证通过率的时间间隔大于预设的 时间间隔。The time interval between the current time and the last verification of the verification pass rate of each sub-verification rule is greater than the preset time interval.
可选的,所述根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果,采用如下规则之一:Optionally, the calculating, according to the logical relationship between the foregoing judgment result and the sub-verification rule, the verification result of acquiring the data object to be verified, adopting one of the following rules:
若所述判断结果为否并且所述逻辑关系为与关系,则所述验证结果为所述待验证数据对象不符合验证规则;If the result of the determination is no and the logical relationship is a relationship, the verification result is that the data object to be verified does not meet the verification rule;
若所述判断结果为是并且所述逻辑关系为或关系,则所述验证结果为所述待验证数据对象符合验证规则。If the result of the determination is yes and the logical relationship is or relationship, the verification result is that the data object to be verified conforms to the verification rule.
相应的,本申请还一种基于规则的数据对象验证装置,包括:Correspondingly, the present application also provides a rule-based data object verification apparatus, including:
获取单元,用于获取待验证数据对象及其对应的验证规则;An obtaining unit, configured to obtain a data object to be verified and a corresponding verification rule thereof;
排序单元,用于以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;a sorting unit, configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling quick verification a sorting criterion in which the sub-verification rules of the result are preferentially executed;
验证单元,用于按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;a verification unit, configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
计算单元,用于根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。And a calculating unit, configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule refers to a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的升 序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Judging is a subunit, if used, the rise of the verification pass rate corresponding to the atom verification rule In the order mode, the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为与关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的验证通过率的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的第一综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
所述第一综合优先级分数采用如下计算公式生成: The first comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为与关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的第一综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the first comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining a sub-verification rule Order of execution;
所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;And if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。 The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的降序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in a descending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高的所述子验证规则;If the logical relationship between the first level sub-verification rules is a relationship, the sub-verification rules with high verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为或关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的验证通过率的降序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is or is related, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系; a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的第二综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is or is related, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为或关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的第二综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining the sub-verification rule Order of execution;
所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。 Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is a relationship, the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
具体包括:Specifically include:
若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,构造规则树;所述规则树的根节点和中间节点为逻辑关系,叶节点为所述子验证规则,所述根节点或中间节点的子节点为与所述根节点或中间节点的逻辑关系相关的所述子验证规则或下一级中间节点;a parsing subunit, configured to parse the verification rule, construct a rule tree; a root node and an intermediate node of the rule tree are logical relationships, a leaf node is the sub-verification rule, and a child node of the root node or an intermediate node is The sub-verification rule or the next-level intermediate node related to the logical relationship of the root node or the intermediate node;
排序子单元,用于自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting subunit, configured to start from a root node of the rule tree, and sequentially sort the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node The order in which sub-verification rules are executed.
可选的,所述排序子单元包括:Optionally, the ordering subunit includes:
设置子单元,用于将所述根节点作为当前节点;Setting a subunit for using the root node as a current node;
第一判断子单元,用于判断所述当前节点的逻辑关系是否为与关系;a first determining subunit, configured to determine whether a logical relationship of the current node is a relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;The determining is a subunit, and if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
判断否子单元,用于若所述当前节点的逻辑关系为或关系,则以所述原子验证规则对应的验证通过率的降序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;Determining a non-subunit, wherein, if the logical relationship of the current node is a relationship, the execution order of each atomic verification rule under the current node is performed in a descending manner of the verification pass rate corresponding to the atomic verification rule Sort
第二判断子单元,用于判断所述当前节点的子节点是否包括中间节点;若 是,则逐个将所述当前节点的子节点是中间节点的子节点作为所述当前节点,并返回所述判断所述当前节点的逻辑关系是否为与关系的步骤,对所述规则树的每个中间节点下的原子验证规则的执行顺序进行排序。a second determining subunit, configured to determine whether the child node of the current node includes an intermediate node; If yes, the child node of the current node is the child node of the intermediate node as the current node, and returns a step of determining whether the logical relationship of the current node is a relationship, and each step of the rule tree The execution order of the atomic verification rules under the intermediate nodes is sorted.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;Priorityly verifying the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short; the atomic verification rule refers to a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
具体包括:Specifically include:
若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
排序子单元,用于自第一级子验证规则开始,逐级向下对预定级数的各级子验证规则,按照所述原子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting sub-unit for starting from the first-level sub-verification rule, stepping down the sub-verification rules of the predetermined level of the sub-levels, in accordance with the ascending order of the response time of the data object attribute values of the atomic verification rule, The execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
优先验证第一级子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;Preferably, the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述第一级子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules;
具体包括:Specifically include:
若所述第一级子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述第一级子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。 If the logical relationship between the first level sub-verification rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元包括:Optionally, the sorting unit includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
排序子单元,用于以所述第一级子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting sub-unit, configured to sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules .
可选的,所述装置还包括:Optionally, the device further includes:
计算验证通过率单元,用于计算获取所述子验证规则对应的验证通过率。The verification pass rate unit is configured to calculate a verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元包括:Optionally, the calculating the verification pass rate unit includes:
获取子单元,用于获取可应用所述子验证规则的数据对象;Obtaining a subunit, configured to acquire a data object to which the sub-verification rule can be applied;
遍历子单元,用于遍历各个所述可应用所述子验证规则的数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing the sub-units, traversing each of the data objects to which the sub-verification rules are applicable, and acquiring data object attribute values that the sub-verification rules depend on from the currently verified data objects;
判断子单元,用于判断所述数据对象属性值是否使得所述子验证规则成立;a determining subunit, configured to determine whether the data object attribute value causes the sub-verification rule to be established;
判断是子单元,用于若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;The determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
计算子单元,用于当遍历完所有所述可应用所述子验证规则的数据对象后,将累计的验证通过次数与所述可应用所述子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。a calculating subunit, configured to, when traversing all the data objects to which the sub-verification rule is applicable, a ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule is applicable The verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元包括:Optionally, the calculating the verification pass rate unit includes:
获取子单元,用于获取预设次数的所述子验证规则对应的抽样数据验证通过率;Obtaining a subunit, configured to obtain a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
计算子单元,用于根据为所述子验证规则对应的各次抽样数据验证通过率分别预设的权重,计算所述各次抽样数据验证通过率的加权平均值;a calculating subunit, configured to calculate a weighted average value of the pass rate of each of the sampled data according to a preset weight of each pass sampling data corresponding to the sub-verification rule;
赋值子单元,用于将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元还包括:Optionally, the calculating the verification pass rate unit further includes:
生成子单元,用于生成所述子验证规则对应的抽样数据验证通过率;Generating a subunit, configured to generate a sampling data verification pass rate corresponding to the sub-verification rule;
所述生成子单元包括:The generating subunit includes:
抽样子单元,用于从可应用所述子验证规则的所有数据对象中抽样选取出 预设抽样比例的部分数据对象;a sampling subunit for sampling out all data objects to which the sub-verification rule can be applied a partial data object of a preset sampling ratio;
遍历子单元,用于遍历各个所述预设抽样比例的部分数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing the subunits, traversing the partial data objects of each of the preset sampling ratios, and acquiring the data object attribute values that the sub-verification rules depend on from the currently verified data objects;
判断子单元,用于判断所述数据对象属性值是否使得所述子验证规则成立;a determining subunit, configured to determine whether the data object attribute value causes the sub-verification rule to be established;
判断是子单元,用于若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;The determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
计算子单元,用于当遍历完所有所述预设抽样比例的部分数据对象后,将累计的验证通过次数与所述预设抽样比例的部分数据对象的数量的比值作为所述子验证规则对应的验证通过率。a calculating subunit, configured to, when traversing all the partial data objects of the preset sampling ratio, a ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio as the sub-verification rule Verification pass rate.
可选的,所述计算验证通过率单元包括:Optionally, the calculating the verification pass rate unit includes:
获取子单元,用于获取预设次数的所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Obtaining a sub-unit, configured to obtain a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
计算子单元,用于根据为各次实时验证通过率分别预设的权重,计算所述各次实时验证通过率的加权平均值;a calculating subunit, configured to calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate;
赋值子单元,用于将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元还包括:Optionally, the calculating the verification pass rate unit further includes:
生成子单元,用于生成所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Generating a subunit, configured to generate a real-time verification pass rate corresponding to the sub-verification rule within a preset time interval;
所述生成子单元包括:The generating subunit includes:
获取子单元,用于获取预先生成的所述子验证规则在所述预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数;Obtaining a sub-unit, configured to obtain a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule within the preset time interval;
计算子单元,用于将所述实时验证通过次数与所述实时验证运行次数的比值作为所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。a calculation subunit, configured to use a ratio of the number of real-time verification passes to the number of real-time verification runs as a real-time verification pass rate corresponding to the sub-verification rule within the preset time interval.
可选的,所述生成子单元还包括:Optionally, the generating subunit further includes:
第一生成子单元,用于生成所述实时验证通过次数和实时验证运行次数;a first generation subunit, configured to generate the real-time verification pass times and the real-time verification run times;
所述第一生成子单元包括:The first generating subunit includes:
判断子单元,用于当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,判断新增的数据对象是否满足所述子验证规则; a determining subunit, configured to determine whether the newly added data object satisfies the sub-verification rule when a data object to which the sub-verification rule is applicable is added within the preset time interval;
判断是子单元,用于若上述判断结果为是,则将所述子验证规则在所述预设时间间隔范围内的实时验证通过次数累计加一;The determining is a sub-unit, configured to: if the result of the foregoing determination is yes, accumulating the number of real-time verification passes of the sub-verification rule within the preset time interval range by one;
计数子单元,用于将所述子验证规则在所述预设时间间隔范围内的实时验证运行次数累计加一。And a counting subunit, configured to add one of the real-time verification running times of the sub-verification rule within the preset time interval.
相应的,本申请还提供一种基于规则的数据对象验证系统,包括:上述的基于规则的数据对象验证装置。Correspondingly, the present application further provides a rule-based data object verification system, comprising: the above rule-based data object verification apparatus.
相应的,本申请还提供一种电子设备,包括:Correspondingly, the present application further provides an electronic device, including:
显示器;monitor;
处理器;以及Processor;
存储器,用于存储基于规则的数据对象验证装置,所述基于规则的数据对象验证装置被所述处理器执行时,包括如下步骤:获取待验证数据对象及其对应的验证规则;以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。a memory for storing a rule-based data object verification device, when the rule-based data object verification device is executed by the processor, comprising the steps of: acquiring a data object to be verified and a corresponding verification rule thereof; The sorting criterion sorts the execution order of the respective sub-verification rules included in the verification rule to obtain an execution order of the sub-verification rules; the sorting criterion refers to the sub-verification rule that enables the quick determination of the verification result to be prioritized Execution of the sorting criteria; determining, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting criterion is reached or the execution is completed All the sub-verification rules are calculated according to the logical relationship between the judgment result and the sub-validation rule, and the verification result of the data object to be verified is obtained.
可选的,所述基于规则的数据对象验证装置包括:Optionally, the rule-based data object verification apparatus includes:
获取单元,用于获取待验证数据对象及其对应的验证规则;An obtaining unit, configured to obtain a data object to be verified and a corresponding verification rule thereof;
排序单元,用于以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得优先执行能够快速确定验证结果的所述子验证规则的排序标准;a sorting unit, configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling the priority execution to be fast Determining an ordering criterion of the sub-verification rules of the verification result;
验证单元,用于按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;a verification unit, configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
计算单元,用于根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。And a calculating unit, configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
与现有技术相比,本申请具有以下优点: Compared with the prior art, the present application has the following advantages:
本申请提供的基于规则的数据对象验证方法、装置、系统以及电子设备,通过以预设的排序标准对待验证数据对象对应的验证规则所包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;并按照子验证规则的执行顺序,依次判断待验证数据对象是否满足子验证规则,直至达到预设的与排序标准对应的停止验证条件为止或执行完所有子验证规则;根据上述判断结果和子验证规则之间的逻辑关系,获取待验证数据对象的验证结果。由于本申请提供的方法优先执行能够快速确定验证结果的子验证规则,因此在概率上极大减少子验证规则的执行数量和执行时间,避免执行所有子验证规则,从而达到提高数据验证速度、降低系统负荷且节约计算资源的效果。The rule-based data object verification method, device, system, and electronic device provided by the present application sort the execution order of each sub-verification rule included in the verification rule corresponding to the verification data object by using a preset sorting criterion, and obtain sub-verification. The execution order of the rules; and according to the execution order of the sub-verification rules, sequentially determining whether the data object to be verified satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting standard is reached or all sub-verification rules are executed; The logical relationship between the judgment result and the sub-validation rule is obtained, and the verification result of the data object to be verified is obtained. Since the method provided by the present application preferentially executes the sub-verification rule capable of quickly determining the verification result, the execution quantity and execution time of the sub-validation rule are greatly reduced in probability, and all sub-verification rules are avoided, thereby improving data verification speed and reducing System load and save the effect of computing resources.
附图说明DRAWINGS
图1是本申请的基于规则的数据对象验证方法实施例的流程图;1 is a flow chart of an embodiment of a rule-based data object verification method of the present application;
图2是本申请的基于规则的数据对象验证方法实施例A中步骤S103的具体流程图;2 is a specific flowchart of step S103 in Embodiment A of the rule-based data object verification method of the present application;
图3是本申请的基于规则的数据对象验证方法实施例B中步骤S103的具体流程图;3 is a specific flowchart of step S103 in Embodiment B of the rule-based data object verification method of the present application;
图4是本申请的基于规则的数据对象验证方法实施例C中步骤S103的具体流程图;4 is a specific flowchart of step S103 in Embodiment C of the rule-based data object verification method of the present application;
图5是本申请的基于规则的数据对象验证方法实施例D中步骤S103的具体流程图;5 is a specific flowchart of step S103 in Embodiment D of the rule-based data object verification method of the present application;
图6是本申请的基于规则的数据对象验证方法实施例A的计算子验证规则对应的验证通过率的具体流程图;6 is a specific flowchart of a verification pass rate corresponding to a calculation sub-verification rule in Embodiment A of the rule-based data object verification method of the present application;
图7是本申请的基于规则的数据对象验证方法实施例B的计算子验证规则对应的验证通过率的具体流程图;7 is a specific flowchart of a verification pass rate corresponding to a calculation sub-verification rule in Embodiment B of the rule-based data object verification method of the present application;
图8是本申请的基于规则的数据对象验证方法实施例B的计算子验证规则对应的抽样数据验证通过率的具体流程图;8 is a specific flowchart of the sampling data verification pass rate corresponding to the calculation sub-verification rule of the embodiment B of the rule-based data object verification method of the present application;
图9是本申请的基于规则的数据对象验证方法实施例C的计算子验证规则对应的验证通过率的具体流程图;9 is a specific flowchart of a verification pass rate corresponding to a calculation sub-verification rule in Embodiment C of the rule-based data object verification method of the present application;
图10是本申请的基于规则的数据对象验证方法实施例C的计算子验证规则在预设时间间隔范围内对应的实时验证通过率的具体流程图; FIG. 10 is a specific flowchart of a real-time verification pass rate corresponding to a calculated sub-verification rule in a preset time interval according to Embodiment C of the rule-based data object verification method of the present application; FIG.
图11是本申请的基于规则的数据对象验证方法实施例C的计算子验证规则在预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数的具体流程图;11 is a specific flowchart of the real-time verification pass times and the real-time verification run times of the calculation sub-verification rule of the embodiment of the rule-based data object verification method of the present application in a preset time interval;
图12是本申请的基于规则的数据对象验证装置实施例的示意图;12 is a schematic diagram of an embodiment of a rule-based data object verification apparatus of the present application;
图13是本申请的基于规则的数据对象验证装置实施例的具体示意图;13 is a detailed schematic diagram of an embodiment of a rule-based data object verification apparatus of the present application;
图14是本申请的电子设备实施例的示意图。14 is a schematic diagram of an embodiment of an electronic device of the present application.
具体实施方式detailed description
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。Numerous specific details are set forth in the description below in order to provide a thorough understanding of the application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar promotion without departing from the scope of the present application, and thus the present application is not limited by the specific embodiments disclosed below.
在本申请中,提供了一种基于规则的数据对象验证方法、装置和系统,以及一种电子设备。在下面的实施例中逐一进行详细说明。In the present application, a rule-based data object verification method, apparatus and system, and an electronic device are provided. Detailed description will be made one by one in the following embodiments.
本申请提供的基于规则的数据对象验证方法,其核心的基本思想为:应用预设的验证规则对待验证数据对象进行验证时,优先执行能够快速确定验证结果的验证规则包括的子验证规则,以减少子验证规则的执行数量和执行时间,避免执行所有子验证规则,从而达到提高数据验证速度、降低系统负荷且节约计算资源的效果。The core idea of the rule-based data object verification method provided by the present application is: when applying the preset verification rule to verify the data object to be verified, the sub-verification rule included in the verification rule capable of quickly determining the verification result is preferentially executed. Reduce the number of executions and execution time of sub-verification rules, and avoid executing all sub-verification rules, thereby improving data verification speed, reducing system load, and saving computing resources.
请参考图1,其为本申请的基于规则的数据对象验证方法实施例的流程图。所述方法包括如下步骤:Please refer to FIG. 1 , which is a flowchart of an embodiment of a rule-based data object verification method according to the present application. The method includes the following steps:
步骤S101:获取待验证数据对象及其对应的验证规则。Step S101: Acquire a data object to be verified and its corresponding verification rule.
本申请实施例所述的待验证数据对象,表示具有一系列不同性质或属性的事物,而非仅有单个值的事物。数据对象可以是外部实体(例如,产生或使用信息的任何事物)、事物(例如,报表)、行为(例如,打电话)、事件(例如,响警报)、角色(例如,教师、学生)、单位(例如,会计科)、地点(例如,仓库)或结构(例如,文件)等。总之,可以由一组属性来定义的实体都可以被认为是数据对象,例如,定义一个待验证数据对象包括属性1至属性20。The data object to be verified described in the embodiment of the present application represents a thing having a series of different properties or attributes, rather than a thing having only a single value. A data object can be an external entity (eg, anything that generates or uses information), a thing (eg, a report), an action (eg, a phone call), an event (eg, an alarm), a role (eg, a teacher, a student), Unit (for example, accounting), location (for example, warehouse) or structure (for example, file), etc. In summary, an entity that can be defined by a set of attributes can be considered a data object, for example, defining a data object to be verified including attribute 1 to attribute 20.
本申请实施例所述的待验证数据对象对应的验证规则,是指验证待验证数据对象时所要应用的验证规则。本申请实施例所述的验证规则包括一个或多个子验证规则,通过各个子验证规则及它们之间的逻辑关系形成验证规则。本申请实施例所述的子验证规则,可以是原子验证规则或复合验证规则。原子验证 规则是指仅包括一个比较关系的验证规则,复合验证规则是指包括至少两个原子验证规则的验证规则。子验证规则之间的逻辑关系可以为与、或、非的逻辑关系。The verification rule corresponding to the data object to be verified described in the embodiment of the present application refers to the verification rule to be applied when verifying the data object to be verified. The verification rule described in the embodiment of the present application includes one or more sub-verification rules, and the verification rules are formed by each sub-validation rule and a logical relationship between them. The sub-verification rules described in the embodiments of the present application may be an atomic verification rule or a composite verification rule. Atomic verification A rule is a validation rule that includes only one comparison relationship, and a composite verification rule is a validation rule that includes at least two atomic verification rules. The logical relationship between sub-validation rules can be a logical relationship with AND, OR, and NOT.
综上所述,待验证数据对象所对应的验证规则在实质上是由多个原子验证规则通过不同的逻辑关系组成的。当一个验证规则中使用了多个逻辑运算符时,计算顺序依次为:非、与、或,且算术运算符和位运算符优先于逻辑运算符处理。此外,括号有改变运算顺序的作用,有括号的要优先进行计算。例如:验证规则为:子验证规则1or子验证规则2and子验证规则3,这个验证规则的验证顺序是首先计算与关系“子验证规则2and子验证规则3”,然后再算或关系;若加上括号,将验证规则改为:(子验证规则1or子验证规则2)and子验证规则3,这个验证规则的验证顺序就是先算小括号里面的或关系,然后再算括号外的与关系;可见,加括号前后运算顺序改变了。In summary, the verification rule corresponding to the data object to be verified is essentially composed of multiple atomic verification rules through different logical relationships. When multiple logical operators are used in a validation rule, the order of calculation is: non, AND, or , and the arithmetic operators and bit operators take precedence over logical operators. In addition, the parentheses have the effect of changing the order of operations, and those with parentheses are preferred for calculation. For example, the verification rule is: sub-verification rule 1or sub-verification rule 2 and sub-verification rule 3, the verification order of the verification rule is first calculated and the relationship "sub-validation rule 2 and sub-verification rule 3", and then count or relationship; Parentheses, the verification rules are changed to: (sub-verification rule 1or sub-verification rule 2) and sub-verification rule 3, the verification order of this verification rule is to first calculate the relationship or relationship in the parentheses, and then calculate the relationship between the parentheses; The order of operations before and after the parentheses changed.
按照逻辑运算的优先级,将本申请实施例所述的验证规则逐级展开,直至展开到每一个原子验证规则,则可以将一个验证规则转换为一颗树,树的根节点为第一级子验证规则之间的逻辑关系,树的内部节点对应各级子验证规则之间的逻辑关系,树的叶节点为原子验证规则。根据子验证规则相对于验证规则的层数不同,将位于不同层的子验证规则称为第一级子验证规则、第二级子验证规则…第N级子验证规则。According to the priority of the logical operation, the verification rule described in the embodiment of the present application is expanded step by step until it is expanded to each atom verification rule, and then a verification rule can be converted into a tree, and the root node of the tree is the first level. The logical relationship between the sub-validation rules, the internal nodes of the tree correspond to the logical relationship between the sub-verification rules of the various levels, and the leaf nodes of the tree are atomic verification rules. The sub-verification rules located at different levels are referred to as the first-level sub-verification rules, the second-level sub-verification rules, and the N-th sub-verification rules according to the number of layers of the sub-validation rules relative to the verification rules.
例如,针对上例定义的包括属性1至属性20的待验证数据对象,设置其所对应的验证规则为:(属性2>=值1)and(属性5=值2or属性5=值3or not属性5=值4)and…and(属性20>值20or属性3=值3)or(属性9>值9)and(属性3<值11),则其中“属性2>=值1”、“属性5=值2”…“属性3<值11”等为原子验证规则,而(属性5=值2or属性5=值3or not属性5=值4)为一个复合验证规则。根据各个子验证规则的逻辑关系,能够获得上述验证规则包括两个第一级子验证规则,分别为:第一级子验证规则1“(属性2>=值1)and(属性5=值2or属性5=值3or not属性5=值4)and…and(属性20>值20or属性3=值3)”,以及第一级子验证规则2“(属性9>值9)and(属性3<值11)”,上述两个第一级子验证规则之间的逻辑关系为或。进一步地,第一级子验证规则1还包括多个第二级子验证规则,分别为:(属性2>=值1)、(属性5=值2or属性5=值3or not属性5=值4)…(属性20>值20or属性3=值3);第一级子验证规则2还包括两个第二级子验证规则,分别为:(属性9>值9)和(属性3<值11)。 For example, for the data object to be verified including the attribute 1 to the attribute 20 defined in the above example, the corresponding verification rule is set to: (attribute 2>=value 1) and (attribute 5=value 2or attribute 5=value 3or not attribute 5=value 4)and...and (attribute 20>value 20or attribute 3=value 3) or (attribute 9>value 9) and (attribute 3<value 11), where "attribute 2>=value 1", "attribute 5 = value 2 "..." attribute 3 < value 11" and the like is an atomic verification rule, and (attribute 5 = value 2or attribute 5 = value 3or not attribute 5 = value 4) is a compound verification rule. According to the logical relationship of each sub-verification rule, the above-mentioned verification rule can be obtained by including two first-level sub-verification rules, which are: first-level sub-verification rule 1 "(attribute 2>=value 1) and (attribute 5=value 2or) Attribute 5 = value 3or not attribute 5 = value 4) and...and (attribute 20 > value 20or attribute 3 = value 3)", and first level sub-verification rule 2 "(attribute 9>value 9) and (attribute 3< The value 11)", the logical relationship between the above two first-level sub-verification rules is OR. Further, the first level sub-verification rule 1 further includes a plurality of second-level sub-verification rules, respectively: (attribute 2>=value 1), (attribute 5=value 2or attribute 5=value 3or not attribute 5=value 4 ) (attribute 20 > value 20or attribute 3 = value 3); the first level sub-verification rule 2 also includes two second-level sub-verification rules, namely: (attribute 9 > value 9) and (attribute 3 < value 11) ).
要实施本申请提供的方法,首先要获取待验证数据对象及其对应的验证规则。待验证数据对象可以来源于数据库的检索结果、万维网传输的结构化数据(例如,XML文档、JSON数据等)以及电子表单等,验证规则既可以直接写入验证程序中,也可以存储在文件中,以便实际验证时通过文件读取验证规则。上述待验证数据对象的不同数据来源以及验证规则的不同存储方式,都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。To implement the method provided by the present application, first, the data object to be verified and its corresponding verification rule are obtained. The data object to be verified may be derived from the retrieval result of the database, the structured data transmitted by the World Wide Web (for example, XML document, JSON data, etc.), and the electronic form. The verification rule may be directly written into the verification program or may be stored in the file. In order to actually verify the rules by reading the file. The different data sources of the data objects to be verified and the different storage methods of the verification rules are only changes of the specific implementation manner, and do not deviate from the core of the present application, and therefore are all within the protection scope of the present application.
步骤S103:以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序。Step S103: Sort the execution order of each sub-verification rule included in the verification rule by using a preset sorting criterion, and obtain an execution order of the sub-verification rules.
本申请实施例所述的排序标准,是指使得能够快速确定验证结果的子验证规则被优先执行的排序标准。要构建上述排序标准,首先需要对验证规则进行分析,找到影响数据验证速度的各种因素。The sorting standard described in the embodiment of the present application refers to a sorting criterion that enables the sub-verification rule that can quickly determine the verification result to be preferentially executed. To build the above sorting criteria, you first need to analyze the validation rules to find the various factors that affect the speed of data validation.
1)影响数据验证速度的各种因素之一为:子验证规则的验证通过率。1) One of the various factors affecting the speed of data verification is: the verification pass rate of the sub-verification rules.
本申请实施例所述的子验证规则对应的验证通过率,是指预存的可应用子验证规则的数据对象中,能够通过子验证规则的数据对象比例。The verification pass rate corresponding to the sub-verification rule described in the embodiment of the present application refers to the proportion of the data object that can pass the sub-verification rule among the data objects of the pre-stored applicable sub-verification rule.
通常,一个验证规则会包含几个、几十个、甚至上百个原子验证规则,每个原子验证规则都是对待验证数据对象的一个约束或者门槛。事实上,不同的原子验证规则,对待验证数据对象的约束程度是不一样的。例如,原子验证规则1为:30天的交易量>100,如果海量的数据对象中符合这个原子验证规则的数据对象数量占全部数据对象的百分比70%,而原子验证规则2:勋章等级=5A,符合这个原子验证规则的数据对象数量占全部数据对象的百分比20%,则可以认为数据对象规则2比数据对象规则1在概率上面更难验证通过,是一个相对更严格的限制条件。Typically, a validation rule will contain several, dozens, or even hundreds of atomic validation rules, each of which is a constraint or threshold for the data object to be validated. In fact, different atomic verification rules have different degrees of constraint on the data objects to be validated. For example, the atomic verification rule 1 is: 30 days of trading volume > 100, if the number of data objects in the massive data object that meet this atomic verification rule is 70% of the total data object, and atomic verification rule 2: medal level = 5A If the number of data objects conforming to this atomic verification rule is 20% of the total data object, then it can be considered that the data object rule 2 is more difficult to verify than the data object rule 1 on the probability, which is a relatively stricter constraint.
通过步骤S103中的分析可以获知,验证规则是由多个原子验证规则通过不同的逻辑关系组合而成的,子验证规则之间的逻辑关系可以为与、或、非的逻辑关系。在逻辑运算中,如果一个验证规则的子验证规则之间的逻辑关系为与,则只要其中一个子验证规则的验证结果为假,则整个验证规则的验证结果也为假;如果一个验证规则的子验证规则之间的逻辑关系为或,则只要其中一个子验证规则的验证结果为真,则整个验证规则的验证结果也为真。It can be known from the analysis in step S103 that the verification rule is composed of multiple atomic verification rules through different logical relationships, and the logical relationship between the sub-validation rules can be a logical relationship of AND, OR, and NOT. In a logical operation, if the logical relationship between the sub-validation rules of a verification rule is AND, as long as the verification result of one of the sub-validation rules is false, the verification result of the entire verification rule is also false; if a verification rule is The logical relationship between the sub-validation rules is or, as long as the verification result of one of the sub-validation rules is true, the verification result of the entire verification rule is also true.
由此可知,当子验证规则之间的逻辑关系为与时,如果优先执行验证结果较大概率为假的子验证规则,则能够快速确定整个验证规则的验证结果;当子 验证规则之间的逻辑关系为或时,如果优先执行验证结果较大概率为真的子验证规则,则能够快速确定整个验证规则的验证结果。It can be seen that when the logical relationship between the sub-validation rules is unequal, if the sub-verification rule with a large probability that the verification result is false is prioritized, the verification result of the entire verification rule can be quickly determined; When the logical relationship between the verification rules is or, the verification result of the entire verification rule can be quickly determined if the sub-verification rule with the greater probability that the verification result is true is performed preferentially.
因此,影响数据验证速度的因素之一为:子验证规则的验证通过率。如果子验证规则的验证通过率较高,则表明该子验证规则的验证结果较大概率为真;如果子验证规则的验证通过率较低,则表明该子验证规则的验证结果较大概率为假。Therefore, one of the factors affecting the speed of data verification is: the verification pass rate of the sub-verification rules. If the verification pass rate of the sub-verification rule is high, it indicates that the verification result of the sub-validation rule has a large probability of being true; if the verification pass rate of the sub-validation rule is low, it indicates that the verification result of the sub-validation rule has a large probability false.
2)影响数据验证速度的各种因素之一为:子验证规则关联的数据对象属性值的响应时间。2) One of the various factors affecting the speed of data verification is: the response time of the data object attribute value associated with the sub-validation rule.
一个原子验证规则由三部分组成:属性名、操作符和比较值。例如,一个原子验证规则:30天的交易量>100,则属性名为“30天的交易量”,操作符为“>”,比较值为“100”。当应用该原子验证规则对数据对象进行验证时,首先需要从业务系统中获得某个需要验证的数据对象的30天的交易量,假如该属性实际值为200,通过对比实际值和比较值,可以判定该验证规则的验证结果为真。通过上述对原子验证规则的验证过程分析,能够获知数据对象属性值的响应时间对数据验证速度产生影响。可见,影响数据验证速度的因素之二为:子验证规则关联的数据对象属性值的响应时间。An atomic validation rule consists of three parts: the attribute name, the operator, and the comparison value. For example, an atomic verification rule: 30 days of trading volume > 100, the attribute name is "30 days of trading volume", the operator is ">", and the comparison value is "100". When applying the atomic verification rule to verify the data object, firstly, a 30-day transaction amount of a data object to be verified needs to be obtained from the business system. If the actual value of the attribute is 200, by comparing the actual value with the comparison value, It can be determined that the verification result of the verification rule is true. Through the above analysis of the verification process of the atom verification rule, it can be known that the response time of the data object attribute value has an influence on the data verification speed. It can be seen that the second factor affecting the speed of data verification is the response time of the data object attribute value associated with the sub-validation rule.
综上所述,影响数据验证速度的因素至少包括两方面,分别是:1)子验证规则的验证通过率;2)子验证规则关联的数据对象属性值的响应时间。根据影响数据验证速度的各种因素,确定预设的排序标准,并依据预设的排序标准,对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。In summary, the factors affecting the speed of data verification include at least two aspects: 1) the verification pass rate of the sub-verification rule; 2) the response time of the data object attribute value associated with the sub-validation rule. According to various factors affecting the data verification speed, the preset sorting criteria are determined, and the execution order of each sub-verification rule included in the verification rule is sorted according to a preset sorting criterion, and the execution order of the sub-verification rules is obtained.
在实际应用中,可以结合各种影响数据验证速度的因素,选择其中一种或几种因素进行组合,合理地设置预设的排序标准。不同因素的组合能够产生很多种具体的排序标准,这些具体的排序标准都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。In practical applications, it is possible to combine various factors that affect the speed of data verification, select one or several factors to combine, and reasonably set the preset sorting criteria. The combination of different factors can produce a variety of specific ordering criteria, and these specific sorting standards are only changes of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
下面列举本实施例中可选的部分具体标准。Some specific criteria that are optional in this embodiment are listed below.
1)排序标准一1) Sorting criteria one
排序标准一包括:若子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的子验证规则。要依据排序标准一对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首 先需要计算各个原子验证规则对应的验证通过率。The sorting criterion 1 includes: if the logical relationship between the sub-verification rules is a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the atomic verification rule are preferentially executed. According to the sorting standard, the execution order of each sub-verification rule included in a pair of verification rules is sorted, and the execution order of the sub-verification rules is obtained, first First, you need to calculate the verification pass rate corresponding to each atom verification rule.
采用该标准的理论依据是:如果一个验证规则的子验证规则之间的逻辑关系为与,则只要有一个子验证规则的验证结果为假,则整个验证规则的验证结果也为假,因而,优先执行原子验证规则对应的验证通过率低的子验证规则,有助于快速确定验证规则的验证结果。如果原子验证规则对应的验证通过率低,则表明该子验证规则的验证结果较大概率为假。The theoretical basis for adopting the standard is: if the logical relationship between the sub-validation rules of a verification rule is AND, then if the verification result of one sub-validation rule is false, the verification result of the entire verification rule is also false, thus, The sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed, which helps to quickly determine the verification result of the verification rule. If the verification pass rate corresponding to the atom verification rule is low, it indicates that the verification result of the sub-validation rule has a large probability of being false.
相应的,与排序标准一对应的停止验证条件包括:待验证数据对象不满足子验证规则。当应用一个子验证规则对数据对象进行验证时,若该数据对象不满足该子验证规则,并且各个子验证规则之间的逻辑关系为与,则可以直接判定该子验证规则所属的父验证规则的验证结果为假,即待验证数据对象不满足子验证规则所属的父验证规则。Correspondingly, the stop verification condition corresponding to the sorting criterion includes: the data object to be verified does not satisfy the sub-verification rule. When a sub-verification rule is applied to verify a data object, if the data object does not satisfy the sub-verification rule, and the logical relationship between the sub-verification rules is AND, the parent verification rule to which the sub-validation rule belongs may be directly determined. The verification result is false, that is, the data object to be verified does not satisfy the parent verification rule to which the sub-validation rule belongs.
请参考图2,其为本申请的基于规则的数据对象验证方法实施例A中步骤S103的具体流程图。具体地,依据排序标准一对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Please refer to FIG. 2 , which is a specific flowchart of step S103 in Embodiment A of the rule-based data object verification method of the present application. Specifically, the execution order of each sub-verification rule included in the verification rule is sorted according to the sorting criterion, and the execution order of the sub-verification rule is obtained, including:
步骤S201:解析所述验证规则,获取所述子验证规则之间的逻辑关系。Step S201: Parse the verification rule to obtain a logical relationship between the sub-validation rules.
基于逻辑运算符的运算优先级,解析验证规则,获取子验证规则之间的逻辑关系。在具体实现时,可以采用树结构等方式表示验证规则。当采用树结构表示验证规则时,则树的根节点为第一级子验证规则之间的逻辑关系,树的内部节点对应各级子验证规则之间的逻辑关系,树的叶节点为原子验证规则。对验证规则进行运算优先级的解析后,即可获取各个子验证规则之间的逻辑关系。Based on the logical operator's operation priority, parsing the validation rules and obtaining the logical relationship between the sub-validation rules. In a specific implementation, the verification rule may be represented by a tree structure or the like. When the tree structure is used to represent the verification rule, the root node of the tree is the logical relationship between the first level of sub-verification rules, and the internal nodes of the tree correspond to the logical relationship between the sub-verification rules of the levels, and the leaf nodes of the tree are atomic verification. rule. After the resolution of the verification rule is calculated, the logical relationship between each sub-validation rule can be obtained.
步骤S203:自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系。Step S203: Starting from the first level sub-verification rule, determining whether the logical relationship between the sub-validation rules of the predetermined level is a relational relationship.
本申请实施例所述的第一级子验证规则,是指验证规则直接包括的子验证规则,例如,一个树结构方式表示验证规则,根节点的各个子节点即为第一级子验证规则,根节点即为各个第一级子验证规则之间的逻辑关系,第一级子验证规则既可以为原子验证规则,还可以为复合验证规则。The first level sub-verification rule described in the embodiment of the present application refers to a sub-verification rule directly included in the verification rule. For example, a tree structure indicates a verification rule, and each sub-node of the root node is a first-level sub-verification rule. The root node is the logical relationship between each first-level sub-verification rule. The first-level sub-verification rule can be either an atomic verification rule or a composite verification rule.
在实际应用中,依据排序标准一可以仅对验证规则包括的第一级原子验证规则进行排序,还可以对验证规则包括的各级复合验证规则中的原子验证规则以其所属的复合验证规则为组分别进行排序,最终获得所有原子验证规则的执行顺序。如果仅对验证规则包括的第一级原子验证规则进行排序,则预定级数 为1;如果仅对验证规则包括的前两级原子验证规则进行排序,则预定级数为2,以此类推,可以任意设定排序有效的子验证规则级数。In practical applications, according to the sorting criterion, only the first-level atomic verification rules included in the verification rule may be sorted, and the atomic verification rule in the composite verification rules included in the verification rule may be the composite verification rule to which the verification rule belongs. The groups are sorted separately, and finally the order of execution of all atomic verification rules is obtained. If only the first-level atomic verification rules included in the validation rule are sorted, the predetermined number of levels Is 1; if only the first two levels of atomic verification rules included in the verification rule are sorted, the predetermined number of levels is 2, and so on, and the number of sub-validation rules that are valid for sorting can be arbitrarily set.
步骤S205:若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Step S205: If yes, sort the execution order of the sub-verification rules in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtain an execution order of the sub-verification rules.
如果一个复合验证规则包括的各个子验证规则之间的逻辑关系为与关系,则根据排序标准一,以原子验证规则对应的验证通过率的升序方式,对子验证规则的执行顺序进行排序,获得该复合验证规则包括的各个子验证规则的执行顺序。If the logical relationship between each sub-validation rule included in a composite verification rule is a relationship, according to the sorting criterion 1, the execution order of the sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtained. The execution order of each sub-verification rule included in the composite verification rule.
由于排序标准一是在子验证规则之间的逻辑关系为与关系时,优先执行原子验证规则对应的验证通过率低的子验证规则,因此能够有效提高数据对象的验证速度。Since the sorting criterion firstly performs the sub-verification rule with low verification pass rate corresponding to the atomic verification rule when the logical relationship between the sub-verification rules is a relationship, the verification speed of the data object can be effectively improved.
2)排序标准二2) Sorting criteria 2
排序标准二包括:若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低的所述子验证规则。要依据排序标准二对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个第一级子验证规则对应的验证通过率。The sorting criterion 2 includes: if the logical relationship between the first-level sub-verification rules is a relationship, the sub-verification rules having a low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed. According to the sorting criterion 2, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the verification pass rate corresponding to each first-level sub-verification rule needs to be calculated.
排序标准二与排序标准一的理论依据基本一致,二者不同之处仅在于:排序标准一仅优先执行原子验证规则对应的验证通过率低的子验证规则,而排序标准二优先执行的子验证规则,既可以是原子验证规则,还可以是复合验证规则。The sorting criterion 2 is basically consistent with the theoretical basis of the sorting criterion 1. The difference between the two is that the sorting criterion only performs the sub-verification rules with low verification pass rate corresponding to the atomic verification rule, and the sub-verification of the sorting standard two is preferentially executed. Rules can be either atomic verification rules or compound verification rules.
由于排序标准二也是针对子验证规则之间的逻辑关系为与关系进行子验证规则执行优先级的排序处理,因此排序标准二对应的停止验证条件为:待验证数据对象不满足子验证规则。Since the sorting criterion 2 is also for the logical relationship between the sub-verification rules to perform the sorting process of the sub-verification rule execution priority with the relationship, the stop verification condition corresponding to the sorting criterion 2 is that the data object to be verified does not satisfy the sub-verification rule.
请参考图3,其为本申请的基于规则的数据对象验证方法实施例B中步骤S103的具体流程图。具体地,依据排序标准二对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Please refer to FIG. 3 , which is a specific flowchart of step S103 in Embodiment B of the rule-based data object verification method of the present application. Specifically, the execution order of the sub-verification rules included in the verification rule is sorted according to the sorting criterion 2, and the execution order of the sub-verification rules is obtained, including:
步骤S301:解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系。Step S301: Parse the verification rule to obtain a logical relationship between the first level sub-verification rules.
基于逻辑运算符的运算优先级规则,解析验证规则,获取第一级子验证规则之间的逻辑关系。对验证规则进行运算优先级的解析后,即可获取各个第一 级子验证规则之间的逻辑关系。The operation priority rule based on the logical operator, parsing the verification rule, and obtaining the logical relationship between the first level sub-verification rules. After the resolution of the verification rule is calculated, the first one can be obtained. The logical relationship between the level verification rules.
步骤S303:判断所述第一级子验证规则之间的逻辑关系是否为与关系。Step S303: Determine whether the logical relationship between the first level sub-verification rules is a relationship.
排序标准二只针对验证规则所包括的第一级子验证规则,判断它们之间的逻辑关系是否为与关系,而排序标准一需要根据预定级数分别判断不同级的复合验证规则包括的各个子验证规则之间的逻辑关系。The sorting criterion 2 is only for the first level sub-verification rules included in the verification rule, and judges whether the logical relationship between them is a relationship, and the sorting criterion 1 needs to respectively judge each sub-inclusion of the multi-level verification rule according to the predetermined level. Verify the logical relationship between the rules.
步骤S305:若是,则以所述第一级验证规则对应的验证通过率的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得第一级子验证规则的执行顺序。Step S305: If yes, sort the execution order of the first-level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level verification rule, and obtain an execution order of the first-level sub-verification rules.
如果第一级子验证规则之间的逻辑关系为与关系,则根据排序标准二,以子验证规则对应的验证通过率的升序方式,对子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If the logical relationship between the first level sub-verification rules is a relationship, according to the sorting criterion 2, the execution order of the sub-verification rules is sorted in an ascending manner corresponding to the verification pass rate of the sub-verification rules, and the sub-verification rules are obtained. Execution order.
相对于排序标准一的数据对象验证速度而言,由于排序标准二优先执行所有第一级子验证规则对应的验证通过率低的子验证规则,因此排序标准二较排序标准一的数据对象验证速度更快。然而,要采用排序标准二获得子验证规则的执行顺序,需要预先计算第一级复合验证规则对应的验证通过率,因此,排序标准二较排序标准一对应的预先计算量更大。Compared with the data object verification speed of the sorting criterion one, since the sorting criterion 2 preferentially executes the sub-verification rules with low verification pass rate corresponding to all the first-level sub-verification rules, the sorting criterion 2 is faster than the sorting standard one. Faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion 2, the verification pass rate corresponding to the first-level compound verification rule needs to be calculated in advance, and therefore, the pre-calculation amount corresponding to the sorting criterion 2 is larger than the sorting standard.
3)排序标准三3) Sorting criteria three
排序标准三包括:若子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的子验证规则。The sorting criterion 3 includes: if the logical relationship between the sub-verification rules is a relationship, the sub-verification rule having a low response pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value is preferentially executed.
本申请实施例提供的方法,通过第一综合优先级分数对子验证规则对应的验证通过率及其依赖的数据对象属性值的响应时间进行综合评分。本申请实施例所述的第一综合优先级分数,是指影响数据对象验证速度的各个因素的加权平均值。第一综合优先级分数越低,则表示子验证规则对应的验证通过率越低且子验证规则依赖的数据对象属性值的响应时间越短;反之,如果综合优先级分数越高,则表示子验证规则对应的验证通过率越高且子验证规则依赖的数据对象属性值的响应时间越长。具体地,所述第一综合优先级分数采用如下计算公式生成:The method provided by the embodiment of the present application comprehensively scores the response pass rate corresponding to the sub-verification rule and the response time of the dependent data object attribute value by using the first integrated priority score. The first comprehensive priority score described in the embodiment of the present application refers to a weighted average of various factors that affect the verification speed of the data object. The lower the first comprehensive priority score, the lower the verification pass rate corresponding to the sub-verification rule and the shorter the response time of the data object attribute value that the sub-verification rule depends on; otherwise, if the comprehensive priority score is higher, the sub-representation is The higher the verification pass rate corresponding to the verification rule and the longer the response time of the data object attribute value that the sub-validation rule depends on. Specifically, the first comprehensive priority score is generated by using the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为第一综合优先级分数,X为子验证规则对应的验证通过率的归 一化值,Y为子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first comprehensive priority score and X is the return of the verification pass rate corresponding to the sub-verification rule A value, Y is the normalized value of the response time of the data object attribute value that the sub-validation rule depends on, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
为了对子验证规则对应的验证通过率及其依赖的数据对象属性值的响应时间进行综合评分,也即计算第一综合优先级分数,首先需要将验证通过率和响应时间分别进行归一化处理,以能够对二者进行加权计算。在实际应用中,可以采用多种归一化的方式对验证通过率和响应时间分别进行归一化处理,例如:验证通过率的归一化值=(验证通过率-所有验证通过率中的最小值)/(所有验证通过率中的最大值-所有验证通过率中的最小值),或者验证通过率的归一化值=(验证通过率在所有验证通过率中的升序位置)/所有验证通过率的总个数等方式。上述归一化处理的不同方式,都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。In order to comprehensively score the response pass rate corresponding to the sub-validation rule and the response time of the dependent data object attribute value, that is, to calculate the first comprehensive priority score, firstly, the verification pass rate and the response time are respectively normalized. In order to be able to weight the two calculations. In practical applications, the verification pass rate and response time can be normalized in a variety of normalized manners, for example, the normalized value of the verification pass rate = (verification pass rate - all verification pass rates) Minimum) / (maximum of all verification pass rates - minimum of all verification pass rates), or normalized pass rate of verification pass = (verified pass rate in ascending position in all verification pass rates) / all Verify the total number of pass rates and other methods. The different ways of the normalization process described above are only the modifications of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
要依据排序标准三对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个原子验证规则对应的第一综合优先级分数。According to the sorting standard three, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the first comprehensive priority score corresponding to each atom verification rule needs to be calculated.
排序标准三与排序标准一的理论依据基本一致,二者不同之处仅在于:排序标准一优先执行原子验证规则对应的验证通过率低的子验证规则,而排序标准三优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的子验证规则,也即优先执行原子验证规则对应的第一综合优先级分数低的子验证规则。The sorting criterion 3 is basically consistent with the theoretical basis of the sorting criterion 1. The difference between the two is that the sorting criterion first performs the sub-verification rules with low verification pass rate corresponding to the atomic verification rule, and the sorting standard three performs the atomic verification rule correspondingly. The sub-verification rule with low response pass rate and short response time of the dependent data object attribute value, that is, the sub-verification rule with the first comprehensive priority score corresponding to the atomic verification rule is preferentially executed.
由于排序标准三也是针对子验证规则之间的逻辑关系为与关系进行子验证规则执行优先级的排序处理,因此排序标准三对应的停止验证条件为:待验证数据对象不满足子验证规则。Since the sorting criterion 3 is also for the logical relationship between the sub-verification rules to perform the sorting process of the sub-verification rule execution priority with the relationship, the stop verification condition corresponding to the sorting criterion three is that the data object to be verified does not satisfy the sub-verification rule.
具体地,依据排序标准三对所述验证规则包括的各个子验证规则的执行顺序进行排序的方法,与依据排序标准一对各个子验证规则的执行顺序进行排序的方法基本一致,其中第1步和第2步完全一致,相同之处此处不再赘述,相关说明详见排序标准一中的对应部分。二者不同之处仅在于:第3步时,排序标准三是以原子验证规则对应的第一综合优先级分数的升序方式,对子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Specifically, the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion three is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion, wherein the first step It is exactly the same as step 2. The similarities are not repeated here. For details, see the corresponding part in Sorting Standard 1. The only difference between the two is that in the third step, the sorting criterion 3 is an ascending order of the first comprehensive priority score corresponding to the atomic verification rule, and the order of execution of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
相对于排序标准一的数据对象验证速度而言,由于排序标准三优先执行子验证规则对应的验证通过率低且子验证规则依赖的数据对象属性值的响应时间 短的子验证规则,因此排序标准三较排序标准一的数据对象验证速度更快。然而,要采用排序标准三获得子验证规则的执行顺序,需要预先计算每一个原子验证规则对应的第一综合优先级分数,因此,排序标准三较排序标准一对应的预先计算量更大。Relative to the data object verification speed of the sorting criterion 1, the response time of the data object attribute value that is dependent on the sub-verification rule and the sub-verification rule-dependent data object attribute value is low due to the sorting criterion Short sub-verification rules, so the sorting criteria 3 is faster than the sorting standard one for data objects. However, to obtain the execution order of the sub-verification rules by using the sorting criterion three, it is necessary to calculate the first comprehensive priority score corresponding to each atom verification rule in advance, and therefore, the sorting standard 3 has a larger pre-calculation amount corresponding to the sorting standard.
4)排序标准四4) Sorting criteria four
排序标准四包括:若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则。排序标准四中的第一综合优先级分数与排序标准三中的第一综合优先级分数是同一概念,此处不再赘述,相关说明详见排序标准一中的对应部分。The sorting criterion 4 includes: if the logical relationship between the first level sub-verification rules is a relationship, the verification pass rate corresponding to the first-level sub-verification rule is preferentially executed, and the response time of the dependent data object attribute value is short. The sub-verification rules. The first comprehensive priority score in the ranking criterion 4 is the same as the first comprehensive priority score in the ranking criterion 3, and will not be described here. For details, see the corresponding part in the sorting criterion 1.
要依据排序标准四对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个第一级子验证规则对应的第一综合优先级分数。According to the sorting criteria, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the first comprehensive priority score corresponding to each first-level sub-verification rule needs to be calculated.
排序标准四与排序标准三的理论依据基本一致,二者不同之处仅在于:排序标准三仅优先执行原子验证规则对应的第一综合优先级分数高的子验证规则,而排序标准四优先执行的子验证规则,既可以是原子验证规则,还可以是复合验证规则。The sorting criterion 4 is basically consistent with the theoretical basis of the sorting criterion 3. The difference between the two is that the sorting criterion 3 only preferentially executes the sub-verification rule with the first comprehensive priority score corresponding to the atomic verification rule, and the sorting criterion 4 is preferentially executed. The sub-verification rules can be either atomic verification rules or compound verification rules.
由于排序标准四也是针对子验证规则之间的逻辑关系为与关系进行子验证规则执行优先级的排序处理,因此排序标准四对应的停止验证条件为:待验证数据对象不满足子验证规则。Since the sorting criterion 4 is also for the logical relationship between the sub-verification rules to perform the sorting process of the sub-verification rule execution priority with the relationship, the stop verification condition corresponding to the sorting criterion 4 is that the data object to be verified does not satisfy the sub-verification rule.
具体地,依据排序标准四对所述验证规则包括的各个子验证规则的执行顺序进行排序的方法,与依据排序标准二对各个子验证规则的执行顺序进行排序的方法基本一致,其中第1步和第2步完全一致,相同之处此处不再赘述,相关说明详见排序标准二中的对应部分。二者不同之处仅在于:第3步时,排序标准四是以子验证规则对应的第一综合优先级分数的升序方式,对子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Specifically, the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion 4 is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion 2, wherein the first step It is exactly the same as step 2. The similarities are not repeated here. For details, see the corresponding part in Sorting Standard 2. The difference between the two is only that in the third step, the sorting criterion 4 is an ascending manner of the first comprehensive priority score corresponding to the sub-verification rule, and the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
相对于排序标准一至标准三的数据对象验证速度而言,由于排序标准四优先执行第一级子验证规则对应的验证通过率低且子验证规则依赖的数据对象属性值的响应时间短的子验证规则,因此排序标准四较排序标准一至标准三的数据对象验证速度更快。然而,要采用排序标准四获得子验证规则的执行顺序, 需要预先计算第一级子验证规则对应的第一综合优先级分数,因此,排序标准四较排序标准一至标准三对应的预先计算量更大。Relative to the data object verification speed of the sorting criteria 1 to 3, the sub-verification of the response time of the data object attribute value which is low by the first-level sub-verification rule and the response time of the data object attribute value of the sub-verification rule is short Rules, so sorting standard four is faster than data object validation from one to three standard criteria. However, to use the sorting criteria four to obtain the order of execution of the sub-verification rules, The first comprehensive priority score corresponding to the first level sub-verification rule needs to be calculated in advance, and therefore, the ranking standard 4 is larger than the pre-calculation amount corresponding to the sorting standard one to the standard three.
5)排序标准五5) Sorting criteria five
排序标准五包括:若子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则。要依据排序标准五对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个原子验证规则对应的验证通过率。The sorting criterion 5 includes: if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the atomic verification rule are preferentially executed. According to the sorting criterion 5, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the verification pass rate corresponding to each atom verification rule needs to be calculated.
排序标准五与排序标准一相对应,采用该标准的理论依据是:如果一个验证规则的子验证规则之间的逻辑关系为或,则只要有一个子验证规则的验证结果为真,则整个验证规则的验证结果也为真,因而,优先执行原子验证规则对应的验证通过率高的子验证规则,有助于快速确定验证规则的验证结果。如果原子验证规则对应的验证通过率高,则表明该子验证规则的验证结果较大概率为真。The sorting criterion 5 corresponds to the sorting standard. The theoretical basis for adopting the standard is: if the logical relationship between the sub-verifying rules of a verification rule is OR, then the verification is true as long as the verification result of one sub-verification rule is true. The verification result of the rule is also true. Therefore, the sub-verification rule with high verification pass rate corresponding to the atomic verification rule is preferentially executed, which helps to quickly determine the verification result of the verification rule. If the verification pass rate corresponding to the atomic verification rule is high, it indicates that the verification result of the sub-verification rule has a large probability of being true.
由于排序标准五是针对子验证规则之间的逻辑关系为或关系进行子验证规则执行优先级的排序处理,因此排序标准五对应的停止验证条件为:待验证数据对象满足子验证规则。可见,排序标准五对应的停止验证条件与上述排序标准一至四对应的停止验证条件不同。Since the sorting criterion 5 is to perform the sorting process of the sub-verification rule execution priority for the logical relationship between the sub-verification rules or the relationship, the stop verification condition corresponding to the sorting criterion 5 is that the data object to be verified satisfies the sub-verification rule. It can be seen that the stop verification condition corresponding to the sorting criterion five is different from the stop verification condition corresponding to the above sorting criteria one to four.
具体地,依据排序标准五对所述验证规则包括的各个子验证规则的执行顺序进行排序的方法,与依据排序标准一对各个子验证规则的执行顺序进行排序的方法基本一致,相同之处此处不再赘述,相关说明详见排序标准一中的对应部分。二者不同之处仅在于:第2步时,排序标准五是判断子验证规则之间的逻辑关系是否为或关系;第3步时,排序标准五是以原子验证规则对应的验证通过率的降序方式,对子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Specifically, the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion 5 is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting standard, and the same is true. It will not be repeated here. For details, please refer to the corresponding part in Sorting Standard 1. The difference between the two is only: in the second step, the sorting criterion 5 is to determine whether the logical relationship between the sub-verification rules is or is related; in the third step, the sorting criterion 5 is the verification pass rate corresponding to the atomic verification rule. In descending mode, the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
由于排序标准五是在子验证规则之间的逻辑关系为或关系时,优先执行原子验证规则对应的验证通过率高的子验证规则,因此能够有效提高数据对象的验证速度。Since the sorting criterion 5 is that the logical relationship between the sub-verification rules is or is related, the sub-verification rule with high verification pass rate corresponding to the atomic verification rule is preferentially executed, so that the verification speed of the data object can be effectively improved.
6)排序标准六6) Sorting criteria six
排序标准六包括:若第一级子验证规则之间的逻辑关系为或关系,则优先执行第一级子验证规则对应的验证通过率高的所述子验证规则。要依据排序标 准六对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个第一级子验证规则对应的验证通过率。The sorting criterion 6 includes: if the logical relationship between the first level sub-verification rules is or a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the first-level sub-verification rules are preferentially executed. According to the sorting criteria The order of execution of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the verification pass rate corresponding to each first-level sub-verification rule needs to be calculated.
排序标准六与排序标准五的理论依据基本一致,二者不同之处仅在于:排序标准五仅优先执行原子验证规则对应的验证通过率高的子验证规则,而排序标准六优先执行的子验证规则,既可以是原子验证规则,还可以是复合验证规则。The sorting criterion 6 is basically consistent with the theoretical basis of the sorting criterion 5. The difference between the two is that the sorting criterion 5 only performs the sub-verification rules with high verification pass rate corresponding to the atomic verification rule, and the sub-verification of the sorting standard six priority execution. Rules can be either atomic verification rules or compound verification rules.
由于排序标准六也是针对子验证规则之间的逻辑关系为或关系进行子验证规则执行优先级的排序处理,因此排序标准六对应的停止验证条件为:待验证数据对象满足子验证规则。Since the sorting criterion 6 is also a sorting process for performing the priority of the sub-verification rule execution for the logical relationship or relationship between the sub-verification rules, the stop verification condition corresponding to the sorting criterion 6 is that the data object to be verified satisfies the sub-verification rule.
具体地,依据排序标准六对所述验证规则包括的各个子验证规则的执行顺序进行排序的方法,与依据排序标准二对各个子验证规则的执行顺序进行排序的方法基本一致,相同之处此处不再赘述,相关说明详见排序标准二中的对应部分。二者不同之处仅在于:第2步时,排序标准六是判断子验证规则之间的逻辑关系是否为或关系;第3步时,排序标准六是以第一级子验证规则对应的验证通过率的降序方式,对第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Specifically, the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion 6 is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion 2, and the same is the same. It will not be repeated here. For details, please refer to the corresponding part in Sorting Standard 2. The difference between the two is only: in the second step, the sorting criterion 6 is to determine whether the logical relationship between the sub-verification rules is or is related; in the third step, the sorting criterion 6 is the verification corresponding to the first-level sub-verification rules. Through the descending order of the rate, the execution order of the first level sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
相对于排序标准五的数据对象验证速度而言,由于排序标准六优先执行所有第一级子验证规则对应的验证通过率高的子验证规则,因此排序标准六较排序标准五的数据对象验证速度更快。然而,要采用排序标准六获得子验证规则的执行顺序,需要预先计算第一级复合验证规则对应的验证通过率,因此,排序标准六较排序标准五对应的预先计算量更大。Compared with the data object verification speed of the sorting standard five, since the sorting criterion 6 preferentially executes the sub-verification rules with high verification pass rate corresponding to all the first-level sub-verification rules, the sorting standard 6 compares the data object verification speed of the sorting standard five. Faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion 6, it is necessary to calculate the verification pass rate corresponding to the first-level compound verification rule in advance, and therefore, the sorting criterion 6 is larger than the pre-calculation amount corresponding to the sorting standard five.
7)排序标准七7) Sorting criteria seven
排序标准七包括:若子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的子验证规则。The sorting criterion 7 includes: if the logical relationship between the sub-verification rules is or is related, the sub-verification rule having a high response pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value is preferentially executed.
本申请实施例提供的方法,通过第二综合优先级分数对子验证规则对应的验证通过率及其依赖的数据对象属性值的响应时间进行又一种方式的综合评分。本申请实施例所述的第二综合优先级分数,是指影响数据对象验证速度的各个因素的又一种加权平均值。第二综合优先级分数越低,则表示子验证规则对应的验证通过率越高且子验证规则依赖的数据对象属性值的响应时间越短; 反之,如果综合优先级分数越高,则表示子验证规则对应的验证通过率越低且子验证规则依赖的数据对象属性值的响应时间越长。具体地,所述第二综合优先级分数采用如下计算公式生成:The method provided by the embodiment of the present application performs a comprehensive evaluation of the response time of the verification pass rate corresponding to the sub-verification rule and the response time of the dependent data object attribute value by the second comprehensive priority score. The second comprehensive priority score described in the embodiment of the present application refers to another weighted average value of each factor that affects the verification speed of the data object. The lower the second comprehensive priority score, the higher the verification pass rate corresponding to the sub-verification rule and the shorter the response time of the data object attribute value that the sub-verification rule depends on; Conversely, if the composite priority score is higher, it means that the lower the verification pass rate corresponding to the sub-verification rule and the longer the response time of the data object attribute value that the sub-verification rule depends. Specifically, the second comprehensive priority score is generated by using the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为第二综合优先级分数,X为子验证规则对应的验证失败率的归一化值,Y为子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is the normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is the normalized value of the response time of the data object attribute value dependent on the sub-validation rule, and N1 is the verification The weight of the pass rate, N2 is the weight of the response time.
本申请实施例所述的验证失败率,是指验证通过率的补值,例如:验证通过率为20%,则验证失败率为80%。为了对子验证规则对应的验证通过率及其依赖的数据对象属性值的响应时间进行又一种方式的综合评分,也即计算第二综合优先级分数,首先需要将验证失败率和响应时间分别进行归一化处理,以能够对二者进行加权计算。在实际应用中,可以采用多种归一化的方式对验证失败率和响应时间分别进行归一化处理,例如:验证失败率的归一化值=(验证失败率-所有验证失败率中的最小值)/(所有验证失败率中的最大值-所有验证失败率中的最小值),或者验证失败率的归一化值=(验证失败率在所有验证失败率中的升序位置)/所有验证失败率的总个数等方式。上述归一化处理的不同方式,都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。The verification failure rate described in the embodiment of the present application refers to the supplementary value of the verification pass rate. For example, if the verification pass rate is 20%, the verification failure rate is 80%. In order to perform a comprehensive evaluation of the response time of the verification pass rate and the dependent data object attribute value of the sub-verification rule, that is, to calculate the second comprehensive priority score, the verification failure rate and the response time are respectively required. Normalization is performed to enable weighting calculations for both. In practical applications, the verification failure rate and the response time can be normalized in a plurality of normalized manners, for example, the normalized value of the verification failure rate = (verification failure rate - all verification failure rates) Minimum) / (the maximum of all verification failure rates - the minimum of all verification failure rates), or the normalized value of the verification failure rate = (the verification failure rate is in ascending position in all verification failure rates) / all The total number of verification failure rates, etc. The different ways of the normalization process described above are only the modifications of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
要依据排序标准七对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个原子验证规则对应的第二综合优先级分数。According to the sorting criterion, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the second comprehensive priority score corresponding to each atom verification rule needs to be calculated.
排序标准七与排序标准五的理论依据基本一致,二者不同之处仅在于:排序标准五优先执行原子验证规则对应的验证通过率高的子验证规则,而排序标准七优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的子验证规则,也即优先执行原子验证规则对应的第二综合优先级分数低的子验证规则。The sorting criterion 7 is basically consistent with the theoretical basis of the sorting criterion five. The difference between the two is that the sorting standard five preferentially executes the sub-verification rules corresponding to the high verification pass rate corresponding to the atomic verification rule, and the sorting standard seven performs the atomic verification rule correspondingly. The sub-verification rule with high response pass rate and short response time of the dependent data object attribute value, that is, the sub-verification rule with the second comprehensive priority score corresponding to the atomic verification rule is preferentially executed.
由于排序标准七也是针对子验证规则之间的逻辑关系为或关系进行子验证规则执行优先级的排序处理,因此排序标准七对应的停止验证条件为:待验证数据对象满足子验证规则。Since the sorting criterion 7 is also a sorting process for performing the priority of the sub-verification rule execution for the logical relationship or relationship between the sub-verification rules, the stop verification condition corresponding to the sorting standard seven is: the data object to be verified satisfies the sub-verification rule.
具体地,依据排序标准七对所述验证规则包括的各个子验证规则的执行顺 序进行排序的方法,与依据排序标准五对各个子验证规则的执行顺序进行排序的方法基本一致,其中第1步和第2步完全一致,相同之处此处不再赘述,相关说明详见排序标准一中的对应部分。二者不同之处仅在于:第3步时,排序标准七是以原子验证规则对应的第二综合优先级分数的升序方式,对子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Specifically, according to the sorting criterion, the execution of each sub-verification rule included in the verification rule is performed. The method of ordering is basically the same as the method of sorting the execution order of each sub-verification rule according to the sorting criteria. The first step and the second step are completely identical, and the similarities are not repeated here. Sort the corresponding part of the standard one. The only difference is that in the third step, the sorting criterion 7 is an ascending order of the second comprehensive priority score corresponding to the atomic verification rule, and the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
相对于排序标准五的数据对象验证速度而言,由于排序标准七优先执行子验证规则对应的验证通过率高且子验证规则依赖的数据对象属性值的响应时间短的子验证规则,因此排序标准七较排序标准五的数据对象验证速度更快。然而,要采用排序标准七获得子验证规则的执行顺序,需要预先计算每一个原子验证规则对应的第二综合优先级分数,因此,排序标准七较排序标准五对应的预先计算量更大。Compared with the data object verification speed of the sorting standard five, the sorting standard 7 performs the sub-verification rule corresponding to the sub-verification rule corresponding to the high verification pass rate and the sub-validation rule-dependent data object attribute value has a short response time, so the sorting criterion Seven data objects with sorting criteria of five are faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion 7, it is necessary to calculate the second comprehensive priority score corresponding to each atom verification rule in advance, and therefore, the sorting criterion 7 is larger than the pre-calculation amount corresponding to the sorting standard five.
8)排序标准八8) Sorting criteria eight
排序标准八包括:若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则。排序标准八中的第二综合优先级分数与排序标准七中的第二综合优先级分数是同一概念,此处不再赘述,相关说明项详见排序标准七中的对应部分。The sorting criterion 8 includes: if the logical relationship between the first level sub-verification rules is or is related, the verification pass rate corresponding to the first-level sub-verification rule is preferentially executed, and the response time of the dependent data object attribute value is short. The sub-verification rules. The second comprehensive priority score in the ranking criterion 8 is the same as the second comprehensive priority score in the ranking criterion 7, and will not be described here. The related description items are detailed in the corresponding part of the sorting standard 7.
要依据排序标准八对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要计算各个第一级子验证规则对应的第二综合优先级分数。According to the sorting criterion, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the second comprehensive priority score corresponding to each first-level sub-verification rule needs to be calculated.
排序标准八与排序标准七的理论依据基本一致,二者不同之处仅在于:排序标准七仅优先执行原子验证规则对应的第二综合优先级分数高的子验证规则,而排序标准八优先执行的子验证规则,既可以是原子验证规则,还可以是复合验证规则。The sorting criterion 8 is basically consistent with the theoretical basis of the sorting criterion 7. The difference between the two is that the sorting criterion 7 only preferentially executes the sub-verification rule with the second comprehensive priority score corresponding to the atomic verification rule, and the sorting criterion is prioritized. The sub-verification rules can be either atomic verification rules or compound verification rules.
由于排序标准八也是针对子验证规则之间的逻辑关系为或关系进行子验证规则执行优先级的排序处理,因此排序标准八对应的停止验证条件为:待验证数据对象满足子验证规则。Since the sorting criterion 8 is also a sorting process for performing the priority of the sub-verification rule execution for the logical relationship or relationship between the sub-verification rules, the stop verification condition corresponding to the sorting criterion eight is that the data object to be verified satisfies the sub-verification rule.
具体地,依据排序标准八对所述验证规则包括的各个子验证规则的执行顺序进行排序的方法,与依据排序标准六对各个子验证规则的执行顺序进行排序的方法基本一致,其中第1步和第2步完全一致,相同之处此处不再赘述,相 关说明详见排序标准六中的对应部分。二者不同之处仅在于:第3步时,排序标准八是以子验证规则对应的第二综合优先级分数的升序方式,对子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Specifically, the method for sorting the execution order of each sub-verification rule included in the verification rule according to the sorting criterion eight is basically the same as the method for sorting the execution order of each sub-verification rule according to the sorting criterion, wherein the first step It is exactly the same as step 2. The same thing is not repeated here. See the corresponding section in Sorting Standard 6 for details. The only difference between the two is that in the third step, the sorting criterion 8 is an ascending manner of the second comprehensive priority score corresponding to the sub-verification rule, and the execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained. .
相对于排序标准五至标准七的数据对象验证速度而言,由于排序标准八优先执行第一级子验证规则对应的验证通过率高且子验证规则依赖的数据对象属性值的响应时间短的子验证规则,因此排序标准八较排序标准五至标准七的数据对象验证速度更快。然而,要采用排序标准八获得子验证规则的执行顺序,需要预先计算第一级子验证规则对应的第二综合优先级分数,因此,排序标准八较排序标准五至标准七对应的预先计算量更大。Compared with the data object verification speed of the sorting standard five to seven, the sorting criterion eight preferentially executes the sub-authentication rule corresponding to the first-level sub-verification rule and the sub-validation rule depends on the data object attribute value with a short response time. Validation rules, so the sorting criteria eight are faster than the data objects of the sorting criteria five to seven. However, to obtain the execution order of the sub-verification rules by using the sorting criterion eight, the second comprehensive priority score corresponding to the first-level sub-verification rule needs to be calculated in advance, and therefore, the pre-calculation amount corresponding to the sorting criterion 8 to the sorting standard 5 to the standard 7 is required. Bigger.
9)排序标准九9) Sorting criteria nine
排序标准九包括:优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则。要依据排序标准九对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要获取各个原子验证规则依赖的数据对象属性值的响应时间。The sorting criterion 9 includes: the sub-verification rule that prioritizes that the response time of the data object attribute value on which the atomic verification rule depends is short. According to the sorting criteria, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the response time of the data object attribute value that each atom verification rule depends on is obtained.
采用该标准的理论依据是:原子验证规则依赖的数据对象属性值的响应时间越短,则获得该子验证规则的验证结果也越快。The theoretical basis for adopting this standard is that the shorter the response time of the data object attribute value that the atomic verification rule depends on, the faster the verification result of the sub-verification rule is obtained.
相应的,与排序标准九对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的。具体包括:若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。Correspondingly, the stop verification condition corresponding to the sorting criterion nine is determined according to a logical relationship between the sub-verification rules. Specifically, if the logical relationship between the sub-verification rules is a relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule; if the logical relationship between the sub-validation rules For the relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
请参考图4,其为本申请的基于规则的数据对象验证方法实施例C中步骤S103的具体流程图。具体地,依据排序标准九对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Please refer to FIG. 4 , which is a specific flowchart of step S103 in Embodiment C of the rule-based data object verification method of the present application. Specifically, the execution order of each sub-verification rule included in the verification rule is sorted according to the sorting criterion, and the execution order of the sub-verification rules is obtained, including:
步骤S401:解析所述验证规则,获取所述子验证规则之间的逻辑关系。Step S401: Parse the verification rule to obtain a logical relationship between the sub-validation rules.
该步骤与排序标准一中的对应步骤是相同的,此处不再赘述,相关说明详见排序标准一中的对应部分。This step is the same as the corresponding step in the sorting standard one, and will not be described here. For details, refer to the corresponding part in the sorting standard 1.
步骤S403:自第一级子验证规则开始,逐级向下对预定级数的各级子验证规则,按照所述原子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。 Step S403: Starting from the first-level sub-verification rule, step-by-step down to the sub-verification rules of the predetermined level of the sub-verification rules, in accordance with the ascending order of the response time of the data object attribute values that the atomic verification rule depends on, The execution order of the verification rules is sorted to obtain the execution order of the sub-validation rules.
排序标准九中的第一级子验证规则与排序标准一中的第一级子验证规则是同一概念,此处不再赘述,相关说明项详见排序标准一中的对应部分。The first-level sub-verification rule in the sorting standard nine is the same concept as the first-level sub-verification rule in the sorting standard one, and is not described here again. For related description items, see the corresponding part in the sorting standard one.
在实际应用中,依据排序标准九可以仅对验证规则包括的第一级原子验证规则进行排序,还可以对验证规则包括的各级复合验证规则中的原子验证规则以其所属的复合验证规则为组分别进行排序,最终获得所有原子验证规则的执行顺序。如果仅对验证规则包括的第一级原子验证规则进行排序,则预定级数为1;如果仅对验证规则包括的前两级原子验证规则进行排序,则预定级数为2,以此类推,可以任意设定排序有效的子验证规则级数。In practical applications, according to the sorting criterion, only the first-level atomic verification rules included in the verification rule may be sorted, and the atomic verification rule in the composite verification rules included in the verification rule may be the composite verification rule to which the verification rule belongs. The groups are sorted separately, and finally the order of execution of all atomic verification rules is obtained. If only the first-level atomic verification rules included in the verification rule are sorted, the predetermined number of levels is 1; if only the first two levels of atomic verification rules included in the verification rule are sorted, the predetermined number of levels is 2, and so on. The number of sub-validation rules that are valid for sorting can be arbitrarily set.
由于排序标准九优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则,因此能够有效提高数据对象的验证速度。Since the sorting criterion 9 firstly verifies the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short, the verification speed of the data object can be effectively improved.
10)排序标准十10) Sorting criteria ten
排序标准十包括:优先验证第一级子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则。要依据排序标准十对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,首先需要获取各个第一级子验证规则依赖的数据对象属性值的响应时间。The sorting criterion ten includes: the sub-verification rule that preferentially verifies that the response time of the data object attribute value that the first-level sub-verification rule depends on is short. According to the sorting criteria, the execution order of each sub-verification rule included in the verification rule is sorted, and the execution order of the sub-verification rules is obtained. First, the response time of the data object attribute values that each first-level sub-verification rule depends on is obtained.
排序标准十与排序标准九的理论依据基本一致,二者不同之处仅在于:排序标准九仅优先执行原子验证规则依赖的数据对象属性值的响应时间短的子验证规则,而排序标准十优先执行的子验证规则,既可以是原子验证规则,还可以是复合验证规则。The sorting standard ten is basically consistent with the theoretical basis of the sorting criterion. The difference between the two is that the sorting criterion 9 only preferentially executes the sub-verification rules with short response time of the data object attribute values that the atomic verification rule depends on, and the sorting criterion is ten. The sub-verification rules that are executed can be either atomic verification rules or compound verification rules.
相应的,与排序标准十对应的所述停止验证条件,是根据所述第一级子验证规则之间的逻辑关系确定的;具体包括:若所述第一级子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;若所述第一级子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。Correspondingly, the stop verification condition corresponding to the sorting criterion ten is determined according to the logical relationship between the first level sub-verification rules; specifically: if the logical relationship between the first level sub-verification rules For the relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule; if the logical relationship between the first-level sub-validation rules is or a relationship, the stop verification condition is The data object to be verified satisfies the sub-verification rule.
请参考图5,其为本申请的基于规则的数据对象验证方法实施例D中步骤S103的具体流程图。具体地,以排序标准十对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:Please refer to FIG. 5 , which is a specific flowchart of step S103 in Embodiment D of the rule-based data object verification method of the present application. Specifically, the order of execution of each sub-verification rule included in the verification rule is sorted by the sorting criterion, and the execution order of the sub-verification rules is obtained, including:
步骤S501:解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系。Step S501: Parse the verification rule to obtain a logical relationship between the first level sub-verification rules.
该步骤与排序标准二中的对应步骤是相同的,此处不再赘述,相关说明详 见排序标准二中的对应部分。This step is the same as the corresponding step in the sorting standard 2, and will not be described here. See the corresponding part of Sorting Standard 2.
步骤S503:以所述第一级子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Step S503: Sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules.
需要注意的是,若一个第一级子验证规则为复合验证规则,则该第一级子验证规则依赖的数据对象属性值的响应时间为:该第一级子验证规则包括的各个子验证规则依赖的数据对象属性值的响应时间的最大值。It should be noted that if a first-level sub-verification rule is a composite verification rule, the response time of the data object attribute value that the first-level sub-verification rule depends on is: each sub-validation rule included in the first-level sub-verification rule. The maximum response time of the dependent data object property value.
相对于排序标准九的数据对象验证速度而言,由于排序标准十优先执行所有第一级子验证规则依赖的数据对象属性值的响应时间短的子验证规则,因此排序标准十较排序标准九的数据对象验证速度更快。然而,要采用排序标准十获得子验证规则的执行顺序,需要预先计算第一级复合验证规则依赖的数据对象属性值的响应时间,因此,排序标准十较排序标准九对应的预先计算量更大。Compared with the data object verification speed of the sorting standard nine, since the sorting criterion ten performs the sub-verification rules with short response time of the data object attribute values that all the first-level sub-verification rules depend on, the sorting criterion is ten compared to the sorting standard nine Data object validation is faster. However, to obtain the execution order of the sub-verification rules by using the sorting criterion ten, it is necessary to calculate in advance the response time of the data object attribute values that the first-level compound verification rule depends on, and therefore, the sorting standard ten is larger than the pre-calculation amount corresponding to the sorting standard nine. .
11)排序标准十一11) Sorting criteria XI
排序标准十一包括:若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则。排序标准十一实质为排序标准一和排序标准五的结合,因此能够对所有子验证规则进行全面的排序。The sorting criterion 11 includes: if the logical relationship between the sub-verification rules is a relationship, the sub-verification rules corresponding to the verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logic between the sub-verification rules If the relationship is or relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed. The sorting criterion eleven is essentially a combination of the sorting standard one and the sorting standard five, so that all the sub-verifying rules can be comprehensively sorted.
相应的,与排序标准十一对应的停止验证条件,是根据所述子验证规则之间的逻辑关系确定的。具体包括:若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。Correspondingly, the stop verification condition corresponding to the sorting criterion eleven is determined according to the logical relationship between the sub-verification rules. Specifically, if the logical relationship between the sub-verification rules is a relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule; if the logical relationship between the sub-validation rules For the relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
具体地,依据排序标准十一对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:1)解析所述验证规则,构造规则树;所述规则树的根节点和中间节点为逻辑关系,叶节点为所述子验证规则,所述根节点或中间节点的子节点为与所述根节点或中间节点的逻辑关系相关的所述子验证规则或下一级中间节点;2)自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。 Specifically, the execution order of the sub-verification rules included in the verification rule is sorted according to the sorting criterion eleven, and the execution order of the sub-verification rules is obtained, including: 1) parsing the verification rule, constructing a rule tree; The root node and the intermediate node of the rule tree are logical relationships, the leaf node is the sub-verification rule, and the child node of the root node or the intermediate node is the sub-verification related to the logical relationship of the root node or the intermediate node a rule or a lower-level intermediate node; 2) starting from the root node of the rule tree, stepping down the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node Sort and get the execution order of the sub-verification rules.
在本实施例中,所述自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,包括:1)将所述根节点作为当前节点;2)判断所述当前节点的逻辑关系是否为与关系;若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;若所述当前节点的逻辑关系为或关系,则以所述原子验证规则对应的验证通过率的降序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;3)判断所述当前节点的子节点是否包括中间节点;若是,则逐个将所述当前节点的子节点是中间节点的子节点作为所述当前节点,并返回所述判断所述当前节点的逻辑关系是否为与关系的步骤,对所述规则树的每个中间节点下的原子验证规则的执行顺序进行排序。In this embodiment, starting from the root node of the rule tree, sorting the execution order of the sub-verification rules step by step according to the sorting criterion and the logical relationship of the root node or the intermediate node Obtaining the execution order of the sub-verification rules, including: 1) determining the root node as the current node; 2) determining whether the logical relationship of the current node is a relationship; if so, verifying by the atom verification rule Rate ascending mode, sorting the execution order of each atomic verification rule under the current node; if the logical relationship of the current node is or a relationship, the descending order of the verification pass rate corresponding to the atomic verification rule is Sorting the execution order of each atomic verification rule under the current node; 3) determining whether the child node of the current node includes an intermediate node; if so, the child node of the current node is a child node of the intermediate node one by one As the current node, and returning to the step of determining whether the logical relationship of the current node is a relationship, for the rule tree Validation rules execution order of atoms in the intermediate nodes are sorted.
由于排序标准十一实质为排序标准一和排序标准五的结合,因此相同之处此处不再赘述,相关说明详见排序标准一和排序标准五中的对应部分。Since the sorting standard eleven is essentially a combination of the sorting standard one and the sorting standard five, the same points are not repeated here, and the related descriptions are detailed in the corresponding parts of the sorting standard one and the sorting standard five.
上述排序标准一至十一仅为本实施例中可选的部分具体标准,在实际应用中,可以结合各种影响数据验证速度的因素,选择其中一种或几种因素进行组合,合理地设置预设的排序标准。不同因素的组合能够产生很多种具体的排序标准,这些具体的排序标准都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。The above-mentioned sorting standards one to eleven are only some of the specific standards that are optional in the embodiment. In practical applications, various factors affecting the data verification speed can be combined, one or several factors are selected for combination, and the pre-setting is reasonably set. The sorting criteria set. The combination of different factors can produce a variety of specific ordering criteria, and these specific sorting standards are only changes of the specific embodiments, and do not deviate from the core of the present application, and therefore are within the protection scope of the present application.
此外,在上述排序标准一至十一中,子验证规则对应的验证通过率也可以通过很多种不同的具体计算方式获取。下面列举本实施例中可选的部分具体计算方式。In addition, in the above-mentioned sorting criteria 1 to 11, the verification pass rate corresponding to the sub-verification rule can also be obtained by a plurality of different specific calculation methods. The following part of the specific calculation method optional in the embodiment is listed below.
1)方式一1) Method 1
请参考图6,其为本申请的基于规则的数据对象验证方法实施例A的计算子验证规则对应的验证通过率的具体流程图。采用方式一,计算子验证规则对应的验证通过率包括如下步骤:Please refer to FIG. 6 , which is a specific flowchart of the verification pass rate corresponding to the calculation sub-verification rule in the method A of the rule-based data object verification method of the present application. In the first method, the verification pass rate corresponding to the sub-verification rule includes the following steps:
步骤S601:获取可应用所述子验证规则的数据对象。Step S601: Acquire a data object to which the sub-verification rule can be applied.
本申请实施例所述的子验证规则对应的验证通过率,是指预存的可应用子验证规则的数据对象中,能够通过子验证规则的数据对象比例。因此,要计算子验证规则对应的验证通过率,首先需要获取可应用子验证规则的数据对象。The verification pass rate corresponding to the sub-verification rule described in the embodiment of the present application refers to the proportion of the data object that can pass the sub-verification rule among the data objects of the pre-stored applicable sub-verification rule. Therefore, to calculate the verification pass rate corresponding to the sub-verification rule, it is first necessary to obtain a data object to which the sub-verification rule can be applied.
具体地,所述可应用所述子验证规则的数据对象包括可应用所述子验证规 则的所有数据对象,或者从可应用所述子验证规则的所有数据对象中抽样选取出的预设抽样比例的部分数据对象。Specifically, the data object to which the sub-verification rule is applicable includes an applicable sub-verification rule Then, all data objects, or partial data objects of a preset sampling ratio selected from all data objects to which the sub-verification rules can be applied.
若所述可应用子验证规则的数据对象包括可应用子验证规则的所有数据对象,则需要预先计算所有数据对象中通过子验证规则的数据对象数量。可见,选择所有数据对象进行计算将导致较大的离线计算量。作为一个可选的优化方案,在计算验证通过率时不依据所有数据对象计算子验证规则的验证通过率,而是从所有数据对象中抽样选取出预设抽样比例的部分数据对象,例如,随机取出其中5%的数据对象计算子验证规则的验证通过率。在实际应用中,可根据具体的应用需求,确定所述可应用子验证规则的数据对象中所包括的数据对象。If the data object of the applicable sub-validation rule includes all data objects to which the sub-verification rule can be applied, the number of data objects passing through the sub-validation rule in all data objects needs to be calculated in advance. As you can see, selecting all data objects for calculation will result in a larger amount of offline calculations. As an optional optimization scheme, when verifying the pass rate, the verification pass rate of the sub-verification rule is not calculated according to all the data objects, but a partial data object of a preset sampling ratio is sampled from all data objects, for example, random. Take out 5% of the data objects to calculate the verification pass rate of the sub-verification rules. In an actual application, the data object included in the data object of the applicable sub-verification rule may be determined according to a specific application requirement.
步骤S602:遍历各个所述可应用所述子验证规则的数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值。Step S602: Traversing the data objects to which the sub-verification rules are applicable, and acquiring data object attribute values that the sub-verification rules depend on from the currently verified data objects.
获取到可应用子验证规则的数据对象后,逐个针对其中的每一个数据对象,应用子验证规则对各个数据对象进行规则验证,从而获取能够通过子验证规则的数据对象数量。具体地,在对一个数据对象进行规则验证时,首先需要获取该数据对象中子验证规则依赖的数据对象属性值。After obtaining the data object to which the sub-verification rule can be applied, the sub-verification rules are applied to each data object for each of the data objects, and the data objects that can pass the sub-verification rule are obtained. Specifically, when performing rule verification on a data object, it is first necessary to obtain a data object attribute value that the sub-validation rule depends on in the data object.
步骤S603:判断所述数据对象属性值是否使得所述子验证规则成立。Step S603: Determine whether the data object attribute value makes the sub-verification rule establish.
步骤S604:若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一。Step S604: If the result of the above determination is yes, the number of verification passes corresponding to the sub-verification rule is increased by one.
在获取到一个数据对象中子验证规则依赖的数据对象属性值后,就可以应用子验证规则判断该数据对象属性值是否使得子验证规则成立,如果步骤S603的判断结果为是,则将子验证规则对应的验证通过次数累计加一。After obtaining the data object attribute value that the sub-verification rule depends on in the data object, the sub-verification rule may be applied to determine whether the data object attribute value makes the sub-verification rule establish, and if the judgment result in step S603 is yes, the sub-verification is performed. The number of verification passes corresponding to the rule is increased by one.
步骤S605:当遍历完所有所述可应用所述子验证规则的数据对象后,将累计的验证通过次数与所述可应用所述子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。Step S605: After traversing all the data objects to which the sub-verification rules are applicable, the ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rules are applicable is used as the sub-verification rule. Corresponding verification pass rate.
当针对可应用子验证规则的数据对象中的每一个数据对象,应用子验证规则对各个数据对象进行规则验证后,获取到累计的验证通过次数,将累计的验证通过次数与可应用子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。When each of the data objects in the data object to which the sub-verification rule is applicable is applied, the sub-verification rule is used to perform rule verification on each data object, and the cumulative number of verification passes is obtained, and the cumulative number of verification passes and the applicable sub-validation rule are obtained. The ratio of the number of data objects is used as the verification pass rate corresponding to the sub-verification rule.
2)方式二2) Method 2
在上述方式一中,若可应用子验证规则的数据对象包括从可应用子验证规 则的所有数据对象中抽样选取出的预设抽样比例的部分数据对象,则节省了大量离线的计算,然而却带来计算结果存在误差的问题。In the above manner 1, if the data object to which the sub-verification rule can be applied includes the sub-authentication rule from the applicable sub-verification Then, part of the data objects of the preset sampling ratios selected by all the data objects saves a lot of offline calculations, but brings about the error of the calculation results.
方式二的基本思想是:为克服依据抽样数据对象计算获得的验证通过率存在的误差问题,将依据抽样数据对象计算获得的多次已知验证通过率的加权平均值,作为子验证规则的本次验证通过率。例如,每天依据抽样数据对象计算获得当天的验证通过率,得到一个预设次数的验证通过率序列,将验证通过率序列中的已知验证通过率的加权平均值,作为子验证规则的本次验证通过率。The basic idea of the second method is: to overcome the error problem of the verification pass rate obtained by calculating the sampled data object, the weighted average of the multiple known verification pass rates calculated according to the sampled data object is used as the sub-verification rule Pass verification pass rate. For example, the daily verification pass rate is calculated according to the sampled data object, and a predetermined number of verification pass rate sequences are obtained, and the weighted average of the known verification pass rates in the pass rate sequence is verified as the sub-verification rule. Verify the pass rate.
请参考图7,其为本申请的基于规则的数据对象验证方法实施例B的计算子验证规则对应的验证通过率的具体流程图。采用方式二,计算子验证规则对应的验证通过率包括如下步骤:Please refer to FIG. 7 , which is a specific flowchart of the verification pass rate corresponding to the calculation sub-verification rule in the method B of the rule-based data object verification method of the present application. In the second method, the verification pass rate corresponding to the sub-verification rule includes the following steps:
步骤S701:获取预设次数的所述子验证规则对应的抽样数据验证通过率。Step S701: Acquire a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times.
本申请实施例所述的子验证规则对应的抽样数据验证通过率,是指依据抽样的数据对象计算获取的子验证规则对应的验证通过率。The sampling data verification pass rate corresponding to the sub-verification rule described in the embodiment of the present application refers to the verification pass rate corresponding to the obtained sub-verification rule calculated according to the sampled data object.
请参考图8,其为本申请的基于规则的数据对象验证方法实施例B的计算子验证规则对应的抽样数据验证通过率的具体流程图。具体地,子验证规则对应的抽样数据验证通过率采用如下步骤生成:Please refer to FIG. 8 , which is a specific flowchart of the sampling data verification pass rate corresponding to the calculation sub-verification rule of the embodiment B of the rule-based data object verification method of the present application. Specifically, the sampling data verification pass rate corresponding to the sub-verification rule is generated by the following steps:
步骤S801:从可应用所述子验证规则的所有数据对象中抽样选取出预设抽样比例的部分数据对象。Step S801: sampling a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule is applicable.
步骤S802:遍历各个所述预设抽样比例的部分数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值。Step S802: traverse the partial data objects of each of the preset sampling ratios, and obtain the data object attribute values that the sub-verification rules depend on from the currently verified data objects.
步骤S803:判断所述数据对象属性值是否使得所述子验证规则成立。Step S803: Determine whether the data object attribute value makes the sub-verification rule establish.
步骤S804:若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一。Step S804: If the result of the above determination is YES, the number of verification passes corresponding to the sub-verification rule is increased by one.
步骤S805:当遍历完所有所述预设抽样比例的部分数据对象后,将累计的验证通过次数与所述预设抽样比例的部分数据对象的数量的比值作为所述子验证规则对应的验证通过率。Step S805: After traversing all the partial data objects of the preset sampling ratio, the ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification corresponding to the sub-verification rule. rate.
步骤S801至步骤S805与方式一中优化实施方式,即:计算验证通过率所依据的数据对象为从可应用子验证规则的所有数据对象中抽样选取出的预设抽样比例的部分数据对象,其中步骤S802至步骤S805与方式一中的步骤S602至步骤S605一一对应,相同之处此处不再赘述,相关说明详见方式一中的实施例 部分。Step S801 to step S805 and the optimized embodiment in the first mode, that is, the data object on which the verification pass rate is calculated is a partial data object of a preset sampling ratio selected from all data objects of the applicable sub-verification rule, wherein Steps S802 to S805 are in one-to-one correspondence with steps S602 to S605 in the first mode, and the same portions are not described herein again. For details, refer to the embodiment in the first method. section.
步骤S703:根据为所述子验证规则对应的各次抽样数据验证通过率分别预设的权重,计算所述各次抽样数据验证通过率的加权平均值。Step S703: Calculate a weighted average of the verification pass rates of the subsampled data according to the weights respectively determined by the verification of the pass rates for the subsample data corresponding to the sub-verification rules.
需要注意的是,在设置各次抽样数据验证通过率所占的权重时,一般情况,近期抽样数据验证通过率对本次计算结果的影响更大一些,因此可以对近期抽样数据验证通过率给予较大的权重,对较早期的抽样数据验证通过率给予较小的权重。如果不同时间的抽样数据验证通过率的影响差异相对较小,可以简单化处理,即取相同权重。在本实施例中,为了简化说明问题,取相同权重。It should be noted that when setting the weight of each sampled data verification pass rate, in general, the recent sampling data verification pass rate has a greater impact on the current calculation result, so it can be given to the recent sampling data verification pass rate. Larger weights give less weight to the earlier sample data validation pass rate. If the difference in the effect of the sampling data verification pass rate at different times is relatively small, it can be simplified, that is, the same weight is taken. In the present embodiment, in order to simplify the explanation, the same weight is taken.
步骤S705:将计算获取的加权平均值作为所述子验证规则对应的验证通过率。Step S705: Calculate the obtained weighted average value as the verification pass rate corresponding to the sub-verification rule.
通过方式二计算子验证规则对应的验证通过率,一方面,由于每次离线计算验证通过率所依据的数据对象是抽样的数据对象,所以数据对象的数量不会很大,因此减少了离线资源消耗;另一方面,由于每次计算依据的都是抽样数据对象,然后再通过移动加权平均动态预测本次验证通过率,因此使得子验证规则对应的验证通过率能够不断得到更新及修正,从而使得验证通过率符合真实的变化趋势。总之,应用方式二计算子验证规则对应的验证通过率,既能够降低验证通过率的计算成本,又能够兼顾准确性和动态的趋势变化。The method 2 calculates the verification pass rate corresponding to the sub-verification rule. On the one hand, since the data object on which the pass-through rate is verified by each offline calculation is a sampled data object, the number of data objects is not large, thereby reducing offline resources. Consumption; on the other hand, since each calculation is based on the sampled data object, and then the current pass rate is dynamically predicted by the moving weighted average, the verification pass rate corresponding to the sub-verification rule can be continuously updated and corrected, thereby Make the verification pass rate consistent with the real trend. In summary, the application method 2 calculates the verification pass rate corresponding to the sub-verification rule, which can reduce the calculation cost of the verification pass rate, and can also take into account the accuracy and dynamic trend change.
3)方式三3) Method 3
方式一、二的计算方法都是事先离线并计算子验证规则的验证通过率,二者均导致会消耗一定的离线计算资源。为克服方式一、二存在的缺点,采用方式三计算子验证规则的验证通过率。The calculation methods of modes one and two are all offline and calculate the verification pass rate of the sub-verification rules, both of which result in consumption of certain offline computing resources. In order to overcome the shortcomings of the first and second modes, the verification pass rate of the sub-verification rule is calculated by using the third method.
方式三的基本思想是:实时对新增的数据对象进行验证,累计预设时间间隔范围内新增的数据对象数量和通过验证的新增数据对象数量,并在该时间间隔范围结束时,根据实时累计的验证的数据对象数量及通过验证的数据对象数量,计算子验证规则在该时间间隔范围内对应的验证通过率。The basic idea of the third method is: verifying the newly added data object in real time, accumulating the number of newly added data objects within the preset time interval and the number of newly added data objects that have passed the verification, and at the end of the time interval range, according to The number of verified data objects in real time and the number of validated data objects, and the corresponding verification pass rate of the sub-verification rules within the time interval.
请参考图9,其为本申请的基于规则的数据对象验证方法实施例C的计算子验证规则对应的验证通过率的具体流程图。采用方式三,计算子验证规则对应的验证通过率采用如下步骤计算获取:Please refer to FIG. 9 , which is a specific flowchart of the verification pass rate corresponding to the calculation sub-verification rule in the method C of the rule-based data object verification method of the present application. In the third mode, the verification pass rate corresponding to the sub-verification rule is calculated and obtained by the following steps:
步骤S901:获取预设次数的所述子验证规则在预设时间间隔范围内对应的实时验证通过率。 Step S901: Acquire a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval.
为实现方式三的基本思想,首先需要预先设定两个参数:1)预设时间间隔范围,对可应用子验证规则的、在该时间间隔范围内新增的每一个数据对象,当新增数据对象时对该数据对象进行实时验证,并累计该时间间隔范围内验证的数据对象数量及通过验证的数据对象数量;2)预设次数,当预设次数为1时,子验证规则对应的验证通过率为:子验证规则在预设时间间隔范围内对应的实时验证通过率,当预设次数大于1时,子验证规则对应的验证通过率为:每一次子验证规则在预设时间间隔范围内对应的实时验证通过率的加权平均值。To implement the basic idea of the third method, firstly, two parameters need to be preset: 1) a preset time interval range, for each data object that is added within the time interval to which the sub-verification rule can be applied, when newly added The data object is verified in real time, and the number of data objects verified in the time interval and the number of data objects verified by the time interval are accumulated; 2) the preset number of times, when the preset number of times is 1, the sub-verification rule corresponds The verification pass rate is: the real-time verification pass rate of the sub-verification rule within the preset time interval. When the preset number of times is greater than 1, the verification pass rate corresponding to the sub-verification rule is: each sub-validation rule is at the preset time interval. A weighted average of the corresponding real-time verification pass rates within the range.
例如,将预设时间间隔范围设置为每天,将预设次数设置为5次,则方式三计算获得的子验证规则对应的验证通过率为:过去5天中每天的子验证规则对应的实时验证通过率的加权平均值。For example, if the preset time interval range is set to be daily, and the preset number of times is set to 5 times, the verification pass rate corresponding to the sub-verification rule obtained by the mode 3 calculation is: real-time verification corresponding to the daily sub-verification rule in the past 5 days. The weighted average of the pass rates.
请参考图10,其为本申请的基于规则的数据对象验证方法实施例C的计算子验证规则在预设时间间隔范围内对应的实时验证通过率的具体流程图。具体地,所述子验证规则在预设时间间隔范围内对应的实时验证通过率采用如下步骤生成:Please refer to FIG. 10 , which is a specific flowchart of the real-time verification pass rate of the calculation sub-verification rule in the preset time interval range in the method C of the rule-based data object verification method of the present application. Specifically, the corresponding real-time verification pass rate of the sub-verification rule in the preset time interval is generated by the following steps:
步骤S1001:获取预先生成的所述子验证规则在所述预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数。Step S1001: Acquire a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule in the preset time interval range.
请参考图11,其为本申请的基于规则的数据对象验证方法实施例C的计算子验证规则在预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数的具体流程图。具体地,所述实时验证通过次数和实时验证运行次数采用如下步骤生成:Please refer to FIG. 11 , which is a specific flowchart of the real-time verification pass times and the real-time verification run times of the calculation sub-verification rules in the preset time interval of the embodiment C of the rule-based data object verification method of the present application. Specifically, the real-time verification pass times and the real-time verification run times are generated by the following steps:
步骤S1101:当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,判断新增的数据对象是否满足所述子验证规则。Step S1101: When a data object to which the sub-verification rule can be applied is added within the preset time interval, it is determined whether the newly added data object satisfies the sub-verification rule.
步骤S1103:若上述判断结果为是,则将所述子验证规则在所述预设时间间隔范围内的实时验证通过次数累计加一。Step S1103: If the result of the above determination is yes, the real-time verification pass times of the sub-verification rules in the preset time interval range are cumulatively increased by one.
步骤S1105:将所述子验证规则在所述预设时间间隔范围内的实时验证运行次数累计加一。Step S1105: Accumulate the number of real-time verification runs of the sub-verification rule within the preset time interval by one.
通过步骤S1101至步骤S1105,能够实现当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,实时累计实时验证通过次数和实时验证运行次数。Through the step S1101 to the step S1105, when a data object to which the sub-verification rule can be applied is added within the preset time interval, the real-time verification pass times and the real-time verification run times are accumulated in real time.
步骤S1003:将所述实时验证通过次数与所述实时验证运行次数的比值作为 所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。Step S1003: taking the ratio of the number of real-time verification passes to the number of real-time verification runs as The sub-verification rule corresponds to a real-time verification pass rate within the preset time interval.
通过步骤S1001和步骤S1003,能够实现根据实时验证通过次数与实时验证运行次数的比值,计算获取所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。Through the steps S1001 and S1003, the ratio of the real-time verification pass times to the real-time verification run times can be calculated, and the real-time verification pass rate corresponding to the sub-verification rules in the preset time interval range is calculated.
步骤S903:根据为各次实时验证通过率分别预设的权重,计算所述各次实时验证通过率的加权平均值。Step S903: Calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate.
步骤S905:将计算获取的加权平均值作为所述子验证规则对应的验证通过率。Step S905: Calculate the obtained weighted average value as the verification pass rate corresponding to the sub-verification rule.
需要注意的是,在设置各次实时验证通过率所占的权重时,一般情况,近期验证通过率对本次计算结果的影响更大一些,因此可以对近期验证通过率给予较大的权重,对较早期的验证通过率给予较小的权重。如果不同时间的验证通过率的影响差异相对较小,可以简单化处理,即取相同权重。在本实施例中,为了简化说明问题,取相同权重。It should be noted that when setting the weight of each real-time verification pass rate, in general, the recent verification pass rate has a greater impact on the calculation result, so it can give greater weight to the recent verification pass rate. Give less weight to earlier verification pass rates. If the difference in the verification pass rate at different times is relatively small, it can be simplified, that is, the same weight is taken. In the present embodiment, in order to simplify the explanation, the same weight is taken.
方式三的优点是完全不需要预先的大量离线计算,因而能够节省离线资源。在实际应用中,可以根据具体的应用需求,选取上述方式一至方式三的任意一种方法,计算子验证规则对应的验证通过率。The advantage of the third method is that a large amount of offline calculation is not required in advance, so that offline resources can be saved. In an actual application, any one of the foregoing methods 1 to 3 may be selected according to specific application requirements, and the verification pass rate corresponding to the sub-verification rule is calculated.
在实际应用中,当预设条件成立时,计算验证规则包括的各个子验证规则的验证通过率。具体地,所述预设条件,采用如下条件:当前时间与上次计算各个子验证规则的验证通过率的时间间隔大于预设的时间间隔。通常,可以将预设的时间间隔设置为天或周,即每天或每周更新一次各个子验证规则的验证通过率。In an actual application, when the preset condition is established, the verification pass rate of each sub-verification rule included in the verification rule is calculated. Specifically, the preset condition adopts the condition that the current time and the time interval of verifying the verification pass rate of each sub-verification rule are greater than a preset time interval. In general, the preset time interval can be set to days or weeks, that is, the verification pass rate of each sub-verification rule is updated daily or weekly.
步骤S105:按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则。Step S105: sequentially determining, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or all sub-executions are performed. Verify the rules.
通过步骤S103,以预设的排序标准对验证规则包括的各个子验证规则的执行顺序进行排序,获得子验证规则的执行顺序后,就可以按照获得的子验证规则的执行顺序,依次判断待验证数据对象是否满足子验证规则,直至达到预设的与排序标准对应的停止验证条件为止或执行完所有子验证规则。In step S103, the execution order of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and after the execution order of the sub-verification rules is obtained, the execution order of the obtained sub-verification rules may be sequentially determined to be verified. Whether the data object satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting standard is reached or all sub-verification rules are executed.
由于本申请实施例所述的排序标准,是指使得优先执行能够快速确定验证结果的子验证规则的排序标准,因此不同的排序标准对应不同的停止验证条件。 实质上,对于任何一个复合验证规则而言,如果其包括的第一级子验证规则之间的逻辑关系为与,则该复合验证规则的停止验证条件为:只要其中一个第一级子验证规则的验证结果为假,则该复合验证规则的验证结果也为假;如果其包括的第一级子验证规则之间的逻辑关系为或,则该复合验证规则的停止验证条件为:只要其中一个第一级子验证规则的验证结果为真,则该复合验证规则的验证结果也为真。The sorting standard described in the embodiment of the present application refers to a sorting criterion that enables priority execution of a sub-verification rule capable of quickly determining a verification result, and thus different sorting standards correspond to different stopping verification conditions. In essence, for any composite verification rule, if the logical relationship between the first-level sub-validation rules included is the same, the stop verification condition of the composite verification rule is as long as one of the first-level sub-validation rules If the verification result is false, the verification result of the composite verification rule is also false; if the logical relationship between the first-level sub-validation rules included is OR, the stop verification condition of the composite verification rule is: as long as one of them If the verification result of the first-level sub-verification rule is true, the verification result of the composite verification rule is also true.
上述对各种排序标准进行详细说明时,已经给出了各个排序标准对应不同的停止验证条件,此处不再赘述,相关说明详见有关实施例的说明。When the above-mentioned various sorting standards are described in detail, different stopping verification conditions corresponding to the respective sorting standards have been given, and details are not described herein again. For details, refer to the description of the related embodiments.
如果按照获得的子验证规则的执行顺序,依次判断待验证数据对象是否满足子验证规则,始终没有达到预设的与排序标准对应的停止验证条件,则只有当执行完所有子验证规则后,才能够根据每一个子验证规则的验证结果以及各个子验证规则之间的逻辑关系,最终判定待验证数据对象是否通过验证规则。If, according to the execution order of the obtained sub-verification rules, it is determined in turn whether the data object to be verified satisfies the sub-verification rule, and the preset stop verification condition corresponding to the sorting criterion is not reached, only after all the sub-verification rules are executed According to the verification result of each sub-verification rule and the logical relationship between each sub-validation rule, it is finally determined whether the data object to be verified passes the verification rule.
步骤S107:根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。Step S107: Calculate the verification result of acquiring the data object to be verified according to the logical relationship between the foregoing judgment result and the sub-verification rule.
执行步骤S105时,如果达到预设的与排序标准对应的停止验证条件或执行完所有子验证规则,则根据上述判断结果和子验证规则之间的逻辑关系,可以最终判定待验证数据对象是否通过验证规则,获取待验证数据对象的验证结果。When the step S105 is executed, if the preset stop verification condition corresponding to the sorting criterion is reached or all the sub-verification rules are executed, according to the logical relationship between the judgment result and the sub-verification rule, whether the data object to be verified passes the verification may be finally determined. Rule, obtain the verification result of the data object to be verified.
具体地,所述根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果,采用如下规则之一:1)若所述判断结果为否并且所述逻辑关系为与关系,则所述验证结果为所述待验证数据对象不符合验证规则;2)若所述判断结果为是并且所述逻辑关系为或关系,则所述验证结果为所述待验证数据对象符合验证规则。Specifically, the calculating, according to the logical relationship between the foregoing judgment result and the sub-verification rule, the verification result of acquiring the data object to be verified, adopting one of the following rules: 1) if the judgment result is no and If the logical relationship is a relationship, the verification result is that the data object to be verified does not meet the verification rule; 2) if the determination result is yes and the logical relationship is or relationship, the verification result is The data object to be verified complies with the validation rules.
在上述的实施例中,提供了一种基于规则的数据对象验证方法,与之相对应的,本申请还提供一种基于规则的数据对象验证装置。该装置是与上述方法的实施例相对应。In the above embodiment, a rule-based data object verification method is provided. Correspondingly, the present application further provides a rule-based data object verification apparatus. The device corresponds to an embodiment of the above method.
请参看图12,其为本申请的基于规则的数据对象验证装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。Please refer to FIG. 12, which is a schematic diagram of an embodiment of a rule-based data object verification apparatus of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative.
本实施例的一种基于规则的数据对象验证装置,包括:A rule-based data object verification apparatus of this embodiment includes:
获取单元101,用于获取待验证数据对象及其对应的验证规则; The obtaining unit 101 is configured to obtain a data object to be verified and a corresponding verification rule thereof;
排序单元103,用于以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;The sorting unit 103 is configured to sort the execution order of each sub-verification rule included in the verification rule by using a preset sorting criterion, and obtain an execution order of the sub-verification rule; the sorting standard refers to enabling quick determination a sorting criterion in which the sub-verification rules of the verification result are preferentially executed;
验证单元105,用于按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;The verification unit 105 is configured to sequentially determine, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or executed Complete all sub-verification rules;
计算单元107,用于根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。The calculating unit 107 is configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule refers to a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系; a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为与关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的验证通过率的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的第一综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
相应的,与所述排序标准对应的所述停止验证条件包括: Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为与关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的第一综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the first comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining a sub-verification rule Order of execution;
所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;And if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的降序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in a descending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子 验证规则对应的验证通过率高的所述子验证规则;If the logical relationship between the first level sub-verification rules is or relationship, the first level is preferentially executed. The sub-verification rule having a high verification pass rate corresponding to the verification rule;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为或关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的验证通过率的降序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is or is related, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的第二综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归 一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second integrated priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is the response time of the data object attribute value dependent on the sub-verification rule. A value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is or is related, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为或关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship;
判断是子单元,用于若是,则以所述第一级子验证规则对应的第二综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining the sub-verification rule Order of execution;
所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
W=X*N1+Y*N2W=X*N1+Y*N2
其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is a relationship, the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
具体包括:Specifically include:
若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述 待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is the The data object to be verified does not satisfy the sub-verification rule;
若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,构造规则树;所述规则树的根节点和中间节点为逻辑关系,叶节点为所述子验证规则,所述根节点或中间节点的子节点为与所述根节点或中间节点的逻辑关系相关的所述子验证规则或下一级中间节点;a parsing subunit, configured to parse the verification rule, construct a rule tree; a root node and an intermediate node of the rule tree are logical relationships, a leaf node is the sub-verification rule, and a child node of the root node or an intermediate node is The sub-verification rule or the next-level intermediate node related to the logical relationship of the root node or the intermediate node;
排序子单元,用于自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting subunit, configured to start from a root node of the rule tree, and sequentially sort the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node The order in which sub-verification rules are executed.
可选的,所述排序子单元包括:Optionally, the ordering subunit includes:
设置子单元,用于将所述根节点作为当前节点;Setting a subunit for using the root node as a current node;
第一判断子单元,用于判断所述当前节点的逻辑关系是否为与关系;a first determining subunit, configured to determine whether a logical relationship of the current node is a relationship;
判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;The determining is a subunit, and if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
判断否子单元,用于若所述当前节点的逻辑关系为或关系,则以所述原子验证规则对应的验证通过率的降序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;Determining a non-subunit, wherein, if the logical relationship of the current node is a relationship, the execution order of each atomic verification rule under the current node is performed in a descending manner of the verification pass rate corresponding to the atomic verification rule Sort
第二判断子单元,用于判断所述当前节点的子节点是否包括中间节点;若是,则逐个将所述当前节点的子节点是中间节点的子节点作为所述当前节点,并返回所述判断所述当前节点的逻辑关系是否为与关系的步骤,对所述规则树的每个中间节点下的原子验证规则的执行顺序进行排序。a second determining subunit, configured to determine whether the child node of the current node includes an intermediate node; if yes, the child node of the current node is a child node of the intermediate node as the current node, and returns the judgment Whether the logical relationship of the current node is a step of relationship, and sorting the execution order of the atomic verification rules under each intermediate node of the rule tree.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;Priorityly verifying the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short; the atomic verification rule refers to a verification rule that includes only one comparison relationship;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
具体包括: Specifically include:
若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
排序子单元,用于自第一级子验证规则开始,逐级向下对预定级数的各级子验证规则,按照所述原子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting sub-unit for starting from the first-level sub-verification rule, stepping down the sub-verification rules of the predetermined level of the sub-levels, in accordance with the ascending order of the response time of the data object attribute values of the atomic verification rule, The execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
可选的,所述排序标准包括:Optionally, the sorting criteria include:
优先验证第一级子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;Preferably, the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
相应的,与所述排序标准对应的所述停止验证条件,是根据所述第一级子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules;
具体包括:Specifically include:
若所述第一级子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
若所述第一级子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the first level sub-verification rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
可选的,所述排序单元103包括:Optionally, the sorting unit 103 includes:
解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
排序子单元,用于以所述第一级子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting sub-unit, configured to sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules .
请参看图13,其为本申请的基于规则的数据对象验证装置实施例的具体示意图。可选的,所述装置还包括:Please refer to FIG. 13, which is a specific schematic diagram of an embodiment of a rule-based data object verification apparatus according to the present application. Optionally, the device further includes:
计算验证通过率单元201,用于计算获取所述子验证规则对应的验证通过 率。Calculating the verification pass rate unit 201, configured to calculate and obtain the verification corresponding to the sub-verification rule rate.
可选的,所述计算验证通过率单元201包括:Optionally, the calculating the verification pass rate unit 201 includes:
获取子单元,用于获取可应用所述子验证规则的数据对象;Obtaining a subunit, configured to acquire a data object to which the sub-verification rule can be applied;
遍历子单元,用于遍历各个所述可应用所述子验证规则的数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing the sub-units, traversing each of the data objects to which the sub-verification rules are applicable, and acquiring data object attribute values that the sub-verification rules depend on from the currently verified data objects;
判断子单元,用于判断所述数据对象属性值是否使得所述子验证规则成立;a determining subunit, configured to determine whether the data object attribute value causes the sub-verification rule to be established;
判断是子单元,用于若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;The determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
计算子单元,用于当遍历完所有所述可应用所述子验证规则的数据对象后,将累计的验证通过次数与所述可应用所述子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。a calculating subunit, configured to, when traversing all the data objects to which the sub-verification rule is applicable, a ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule is applicable The verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元201包括:Optionally, the calculating the verification pass rate unit 201 includes:
获取子单元,用于获取预设次数的所述子验证规则对应的抽样数据验证通过率;Obtaining a subunit, configured to obtain a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
计算子单元,用于根据为所述子验证规则对应的各次抽样数据验证通过率分别预设的权重,计算所述各次抽样数据验证通过率的加权平均值;a calculating subunit, configured to calculate a weighted average value of the pass rate of each of the sampled data according to a preset weight of each pass sampling data corresponding to the sub-verification rule;
赋值子单元,用于将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元201还包括:Optionally, the calculating the verification pass rate unit 201 further includes:
生成子单元,用于生成所述子验证规则对应的抽样数据验证通过率;Generating a subunit, configured to generate a sampling data verification pass rate corresponding to the sub-verification rule;
所述生成子单元包括:The generating subunit includes:
抽样子单元,用于从可应用所述子验证规则的所有数据对象中抽样选取出预设抽样比例的部分数据对象;a sampling subunit, configured to sample a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule is applicable;
遍历子单元,用于遍历各个所述预设抽样比例的部分数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing the subunits, traversing the partial data objects of each of the preset sampling ratios, and acquiring the data object attribute values that the sub-verification rules depend on from the currently verified data objects;
判断子单元,用于判断所述数据对象属性值是否使得所述子验证规则成立;a determining subunit, configured to determine whether the data object attribute value causes the sub-verification rule to be established;
判断是子单元,用于若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;The determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
计算子单元,用于当遍历完所有所述预设抽样比例的部分数据对象后,将 累计的验证通过次数与所述预设抽样比例的部分数据对象的数量的比值作为所述子验证规则对应的验证通过率。Calculating a subunit for use after traversing all of the data objects of the preset sampling ratio The ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元201包括:Optionally, the calculating the verification pass rate unit 201 includes:
获取子单元,用于获取预设次数的所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Obtaining a sub-unit, configured to obtain a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
计算子单元,用于根据为各次实时验证通过率分别预设的权重,计算所述各次实时验证通过率的加权平均值;a calculating subunit, configured to calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate;
赋值子单元,用于将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
可选的,所述计算验证通过率单元201还包括:Optionally, the calculating the verification pass rate unit 201 further includes:
生成子单元,用于生成所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Generating a subunit, configured to generate a real-time verification pass rate corresponding to the sub-verification rule within a preset time interval;
所述生成子单元包括:The generating subunit includes:
获取子单元,用于获取预先生成的所述子验证规则在所述预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数;Obtaining a sub-unit, configured to obtain a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule within the preset time interval;
计算子单元,用于将所述实时验证通过次数与所述实时验证运行次数的比值作为所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。a calculation subunit, configured to use a ratio of the number of real-time verification passes to the number of real-time verification runs as a real-time verification pass rate corresponding to the sub-verification rule within the preset time interval.
可选的,所述生成子单元还包括:Optionally, the generating subunit further includes:
第一生成子单元,用于生成所述实时验证通过次数和实时验证运行次数;a first generation subunit, configured to generate the real-time verification pass times and the real-time verification run times;
所述第一生成子单元包括:The first generating subunit includes:
判断子单元,用于当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,判断新增的数据对象是否满足所述子验证规则;a determining subunit, configured to determine whether the newly added data object satisfies the sub-verification rule when a data object to which the sub-verification rule is applicable is added within the preset time interval;
判断是子单元,用于若上述判断结果为是,则将所述子验证规则在所述预设时间间隔范围内的实时验证通过次数累计加一;The determining is a sub-unit, configured to: if the result of the foregoing determination is yes, accumulating the number of real-time verification passes of the sub-verification rule within the preset time interval range by one;
计数子单元,用于将所述子验证规则在所述预设时间间隔范围内的实时验证运行次数累计加一。And a counting subunit, configured to add one of the real-time verification running times of the sub-verification rule within the preset time interval.
本申请还提供了一种基于规则的数据对象验证系统,包括:权利要求32所述的基于规则的数据对象验证装置。The present application also provides a rule-based data object verification system, comprising: the rule-based data object verification apparatus of claim 32.
在上述的实施例中,提供了一种基于规则的数据对象验证方法和对应装置, 本申请还提供一种电子设备。该设备是与上述方法和对应装置的实施例相对应。In the above embodiment, a rule-based data object verification method and corresponding device are provided. The application also provides an electronic device. The device corresponds to the embodiment of the above method and corresponding device.
请参考图14,其为本申请的电子设备实施例的流程图。由于设备实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的设备实施例仅仅是示意性的。Please refer to FIG. 14, which is a flowchart of an embodiment of an electronic device of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative.
本申请还提供了一种电子设备,所述电子设备包括:显示器301;处理器302;以及存储器303,用于存储基于规则的数据对象验证装置,所述基于规则的数据对象验证装置被所述处理器302执行时,包括如下步骤:获取待验证数据对象及其对应的验证规则;以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。The present application also provides an electronic device, including: a display 301; a processor 302; and a memory 303, configured to store a rule-based data object verification device, wherein the rule-based data object verification device is When the processor 302 is executed, the method includes the following steps: acquiring a data object to be verified and a corresponding verification rule thereof; sorting an execution order of each sub-verification rule included in the verification rule by using a preset sorting criterion, and obtaining the sub-verification The order of execution of the rules; the sorting criterion refers to a sorting criterion that enables the sub-verification rules that can quickly determine the verification result to be preferentially executed; and sequentially determines whether the data object to be verified is in accordance with the execution order of the sub-verification rules Satisfying the sub-verification rule until the preset stop verification condition corresponding to the sorting criterion is reached or all sub-verification rules are executed; and the acquisition relationship is calculated according to the logical relationship between the judgment result and the sub-verification rule Describe the verification result of the verification data object.
可选的,所述基于规则的数据对象验证装置包括:Optionally, the rule-based data object verification apparatus includes:
获取单元,用于获取待验证数据对象及其对应的验证规则;An obtaining unit, configured to obtain a data object to be verified and a corresponding verification rule thereof;
排序单元,用于以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得优先执行能够快速确定验证结果的所述子验证规则的排序标准;a sorting unit, configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling the priority execution to be fast Determining an ordering criterion of the sub-verification rules of the verification result;
验证单元,用于按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;a verification unit, configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
计算单元,用于根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。And a calculating unit, configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
本申请实施例所述的电子设备包括个人电脑、PAD、iPad等终端设备,以及移动通讯设备,即:通常所说的手机或者智能手机。总之,本申请实施例所述的电子设备可以是任何能够运行基于验证规则对待验证数据对象进行验证的电子设备。The electronic device according to the embodiment of the present application includes a terminal device such as a personal computer, a PAD, an iPad, and a mobile communication device, that is, a so-called mobile phone or a smart phone. In summary, the electronic device described in this embodiment of the present application may be any electronic device capable of running a verification based on a verification rule to verify a data object.
本申请提供的基于规则的数据对象验证方法、装置、系统以及电子设备,通过以预设的排序标准对待验证数据对象对应的验证规则所包括的各个子验证 规则的执行顺序进行排序,获得子验证规则的执行顺序;并按照子验证规则的执行顺序,依次判断待验证数据对象是否满足子验证规则,直至达到预设的与排序标准对应的停止验证条件为止或执行完所有子验证规则;根据上述判断结果和子验证规则之间的逻辑关系,获取待验证数据对象的验证结果。由于本申请提供的方法优先执行能够快速确定验证结果的子验证规则,因此在概率上极大减少子验证规则的执行数量和执行时间,避免执行所有子验证规则,从而达到提高数据验证速度、降低系统负荷且节约计算资源的效果。The rule-based data object verification method, device, system and electronic device provided by the present application treat each sub-verification included in the verification rule corresponding to the data object by using a preset sorting criterion The execution order of the rules is sorted, and the execution order of the sub-verification rules is obtained; and according to the execution order of the sub-verification rules, it is sequentially determined whether the data object to be verified satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting standard is reached. Or executing all the sub-verification rules; obtaining the verification result of the data object to be verified according to the logical relationship between the above judgment result and the sub-validation rule. Since the method provided by the present application preferentially executes the sub-verification rule capable of quickly determining the verification result, the execution quantity and execution time of the sub-validation rule are greatly reduced in probability, and all sub-verification rules are avoided, thereby improving data verification speed and reducing System load and save the effect of computing resources.
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。The present application is disclosed in the above preferred embodiments, but it is not intended to limit the present application, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. The scope of protection should be based on the scope defined by the claims of the present application.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。1. Computer readable media including both permanent and non-persistent, removable and non-removable media may be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。 2. Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Claims (68)

  1. 一种基于规则的数据对象验证方法,其特征在于,包括:A rule-based data object verification method, comprising:
    获取待验证数据对象及其对应的验证规则;Obtaining the data object to be verified and its corresponding verification rule;
    以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;Sorting the execution order of each sub-verification rule included in the verification rule by a preset sorting criterion to obtain an execution order of the sub-verification rule; the sorting criterion refers to the sub-query enabling the sub-verification result to be quickly determined The sorting criteria that the validation rules are prioritized;
    按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;Determining, according to the execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or all sub-verification rules are executed;
    根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。And obtaining, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
  2. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule refers to a verification rule including only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  3. 根据权利要求2所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 2, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
    自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;Starting from the first level sub-verification rule, it is determined step by step to determine whether the logical relationship between the sub-validation rules of the predetermined level is a relationship;
    若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and the execution order of the sub-verification rules is obtained.
  4. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子 验证规则对应的验证通过率低的所述子验证规则;If the logical relationship between the first level sub-verification rules is a relationship, the first level is preferentially executed. The sub-verification rule having a low verification pass rate corresponding to the verification rule;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  5. 根据权利要求4所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 4, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
    判断所述第一级子验证规则之间的逻辑关系是否为与关系;Determining whether the logical relationship between the first level sub-verification rules is a relationship;
    若是,则以所述第一级子验证规则对应的验证通过率的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the first-level sub-verification rules is sorted in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and the execution order of the sub-verification rules is obtained.
  6. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  7. 根据权利要求6所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 6, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
    自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;Starting from the first level sub-verification rule, it is determined step by step to determine whether the logical relationship between the sub-validation rules of the predetermined level is a relationship;
    若是,则以所述原子验证规则对应的第一综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
    所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归 一化值,N1为验证通过率的权重,N2为响应时间的权重。Wherein, W is the first comprehensive priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a response time of the data object attribute value dependent on the sub-verification rule. A value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  8. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. rule;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  9. 根据权利要求8所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 8, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
    判断所述第一级子验证规则之间的逻辑关系是否为与关系;Determining whether the logical relationship between the first level sub-verification rules is a relationship;
    若是,则以所述第一级子验证规则对应的第一综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the first integrated priority score corresponding to the first-level sub-verification rule, and obtaining an execution order of the sub-verification rules;
    所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  10. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;And if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  11. 根据权利要求10所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行 排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 10, wherein the execution order of each sub-verification rule included in the verification rule is performed by a preset sorting criterion Sorting, obtaining the execution order of the sub-verification rules, including:
    解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
    自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;Starting from the first level sub-verification rule, determining whether the logical relationship between the sub-validation rules of the predetermined level is determined to be a relationship or a relationship;
    若是,则以所述原子验证规则对应的验证通过率的降序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the sub-verification rules is sorted in a descending manner of the verification pass rate corresponding to the atomic verification rule, and the execution order of the sub-verification rules is obtained.
  12. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高的所述子验证规则;If the logical relationship between the first level sub-verification rules is a relationship, the sub-verification rules with high verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  13. 根据权利要求12所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 12, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
    判断所述第一级子验证规则之间的逻辑关系是否为或关系;Determining whether the logical relationship between the first level sub-verification rules is or is a relationship;
    若是,则以所述第一级子验证规则对应的验证通过率的降序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。If yes, the execution order of the first level sub-verification rules is sorted in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and the execution order of the sub-verification rules is obtained.
  14. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is or is related, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  15. 根据权利要求14所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括: The rule-based data object verification method according to claim 14, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
    自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系;Starting from the first level sub-verification rule, determining whether the logical relationship between the sub-validation rules of the predetermined level is determined to be a relationship or a relationship;
    若是,则以所述原子验证规则对应的第二综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
    所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  16. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is or is related, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  17. 根据权利要求16所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 16, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
    判断所述第一级子验证规则之间的逻辑关系是否为或关系;Determining whether the logical relationship between the first level sub-verification rules is or is a relationship;
    若是,则以所述第一级子验证规则对应的第二综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;If yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining an execution order of the sub-verification rules;
    所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。 Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  18. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is a relationship, the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
    具体包括:Specifically include:
    若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
    若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  19. 根据权利要求18所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 18, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,构造规则树;所述规则树的根节点和中间节点为逻辑关系,叶节点为所述子验证规则,所述根节点或中间节点的子节点为与所述根节点或中间节点的逻辑关系相关的所述子验证规则或下一级中间节点;Parsing the verification rule, constructing a rule tree; the root node and the intermediate node of the rule tree are logical relationships, the leaf node is the sub-verification rule, and the child node of the root node or the intermediate node is the root node or The sub-verification rule or the next-level intermediate node related to the logical relationship of the intermediate node;
    自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Starting from the root node of the rule tree, sorting the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node, and obtaining the execution order of the sub-verification rules .
  20. 根据权利要求19所述的基于规则的数据对象验证方法,其特征在于,所述自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 19, wherein the step starts from a root node of the rule tree, and is stepwise according to the sorting criterion and a logical relationship between the root node or an intermediate node. Sorting the execution order of the sub-verification rules downward, and obtaining the execution order of the sub-validation rules, including:
    将所述根节点作为当前节点;Using the root node as a current node;
    判断所述当前节点的逻辑关系是否为与关系;若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序; Determining whether the logical relationship of the current node is a relationship; if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
    若所述当前节点的逻辑关系为或关系,则以所述原子验证规则对应的验证通过率的降序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;If the logical relationship of the current node is a relationship, the execution order of each atomic verification rule under the current node is sorted in a descending manner of the verification pass rate corresponding to the atomic verification rule;
    判断所述当前节点的子节点是否包括中间节点;若是,则逐个将所述当前节点的子节点是中间节点的子节点作为所述当前节点,并返回所述判断所述当前节点的逻辑关系是否为与关系的步骤,对所述规则树的每个中间节点下的原子验证规则的执行顺序进行排序。Determining whether the child node of the current node includes an intermediate node; if yes, using the child node of the current node as a child node of the intermediate node as the current node, and returning to determine whether the logical relationship of the current node is For the step of the relationship, the order of execution of the atomic verification rules under each intermediate node of the rule tree is sorted.
  21. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;Priorityly verifying the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short; the atomic verification rule refers to a verification rule that includes only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
    具体包括:Specifically include:
    若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
    若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  22. 根据权利要求21所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 21, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the sub-validation rules;
    自第一级子验证规则开始,逐级向下对预定级数的各级子验证规则,按照所述原子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。Starting from the first level sub-verification rule, the sub-verification rules for each level of the predetermined number of stages are stepped down, in accordance with the ascending order of the response time of the data object attribute values that the atomic verification rule depends on, and the sub-verification rules are The execution order is sorted to obtain the execution order of the sub-verification rules.
  23. 根据权利要求1所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 1, wherein the sorting criteria comprises:
    优先验证第一级子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则; Preferably, the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
    相应的,与所述排序标准对应的所述停止验证条件,是根据所述第一级子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules;
    具体包括:Specifically include:
    若所述第一级子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
    若所述第一级子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the first level sub-verification rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  24. 根据权利要求23所述的基于规则的数据对象验证方法,其特征在于,所述以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序,包括:The rule-based data object verification method according to claim 23, wherein the order of execution of each sub-verification rule included in the verification rule is sorted by a preset sorting criterion, and the sub-verification rule is obtained. The order of execution, including:
    解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;Parsing the verification rule to obtain a logical relationship between the first level sub-verification rules;
    以所述第一级子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The execution order of the first level sub-verification rules is sorted in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rules depend on, and the execution order of the sub-verification rules is obtained.
  25. 根据权利要求2-20任意一项所述的基于规则的数据对象验证方法,其特征在于,所述子验证规则对应的验证通过率采用如下步骤计算获取:The rule-based data object verification method according to any one of claims 2 to 20, wherein the verification pass rate corresponding to the sub-verification rule is calculated and obtained by the following steps:
    获取可应用所述子验证规则的数据对象;Obtaining a data object to which the sub-verification rule can be applied;
    遍历各个所述可应用所述子验证规则的数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing each of the data objects to which the sub-verification rule is applicable, and acquiring, from the currently verified data object, a data object attribute value that the sub-verification rule depends on;
    判断所述数据对象属性值是否使得所述子验证规则成立;Determining whether the data object attribute value causes the sub-verification rule to be established;
    若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;If the result of the above determination is yes, the number of verification passes corresponding to the sub-verification rule is cumulatively increased by one;
    当遍历完所有所述可应用所述子验证规则的数据对象后,将累计的验证通过次数与所述可应用所述子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。After traversing all the data objects to which the sub-verification rule can be applied, the ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule can be applied is used as the verification corresponding to the sub-verification rule. Passing rate.
  26. 根据权利要求25所述的基于规则的数据对象验证方法,其特征在于,所述可应用所述子验证规则的数据对象包括可应用所述子验证规则的所有数据对象,或者从可应用所述子验证规则的所有数据对象中抽样选取出的预设抽样比例的部分数据对象。The rule-based data object verification method according to claim 25, wherein the data object to which the sub-verification rule is applicable includes all data objects to which the sub-verification rule can be applied, or A partial data object of a preset sampling ratio selected from all data objects of the sub-verification rule.
  27. 根据权利要求2-20任意一项所述的基于规则的数据对象验证方法,其特征在于,所述子验证规则对应的验证通过率采用如下步骤计算获取: The rule-based data object verification method according to any one of claims 2 to 20, wherein the verification pass rate corresponding to the sub-verification rule is calculated and obtained by the following steps:
    获取预设次数的所述子验证规则对应的抽样数据验证通过率;Obtaining a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
    根据为所述子验证规则对应的各次抽样数据验证通过率分别预设的权重,计算所述各次抽样数据验证通过率的加权平均值;Calculating a weighted average value of the verification pass rate of each sampling data according to a preset weight of each sampling data for each sub-sample data corresponding to the sub-validation rule;
    将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The weighted average obtained by the calculation is used as the verification pass rate corresponding to the sub-verification rule.
  28. 根据权利要求27所述的基于规则的数据对象验证方法,其特征在于,所述子验证规则对应的抽样数据验证通过率采用如下步骤生成:The rule-based data object verification method according to claim 27, wherein the sampling data verification pass rate corresponding to the sub-verification rule is generated by the following steps:
    从可应用所述子验证规则的所有数据对象中抽样选取出预设抽样比例的部分数据对象;Extracting a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule can be applied;
    遍历各个所述预设抽样比例的部分数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing a partial data object of each of the preset sampling ratios, and acquiring, from the currently verified data object, a data object attribute value that the sub-verification rule depends on;
    判断所述数据对象属性值是否使得所述子验证规则成立;Determining whether the data object attribute value causes the sub-verification rule to be established;
    若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;If the result of the above determination is yes, the number of verification passes corresponding to the sub-verification rule is cumulatively increased by one;
    当遍历完所有所述预设抽样比例的部分数据对象后,将累计的验证通过次数与所述预设抽样比例的部分数据对象的数量的比值作为所述子验证规则对应的验证通过率。After traversing all the partial data objects of the preset sampling ratio, the ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio is used as the verification pass rate corresponding to the sub-verification rule.
  29. 根据权利要求2-20任意一项所述的基于规则的数据对象验证方法,其特征在于,所述子验证规则对应的验证通过率采用如下步骤计算获取:The rule-based data object verification method according to any one of claims 2 to 20, wherein the verification pass rate corresponding to the sub-verification rule is calculated and obtained by the following steps:
    获取预设次数的所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Obtaining a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
    根据为各次实时验证通过率分别预设的权重,计算所述各次实时验证通过率的加权平均值;Calculating a weighted average of the respective real-time verification pass rates according to weights respectively preset for each real-time verification pass rate;
    将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The weighted average obtained by the calculation is used as the verification pass rate corresponding to the sub-verification rule.
  30. 根据权利要求29所述的基于规则的数据对象验证方法,其特征在于,所述子验证规则在预设时间间隔范围内对应的实时验证通过率采用如下步骤生成:The rule-based data object verification method according to claim 29, wherein the corresponding real-time verification pass rate of the sub-verification rule within a preset time interval is generated by the following steps:
    获取预先生成的所述子验证规则在所述预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数;Acquiring the number of real-time verification passes and the number of real-time verification runs corresponding to the pre-generated sub-verification rules in the preset time interval range;
    将所述实时验证通过次数与所述实时验证运行次数的比值作为所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。 The ratio of the real-time verification pass times to the real-time verification run times is used as a real-time verification pass rate corresponding to the sub-verification rules in the preset time interval range.
  31. 根据权利要求30所述的基于规则的数据对象验证方法,其特征在于,所述实时验证通过次数和实时验证运行次数采用如下步骤生成:The rule-based data object verification method according to claim 30, wherein the real-time verification pass times and the real-time verification run times are generated by the following steps:
    当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,判断新增的数据对象是否满足所述子验证规则;When a data object to which the sub-verification rule can be applied is added within the preset time interval, it is determined whether the newly added data object satisfies the sub-verification rule;
    若上述判断结果为是,则将所述子验证规则在所述预设时间间隔范围内的实时验证通过次数累计加一;If the result of the foregoing determination is yes, the real-time verification pass times of the sub-verification rules in the preset time interval range are cumulatively increased by one;
    将所述子验证规则在所述预设时间间隔范围内的实时验证运行次数累计加一。The number of real-time verification runs of the sub-verification rule within the preset time interval is cumulatively increased by one.
  32. 根据权利要求2-20任意一项所述的基于规则的数据对象验证方法,其特征在于,当预设条件成立时,计算各个子验证规则的验证通过率。The rule-based data object verification method according to any one of claims 2 to 20, characterized in that, when the preset condition is established, the verification pass rate of each sub-verification rule is calculated.
  33. 根据权利要32所述的基于规则的数据对象验证方法,其特征在于,所述预设条件,采用如下条件:The rule-based data object verification method according to claim 32, wherein the preset condition adopts the following conditions:
    当前时间与上次计算各个子验证规则的验证通过率的时间间隔大于预设的时间间隔。The time interval between the current time and the last verification of the verification pass rate of each sub-validation rule is greater than the preset time interval.
  34. 根据权利要求2-24任意一项所述的基于规则的数据对象验证方法,其特征在于,所述根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果,采用如下规则之一:The rule-based data object verification method according to any one of claims 2 to 24, wherein the calculating the acquired data object to be verified according to the logical relationship between the determination result and the sub-verification rule The verification result uses one of the following rules:
    若所述判断结果为否并且所述逻辑关系为与关系,则所述验证结果为所述待验证数据对象不符合验证规则;If the result of the determination is no and the logical relationship is a relationship, the verification result is that the data object to be verified does not meet the verification rule;
    若所述判断结果为是并且所述逻辑关系为或关系,则所述验证结果为所述待验证数据对象符合验证规则。If the result of the determination is yes and the logical relationship is or relationship, the verification result is that the data object to be verified conforms to the verification rule.
  35. 一种基于规则的数据对象验证装置,其特征在于,包括:A rule-based data object verification apparatus, comprising:
    获取单元,用于获取待验证数据对象及其对应的验证规则;An obtaining unit, configured to obtain a data object to be verified and a corresponding verification rule thereof;
    排序单元,用于以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;a sorting unit, configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling quick verification a sorting criterion in which the sub-verification rules of the result are preferentially executed;
    验证单元,用于按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则; a verification unit, configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
    计算单元,用于根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。And a calculating unit, configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
  36. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule refers to a verification rule including only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  37. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 35, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
    判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
    判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
  38. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低的所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification rules with low verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  39. 根据权利要求38所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 38, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
    判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为与关系; a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship;
    判断是子单元,用于若是,则以所述第一级子验证规则对应的验证通过率的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in an ascending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
  40. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the sub-verification rule having a low verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  41. 根据权利要求40所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 40, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
    判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为与关系;The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a relationship;
    判断是子单元,用于若是,则以所述原子验证规则对应的第一综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the first comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
    所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  42. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为与关系,则优先执行所述第一级子验证规则对应的验证通过率低,并且依赖的数据对象属性值的响应时间短的所述子验证规则; If the logical relationship between the first level sub-verification rules is an AND relationship, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is low and the response time of the dependent data object attribute value is short is preferentially performed. Rule
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象不满足所述子验证规则。The data object to be verified does not satisfy the sub-verification rule.
  43. 根据权利要求42所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 42, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
    判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为与关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship;
    判断是子单元,用于若是,则以所述第一级子验证规则对应的第一综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the first comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining a sub-verification rule Order of execution;
    所述第一综合优先级分数采用如下计算公式生成:The first comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第一综合优先级分数,X为所述子验证规则对应的验证通过率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the first integrated priority score, X is a normalized value of the verification pass rate corresponding to the sub-verification rule, and Y is a normalized response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  44. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;And if the logical relationship between the sub-verification rules is or a relationship, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; and the atomic verification rule refers to a verification rule including only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  45. 根据权利要求42所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 42, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
    判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各级子验证规则之间的逻辑关系是否为或关系; The determining subunit is configured to start from the first level sub-verification rule, and determine, step by step, whether the logical relationship between the sub-verification rules of the predetermined level is a or relationship;
    判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的降序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in a descending manner of the verification pass rate corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules.
  46. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高的所述子验证规则;If the logical relationship between the first level sub-verification rules is a relationship, the sub-verification rules with high verification pass rate corresponding to the first-level sub-verification rules are preferentially executed;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  47. 根据权利要求46所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 46, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
    判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为或关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship;
    判断是子单元,用于若是,则以所述第一级子验证规则对应的验证通过率的降序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。The determining is a subunit, and if yes, sorting the execution order of the first level sub-verification rules in a descending manner of the verification pass rate corresponding to the first-level sub-verification rule, and obtaining the execution order of the sub-verification rules .
  48. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-validation rules is or is related, the sub-verification rule having a high verification pass rate corresponding to the atomic verification rule and a short response time of the dependent data object attribute value; the atomic verification A rule is a verification rule that includes only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  49. 根据权利要求48所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 48, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
    判断子单元,用于自第一级子验证规则开始,逐级向下判断预定级数的各 级子验证规则之间的逻辑关系是否为或关系;a judging subunit for starting from the first level sub-verification rule and judging each step of the predetermined number of stages step by step Whether the logical relationship between the level verification rules is or is related;
    判断是子单元,用于若是,则以所述原子验证规则对应的第二综合优先级分数的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a subunit, and if yes, sorting the execution order of the sub-verification rules in an ascending manner of the second comprehensive priority score corresponding to the atomic verification rule, and obtaining an execution order of the sub-verification rules;
    所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second comprehensive priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is a normalization of the response time of the data object attribute value dependent on the sub-verification rule. The value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  50. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    若第一级子验证规则之间的逻辑关系为或关系,则优先执行所述第一级子验证规则对应的验证通过率高,并且依赖的数据对象属性值的响应时间短的所述子验证规则;If the logical relationship between the first level sub-verification rules is or is related, the sub-verification that the verification pass rate corresponding to the first-level sub-verification rule is high and the response time of the dependent data object attribute value is short is preferentially executed. rule;
    相应的,与所述排序标准对应的所述停止验证条件包括:Correspondingly, the stop verification condition corresponding to the sorting criterion includes:
    所述待验证数据对象满足所述子验证规则。The data object to be verified satisfies the sub-verification rule.
  51. 根据权利要求50所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 50, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
    判断子单元,用于判断所述第一级子验证规则之间的逻辑关系是否为或关系;a determining subunit, configured to determine whether a logical relationship between the first level sub-verification rules is a relationship or a relationship;
    判断是子单元,用于若是,则以所述第一级子验证规则对应的第二综合优先级分数的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序;The determining is a sub-unit, and if yes, sorting the execution order of the first-level sub-verification rule in an ascending manner of the second comprehensive priority score corresponding to the first-level sub-verification rule, and obtaining the sub-verification rule Order of execution;
    所述第二综合优先级分数采用如下计算公式生成:The second comprehensive priority score is generated by the following calculation formula:
    W=X*N1+Y*N2W=X*N1+Y*N2
    其中,W为所述第二综合优先级分数,X为所述子验证规则对应的验证失败率的归一化值,Y为所述子验证规则依赖的数据对象属性值的响应时间的归 一化值,N1为验证通过率的权重,N2为响应时间的权重。Where W is the second integrated priority score, X is a normalized value of the verification failure rate corresponding to the sub-verification rule, and Y is the response time of the data object attribute value dependent on the sub-verification rule. A value, N1 is the weight of the verification pass rate, and N2 is the weight of the response time.
  52. 根据权利要求35所述的基于规则的数据对象验证方法,其特征在于,所述排序标准包括:The rule-based data object verification method according to claim 35, wherein the sorting criteria comprises:
    若所述子验证规则之间的逻辑关系为与关系,则优先执行原子验证规则对应的验证通过率低的所述子验证规则;若所述子验证规则之间的逻辑关系为或关系,则优先执行原子验证规则对应的验证通过率高的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;If the logical relationship between the sub-verification rules is a relationship, the sub-verification rules with low verification pass rate corresponding to the atomic verification rule are preferentially executed; if the logical relationship between the sub-validation rules is or The sub-verification rule having a high verification pass rate corresponding to the atomic verification rule is preferentially executed; the atomic verification rule is a verification rule including only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
    具体包括:Specifically include:
    若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
    若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  53. 根据权利要求52所述的基于规则的数据对象验证方法,其特征在于,所述排序单元包括:The rule-based data object verification method according to claim 52, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,构造规则树;所述规则树的根节点和中间节点为逻辑关系,叶节点为所述子验证规则,所述根节点或中间节点的子节点为与所述根节点或中间节点的逻辑关系相关的所述子验证规则或下一级中间节点;a parsing subunit, configured to parse the verification rule, construct a rule tree; a root node and an intermediate node of the rule tree are logical relationships, a leaf node is the sub-verification rule, and a child node of the root node or an intermediate node is The sub-verification rule or the next-level intermediate node related to the logical relationship of the root node or the intermediate node;
    排序子单元,用于自所述规则树的根节点开始,根据所述排序标准和所述根节点或中间节点的逻辑关系,逐级向下对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting subunit, configured to start from a root node of the rule tree, and sequentially sort the execution order of the sub-verification rules step by step according to the logical relationship between the sorting criterion and the root node or the intermediate node The order in which sub-verification rules are executed.
  54. 根据权利要求53所述的基于规则的数据对象验证方法,其特征在于,所述排序子单元包括:The rule-based data object verification method according to claim 53, wherein the ordering subunit comprises:
    设置子单元,用于将所述根节点作为当前节点;Setting a subunit for using the root node as a current node;
    第一判断子单元,用于判断所述当前节点的逻辑关系是否为与关系;a first determining subunit, configured to determine whether a logical relationship of the current node is a relationship;
    判断是子单元,用于若是,则以所述原子验证规则对应的验证通过率的升序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序; The determining is a subunit, and if yes, sorting the execution order of each atomic verification rule under the current node in an ascending manner of the verification pass rate corresponding to the atomic verification rule;
    判断否子单元,用于若所述当前节点的逻辑关系为或关系,则以所述原子验证规则对应的验证通过率的降序方式,对所述当前节点下的各个原子验证规则的执行顺序进行排序;Determining a non-subunit, wherein, if the logical relationship of the current node is a relationship, the execution order of each atomic verification rule under the current node is performed in a descending manner of the verification pass rate corresponding to the atomic verification rule Sort
    第二判断子单元,用于判断所述当前节点的子节点是否包括中间节点;若是,则逐个将所述当前节点的子节点是中间节点的子节点作为所述当前节点,并返回所述判断所述当前节点的逻辑关系是否为与关系的步骤,对所述规则树的每个中间节点下的原子验证规则的执行顺序进行排序。a second determining subunit, configured to determine whether the child node of the current node includes an intermediate node; if yes, the child node of the current node is a child node of the intermediate node as the current node, and returns the judgment Whether the logical relationship of the current node is a step of relationship, and sorting the execution order of the atomic verification rules under each intermediate node of the rule tree.
  55. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    优先验证原子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则;所述原子验证规则是指只包括一个比较关系的验证规则;Priorityly verifying the sub-verification rule that the response time of the data object attribute value that the atomic verification rule depends on is short; the atomic verification rule refers to a verification rule that includes only one comparison relationship;
    相应的,与所述排序标准对应的所述停止验证条件,是根据所述子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the sub-verification rules;
    具体包括:Specifically include:
    若所述子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the sub-validation rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
    若所述子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the sub-validation rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  56. 根据权利要求55所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 55, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and obtain a logical relationship between the sub-verification rules;
    排序子单元,用于自第一级子验证规则开始,逐级向下对预定级数的各级子验证规则,按照所述原子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting sub-unit for starting from the first-level sub-verification rule, stepping down the sub-verification rules of the predetermined level of the sub-levels, in accordance with the ascending order of the response time of the data object attribute values of the atomic verification rule, The execution order of the sub-verification rules is sorted, and the execution order of the sub-verification rules is obtained.
  57. 根据权利要求35所述的基于规则的数据对象验证装置,其特征在于,所述排序标准包括:The rule-based data object verification apparatus according to claim 35, wherein said sorting criteria comprises:
    优先验证第一级子验证规则依赖的数据对象属性值的响应时间短的所述子验证规则; Preferably, the sub-verification rule having a short response time of the data object attribute value that the first-level sub-verification rule depends on is verified;
    相应的,与所述排序标准对应的所述停止验证条件,是根据所述第一级子验证规则之间的逻辑关系确定的;Correspondingly, the stop verification condition corresponding to the sorting criterion is determined according to a logical relationship between the first level sub-verification rules;
    具体包括:Specifically include:
    若所述第一级子验证规则之间的逻辑关系为与关系,则所述停止验证条件为所述待验证数据对象不满足所述子验证规则;If the logical relationship between the first level sub-verification rules is an AND relationship, the stop verification condition is that the data object to be verified does not satisfy the sub-verification rule;
    若所述第一级子验证规则之间的逻辑关系为或关系,则所述停止验证条件为所述待验证数据对象满足所述子验证规则。If the logical relationship between the first level sub-verification rules is or a relationship, the stop verification condition is that the data object to be verified satisfies the sub-verification rule.
  58. 根据权利要求57所述的基于规则的数据对象验证装置,其特征在于,所述排序单元包括:The rule-based data object verification apparatus according to claim 57, wherein the sorting unit comprises:
    解析子单元,用于解析所述验证规则,获取所述第一级子验证规则之间的逻辑关系;a parsing subunit, configured to parse the verification rule, and acquire a logical relationship between the first level sub-verification rules;
    排序子单元,用于以所述第一级子验证规则依赖的数据对象属性值的响应时间的升序方式,对所述第一级子验证规则的执行顺序进行排序,获得子验证规则的执行顺序。a sorting sub-unit, configured to sort the execution order of the first-level sub-verification rules in an ascending manner of the response time of the data object attribute values that the first-level sub-verification rule depends on, and obtain the execution order of the sub-verification rules .
  59. 根据权利要求36-54任意一项所述的基于规则的数据对象验证装置,其特征在于,所述装置还包括:The rule-based data object verification apparatus according to any one of claims 36 to 54, wherein the apparatus further comprises:
    计算验证通过率单元,用于计算获取所述子验证规则对应的验证通过率。The verification pass rate unit is configured to calculate a verification pass rate corresponding to the sub-verification rule.
  60. 根据权利要求59所述的基于规则的数据对象验证装置,其特征在于,所述计算验证通过率单元包括:The rule-based data object verification apparatus according to claim 59, wherein the calculating the verification pass rate unit comprises:
    获取子单元,用于获取可应用所述子验证规则的数据对象;Obtaining a subunit, configured to acquire a data object to which the sub-verification rule can be applied;
    遍历子单元,用于遍历各个所述可应用所述子验证规则的数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing the sub-units, traversing each of the data objects to which the sub-verification rules are applicable, and acquiring data object attribute values that the sub-verification rules depend on from the currently verified data objects;
    判断子单元,用于判断所述数据对象属性值是否使得所述子验证规则成立;a determining subunit, configured to determine whether the data object attribute value causes the sub-verification rule to be established;
    判断是子单元,用于若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;The determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
    计算子单元,用于当遍历完所有所述可应用所述子验证规则的数据对象后,将累计的验证通过次数与所述可应用所述子验证规则的数据对象的数量的比值作为所述子验证规则对应的验证通过率。a calculating subunit, configured to, when traversing all the data objects to which the sub-verification rule is applicable, a ratio of the cumulative number of verification passes to the number of data objects to which the sub-verification rule is applicable The verification pass rate corresponding to the sub-verification rule.
  61. 根据权利要求59所述的基于规则的数据对象验证装置,其特征在于, 所述计算验证通过率单元包括:A rule-based data object verification apparatus according to claim 59, wherein: The calculation verification pass rate unit includes:
    获取子单元,用于获取预设次数的所述子验证规则对应的抽样数据验证通过率;Obtaining a subunit, configured to obtain a sampling data verification pass rate corresponding to the sub-verification rule of a preset number of times;
    计算子单元,用于根据为所述子验证规则对应的各次抽样数据验证通过率分别预设的权重,计算所述各次抽样数据验证通过率的加权平均值;a calculating subunit, configured to calculate a weighted average value of the pass rate of each of the sampled data according to a preset weight of each pass sampling data corresponding to the sub-verification rule;
    赋值子单元,用于将计算获取的加权平均值作为所述子验证规则对应的验证通过率。The assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
  62. 根据权利要求61所述的基于规则的数据对象验证装置,其特征在于,所述计算验证通过率单元还包括:The rule-based data object verification apparatus according to claim 61, wherein the calculating the verification pass rate unit further comprises:
    生成子单元,用于生成所述子验证规则对应的抽样数据验证通过率;Generating a subunit, configured to generate a sampling data verification pass rate corresponding to the sub-verification rule;
    所述生成子单元包括:The generating subunit includes:
    抽样子单元,用于从可应用所述子验证规则的所有数据对象中抽样选取出预设抽样比例的部分数据对象;a sampling subunit, configured to sample a partial data object of a preset sampling ratio from all data objects to which the sub-verification rule is applicable;
    遍历子单元,用于遍历各个所述预设抽样比例的部分数据对象,从当前验证的数据对象中获取所述子验证规则依赖的数据对象属性值;Traversing the subunits, traversing the partial data objects of each of the preset sampling ratios, and acquiring the data object attribute values that the sub-verification rules depend on from the currently verified data objects;
    判断子单元,用于判断所述数据对象属性值是否使得所述子验证规则成立;a determining subunit, configured to determine whether the data object attribute value causes the sub-verification rule to be established;
    判断是子单元,用于若上述判断结果为是,则所述子验证规则对应的验证通过次数累计加一;The determining is a subunit, and if the result of the foregoing determination is yes, the verification pass number corresponding to the sub-verification rule is cumulatively increased by one;
    计算子单元,用于当遍历完所有所述预设抽样比例的部分数据对象后,将累计的验证通过次数与所述预设抽样比例的部分数据对象的数量的比值作为所述子验证规则对应的验证通过率。a calculating subunit, configured to, when traversing all the partial data objects of the preset sampling ratio, a ratio of the cumulative number of verification passes to the number of partial data objects of the preset sampling ratio as the sub-verification rule Verification pass rate.
  63. 根据权利要求61所述的基于规则的数据对象验证装置,其特征在于,所述计算验证通过率单元包括:The rule-based data object verification apparatus according to claim 61, wherein the calculating the verification pass rate unit comprises:
    获取子单元,用于获取预设次数的所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Obtaining a sub-unit, configured to obtain a real-time verification pass rate corresponding to the preset number of times of the sub-verification rule within a preset time interval;
    计算子单元,用于根据为各次实时验证通过率分别预设的权重,计算所述各次实时验证通过率的加权平均值;a calculating subunit, configured to calculate a weighted average value of each real-time verification pass rate according to weights respectively preset for each real-time verification pass rate;
    赋值子单元,用于将计算获取的加权平均值作为所述子验证规则对应的验证通过率。 The assignment sub-unit is configured to use the weighted average obtained by the calculation as the verification pass rate corresponding to the sub-verification rule.
  64. 根据权利要求63所述的基于规则的数据对象验证装置,其特征在于,所述计算验证通过率单元还包括:The rule-based data object verification apparatus according to claim 63, wherein the calculating the verification pass rate unit further comprises:
    生成子单元,用于生成所述子验证规则在预设时间间隔范围内对应的实时验证通过率;Generating a subunit, configured to generate a real-time verification pass rate corresponding to the sub-verification rule within a preset time interval;
    所述生成子单元包括:The generating subunit includes:
    获取子单元,用于获取预先生成的所述子验证规则在所述预设时间间隔范围内对应的实时验证通过次数和实时验证运行次数;Obtaining a sub-unit, configured to obtain a real-time verification pass number and a real-time verification run count corresponding to the pre-generated sub-verification rule within the preset time interval;
    计算子单元,用于将所述实时验证通过次数与所述实时验证运行次数的比值作为所述子验证规则在所述预设时间间隔范围内对应的实时验证通过率。a calculation subunit, configured to use a ratio of the number of real-time verification passes to the number of real-time verification runs as a real-time verification pass rate corresponding to the sub-verification rule within the preset time interval.
  65. 根据权利要求64所述的基于规则的数据对象验证装置,其特征在于,所述生成子单元还包括:The rule-based data object verification apparatus according to claim 64, wherein the generating sub-unit further comprises:
    第一生成子单元,用于生成所述实时验证通过次数和实时验证运行次数;a first generation subunit, configured to generate the real-time verification pass times and the real-time verification run times;
    所述第一生成子单元包括:The first generating subunit includes:
    判断子单元,用于当在所述预设时间间隔范围内新增一个可应用所述子验证规则的数据对象时,判断新增的数据对象是否满足所述子验证规则;a determining subunit, configured to determine whether the newly added data object satisfies the sub-verification rule when a data object to which the sub-verification rule is applicable is added within the preset time interval;
    判断是子单元,用于若上述判断结果为是,则将所述子验证规则在所述预设时间间隔范围内的实时验证通过次数累计加一;The determining is a sub-unit, configured to: if the result of the foregoing determination is yes, accumulating the number of real-time verification passes of the sub-verification rule within the preset time interval range by one;
    计数子单元,用于将所述子验证规则在所述预设时间间隔范围内的实时验证运行次数累计加一。And a counting subunit, configured to add one of the real-time verification running times of the sub-verification rule within the preset time interval.
  66. 一种基于规则的数据对象验证系统,其特征在于,包括:权利要求32所述的基于规则的数据对象验证装置。A rule-based data object verification system, comprising: the rule-based data object verification apparatus of claim 32.
  67. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    显示器;monitor;
    处理器;以及Processor;
    存储器,用于存储基于规则的数据对象验证装置,所述基于规则的数据对象验证装置被所述处理器执行时,包括如下步骤:获取待验证数据对象及其对应的验证规则;以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得能够快速确定验证结果的所述子验证规则被优先执行的排序标准;按照所述子 验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。a memory for storing a rule-based data object verification device, when the rule-based data object verification device is executed by the processor, comprising the steps of: acquiring a data object to be verified and a corresponding verification rule thereof; The sorting criterion sorts the execution order of the respective sub-verification rules included in the verification rule to obtain an execution order of the sub-verification rules; the sorting criterion refers to the sub-verification rule that enables the quick determination of the verification result to be prioritized Execution sorting criteria; follow the child Verifying the execution order of the rules, and sequentially determining whether the data object to be verified satisfies the sub-verification rule until the preset stop verification condition corresponding to the sorting criterion is reached or all sub-verification rules are executed; And the logical relationship between the sub-validation rule and the verification result of obtaining the data object to be verified.
  68. 根据权利要求67所述的电子设备,其特征在于,所述基于规则的数据对象验证装置包括:The electronic device according to claim 67, wherein the rule-based data object verification device comprises:
    获取单元,用于获取待验证数据对象及其对应的验证规则;An obtaining unit, configured to obtain a data object to be verified and a corresponding verification rule thereof;
    排序单元,用于以预设的排序标准对所述验证规则包括的各个子验证规则的执行顺序进行排序,获得所述子验证规则的执行顺序;所述排序标准,是指使得优先执行能够快速确定验证结果的所述子验证规则的排序标准;a sorting unit, configured to sort an execution order of each sub-verification rule included in the verification rule by a preset sorting criterion, to obtain an execution order of the sub-verification rule; and the sorting standard refers to enabling the priority execution to be fast Determining an ordering criterion of the sub-verification rules of the verification result;
    验证单元,用于按照所述子验证规则的执行顺序,依次判断所述待验证数据对象是否满足所述子验证规则,直至达到预设的与所述排序标准对应的停止验证条件为止或执行完所有子验证规则;a verification unit, configured to sequentially determine, according to an execution order of the sub-verification rules, whether the data object to be verified satisfies the sub-verification rule until a preset stop verification condition corresponding to the sorting criterion is reached or is performed All sub-validation rules;
    计算单元,用于根据上述判断结果和所述子验证规则之间的逻辑关系,计算获取所述待验证数据对象的验证结果。 And a calculating unit, configured to calculate, according to the logical relationship between the foregoing judgment result and the sub-verification rule, a verification result of acquiring the data object to be verified.
PCT/CN2016/086867 2015-07-02 2016-06-23 Rule-based data object verification method, apparatus, system and electronic device WO2017000828A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510381312.6A CN106326776A (en) 2015-07-02 2015-07-02 Data object verification method, device and system based on rules, and electric device
CN201510381312.6 2015-07-02

Publications (1)

Publication Number Publication Date
WO2017000828A1 true WO2017000828A1 (en) 2017-01-05

Family

ID=57607805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086867 WO2017000828A1 (en) 2015-07-02 2016-06-23 Rule-based data object verification method, apparatus, system and electronic device

Country Status (2)

Country Link
CN (1) CN106326776A (en)
WO (1) WO2017000828A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426720A (en) * 2017-09-01 2019-03-05 北京国双科技有限公司 The verification method and relevant apparatus of interface parameters
CN114098729A (en) * 2020-08-27 2022-03-01 北京晶栈信息技术有限公司 Emotional state objective measurement method based on cardiac interval

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506383B (en) * 2017-07-25 2021-07-23 中国建设银行股份有限公司 Audit data processing method and computer equipment
CN107798239B (en) * 2017-07-27 2020-06-26 深圳壹账通智能科技有限公司 Operation risk processing method and device, computer equipment and storage medium
CN107527287A (en) * 2017-08-29 2017-12-29 深圳市分期乐网络科技有限公司 A kind of risk control method and device
CN107977404B (en) * 2017-11-15 2020-08-28 深圳壹账通智能科技有限公司 User information screening method, server and computer readable storage medium
CN109376285B (en) * 2018-10-30 2021-03-02 上海掌门科技有限公司 Data sorting verification method based on json format, electronic device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000222228A (en) * 1999-01-29 2000-08-11 Hitachi Ltd Deadlock preventing method by verification of resource occupation order
US7542957B2 (en) * 2005-07-22 2009-06-02 International Business Machines Corporation Rich Web application input validation
CN102324004A (en) * 2011-05-26 2012-01-18 重庆猪八戒网络有限公司 Verification method for webpage form input information and device
CN103888254A (en) * 2012-12-21 2014-06-25 阿里巴巴集团控股有限公司 Network information verification method and apparatus
CN104731669A (en) * 2015-03-12 2015-06-24 深圳供电局有限公司 Method and system for automatically checking defect data of electrical equipment
CN105225125A (en) * 2014-06-23 2016-01-06 阿里巴巴集团控股有限公司 Information calibration method and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606669B2 (en) * 2006-06-01 2013-12-10 Broadridge Securities Processing Solutions, Inc. Systems and methods for client screening in the financial services industry

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000222228A (en) * 1999-01-29 2000-08-11 Hitachi Ltd Deadlock preventing method by verification of resource occupation order
US7542957B2 (en) * 2005-07-22 2009-06-02 International Business Machines Corporation Rich Web application input validation
CN102324004A (en) * 2011-05-26 2012-01-18 重庆猪八戒网络有限公司 Verification method for webpage form input information and device
CN103888254A (en) * 2012-12-21 2014-06-25 阿里巴巴集团控股有限公司 Network information verification method and apparatus
CN105225125A (en) * 2014-06-23 2016-01-06 阿里巴巴集团控股有限公司 Information calibration method and equipment
CN104731669A (en) * 2015-03-12 2015-06-24 深圳供电局有限公司 Method and system for automatically checking defect data of electrical equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426720A (en) * 2017-09-01 2019-03-05 北京国双科技有限公司 The verification method and relevant apparatus of interface parameters
CN114098729A (en) * 2020-08-27 2022-03-01 北京晶栈信息技术有限公司 Emotional state objective measurement method based on cardiac interval
CN114098729B (en) * 2020-08-27 2023-11-10 中国科学院心理研究所 Heart interval-based emotion state objective measurement method

Also Published As

Publication number Publication date
CN106326776A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
WO2017000828A1 (en) Rule-based data object verification method, apparatus, system and electronic device
TWI718643B (en) Method and device for identifying abnormal groups
Lim et al. Provenance-based trustworthiness assessment in sensor networks
JP6661768B2 (en) Classifying user behavior as abnormal
TWI740891B (en) Method and training system for training model using training data
KR101939554B1 (en) Determining a temporary transaction limit
TWI745589B (en) Risk feature screening, description message generation method, device and electronic equipment
US9223829B2 (en) Interdistinct operator
TW201833851A (en) Risk control event automatic processing method and apparatus
CN106649401A (en) Data writing method and device of distributed file system
US20190114711A1 (en) Financial analysis system and method for unstructured text data
KR20170134601A (en) Data processing method and apparatus
US20190220924A1 (en) Method and device for determining key variable in model
US20220391672A1 (en) Multi-task deployment method and electronic device
CN106815100A (en) Interface test method and device
CN106776757B (en) Method and device for indicating user to complete online banking operation
CN105989066A (en) Information processing method and device
CN110968564A (en) Data processing method and training method of data state prediction model
US10127192B1 (en) Analytic system for fast quantile computation
WO2021139255A1 (en) Model based method and apparatus for predicting data change frequency, and computer device
CN116628600A (en) Unbalanced data sampling method and device based on random forest
US20190065987A1 (en) Capturing knowledge coverage of machine learning models
CN116362823A (en) Recommendation model training method, recommendation method and recommendation device for behavior sparse scene
Du et al. An evolutionary algorithm for performance optimization at software architecture level
US10693855B1 (en) Fraud detection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16817192

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16817192

Country of ref document: EP

Kind code of ref document: A1