Movatterモバイル変換


[0]ホーム

URL:


CN110109979B - Form option configuration method and device - Google Patents

Form option configuration method and device
Download PDF

Info

Publication number
CN110109979B
CN110109979BCN201810038986.XACN201810038986ACN110109979BCN 110109979 BCN110109979 BCN 110109979BCN 201810038986 ACN201810038986 ACN 201810038986ACN 110109979 BCN110109979 BCN 110109979B
Authority
CN
China
Prior art keywords
component
format
data information
option
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810038986.XA
Other languages
Chinese (zh)
Other versions
CN110109979A (en
Inventor
宋欣遥
钱程
田盛
苏昊欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN201810038986.XApriorityCriticalpatent/CN110109979B/en
Publication of CN110109979ApublicationCriticalpatent/CN110109979A/en
Application grantedgrantedCritical
Publication of CN110109979BpublicationCriticalpatent/CN110109979B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a method and a device for configuring form options, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring configuration information associated with the form component, and generating a configuration table based on the configuration information; and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component. The embodiment provides a configurable idea for the form options, has high universality and improves the reusability and flexibility of the form components; compared with the prior art, the method has the advantages that a developer only needs to write the configuration information in the configuration table, the logic is simple, the development efficiency of the form options is improved, the repeated writing of similar codes and code redundancy is avoided, and the development cost and the later maintenance cost are reduced.

Description

Form option configuration method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for configuring form options.
Background
To meet the development of information system services, modification or addition operations are generally required to form codes, which results in an increasing amount of form codes, and many of the form codes face reconstruction problems. At present, in the development process of the platform form page, repetitive development (such as options increase and decrease, verification logic, data processing and the like) is unavoidable, and the solution mode generally includes two modes of non-componentized development and componentized development, wherein:
(1) Non-componentized development is more traditional and is typically composed of three parts, simple HTML (HyperText Markup Language ), javascript (control page element), CSS (CASCADING STYLE SHEETS, cascading style sheet). For the same form option, the data acquisition setting and verification part can be completed by directly copying codes, and the data acquisition setting and verification part is completed by JavaScript;
(2) And (3) modular development, namely defining each module with relatively independent functions as a module as an alternative mode of non-modular development, and then forming a large module by combining or nesting small modules to finally complete the construction of the whole form interface. Because data processing and data verification are usually packaged inside components, for the same form option, only the corresponding components need to be referenced, and the reusability is greatly improved compared with a non-componentization mode.
In carrying out the present invention, the inventors have found that at least the following problems exist in the prior art:
(1) For a non-componentized form development mode, the code redundancy is high, the function division of the service module is unclear, the coupling degree between modules is high, and the later maintenance of the form is difficult;
(2) For the mode of developing the form in a componentization mode, the service requirements are different, partial logic in the repetitive component is required to be modified, and the modification is usually carried out on the internal code of the component, so that the flexibility of the repetitive development is low, the verification of the data has the repeatability, and the development efficiency of the form is reduced;
(3) When the number of developers is limited, development tasks of part of form components can be given to a third party, but due to different development habits of the developers, the possibility of bug occurrence in the later period is higher, the maintenance is difficult, and the development of the form components is not facilitated.
Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a device for configuring form options, which at least can solve the problem of high post maintenance cost caused by lower development flexibility of repetitive components in the prior art.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for configuring form options, including: acquiring configuration information associated with a form component, and generating a configuration table based on the configuration information; and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component.
Optionally, the configuration information includes a format receiving rule of the form component;
The displaying form options associated with the form component further includes: receiving a data input request for the form options, and acquiring input data information; and when the format of the data information does not accord with the format receiving rule, carrying out format conversion on the data information according to a preset format conversion rule, and transmitting the data information after format conversion to the form component for display in the form option.
Optionally, the configuration information includes a validation rule of the form component;
The displaying form options associated with the form component further includes: receiving a data input request for the form options, and acquiring input data information; when the data information does not accord with the verification rule, corresponding abnormal information is determined, and the abnormal information is transmitted to the form component so as to be displayed in the form options
Optionally, the configuration information includes a type of the form component; wherein the type is one of dynamic or static;
The displaying form options associated with the form component further includes: receiving a data input request for the form options, and acquiring input data information; when the type of the form component is a dynamic type and a display request for the data information is received, transmitting the data information to the form component for display in the form option; or when the type of the form component is a static type, transmitting the data information to the form component to be displayed in the form option.
Optionally, the configuration information includes a format display rule of the form component;
The displaying form options associated with the form component further includes: and carrying out format rendering on the form component according to the format display rule, and displaying the form options after format rendering.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided an apparatus for configuring form options, including: the system comprises an acquisition module, a configuration module and a control module, wherein the acquisition module is used for acquiring configuration information associated with a form component and generating a configuration table based on the configuration information; and the display module is used for analyzing the configuration table, generating a corresponding form component and displaying form options associated with the form component.
Optionally, the configuration information includes a format receiving rule of the form component;
The display module is further configured to: receiving a data input request for the form options, and acquiring input data information; and when the format of the data information does not accord with the format receiving rule, carrying out format conversion on the data information according to a preset format conversion rule, and transmitting the data information after format conversion to the form component for display in the form option.
Optionally, the configuration information includes a validation rule of the form component;
The display module is further configured to: receiving a data input request for the form options, and acquiring input data information; and when the data information does not accord with the verification rule, corresponding abnormal information is determined, and the abnormal information is transmitted to the form component to be displayed in the form option.
Optionally, the configuration information includes a type of the form component; wherein the type is one of dynamic or static;
The display module is further configured to: receiving a data input request for the form options, and acquiring input data information; when the type of the form component is a dynamic type and a display request for the data information is received, transmitting the data information to the form component for display in the form option; or when the type of the form component is a static type, transmitting the data information to the form component to be displayed in the form option.
Optionally, the configuration information includes a format display rule of the form component;
The display module is further configured to: and carrying out format rendering on the form component according to the format display rule, and displaying the form options after format rendering.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic device configured with form options.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement any of the configuration form option methods described above.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements any of the above-described configuration form option methods.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: by combining with the componentization thought, high abstraction is carried out on the componentization basis, and an integrated implementation scheme of option configuration, option generation, data format conversion and data verification is provided. The required functions are assembled through the scheme, the form page with the verification function is generated rapidly, the reusability and flexibility of the components are improved greatly, the repeated writing of similar codes and code redundancy are avoided, meanwhile, the access of a third party code is facilitated, the form logic is simplified, the form is easy to manage, and the maintenance and expansion of the form are facilitated.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a method for configuring form options according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative method of configuring form options according to an embodiment of the present invention;
FIG. 3 is a flow diagram of another alternative method of configuring form options according to an embodiment of the present invention;
FIG. 4 is a flow diagram of a method of specifically configuring form options according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main modules of a configuration form option device according to an embodiment of the invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
Fig. 7 is a schematic diagram of a computer system suitable for use in implementing a mobile device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, a main flowchart of a method for configuring form options according to an embodiment of the present invention is shown, including the following steps:
s101: configuration information associated with the form component is obtained, and a configuration table is generated based on the configuration information.
S102: and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component.
In the above embodiment, for step S101, the form is mainly responsible for collecting data on a page, and includes one or more form options, where the form options are data information input boxes on the page, and a user may perform a data input operation in the data information input boxes.
Based on the componentized concept, information associated with the form options may be combined, configured to generate a form option configuration table, see in particular table 1. Since the form component corresponds to the form option, the information related to the form option is the same as the information related to the form option. And then, when the list options are written and the contents are changed, the developer only needs to write and change in the option configuration list, and more operations are not needed. For example, based on the configuration information, when an "in-bin" form option needs to be regenerated, no redevelopment is required, and only one available field needs to be configured in the configuration information. After the configuration is finished, the reconfigured configuration information is analyzed, and then the form option of 'entering the warehouse' can be generated.
Table 1 form selection configuration table
The form option configuration table abstracts the page form unit element into an option configuration table in the form of key value pairs (corresponding one value is obtained according to one key value), and the table is a program language description of the form option. The following describes each type in the option configuration table:
1. The primary attribute is the configuration of the form option Section. For a more complex form page, the form page can be divided into a plurality of sections according to functions, rules and the like, so that the form option configuration can be performed on each Section, wherein the method comprises the following steps:
(1) the type field indicates the type of Section, which may be either a dynamic type or a static type. The dynamic type refers to that a user can determine whether to display the Section through a certain option on the page; the static type cannot be selected by the user and can only be displayed in the page by default;
(2) The properties field indicates all the form options in the form component Section for which the secondary attribute is configured in relation, specifically:
1) The type field in the secondary attribute indicates the component name used by the form item. For example, if the text box component designates the component name as text, the text box on the code generation page of the text component is read in the parsing process.
2) The name field in the secondary attribute indicates the mapping of the form item in the data pool (where the data is stored) and when the value of the form item changes (e.g., the user-entered information changes from a to B), the contents of the data pool are synchronized.
3) The validation field in the secondary attribute indicates the rule that the form item needs to satisfy to validate the data; the type field in the three-level attribute is the name of the verification component, and the rule field specifies the rule to be satisfied when verifying the data.
Taking a login input password box as an example:
Properties:{
type: 'text' — indicates that text components are used, namely input box components;
Id: ' the code can be arbitrarily defined, but must be unique, and requires a unique identifier;
Label: 'password', -label is two words of 'password' in front of the input box seen by the user on the page;
Description: the' password must consist of 16 bits— some description related to the password Label;
Param: { placeholder: 'please enter a password' } -there may be some information inside the page entry box, e.g. please enter a password or the like; in addition, for different components, the param may have different fields in part, for example, additional parameters needed in the code;
validing: the (data plane) password needs to meet the rule, for example, the password must be composed of 16 bits, and the framework can judge whether the password input by the user meets the condition according to the content of the field.
}
2. In addition, the definition and configuration of the option configuration table may be in YAML (Yet Another Markup Language, another markup language) language or JSON (JavaScript Object Notation ) format. The basic grammar rules of the YAML language comprise:
1) Case sensitive;
2) Representing hierarchical relationships using indents;
3) The TAB key is not allowed to be used during the retraction, and only the blank is allowed to be used;
4) The number of spaces indented is not important as long as the elements of the same hierarchy are left-side aligned;
Therefore, compared with the JSON format, the YAML language ensures that the file hierarchy is clearer, the file is easy to recognize and the readability is high.
For step S102, since the form configuration table contains all the associated configuration information, after the option configuration is completed, the corresponding form component can be generated by parsing the option configuration table.
After the form component is generated, form options corresponding to the form component may be displayed on a page to detect configuration information. Then, if the user inputs data in the form option, the data is displayed in the form option, and the user can also view the input data information on the page.
In addition, based on the componentization thought, a set of unified display formats can be provided for the forms displayed on the pages, so that the background management is facilitated, namely, the page styles of the web sites are unified after the web sites are established, and therefore, the display formats of the page areas and the form options are also drawn into a set of components. The display format refers to the distance between a certain area and another area on the page, the placement position of a form option input box in the area, the placement position of prompt information and the like. The display pages of different pixels may have the same display format, but different sizes are displayed.
The method provided by the embodiment provides a configurable idea for the form options, has high universality and improves the reusability and flexibility of the form components; compared with the prior art, the developer only needs to write/change the configuration information in the configuration table, so that the development efficiency is improved, and similar codes and code redundancy are avoided from being repeatedly written. In addition, based on the fixed format of the configuration table, the problem of bug caused by different development habits of different developers is avoided, the development cost and the later maintenance cost are reduced, and the project expansion is facilitated.
Referring to fig. 2, an alternative configuration form option method flow diagram is shown, comprising the steps of,
S201: acquiring configuration information associated with the form component, and generating a configuration table based on the configuration information; wherein the configuration information includes format receipt rules for the form component.
S202: and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component.
S203: and receiving a data input request of the form option, and acquiring the input data information.
S204: when the format of the data information does not accord with the format receiving rule, carrying out format conversion on the data information according to the preset format conversion rule, and transmitting the data information after format conversion to a form component for display in a form option.
In the above embodiment, the step S202 may refer to the description of the step S102 shown in fig. 1, which is not repeated here.
In the above embodiment, for step S201, due to the business requirement and the updating and iteration performed on the form component, the data information in the incoming component may need to be subjected to format conversion to meet the development requirement.
Furthermore, the format receiving rule corresponding to the form component can be preset in the configuration table, so that the format of the output data information is unified, and the background management is facilitated. The rule can be set according to the requirements of different components, and when the rule needs to be changed, the rule can be directly changed in the configuration table.
For step S203, after the user inputs data information in one input box in the page, the form option will send the data information and the corresponding input box information to the data pool for storage; wherein one input box corresponds to one form option. In addition, because of the complex hierarchical relationship of components, all data needs to be stored in a data pool in order to facilitate communication between components and management of the entered information.
In addition, each form option corresponds to a form component, each form option has respective identification information, and the form component corresponds to the identification information. After the data information is acquired, a corresponding form component can also be determined based on the form options; for example, the Property option in the option configuration table is parsed, and form components corresponding to the form options are determined according to identification information, for example, a component name type field in the secondary attribute.
For step S204, when the input data information meets the format receiving rule, the data information in the data pool is transmitted to the form component for displaying the input data information in the page form option. However, when the format receiving rule is not met, format conversion is required, for example, there is a date 2017.12.30 in the data information transmitted to the component, but the format that may need to be displayed for the date on the page is 12.30.2017.
In addition, as the front end of the page display is separated from the background server end, for the front end, data information, description and the like meeting the user requirements are displayed; for the backend server, the stored information is a tool that is suitable for the backend. Taking the rmb as an example, the front end needs to display in units of dollars, euros, etc. according to the requirement, which needs to be converted. In addition, in order to facilitate the subsequent working process and reduce the inconvenience caused by working handover, the background server may be set to store the data information in the original format, for example, the rmb, so that the data information finally stored in the background needs to be returned to the original format.
Thus, for the overall process of data information transfer to form component and last save, the specific operation of format conversion can be as follows:
(1) Before transmitting the data information to the form component, it is required to convert it to a corresponding format, for example, renminbi into USD, via a format converter.
(2) After the format of the data information in the form component is changed, the data information is converted into the previous format through a format converter when the data information is stored, for example, the RMB is converted into dollars and then is converted back into the RMB.
For the format converter of format conversion, a filter or the like may be used. Taking a filter as an example, the filtering mode can be as follows:
Key: value|Filter 1|Filter 2 …
Key-Value represents a Key Value pair, key is an identification of the Value, and Value is data information required to be subjected to format conversion processing; the filter is a conversion rule for displaying corresponding data information on a page or storing corresponding data information in the background together with the form options, such as unit conversion between dollars and RMB, date format conversion; the filters are separated by a symbol "|", are analyzed in the order from left to right, and sequentially process the data information.
Further, the information transmitted to the form component may also include data description information and the like; the data description information may be a requirement for inputting contents of a form option, for example, a password is required to be composed of 8 digits when registering an account number on a web page. For the acquisition of the data description information, the acquisition can be performed in the data pool based on the component information, such as tag information label, simple description, and the like.
In addition, in the process of analyzing the configuration information to generate the form component, the format of the form options can be unified through the rendering of the format component, so that subsequent management is facilitated, and corresponding format requirements can be stored in the configuration table.
The method provided by the embodiment realizes the idea that the format receiving rule of the form component is configurable so as to meet the format requirement of displaying data information on the form options and embody the diversity characteristic of the form component; in addition, the format receiving rule can be configured and stored in the configuration table, so that a developer can conveniently change the format receiving rule, and the later maintenance cost is reduced.
Referring to FIG. 3, another alternative configuration form option method flow diagram according to an embodiment of the invention is shown, comprising the steps of:
s301: acquiring configuration information associated with the form component, and generating a configuration table based on the configuration information; wherein the configuration information includes validation rules for the form component.
S302: and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component.
S303: and receiving a data input request of the form option, and acquiring the input data information.
S304: when the data information does not accord with the verification rule, corresponding abnormal information is determined, and the abnormal information is transmitted to the form component to be displayed in the form options.
In the above embodiment, step S302 may refer to the description of step S102 shown in fig. 1, step S303 may refer to the description of step S203 shown in fig. 2, and the description is omitted here.
In the above embodiment, for step S301, before the data is displayed, the data is verified based on the component, and it is determined whether the requirement for displaying the data in the form option is met. The verification rule may also be stored in the option configuration table and correspond to the option of the form, for example, a verification component corresponding to a type of the valid attribute in the option configuration table is convenient for subsequent modification.
The validation rules include, but are not limited to, the following:
(1) A length restriction rule for inputted information, for example, when a password is inputted to a login page, the password is composed of 16 bits;
(2) A rule for limiting the type of information entered, e.g., the input box can only input numbers, letters, punctuation marks, or a combination thereof;
(3) A size limitation rule for the input information, which is mainly directed to pictures, for example, the size of the uploaded picture must be 100 x 100;
(4) The order restriction rule for the inputted information, for example, the password is composed of 16 bits, the first four bits and the last four bits are composed of letters, and the middle eight bits are composed of numbers.
For step S304, when the data information does not meet the corresponding verification rule, the background analyzes the reason why the data information does not meet the verification rule, and generates corresponding abnormal information according to the reason, so as to display on the form page. The anomaly information may be stored in an error pool in the data pool; wherein the error pool is used to store exception information for all components. And the error pool transmits the abnormal information to the corresponding form component, and the re-rendering of the form component is triggered to be finally displayed on the page so as to inform the user of the error reason and improve the user input efficiency.
Further, when the data information meets the verification rule, a subsequent process can be performed, but when the data information does not meet the verification rule, the data information is still stored in the data pool, but based on the abnormal information frame, the subsequent process can be prevented from being continued, so that the user cannot log in unless the user changes the input information according to the prompt of the abnormal information.
For example, the password input box only allows inputting numbers, but when the user inputs letters, an abnormal information prompt of 'only inputting numbers, please re-input' is displayed; when the user changes the inputted letters into numbers and passes the verification, the subsequent process can be performed, and the correct password is synchronized to change the content in the data pool.
After the user changes the input information, for example, change option a to option B and input a password, the input framework is triggered to re-render the changed content, i.e. re-verify.
It should be noted that the verification logic supported by the configuration table may cover most verification rules, such as the length limitation, the type limitation, the size requirement, and the like mentioned above, but there are always some form components with relatively complex verification logic, for example, two input boxes need to meet some requirements at the same time, and at this time, the corresponding verification rules cannot be configured in the configuration table, and the verification service (e.g., code) needs to be used for verifying the verification rules.
The method provided by the embodiment provides a configurable idea of data verification, so that the generation and verification of form options in the page are integrated, service logic is simplified, and the number of form codes is reduced; in addition, based on the prompt of the abnormal information, the input efficiency of the user is improved, and the follow-up process is quickened.
Referring to FIG. 4, a flowchart of yet another alternative configuration form option method according to an embodiment of the invention is shown, comprising the steps of:
S401: acquiring configuration information associated with the form component, and generating a configuration table based on the configuration information; wherein the configuration information includes a type of the form component; wherein the type is one of dynamic or static.
S402: and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component.
S403: and receiving a data input request of the form option, and acquiring the input data information.
S404: and when the type of the form component is a dynamic type and a display request of the data information is received, transmitting the data information to the form component for display in the form option.
S404': when the type of the form component is a static type, data information is transmitted to the form component for display in the form option.
In the above embodiment, step S402 may be described with reference to step S102 shown in fig. 1, step S403 may be described with reference to step S203 shown in fig. 2, and the description is omitted here.
In the above embodiment, for step S401, the content input by the user in the form option may have a display or non-display, so that the corresponding dynamic type and static type may be set for the developer to select, and the selectivity of form component development is extended.
For step S404, if the current form option is dynamic, the switch may be added to the current form assembly through the dynamic switching assembly, so that the form option may have a function of displaying and not displaying when displayed on the page, so as to be selected by the user.
For dynamic form options, there may be the following displays on the page, for example: whether or not to display; wherein ∈is a check box, which is a change-over switch, and data information is displayed after checking, and if checking is canceled, data information is not displayed.
However, for the static form option, the data information is directly displayed, and whether to display is not determined by switching the switch.
The method provided by the embodiment provides the idea that the display information is configurable, so that the data input in the form options can be selected to be displayed or not displayed, and the use experience of a user on the page form is improved.
The method provided by the embodiment of the invention combines the idea of componentization, performs high abstraction on the basis of componentization, and provides an implementation scheme integrating option configuration, option generation, data format conversion and data verification. The required functions are assembled through the scheme, the form page with the verification function is generated rapidly, the reusability and flexibility of the components are improved greatly, the repeated writing of similar codes and code redundancy are avoided, meanwhile, the access of a third party code is facilitated, the form logic is simplified, the form is easy to manage, and the maintenance and expansion of the form are facilitated.
Referring to fig. 5, a schematic diagram of main modules of an apparatus 600 for configuring form options according to an embodiment of the present invention is shown, including:
An obtaining module 501, configured to obtain configuration information associated with a form component, and generate a configuration table based on the configuration information;
and the display module 502 is configured to parse the configuration table, generate a corresponding form component, and display form options associated with the form component.
In the embodiment of the invention, the configuration information comprises a format receiving rule of the form component;
the display module 502 is further configured to:
Receiving a data input request for the form options, and acquiring input data information;
and when the format of the data information does not accord with the format receiving rule, carrying out format conversion on the data information according to a preset format conversion rule, and transmitting the data information after format conversion to the form component for display in the form option.
In the implementation device of the invention, the configuration information comprises verification rules of the form component;
the display module 502 is further configured to:
Receiving a data input request for the form options, and acquiring input data information;
And when the data information does not accord with the verification rule, corresponding abnormal information is determined, and the abnormal information is transmitted to the form component to be displayed in the form option.
In the implementation device of the invention, the configuration information comprises the type of the form component; wherein the type is one of dynamic or static;
the display module 502 is further configured to:
Receiving a data input request for the form options, and acquiring input data information;
When the type of the form component is a dynamic type and a display request for the data information is received, transmitting the data information to the form component for display in the form option; or (b)
And when the type of the form component is a static type, transmitting the data information to the form component to display in the form option.
In the embodiment of the invention, the configuration information comprises format display rules of the form component;
the display module 502 is further configured to:
And carrying out format rendering on the form component according to the format display rule, and displaying the form options after format rendering.
The device provided by the embodiment of the invention combines the idea of componentization, performs high abstraction on the basis of componentization, and provides an implementation scheme integrating option configuration, option generation, data format conversion and data verification. The required functions are assembled through the scheme, the form page with the verification function is generated rapidly, the reusability and flexibility of the components are improved greatly, the repeated writing of similar codes and code redundancy are avoided, meanwhile, the access of a third party code is facilitated, the form logic is simplified, the form is easy to manage, and the maintenance and expansion of the form are facilitated.
In addition, the implementation of the configuration form option device in the embodiment of the present invention is described in detail in the configuration form option method described above, so that the description is not repeated here.
Referring to fig. 6, an exemplary system architecture 600 to which the configuration form options method or configuration form options apparatus of embodiments of the present invention may be applied is shown.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages, etc. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using terminal devices 601, 602, 603. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the method for monitoring system security provided in the embodiment of the present invention is generally executed by the server 605, and accordingly, the monitoring system security device is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to fig. 7, there is shown a schematic diagram of a computer system 700 suitable for use in implementing the terminal device of an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises an acquisition module and a display module. The names of these modules do not constitute a limitation on the module itself in some cases, and for example, the display module may also be described as a "form option display module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
acquiring configuration information associated with a form component, and generating a configuration table based on the configuration information;
and analyzing the configuration table, generating a corresponding form component, and displaying form options associated with the form component.
According to the technical scheme of the embodiment of the invention, the high abstraction is carried out on the basis of componentization by combining with componentization thought, and an integrated implementation scheme of option configuration, option generation, data format conversion and data verification is provided. The required functions are assembled through the scheme, the form page with the verification function is generated rapidly, the reusability and flexibility of the components are improved greatly, the repeated writing of similar codes and code redundancy are avoided, meanwhile, the access of a third party code is facilitated, the form logic is simplified, the form is easy to manage, and the maintenance and expansion of the form are facilitated.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

Acquiring configuration information associated with a form component, and generating a configuration table based on the configuration information; the configuration table comprises field types and representative meanings, wherein the field types comprise multi-level attributes, the one-level attributes are configuration of a table option part and comprise type fields, title fields, identification fields and attribute fields, the type fields are one of dynamic and static, when the table option is dynamic, a change-over switch is added to a table component of the table option through a dynamic change-over component, and display or non-display of the table option is controlled through opening and closing of the change-over switch; only the attribute field comprises a secondary attribute, a type field in the secondary attribute indicates the name of a component used by a form option, a name field indicates the mapping of the form option in a data pool, a format field indicates the rule required to be met by the form option verification, the attribute field comprises a tertiary attribute name field and a rule field, the name field is the name of a verification component, and the rule field designates the rule required to be met by the verification;
The system comprises an acquisition module, a configuration module and a control module, wherein the acquisition module is used for acquiring configuration information associated with a form component and generating a configuration table based on the configuration information; the configuration table comprises field types and representative meanings, wherein the field types comprise multi-level attributes, the one-level attributes are configuration of a table option part and comprise type fields, title fields, identification fields and attribute fields, the type fields are one of dynamic and static, when the table option is dynamic, a change-over switch is added to a table component of the table option through a dynamic change-over component, and display or non-display of the table option is controlled through opening and closing of the change-over switch; only the attribute field comprises a secondary attribute, a type field in the secondary attribute indicates the name of a component used by a form option, a name field indicates the mapping of the form option in a data pool, a format field indicates the rule required to be met by the form option verification, the attribute field comprises a tertiary attribute name field and a rule field, the name field is the name of a verification component, and the rule field designates the rule required to be met by the verification;
CN201810038986.XA2018-01-162018-01-16Form option configuration method and deviceActiveCN110109979B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810038986.XACN110109979B (en)2018-01-162018-01-16Form option configuration method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810038986.XACN110109979B (en)2018-01-162018-01-16Form option configuration method and device

Publications (2)

Publication NumberPublication Date
CN110109979A CN110109979A (en)2019-08-09
CN110109979Btrue CN110109979B (en)2024-09-20

Family

ID=67483112

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810038986.XAActiveCN110109979B (en)2018-01-162018-01-16Form option configuration method and device

Country Status (1)

CountryLink
CN (1)CN110109979B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110765145B (en)*2019-10-152022-08-09益萃网络科技(中国)有限公司Content item transmission method, device, equipment and storage medium
CN113342328A (en)*2020-03-022021-09-03中国科学院沈阳自动化研究所Method for generalizing foreground and background interactive assemblies
CN111857712A (en)*2020-06-302020-10-30深圳市中农易讯信息技术有限公司 Form processing method, device, terminal and medium
CN111530084A (en)*2020-07-132020-08-14成都卓杭网络科技股份有限公司Planning configuration system and method thereof
CN112035092A (en)*2020-08-212020-12-04北京字节跳动网络技术有限公司 Form processing method, apparatus, device and readable medium
CN112015420A (en)*2020-09-162020-12-01广东广宇科技发展有限公司Form rendering method and device, computer equipment and storage medium
CN112380477B (en)*2020-11-132024-04-30广东巴金斯科技有限公司Form assembly structure
CN116431138B (en)*2022-11-242024-04-05昆仑数智科技有限责任公司Component template building method and device and form building method and device
CN117369906B (en)*2023-12-072024-02-09成都市楠菲微电子有限公司Pcie verification platform, method and device, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104375818A (en)*2013-10-112015-02-25北京金辉东方科技有限公司System and method for achieving general data form inputting through configuration files
CN106599213A (en)*2016-12-162017-04-26车智互联(北京)科技有限公司Form automatic filling method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20050108625A1 (en)*2003-11-132005-05-19International Business Machines CorporationMethod and system for selecting rules to validate information submitted on an electronic form
CN103106186A (en)*2013-01-222013-05-15百度在线网络技术(北京)有限公司Form verification method and form verification system
CN106021211A (en)*2016-05-182016-10-12山东达创网络科技股份有限公司Intelligent form system and generation method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104375818A (en)*2013-10-112015-02-25北京金辉东方科技有限公司System and method for achieving general data form inputting through configuration files
CN106599213A (en)*2016-12-162017-04-26车智互联(北京)科技有限公司Form automatic filling method and system

Also Published As

Publication numberPublication date
CN110109979A (en)2019-08-09

Similar Documents

PublicationPublication DateTitle
CN110109979B (en)Form option configuration method and device
US10592319B2 (en)API notebook tool
US10698647B2 (en)Selective sharing for collaborative application usage
CN113031946B (en)Method and device for rendering page component
US9152619B2 (en)System and method for constructing markup language templates and input data structure specifications
CN112926008B (en)Method, device, electronic equipment and storage medium for generating form page
CN109271403A (en)A kind of operating method of data query, device, medium and electronic equipment
CN112486482B (en)Page display method and device
US20200068039A1 (en)Integrating a plurality of third party service interactions into a portal system
CN108959294A (en)A kind of method and apparatus accessing search engine
CN114968235A (en)Page form generation method and device, computer equipment and storage medium
CN114115855A (en)Code multiplexing method and device, computer readable storage medium and electronic equipment
CN113641359A (en)Data processing method and device
US9224010B2 (en)Secure document creation from potentially unsecure source templates
CN119048294A (en)Contract numbering method and device, storage medium and terminal equipment
CN116860286A (en)Page dynamic update method, device, electronic equipment and computer readable medium
US11294649B1 (en)Techniques for translating between high level programming languages
US8200713B2 (en)Database exploration for building wireless component applications
CN113703638B (en) Data management page processing method, device, electronic device and storage medium
CN114527972A (en)Page generation method and device, electronic equipment and computer readable medium
US20250173501A1 (en)Method and apparatus for processing text, electronic device, and storage medium
CN113535151A (en)Code generation method and device
CN118093964B (en) Method, device, electronic device and readable medium for sending query result information
US20160275061A1 (en)Managing the display of application forms
CN119066062A (en) A method and device for generating a data table

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp