Dynamic data verification configuration method and device, computer readable storage medium and electronic equipment

By generating and parsing JSON Schema instances, combining the basic properties of the field and linkage rules configured by the user, the configurability of dynamic data verification forms is achieved, solving the problems of low development efficiency and high maintenance costs in the existing technology.

CN119938035APending Publication Date: 2025-05-06HANGZHOU YONGRONG INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411842133.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, when using JSON Schema for form configuration, it is difficult to effectively handle integration with cross-service or associated field interactions, resulting in the need to manually add a large amount of logical processing code, resulting in code redundancy, reducing development efficiency and increasing maintenance costs.

Method used

By responding to user operations, obtaining preset templates and displaying the field basic attribute configuration page, generating field basic attribute data based on user input, and configuring field linkage rule scripts on the edit rule page to generate field rule attribute data. Then, based on this data, the JSON Schema instance is generated, the instance is parsed to generate a target instance that complies with the application specifications, and a dynamic data verification form is displayed.

Benefits of technology

The dynamic data verification form is configurable, which improves development efficiency, reduces development risks and maintenance costs, and ensures consistency of project practices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938035A_ABST
    Figure CN119938035A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic data verification configuration method and device, a computer readable storage medium and electronic equipment, and relates to the technical field of computers.The method comprises the steps that a preset template is obtained and a field basic attribute configuration page is displayed in response to triggering operation of a user for the preset template; generating field basic attribute data according to an input operation of a user on the field basic attribute configuration page based on the business scene; if a request for editing a rule is received, displaying an editing page for configuring a field linkage rule script, generating field rule attribute data according to an input operation of a user on the editing page based on a business scene, and generating a JSON Schema instance according to the field basic attribute data and the field rule attribute data; by analyzing the JSON Schema instance, a target instance conforming to application specifications is generated, and an interaction page corresponding to the target instance is displayed. The technical effect of improving the development efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a configuration method, device, computer-readable storage medium and electronic device for dynamic data verification. Background Art

[0002] With the continuous maturity of front-end framework technology, using low-code methods to build front-end form configuration templates has become the mainstream operation method.

[0003] Taking JSON Schema as an example, the current Schema template configuration is to configure the business logic of the associated interaction of the form form to partially solve the form verification processing problem. If it is for integration with cross-business or associated field interaction, it is often necessary to manually add too much logic processing code, and even code redundancy may occur, which causes certain troubles for code transformation and subsequent upgrades.

[0004] Therefore, the development efficiency of related technologies is low and the maintenance cost is high. Summary of the invention

[0005] The main purpose of the present disclosure is to provide a configuration method, device, computer-readable storage medium and electronic device for dynamic data verification to solve the problems of low development efficiency and high maintenance cost in related technologies.

[0006] In order to achieve the above object, the first aspect of the present disclosure provides a configuration method for dynamic data verification, including:

[0007] In response to a user triggering operation on a preset template, the preset template is acquired and a field basic attribute configuration page including the preset template is displayed;

[0008] Generate field basic attribute data based on the preset template according to the user's input operation on the field basic attribute configuration page based on the business scenario;

[0009] If a request for editing a rule is received, an editing page for configuring a field linkage rule script is displayed, and field rule attribute data is generated according to the user's input operation on the editing page based on the business scenario, wherein the field rule attribute data includes at least two field-associated effective rules, and the associated effective rules are used for dynamic data verification;

[0010] Generate a JSON Schema instance according to the field basic attribute data and the field rule attribute data;

[0011] By parsing the JSON Schema instance, a target instance that complies with the application specification is generated, and an interactive page corresponding to the target instance is displayed, where the dynamic data verification form in the business scenario is displayed on the interactive page.

[0012] Optionally, further, generating the field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario includes:

[0013] According to the input operation of the user on the field basic attribute configuration page based on the business scenario, basic field configuration information is obtained, wherein the basic field configuration information includes: basic attributes of the field and dynamic field verification rules. The field basic attribute configuration page includes: default items, selection items and editable items, wherein the selection items include whether to display, whether to be required, and whether to be editable;

[0014] According to the field basic configuration information, field basic attribute data based on JSON Schema is generated.

[0015] Optionally, further, generating field rule attribute data according to the user's input operation on the editing page based on the business scenario includes:

[0016] According to the input operation of the user on the editing page based on the business scenario, field rule configuration information is obtained, where the field rule configuration information includes a rule type, a script type, and a field linkage rule script;

[0017] According to the field rule configuration information, field rule attribute data based on JSON Schema is generated.

[0018] Optionally, further, the at least two fields include a target field and a related field matching the target field, and both the target field and the related field are determined based on the business scenario;

[0019] The rule for the association to take effect is a rule for forming a linkage relationship between the target field and the related field by configuring a custom attribute for linkage in the field rule data of the target field.

[0020] Optionally, further, generating a JSON Schema instance according to the field basic attribute data and the field rule attribute data includes:

[0021] A complete JSON Schema instance is generated through data integration according to the field basic attribute data and the field rule attribute data.

[0022] Optionally, further, the generating a target instance conforming to the application specification by parsing the JSON Schema instance includes:

[0023] Parsing the data structure of the JSON Schema instance to generate a data structure of the instance that complies with the Schema application specification; and

[0024] Parsing the field linkage rules of the JSON Schema instance, performing matching processing according to the field linkage rules, and generating an instance that complies with the Schema application specification;

[0025] The instance that complies with the Schema application specification is used as the target instance.

[0026] Optionally, further, the method further includes:

[0027] In response to the user's interactive operation on the interactive page, dynamic data verification is performed through the linkage relationship between the fields;

[0028] If the verification is successful, the form data based on the interactive page is stored in the database.

[0029] A second aspect of the present disclosure provides a configuration device for dynamic data verification, comprising:

[0030] An acquisition unit, configured to acquire the preset template and display a field basic attribute configuration page including the preset template in response to a user triggering operation on the preset template;

[0031] A processing unit, configured to generate field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario;

[0032] The processing unit is further configured to display an editing page for configuring a field linkage rule script when receiving a request for editing a rule, and generate field rule attribute data according to an input operation of the user on the editing page based on the business scenario, wherein the field rule attribute data includes at least two rules for associating and taking effect on the fields, and the associating and taking effect on the rules are used for dynamic data verification;

[0033] The processing unit is further used to generate a JSON Schema instance according to the field basic attribute data and the field rule attribute data;

[0034] The processing unit is further configured to generate a target instance that complies with the application specification by parsing the JSON Schema instance, and display an interactive page corresponding to the target instance, wherein the interactive page displays a dynamic data verification form in the business scenario.

[0035] A third aspect of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the configuration method for dynamic data verification provided by any one of the first aspects.

[0036] The fourth aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the configuration method for dynamic data verification provided in any one of the first aspects.

[0037] A fifth aspect of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the configuration method for dynamic data verification provided by any one of the first aspects is implemented.

[0038] In the configuration method of dynamic data validation provided in the embodiment of the present disclosure, a form configuration method is adopted, which, to a certain extent, avoids the redundancy caused by manually appending codes. In order to unify the coding style and achieve plug-and-play, it is convenient to standardize the coding in the later stage and integrate the configuration into the business scenario. Through interactive operations with users based on business scenario configuration, field basic attribute data based on preset templates and field rule attribute data configured with field linkage rule scripts are generated to provide form-based dynamic data validation, and then a JSON Schema instance is generated. In order to implement the application form, the JSON Schema instance is parsed to generate a target instance that meets the application specification, and the corresponding field rule template is configured according to different business scenarios, and then a personalized Schema template is generated, so as to achieve the purpose of configurability of the dynamic data validation form, thereby improving development efficiency, reducing development risks, ensuring consistency of project practices, and reducing maintenance costs. The technical effect, thereby solving the technical problems of low development efficiency and high maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A schematic diagram of a scenario of a configuration method for dynamic data verification provided by an embodiment of the present disclosure;

[0041] Figure 2 A flowchart of a configuration method for dynamic data verification provided by an embodiment of the present disclosure;

[0042] Figure 3 A schematic diagram of the interface of the configuration method of dynamic data verification provided by the embodiment of the present disclosure Figure 1 ;

[0043] Figure 4 A schematic diagram of the interface of the configuration method of dynamic data verification provided by the embodiment of the present disclosure Figure 2 ;

[0044] Figure 5 A schematic diagram of the interface of the configuration method of dynamic data verification provided by the embodiment of the present disclosure Figure 3 ;

[0045] Figure 6 A flowchart of a configuration method for dynamic data verification provided by another embodiment of the present disclosure;

[0046] Figure 7 A block diagram of a configuration device for dynamic data verification provided by an embodiment of the present disclosure;

[0047] Figure 8 A block diagram of an electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.

[0049] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0050] In the present disclosure, the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings. These terms are mainly used to better describe the present disclosure and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation.

[0051] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this disclosure can be understood according to specific circumstances.

[0052] In addition, the terms "installed", "set", "provided with", "connected", "connected", and "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in this disclosure can be understood according to specific circumstances.

[0053] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0054] At present, there are some special processing in the form configuration method using JSON Schema. For example, if you need to implement common scenarios such as non-editable, display and hide related information, you usually add business code manually. This is inconsistent with the relevant technical level, and often requires manual addition of too much logic processing code, and even code redundancy, which causes certain troubles for code transformation and subsequent upgrades. Therefore, the relevant technology cannot realize personalized configuration of business scenarios, and the development efficiency is low, while the maintenance cost is high.

[0055] In order to solve the above problems, the technical concept of the present invention is to generate field basic attribute data based on preset templates through interactive operations with users based on business scenario configurations, and to realize the configuration of field rules through the request of editing rules, and then generate field rule attribute data to provide form-based dynamic data validation. A JSON Schema instance is generated through the field basic attribute data and the field rule attribute data. In order to realize the application form, the target instance that conforms to the application specification is generated by parsing the JSON Schema instance, and the corresponding field rule template is configured according to different business scenarios, and then a personalized Schema template is generated, so as to achieve the purpose of configurability of dynamic data verification forms, thereby improving development efficiency, reducing development risks, ensuring consistency of project practices, and reducing maintenance costs. Technical effect.

[0056] In practical applications, the execution subject of the present disclosure may be a dynamic data verification configuration device, which may be deployed in an electronic device, such as a terminal device, a server, etc. A user may configure a dynamic data verification form through an electronic device deployed with the dynamic data verification configuration device, thereby realizing form configuration for personalized business scenarios or different business scenarios.

[0057] For example, see Figure 1 As shown, Figure 1 A scenario diagram of a method for configuring dynamic data validation provided in an embodiment of the present disclosure. The scenario includes a display device 101 (e.g., a display or a display screen, used to display a user interaction interface or a user interaction page, which is not specifically limited here) and a server 102 on which a configuration device for dynamic data validation is deployed. The display device 101 is used for users (the users here may refer to developers, etc., which are not specifically limited here) to perform visual interactive operations. The server 102 is used for configuration processing of forms to generate dynamic data validation forms for different business scenarios.

[0058] Specifically, based on the preset template, through interactive operations with users based on business scenario configuration, basic attribute data of the field based on the preset template is generated. When dynamic data validation is required based on the business scenario, the field rule configuration can be realized through the request for editing the rule, and then the field rule attribute data is generated to realize the dynamic data validation based on the form. Then, the JSON Schema instance is generated through the field basic attribute data and the field rule attribute data. In order to realize the application form, the target instance that meets the application specification is generated by parsing the JSON Schema instance, and the corresponding field rule template is configured according to different business scenarios, and then a personalized Schema template is generated, achieving the purpose of configurable dynamic data validation form.

[0059] Through the above application scenarios, the present disclosure adds configurable dynamic data validation for special interactions to form fields. This dynamic data validation configuration can respond to actual business scenarios and meet the interactive processing of field-specific associated responses through configuration. It can replace the need to achieve the effect of functional development through a large amount of corresponding business code development to a certain extent, and achieve the configurable actual application of matching projects, meet the needs of rapid project iteration, and thus improve development efficiency and reduce maintenance costs.

[0060] It should be noted that in the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of information such as form data or user data involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0061] The technical solution of the present disclosure is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0062] The present disclosure provides a configuration method for dynamic data verification, such as Figure 2 As shown, the method includes the following steps S201 to S203:

[0063] Step S201: in response to a user triggering operation on a preset template, the preset template is acquired and a field basic attribute configuration page including the preset template is displayed.

[0064] Step S202: Generate field basic attribute data based on the preset template according to the user's input operation on the field basic attribute configuration page based on the business scenario.

[0065] Step S203: If a request for editing a rule is received, an editing page for configuring a field linkage rule script is displayed, and field rule attribute data is generated according to the user's input operation on the editing page based on the business scenario. The field rule attribute data includes at least two field-associated effective rules, and the associated effective rules are used for dynamic data verification.

[0066] Step S204: Generate a JSONSchema instance according to the field basic attribute data and the field rule attribute data.

[0067] Step S205: generating a target instance that complies with the application specification by parsing the JSON Schema instance, and displaying an interactive page corresponding to the target instance, wherein the interactive page displays a dynamic data verification form in the business scenario.

[0068] In the disclosed embodiment, in response to a user's trigger operation on a preset template, the preset template is obtained or called from a database or other storage device, and the preset template is displayed through a field basic attribute configuration page, and then through interactive operations with the user based on business scenario configuration, field basic attribute data based on the preset template and field linkage rule script configured by the user are generated to generate field rule attribute data to provide form-based dynamic data validation, and then generate a JSON Schema instance. In order to implement the application form, the JSON Schema instance is parsed to generate a target instance that meets the application specification, and the corresponding field rule template is configured according to different business scenarios, and then a personalized Schema template is generated, so as to achieve the purpose of configurability of the dynamic data validation form, thereby improving development efficiency, reducing development risks, ensuring consistency of project practices, and reducing maintenance costs.

[0069] JSON Schema is a specification based on the JSON format that describes the structure and validation rules of JSON data. It defines the type, format, constraints, and relationships of each element in JSON data. The rules for at least two fields to be associated and effective include field linkage rules.

[0070] The field basic attribute configuration page (wherein, the description of the page can also use "interface", which will not be repeated below) can be found in Figure 3 As shown. For example, users can use the functions, tools or web pages provided by the front-end technology framework (Vue) to click "Add" or edit the preset template, which will call the basic template (here refers to the preset template, such as the Schema basic template) and display the template content. The basic attribute configuration page of this field includes: default items, optional items and editable items. The optional items include whether to display, whether it is required, and whether it is editable. Figure 3 As shown, the content displayed in this template includes: whether to display, field name, whether editable, whether required, front-end display name, return value field type, dictionary, dictionary item filtering, field default value, form field, format, minimum length, maximum length, minimum value, maximum value, precision, and regular expression.

[0071] Edit page can be seen Figure 4 As shown. For example, the user can click "Rule Settings" through the functions, tools or web pages provided by the front-end technology framework (Vue) to display the pages of global rules, scenario rules and field rules. The user can click "Field Rules" to display or overlay the editing page of field rules on the page of "Rule Settings", such as Figure 4The edit page displays the rule type selection items, script type selection items, and the field linkage rule script edit box. Users can select the rule type, script type, and enter or edit the field linkage rule script in the edit box. When the "Confirm" control is clicked, the field rule attribute data can be generated.

[0072] Among them, combined Figure 4 As shown, the server obtains the information of the field linkage script, script type, and rule type and generates corresponding field rule attribute data.

[0073] It should be noted that Figure 3 and Figure 4 This is merely an example; different templates have different template contents and different business scenarios. You may choose the same template or different templates, and no specific limitation is made here.

[0074] Optionally, a configuration method for dynamic data verification includes:

[0075] In response to a user triggering operation on a preset template, the preset template is acquired and a field basic attribute configuration page including the preset template is displayed;

[0076] Generate field basic attribute data based on the preset template according to the user's input operation on the field basic attribute configuration page based on the business scenario;

[0077] If a request for editing a rule is received, an editing page for configuring a field linkage rule script is displayed, and field rule attribute data is generated according to the user's input operation on the editing page based on the business scenario, wherein the field rule attribute data includes at least two field-associated effective rules, and the associated effective rules are used for dynamic data verification;

[0078] A target instance that complies with the application specification is generated according to the field basic attribute data and the field rule attribute data, and an interactive page corresponding to the target instance is displayed, wherein the dynamic data verification form in the business scenario is displayed on the interactive page.

[0079] Optionally, generating the field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario includes:

[0080] According to the input operation of the user on the field basic attribute configuration page based on the business scenario, basic field configuration information is obtained, wherein the basic field configuration information includes: basic attributes of the field and dynamic field verification rules. The field basic attribute configuration page includes: default items, selection items and editable items, wherein the selection items include whether to display, whether to be required, and whether to be editable;

[0081] According to the field basic configuration information, field basic attribute data based on JSON Schema is generated.

[0082] Optionally, the basic attributes of the field are configured as default items and / or editable items, and the dynamic verification rules of the field are configured as selection items and / or editable items.

[0083] In the present disclosure, in combination Figure 3 As shown, configure the Schema basic template, including the basic attributes of the field and the dynamic verification rules of the field, such as whether to display, whether it is required, whether it is editable, etc.

[0084] Exemplarily, based on the field basic configuration information, the field basic attribute data (here refers to the field basic attribute data based on JSONSchema) can be generated as follows:

[0085] "principalBorrower&nameSpelling":{

[0086] "type":"string",

[0087] "title":"Name in Pinyin",

[0088] "maxLength":100,

[0089] "ui:emptyValue":"",

[0090] "ui:options":{

[0091] "disabled":true

[0092] },

[0093] "extProperties":{},

[0094] "err:required":"You must enter the pinyin of your name",

[0095] }

[0096] Optionally, generating field rule attribute data according to the user's input operation on the editing page based on the business scenario includes:

[0097] According to the input operation of the user on the editing page based on the business scenario, field rule configuration information is obtained, where the field rule configuration information includes a rule type, a script type, and a field linkage rule script;

[0098] According to the field rule configuration information, field rule attribute data based on JSON Schema is generated.

[0099] Optionally, the at least two fields include a target field and a related field matching the target field, and both the target field and the related field are determined based on the business scenario;

[0100] The rule for the association to take effect is a rule for forming a linkage relationship between the target field and the related field by configuring a custom attribute for linkage in the field rule data of the target field.

[0101] In the present disclosure, in combination Figure 4 As shown, configure the field rule script, that is, configure the corresponding fields (here refers to the relevant fields related to or matching the target fields based on the business scenario) and the target fields to associate the validation rules. For example, the interactive display of the target field needs to rely on any other field based on a certain value to take effect, or the interactive display of the target field needs to rely on several fields based on matching values ​​to take effect. This requires that these dependent fields and corresponding values ​​be organized together, organized into script rules according to the actual application scenario, and configured under the custom properties of the target field (such as hrShow (custom)) for use.

[0102] For example, the specific business scenario is as follows: nameSpelling needs to be displayed only when the name field attribute value is 1, then it is necessary to configure a linkage relationship between the nameSpelling field and the name field, that is, the field rule data of nameSpelling needs to be added with the hrShow (custom) attribute, and the data (here refers to the field rule attribute data based on JSON Schema) is as follows:

[0103] "principalBorrower&nameSpelling":{

[0104] "hrShow":{'name':1}, ......

[0106] }

[0107] As mentioned above, when hrShow (custom) is integrated and applied, after configuration, nameSpelling will be displayed according to the actual scenario.

[0108] Optionally, generating a JSONSchema instance according to the field basic attribute data and the field rule attribute data includes:

[0109] A complete JSON Schema instance is generated through data integration according to the field basic attribute data and the field rule attribute data.

[0110] In the disclosed embodiment, a JSON Schema instance is generated, and after the basic attributes and linkage scripts (herein, field rule linkage scripts) of the required fields are configured according to the business scenario, the complete schema data is output after the data is integrated.

[0111] For example, the complete JSON Schema instance data is as follows:

[0112] principalBorrower&nameSpelling":{

[0113] "type":"string",

[0114] "title":"Name in Pinyin",

[0115] "maxLength":100,

[0116] "ui:emptyValue":"",

[0117] "ui:options":{

[0118] "disabled":true

[0119] },

[0120] "extProperties":{},

[0121] "err:required":"You must enter the pinyin of your name"

[0122] "hrShow":{'name':1,}, ......

[0124] }

[0125] Optionally, the generating a target instance conforming to an application specification by parsing the JSON Schema instance includes:

[0126] Parsing the data structure of the JSON Schema instance to generate a data structure of the instance that complies with the Schema application specification; and

[0127] Parsing the field linkage rules of the JSON Schema instance, performing matching processing according to the field linkage rules, and generating an instance that complies with the Schema application specification;

[0128] The instance that complies with the Schema application specification is used as the target instance.

[0129] In the embodiment of the present disclosure, the field parsing rules are classified for the generated JSON Schema instance when integrating the rules, such as hrShow (custom), hrDisabled (custom), etc., and the data is compared with the parsing tool class developed in the dependency package of vue-json-schema-form (i.e., the form form component compression package for parsing the JSON Schema data structure). The processing process is as follows:

[0130] 1) Parse and process data structures (for example, parse the data structure of a JSON Schema instance). For different data types, such as String, Object, Array, etc., parse and generate them according to different processing methods, configure type processing, and then generate instances (data structures) that comply with the schema application specifications.

[0131] 2) Parse and process field linkage rules (for example, parse the field linkage rules of JSON Schema instances). For example, hrShow, hrDisabled, etc. For json structured data, the encapsulated rule parsing tool will be called according to the configuration content of the field rules to match and associate the rules between fields. For example, the rules used by business needs are configured in attributes such as hrShow. After the parsing tool class identifies the attribute and the content in the attribute, it will match the linkage rules in the content.

[0132] Optionally, the method further comprises:

[0133] The form corresponding to the target instance is stored as an instance template in the business scenario.

[0134] In the disclosed embodiment, the form corresponding to the target instance is stored as a template in the business scenario, and if the business scenario is the same later, the instance template in the business scenario can be directly called or obtained.

[0135] Optionally, the method further comprises:

[0136] In response to the user's interactive operation on the interactive page, dynamic data verification is performed through the linkage relationship between the fields;

[0137] If the verification is successful, the form data based on the interactive page is stored in the database.

[0138] In the disclosed embodiment, the field rule application is displayed. After the granular rules of the field integration are parsed as above, the display effect of the corresponding rule is immediately displayed in the JSON Schema instance generated by the application (here refers to the target instance) (here refers to presenting the display effect through the interactive page), such as: hrShow (custom) matches the response display interaction associated with the field, or hrDisabled (custom) matches the response editing interaction associated with the field, etc.

[0139] Exemplarily, the data structure of an instance template (eg, a template of a target instance) is organized as follows:

[0140] "principalBorrower&nameSpelling":{

[0141] "type":"string",

[0142] "title":"Name in Pinyin",

[0143] "maxLength":100,

[0144] "ui:emptyValue":"",

[0145] "ui:options":{

[0146] "disabled":true

[0147] },

[0148] "extProperties":{},

[0149] "err:required":"You must enter the pinyin of your name"

[0150] "hrShow":{'principalBorrower&name':1,},

[0151] "hrDisabled":{'principalBorrower&name':1,}, ......

[0153] }

[0154] The interaction shown after parsing the JSON Schema (JSON SCHEMA, which will not be described in detail below) instance through the vue-json-schema-form dependency package is as follows Figure 5The field rule application shown in the figure shows the interactive diagram (here refers to the interactive page corresponding to the target instance). Among them, the name and the pinyin of the name can be linked to check and display. For example, the interactive page also displays the basic information that needs to be filled in, such as "real name, issuing authority, issuing method, mobile phone number, marital status", etc. No specific limitation is made here.

[0155] Specifically, combined Figure 6 As shown in the figure, for the JSON Schema configuration solution, the following steps can be used to generate an application configuration based on the JSON Schema instance and integrate the dynamic response association verification rules of each field: configure the Schema template, configure the field linkage rule script, generate the JSON Schema instance, parse the field rules, and display the field rule application.

[0156] The disclosed embodiment generates a JSON Schema template by constructing a dynamic data validation form configuration attribute, and configures the linked display (hrShow), linked editing (hrDisabled), linked mandatory (hrRequired) and other attributes (customizable) through script configuration, and configures the associated logic, and outputs a program template adapted (under different business scenarios). Therefore, a customized (or personalized) Schema template is generated according to the JSONSchema data verification rules, and a customized (or personalized) configuration of dynamic verification data for building a multi-terminal application is realized, which can realize the part of the manually appended complex interactive logic implementation through form configuration, such as: whether to display and hide (hrShow), whether to edit (hrDisabled), special configuration of the linked block (hrDisblock) function, etc. Thereby, to a certain extent, the consequences of redundancy caused by manually appending code are avoided.

[0157] From the above description, it can be seen that the present disclosure achieves the following technical effects: according to the dynamic field verification data of different business scenarios, the corresponding field rule template is configured to realize a flexible configuration scheme for dynamic data verification, and the generated configuration is integrated into the project to facilitate the unified coding style, achieve plug-and-play, and facilitate the standardization of coding in the later stage. It not only improves development efficiency, reduces risks, ensures the consistency of project practices, but also reduces maintenance costs.

[0158] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0159] The present disclosure also provides a configuration device for dynamic data verification for implementing the configuration method embodiment of the dynamic data verification. Figure 7 As shown, the configuration device 70 for dynamic data verification includes:

[0160] The acquisition unit 701 is used to acquire the preset template and display a field basic attribute configuration page including the preset template in response to a user triggering operation on the preset template;

[0161] The processing unit 702 is used to generate field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario;

[0162] The processing unit 702 is further configured to display an editing page for configuring a field linkage rule script when receiving a request for editing a rule, and generate field rule attribute data according to an input operation of the user on the editing page based on the business scenario, wherein the field rule attribute data includes at least two rules for associating and taking effect on the fields, and the associating and taking effect on the rules are used for dynamic data verification;

[0163] The processing unit 702 is further configured to generate a JSON Schema instance according to the field basic attribute data and the field rule attribute data;

[0164] The processing unit 702 is further configured to generate a target instance that complies with the application specification by parsing the JSON Schema instance, and display an interactive page corresponding to the target instance, wherein the interactive page displays a dynamic data verification form in the business scenario.

[0165] Optionally, when the processing unit 702 generates the field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario, the processing unit 702 specifically includes:

[0166] According to the input operation of the user on the field basic attribute configuration page based on the business scenario, basic field configuration information is obtained, wherein the basic field configuration information includes: basic attributes of the field and dynamic field verification rules. The field basic attribute configuration page includes: default items, selection items and editable items, wherein the selection items include whether to display, whether to be required, and whether to be editable;

[0167] According to the field basic configuration information, field basic attribute data based on JSON Schema is generated.

[0168] Optionally, when the processing unit 702 generates the field rule attribute data according to the input operation of the user on the editing page based on the business scenario, the processing unit 702 specifically includes:

[0169] According to the input operation of the user on the editing page based on the business scenario, field rule configuration information is obtained, where the field rule configuration information includes a rule type, a script type, and a field linkage rule script;

[0170] According to the field rule configuration information, field rule attribute data based on JSON Schema is generated.

[0171] Optionally, the at least two fields include a target field and a related field matching the target field, and both the target field and the related field are determined based on the business scenario;

[0172] The rule for the association to take effect is a rule for forming a linkage relationship between the target field and the related field by configuring a custom attribute for linkage in the field rule data of the target field.

[0173] Optionally, when the processing unit 702 generates a JSON Schema instance according to the field basic attribute data and the field rule attribute data, the processing unit 702 specifically includes:

[0174] A complete JSON Schema instance is generated through data integration according to the field basic attribute data and the field rule attribute data.

[0175] Optionally, further, the generating a target instance conforming to the application specification by parsing the JSON Schema instance includes:

[0176] Parsing the data structure of the JSON Schema instance to generate a data structure of the instance that complies with the Schema application specification; and

[0177] Parsing the field linkage rules of the JSON Schema instance, performing matching processing according to the field linkage rules, and generating an instance that complies with the Schema application specification;

[0178] The instance that complies with the Schema application specification is used as the target instance.

[0179] Optionally, the dynamic data verification configuration device is further used to perform the following operations:

[0180] In response to the user's interactive operation on the interactive page, dynamic data verification is performed through the linkage relationship between the fields;

[0181] If the verification is successful, the form data based on the interactive page is stored in the database.

[0182] The specific manner in which each unit in the above device embodiment performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.

[0183] The present disclosure also provides an electronic device, such as Figure 8 As shown, the electronic device includes one or more processors 81 and a memory 82. Figure 8 A processor 81 is taken as an example.

[0184] The controller may further include: an input device 83 and an output device 84 .

[0185] The processor 81, the memory 82, the input device 83 and the output device 84 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0186] The processor 81 can be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips. The general-purpose processor can be a microprocessor or any conventional processor.

[0187] The memory 82 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the control method in the embodiment of the present disclosure. The processor 81 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 82, that is, the configuration method of dynamic data verification of the above method embodiment is realized.

[0188] The memory 82 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of a processing device operated by the server, etc. In addition, the memory 82 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 82 may optionally include a memory remotely arranged relative to the processor 81, and these remote memories may be connected to a network connection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0189] The input device 83 can receive input digital or character information, and generate key signal input related to user settings and function control of the processing device of the server. The output device 84 can include display devices such as a display screen.

[0190] One or more modules are stored in the memory 82, and when executed by one or more processors 81, the method shown above is performed.

[0191] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the configuration method for implementing the dynamic data verification as described above.

[0192] The embodiment of the present disclosure also provides a computer program product, including a computer program, which implements the configuration method of dynamic data verification as described above when executed by a processor.

[0193] Those skilled in the art can understand that the implementation of all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FM), a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0194] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A configuration method for dynamic data verification, characterized in that: include: In response to a user triggering operation on a preset template, the preset template is acquired and a field basic attribute configuration page including the preset template is displayed; Generate field basic attribute data based on the preset template according to the user's input operation on the field basic attribute configuration page based on the business scenario; If a request for editing a rule is received, an editing page for configuring a field linkage rule script is displayed, and field rule attribute data is generated according to the user's input operation on the editing page based on the business scenario, wherein the field rule attribute data includes at least two field-associated effective rules, and the associated effective rules are used for dynamic data verification; Generate a JSON Schema instance according to the field basic attribute data and the field rule attribute data; By parsing the JSON Schema instance, a target instance that complies with the application specification is generated, and an interactive page corresponding to the target instance is displayed, where the dynamic data verification form in the business scenario is displayed on the interactive page.

2. The method according to claim 1, characterized in that The generating of the field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario includes: According to the input operation of the user on the field basic attribute configuration page based on the business scenario, basic field configuration information is obtained, wherein the basic field configuration information includes: basic attributes of the field and dynamic field verification rules. The field basic attribute configuration page includes: default items, selection items and editable items, wherein the selection items include whether to display, whether to be required, and whether to be editable; According to the field basic configuration information, field basic attribute data based on JSON Schema is generated.

3. The method according to claim 1, characterized in that: The generating of field rule attribute data according to the input operation of the user on the editing page based on the business scenario includes: According to the input operation of the user on the editing page based on the business scenario, field rule configuration information is obtained, where the field rule configuration information includes a rule type, a script type, and a field linkage rule script; According to the field rule configuration information, field rule attribute data based on JSON Schema is generated.

4. The method according to claim 1, characterized in that: The at least two fields include a target field and a related field matching the target field, and both the target field and the related field are determined based on the business scenario; The rule for the association to take effect is a rule for forming a linkage relationship between the target field and the related field by configuring a custom attribute for linkage in the field rule data of the target field.

5. The method according to any one of claims 1 to 4, characterized in that: The generating a JSON Schema instance according to the field basic attribute data and the field rule attribute data includes: A complete JSON Schema instance is generated through data integration according to the field basic attribute data and the field rule attribute data.

6. The method according to any one of claims 1 to 4, characterized in that: The generating of a target instance conforming to the application specification by parsing the JSON Schema instance includes: Parsing the data structure of the JSON Schema instance to generate a data structure of the instance that complies with the Schema application specification; and Parsing the field linkage rules of the JSON Schema instance, performing matching processing according to the field linkage rules, and generating an instance that complies with the Schema application specification; The instance that complies with the Schema application specification is used as the target instance.

7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to the user's interactive operation on the interactive page, dynamic data verification is performed through the linkage relationship between the fields; If the verification is successful, the form data based on the interactive page is stored in the database.

8. A configuration device for dynamic data verification, characterized in that: include: An acquisition unit, configured to acquire the preset template and display a field basic attribute configuration page including the preset template in response to a user triggering operation on the preset template; A processing unit, configured to generate field basic attribute data based on the preset template according to the input operation of the user on the field basic attribute configuration page based on the business scenario; The processing unit is further configured to display an editing page for configuring a field linkage rule script when receiving a request for editing a rule, and generate field rule attribute data according to an input operation of the user on the editing page based on the business scenario, wherein the field rule attribute data includes at least two rules for associating and taking effect on the fields, and the associating and taking effect on the rules are used for dynamic data verification; The processing unit is further used to generate a JSON Schema instance according to the field basic attribute data and the field rule attribute data; The processing unit is further configured to generate a target instance that complies with the application specification by parsing the JSON Schema instance, and display an interactive page corresponding to the target instance, wherein the interactive page displays a dynamic data verification form in the business scenario.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the configuration method for dynamic data verification as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the configuration method for dynamic data verification described in any one of claims 1 to 7.