CN117371403A - Form component generation method, device, equipment and storage medium - Google Patents

Form component generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN117371403A
CN117371403A CN202311306642.XA CN202311306642A CN117371403A CN 117371403 A CN117371403 A CN 117371403A CN 202311306642 A CN202311306642 A CN 202311306642A CN 117371403 A CN117371403 A CN 117371403A
Authority
CN
China
Prior art keywords
form component
component
configuration file
generate
attribute
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.)
Pending
Application number
CN202311306642.XA
Other languages
Chinese (zh)
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.)
China Southern Power Grid Digital Platform Technology Guangdong Co ltd
Original Assignee
China Southern Power Grid Digital Platform Technology Guangdong 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 China Southern Power Grid Digital Platform Technology Guangdong Co ltd filed Critical China Southern Power Grid Digital Platform Technology Guangdong Co ltd
Priority to CN202311306642.XA priority Critical patent/CN117371403A/en
Publication of CN117371403A publication Critical patent/CN117371403A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a form component generation method, a form component generation device, form component generation equipment and a storage medium. Comprising the following steps: acquiring a configuration file of a form to be rendered; transmitting the configuration file into a form renderer to generate a form component, and performing validity check on the form component to generate a validity check result; and when the validity check result is that the verification passes, the form component is sent to the user terminal for display. The generation of the dynamic form is restrained by the configuration file which acquires the unified definition rule, the decoupling with the service is realized, the configuration file is transmitted into the form renderer to generate the form component, the legitimacy of the form component is checked, and after the verification is passed, the form component is sent to the user terminal for display, so that the safety compliance of the form component after the rendering is ensured, the configuration process is simple, the form component is light in volume and strong in flexibility, the developer can more efficiently and conveniently perform the service form configuration, the time and the labor cost are saved, and the method is suitable for the majority of developers to put into service application.

Description

Form component generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a form component generating method, apparatus, device, and storage medium.
Background
In the research and development process of enterprise projects, due to complex service requirements under different scenes, a large number of form pages with commonalities and characteristics are needed to be used for achieving the purpose that the system configuration function meets the service requirements.
The prior art mainly has two kinds of solving means: firstly, precipitating a high-order form component from zero in an enterprise according to service experience, and carrying out multiple packaging and multiple testing and multiple iteration on the high-order form component in combination with a service scene to finally form a general form component meeting actual requirements of projects. Secondly, using an industry large dynamic form solution such as family, the library implements a proprietary set of logic to configure the forms based on a particular front end framework.
The prior art has long sedimentation period in a packaging iterative mode, and specific packages in different enterprise projects realize logic self-organization, are not fully decoupled with business logic, and have great difficulty in cross-project application expansion. The cost of maintaining and updating forms increases in the face of complex business or frequent changes in demand. The dynamic form mode is used, so that learning curves are steep for inexperienced developers, more technical knowledge in the front-end category is needed to be known, and the upper threshold is high.
Disclosure of Invention
The invention provides a form component generation method, a form component generation device and a form component storage medium, so that the problems of repeated development and difficult maintenance of various forms in a business system are solved through unified DSL grammar configuration data abstraction of a characteristic form component.
According to an aspect of the present invention, there is provided a form component generating method, including:
acquiring a configuration file of a form to be rendered;
transmitting the configuration file into a form renderer to generate a form component, and performing validity check on the form component to generate a validity check result;
and when the validity check result is that the verification passes, the form component is sent to the user terminal for display.
Optionally, obtaining a configuration file of the form to be rendered includes: the method comprises the steps of obtaining form elements and component types input by a user, and obtaining a configuration file template; determining a target position of a form element in a configuration file template according to the type of the component; each form element is combined with a profile template based on the target location to generate a profile.
Optionally, passing the configuration file into a form renderer to generate a form component, comprising: the attribute address of the form renderer is read, and the configuration file is transmitted into the attribute address; extracting target rendering content based on the attribute address; and obtaining the form attribute input by the user, and rendering the target rendering content according to the form attribute to generate a form component, wherein the form attribute comprises a default value and a default style.
Optionally, extracting the target rendering content based on the attribute address includes: acquiring a designated field input by a user; and screening the configuration file in the attribute address according to the specified field by the form renderer to determine target rendering content corresponding to the specified field, wherein the target rendering content comprises component information, attribute information and nested sub-component information.
Optionally, performing validity check on the form component to generate a validity check result, including: acquiring a preset character list, wherein the character list comprises illegal characters; judging whether the form component contains contents in the character list, if so, determining that the validity check result is that the check is not passed; otherwise, determining the validity check result as the check passing.
Optionally, after the validity check is performed on the form component to generate a validity check result, the method further includes: when the validity check result is that the verification fails, taking illegal characters contained in the form component as target characters; generating prompt information according to the target characters, and alarming in a specified mode according to the prompt information.
Optionally, after the form component is sent to the user terminal for display, the method further includes: acquiring user selection content based on the form component, and acquiring an editing instruction input by a user based on the user selection content, wherein the editing instruction comprises an extraction instruction or a modification instruction; editing the form component according to the user selection content and the editing instruction to generate a new form component; and sending the new form component to the user terminal for display.
According to another aspect of the present invention, there is provided a form component generating apparatus including:
the configuration file acquisition module is used for acquiring a configuration file of the form to be rendered;
the form component generation and validity verification module is used for transmitting the configuration file into the form renderer to generate a form component, and carrying out validity verification on the form component to generate a validity verification result;
and the form component display module is used for transmitting the form component to the user terminal for display when the validity check result is that the verification is passed.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a form component generating method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement a form component generating method according to any of the embodiments of the present invention when executed.
According to the technical scheme, the generation of the dynamic form is restrained by the configuration file with the unified definition rule, the decoupling from the service is realized, the configuration file is transmitted to the form renderer to generate the form component, the legitimacy of the form component is checked, after the verification is passed, the form component is sent to the user terminal for display, the safety compliance of the rendered form component is ensured, the configuration process is simple, the form component is light in volume and strong in flexibility, the developer can more efficiently and conveniently perform service form configuration, the time and labor cost are saved, and the method is suitable for the vast developer to put into service application.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a form component generation method provided in accordance with a first embodiment of the present invention;
FIG. 2 is a flow chart of another form component generation method provided in accordance with a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a form renderer according to an embodiment of the present invention;
FIG. 4 is a flowchart of another form component generation method provided in accordance with a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a form component generating device according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a form component generating method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a form component generating method according to an embodiment of the present invention, where the method may be performed by a form component generating device, and the form component generating device may be implemented in hardware and/or software, and the form component generating device may be configured in a computer controller. As shown in fig. 1, the method includes:
s110, acquiring a configuration file of the form to be rendered.
The configuration file refers to a domain specific language file (Domain Specified Language, DSL), which is a language describing domain specific objects, rules and modes of operation in an extremely efficient manner. A user may write a corresponding DSL rule configuration for a dynamic form component that is desired to be rendered. The user refers to a technical developer who performs the configuration of the service form.
Optionally, obtaining a configuration file of the form to be rendered includes: the method comprises the steps of obtaining form elements and component types input by a user, and obtaining a configuration file template; determining a target position of a form element in a configuration file template according to the type of the component; each form element is combined with a profile template based on the target location to generate a profile.
Specifically, the user may input the form element and the corresponding component type into the controller, where the controller refers to a computer controller that performs the process of rendering the service form, and further, the controller may obtain a preset configuration file template, where the configuration file template includes rendering rule configurations corresponding to each component type, that is, the controller may determine, according to the component type, a target position of the form element in the configuration file template, and then fill each form element in the target position corresponding to the configuration file template to generate the configuration file. For example, the configuration file may include rendering configuration content of common form components such as a generation button, a text, an input box, a switch, a drop-down selection box, a single selection box (group), a check box (group) and the like, and provide a logic configuration entry for rule linkage and verification, so that a user can conveniently set rules and verify logic according to requirements.
S120, transmitting the configuration file into a form renderer to generate a form component, and performing validity check on the form component to generate a validity check result.
Fig. 2 is a flowchart of a form component generating method according to an embodiment of the present invention, and step S120 mainly includes steps S121 to S127 as follows:
s121, reading the attribute address of the form renderer, and transmitting the configuration file into the attribute address.
S122, extracting target rendering content based on the attribute address.
Optionally, extracting the target rendering content based on the attribute address includes: acquiring a designated field input by a user; and screening the configuration file in the attribute address according to the specified field by the form renderer to determine target rendering content corresponding to the specified field, wherein the target rendering content comprises component information, attribute information and nested sub-component information.
Wherein the attribute address may be a schema attribute, i.e. the controller may pass the DSL configuration into the schema attribute of the dynamic form component. The form renderer can be a render renderer, and the render renderer has good flexibility, maintainability and performance, can efficiently perform complex logic operations such as condition judgment, circulation, calculation and the like, and can perform rendering processing according to the attribute, event and description of the form by combining DSL grammar, so that a complex service form scene is personalized and customized.
Specifically, the controller may obtain a specified field input by the user, and then bind the target rendering content according to the specified field through the form renderer, and exemplary, the specified field tag may correspond to a component name bound by the render renderer, the specified field tips may correspond to an attribute bound by the render renderer, and the specified field items may correspond to a sub-component bound by the render renderer. Fig. 3 is a schematic diagram of a form renderer according to an embodiment of the present invention, where a render renderer may filter a configuration file in an attribute address through a specified field to determine target rendering content corresponding to the specified field, where the target rendering content includes component information, attribute information, and nesting sub-component information, that is, the binding component, binding attribute, and binding nesting sub-component are implemented by filtering the target rendering content through the specified field. In the working process of the render renderer, definition in DSL is distributed and converted into real page dom elements, a developer only needs to configure DSL according to rules, specific form rendering logic does not need to be additionally maintained, service form configuration can be more efficiently and conveniently carried out by the developer, repeated codes are avoided from being written, and the efficiency of the business is improved.
S123, acquiring a form attribute input by a user, and rendering the target rendering content according to the form attribute to generate a form component, wherein the form attribute comprises a default value and a default style.
Specifically, a user may set a form attribute while configuring the DSL configuration into the attribute address, the form attribute including a default value and a default style, and then the controller renders the target rendering content according to the form attribute to generate a form component. By way of example, a user may set default values and default styles of the dynamic form component through v-model and label-width attributes, and may also perceive changes in form values to facilitate logical processing of the service.
It should be noted that each form component may have its attribute configuration, such as size, style, default data, etc. The configuration developers can describe in DSL grammar, and can also configure the verification rule of a single form component and the linkage rule among a plurality of form components, thereby meeting more complex business scene customization.
S124, acquiring a preset character list, wherein the character list comprises illegal characters.
S125, judging whether the form component contains contents in the character list, if so, executing S126, otherwise, executing S127.
Specifically, the controller can perform validity check on the rendered form component through a character list preset by a user to ensure that the content in the form component is safe and compliant, the character list comprises illegal characters, when the form component comprises the content in the character list, the form component is determined to comprise illegal characters, at the moment, the validity check result is determined to be not passed, when the form component does not comprise the content in the character list, the form component is determined to not comprise illegal characters, at the moment, the validity check result is determined to be passed.
And S126, determining that the validity check result is that the check is not passed.
S127, determining that the validity check result is passing.
And S130, when the validity check result is that the verification passes, the form component is sent to the user terminal for display.
Optionally, after the validity check is performed on the form component to generate a validity check result, the method further includes: when the validity check result is that the verification fails, taking illegal characters contained in the form component as target characters; generating prompt information according to the target characters, and alarming in a specified mode according to the prompt information.
Specifically, when the validity check result is that the verification passes, the controller can directly send the form component to the user terminal for display. When the validity check result is that the verification fails, the controller takes illegal characters contained in the form component as target characters and generates prompt information according to the target characters, and further, the controller alarms in a specified mode according to the prompt information, so that the user can be prompted, the user can conveniently grasp the condition that the validity check result fails in time, the user can check and adjust the input form elements, and normal rendering and generation of the follow-up form component are ensured. The specified mode includes voice or image, the voice can be broadcast through a speaker connected with the controller, for example, the voice content can be: the result of the validity check does not pass. The image can be displayed through a user terminal connected with the controller so as to prompt the user.
According to the technical scheme, the generation of the dynamic form is restrained by the configuration file with the unified definition rule, the decoupling from the service is realized, the configuration file is transmitted to the form renderer to generate the form component, the legitimacy of the form component is checked, after the verification is passed, the form component is sent to the user terminal for display, the safety compliance of the rendered form component is ensured, the configuration process is simple, the form component is light in volume and strong in flexibility, the developer can more efficiently and conveniently perform service form configuration, the time and labor cost are saved, and the method is suitable for the vast developer to put into service application.
Example two
Fig. 4 is a flowchart of a method for generating a form component according to a second embodiment of the present invention, where a specific process for editing a generated form component is added on the basis of the first embodiment. The specific contents of steps S210 to S230 are substantially the same as steps S110 to S130 in the first embodiment, and thus, a detailed description is omitted in this embodiment. As shown in fig. 4, the method includes:
s210, acquiring a configuration file of the form to be rendered.
Optionally, obtaining a configuration file of the form to be rendered includes: the method comprises the steps of obtaining form elements and component types input by a user, and obtaining a configuration file template; determining a target position of a form element in a configuration file template according to the type of the component; each form element is combined with a profile template based on the target location to generate a profile.
S220, transmitting the configuration file into a form renderer to generate a form component, and performing validity check on the form component to generate a validity check result.
Optionally, passing the configuration file into a form renderer to generate a form component, comprising: the attribute address of the form renderer is read, and the configuration file is transmitted into the attribute address; extracting target rendering content based on the attribute address; and obtaining the form attribute input by the user, and rendering the target rendering content according to the form attribute to generate a form component, wherein the form attribute comprises a default value and a default style.
Optionally, extracting the target rendering content based on the attribute address includes: acquiring a designated field input by a user; and screening the configuration file in the attribute address according to the specified field by the form renderer to determine target rendering content corresponding to the specified field, wherein the target rendering content comprises component information, attribute information and nested sub-component information.
Optionally, performing validity check on the form component to generate a validity check result, including: acquiring a preset character list, wherein the character list comprises illegal characters; judging whether the form component contains contents in the character list, if so, determining that the validity check result is that the check is not passed; otherwise, determining the validity check result as the check passing.
Optionally, after the validity check is performed on the form component to generate a validity check result, the method further includes: when the validity check result is that the verification fails, taking illegal characters contained in the form component as target characters; generating prompt information according to the target characters, and alarming in a specified mode according to the prompt information.
And S230, when the validity check result is that the verification passes, the form component is sent to the user terminal for display.
S240, acquiring user selection content based on the form component, and acquiring an editing instruction input by a user based on the user selection content, wherein the editing instruction comprises an extraction instruction or a modification instruction.
S250, editing the form component according to the user selection content and the editing instruction to generate a new form component.
And S260, sending the new form component to the user terminal for display.
Specifically, the controller can also implement callback operation according to the edit instruction of the user, that is, after the user views the form component after rendering is completed through the user terminal, the user selection content and the edit instruction can be obtained based on the form component, the edit instruction includes the extraction instruction or the modification instruction, the content extraction or the content modification of the form component can be implemented, the user terminal sends the selection content and the edit instruction to the controller, the controller edits the form component according to the user selection content and the edit instruction to generate a new form component, and sends the new form component to the user terminal for display, so that the flow closed loop is implemented. In addition, each form component will have its properties configured, such as size, style, default data, etc. The configuration developers can describe in DSL grammar, and can also configure the verification rule of a single form component and the linkage rule among a plurality of form components, thereby meeting more complex business scene customization.
According to the technical scheme, the generation of the dynamic form is restrained by the configuration file with the unified definition rule, the decoupling from the service is realized, the configuration file is transmitted to the form renderer to generate the form component, the legitimacy of the form component is checked, after the verification is passed, the form component is sent to the user terminal for display, the safety compliance of the rendered form component is ensured, the configuration process is simple, the form component is light in volume and strong in flexibility, the developer can more efficiently and conveniently perform service form configuration, the time and labor cost are saved, and the method is suitable for the vast developer to put into service application.
Example III
Fig. 5 is a schematic structural diagram of a form component generating device according to a third embodiment of the present invention. As shown in fig. 5, the apparatus includes: a configuration file obtaining module 310, configured to obtain a configuration file of a form to be rendered;
the form component generating and validity checking module 320 is configured to transmit the configuration file to the form renderer to generate a form component, and perform validity checking on the form component to generate a validity checking result;
and the form component display module 330 is configured to send the form component to the user terminal for display when the validity check result is that the verification passes.
Optionally, the profile acquisition module 310 is specifically configured to: the method comprises the steps of obtaining form elements and component types input by a user, and obtaining a configuration file template; determining a target position of a form element in a configuration file template according to the type of the component; each form element is combined with a profile template based on the target location to generate a profile.
Optionally, the form component generating and validity checking module 320 specifically includes: a form component generating unit configured to: the attribute address of the form renderer is read, and the configuration file is transmitted into the attribute address; extracting target rendering content based on the attribute address; and obtaining the form attribute input by the user, and rendering the target rendering content according to the form attribute to generate a form component, wherein the form attribute comprises a default value and a default style.
Optionally, the form component generating unit specifically includes: a target rendering content extraction subunit for: acquiring a designated field input by a user; and screening the configuration file in the attribute address according to the specified field by the form renderer to determine target rendering content corresponding to the specified field, wherein the target rendering content comprises component information, attribute information and nested sub-component information.
Optionally, the form component generating and validity checking module 320 specifically includes: the validity checking unit is used for: acquiring a preset character list, wherein the character list comprises illegal characters; judging whether the form component contains contents in the character list, if so, determining that the validity check result is that the check is not passed; otherwise, determining the validity check result as the check passing.
Optionally, the apparatus further comprises: an illegal alarm module for: after the legitimacy of the form component is verified to generate a legitimacy verification result, when the legitimacy verification result is that verification fails, taking illegal characters contained in the form component as target characters; generating prompt information according to the target characters, and alarming in a specified mode according to the prompt information.
Optionally, the apparatus further comprises: the form component editing module is used for: after the form component is sent to the user terminal for display, acquiring user selection content based on the form component, and acquiring an editing instruction input by a user based on the user selection content, wherein the editing instruction comprises an extraction instruction or a modification instruction; editing the form component according to the user selection content and the editing instruction to generate a new form component; and sending the new form component to the user terminal for display.
According to the technical scheme, the generation of the dynamic form is restrained by the configuration file with the unified definition rule, the decoupling from the service is realized, the configuration file is transmitted to the form renderer to generate the form component, the legitimacy of the form component is checked, after the verification is passed, the form component is sent to the user terminal for display, the safety compliance of the rendered form component is ensured, the configuration process is simple, the form component is light in volume and strong in flexibility, the developer can more efficiently and conveniently perform service form configuration, the time and labor cost are saved, and the method is suitable for the vast developer to put into service application.
The form component generating device provided by the embodiment of the invention can execute the form component generating method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example IV
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a form component generation method. Namely: acquiring a configuration file of a form to be rendered; transmitting the configuration file into a form renderer to generate a form component, and performing validity check on the form component to generate a validity check result; and when the validity check result is that the verification passes, the form component is sent to the user terminal for display.
In some embodiments, a form component generating method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more steps of a form component generating method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, processor 11 may be configured to perform a form component generation method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
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 are possible, depending on 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)

1. A form component generation method, comprising:
acquiring a configuration file of a form to be rendered;
transmitting the configuration file into a form renderer to generate a form component, and performing validity check on the form component to generate a validity check result;
and when the validity check result is that the verification passes, the form component is sent to a user terminal for display.
2. The method of claim 1, wherein the obtaining a configuration file of a form to be rendered comprises:
the method comprises the steps of obtaining form elements and component types input by a user, and obtaining a configuration file template;
determining a target position of the table element in the configuration file template according to the component type;
and combining each form element with the profile template based on the target position to generate the profile.
3. The method of claim 1, wherein said passing the configuration file into a form renderer to generate a form component comprises:
reading an attribute address of a form renderer, and transmitting the configuration file into the attribute address;
extracting target rendering content based on the attribute address;
and acquiring a form attribute input by a user, and rendering the target rendering content according to the form attribute to generate a form component, wherein the form attribute comprises a default value and a default style.
4. A method according to claim 3, wherein said extracting target rendered content based on said attribute address comprises:
acquiring a designated field input by a user;
and screening the configuration file in the attribute address according to the appointed field by the form renderer to determine target rendering content corresponding to the appointed field, wherein the target rendering content comprises component information, attribute information and nested sub-component information.
5. The method of claim 1, wherein the verifying the legitimacy of the form component generates a legitimacy check result, comprising:
acquiring a preset character list, wherein the character list comprises illegal characters;
judging whether the form component contains the content in the character list, if so, determining that the validity check result is that the check is not passed;
otherwise, determining that the validity check result is the check passing.
6. The method of claim 5, further comprising, after the verifying the validity of the form component to generate a validity verification result:
when the validity check result is that the verification fails, taking illegal characters contained in the form component as target characters;
and generating prompt information according to the target character, and alarming in a specified mode according to the prompt information.
7. The method of claim 1, further comprising, after said sending the form component to a user terminal for presentation:
acquiring user selection content based on the form component, and acquiring an editing instruction input by a user based on the user selection content, wherein the editing instruction comprises an extraction instruction or a modification instruction;
editing the form component according to the user selection content and the editing instruction so as to generate a new form component;
and sending the new form component to a user terminal for display.
8. A form component generating apparatus, comprising:
the configuration file acquisition module is used for acquiring a configuration file of the form to be rendered;
the form component generation and validity verification module is used for transmitting the configuration file into a form renderer to generate a form component, and carrying out validity verification on the form component to generate a validity verification result;
and the form component display module is used for transmitting the form component to a user terminal for display when the validity check result is that the verification passes.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer storage medium storing computer instructions for causing a processor to perform the method of any one of claims 1-7 when executed.
CN202311306642.XA 2023-10-10 2023-10-10 Form component generation method, device, equipment and storage medium Pending CN117371403A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311306642.XA CN117371403A (en) 2023-10-10 2023-10-10 Form component generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311306642.XA CN117371403A (en) 2023-10-10 2023-10-10 Form component generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117371403A true CN117371403A (en) 2024-01-09

Family

ID=89399567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311306642.XA Pending CN117371403A (en) 2023-10-10 2023-10-10 Form component generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117371403A (en)

Similar Documents

Publication Publication Date Title
CN112835579A (en) Method and device for determining interface code, electronic equipment and storage medium
CN117454817B (en) Engineering processing method and device based on FPGA, electronic equipment and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN114168119B (en) Code file editing method, device, electronic equipment and storage medium
CN117371403A (en) Form component generation method, device, equipment and storage medium
CN116011955A (en) Robot flow automation demand realization method, device, equipment and storage medium
CN115577689A (en) Table component generation method, device, equipment and medium
CN115665285A (en) Data processing method and device, electronic equipment and storage medium
CN115687717A (en) Method, device and equipment for acquiring hook expression and computer readable storage medium
CN114417822A (en) Method, apparatus, device, medium and product for generating model interpretation information
CN114880498A (en) Event information display method and device, equipment and medium
CN115033233A (en) Interface calling method and device, electronic equipment and storage medium
CN113836291B (en) Data processing method, device, equipment and storage medium
CN115202538B (en) Menu configuration method and device, electronic equipment and storage medium
CN113835893B (en) Data processing method, device, equipment, storage medium and program product
CN112560462B (en) Event extraction service generation method, device, server and medium
CN117251196A (en) Data maintenance method, device, equipment and storage medium
CN117908954A (en) Multi-branch online banking front-end code management method, device, equipment and medium
CN113971256A (en) Page processing method and device, electronic equipment and memory
CN116069319A (en) Form rendering method and device, electronic equipment and storage medium
CN116894048A (en) Data query method, device, equipment and storage medium based on artificial intelligence
CN117931155A (en) Code generation method, device, equipment and medium
CN118034691A (en) Text input and display method and device based on Java control
CN116225437A (en) Page generation method and device, electronic equipment and storage medium
CN116069805A (en) Big data analysis method, device, equipment and medium based on pre-event

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination