Search

CN-122018901-A - Visual interface configuration method, device, equipment and program product

CN122018901ACN 122018901 ACN122018901 ACN 122018901ACN-122018901-A

Abstract

The invention discloses a configuration method, a device, equipment and a program product of a visual interface, which are used for acquiring an initial form field of a form in the visual interface, declaring type constraint information for the initial form field to obtain a first form field, operating the form based on the first form field, acquiring an enumeration item of the form in operation, configuring a data source configuration entity of the enumeration item to obtain an entry definition of the data source configuration entity, mapping and associating variables in an entry form of the data source configuration entity according to the entry definition to obtain a mapping relation among the entry variables, acquiring an entry parameter value corresponding to the entry in real time according to the mapping relation when the form is rendered, initiating a request to the data source configuration entity according to the entry parameter value, updating an optional enumeration item list consisting of the enumeration items of the first form field based on data returned by the request, and solving the technical defect that the form configuration of a low-code platform depends on static enumeration items.

Inventors

  • WU DAJUN

Assignees

  • 北京白龙马科技有限公司

Dates

Publication Date
20260512
Application Date
20260112

Claims (10)

  1. 1. A method for configuring a visual interface, the method comprising: acquiring an initial form field of a form in a visual interface, and declaring type constraint information for the initial form field to obtain a first form field; Running the form based on the first form field, acquiring an enumeration item of the form in the running process, and configuring a data source configuration entity of the enumeration item to acquire an entry definition of the data source configuration entity; Mapping and associating variables in the entry form of the data source configuration entity according to the entry definition to obtain a mapping relation between the variables; And when the form is rendered, acquiring an entry parameter value corresponding to the entry parameter in real time according to the mapping relation, initiating a request to the data source configuration entity according to the entry parameter value, and updating an optional enumeration item list consisting of enumeration items of the first form field based on data returned by the request.
  2. 2. The method of claim 1, wherein the entry definition includes a data source configuration entity type, an entry declaration, and an output mapping rule for the data source configuration entity, wherein mapping and associating variables of the data source configuration entity that are entered into the form according to the entry definition includes: Reading the parameter entry statement of the data source configuration entity, and extracting an available variable from the form to construct a variable candidate set, wherein the variable candidate set at least comprises candidate form fields except for a first form field of the current configuration; And selecting variables corresponding to the candidate form fields from the variable candidate set to establish a direct mapping relation or establish an indirect mapping relation based on a parameter expression.
  3. 3. The method of claim 2, wherein the establishing an expression-based indirect mapping relationship comprises: acquiring natural language description input by a user; carrying out semantic analysis on the natural language description to extract semantic elements related to form field operation in the natural language description and obtain target fields of the semantic elements; Matching the target field with the candidate form fields in the variable candidate set, and screening candidate form fields successfully matched; calling a preset expression template, and generating a parameter expression in the expression template based on the successfully matched candidate form field and the semantic element; And establishing an indirect mapping relation of the input participation variable based on the parameter expression.
  4. 4. The method of claim 1, wherein the initiating a request to the data source configuration entity in accordance with the entry parameter, updating a list of selectable enumerated items comprised of enumerated items of the first form field based on data returned by the request, comprises: Initiating a request to the data source configuration entity according to the entry parameter, if the request fails, reserving an optional enumeration item list consisting of enumeration items of the first form field, and generating alarm information, wherein the alarm information comprises a field identifier of the request; if the request is successful, updating a list of selectable enumeration items consisting of the enumeration items of the first form field based on the data returned by the request.
  5. 5. The method of claim 1, wherein after updating the list of selectable enumerated items comprised of enumerated items for the first form field based on the data returned by the request, the method further comprises: detecting whether a user performs history selection operation on any one of the enumerated items in the selectable enumerated item list to obtain a detection result; and carrying out consistency check on the updated selectable enumeration item list based on the detection result.
  6. 6. The method of claim 5, wherein the performing consistency check on the updated list of selectable enumerated items based on the detection result comprises: If the detection result is characterized in that the user has executed the history selection operation on any one of the enumerated items in the selectable enumerated item list, determining the enumerated item of the user executing the history selection operation as a target enumerated item; Acquiring the parameter entry change of the target enumeration item, and re-initiating a request to the data source configuration entity based on the parameter entry change; Receiving a target enumeration item list returned by the request, and judging whether the target enumeration item list contains the target enumeration item or not; if not, the target enumeration item is cleared in the selectable enumeration item list, and if so, the selectable enumeration item list is judged to pass the consistency check.
  7. 7. The method of claim 5, wherein the performing consistency check on the updated list of selectable enumerated items based on the detection result, further comprises: If the detection result is characterized in that the user does not execute the history selection operation on any enumerated item in the selectable enumerated item list and the first form field enables default selected configuration, taking the first enumerated item in the selectable enumerated item list as a target enumerated item; Acquiring the parameter entry change of the target enumeration item, and re-initiating a request to the data source configuration entity based on the parameter entry change; Receiving a target enumeration item list returned by the request, and judging whether the target enumeration item list contains the target enumeration item or not; if not, the target enumeration item is cleared in the selectable enumeration item list, and if so, the selectable enumeration item list is judged to pass the consistency check.
  8. 8. A visual interface configuration apparatus, the apparatus comprising: the field acquisition module is used for acquiring an initial form field of a form in the visual interface and declaring type constraint information for the initial form field to obtain a first form field; The entity configuration module is used for operating the form based on the first form field, acquiring enumeration items of the form in operation, and configuring a data source configuration entity of the enumeration items to acquire an entry definition of the data source configuration entity; The mapping association module is used for mapping and associating variables in the forms of the data source configuration entity according to the parameter entering definition to obtain a mapping relation between the variables of the data source configuration entity; And the enumeration item updating module is used for acquiring an entry parameter value corresponding to the entry parameter in real time according to the mapping relation when the form is rendered, initiating a request to the data source configuration entity according to the entry parameter value, and updating an optional enumeration item list consisting of enumeration items of the first form field based on data returned by the request.
  9. 9. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of configuring a visual interface of any one of claims 1 to 7.
  10. 10. A computer program product comprising computer instructions for causing a computer to perform the method of configuring a visual interface as claimed in any one of claims 1 to 7.

Description

Visual interface configuration method, device, equipment and program product Technical Field The invention relates to the technical field of form configuration, in particular to a visual interface configuration method, device, equipment and program product. Background The low-code development platform is increasingly popular because the development threshold can be remarkably reduced, the application construction efficiency is improved, and the low-code development platform is widely applied to the rapid construction of various business forms and data interaction scenes. The low-code development platform commonly adopts a mode of presetting static enumeration items or binding fixed data source configuration entities for realizing the optional value configuration of form fields. In particular, a developer or service configurator typically sets a fixed list of options directly for a drop-down box, a radio group, or the like form component at design time, or simply associates it with some predefined, fixed-parameter data query interface. This mode constitutes the dominant technical solution for the current low code platform to handle form field enumeration items. However, the method is difficult to support dynamic enumeration items which need to be changed in real time and acquired asynchronously according to the form context, when the enumeration items request parameters, mapping configuration and logic definition between the request parameters and other dynamic variables in the form cannot be intuitively and flexibly completed in a visual interface, and when the form is operated, the enumeration items cannot be automatically updated based on the change of the parameter mapping relation and enumeration data triggered based on the parameter change, so that development efficiency is reduced and service logic is stiff. Disclosure of Invention The invention provides a configuration method, a device, equipment and a program product of a visual interface, which are used for solving the problems that the related technology depends on static enumeration items when the visual interface is configured, and flexible request and data update can not be carried out according to parameters when the related technology is operated. In a first aspect, the present invention provides a method for configuring a visual interface, where the method includes: acquiring an initial form field of a form in a visual interface, and declaring type constraint information for the initial form field to obtain a first form field; Running the form based on the first form field, acquiring an enumeration item of the form in the running process, and configuring a data source configuration entity of the enumeration item to acquire an entry definition of the data source configuration entity; Mapping and associating variables in the entry form of the data source configuration entity according to the entry definition to obtain a mapping relation between the variables; And when the form is rendered, acquiring an entry parameter value corresponding to the entry parameter in real time according to the mapping relation, initiating a request to the data source configuration entity according to the entry parameter value, and updating an optional enumeration item list consisting of enumeration items of the first form field based on data returned by the request. The method comprises the steps of obtaining initial form fields of a visual interface form, obtaining a first form field for initial form field statement type constraint information, operating the form based on the first form field, obtaining enumeration items of the form in operation, configuring a data source configuration entity of the enumeration items to obtain a parameter entering definition of the data source configuration entity, mapping and associating variables in the parameter entering form of the data source configuration entity according to the parameter entering definition to obtain a mapping relation among the parameter entering variables, obtaining a parameter entering value corresponding to the parameter entering in real time according to the mapping relation when the form is rendered, initiating a request to the data source configuration entity according to the parameter entering value, and updating an optional enumeration item list composed of the enumeration items of the first form field based on data returned by the request. The invention allows the user to declare the enumeration data type and flexibly bind the dynamic data source configuration entity during configuration, and enables the selectable enumeration list of the form field to be updated during the form running through entering the mapping relation between the participation variables, thereby solving the technical defects that the form configuration of the traditional low-code platform depends on the static enumeration item and can not flexibly request and update the data according to the parameters. In an alternative em