Search

CN-121996210-A - Form generation method, computer device, and readable storage medium

CN121996210ACN 121996210 ACN121996210 ACN 121996210ACN-121996210-A

Abstract

The present application relates to a form generation method, a computer device, a computer-readable storage medium and a computer program product, which can be used in the field of computer technology. The method comprises the steps of analyzing form information in a preset format to obtain configuration information and verification information of form fields in the form information, generating a corresponding first form component according to the configuration information, updating the first form component according to the verification information to obtain a second form component, carrying out data filling processing on the second form component according to initial data corresponding to the second form component to obtain a target form component, and generating a form corresponding to the target form component. By adopting the method, the efficiency of form generation can be improved.

Inventors

  • TAO YAWEI
  • YANG BIAOLONG
  • HE ZHIPENG
  • Mai Wenan
  • TAN SHUYI
  • HE SHENGQIANG

Assignees

  • 顺丰科技有限公司

Dates

Publication Date
20260508
Application Date
20241105

Claims (10)

  1. 1. A form generation method, the method comprising: Analyzing form information in a preset format to obtain configuration information and verification information of form fields in the form information; Generating a corresponding first form component according to the configuration information; Updating the first form component according to the verification information to obtain a second form component; according to the initial data corresponding to the second form component, carrying out data filling processing on the second form component to obtain a target form component; And generating a form corresponding to the target form component.
  2. 2. The method of claim 1, wherein generating the corresponding first form component from the configuration information comprises: determining the type of the form field according to the configuration information; selecting a target input component corresponding to the type of the form field from candidate input components; and generating the first form component according to the configuration information and the target input component.
  3. 3. The method of claim 1, wherein the updating the first form component according to the verification information to obtain a second form component includes: adding the verification information into the first form component to obtain a form component with a verification function; and generating the second form component according to the form component with the verification function.
  4. 4. The method of claim 1, wherein the generating a form corresponding to the target form component comprises: determining a layout mode of the target form component according to the layout information in the form information; And generating a form containing the target form component according to the layout mode.
  5. 5. The method of claim 1, further comprising, after generating a form corresponding to the target form component: Acquiring form update information of the form; according to the form updating information, dynamically updating the target form component to obtain an updated form component; and generating a form corresponding to the updated form component.
  6. 6. The method of claim 1, further comprising, after generating a form corresponding to the target form component: integrating the form into a preset entry component; and generating a front-end form page corresponding to the form according to the preset inlet component integrated with the form.
  7. 7. The method according to any one of claims 1 to 6, wherein the performing data filling processing on the second form component according to the initial data corresponding to the second form component to obtain a target form component includes: Determining form fields to be filled corresponding to the initial data in the second form component; And carrying out data filling processing on the form fields to be filled in the second form component according to the initial data to obtain the target form component.
  8. 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.

Description

Form generation method, computer device, and readable storage medium Technical Field The present application relates to the field of computer technology, and in particular, to a form generating method, a computer device, a computer readable storage medium, and a computer program product. Background With the development of information technology, network application systems are becoming more and more popular. In these systems, forms play a critical role as an important interface for the user to enter data. Therefore, how to efficiently generate a form has become an important research direction. The conventional technology usually carries out form generation by manually writing codes, but the form generation by the method needs to consume more manual coding time, so that the form generation efficiency is lower. Disclosure of Invention In view of the foregoing, it is desirable to provide a form generating method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the efficiency of form generation. In a first aspect, the present application provides a form generation method. The method comprises the steps of analyzing form information in a preset format to obtain configuration information and verification information of form fields in the form information, generating a corresponding first form component according to the configuration information, updating the first form component according to the verification information to obtain a second form component, carrying out data filling processing on the second form component according to initial data corresponding to the second form component to obtain a target form component, and generating a form corresponding to the target form component. In one embodiment, the corresponding first form component is generated according to the configuration information, and the method comprises the steps of determining the type of the form field according to the configuration information, selecting a target input component corresponding to the type of the form field from candidate input components, and generating the first form component according to the configuration information and the target input component. In one embodiment, the updating the first form component according to the verification information to obtain a second form component includes: adding the verification information into the first form component to obtain a form component with a verification function; and generating the second form component according to the form component with the verification function. In a second aspect, the application further provides a form generating device. The device comprises: The information analysis module is used for analyzing the form information in a preset format to obtain configuration information and verification information of form fields in the form information; the component generating module is used for generating a corresponding first form component according to the configuration information; the component updating module is used for updating the first form component according to the verification information to obtain a second form component; the component processing module is used for carrying out data filling processing on the second form component according to the initial data corresponding to the second form component to obtain a target form component; And the form generation module is used for generating a form corresponding to the target form component. In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of: Analyzing form information in a preset format to obtain configuration information and verification information of form fields in the form information; Generating a corresponding first form component according to the configuration information; Updating the first form component according to the verification information to obtain a second form component; according to the initial data corresponding to the second form component, carrying out data filling processing on the second form component to obtain a target form component; And generating a form corresponding to the target form component. In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: Analyzing form information in a preset format to obtain configuration information and verification information of form fields in the form information; Generating a corresponding first form component according to the configuration information; Updating the first form component according to the verification information to obtain a second form component; according to the initial data corresponding to the second form component, carrying