CN111562965B - Page data verification method and device based on decision tree - Google Patents

Page data verification method and device based on decision tree Download PDF

Info

Publication number
CN111562965B
CN111562965B CN202010343728.XA CN202010343728A CN111562965B CN 111562965 B CN111562965 B CN 111562965B CN 202010343728 A CN202010343728 A CN 202010343728A CN 111562965 B CN111562965 B CN 111562965B
Authority
CN
China
Prior art keywords
page element
rule
check
page
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010343728.XA
Other languages
Chinese (zh)
Other versions
CN111562965A (en
Inventor
潘成策
韩立炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Handhui Technology Group Co ltd
Original Assignee
Shenzhen Handhui Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Handhui Technology Group Co ltd filed Critical Shenzhen Handhui Technology Group Co ltd
Priority to CN202010343728.XA priority Critical patent/CN111562965B/en
Publication of CN111562965A publication Critical patent/CN111562965A/en
Application granted granted Critical
Publication of CN111562965B publication Critical patent/CN111562965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4494Execution paradigms, e.g. implementations of programming paradigms data driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method and a device for checking page data based on a decision tree, wherein the method comprises the following steps: generating a page element check rule list corresponding to the service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among page element components; acquiring data to be checked input by a user from the service page, and traversing the check rules in the page element check rule list according to the data to be checked; if the data to be checked passes through the page element check rule table, determining that the data to be checked passes through the check, otherwise, determining that the data to be checked fails to pass through the check. The method realizes the driving of formatted data, supports various possible complex interaction or linkage restriction rules, and supports the rapid development, multiplexing and iteration of service pages; and the investment cost can be saved, the development period can be shortened, and the productivity can be improved.

Description

Page data verification method and device based on decision tree
Technical Field
The application belongs to the technical field of data verification, and particularly relates to a method and a device for verifying page data based on a decision tree, and electronic book equipment and a storage medium for executing the method for verifying page data based on the decision tree.
Background
With the development of internet technology, more and more services are managed online. On-line management in the aspect of insurance business is based on the fact that insurance classification is numerous, and trial calculation of different insurance products is carried out, contents of different modules such as an applicant, an insured person, an insuring scheme, a beneficiary and the like in an insuring order page are different, and rule verification corresponding to specific elements such as the age, the sex and the like of the applicant in the contents of each module are also different. The online managed service page has a variety of different module contents therein. In the prior art, when an insurance business page is configured to verify an input data, the following general method is adopted: for each service, developing and encoding page module element content corresponding to the service by inputting a great amount of manpower, material resources and time in advance, and configuring corresponding rule check logic according to user input. The method for verifying the configuration data has the advantages of high input cost, long development period, low output efficiency and high later iteration cost.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method and apparatus for checking page data based on a decision tree, and electronic book devices and storage media for executing the method for checking page data based on a decision tree, which can support various possible constraint rules of complex interactions or linkages, support rapid development, multiplexing and iteration of service pages, and/or save investment costs, accelerate development cycle, and improve productivity.
A first aspect of an embodiment of the present application provides a method for checking page data based on a decision tree, where the method for checking page data based on a decision tree includes:
generating a page element check rule list corresponding to the service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among page element components;
acquiring data to be checked input by a user from the service page, and traversing the check rules in the page element check rule list according to the data to be checked;
if the data to be checked passes through the page element check rule table, determining that the data to be checked passes through the check, otherwise, determining that the data to be checked fails to pass through the check.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the generating, by a preset rule engine, a page element check rule list corresponding to a service based on the service page, where the page element check rule list is embodied as a step of establishing a check decision tree of an association relationship between page element components, includes:
Identifying the data input types of all page element components in the business page corresponding to the business;
acquiring a rule item to be configured matched with the data input type of the page element assembly from a rule engine built-in rule base according to the data input type of the page element assembly;
and carrying out parameter configuration on the rule items to be configured according to the verification requirement information of the service, and generating a page element verification rule list corresponding to the service.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the rule items to be configured stored in the rule base include one or more of regular expression type rule items, logic expression type rule items, circulation type rule items, and decision tree type rule items.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, before the step of acquiring, from a rule base built in a rule engine, a rule item to be configured that matches a data input type of the page element component according to the data input type of the page element component, the method includes:
setting a matching condition for the rule items to be configured stored in the rule base so that the rule items to be configured have a mapping relation with the data input types.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the step of obtaining data to be verified, which is input by a user, from the service page, and traversing a verification rule in the page element verification rule list according to the data to be verified includes:
combining all page element components corresponding to the data to be checked to generate a check queue;
and carrying out check processing on the page element assemblies in the check queue one by one, wherein if one page element assembly is checked to report errors, determining that the data to be checked is not checked to pass through and exit the check flow, otherwise, continuing to execute the check flow, and carrying out check processing on the page element assemblies in the check list.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the step of performing a check process on page element components in the check queue one by one further includes:
if one page element component passes the verification, identifying whether the page element component has a linked decision tree exclusion rule in the page element verification rule list;
if the linked decision tree exclusion rule exists, checking the page element components in the decision tree exclusion rule.
With reference to the fourth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the step of performing a check process on page element components in the check queue one by one further includes:
if one page element component passes the verification, identifying whether the page element component has a linked decision tree containing rule in the page element verification rule list;
if the linked decision tree contains rules, checking the page element components in the rule of the decision tree exclusion.
A second aspect of the embodiments of the present application provides a decision tree-based page data verification device, where the decision tree-based page data verification device includes:
the generation module is used for generating a page element check rule list corresponding to the service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among the page elements;
the verification module is used for acquiring data to be verified, which is input by a user, from the service page, traversing the verification rules in the page element verification rule list according to the data to be verified;
And the determining module is used for determining that the data to be checked passes the check if the error is not reported in the page element check rule table traversed by the data to be checked, or determining that the data to be checked fails the check.
A third aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the decision tree based page data verification method according to any one of the first aspects when the computer program is executed.
A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the decision tree based page data verification method according to any one of the first aspects.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
according to the method and the device, based on the service page, a page element check rule list corresponding to the service is generated through a preset rule engine, and the page element check rule list is a check decision tree, so that the association relation between the check rules corresponding to the page element components in the service page can be embodied. And inputting the data to be checked, which is obtained from the service page and input by the user, into a preset rule engine, so that the data to be checked traverses the check rules in the page element check rule list according to the check decision tree, and the check process is realized. If the data to be checked is not in error reporting, the data to be checked is checked, otherwise, the data to be checked is not checked. Therefore, the verification rule of each page element component in the business page is driven by formatted data, and various possible complex interaction or linkage restriction rules are supported in a rule engine framework; the method has the advantages that the rules of the page can be generated through visual management of page configuration and input into a rule engine, and further, different business development online and iteration are rapidly realized through the rule engine, so that the investment of labor time cost is reduced, the development period is shortened, and the productivity is improved; support the rapid development, multiplexing and iteration of business pages.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a basic method of a page data verification method based on a decision tree according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for generating a rule list for checking page elements in a decision tree-based data checking method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a verification flow when traversing a verification rule in a page element verification rule list according to data to be verified in the decision tree-based page data verification method provided in the embodiment of the present application;
fig. 4 is a schematic flowchart of another method when traversing a check rule in a page element check rule list according to data to be checked in the decision tree-based page data check method according to the embodiment of the present application;
Fig. 5 is a schematic flowchart of another method for traversing a check rule in a page element check rule list according to data to be checked in the decision tree-based page data checking method according to the embodiment of the present application.
FIG. 6 is a schematic structural diagram of a page data verification device based on a decision tree according to an embodiment of the present application;
fig. 7 is a schematic diagram of an electronic device for implementing a method for verifying page data based on a decision tree according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In order to illustrate the technical solutions described in the present application, the following description is made by specific examples.
The application aims to provide a page data verification method based on a decision tree, which is characterized in that a business page is abstracted to be composed of page element components, and a verification decision tree is formed by predefining value field specifications of the element components and verification rules corresponding to the element components in a rule engine and supporting linkage among the page element components. Thus, the page rule is driven by formatted data, and various possible complex interaction limit rules are supported in a standard rule engine framework, so that the rapid development, multiplexing and iteration of the business page are better supported.
In some embodiments of the present application, referring to fig. 1, fig. 1 is a schematic flow chart of a basic method of a page data verification method based on a decision tree according to an embodiment of the present application. The details are as follows:
in step S101, a page element check rule list corresponding to a service is generated by a preset rule engine based on the service page, where the page element check rule list is embodied as a check decision tree with an association relationship between page element components.
In this embodiment, in a preset rule engine, based on product granularity, a minimum unit operated by a user in a service page is abstracted into page element components, and data input types of each page element component are classified, where the data input types are input types of data correspondingly input in the page element components when the user executes service event processing. In this embodiment, the selectable value range settings of the page element component for each data input type are different. Each page element component in the business page has a corresponding data entry type. In this embodiment, according to the verification requirement information of the service, a value range verification rule is created for each page element component in combination with the input type of the page element component, and a page element verification rule list corresponding to the current service item is generated. The verification requirement information of the service may be a service rule or a service range set for a service product, for example, an application range applicable to a certain insurance service configuration is a male in Guangdong province and Fujian province, the information corresponds to two page element components of "address" and "gender", where the limitation condition of the page element component of "address" is the male in Guangdong province and Fujian province, and the limitation condition of the page element component of "gender" is the male, where the verification rule in the page element verification rule list includes { address: guangdong province, fujian province, sex: male }. In this embodiment, association processing is further performed on the value range check rule corresponding to the page element component according to the association relationship between the page elements in the service requirement of the current service item, for example, if the conditions of the address page element and the gender page element component in the above example are simultaneously satisfied, the check rules of the two page element components are connected in series, so that the page element check rule list is embodied as a check decision tree with the association relationship between the page element components, and the check rule linked between the page element component and the page element component is implemented.
In step S102, data to be verified, which is input by a user, is obtained from the service page, and the verification rule in the page element verification rule list is traversed according to the data to be verified.
In this embodiment, a service page includes a plurality of page element components, and a user may perform a service processing item with respect to each page element component in the service page, where data input in the service page during the user performs the service processing item is to-be-verified data. In this embodiment, the data to be verified, which is input in each page element component by the user and corresponds to the data, may be obtained from the service page by scanning or identifying. And further, inputting the data to be checked which is input by the user in each page element component into a preset rule engine, so that the data to be checked traverses the check rules in the page element check rule list, and the check processing of the data to be checked is realized, so as to determine whether the data to be checked meets all the check rules which are created in the rule engine based on the service requirements of the service items.
In step S103, if the error is not reported in the data to be verified traversing page element verification rule table, determining that the data to be verified passes the verification, otherwise, determining that the data to be verified fails the verification.
In this embodiment, the data to be checked input by the user is in a JS object numbered musical notation (JavaScript Object Notation, JSON)) structure form, including the name of the page element component and the corresponding input data value. In this embodiment, based on the correspondence between the name of the page element component and the corresponding input data value, the value range of the verification rule configured corresponding to the page element component is obtained from the page element verification rule list according to the name of the page element component, and then the data value input by the user in the page element component is compared with the value range, so as to determine whether the input data value meets the value range requirement, and if so, the verification of the data value input by the user in the page element component is displayed. Otherwise, displaying the error report. In this embodiment, the page element check rule list is embodied as a check decision tree with an association relationship between page element components, and when the input data values of multiple page element components input in the service page are checked, all check rules created based on the service requirements of the service item in the rule engine are traversed according to the path of the check decision tree. If the input data value of each page element component traverses the page element check rule table and no error report occurs, determining that the data to be checked input by the service processing item executed at this time passes the check. If the input data value of the page element component traverses the page element check rule table to report errors, the data to be checked input by the service processing item executed at this time is determined to not pass the check.
The page data verification method based on the decision tree provided by the embodiment is based on the service page, and a page element verification rule list corresponding to the service is generated through the preset rule engine, wherein the page element verification rule list is a verification decision tree, and the association relationship between the corresponding verification rules of all page element components in the service page can be embodied. And inputting the data to be checked, which is obtained from the service page and input by the user, into a preset rule engine, so that the data to be checked traverses the check rules in the page element check rule list according to the check decision tree, and the check process is realized. If the data to be checked is not in error reporting, the data to be checked is checked, otherwise, the data to be checked is not checked. Therefore, the verification rule of each page element component in the business page is driven by formatted data, and various possible complex interaction or linkage restriction rules are supported in a rule engine framework; the method has the advantages that the rules of the page can be generated through visual management of page configuration and input into a rule engine, and further, different business development online and iteration are rapidly realized through the rule engine, so that the investment of labor time cost is reduced, the development period is shortened, and the productivity is improved; support the rapid development, multiplexing and iteration of business pages.
In some embodiments of the present application, referring to fig. 2, fig. 2 is a flow chart of a method for generating a page element check rule list in the decision tree-based data check method according to the embodiments of the present application. The details are as follows:
in step S201, identifying data input types of all page element components in a service page corresponding to a service;
in step S202, according to the data input type of the page element component, a rule item to be configured, which is matched with the data input type of the page element component, is obtained from a rule base built in the rule engine;
in step S203, parameter configuration is performed on the verification rule according to the verification requirement information of the service, and a page element verification rule list corresponding to the service is generated.
In this embodiment, taking an online management system of an insurance service as an example, a system can manage a plurality of different insurance service products, and configure various service pages according to the content of different modules such as insurance classification, trial calculation, insurance applicant, insured person, insurance scheme, beneficiary, and the like when making an insurance policy. In a preset rule engine, the minimum unit operated by a user in a service page can be abstracted into page element components based on service product granularity, and the data input type of each page element component is classified. For example, the data input types of the page element components may be classified into text type, enumeration type, numerical section type, date type, address type, occupation type, and pure display type, etc. In some specific embodiments, the data input type of the page element component can be determined according to the characteristics of the data input by the user, for example, in a business page, for the page element component of 'applicant name', the data required to be input by the user is text data representing the name of the applicant, namely, the data input type of the page element component is determined to be text; or, for the "applicant gender" page element component, two options of "male" and "female" are configured in the service page, and the user needs to select one of the two options as input data, i.e. determine that the data input type of the page element component is an enumeration type. In some specific embodiments, a rule base is built in the rule engine, multiple types of rule items to be configured are stored in the rule base, and different verification rules can be generated by configuring different parameters of the rule items to be configured. Based on this, in this embodiment, during the process of generating the page element check rule list by the rule engine, the data input types of all page element components in the service page corresponding to the service can be identified first, then according to the data input type of each page element component, the rule item to be configured matched with the rule item is found out from the rule base built in the rule engine, and further, according to the check requirement information corresponding to the service product, parameter configuration is performed on each page element component one by one, and the value domain belonging to the page element component is created, so as to generate the check rule. And according to the verification requirement information of the service, the linkage relation between the corresponding verification rules of the page element components is determined. And integrating the value domain check rules of all page element components of the service page according to the association relationship to generate a page element check rule list corresponding to the service. The page element check rule list is embodied as a check decision tree with the association relation among the page element components.
In some embodiments of the present application, the rule to be configured items stored in the rule base include one or more of regular expression type rule items, logic expression type rule items, circulation type rule items, and decision tree type rule items. The regular expression rule terms realize the rule of inspection through a regular expression, the regular expression is a text mode, a rule character string is formed by utilizing certain specific characters or the combination of the specific characters which are defined in advance, and the rule character string is used for expressing a filtering logic of the character string; the logical expression rule terms implement the rule of inspection by logical expressions of if, then, else, etc.; the loop rule item is a recyclable check rule which allows specifying an object of a set type, and carrying out loop iteration on each object in the set, wherein in a loop body, a plurality of logic expression rules consisting of if, then and otherwise; the decision tree rule is used for realizing the check rule by constructing and forming an inverted tree structure, and is particularly used for processing and judging more conditions, combining the conditions mutually, and having various decision scenes, so that the business rule is more vivid.
In some embodiments of the present application, in the rule engine, setting a matching condition for a rule item to be configured stored in a rule base is further included, so that a mapping relationship exists between the rule item to be configured and a data input type. Therefore, after the data input type of the page element component is identified, the rule item to be configured, which is matched with the data input type of the page element component, can be obtained from the rule base according to the mapping relation between the rule item to be configured and the data input type. For example, in the present embodiment, the data input types based on the page element components may be classified into text type, enumeration type, numerical interval type, date type, address type, occupation type, and the like, and matching conditions are set for rule items to be configured stored in the rule base as follows: mapping and associating the text type data input type with the regular expression type rule item, and generating a check rule corresponding to the text type data through the regular expression type rule item to realize logic for judging whether the text data meets the check rule; mapping and associating the enumerated data input type with a circulating rule item, wherein the value range of the enumerated data is a set of values, and a check rule can be generated through the circulating rule item, so that if the value input in the page element component is one of the sets, logic meeting the check rule is judged; mapping and associating the data input types of the numerical value interval type and the date type with a logic expression type rule item, wherein the value fields of the numerical value interval type data and the date type data are a designated interval, and generating a check rule through the logic expression type rule item, so that if the value input in the page element assembly falls into the designated interval range, logic meeting the check rule is judged; mapping and associating the data input types of the address type and the professional type with decision tree type rule items, wherein the value fields of the address type data and the professional type data are in a tree structure, and the check rule can be generated through the decision tree type rule items, so that if a path representing the address type data and the professional type data can be obtained from the tree structure, the logic meeting the check rule is judged.
In some embodiments of the present application, referring to fig. 3, fig. 3 is a schematic diagram of a verification flow when traversing a verification rule in a page element verification rule list according to data to be verified in the decision tree-based page data verification method provided in the embodiments of the present application. The details are as follows:
in step S301, all page element components corresponding to the data to be checked are combined to generate a check queue;
in step S302, a check process is performed from the page element assemblies in the check queue one by one, where if a fault occurs in the check process of one page element assembly, it is determined that the data to be checked is checked and the check flow is not passed, otherwise, the check process performed on the page element assemblies in the check list is continued.
In this embodiment, based on the page element check rule list, each page element component is traversed in turn to check whether the input data value corresponding to each page element component in the data to be checked meets the check rule created in the rule engine based on the service. In this embodiment, the verification process is entered after obtaining the data to be verified input by the user from the service page. The obtained data to be checked is in a JS object numbered musical notation (JavaScript Object Notation, JSON)) structural form and comprises the names of page element components and corresponding input data values, so that according to the data to be checked, which is input by a user and is obtained from a business page, all page element components of the business page can be obtained, and then all page element components in the business page are loaded into a check queue, and then check processing is carried out on the page element components in the check queue one by one. And randomly selecting one page element component in the queue for verification processing, acquiring the input type and the value field of the page element component from a page element verification rule list, and extracting the input data value corresponding to the page element component from the data to be verified according to the name of the page element component. And judging whether the input data value meets the value range requirement of the page element assembly, if the input data value does not meet the value range requirement, reporting the value by mistake, and if the input data value meets the value range requirement, marking that the input data value passes the verification, continuing to execute the verification process, and performing the verification process on the next page element assembly in the verification queue until all page element assemblies in the verification queue pass the verification. In this embodiment, if all page element components in the check queue pass the check after the traversal, it is indicated that the data to be checked passes the check of the rule engine.
In this embodiment, before the verification processing is performed on the page element component in the verification queue, it may be further determined whether the input data value corresponding to the page element component is data that must be transmitted, if so, it is determined whether the input data value is empty, if so, it directly reports an error and exits the verification process, and if not, it performs the verification processing. If the data is unnecessary to transmit, judging whether a check rule corresponding to the page element assembly in the page element check rule list is empty, if not, directly checking the page element assembly, otherwise, marking that the page element assembly passes the check.
In some embodiments of the present application, referring to fig. 4, fig. 4 is a schematic flow chart of another method for traversing a check rule in a page element check rule list according to data to be checked in the decision tree-based page data check method according to the embodiments of the present application. The details are as follows:
in step S401, if a page element component passes the verification, identifying whether the page element component has a linked decision tree rule in the page element verification rule list;
in step S402, if there is a linked decision tree exclusion rule, a verification process is performed on the page element component in the decision tree exclusion rule.
In this embodiment, in the process of performing the verification processing on the page element components in the verification queue one by one, if verification results in that one page element component passes the verification, whether the page element component has a linked decision tree exclusion rule in a page element verification rule list may also be identified. If the page element component has the linked decision tree exclusion rule, traversing the page element component associated with the decision tree exclusion rule. Specifically, firstly judging whether the check rule of all page element components in the decision tree exclusion rule is satisfied, if so, traversing each page element component associated with the decision tree exclusion rule, if the value range of any page element component is not checked in a rule engine, otherwise, the decision tree exclusion rule of the element component is not passed, reporting errors at the moment and exiting the check flow; if the check rules of all page element components are not required to be met, checking the value fields of any page element components in a rule engine, and excluding the rule check from the decision tree. Further, after the decision tree rule of the element component passes the verification, whether the data value input by the current user is outside the value range of the rule is checked, if not, the scene is not in accordance with the decision tree rule, and the error is reported and exited. If no error is reported and other decision tree exclusion rules exist, executing a verification process on the other decision tree exclusion rules until all the linked decision tree exclusion rules pass the verification.
In some embodiments of the present application, referring to fig. 5, fig. 5 is a flowchart illustrating another method when traversing a check rule in a page element check rule list according to data to be checked in the decision tree-based page data check method according to the embodiments of the present application. The details are as follows:
in step S501, if a page element component passes the verification, identifying whether the page element component has a linked decision tree containing rule in the page element verification rule list;
in step S502, if the linked decision tree includes a rule, a verification process is performed on the page element component in the rule of excluding the decision tree.
In this embodiment, in the process of performing the verification processing on the page element assemblies in the verification queue one by one, if verification results in that one page element assembly passes the verification, whether the element assembly has a linked decision tree containing rule may be further confirmed, and if the page element assembly has a linked decision tree containing rule, the page element assembly associated with the decision tree containing rule is traversed. Specifically, firstly judging whether the check rule of all page element components in the decision tree containing rule is required to be met, if so, traversing each page element component associated with the decision tree containing rule, and if the value range of any page element component is not checked in a rule engine, the decision tree containing rule of the element component is not checked, reporting errors at the moment and exiting the check flow; if the check rules of all page element components in the decision tree containing rules are not required to be met, checking the value fields of any page element components in the rule engine to pass, and if the check rules of the page element components in the decision tree containing rules are not required to be met, the decision tree containing rules pass. Further, after the decision tree of the element component passes the rule verification, whether the value input by the current user is outside the value range containing the rule is checked, if not, the scene is not in accordance with the decision tree containing the rule, and at the moment, the error is reported and the verification process is exited. If no error is reported and other decision tree rule is eliminated, executing the checking flow according to the other decision tree rule until all the decision tree rules pass the checking. And after all the decision tree containing rules pass the verification, further determining whether an uncore page element component exists in the verification queue, and if so, performing verification processing on the page element component until all the page element components in the verification queue pass the verification.
In some embodiments of the present application, for a page element component, the configuration of the exclusion rules and inclusion rules in the check decision tree is determined based on the value range data amount and the data amount characterizing the passing of the check. If the data quantity of the page element component, which is characterized by passing the verification, occupies a larger proportion of the data quantity of the value range, the page element component can be verified by selecting a configuration exclusion rule from a verification decision tree, otherwise, if the data quantity of the page element component, which is characterized by passing the verification, occupies a smaller proportion of the data quantity of the value range, the page element component can be verified by selecting a configuration inclusion rule from the verification decision tree. For example, in one scenario, the guarantee time of the insurance may be 1-10 years, the guarantee amount of the insurance may be 10-100 tens of thousands, and the guarantee amount may be more than 50 tens of thousands when only the guarantee time of 1-9 years is selected. For the scene, if the checked guarantee amount in the page element assembly corresponding to the guarantee amount is more than 50 ten thousand, if an exclusion rule is configured in a decision tree, checking whether the input data value in the page element assembly corresponding to the guarantee time is 10 years, if so, checking the page element assembly corresponding to the guarantee time is not passed, otherwise, checking is passed; if the rule is configured in the decision tree, whether the input data value in the page element component corresponding to the guarantee time is 1 year, 2 years, 3 years, 4 years, 5 years, 6 years, 7 years, 8 years or 9 years is required to be checked, if yes, the page element component corresponding to the guarantee time passes the check, otherwise, the check does not pass. Whereby it is better suited to configure the exclusion rules in the decision tree for verification for this scenario. It may be appreciated that in this embodiment, a check decision tree may be configured with an exclusion rule and an inclusion rule according to different check scenarios, and when executing a check procedure, the check decision tree may include checking the exclusion rule and checking the inclusion rule, where the order of checking the exclusion rule and the inclusion rule is not limited.
It should be understood that, the sequence number of each step in the foregoing embodiment does not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
In some embodiments of the present application, referring to fig. 6, fig. 6 is a schematic structural diagram of a page data verification device based on a decision tree according to an embodiment of the present application, which is described in detail below:
the page data verification device based on the decision tree comprises: a generation module 601, a verification module 602 and a determination module 603. The generating module 601 is configured to generate, based on a service page, a page element check rule list corresponding to the service through a preset rule engine, where the page element check rule list is embodied as a check decision tree with an association relationship between page elements. The verification module 602 is configured to obtain data to be verified, which is input by a user, from the service page, and traverse a verification rule in the page element verification rule list according to the data to be verified. The determining module 603 is configured to determine that the data to be verified passes the verification if no error is reported in the page element verification rule table, or determine that the data to be verified fails the verification.
The page data verification device based on the decision tree corresponds to the page data verification method based on the decision tree one by one.
In some embodiments of the present application, please refer to fig. 7, fig. 7 is a schematic diagram of an electronic device for implementing a decision tree-based page data verification method according to an embodiment of the present application. As shown in fig. 7, the electronic device 7 of this embodiment includes: a processor 71, a memory 72 and a computer program 73 stored in said memory 72 and executable on said processor 71, for example a decision tree based page data check program. The processor 71, when executing the computer program 72, implements the steps of the various decision tree based page data verification method embodiments described above. Alternatively, the processor 71 may perform the functions of the modules/units of the above-described device embodiments when executing the computer program 73.
By way of example, the computer program 73 may be partitioned into one or more modules/units that are stored in the memory 72 and executed by the processor 71 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions for describing the execution of the computer program 73 in the electronic device 7. For example, the computer program 73 may be split into:
The generation module is used for generating a page element check rule list corresponding to the service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among the page elements;
the verification module is used for acquiring data to be verified, which is input by a user, from the service page, traversing the verification rules in the page element verification rule list according to the data to be verified;
and the determining module is used for determining that the data to be checked passes the check if the error is not reported in the page element check rule table traversed by the data to be checked, or determining that the data to be checked fails the check.
The electronic device may include, but is not limited to, a processor 71, a memory 72. It will be appreciated by those skilled in the art that fig. 7 is merely an example of the electronic device 7 and is not meant to be limiting as the electronic device 7 may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may further include an input-output device, a network access device, a bus, etc.
The processor 71 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 72 may be an internal storage unit of the electronic device 7, such as a hard disk or a memory of the electronic device 7. The memory 72 may be an external storage device of the electronic device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 7. Further, the memory 72 may also include both an internal storage unit and an external storage device of the electronic device 7. The memory 72 is used to store the computer program as well as other programs and data required by the electronic device. The memory 72 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each method embodiment described above. . Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium may include content that is subject to appropriate increases and decreases as required by jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is not included as electrical carrier signals and telecommunication signals.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. The page data verification method based on the decision tree is characterized by comprising the following steps of:
based on a service page, generating a page element check rule list corresponding to the service through a preset rule engine, wherein the page element check rule list is embodied as a check decision tree with the association relation among page element components, and forming the check decision tree through the value domain specification of the page element components and check rules corresponding to the page element components in the rule engine and supporting linkage among the page element components;
Acquiring data to be checked input by a user from the service page, and traversing the check rules in the page element check rule list according to the data to be checked;
if the data to be checked passes through the page element check rule table, determining that the data to be checked passes through the check, otherwise, determining that the data to be checked fails to pass through the check;
the method comprises the steps of generating a page element check rule list corresponding to a service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among page element components, and the method comprises the following steps:
identifying the data input types of all page element components in the business page corresponding to the business;
acquiring a rule item to be configured matched with the data input type of the page element assembly from a rule engine built-in rule base according to the data input type of the page element assembly;
and carrying out parameter configuration on the rule items to be configured according to the verification requirement information of the service, and generating a page element verification rule list corresponding to the service.
2. The decision tree based page data verification method according to claim 1, wherein the rule items to be configured stored in the rule base include one or more of regular expression type rule items, logic expression type rule items, cyclic type rule items, and decision tree type rule items.
3. The method for checking page data based on decision tree according to claim 2, wherein before the step of obtaining the rule item to be configured matched with the data input type of the page element component from the rule base built in the rule engine according to the data input type of the page element component, the method comprises:
setting a matching condition for the rule items to be configured stored in the rule base so that the rule items to be configured have a mapping relation with the data input types.
4. The method for checking page data based on decision tree according to claim 1, wherein the step of obtaining data to be checked inputted by a user from the service page and traversing the check rules in the page element check rule list according to the data to be checked comprises:
combining all page element components corresponding to the data to be checked to generate a check queue;
and carrying out check processing on the page element assemblies in the check queue one by one, wherein if one page element assembly is checked to report errors, determining that the data to be checked is not checked to pass through and exit the check flow, otherwise, continuing to execute the check flow, and carrying out check processing on the page element assemblies in the page element check rule list.
5. The method for checking page data based on decision tree as recited in claim 4, wherein the step of checking page element components in the check queue one by one further comprises:
if one page element component passes the verification, identifying whether the page element component has a linked decision tree exclusion rule in the page element verification rule list;
if the linked decision tree exclusion rule exists, checking the page element components in the decision tree exclusion rule.
6. The method for checking page data based on decision tree as recited in claim 4, wherein the step of checking page element components in the check queue one by one further comprises:
if one page element component passes the verification, identifying whether the page element component has a linked decision tree containing rule in the page element verification rule list;
and if the linked decision tree contains rules, checking the page element components in the decision tree contains rules.
7. A decision tree based page data verification device, characterized in that the decision tree based page data verification device comprises:
The generation module is used for generating a page element check rule list corresponding to the service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among page elements, and the check decision tree is formed by the value range specification of the page element components and the check rules corresponding to the rule engine and supporting the linkage among the page element components;
the verification module is used for acquiring data to be verified, which is input by a user, from the service page, traversing the verification rules in the page element verification rule list according to the data to be verified;
the determining module is used for determining that the data to be checked passes the check if the error is not reported in the data to be checked traversing page element check rule table, or determining that the data to be checked fails the check;
the method comprises the steps of generating a page element check rule list corresponding to a service through a preset rule engine based on the service page, wherein the page element check rule list is embodied as a check decision tree with the association relation among page element components, and the method comprises the following steps:
identifying the data input types of all page element components in the business page corresponding to the business;
Acquiring a rule item to be configured matched with the data input type of the page element assembly from a rule engine built-in rule base according to the data input type of the page element assembly;
and carrying out parameter configuration on the rule items to be configured according to the verification requirement information of the service, and generating a page element verification rule list corresponding to the service.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the decision tree based page data verification method according to any one of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the decision tree based page data verification method according to any one of claims 1 to 6.
CN202010343728.XA 2020-04-27 2020-04-27 Page data verification method and device based on decision tree Active CN111562965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010343728.XA CN111562965B (en) 2020-04-27 2020-04-27 Page data verification method and device based on decision tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010343728.XA CN111562965B (en) 2020-04-27 2020-04-27 Page data verification method and device based on decision tree

Publications (2)

Publication Number Publication Date
CN111562965A CN111562965A (en) 2020-08-21
CN111562965B true CN111562965B (en) 2024-01-05

Family

ID=72070623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010343728.XA Active CN111562965B (en) 2020-04-27 2020-04-27 Page data verification method and device based on decision tree

Country Status (1)

Country Link
CN (1) CN111562965B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115518A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Service data checking method and device
CN112685037A (en) * 2020-11-25 2021-04-20 紫光云技术有限公司 Method for realizing binding and checking of front-end form component layout data
CN113159175B (en) * 2021-04-21 2023-06-06 平安科技(深圳)有限公司 Data prediction method, device, equipment and storage medium
CN115185616B (en) * 2022-09-14 2022-12-13 深圳依时货拉拉科技有限公司 Business rule engine device and processing method of business rule engine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799690A (en) * 2012-08-13 2012-11-28 南京莱斯信息技术股份有限公司 Method for verifying page input by using database technology
CN107291716A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of link data method of calibration and device
CN109901968A (en) * 2019-01-31 2019-06-18 阿里巴巴集团控股有限公司 A kind of automation page data method of calibration and device
WO2019237540A1 (en) * 2018-06-12 2019-12-19 平安科技(深圳)有限公司 Method and device for acquiring financial data, terminal device, and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799690A (en) * 2012-08-13 2012-11-28 南京莱斯信息技术股份有限公司 Method for verifying page input by using database technology
CN107291716A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of link data method of calibration and device
WO2019237540A1 (en) * 2018-06-12 2019-12-19 平安科技(深圳)有限公司 Method and device for acquiring financial data, terminal device, and medium
CN109901968A (en) * 2019-01-31 2019-06-18 阿里巴巴集团控股有限公司 A kind of automation page data method of calibration and device

Also Published As

Publication number Publication date
CN111562965A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN111562965B (en) Page data verification method and device based on decision tree
CN108876213B (en) Block chain-based product management method, device, medium and electronic equipment
CN107784063B (en) Algorithm generation method and terminal equipment
CN109189669A (en) Test method, electronic device and the readable storage medium storing program for executing of business scenario
CN108985066A (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
CN110727580A (en) Response data generation method, full-flow interface data processing method and related equipment
WO2022134583A1 (en) Insurance data information generation method, apparatus, server, and storage medium
CN105279613A (en) Accounting affair processing method and system
CN108460068A (en) Method, apparatus, storage medium and the terminal that report imports and exports
CN106681854A (en) Information checking method, device and system
CN113434674A (en) Data analysis method and device, electronic equipment and readable storage medium
CN110222323A (en) A kind of voucher generation method, device, readable storage medium storing program for executing and terminal device
JP6692281B2 (en) Test case generation device and test case generation method
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN113032275A (en) Method and device for testing field, electronic equipment and storage medium
CN112541688A (en) Service data checking method and device, electronic equipment and computer storage medium
CN111324645B (en) Block chain data processing method and device
CN110544166A (en) Sample generation method, device and storage medium
CN111639475B (en) Product code generation method and device and electronic equipment
CN114896164A (en) Interface optimization method and device, electronic equipment and storage medium
CN114757201A (en) Method for identifying delivery address, storage medium and processor
CN111209765B (en) Method and device for identifying material bar code and terminal equipment
CN113626605A (en) Information classification method and device, electronic equipment and readable storage medium
CN113688418A (en) Engineering order settlement method and system based on block chain data storage
CN113157671A (en) Data monitoring method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 Room 01, 20th Floor, Cuilin Building, No. 10, Kaifeng Road, Maling Community, Meilin Street, Futian District, Shenzhen, Guangdong

Applicant after: Shenzhen Handhui Technology Group Co.,Ltd.

Address before: 518000 20 / F, Cuilin building, 10 Kaifeng Road, Maling community, Meilin street, Futian District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen muchenglin Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant