Form data verification configuration method, computer readable medium and system

By configuring rule trees and dependency storage queues, it solves the problems of low efficiency and strong framework dependency of existing form data verification solutions, achieves efficient verification and flexible rule management, and adapts to complex data and dependencies.

CN118626485APending Publication Date: 2024-09-10WEBANK (CHINA)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410656804.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing form data verification solutions lack pertinence, resulting in low efficiency when large-scale and high-frequency data changes occur. Moreover, traditional solutions are tightly coupled with specific frameworks, making it difficult to be cross-frame compatible and meet customized needs.

Method used

By obtaining the verification data of the form and the rules to be configured, configure the corresponding rule tree, perform depth-first traversal to parse the target rules, and arrange them in the order of parsing to form a dependent storage queue to achieve rule item level verification and reduce No verification tasks are necessary.

Benefits of technology

It improves the efficiency of form data verification, implements rule item level verification, reduces framework dependencies, supports more flexible rule combination and maintenance, and adapts to complex data and dependencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626485A
    Figure CN118626485A
Patent Text Reader

Abstract

The invention discloses a configuration method for form data verification, a computer readable medium and a system. The method comprises the following steps: obtaining verification data and a to-be-configured rule of a form; configuring a corresponding to-be-configured rule for the verification data to obtain rule configuration of the verification data; performing initialization based on rule configuration to form a rule tree corresponding to the verification data; on the basis of the verification data and the rule configuration, performing depth-first traversal on the rule tree to leaf nodes so as to parse a target rule of the verification data; according to the method, the target rules are arranged according to the analysis sequence, the dependency storage queue corresponding to the verification data is obtained, whether the verification data conform to the rules in the dependency storage queue or not can be directly detected during verification, no change or irrelevant variables in the form need to be verified, and the verification efficiency is improved. Therefore, the verification of the rule item level corresponding to the variable is realized, the verification task load is reduced, and the overall verification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of form data verification, and in particular, relates to a configuration method, a computer-readable medium and a system for form data verification. Background Art

[0002] Form data validation means that when a user enters data into a web (World Wide Web) application, the application will verify the correctness and legality of the input data. If the validation fails, the submission is blocked and the reason for the incorrect data item is prompted. If the validation passes, normal submission is allowed.

[0003] The verification scheme in the related art is to verify all form item data when submitting a form. If it fails, the verification information will be prompted and the submission operation will be blocked. However, this scheme performs a comprehensive verification on all form items in the form and lacks targeted rule verification. As the verification rules become more complex, the traditional scheme needs to verify a large amount of unnecessary form item data when large-scale and high-frequency data changes occur, resulting in low verification efficiency.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present invention is to provide a configuration method, a computer-readable medium and a system for form data verification, so as to solve the problems of lack of targeted verification and low verification efficiency in related technologies.

[0006] According to one aspect of an embodiment of the present application, a configuration method for form data verification is provided, the method comprising:

[0007] Get the form's validation data and rules to be configured;

[0008] Configure corresponding rules to be configured for the verification data to obtain the rule configuration of the verification data;

[0009] Initialize based on the rule configuration to form a rule tree corresponding to the verification data;

[0010] Based on the verification data and rule configuration, the rule tree is traversed depth-first to the leaf nodes to parse the target rules of the verification data;

[0011] Arrange the target rules in the parsing order to obtain the dependency storage queue corresponding to the verification data.

[0012] In an embodiment provided in the present application, based on the verification data and rule configuration, the rule tree is traversed depth-first to the leaf node to parse the target rule of the verification data, including: finding the target root node where the verification data is located; the verification data includes a verification value and a dependency value, the verification value is the data that needs to be verified to see if it is legal, and the dependency value is the data that is relied upon when the verification value is performed on the rule; the leaf nodes under the target root node are traversed, and the target rule on the current leaf node is obtained; when the target rule on the current leaf node has a dependency value, the target rule corresponding to the dependency value is obtained according to the rule configuration.

[0013] In an embodiment provided in the present application, the target rules are arranged in a parsing order to obtain a dependency storage queue corresponding to the verification data, including: when the target rules of the verification data are parsed, the verification data required by the target rules are read; the target rules and the corresponding verification data are associated; the associated target rules are queued into the corresponding dependency manager in the parsing order to obtain the dependency storage queue corresponding to the verification data.

[0014] In an embodiment provided in the present application, initialization is performed based on the rule configuration to form a rule tree corresponding to the verification data, including: obtaining a data description and a verification trigger method of the verification data defined by the user; the data description refers to a field that describes the attributes of the verification data; the verification trigger method includes a responsive trigger and an active trigger; based on the rule configuration, verification data, data description and verification trigger method, a verifier corresponding to the verification data is newly created; based on the rule reference relationship in the rule configuration, the hierarchical relationship of the nodes of the rule tree is determined.

[0015] In an embodiment provided in the present application, corresponding rules to be configured are configured for verification data to obtain rule configuration of the verification data, including: obtaining a mapping relationship between the verification data and the rules to be configured; configuring the verification data and the rules to be configured based on the mapping relationship to obtain the rule configuration of the verification data.

[0016] In an embodiment provided in the present application, after obtaining the verification data of the form and the rules to be configured, the method also includes: splitting the rules to be configured into multiple separate rules; obtaining new rules defined by the user; and combining at least one separate rule and the new rule to obtain new rules to be configured.

[0017] In an embodiment provided in the present application, the method also includes: when a change in verification data is detected, finding the dependent storage queue corresponding to the verification data; triggering the target rules in the dependent storage queue to be dequeued in sequence according to the parsing order; and verifying the verification data according to the target rules currently dequeued.

[0018] In an embodiment provided in the present application, the method further includes: detecting a verification result of the verification data; when the verification result of the verification data is a failure, controlling a verifier corresponding to the verification data to end verification.

[0019] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the configuration method for form data verification provided by any embodiment of the present application is implemented.

[0020] According to one aspect of an embodiment of the present application, a system for verifying form data is provided, the system comprising:

[0021] The data management center is used to manage verification data; verification data includes verification values ​​and dependent values; verification values ​​are data that need to be verified to see if they are legal, and dependent values ​​are data that verification values ​​rely on when performing rule verification;

[0022] The response management center is used to collect the rules of the verification values ​​and the association relationship of the dependent values ​​by intercepting the data acquisition operation and data setting operation of the data management center;

[0023] The rule management center is used to manage the operations performed on the rules for verifying data;

[0024] A verifier is used to verify the verification data one by one according to the rules output by the rule management center when the verification trigger condition of the verification data is met;

[0025] Detector, used to detect errors, verification status and verification results during the form data verification process.

[0026] In the technical solution of the present application, the verification data and the rules to be configured of the form are obtained; the corresponding rules to be configured are configured for the verification data to obtain the rule configuration of the verification data so as to associate the verification data with the rules; initialization is performed based on the rule configuration to form a rule tree corresponding to the verification data, and the rule tree arranges the rules corresponding to the verification data in hierarchical order, and clearly summarizes the rules corresponding to each verification data; then based on the verification data and the rule configuration, the rule tree is traversed to the leaf node in a depth-first manner to parse out the target rules of the verification data; the target rules are arranged in the parsing order to obtain the dependency storage queue corresponding to the verification data, so that during verification, it is possible to directly detect whether the verification data complies with the rules in the dependency storage queue, without the need to verify unchanged or irrelevant variables in the form, thereby realizing the verification of the rule item level corresponding to the variable, reducing the amount of verification tasks, and improving the overall verification efficiency.

[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1A The following is a schematic diagram showing the hierarchical relationship between form data and its rules provided in an embodiment of the present application.

[0030] Figure 1B A schematic diagram showing the relationship between form item rules and their dependent values ​​provided in an embodiment of the present application is shown.

[0031] Figure 2 The following is a flow chart schematically showing a configuration method for form data verification provided in an embodiment of the present application.

[0032] Figure 3 The structural diagram of the rule tree provided in one embodiment of the present application is schematically shown.

[0033] Figure 4 The flowchart of the method for parsing target rules provided in one embodiment of the present application is schematically shown.

[0034] Figure 5A The structure block diagram of the dependent storage queue of the insured person's ID card in one embodiment of the present application is schematically shown.

[0035] Figure 5B The structure block diagram of the dependency storage queue of a relationship in an embodiment of the present application is schematically shown.

[0036] Figure 6 The structural block diagram of a system for form verification data provided by an embodiment of the present application is schematically shown.

[0037] Figure 7 The following schematically shows a timing flow chart of form data verification provided by an embodiment of the present application.

[0038] Figure 8 The following schematically shows a timing flow chart of form data verification provided by an embodiment of the present application.

[0039] Fig. 9 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0040] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0041] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the present application.

[0042] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0043] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0044] With the development of Internet products, more and more complex form verification and linkage interaction scenarios have emerged. However, the traditional automated form verification solutions currently on the market have technical defects in efficiency, performance and implementation in the following key aspects.

[0045] First, as Figure 1AAs shown, the form includes multiple form items, among which the verification rule of form item A is form item rule A. Form item rule A includes rule item A1, rule item A2 and rule item A3. For example, rule item A1 is a basic verification rule and there is no related dependent value; rule item A2 is a verification rule with dependent variable a1, and rule item A3 is a verification rule with dependent variable a2. When variable a1 in form item A changes, the relevant technology is to first determine that variable a1 belongs to form item A, and then perform rule verification according to form item rule A corresponding to form item A, that is, rule item A1, rule item A2 and rule item A3 all need to be verified. In fact, rule item A1 and rule item A3 have no correlation with the change of variable a1, but in traditional form verification schemes, the form is usually regarded as a whole, and each form item needs to be included in one. <form>The tag can be verified, which means that the related technology still needs to be verified according to rule item A1 and rule item A3. It can be seen that the form constraints in the related technology will cause the management of form items to be limited by the structure of the overall form, and thus it is impossible to flexibly combine and use a single form item for verification in different scenarios. In addition, for form components that have been repackaged or modified, such as custom components or special input controls, it is also difficult to use and verify them alone. They need to be attached to the entire form to take effect. These limitations add more difficulties to subsequent maintenance and debugging.

[0046] Secondly, the verification rule of form item B is form item rule B, and form item rule B includes rule item B1, rule item B2 and rule item B3, and rule item B1, rule item B2 and rule item B3 are all verification rules for variable b. If variable b is the dependent value of rule item A2, then when variable b changes, in addition to verifying the dependent rules of variable b, rule item A2 that depends on variable b should also be verified. As the amount of data in the form increases, the dependency relationship between data becomes more complex. Related technologies rely on form events such as onChange, onBlur or onInput to trigger verification, but form items can only detect changes in their own values, which makes it difficult to handle automated linkage verification between multiple form items or non-form items. Figure 1B As shown, the verification of rule item A1 depends on the changes of multiple other form items or other operation values. When the relevant technology detects that the variable a has changed, it will verify rule items A1, rule items A2 and rule items A3, while the rule verification corresponding to the data b, c and d in the other multiple form items that rule item A1 depends on requires manual calling of the application programming interface (API) for rule verification.

[0047] Third, traditional form validation is usually tightly coupled with specific frameworks (such as Vue, React, etc.), which leads to limitations in framework dependencies. This framework dependency can lead to problems such as difficulty in switching frameworks, low cross-framework compatibility, or difficulty in meeting customization requirements. When developers need to migrate between different frameworks or use different frameworks, existing form validation solutions are difficult to switch seamlessly. This may require rewriting or adjusting the validation code to adapt to the new framework, which will increase migration and learning costs. In addition, different frameworks have different life cycles, state management, and data binding methods. When switching frameworks, it is easy to cause inconsistencies or errors in the performance of certain form components in different frameworks.

[0048] Based on the above problems in the related art, such as Figure 2 As shown, the present application provides a configuration method for form data verification, which includes S210 to S250, and the specific process is described as follows.

[0049] S210: Obtain verification data and rules to be configured of the form.

[0050] Specifically, a form is a tool that allows users to enter and submit information, and can collect user input information of different data types.

[0051] Verification data is data that has changed and needs to be verified by rules. Verification data can be a verification value or a dependent value. The verification value is the data that needs to be verified to see if it is legal, and the dependent value is the data that the verification value depends on when verifying the rules. It should be understood that the relationship between the verification value and the dependent value is based on the change of the current variable. For example, if variable a changes, then variable a is the verification value, and variable b, on which the verification rule of variable a depends, needs to be verified. If variable b changes, then variable b is the verification value, and variable c, on which the verification rule of variable b depends, needs to be verified, and the rule items that depend on variable b also need to be verified.

[0052] The rules to be configured can be multiple complex rules, one complex rule, multiple basic rules, or general rules. Basic rules refer to rules that need to be performed when checking rules for most variables, such as rules to check whether a variable is empty. General rules refer to rules that need to be checked in some businesses.

[0053] S220: Configure corresponding rules to be configured for the verification data to obtain rule configuration for the verification data.

[0054] Specifically, configuring corresponding rules to be configured for verification data refers to setting rules to be configured corresponding to certain verification data. For example, the verification data includes verification value a and dependency value b, and the rules to be configured include rule A and rule B. Configuring corresponding rules to be configured for verification data means associating rule A with verification value a, and rule B with dependency value b. Moreover, variable b is the dependency value of verification value a, and rule B can also be associated with verification value a. Then, when verification value a changes, rule A can be triggered to verify verification value a, and rule B can be triggered to verify dependency value b. Rule configuration refers to the correspondence between verification data and rules to be configured, for example, verification value a corresponds to rule A, and dependency value b corresponds to rule B.

[0055] In an embodiment provided in the present application, corresponding rules to be configured are configured for verification data to obtain rule configuration of the verification data, including: obtaining a mapping relationship between the verification data and the rules to be configured; configuring the verification data and the rules to be configured based on the mapping relationship to obtain the rule configuration of the verification data.

[0056] Specifically, the mapping relationship between the verification data and the rules to be configured may include the corresponding relationship between the verification data and the rules to be configured, such as verification data A corresponds to rule A to be configured, and verification data B corresponds to rule B to be configured. When configuring the verification data and the rules to be configured, the verification priority of the rules may also be configured according to the specific business scenario, so that the rule configuration of the verification data meets the corresponding business requirements.

[0057] S230: Initialize based on the rule configuration to form a rule tree corresponding to the verification data.

[0058] Specifically, initialization refers to the operation of assigning initial values ​​to the verification data in the form data verification and setting the relevant controls to the default state, which is equivalent to creating a new verifier corresponding to the verification data, where the verifier refers to the interface that triggers the verification. During the initialization process, the rule reference relationship in the rule configuration is converted into a tree form to form a rule tree. A rule tree refers to a finite set of n nodes formed based on the verification rules. The depth of the rule tree depends on the level of verification rule assembly, and the breadth of the rule tree depends on the number of rule items. That is, the higher the level of verification rule assembly, the greater the depth of the rule tree; the greater the number of rule items, the greater the breadth of the rule tree. The nodes on the rule tree have corresponding verification rules, such as Figure 3 As shown, the nodes of the first layer are root nodes, corresponding to the overall form verification rules. The nodes of the second layer include the form item rule policyholder ID card (idNo) and the form item rule insured ID card (bbIdNo). The form item rule idNo is used to verify the policyholder's relevant data, and the form item rule bbidNo is used to verify the insured's relevant data. The form item rule (idNo) includes the policyholder identity relationship (idNoRelationRule) rule, and the rule (idNoRelationRule) is a rule for verifying the policyholder's identity and its relationship. It should be understood that there may be other branch rules under the form item rule idNo, Figure 3 Only part of the branching structure is shown.

[0059] In an embodiment provided in the present application, initialization is performed based on rule configuration to form a rule tree corresponding to the verification data, specifically including S2301 to S2303.

[0060] S2301. Obtain data description and verification triggering method of verification data defined by the user.

[0061] Specifically, data description refers to a field that describes the attributes of verification data. For example, if verification data idNo is a form item for verifying the policyholder's ID card, then its verification data attribute is the policyholder's ID card; bbIdNo is a form item for verifying the insured's ID card, then its verification data attribute is the insured's ID card. Verification triggering methods include responsive triggering and active triggering. Responsive triggering refers to a verification triggering method in which if any one of the associated verification data changes, other associated verification data is also automatically verified. Active triggering refers to a verification method triggered by manual settings by the user, which cannot automatically verify the associated verification data.

[0062] S2302. Create a verifier corresponding to the verification data based on the rule configuration, verification data, data description and verification triggering method.

[0063] Specifically, the rule configuration is used to determine the reference relationship of the rules in the verifier, and can determine the order of the verification rules. The verification data can determine the data verified by the verifier so as to obtain the changes in the corresponding data. The data description can determine the type of verification data so as to distinguish the role of each verifier. The verification trigger method can determine the working mode of the verifier. Based on the rule configuration, verification data, data description and verification trigger method, a new verifier corresponding to the verification data is created to verify with the verifier when the verification data changes.

[0064] S2303: Determine the hierarchical relationship of the nodes of the rule tree based on the rule reference relationship in the rule configuration.

[0065] For example, the rule configuration includes: check value a corresponds to rule A, check value b corresponds to rule B, and rule A depends on check value b when checking. Therefore, check value b is also the dependent value of rule A, and rule A also depends on rule B. Accordingly, when converting the reference relationship into a hierarchical relationship of the rule tree, rule B can be set at the same level as rule A, and rule B is checked before rule A. Or the rule configuration includes: the check data policyholder identity relationship (idNoRelationRule) corresponds to Figure 3 The rule item in the policyholder identity relationship (idNoRelationRule) corresponds to the check value number (idCard) Figure 3 The rule item number (idCard) in the form item rule (idCard) belongs to one of the rules under the form item rule (idNoRelationRule). The rule item (idCard) can be used as a child node of the form item rule (idNoRelationRule). In other words, the rule reference relationship can include the dependency relationship of the rules, and can also include the master-slave relationship of the rules. When converting the rule reference relationship into a hierarchical relationship of the rule tree, if the rules are in a master-slave relationship, the master rule can be used as the parent node, and the slave rule can be used as the child node of the parent node; if the rules are in a dependency relationship, the rule and the rules it depends on can be set to the same level, and the dependent rules can be set to be verified before the rule, so that the verification results of the corresponding dependent values ​​can be obtained when verifying the rule.

[0066] S240: Based on the verification data and the rule configuration, the rule tree is traversed to the leaf node in a depth-first manner to parse out the target rule of the verification data.

[0067] Specifically, traversing to a leaf node in depth-first order means starting from a node in the rule tree and searching as deeply as possible along a branch of the node until the end of the branch (i.e., a leaf node) is reached. Assuming that the verification data includes a verification value a and a dependency value b, when the verification value a changes, traverse in depth from the branch where the node corresponding to the rule item of verification a is located until the leaf node is reached; when the dependency value b changes, it can be determined according to the rule configuration that the dependency value b is the dependency value of the verification rule of the verification value a, so it is also traversed in depth from the branch where the node corresponding to the rule item of verification a is located until the leaf node is reached.

[0068] In an embodiment provided in the present application, based on the verification data and rule configuration, the rule tree is traversed to the leaf node in depth-first order to parse the target rule of the verification data, specifically including Figure 4 S2401 to S2403 shown.

[0069] S2401. Find the target root node where the verification data is located; the verification data includes a verification value and a dependent value. The verification value is the data that needs to be verified to see if it is legal, and the dependent value is the data that is relied upon when performing rule verification on the verification value.

[0070] Specifically, if the check value itself changes, the node where the rule item corresponding to the check value is located is the target root node; if the dependent value changes, the check value corresponding to the dependent value is first found to determine the target root node where the check value is located. Figure 3 As shown, if the check value idNo changes, the target root node is the node where the rule item idNo corresponding to the check value idNo is located; if the dependency value relationship (relation) of the check value idNo changes, the check value idNo that depends on the dependency value relation is found, and then the node where the check value idNo is located is determined to be the target root node.

[0071] S2402: Traverse the leaf nodes under the target root node and obtain the target rule on the current leaf node.

[0072] Specifically, Figure 3 As shown, the target root node is the node where the rule item idNo is located. Then, by traversing the leaf nodes under the rule item idNo, the rule item idCard, the rule item age1, and the rule item age2 can be obtained in sequence.

[0073] S2403. When the target rule on the current leaf node has a dependency value, obtain the target rule corresponding to the dependency value according to the rule configuration.

[0074] Specifically, if the target rule on the current leaf node has a dependent value, such as Figure 3 The node age 2 in the table depends on the variable relation, but the rule tree does not record the rule item corresponding to the variable relation in the leaf node of the form item idNo. Then, according to the rule configuration, the rule item corresponding to the dependent value relation is obtained, and the target rule of the dependent value can be parsed.

[0075] S250, arranging the target rules in the parsing order to obtain a dependent storage queue corresponding to the verification data.

[0076] Specifically, the dependency storage queue refers to a dependency (Dep) queue for storing the correspondence between verification data and rules. In one case, the parsing order refers to the order of rules in the rule tree. It should be understood that the rule tree in this application can be an ordered tree, that is, the nodes at the same level in the rule tree are in order. Figure 3 As shown in the figure, the leaf nodes from left to right are in order. When parsing, the leaf nodes on the left are parsed first, until the rightmost leaf node of the branch corresponding to the verification data is parsed. In another case, if the rule item on the leaf node has a dependent rule item, the corresponding dependent rule item is parsed after the rule item corresponding to the leaf node is parsed. Figure 5A As shown, in the Dep queue corresponding to the form item idNo, the rule item is represented by the naming form of Watcher-verification attribute_verification rule, Watcher-idNo_idCard represents the rule item idCard in the form item idNo, and Watcher-idNo_age1 represents the rule item age1 in the form item idNo. It should be understood that Figure 3 Only some nodes of the form item idNo are shown. Figure 5A The dependent storage queue of the form item idNo includes Figure 3 Some of the verification data are not shown in the figure.

[0077] In the technical solution of the present application, the verification data and the rules to be configured of the form are obtained; the corresponding rules to be configured are configured for the verification data to obtain the rule configuration of the verification data so as to associate the verification data with the rules; initialization is performed based on the rule configuration to form a rule tree corresponding to the verification data, and the rule tree arranges the rules corresponding to the verification data in hierarchical order, and clearly summarizes the rules corresponding to each verification data; then based on the verification data and the rule configuration, the rule tree is traversed to the leaf node in a depth-first manner to parse out the target rules of the verification data; the target rules are arranged in the parsing order to obtain the dependency storage queue corresponding to the verification data, so that during verification, it is possible to directly detect whether the verification data complies with the rules in the dependency storage queue, without the need to verify unchanged or irrelevant variables in the form, thereby realizing the verification of the rule item level corresponding to the variable, reducing the amount of verification tasks, and improving the overall verification efficiency.

[0078] In an embodiment provided in the present application, the target rules are arranged in a parsing order to obtain a specific process of a dependent storage queue corresponding to the verification data, including S2501 to S2503.

[0079] S2501. When the target rule of the verification data is parsed, the verification data required by the target rule is read.

[0080] For example, according to the rule configuration and Figure 3 After the rule tree shown in the figure parses and obtains the target rule for the form item idNo, it reads Figure 3 The variable relation on which the rule item age2 in depends.

[0081] S2502. Associate the target rule with the corresponding verification data.

[0082] Exemplarily, the target rule age2 is associated with the verification data relation.

[0083] S2503. Enqueue the associated target rules into the corresponding dependency manager in the parsing order to obtain the dependency storage queue corresponding to the verification data.

[0084] Specifically, you can first put the rule item idCard and the rule item age1 without dependency values ​​into the dependency manager corresponding to the form item idNo, then associate the rule age2 with the variable relation, put the associated rule age2 into the dependency manager corresponding to the form item idNo, and then put the other rule items into the dependency manager corresponding to the form item idNo in sequence. You can also first associate the rule age2 with the variable relation, and then put the rule item idCard, rule item age1, rule item age2 and other rule items into the dependency manager corresponding to the form item idNo in sequence. If the variable relation also has corresponding dependency values, the following can be formed in the same way. Figure 5B The dependency storage queue corresponding to the variable relation shown in the figure, wherein each box represents a corresponding rule, such as detector-relationship-information 1, which refers to the rule for verifying whether information 1 meets the requirements. The meanings of other rules are similar and will not be repeated here.

[0085] In this way, the target rules can be queued into the corresponding dependency storage queue in the order of parsing, which facilitates the subsequent rule verification directly according to the dependency storage queue. In the case of large-scale data and complex dependencies, the dependency relationship between the verification data and the rule items can be quickly determined without the need for manual configuration by the user.

[0086] In an embodiment provided in the present application, after obtaining the verification data of the form and the rules to be configured, the method also includes: splitting the rules to be configured into multiple separate rules; obtaining new rules defined by the user; and combining at least one separate rule and the new rule to obtain new rules to be configured.

[0087] Specifically, a separate rule refers to a rule used to detect a single item of content, such as the verification rule for the number of digits in the ID card, the verification rule for the first m digits in the ID card, and the verification rule for the last n digits in the ID card. These separate rules are part of the ID card number verification rule. For example, the ID card number verification rule is a rule to be configured. The ID card number verification rule can be divided into separate rule a, separate rule b, and separate rule c. The new rule defined by the user is the new rule d. Any separate rule can be combined with the new rule d, such as combining separate rule a with the new rule d, or combining separate rule a, separate rule b, and new rule c to obtain a new rule to be configured. In this way, the rules can be flexibly expanded and modified without being restricted by the framework, can be compatible with more scenarios, and are convenient for subsequent maintenance and debugging.

[0088] In another embodiment, after combining at least one individual rule and a new rule to obtain a new rule to be configured, it can also be determined whether the new rule to be configured is an existing rule. If the new rule to be configured is an existing rule, the corresponding rule is replaced with the new rule to be configured. If the new rule to be configured is not an existing rule, the new rule to be configured is added to the rule storage module.

[0089] In an embodiment provided by the present application, the method provided by the present application also includes: when a change in verification data is detected, finding the dependent storage queue corresponding to the verification data; triggering the target rules in the dependent storage queue to be dequeued in sequence according to the parsing order; and verifying the verification data according to the target rules currently dequeued.

[0090] Specifically, when a change in the verification data is detected, the form data verification task is triggered, and the dependent storage queue corresponding to the changed verification data is found. For example, the verification data currently changed is idNo, and the dependent storage queue corresponding to the verification data idNo is Figure 5A The Dep(idNo) queue shown. Then the rules in the Dep(idNo) queue are triggered to be dequeued in order of parsing. It should be understood that the parsing order refers to the order in which the target rules are parsed according to the rule tree and rule configuration, and the target rules stored in the dependency storage queue are the verification rules corresponding to the associated verification data, and do not contain irrelevant rule items. Therefore, when verifying data, the verification task amount can be reduced and the efficiency of verifying data can be improved.

[0091] Assume that the validator "Policyholder_Age2" depends on the relation value (relation), and if Figure 5B As shown, the relation value (relation) has a corresponding dependent storage queue. When the verification process of the data idNo traverses to the verifier "insured person identity_age 2", the verification process of the dependent value (relation) is triggered. Therefore, the relation value (relation) is verified based on the dependent storage queue corresponding to the dependent value (relation). If the relation value meets the rules, the verification process of the data idNo is returned. If the relation value does not meet the rules, the verifier is notified to end the verification. In addition, Figure 5A and Figure 5B The validator represented by the dotted box has the corresponding filtering conditions. If the corresponding filtering conditions are met, the verification of the validator can be skipped. If the current relation is non-SELF, the validator "insured person identity_age2" can be skipped. If the current relation is SELF, the validator "insured person identity_age2" is executed.

[0092] In an embodiment provided in the present application, the method further includes: detecting a verification result of the verification data; when the verification result of the verification data is a failure, controlling a verifier corresponding to the verification data to end verification.

[0093] Specifically, the technical solution provided by the present application can also configure a feedback step of the verification process. After verifying the verification data according to each rule item, the verification result of the verification data is detected, so that the verification result of the verification data can be determined in time. If the verification result of the verification data is a failure, the verifier corresponding to the verification data is controlled to end the verification, avoiding the subsequent verification process, so as to quickly feedback to the user whether the data is accurate or legal.

[0094] The following is an introduction to the form data verification system of this application. Figure 6 As shown, the system may include the following modules.

[0095] The data management center 610 is used to manage verification data; the verification data includes a verification value and a dependent value; the verification value is the data that needs to be verified to see if it is legal, and the dependent value is the data that is relied upon when performing rule verification on the verification value.

[0096] Specifically, managing verification data refers to processes such as storing, collecting, and inputting / outputting data. Other modules can read data from the data management center 610 , and can also store user-defined verification values ​​and dependency values ​​in the data management center 610 .

[0097] The response management center 620 is used to collect the correlation relationship between the verification value rules and the dependent values ​​by intercepting the data acquisition operation and the data setting operation of the data management center.

[0098] Specifically, a data acquisition operation (get operation) can also be a data interception operation or a data hijacking operation. A data setting operation (set operation) can also be called a data writing operation or writing data, etc. The reason for collecting the correlation between the verification value rules and the dependent values ​​is that the verification value rules sometimes need to depend on some variables. Therefore, during initialization, it is necessary to collect the specific correlation between the verification rules and the dependent values, including the dependent values ​​corresponding to the verification rules and the corresponding dependent values ​​of the verification rules of the dependent values.

[0099] The rule management center 630 is used to manage operations performed on the rules for verifying data.

[0100] Specifically, the operations performed on the rules for verifying data include storage, modification, deletion and expansion. The rule management center 630 may also include a memory, an expander and a parser. The memory is a storage collection of all customized default rules. The default rules can be understood as basic rules and common rules in certain businesses. The expander is an extended internal customized rule set that can support operations such as user addition or modification. The parser normalizes the input verification rules, and at the same time performs a depth-first traversal according to the conditions in combination with the default rule set in the memory, and outputs a parsed rule list. The conditions here refer to the triggering conditions of the default rules. For example, a rule is triggered when the check value is equal to 1 or a parameter is equal to a preset value. Then the check value equal to 1 and the parameter equal to the preset value are the conditions.

[0101] The checker 640 is used to check the check data one by one according to the rules output by the rule management center when the check trigger condition of the check data is met.

[0102] Specifically, the rules output by the rule management center after depth-first traversal are stored in the response management center 620. When the response management center 620 determines the currently changed check value through data interception and dependency collection, it finds the corresponding dependency storage queue and then triggers the verifier 640 to perform rule verification on the verification data according to the dependency storage queue. In some cases, the rule management center can provide the verifier 640 with verification rules.

[0103] Detector 650 is used to detect errors, verification status and verification results during the form data verification process.

[0104] Specifically, the detector 650 can detect the verification result of the verifier 640. For example, when the verification result is a failure, the detector 650 provides feedback to the corresponding module to end the current verification task, and can also prompt the user that the input data is illegal or wrong.

[0105] For example, insurance products generally require linkage verification of the ID card of the policyholder / insured. In addition to complying with basic ID card rules, the age range of the policyholder's ID card must be between 18 and 65 years old. When the policyholder and the insured are the policyholder themselves, the age range must be between 18 and 55 years old. The age range of the insured's ID card must be between 30 days and 55 years old. When the policyholder and the insured are spouses, the gender cannot be the same as the policyholder's ID card. When the policyholder and the insured are children, the age must be 18 years younger than the policyholder's ID card age. When the policyholder and the insured are parents, the age must be 18 years older than the policyholder's ID card age. Figure 7 As shown, assuming that the user inputs the insured's ID number idNo, the verifier 640 Figure 5A The dependent storage queue shown verifies idNo and its associated data, and the specific verification process is as follows.

[0106] When it is detected that the ID number idNo has changed, the Dep(idNo) queue traversal is triggered, and the "detector-insured person's identity_document number" is first taken out and the verifier is triggered to perform the "insured person's identity_document number" rule verification. If the verification fails, the verification ends, and the verifier 640 can notify the detector 650 of the verification end message. If the idNo value conforms to the basic format of the ID card, the verification of "detector-insured person's identity_document number" passes, and the next dependent rule "detector-insured person's identity_age 1" is traversed.

[0107] The verifier is triggered to execute the "Policyholder Identity_Age 1" rule verification. If the ID card age entered is not between 18 and 65 years old, the verification fails, the overall verification ends, and the detector 650 is notified. If the ID card age is between 18 and 65 years old, the verification passes, and the next dependent rule "Detector-Policyholder Identity_Age 2" is traversed.

[0108] like Figure 8 As shown, when traversing to the dependent rule "Detector-Insured Person Identity_Age 2", it is found that it depends on the non-form item data relation, so the current relation value is taken from the data management center 610. If the current relation value is not equal to the SELF of the person, the verification of "Detector-Insured Person Identity_Age 2" is skipped, and then the next dependent rule traversal is executed. If the current relation value is equal to the SELF of the person, the rule verification of "Detector-Insured Person Identity_Age 2" is executed. If the age of the ID card entered is not between 18 and 55 years old, the verification fails, the overall verification is ended and the detector 650 is notified. If the age of the ID card entered is between 18 and 55 years old, the verification passes, and then the next dependent rule "Detector-Insured Person Identity_Age Difference 1" is traversed.

[0109] When traversing to the dependent rule "Detector-Insured Person Identity_Age Difference 1", it is found that it depends on the form item insured person's ID number (bbIdNo) and the non-form item data relation, so the current bbIdNo and the current relation are taken out from the data management center 610. If the current relation is not equal to PARENTS (parents), skip the "Detector-Insured Person Identity_Age Difference 1" check and directly traverse the next dependent rule. If the current relation is equal to PARENTS, judge the age difference between the idNo value age and the bbIdNo value age. If it does not meet the requirement that the bbIdNo age is 18 greater than the idNo, the check fails, the check traversal ends and the detector 650 is notified. If it meets the requirement that the bbIdNo age is 18 greater than the idNo, the check passes, and then traverses the next dependent rule "Detector-Insured Person Identity_Age Difference 2".

[0110] When traversing to the dependent rule "Detector-Insured Person Identity_Age Difference 2", it is found that its dependent form item insured person's ID number (bbIdNo) and non-form item data relation are found, so the current bbIdNo and current relation are taken out from the data management center 610. If the current relation is not equal to CHILDREN (children), skip the "Detector-Insured Person Identity_Age Difference 2" check and directly traverse the next dependent rule. If the current relation is equal to CHILDREN, judge the age difference between the idNo value and the bbIdNo value. If it does not meet the requirement that the bbIdNo age is 18 less than the idNo, the check fails, the check traversal ends and the detector 650 is notified. If it meets the requirement that the bbIdNo age is 18 less than the idNo, the check passes, and then traverses the next dependent rule "Detector-Insured Person Identity_Age Difference 3". It should be understood that the timing flow chart of the dependent rule "Detector-Insured Person Identity_Age Difference 2" ( Figure 8 Not shown in the figure) is similar to the timing flow chart of the dependent rule "Detector-Insured Person Identity_Age Difference 1".

[0111] When traversing to the dependent rule "Detector-Insured Person Identity_Age Difference 3", it is found that it depends on the form item insured person's ID number (bbIdNo) and the non-form item data relation, so the current bbIdNo and the current relation are taken out from the data management center 610. If the current relation is not equal to SPOUSE (spouse), skip the "Detector-Insured Person Identity_Age Difference 3" check and directly traverse the next dependent rule. If the current relation is equal to SPOUSE, determine whether the gender resolved by the idNo value is the same as the gender resolved by the bbIdNo value. If the genders are the same, the check fails, the check traversal ends and the detector 650 is notified. If the genders are not the same, the check passes, and then the next dependent rule is traversed. It should be understood that the timing flow chart of the dependent rule "Detector-Insured Person Identity_Age Difference 3" ( Figure 8 (not shown) is also similar to the timing flow chart of the dependent rule "Detector-Insured Person Identity_Age Difference 1".

[0112] according to Figure 5A The dependent storage queue in , at which time the queue has been traversed, thus triggering the completion of the verification, and notifying the detector 650 of the verification pass result.

[0113] It should be known that the specific implementation content of the form data verification system in the present application has been explained in detail in the corresponding method embodiment and will not be repeated here.

[0114] Fig. 9 The computer system structure block diagram of the electronic device for implementing the embodiment of the present application is schematically shown. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor is used to execute the configuration method of the form data verification provided by the present application.

[0115] It should be noted that Fig. 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0116] like Fig. 9 As shown, the computer system 900 includes a processor 901, which can be a CPU (Central Processing Unit) or an MCU (Microcontroller Unit). The processor 901 can perform various appropriate actions and processes according to the program stored in the read-only memory 902 (Read-Only Memory, ROM) or the program loaded from the storage part 908 to the random access memory 903 (Random Access Memory, RAM). In the random access memory 903, various programs and data required for system operation are also stored. The processor 901, the read-only memory 902 and the random access memory 903 are connected to each other through a bus 904. The input / output interface 905 (Input / Output interface, i.e., I / O interface) is also connected to the bus 904.

[0117] The following components are connected to the input / output interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.

[0118] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, various functions defined in the system of the present application are executed.

[0119] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0122] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the implementation method according to the present application.

[0123] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

[0124] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.< / form>

Claims

1. A configuration method for form data verification, characterized in that: include: Get the form's validation data and rules to be configured; Configuring the corresponding rule to be configured for the verification data to obtain the rule configuration of the verification data; Initialize based on the rule configuration to form a rule tree corresponding to the verification data; Based on the verification data and the rule configuration, traverse the rule tree to the leaf node in a depth-first manner to parse out the target rule of the verification data; The target rules are arranged in a parsing order to obtain a dependent storage queue corresponding to the verification data.

2. The configuration method for form data verification according to claim 1, characterized in that: Based on the verification data and the rule configuration, the rule tree is traversed to a leaf node in a depth-first manner to parse out a target rule of the verification data, including: Find the target root node where the target rule corresponding to the verification data is located; the verification data includes a verification value and a dependent value, the verification value is the data that needs to be verified to be legal, and the dependent value is the data that the verification value depends on when performing rule verification; Traverse the leaf nodes under the target root node and obtain the target rule on the current leaf node; When the target rule on the current leaf node has the dependency value, the target rule corresponding to the dependency value is obtained according to the rule configuration.

3. The configuration method for form data verification according to claim 1, characterized in that: The step of arranging the target rules in a parsing order to obtain a dependent storage queue corresponding to the verification data includes: When the target rule of the verification data is parsed, the verification data required by the target rule is read; Associating the target rule with corresponding verification data; The associated target rules are queued into the corresponding dependency manager in the parsing order to obtain the dependency storage queue corresponding to the verification data.

4. The configuration method for form data verification according to claim 1, characterized in that: The initialization based on the rule configuration to form a rule tree corresponding to the verification data includes: Obtaining a data description and a verification triggering mode of the verification data defined by a user; the data description refers to a field describing the attributes of the verification data; the verification triggering mode includes a responsive trigger and an active trigger; Based on the rule configuration, the verification data, the data description and the verification triggering mode, a new verifier corresponding to the verification data is created; Based on the rule reference relationship in the rule configuration, the hierarchical relationship of the nodes of the rule tree is determined.

5. The configuration method for form data verification according to claim 1, characterized in that: The configuring the corresponding rule to be configured for the verification data to obtain the rule configuration of the verification data includes: Obtaining a mapping relationship between the verification data and the rule to be configured; The verification data and the rule to be configured are configured based on the mapping relationship to obtain the rule configuration of the verification data.

6. The configuration method for form data verification according to claim 1, characterized in that: After obtaining the verification data of the form and the rules to be configured, the method further includes: Splitting the rule to be configured into multiple separate rules; Get new rules defined by the user; At least one of the separate rules and the new rule are combined to obtain a new rule to be configured.

7. The configuration method for form data verification according to claim 1, characterized in that: The method further comprises: When a change in the verification data is detected, searching the dependent storage queue corresponding to the verification data; Triggering the target rules in the dependent storage queue to be dequeued in sequence according to the parsing order; The verification data is verified according to the target rule currently dequeued.

8. The configuration method for form data verification according to claim 1, characterized in that: The method further comprises: Detecting a verification result of the verification data; When the verification result of the verification data is failure, the verifier corresponding to the verification data is controlled to end the verification.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the configuration method for form data verification described in any one of claims 1 to 8 is implemented.

10. A system for verifying form data, characterized in that: include: A data management center is used to manage verification data; the verification data includes a verification value and a dependent value; The check value is data that needs to be checked for legality, and the dependent value is data that the check value depends on when performing rule verification; A response management center is used to collect the correlation relationship between the verification value rule and the dependency value by intercepting the data acquisition operation and the data setting operation of the data management center; A rule management center, used to manage operations performed on the rules of the verification data; A verifier, used for verifying the verification data one by one according to the rules output by the rule management center when the verification triggering condition of the verification data is met; Detector, used to detect errors, verification status and verification results during the form data verification process.

Citation Information

Cited By

  • Form verification method and device based on topological graph

    CN119670731A