Verification rule recommendation method and device, computer equipment, readable storage medium and program product

By obtaining and analyzing the field information of editable forms, filtering and recommending suitable verification rules, the problem of low matching between verification rules and fields in traditional technology is solved, and the form configuration efficiency and comprehensiveness of rules are improved.

CN119473426APending Publication Date: 2025-02-18CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411493737.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In traditional technology, manually adding verification rules to fields of editable forms result in a low degree of matching between verification rules and fields, affecting the efficiency of form configuration.

Method used

By obtaining the field type, field name and description information of the field to be configured, multiple verification rules are filtered and semantic analysis are performed based on the preset verification rules set, and a list of recommended rules is generated to improve the degree of matching between verification rules and fields.

Benefits of technology

It improves the degree of matching between verification rules and fields, improves the efficiency of form configuration, and ensures the comprehensiveness and accuracy of verification rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473426A_ABST
    Figure CN119473426A_ABST
Patent Text Reader

Abstract

The invention relates to a verification rule recommendation method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a field type, a field name and description information of a to-be-configured field; and based on the field type, the field name and the description information of the to-be-configured field, screening a plurality of verification rules contained in a preset verification rule set to obtain a recommendation rule list, and outputting the recommendation rule list. By adopting the method, the verification rule set which comprises a plurality of verification rules and can be managed in a centralized manner can be pre-established, the reusability of each verification rule is improved, and a reliable data basis is provided for verification rule determination in the form configuration process through the pre-established verification rule set; according to the embodiment of the invention, semantic analysis can be performed based on the field type, the field name and the description information of the field in the form to obtain the recommended verification rule, and the matching degree between the verification rules of the field in the table item and the configured field is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and in particular to a verification rule recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Editable forms are widely used in various management systems and can adapt to various data collection needs that are constantly changing. The form can be manually configured on the management system page to define the properties of each field in the form or the functions of each button in the form, and can quickly generate a form for data collection needs. Because the data filled in by the user in the editable form needs to be verified in multiple dimensions to ensure the validity of the data collected by the form, it is necessary to add verification rules for the fields during the form configuration process.

[0003] In traditional technology, verification rules are generally added to each field based only on the experience of the form configuration personnel. As the application areas of editable forms become more and more extensive, the types of data that can be collected by editable forms are also increasing. Relying on manual addition of verification rules to the fields of each form, the matching degree between the verification rules and the fields is low. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for recommending verification rules that can improve the matching degree between verification rules and fields and improve form configuration efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for recommending verification rules, comprising:

[0006] Get the field type, field name and description information of the field to be configured;

[0007] Based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output.

[0008] In one embodiment, the preset verification rule set includes multiple verification rules and rule configuration data corresponding to each of the verification rules, and each of the rule configuration data includes one or more of rule number, verification name, applicable type, verification description, rule content, weight, and weight configuration reason.

[0009] In one of the embodiments, based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, including:

[0010] Among the multiple first verification rules included in the preset verification rule set, screening is performed based on the field type of the field to be configured, and the first verification rule whose applicable type matches the field type is extracted to obtain an initial verification rule set;

[0011] In each second verification rule included in the initial verification rule set, based on the field name and description information of the field to be configured, respectively calculate the similarity between the field to be configured and each second verification rule;

[0012] Based on the similarity of each of the second verification rules, a recommended rule list is obtained.

[0013] In one embodiment, the similarity includes a first semantic similarity and a second semantic similarity; and the similarity between the field to be configured and each of the second verification rules is calculated based on the field name and description information of the field to be configured, including:

[0014] For each second verification rule, a first semantic similarity between the verification name of the second verification rule and the field name of the field to be configured, and a second semantic similarity between the verification description of the verification rule and the description information of the field to be configured.

[0015] In one embodiment, obtaining a list of recommended rules based on the similarity of each of the second verification rules includes:

[0016] For each of the second verification rules, weighting the first semantic similarity and the second semantic similarity corresponding to the second verification rule to obtain a recommendation score for the second verification rule;

[0017] The second verification rules are sorted in descending order of the recommendation scores corresponding to the second verification rules to obtain a recommendation rule list.

[0018] In one embodiment, the obtaining of the field type, field name, and description information of the field to be configured includes:

[0019] Display the field configuration interface of the form, which includes a field name input area, a character type selection option, a description information input area, and a verification rule selection option;

[0020] In response to the user's triggering operation on the verification rule selection option, the field type, field name and description information of the field to be configured respectively input by the user for the field name input area, character type selection option and description information input area are obtained.

[0021] In one embodiment, the method further comprises:

[0022] The recommended rule list is displayed on the field configuration interface, the recommended rule list is used to determine the target verification rule that matches the field to be configured, and the second verification rules contained in the recommended rule list are arranged in descending order of recommendation scores.

[0023] In a second aspect, the present application also provides a verification rule recommendation device, comprising:

[0024] The first acquisition module is used to obtain the field type, field name and description information of the field to be configured;

[0025] The first screening module is used to screen multiple verification rules included in the preset verification rule set based on the field type, field name and description information of the field to be configured, obtain a recommended rule list, and output the recommended rule list.

[0026] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0027] Get the field type, field name and description information of the field to be configured;

[0028] Based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output.

[0029] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0030] Get the field type, field name and description information of the field to be configured;

[0031] Based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output.

[0032] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0033] Get the field type, field name and description information of the field to be configured;

[0034] Based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output.

[0035] The method, device, computer equipment, computer-readable storage medium and computer program product for recommending the above-mentioned verification rules, wherein the method comprises: obtaining the field type, field name and description information of the field to be configured; based on the field type, field name and description information of the field to be configured, screening multiple verification rules contained in the preset verification rule set to obtain a recommended rule list, and outputting the recommended rule list. By adopting this method, a verification rule set containing multiple verification rules and which can be centrally managed can be pre-established to improve the reusability of each verification rule, and a reliable data basis can be provided for the verification rule determination in the form configuration process through the pre-established verification rule set. Semantic analysis can be performed based on the field type, field name and description information of each field to be configured in the form to obtain recommended verification rules, improve the matching degree between the field in the table item and the verification rules of the configured field, ensure the comprehensiveness of the verification rules configured for the field, and then adjust the form configuration efficiency through the intelligent configuration of the verification rules of each field of the form. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] FIG1 is a diagram of an application environment of a recommended method for verifying rules in one embodiment;

[0038] FIG2 is a schematic flow chart of a method for recommending verification rules in one embodiment;

[0039] FIG3 is a flow chart of the steps of obtaining a list of recommended rules in one embodiment;

[0040] FIG4 is a schematic diagram of a flow chart of steps for obtaining a list of recommended rules in one embodiment;

[0041] FIG5 is a schematic diagram of a flow chart showing steps in one embodiment;

[0042] FIG6 is a schematic diagram of a form configuration interface in one embodiment;

[0043] FIG7 is a flow chart of a method for recommending verification rules in another embodiment;

[0044] FIG8 is a structural block diagram of a device for recommending verification rules in one embodiment;

[0045] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] The verification rule recommendation method provided in the embodiment of the present application can be applied in the application environment as shown in FIG1. ​​Among them, the terminal device 300 can include a front end 100 and a back end 200. The front end 100 interacts with the user, and the user can trigger the front end. The front end can obtain the data corresponding to the user's trigger operation and send the data to the back end 200; the back end 200 can process based on the data and the pre-configured verification rule set to obtain a recommended rule list. Based on this, the back end 200 can output the recommended rule list to the front end 100, for example, the recommended rule list can be displayed on the front end. The front end 100 can be a display unit of the terminal device 300, and the back end 200 can be a module in the terminal device 300 for data processing.

[0048] Optionally, the verification rule recommendation method provided in the embodiment of the present application can be applied to a system including a terminal device and a back-end server, wherein the terminal device interacts with the user, the user can trigger the front end, the front end can obtain the data corresponding to the user's trigger operation, and send the data to the back-end server; the back-end server can process the data and the pre-configured verification rule set to obtain a list of recommended rules. Based on this, the back-end server can output the list of recommended rules to the terminal device, for example, the list of recommended rules can be displayed on the terminal device. The back-end server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0049] Optionally, the terminal device may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.

[0050] The following is a brief introduction to the technical terms involved in this embodiment:

[0051] Form: Forms are often used in software system page display, and are mainly responsible for data collection. They are generally composed of three parts: form tags, form fields, and form buttons. Among them, the form tag contains the URL of the CGI program used to process form data and the method of submitting data to the server; the form field includes text boxes, password boxes, hidden fields, multi-line text boxes, check boxes, radio buttons, drop-down selection boxes, and file upload boxes; the form button includes the submit button, reset button, and general button, which are used to transmit data to the CGI script on the server or cancel input. The form button can also be used to control other processing tasks that define the processing script.

[0052] Configurable form: refers to the function that can be configured through the system form, defining the function of each field or button in the form, without the need for code development and update, so as to quickly generate a form that can be used for data collection and display to meet the ever-changing data collection needs.

[0053] Verification rules: According to business requirements and development specifications, define the inspection requirements for different data in the form and form verification rules. During the form data filling process or after transmission to the server, it is necessary to check the data standardization and whether it meets the relevant business logic to ensure that the data meets the collection requirements.

[0054] In an exemplary embodiment, as shown in FIG2 , a method for recommending a verification rule is provided, which is described by taking the method applied to the terminal device in FIG1 as an example, and includes:

[0055] Step 202: Obtain the field type, field name, and description information of the field to be configured.

[0056] Among them, the fields to be configured can be fields in the form; the form can be used for data collection; multiple data to be collected can correspond to different fields respectively, and the field type fieldType can be the type of data to be collected, for example, it can include one or more of characters, pictures, rich text, single choice, and multiple choice; the field name fieldName can be the name of the data to be collected; the description information of the field can be used as the prompt text of the field, which is used to comprehensively and completely describe the field and prompt the current data collection requirements of the field, for example, it can be to inform the user who fills in the form of the data collection requirements of the field. Optionally, when the field name is "Invention Patent Number", the corresponding field type can be characters, and the corresponding field description information can be "Please enter a valid patent number."

[0057] Specifically, for a form used for data collection, the form may include multiple fields for meeting data collection requirements, and each field collects corresponding types of data; based on this, the terminal device may configure the form for each field to be collected. For each field to be configured, the terminal device may obtain the field type, field name, and description information corresponding to the field to be configured.

[0058] In one example, the terminal device may include a front end and a back end, and a form configuration interface corresponding to the field to be configured may be displayed on the front end, and a user may trigger the form configuration interface (the specific type of trigger operation will be described in detail in subsequent embodiments and will not be repeated here). In response to the user's trigger operation, the front end device may obtain the field type, field name, and description information corresponding to the field to be configured input by the user, and process the field type, field name, and description information of the field to be configured based on a preset data structure to obtain form item data, and transmit the form item data to the back end via an HTTP request. The back end may parse the form item data, obtain the field type, field name, and description information corresponding to the field to be configured, and store the above data in memory or a temporary cache.

[0059] Step 204 , based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output.

[0060] Among them, the preset verification rule set can be a verification rule pool containing multiple verification rules for verifying the field, the recommended rule list can contain at least one verification rule that matches the field to be configured, and the recommended rule list can also contain multiple matching verification rules, wherein each verification rule can be displayed in order from high to low in recommendation.

[0061] Specifically, after obtaining the field type, field name and description information of the field to be configured, the terminal device can filter among the multiple verification rules included in the preset verification rule set to obtain the verification rules in the preset verification rule set that match the field to be configured; the specific screening process can be that the terminal device can determine the degree of matching between the verification rules in the preset verification rule set and the field to be configured through the field type, field name and description information of the field to be configured, and then determine the verification rules that match the field to be configured to obtain the recommended rule set.

[0062] In the above-mentioned verification rule recommendation method, the field type, field name and description information of the field to be configured are obtained. Based on the field type, field name and description information of the field to be configured, multiple verification rules contained in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output. By adopting this method, a verification rule set containing multiple verification rules and that can be centrally managed can be pre-established to improve the reusability of each verification rule. The pre-established verification rule set provides a reliable data basis for determining the verification rules in the form configuration process. Semantic analysis can be performed based on the field type, field name and description information of each field to be configured in the form to obtain recommended verification rules, improve the matching degree between the fields in the table items and the verification rules of the configured fields, ensure the comprehensiveness of the verification rules configured for the fields, and then adjust the form configuration efficiency through the intelligent configuration of the verification rules of each field of the form.

[0063] In an exemplary embodiment, the preset verification rule set includes multiple verification rules and rule configuration data corresponding to each verification rule, and each rule configuration data includes one or more of rule number, verification name, applicable type, verification description, rule content, weight, and weight configuration reason.

[0064] Specifically, the preset validation rule set can be a pre-created systematic validation rule pool containing multiple validation rules, which is used to quickly output the validation rules corresponding to each field to be configured in the form during the form configuration process. The preset validation rule set contains validation rules and rule configuration data corresponding to each validation rule. The multiple rules in the set can meet the data format validation, data range validation, data compliance validation, data correctness validation, required field validation, uniqueness validation, etc. during the data collection process. The rule configuration data is the data basis for judging the validation rule and the configuration field.

[0065] The rule number corresponds to each verification rule one by one. The rule number is a unique identification code of the verification rule and may be automatically generated by the system. The present disclosure does not specifically limit the specific form of the rule number.

[0066] The verification name can be the name of the verification rule, or the abbreviation of the verification rule, etc.

[0067] Applicable types can be used to test field types, such as one or more of characters, numbers, dates, emails, phone numbers, links, files, images, rich text, single selection, and multiple selection.

[0068] The verification description may be the detailed purpose or description information of the verification rule.

[0069] The rule content can be a rule definition, as well as the method and logic of the verification rule, describing the conditions that the data must meet to pass the verification, etc. For example, the rule name of the verification rule can be "Required Field Verification", and the corresponding rule content / rule definition can be that the field must be filled in and no blanks are allowed, that is, if the field is filled in, the required field verification is passed. If the field is empty and not filled in, it is determined that the required field verification has not been passed.

[0070] The verification weight is used to characterize the priority or priority of the verification rule; the weight of the verification rule is determined based on the importance of the verification rule and the influence of the verification rule on the data quality. The terminal device can configure corresponding weights for each verification rule based on the importance of each verification rule and the influence on the data quality. For example, the importance is positively correlated with the weight, and the influence on the data quality is also positively correlated with the size of the weight, that is, the more important, the higher the influence, and the greater the weight. The verification weight corresponding to each verification rule includes the recommended weight of the rule, the matching weight on the verification name dimension, and the matching weight on the verification description dimension.

[0071] The weight configuration reason may be the configuration reason of the numerical value of the weight of the verification rule.

[0072] In this embodiment, by centrally managing and configuring multiple verification rules in a preset verification rule set, it is possible to facilitate rule maintenance, improve the reusability and consistency of each verification rule, and further improve the efficiency of form generation; by setting the weight of each verification rule, more critical verification requirements can be given priority in determining the recommended rule list.

[0073] In an exemplary embodiment, as shown in FIG3 , the specific implementation process of the step of “screening multiple verification rules included in the preset verification rule set based on the field type, field name, and description information of the field to be configured to obtain a recommended rule list” may include:

[0074] Step 302 , among the multiple first verification rules included in the preset verification rule set, based on the field type of the field to be configured, first verification rules whose applicable types match the field type are extracted to obtain an initial verification rule set.

[0075] Among them, the preset verification rule set can be a rule set pre-generated by the system, or a set of multiple verification rules pre-configured based on actual application scenarios or actual data collection requirements; in the description of the following embodiments, for the sake of clarity, the terminal device can refer to the verification rules included in the preset verification rule set as the first verification rules, and only make a distinction in the description.

[0076] Specifically, for a preset verification rule set that includes all verification rules (first verification rules), the terminal device can screen each first verification rule based on the field type of the field to be configured and the applicable type corresponding to each first verification rule, to obtain a first verification rule whose applicable type matches the field type of the field to be configured, and obtain an initial verification rule set based on each first verification rule whose applicable type matches the field type of the field to be configured.

[0077] Optionally, the process of the terminal device determining that the applicable type matches the field type may include: if the applicable type is consistent with the field type, it can be determined that the applicable type matches the field type; if the applicable type corresponding to the verification rule includes multiple types, if a type consistent with the field type is queried among the multiple types, it can be determined that the applicable type of the verification rule matches the field type of the field to be configured, that is, it is determined that in the type dimension, the verification rule is suitable for the field to be configured.

[0078] Step 304 : For each second verification rule included in the initial verification rule set, based on the field name and description information of the field to be configured, respectively calculate the similarity between the field to be configured and each second verification rule.

[0079] The similarity represents the semantic similarity between the verification name and verification description of each verification rule and the field name and description information of the field to be configured.

[0080] Specifically, for each second verification rule included in the initial verification rule set, the terminal may determine the semantic similarity between the field name and description information of the configuration field and the verification name and verification description of the second verification rule.

[0081] Step 306: Obtain a recommended rule list based on the similarity of each second verification rule.

[0082] Among them, the recommended rule list may include multiple verification rules to be recommended that are determined by the terminal device to be highly associated with the field to be configured. The recommended rule list may include multiple verification rules to be recommended, and each of the verification rules to be recommended may be arranged in order.

[0083] Specifically, for each second verification rule, the terminal device can calculate the recommendation score of the second verification rule based on the displayed similarity of the second verification rule. Based on this, the terminal device can filter each second verification rule in descending order based on the recommendation scores corresponding to each second verification rule included in the initial verification rule set to obtain a recommended rule list.

[0084] Optionally, the terminal device can extract the second verification rules corresponding to the recommendation scores of the previous target number as recommendation rules in the order of each recommendation score from large to small, and sort the recommendation rules based on the order of the recommendation scores from large to small to obtain a list of recommendation rules; or, the terminal can also determine the second verification rules whose recommendation scores are greater than or equal to a preset recommendation threshold as recommendation rules, and sort the recommendation rules based on the order of the recommendation scores from large to small to obtain a list of recommendation rules; or, the terminal device can determine all second verification rules contained in the initial verification rules as second verification rules, and sort the recommendation rules based on the order of the recommendation scores from large to small to obtain a list of recommendation rules.

[0085] In one example, the terminal device may include a front-end and a back-end server. After the trigger operation for the user, the front-end may obtain the field type, field name and description information of the field to be configured, and process the field type, field name and description information through a preset data transmission structure to obtain a target data transmission structure, and transmit the target data transmission structure to the back-end server through an HTTP request. The back-end server may parse the target data transmission structure to obtain the field type, field name and description information carried therein, and based on the field type, filter in the preset verification rule set, remove the verification rules whose applicable types do not match the field type of the field to be configured, and obtain the initial verification rule set. Based on this, the back-end server may respectively calculate the similarity between the field name and description information of the field to be configured and the verification name and verification description of each verification rule (hereinafter referred to as the second verification rule) included in the preset verification rule set; in this way, for each second verification rule, the back-end server may calculate the recommended score of the second verification rule based on the calculated similarity of the second verification rule; the back-end server may filter in the initial verification rule set in descending order of the recommended scores of each second verification rule based on the recommended scores of each second verification rule to obtain the recommended rule set. In this way, the backend server can return the recommended rule set to the frontend, for example, it can be displayed on the frontend, for example, the recommended rule list can be displayed on a form configuration page displayed on the frontend.

[0086] In this embodiment, preliminary screening is performed through the applicable types of various verification rules, and verification rules with unmatched applicable types are pre-eliminated. Further screening is performed through the verification names and verification descriptions of the verification rules to obtain a recommended rule set, thereby realizing automatic determination and automatic recommendation of verification rules suitable for fields, improving the efficiency and accuracy of recommendation of verification rules for fields, and further improving the efficiency of form configuration. The recommended rule list can also be displayed in real time on the form configuration page to facilitate quick selection of rules by form configuration personnel.

[0087] In an exemplary embodiment, the similarity includes a first semantic similarity and a second semantic similarity. The first semantic similarity represents the semantic similarity between the field name of the field to be configured and the verification name of the verification rule; the second semantic similarity represents the semantic similarity between the description information of the field to be configured and the verification description of the verification rule.

[0088] Accordingly, the specific implementation process of the step of "calculating the similarity between the field to be configured and each second verification rule based on the field name and description information of the field to be configured" may include:

[0089] For each second check rule, a first semantic similarity between the check name of the second check rule and the field name of the field to be configured, and a second semantic similarity between the check description of the check rule and the description information of the field to be configured.

[0090] Among them, the semantic similarity can be determined based on a preset semantic similarity algorithm. The present disclosure does not specifically limit the semantic similarity algorithm. Those skilled in the art can specifically determine it based on the actual application scenario. Correspondingly, the semantic similarity can be determined based on the Hamming distance, cos distance, etc.

[0091] Specifically, for each verification rule in the initial verification rule set (hereinafter referred to as the second verification rule for the sake of clarity), the terminal device can input the verification name of the second verification rule and the field name of the field to be configured into the preset semantic similarity algorithm to obtain the first semantic similarity between the verification name and the field name of the field to be configured; similarly, the terminal device can input the verification description of the second verification rule and the description information of the field to be configured into the preset semantic similarity algorithm to obtain the second semantic similarity between the verification description and the description information of the field to be configured.

[0092] In this embodiment, by calculating the similarity between the description information and multiple dimensions such as the field name, a reliable and stable data basis can be provided for subsequently determining a recommendation rule that is more closely matched with the field to be configured.

[0093] In an exemplary embodiment, as shown in FIG4 , the specific implementation process of the step of “obtaining a recommended rule list based on the similarity of each second verification rule” may include:

[0094] Step 402 : for each second verification rule, weighted processing is performed on the first semantic similarity and the second semantic similarity corresponding to the second verification rule to obtain a recommendation score for the second verification rule.

[0095] Among them, for each verification rule, the verification weight contained in the corresponding rule configuration data includes the matching weight and the recommended weight of the rule; the matching weight can include the matching weight of the verification rule in the verification name dimension, and the matching weight of the verification rule in the verification description dimension.

[0096] Specifically, for each second verification rule in the initial verification rule set, the terminal device can determine the first matching weight on the verification name dimension corresponding to the second verification rule, the second matching weight on the verification description dimension of the verification rule, and the recommended weight of the second verification rule. In this way, the terminal device can perform preliminary weighted processing on the first semantic similarity, the first matching weight corresponding to the first semantic similarity, the second semantic similarity, and the first matching weight corresponding to the second semantic similarity to obtain an initial score value; based on this, the terminal device can process based on the recommended weight of the second verification rule and the initial score value, and determine the obtained product value as the recommended score of the second verification rule. The steps described in the above embodiment are performed on each second verification rule in the initial verification rule set to obtain the recommended scores corresponding to each second verification rule.

[0097] Step 404 , sorting the second verification rules in descending order of the recommendation scores corresponding to the second verification rules to obtain a recommendation rule list.

[0098] Specifically, the terminal device can extract the second verification rules corresponding to the recommendation scores of the previous target number as recommendation rules in the order of each recommendation score from large to small, and sort the recommendation rules based on the order of the recommendation scores from large to small to obtain a list of recommendation rules; or, the terminal can also determine the second verification rules whose recommendation scores are greater than or equal to the preset recommendation threshold as recommendation rules, and sort the recommendation rules based on the order of the recommendation scores from large to small to obtain a list of recommendation rules; or, the terminal device can determine all the second verification rules contained in the initial verification rules as second verification rules, and sort the recommendation rules based on the order of the recommendation scores from large to small to obtain a list of recommendation rules.

[0099] In this embodiment, by weighting the semantic similarity of each verification rule through the recommendation weight and matching weight in the verification weight of the verification rule, the accuracy of the recommended score can be ensured, the correlation between the verification rule with a higher recommended score and the field to be configured can be ensured, and the configuration efficiency of the form can be further improved.

[0100] In an exemplary embodiment, as shown in FIG5 , the specific implementation process of the step “obtaining the field type, field name, and description information of the field to be configured” may include:

[0101] Step 502: Display the field configuration interface of the form.

[0102] Among them, as shown in Figure 6, the field configuration interface is the form configuration interface, which may include a field name input area, a character type selection option, a description information input area, and a verification rule selection option. The field configuration interface may include a first prompt message, which may be used to prompt the form configuration user how to configure the form. For example, the first prompt message may be "Add a custom field."

[0103] The field name input area may include a second prompt message and a first input box. The second prompt message may be used to prompt the form configuration user to input the field name of the custom field to be added. For example, the second prompt message may be "field name". The terminal device may respond to the form configuration user's input operation on the first input box, obtain the field name entered by the user, and display the field name in the first input box. For example, the entered field name may be "invention patent number".

[0104] The field configuration interface can also display a field type selection option, which may include a third prompt message, a first display box and a first drop-down option. The third prompt message is used to prompt the form configuration user to select a field type that meets the requirements. The user can trigger the first drop-down option. In response to the trigger operation, the terminal can display multiple pre-configured field types on the field configuration interface, for example, it can be displayed as a pop-up drop-down list, which contains multiple pre-configured field types; in response to the user's selection operation on the target field type, the terminal device can hide the drop-down list and display the target field type in the first display box. For example, the target field type selected by the user can be "character".

[0105] The description information input area may include a fourth prompt message and a second input box. The fourth prompt message may be used to prompt the form configuration user to input description information or instruction information of the custom field to be added. For example, the fourth prompt message may be "description information". The terminal device may respond to the form configuration user's input operation on the second input box, obtain the description information input by the user, and display the description information in the second input box. For example, the input field name may be "Please enter a valid patent number".

[0106] The verification rule selection option may include a fifth prompt message, a second display box, and a second drop-down option. The fifth prompt message is used to prompt the form configuration user to select a verification rule that meets the requirements. The user can trigger the second drop-down option. In response to the trigger operation, the terminal can execute the steps described in the above embodiment to determine the recommended rule list. The terminal can display the recommended rule list on the field configuration interface, for example, it can be displayed as a pop-up drop-down list, which contains multiple recommended rules arranged in descending order according to the recommended score; in response to the user's selection operation on the target recommended rule, the terminal device can hide the drop-down list and display the target recommended rule in the second display box. For example, the recommended rule list can display each recommended rule and the rule number of each recommended rule. The recommended rules displayed in the drop-down list may include:

[0107] GZ0002 Patent Authenticity Verification

[0108] GZ0001 Patent Number Correctness Check

[0109] GZ0003 patented non-repeatable verification

[0110] GZ0005 data format verification

[0111] GZ0007 Required field verification

[0112] GZ0004 Political sensitivity check

[0113] Among them, the target recommendation rule displayed in the second display frame may be "GZ0002 patent authenticity verification.

[0114] Specifically, in response to the user's configuration requirements for the fields in the form, the terminal device may display a field configuration interface, for example, the field configuration interface may be displayed on a display device corresponding to the front end.

[0115] Step 504, in response to the user's triggering operation for the verification rule selection option, obtain the field type, field name and description information of the field to be configured respectively input by the user for the field name input area, character type selection option and description information input area.

[0116] Specifically, a field configuration interface can be first displayed on the front-end device of the terminal device. The form configuration user can trigger the field name input area, character type selection option, and description information input area on the interface based on the displayed field configuration interface. The present disclosure does not limit the order in which the user triggers the above-mentioned modules. After the user completes the field name input area, character type selection option, and description information input area, the second drop-down option displayed in the verification rule selection option can be triggered. The front-end device responds to the trigger operation and can respond to the trigger operation on the second drop-down option. The front-end device can obtain the field type, field name, and description information corresponding to the field to be configured input by the user, and process the field type, field name, and description information of the field to be configured based on a preset data structure to obtain form item data, and transmit the form item data to the back end through an HTTP request. The back end can parse the form item data, obtain the field type, field name, and description information corresponding to the field to be configured, and store the above data in memory or a temporary cache. In this way, the backend can execute the steps described in the above embodiment, screen the multiple verification rules included in the preset verification rule set based on the field type, field name and description information of the field to be configured, obtain a recommended rule list, and return / output the recommended rule list to the front-end device. Specifically, the recommended rule list can be displayed on the field configuration interface, for example, it can be displayed as a pop-up drop-down list, which contains multiple recommended rules arranged in descending order according to the recommended score; the user can select the target recommended rule based on the multiple recommended rules displayed in the second display box. In response to the user's selection operation on the target recommended rule, the drop-down list can be hidden, and the target recommended rule can be displayed in the second display box. For example, the recommended rule list can display each recommended rule and the rule number of each recommended rule.

[0117] In this embodiment, during the form configuration process, data that can explain the data collection requirements are based on the form item type, name and description information. Through type screening, semantic analysis of name and description information, combined with a recommendation algorithm, recommended verification rules are matched and generated in the verification rule pool.

[0118] In an exemplary embodiment, the verification rule recommendation method further includes:

[0119] A list of recommended rules is displayed on the field configuration interface.

[0120] Specifically, the recommended rule list is used to determine the target verification rule that matches the field to be configured, and each second verification rule included in the recommended rule list is arranged in descending order of recommendation scores.

[0121] In this embodiment, the recommended verification rules can be displayed on the field configuration page of the form to facilitate quick selection by configuration personnel and improve configuration efficiency.

[0122] In the following, in conjunction with a specific embodiment, a specific implementation process of the recommended method for the above verification rule may include:

[0123] The verification rule recommendation method provided in the embodiment of the present application can establish a form verification rule pool. During the form configuration process, the form item field type is selected, and the name and description information are added to the field in the form item to explain the data collection requirements of the field. Based on the form verification rule pool, through type screening, semantic analysis of name and description information, matching and generating recommended verification rules, and displaying them to the configuration personnel for confirmation, the field verification rule configuration is completed efficiently and accurately, providing intelligent assistance for configurable forms.

[0124] As shown in FIG. 7 , it may be a detailed execution process of a specific embodiment:

[0125] Step 1: Establish a form validation rule pool: The terminal device can create a systematic validation rule pool, that is, configure a preset validation rule set, and quickly find the appropriate validation rules during the form configuration process. The rule pool includes multiple validation rules and the rule configuration data corresponding to each rule. The rule configuration data may include; rule number, validation name, applicable type, validation description, rule definition, recommended weight, reason for weight setting, etc. The validation rule can meet various data validation requirements, such as data format validation, data range validation, data compliance validation, data correctness validation, required field validation, uniqueness validation, etc. By centrally managing these rules, the reusability, maintainability and consistency of the rules can be improved.

[0126] Step 2: Define form validation rule weights: Based on the importance of the rule and its impact on data quality, you can configure validation weights for each validation rule. The validation weights can include matching weights and recommendation weights. The weight allocation can help prioritize key validation requirements during the rule recommendation process. The recommended weight settings include: recommended weight value and weight setting reason.

[0127] Step 3: Configure form item data: Create a new configurable form, add fields, select field type, and complete field name and description information configuration. Click the configuration page specific button to trigger steps 4 to 6.

[0128] Specifically, the new configurable form can be a data collection form for the application of science and technology awards. The field name of the added field to be configured is the field of [Invention Patent Number], and the field type is selected as [Character]. Add description information for the [Invention Patent Number] field, specifically "Please enter a valid patent number". This field requires the user to enter the correct patent number, and the system needs to verify the correctness of the patent number.

[0129] Step 4: Get form item data: The front-end page passes the form item data to the back-end server through HTTP request in a specific JASON format. The back-end system extracts the field type, name, and description information from the data and stores it in memory or temporary cache for further analysis.

[0130] Specifically, field name: fieldName filled in the form configuration. Field type: fieldType set in the form configuration, common ones include: character, rich text, single choice, multiple choice, etc. Description: fieldDescription filled in the form configuration, which can be a prompt text to inform users of the data collection requirements of the current field.

[0131] The data transmission structure can be as follows:

[0132] {

[0133] "fieldName": "Invention Patent Number",

[0134] "fieldType": "Character",

[0135] "fieldDescription": "Please enter a valid patent number",

[0136] }

[0137] Specifically, the system extracts field names, field types, and description information from the front-end form. The data sent by the front-end is usually transmitted in JSON format and passed to the back-end server through HTTP requests. Data storage: The back-end saves the acquired data in memory or temporary cache for further processing and analysis.

[0138] For example, the front end sends form data to the back end through a POST request. The back end receives the request and parses the JSON data to extract the field name, field type, and description information.

[0139] Step 5: Analyze and calculate to generate recommended validation rules: Use the field type, name, and description information as input, and the validation rule pool as the basis to generate recommended validation rules according to the following calculation steps to obtain a recommended rule list. The data obtained by the backend can be: field type: character, field name: invention patent number, description text: please enter a valid patent number. The calculation steps can be as follows:

[0140] 1. Match the field type with the applicable type in the rule library, and filter out the verification rule set S suitable for the current field type: match the field name with the verification name of each rule in the rule set S by semantic proximity to obtain p1; and match the description information with the verification description of each rule in the rule set S by semantic proximity to obtain p2.

[0141] 2. The priority value (recommendation score) W of the i-th rule (second verification rule) in the rule set S can be calculated by the following formula: i :

[0142] W i =(p1*0.6+p2*0.4)w i

[0143] where w i is the recommendation weight of the i-th rule in the rule set S, 0.6 is the matching weight of the field name, and 0.4 is the matching weight of the description information.

[0144] 3. Arrange the calculated priority values ​​in descending order to obtain a list of recommended rules.

[0145] Specifically, the obtained recommendation rule list may be as shown in the following Table 1:

[0146] Table 1

[0147]

[0148] Step 6: Display the recommended validation rules, select the validation rules, and complete the configuration: In the validation recommendation options, the recommended validation rules are displayed; in the form configuration, users can select the appropriate rules in the recommended rule list to complete the configuration.

[0149] In one example, the terminal device may be configured with a preset verification rule set.

[0150] For example, a pool of commonly used verification rules for forms can be established, including patent number correctness verification, patent compliance verification, patent non-duplicate verification, political sensitivity verification, data format verification, range check verification, required field verification, etc.

[0151] The main fields of the rule pool include: Rule number: unique identification code of the rule, generated by the system; Verification name: abbreviation of the verification rule; Applicable type: field type that can be used for verification, such as: characters, numbers, dates, emails, mobile phone numbers, links, files, pictures, rich text, single choice, multiple choice; Verification description: detailed purpose or description of the verification rule; Rule definition: verification method and logic; Recommended weight: priority of verification; Reason for weight setting: reason for setting the weight value.

[0152] The preset verification rule set may be as shown in Table 2 below:

[0153] Table 2

[0154]

[0155] The verification rules included in the above Table 2 are only examples and are not exhaustive.

[0156] In an example, the verification weight configured by the terminal device for each verification rule may be as shown in the following Table 3:

[0157] Table 3

[0158]

[0159] The check weights included in the above Table 3 are only examples and are not exhaustive.

[0160] The verification rule recommendation method provided in this embodiment can establish a configurable form verification rule pool, define the rule number, verification name, applicable type, verification description, rule definition, recommended weight, weight setting reason and other contents, covering common verification requirements. By centrally managing the rule pool, the reusability, maintainability and consistency of the rules are improved; in the form configuration process, based on the form item type, name and description information, etc., data that can explain the data collection requirements, through type screening, semantic analysis of name and description information, combined with the recommendation algorithm, the recommended verification rules are matched and generated in the verification rule pool; the recommended verification rules are displayed on the configuration page to facilitate configuration personnel to quickly select and improve configuration efficiency.

[0161] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0162] Based on the same inventive concept, the embodiment of the present application also provides a verification rule recommendation device for implementing the verification rule recommendation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the verification rule recommendation device provided below can refer to the limitations of the verification rule recommendation method above, and will not be repeated here.

[0163] In an exemplary embodiment, as shown in FIG8 , a verification rule recommendation device 800 is provided, comprising:

[0164] The first acquisition module 802 is used to acquire the field type, field name and description information of the field to be configured.

[0165] The first screening module 804 is used to screen multiple verification rules included in the preset verification rule set based on the field type, field name and description information of the field to be configured, obtain a recommended rule list, and output the recommended rule list.

[0166] In one embodiment, the preset verification rule set includes multiple verification rules and rule configuration data corresponding to each verification rule, and each rule configuration data includes one or more of rule number, verification name, applicable type, verification description, rule content, weight, and weight configuration reason.

[0167] In one embodiment, the first screening module is specifically used for:

[0168] Among the multiple first verification rules included in the preset verification rule set, screening is performed based on the field type of the field to be configured, and the first verification rule whose applicable type matches the field type is extracted to obtain an initial verification rule set.

[0169] In each second verification rule included in the initial verification rule set, based on the field name and description information of the field to be configured, the similarity between the field to be configured and each second verification rule is calculated respectively.

[0170] Based on the similarity of each of the second verification rules, a recommended rule list is obtained.

[0171] In one embodiment, the similarity includes a first semantic similarity and a second semantic similarity. The first screening module is further used to: for each second verification rule, determine the first semantic similarity between the verification name of the second verification rule and the field name of the field to be configured, and determine the second semantic similarity between the verification description of the verification rule and the description information of the field to be configured.

[0172] In one of the embodiments, the first screening module is further specifically used for: for each of the second verification rules, weighting the first semantic similarity and the second semantic similarity corresponding to the second verification rule to obtain a recommendation score for the second verification rule.

[0173] The second verification rules are sorted in descending order of the recommendation scores corresponding to the second verification rules to obtain a recommendation rule list.

[0174] In one embodiment, the first acquisition module is specifically used for:

[0175] The field configuration interface of the form is displayed, and the field configuration interface includes a field name input area, a character type selection option, a description information input area, and a verification rule selection option.

[0176] In response to the user's triggering operation on the verification rule selection option, the field type, field name and description information of the field to be configured respectively input by the user for the field name input area, character type selection option and description information input area are obtained.

[0177] In one embodiment, the device further comprises:

[0178] A display module is used to display the recommended rule list on the field configuration interface, the recommended rule list is used to determine the target verification rule that matches the field to be configured, and the second verification rules contained in the recommended rule list are arranged in descending order of recommendation scores.

[0179] Each module in the above verification rule recommendation device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0180] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store form data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for recommending a verification rule is implemented.

[0181] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0182] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps described in the above embodiment when executing the computer program.

[0183] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps described in the above embodiment are implemented.

[0184] In one embodiment, a computer program product is provided, including a computer program, which implements the steps described in the above embodiment when executed by a processor.

[0185] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0186] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0187] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0188] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for recommending verification rules, characterized in that: The method comprises: Get the field type, field name and description information of the field to be configured; Based on the field type, field name and description information of the field to be configured, multiple verification rules included in the preset verification rule set are screened to obtain a recommended rule list, and the recommended rule list is output.

2. The method according to claim 1, characterized in that The preset verification rule set includes multiple verification rules and rule configuration data corresponding to each of the verification rules. Each of the rule configuration data includes one or more of a rule number, a verification name, an applicable type, a verification description, a rule content, a weight, and a reason for weight configuration.

3. The method according to claim 2, characterized in that The method further comprises filtering multiple verification rules contained in a preset verification rule set based on the field type, field name and description information of the field to be configured to obtain a recommended rule list, including: Among the multiple first verification rules included in the preset verification rule set, screening is performed based on the field type of the field to be configured, and the first verification rule whose applicable type matches the field type is extracted to obtain an initial verification rule set; In each second verification rule included in the initial verification rule set, based on the field name and description information of the field to be configured, respectively calculate the similarity between the field to be configured and each second verification rule; Based on the similarity of each of the second verification rules, a recommended rule list is obtained.

4. The method according to claim 3, characterized in that The similarity includes a first semantic similarity and a second semantic similarity; and the similarity between the field to be configured and each of the second verification rules is calculated based on the field name and description information of the field to be configured, including: For each second verification rule, a first semantic similarity between the verification name of the second verification rule and the field name of the field to be configured, and a second semantic similarity between the verification description of the verification rule and the description information of the field to be configured.

5. The method according to claim 3, characterized in that: The obtaining of a list of recommended rules based on the similarity of each of the second verification rules comprises: For each of the second verification rules, weighting the first semantic similarity and the second semantic similarity corresponding to the second verification rule to obtain a recommendation score for the second verification rule; The second verification rules are sorted in descending order of the recommendation scores corresponding to the second verification rules to obtain a recommendation rule list.

6. The method according to claim 1, characterized in that The obtaining of the field type, field name and description information of the field to be configured includes: Display the field configuration interface of the form, which includes a field name input area, a character type selection option, a description information input area, and a verification rule selection option; In response to the user's triggering operation on the verification rule selection option, the field type, field name and description information of the field to be configured respectively input by the user for the field name input area, character type selection option and description information input area are obtained.

7. The method according to claim 6, characterized in that The method further comprises: The recommended rule list is displayed on the field configuration interface, the recommended rule list is used to determine the target verification rule that matches the field to be configured, and the second verification rules contained in the recommended rule list are arranged in descending order of recommendation scores.

8. A verification rule recommendation device, characterized in that: The device comprises: The first acquisition module is used to obtain the field type, field name and description information of the field to be configured; The first screening module is used to screen multiple verification rules included in the preset verification rule set based on the field type, field name and description information of the field to be configured, obtain a recommended rule list, and output the recommended rule list.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.