A method for automatically generating a custom parameter panel based on operators
By using XML to define parameter templates in the Data Scientist Working Division and use forms to generate automation generating parameter panels, the problem of large form development workload in the existing technology has been solved, and the automation generation of parameter panels and the dynamic of forms have been realized. Development efficiency and reduction of code error rates.
Patent Information
- Application Number
- CN202010856879.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-24
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-08-24
AI Technical Summary
In the prior art, in the process of embedding operators in the data scientist's workbench, a large amount of parameter information is required, which leads to a large amount of repetitive form development work, which increases the developer's workload and code error rate.
By providing an automatic generating method for the XML -based custom parameter panel, using the readability and scalability of XML, define the parameter template and generate the parameter panel through the form to generate the parameter panel, support the dependent relationship between the parameters and the linkage effect of the linkage effect. , Reduce manual intervention and code duplicate.
The automation generation of the parameter panel is realized, the development of the developer's work and code error rate is reduced, the development efficiency is improved, and the dynamic of the form is realized through the parameter linkage.
Smart Images

Figure CN112000315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method for automatically generating a custom parameter panel based on an operator. Background Art
[0002] The Data Science Workbench aims to lower the threshold for using machine learning, provide a visual operation interface to implement the model training, evaluation and prediction process, seamlessly connect data analysis and prediction applications, reduce the difficulty of life cycle management of machine learning models, and provide users with easy-to-use, efficient and high-performance platform services for data mining and analysis businesses.
[0003] For this purpose, a large number of operators need to be embedded in the data scientist workbench, and each operator contains a large amount of parameter information, which greatly increases the workload of developers in repeated development. Summary of the invention
[0004] The technical task of the present invention is to solve the deficiencies of the prior art and provide a method for automatically generating a custom parameter panel based on an operator, aiming to avoid a large amount of repeated form development work through a form generator, thereby improving the automation process in the web system development process, reducing manual intervention, and simplifying the development process.
[0005] The invention can complete the definition of parameters based on parameter templates according to operator characteristics. The definition of parameters based on XML makes full use of the advantages of XML such as good readability, convenient scalability and suitability for object-oriented program development; the diversity of parameter types and the free combination of parameters provided in the invention can fully meet the definition of different operators; based on the definition of the parameter panel, the invention also supports users to complete the registration of operator parameter information through simple clicks, and the whole process is simple to operate; the invention can complete the conversion from XML to DOM based on the form automatic generator, realize the rendering of the parameter panel, avoid repeated development of the form, and save a lot of time; in addition, the invention also realizes the linkage effect between parameters by configuring the dependency relationship between parameters, thereby realizing the dynamic form.
[0006] In the process of implementing the present invention, it is mainly found that the automatic generation of existing forms has at least the following defects: fewer form types are supported; the rendering of complex form elements by combining simple form elements is not supported; and the dynamic linkage effect between forms is not provided.
[0007] The technical solution adopted by the present invention to solve its technical problem is:
[0008] A method for automatically generating a custom parameter panel based on an operator, the specific implementation steps of the method include:
[0009] Step S1, customizing parameter information and related dependency conditions based on XML;
[0010] Step S2, completing the registration of operator parameters;
[0011] Step S3: passing the defined XML parameter content into the parameter panel automatic generator to complete the conversion and generation from XML to parameter panel;
[0012] Step S4: completing the linkage effect between parameters according to the changes made to the parameter values by the user and the dependency relationship between the parameters.
[0013] Optionally, the specific implementation method of step S1 is:
[0014] The user completes the definition of parameters based on the current operator parameter information according to the parameter template provided by the system. The parameter template is as follows:
[0015]
[0016] Among them, key is the English name of the parameter; type is the form type corresponding to the parameter; description is the parameter description information.
[0017] Optionally, the form types involved in step S1 include: string, int, double, long, char, category, stringcategory, boolean, tupel, attribute, attributes, list, enumeration, matrix, dateformat, text, regexp, expression, file, filter, date, and password.
[0018] Optionally, in step S1, string, int, double, long, and char correspond to input types in the form, and their corresponding parameter templates are:
[0019]
[0020] Among them, min and max are the maximum and minimum values of the content required by the current parameter, and the input value size is verified according to the current attribute;
[0021] Category and stringcategory correspond to the select drop-down box of the FORM form. Stringcategory selects whether the current component is an editable drop-down box by configuring the isEditable attribute value. The specific parameter template is:
[0022]
[0023] Among them, Value is the configuration option information of the select drop-down box;
[0024] For list type parameter types, a list type parameter template is provided. This type supports free combination of different types of string, int, double, long, char, category, stringcategory, boolean, tupel, attribute, expression, and enumeration. The specific parameter template information is as follows:
[0025]
[0026] Among them, KeyType and ValueType can rely on other basic components and be freely combined to complete the rendering of the list form; DefaultEntries is the default value of the current parameter information, key corresponds to the default value of KeyType, and value is the default value of ValueType;
[0027] For enumeration, an enumeration type form is provided, which supports users to customize the number and content of enumerations; matrix supports users to customize matrix dimensions and content; expression provides users with a formula editor component; password provides a password component based on MD5 encryption.
[0028] Optionally, the specific implementation method of step S2 is: the user can complete the registration of the operator parameters with a simple click operation, thereby providing a data source for rendering the parameter panel.
[0029] Optionally, the specific implementation method of step S3 is: based on the defined XML parameter information, it is passed into the parameter form generator to complete the rendering of the parameter panel, wherein the specific implementation steps of the parameter form generator are as follows:
[0030] 301. Parameter information of traversal operator <parameter>< / parameter> ; Among them, ParameterType is the parameter construction class;
[0031] 302. According to the XML parameter information, obtain the type value corresponding to the current parameter;
[0032] 303. Complete the conversion from XML to ParameterType according to the type value;
[0033] 304. After completing the construction of ParameterType, obtain the method getHtml in the current class and return the Html, Javascript, and Css codes corresponding to the XML parameter information;
[0034] 305. The Html, Javascript, and Css codes generated by the current operator parameters are assembled and spliced to complete the entire rendering of the parameter panel.
[0035] Optionally, the specific configuration of step S4 is as follows:
[0036]
[0037] The linkage between components is achieved according to the configuration of conditions, where the parameter length depends on the correctness of the parameter isActive to determine its own display or hiding; when the value of the parameter isActive changes, such as from true to false, the DOM structure corresponding to the parameter length changes from display to hiding, thus completing the linkage effect between form elements.
[0038] Optionally, the provided dependency conditions include the following types: equal, noneEqual, boolean, or, and, equalType, noneEqualType, equalListValue, noneEqualListValue;
[0039] Among them, and and or support the free combination of several dependent conditions; or can support the rendering of the display or not of the current parameter panel when the union of several conditions is true; and requires the rendering of the display or not of the parameter corresponding to the current condition under the premise that the intersection of several conditions is true.
[0040] Optionally, the parameter template corresponding to or is as follows:
[0041]
[0042] According to the parameter template corresponding to or, the parameter corresponding to the current Condition is displayed or hidden only when param1 is true or param2 is true.
[0043] Optionally, the parameter template corresponding to and is as follows:
[0044]
[0045] According to the parameter template corresponding to and, the current parameter can be displayed only when param1 is true and the value of param2 is input_exists.
[0046] Compared with the prior art, the automatic generation method of a custom parameter panel based on an operator of the present invention has the following beneficial effects:
[0047] 1. The definition of the parameter template based on XML provided by the present invention can make full use of the characteristics of XML: XML has good readability, convenient scalability and is suitable for object-oriented program development;
[0048] 2. The parameter types provided by the present invention are rich and diverse, and support the combination of parameters to complete the rendering of complex forms, further meeting most of the needs of users;
[0049] 3. The automatic generation method of the parameter panel provided by the present invention greatly reduces the workload of developers and also reduces the code error rate of developers during the development process;
[0050] 4. The design of the dependent conditions between parameters provided by the present invention realizes the linkage effect between parameters and avoids the repeated writing of a large amount of Javascript codes;
[0051] 5. The whole invention provides a variety of parameter types, greatly reduces the amount of code development for the FORM form, improves work efficiency, and reduces the error rate of the code. The generation process of the whole parameter panel is simple and has strong practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly describe the working principle of the method for automatically generating a custom parameter panel based on an operator of the present invention, a simplified diagram is attached below for further explanation.
[0053] Attached Figure 1 It is a flowchart of a method for automatically generating a custom parameter panel based on an operator according to the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the attached embodiment of the present invention Figure 1 , the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] As attached Figure 1As shown, the present invention provides an automatic generation method of a custom parameter panel based on an operator, and the specific implementation steps of the method include:
[0056] Step S1, customizing parameter information and related dependency conditions based on XML;
[0057] Step S2, completing the registration of operator parameters;
[0058] Step S3: passing the defined XML parameter content into the parameter panel automatic generator to complete the conversion and generation from XML to parameter panel;
[0059] Step S4: completing the linkage effect between parameters according to the changes made to the parameter values by the user and the dependency relationship between the parameters.
[0060] The specific implementation method of the above step S1 is:
[0061] The user completes the definition of parameters based on the current operator parameter information according to the parameter template provided by the system. The parameter template is as follows:
[0062]
[0063] Among them, key is the English name of the parameter; type is the form type corresponding to the parameter; description is the parameter description information.
[0064] The form types involved in the above step S1 include: string, int, double, long, char, category, stringcategory, boolean, tupel, attribute, attributes, list, enumeration, matrix, dateformat, text, regexp, expression, file, filter, date, and password.
[0065] Optionally, in step S1, string, int, double, long, and char correspond to input types in the form, and their corresponding parameter templates are:
[0066]
[0067] Among them, min and max are the maximum and minimum values of the content required by the current parameter, and the input value size is verified according to the current attribute;
[0068] Category and stringcategory correspond to the select drop-down box of the FORM form. Stringcategory selects whether the current component is an editable drop-down box by configuring the isEditable attribute value. The specific parameter template is:
[0069]
[0070] Among them, Value is the configuration option information of the select drop-down box;
[0071] For list type parameter types, a list type parameter template is provided. This type supports free combination of different types of string, int, double, long, char, category, stringcategory, boolean, tupel, attribute, expression, and enumeration. The specific parameter template information is as follows:
[0072]
[0073]
[0074] Among them, KeyType and ValueType can rely on other basic components and be freely combined to complete the rendering of the list form; DefaultEntries is the default value of the current parameter information, key corresponds to the default value of KeyType, and value is the default value of ValueType;
[0075] For enumeration, an enumeration type form is provided, which supports users to customize the number and content of enumerations; matrix supports users to customize matrix dimensions and content; expression provides users with a formula editor component; password provides a password component based on MD5 encryption.
[0076] The specific implementation method of the above step S2 is: the user can complete the registration of the operator parameters with a simple click operation, thereby providing a data source for the rendering of the parameter panel.
[0077] The specific implementation method of the above step S3 is: based on the defined XML parameter information, it is passed into the parameter form generator to complete the rendering of the parameter panel, wherein the specific implementation steps of the parameter form generator are as follows:
[0078] 301. Parameter information of traversal operator <parameter>< / parameter> ;
[0079] 302. According to the XML parameter information, obtain the type value corresponding to the current parameter;
[0080] 303. Complete the conversion from XML to ParameterType according to the type value;
[0081] 304. After completing the construction of ParameterType, obtain the method getHtml in the current class and return the Html, Javascript, and Css codes corresponding to the XML parameter information;
[0082] 305. The Html, Javascript, and Css codes generated by the current operator parameters are assembled and spliced to complete the entire rendering of the parameter panel.
[0083] Among them, ParameterType is the parameter construction class. The whole process is fully automated and does not require manual intervention, which greatly simplifies the amount of code development.
[0084] Based on the above steps S1-S3, only the rendering of the basic form can be completed. However, for operator parameters, some dependencies between parameters are often required to complete the parameter configuration process in different application scenarios. For this purpose, step S4 provides a form linkage configuration and rendering method. The specific configuration method is as follows:
[0085]
[0086] The linkage between components is achieved according to the configuration of conditions, where the parameter length depends on the correctness of the parameter isActive to determine its own display or hiding; when the value of the parameter isActive changes, such as from true to false, the DOM structure corresponding to the parameter length changes from display to hiding, thus completing the linkage effect between form elements.
[0087] The dependency conditions provided above include the following types: equal, noneEqual, boolean, or, and, equalType, noneEqualType, equalListValue, noneEqualListValue;
[0088] Among them, and and or support the free combination of several dependent conditions; or can support the rendering of the display or not of the current parameter panel when the union of several conditions is true; and requires the rendering of the display or not of the parameter corresponding to the current condition under the premise that the intersection of several conditions is true.
[0089] The parameter template corresponding to or is as follows:
[0090]
[0091]
[0092] According to the parameter template corresponding to or, the parameter corresponding to the current Condition is displayed or hidden only when param1 is true or param2 is true.
[0093] The parameter template corresponding to and is as follows:
[0094]
[0095]
[0096] According to the parameter template corresponding to and, the current parameter can be displayed only when param1 is true and the value of param2 is input_exists.
[0097] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0098] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for automatically generating a custom parameter panel based on an operator, characterized in that: The specific implementation steps of this method include: Step S1, customizing parameter information and related dependency conditions based on XML; Step S2, completing the registration of operator parameters; Step S3: passing the defined XML parameter content into the parameter panel automatic generator to complete the conversion and generation from XML to parameter panel; Step S4, completing the linkage effect between parameters according to the changes made to the parameter values by the user and the dependency relationship between the parameters; The specific implementation method of step S2 is: the user can complete the registration of the operator parameters with a simple click operation, thereby providing a data source for the rendering of the parameter panel; The specific implementation method of step S3 is: based on the defined XML parameter information, it is passed into the parameter panel automatic generator to complete the rendering of the parameter panel, wherein the specific implementation steps of the parameter panel automatic generator are as follows:
301. Parameter information of traversal operator <parameter>< / parameter> ; Among them, ParameterType is the parameter construction class; 302. According to the XML parameter information, obtain the type value corresponding to the current parameter; 303. Complete the conversion from XML to ParameterType according to the type value; 304. After completing the construction of ParameterType, obtain the method getHtml in the current class and return the Html, Javascript, and Css codes corresponding to the XML parameter information; 305. Assemble the Html, Javascript, and CSS codes generated by the current operator parameters, thereby completing the entire rendering of the parameter panel; The specific configuration of step S4 is as follows: The linkage between components is achieved according to the configuration of conditions, where the parameter length depends on the correctness of the parameter isActive to determine its own display or hiding; when the value of the parameter isActive changes, such as from true to false, the DOM structure corresponding to the parameter length changes from display to hiding, thus completing the linkage effect between form elements.
2. The method for automatically generating a custom parameter panel based on an operator according to claim 1, characterized in that: The specific implementation method of step S1 is: The user completes the definition of parameters based on the current operator parameter information according to the parameter template provided by the system. The parameter template is as follows: Among them, key is the English name of the parameter; type is the form type corresponding to the parameter; description is the parameter description information.
3. The method for automatically generating a custom parameter panel based on an operator according to claim 2, characterized in that: The form types involved in step S1 include: string, int, double, long, char, category, stringcategory, boolean, tupel, attribute, attributes, list, enumeration, matrix, dateformat, text, regexp, expression, file, filter, date, and password.
4. The method for automatically generating a custom parameter panel based on an operator according to claim 3, characterized in that: In step S1, string, int, double, long, and char correspond to the input types in the form, and their corresponding parameter templates are: Among them, min and max are the maximum and minimum values of the content required by the current parameter, and the input value size is verified according to the current attribute; Category and stringcategory correspond to the select drop-down box of the FORM form. Stringcategory selects whether the current component is an editable drop-down box by configuring the isEditable attribute value. The specific parameter template is: Among them, Value is the configuration option information of the select drop-down box; For list type parameter types, a list type parameter template is provided. This type supports free combination of different types of string, int, double, long, char, category, stringcategory, boolean, tupel, attribute, expression, and enumeration. The specific parameter template information is as follows: Among them, KeyType and ValueType can rely on other basic components and be freely combined to complete the rendering of the list form; DefaultEntries is the default value of the current parameter information, key corresponds to the default value of KeyType, and value is the default value of ValueType; For enumeration, an enumeration type form is provided, which supports users to customize the number and content of enumerations; matrix supports users to customize matrix dimensions and content; expression provides users with a formula editor component; password provides a password component based on MD5 encryption.
5. The method for automatically generating a custom parameter panel based on an operator according to claim 1, characterized in that: The provided dependency conditions include the following types: equal, noneEqual, boolean, or, and, equalType, noneEqualType, equalListValue, noneEqualListValue; Among them, and and or support the free combination of several dependent conditions; or can support the rendering of the display or not of the current parameter panel when the union of several conditions is true; and requires the rendering of the display or not of the parameter corresponding to the current condition under the premise that the intersection of several conditions is true.
6. The method for automatically generating a custom parameter panel based on an operator according to claim 5, characterized in that: The parameter template corresponding to or is as follows: According to the parameter template corresponding to or, the parameter corresponding to the current Condition is displayed or hidden only when param1 is true or param2 is true.
7. The method for automatically generating a custom parameter panel based on an operator according to claim 6, characterized in that: The parameter template corresponding to and is as follows: According to the parameter template corresponding to and, the current parameter can be displayed only when param1 is true and the value of param2 is input_exists.
Citation Information
Patent Citations
VO-based form customization, configuration and parsing operation method
CN101706716A
Automatic video playback system
CN102708903A