Interface Configuration Method, Device, Computer Equipment and Storage Medium

Through the visual interface configuration method, users can add data structures and interface units to the interface configuration page, enter configuration parameters, and generate interface codes in the system, solving the problem of low efficiency in interface code development in traditional methods and achieving fast and accurate interface code generation.

CN113900725BActive Publication Date: 2025-06-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010640800.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-06
Publication Date
2025-06-03
Estimated Expiration
2040-07-06

AI Technical Summary

Technical Problem

In traditional ways, developers need to manually write interface call code, resulting in high writing complexity, cumbersome process and low development efficiency.

Method used

Provide a visual interface configuration method. By displaying the interface configuration page, users can add data structures and interface units and enter interface configuration parameters. The system maps these parameters into metadata and generates interface codes based on the preconfigured interface code template.

Benefits of technology

It realizes that custom interface code can be automatically generated without manual code writing, avoids writing errors, shortens the development cycle, and improves the development efficiency of interface code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113900725B_ABST
    Figure CN113900725B_ABST
Patent Text Reader

Abstract

The present application relates to an interface configuration method, apparatus, computer device, and storage medium. The method includes: displaying an interface configuration page; in response to a trigger operation for adding a control to a data structure in the interface configuration page, adding a data structure to an enumerated set of data structures displayed in the interface configuration page; in response to a trigger operation for adding a control to an interface unit in the interface configuration page, adding an interface unit to a set of interface units displayed in the interface configuration page; in a parameter entry area of the interface configuration page, obtaining interface configuration parameters entered corresponding to the added interface units; mapping the interface configuration parameters to metadata according to the enumerated set of data structures, and generating interface code based on the metadata and a pre-configured interface code template. Using this method can shorten the development cycle and effectively improve the development efficiency of interface code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technologies, and particularly to an interface configuration method, apparatus, computer device, and storage medium. Background Art

[0002] An API (Application Programming Interface) refers to an agreement for connecting different components of a software system, and is used to provide a set of routines for an application program and a developer to access based on a certain software or hardware. With the wide popularization of Internet-based applications, more and more sites open their own resources for developers to call, which can improve the content relevance and interactivity between sites.

[0003] In the traditional method, usually, a developer needs to write corresponding call interface codes for corresponding interfaces, and needs to write corresponding call interfaces respectively according to different business requirements. This method has a high writing complexity, a cumbersome process, and a low development efficiency of the interface codes. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a visual interface configuration method, apparatus, computer device, and storage medium, which can effectively improve the development efficiency of interface codes.

[0005] An interface configuration method, the method comprising:

[0006] Displaying an interface configuration page;

[0007] In response to a trigger operation for adding a control to a data structure in the interface configuration page, adding a data structure to an enumerated set of data structures displayed in the interface configuration page;

[0008] In response to a trigger operation for adding a control to an interface unit in the interface configuration page, adding an interface unit to a set of interface units displayed in the interface configuration page;

[0009] In a parameter entry area of the interface configuration page, obtaining interface configuration parameters entered corresponding to the added interface unit;

[0010] Mapping the interface configuration parameters to metadata according to the enumerated set of data structures, and generating interface codes according to the metadata and a pre-configured interface code template.

[0011] An interface configuration apparatus, the apparatus comprising:

[0012] A page display module, configured to display an interface configuration page;

[0013] A data addition module, configured to add a data structure to the data structure enumeration set displayed on the interface configuration page in response to a trigger operation on the data structure addition control in the interface configuration page; and add an interface unit to the interface unit set displayed on the interface configuration page in response to a trigger operation on the interface unit addition control in the interface configuration page.

[0014] A parameter entry module, configured to obtain interface configuration parameters entered corresponding to the added interface unit in the parameter entry area of the interface configuration page.

[0015] An interface code generation module, configured to map the interface configuration parameters to metadata according to the data structure enumeration set, and generate interface code based on the metadata and a pre-configured interface code template.

[0016] In one embodiment, the parameter entry module is further configured to display server configuration options in the parameter entry area of the interface configuration page in response to a trigger operation on the server option in the interface configuration page; obtain server access parameters entered by editing the server configuration options; and the interface code generation module is further configured to map the server access parameters and the interface configuration parameters to metadata respectively according to the data structure enumeration set.

[0017] In one embodiment, the parameter entry module is further configured to display interface configuration items corresponding to the selected interface unit in the parameter entry area of the interface configuration page in response to a selection operation on the interface unit in the interface unit set; and obtain interface configuration parameters corresponding to the selected interface unit entered by editing the interface configuration items.

[0018] In one embodiment, the interface unit includes at least one main interface unit and at least one sub-interface unit belonging to the main interface unit; the data addition module is further configured to add a main interface unit under the root index of the interface unit set in the interface configuration page in response to a trigger operation on the interface unit addition control in the interface configuration page when the root index of the interface unit set in the interface configuration page is in a selected state; and add a sub-interface unit under the selected main interface unit in response to a trigger operation on the interface unit addition control in the interface configuration page when the main interface unit under the root index of the interface unit set is in a selected state.

[0019] In one embodiment, the parameter entry module is further configured to obtain the field configuration information corresponding to the added interface unit in the parameter entry area of the interface configuration page; in response to an attribute configuration operation on the selected field configuration information, display an attribute interface corresponding to the selected field configuration information; in the attribute interface of the configured field information, obtain the field attribute information corresponding to the configured field information; and obtain the interface configuration parameters corresponding to the added interface unit based on the field configuration information and the field attribute information.

[0020] In one embodiment, the interface configuration device further includes a document generation module, configured to obtain the template information of the interface code template; obtain the document attribute information of the interface document where the interface code is located; and add the template information and the document attribute information to the annotation information of the interface document.

[0021] In one embodiment, the page display module is further configured to, in response to a document display operation triggered on the interface configuration page, display the interface code in the interface code display area of the interface configuration page; the document generation module is further configured to, in response to an edit operation on the interface code, update the interface code; and when the edit operation ends, generate an updated interface document based on the updated interface code.

[0022] In one embodiment, the interface configuration device further includes a toolkit generation module, configured to obtain the business function codes corresponding to each interface unit in the interface unit set; and generate a business development toolkit based on the interface code and the business function codes.

[0023] In one embodiment, the interface code generation module is further configured to perform mapping encoding on the interface configuration parameters based on the data structure enumeration set to generate metadata corresponding to the interface configuration parameters; and fill the metadata into a pre-configured interface code template by means of data rendering to generate interface code.

[0024] In one embodiment, the interface code generation module is further configured to convert the interface configuration parameters into parameter data in a preset format based on the predefined mapping rules in the data structure enumeration set; and encode the parameter data into corresponding metadata based on the predefined data structures in the data structure enumeration set.

[0025] In one embodiment, the interface code generation module is further configured to obtain the service type corresponding to the interface unit in the interface unit set; call a pre-configured interface code template that matches the service type; and fill the metadata corresponding to the interface unit into the called interface code template by means of data rendering to generate interface code.

[0026] In one embodiment, the interface code generation module is further configured to match the keyword identifier of the metadata with the keyword identifier in the interface code template to determine the mapping position of the metadata in the interface code template; and fill the key-value in the metadata into the interface code template according to the mapping position to generate interface code.

[0027] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0028] Display an interface configuration page;

[0029] In response to a trigger operation for adding a control to the data structure in the interface configuration page, add a data structure to the data structure enumeration set displayed in the interface configuration page;

[0030] In response to a trigger operation for adding a control to the interface unit in the interface configuration page, add an interface unit to the interface unit set displayed in the interface configuration page;

[0031] In the parameter entry area of the interface configuration page, obtain interface configuration parameters entered corresponding to the added interface unit;

[0032] Map the interface configuration parameters into metadata according to the data structure enumeration set, and generate interface code according to the metadata and a pre-configured interface code template.

[0033] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0034] Display an interface configuration page;

[0035] In response to a trigger operation for adding a control to the data structure in the interface configuration page, add a data structure to the data structure enumeration set displayed in the interface configuration page;

[0036] In response to a trigger operation for adding a control to the interface unit in the interface configuration page, add an interface unit to the interface unit set displayed in the interface configuration page;

[0037] In the parameter entry area of the interface configuration page, obtain interface configuration parameters entered corresponding to the added interface unit;

[0038] Map the interface configuration parameters into metadata according to the data structure enumeration set, and generate interface code according to the metadata and a pre-configured interface code template.

[0039] The above interface configuration method, device, computer device, and storage medium display an interface configuration page. Through this page, a user can directly add a data structure to the data structure enumeration set by using the data structure addition control, and add an interface unit to the interface unit set by using the interface unit addition control. By showing the parameter input area of the interface configuration page, the user can directly input the interface configuration parameters corresponding to the added interface units. The terminal then maps the interface configuration parameters to metadata according to the data structure enumeration set, and generates interface code based on the metadata and a pre-configured interface code template, thus realizing interface configuration. Without the need for the user to write code, custom interface code can be automatically generated, which can avoid code writing errors, shorten the development cycle, and effectively improve the development efficiency of interface code. Brief Description of the Drawings

[0040] Figure 1 It is an application environment diagram of the interface configuration method in an embodiment;

[0041] Figure 2 It is a flowchart of the interface configuration method in an embodiment;

[0042] Figure 3 It is a flowchart of the interface configuration method in another embodiment;

[0043] Figure 4 It is an interface diagram of the server configuration options in the interface configuration page in an embodiment;

[0044] Figure 5 It is an interface diagram of the interface unit configuration items in the interface configuration page in an embodiment;

[0045] Figure 6 It is an interface diagram of the interface unit set in the interface configuration page in an embodiment;

[0046] Figure 7 It is an interface diagram of the field attribute configuration in the interface configuration page in an embodiment;

[0047] Figure 8 It is an interface diagram of displaying the interface document in an embodiment;

[0048] Figure 9 It is a flowchart of the interface configuration method in yet another embodiment;

[0049] Figure 10 It is a flowchart of a specific interface configuration method in an embodiment;

[0050] Figure 11 It is a structural block diagram of the interface configuration device in an embodiment;

[0051] Figure 12 It is the internal structure diagram of a computer device in an embodiment. Specific implementation manners

[0052] In order to make the purpose, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] The interface configuration method provided by the present application can be applied to, for example Figure 1 the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 displays an interface configuration page, and the terminal 102 responds to a trigger operation for adding a control to the data structure in the interface configuration page, and adds a data structure to the data structure enumeration set displayed in the interface configuration page; and responds to a trigger operation for adding a control to the interface unit in the interface configuration page, and adds an interface unit to the interface unit set displayed in the interface configuration page; the terminal 102 obtains the interface configuration parameters entered corresponding to the added interface unit in the parameter entry area of the interface configuration page; then, the terminal 102 sends the interface configuration parameters to the server 104, and the server 104 maps the interface configuration parameters into metadata according to the data structure enumeration set, and generates interface code according to the metadata and a pre-configured interface code template. Among them, the terminal 102 can be but is not limited to various personal computers, laptop computers, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0054] In one embodiment, as Figure 2 shown, a kind of interface configuration method is provided. Taking the terminal in Figure 1 as an example, the method includes the following steps:

[0055] S202, display an interface configuration page.

[0056] Among them, an interface refers to an application programming interface, that is, an API (Application Programming Interface), which is a set of predefined functions, or refers to the convention for the connection of different components of a software system, used to provide a set of routines for an application program and developers to access based on a certain software or hardware, without the need to access the source code or understand the details of the internal working mechanism. For example, the services of a website can be encapsulated into a series of computer-recognizable data interfaces and opened for use by third-party developers. This behavior is called opening the API of the website. Correspondingly, the opened API is called an OpenAPI (Open Interface).

[0057] The interface configuration page refers to a visual configuration interface for configuring interfaces. Users can implement the configuration of application interfaces on the interface configuration page. For example, it can be a configurable front-end page. The interface configuration page includes pre-set interface elements, such as various function controls, parameter input areas, and configuration items, etc.

[0058] Specifically, users can configure interfaces through the interface configuration tool deployed in the terminal. When the user triggers the interface configuration operation, the terminal displays the interface configuration page, and the user can directly configure the corresponding application interfaces on the interface configuration page.

[0059] In one embodiment, users can perform interface configuration operations through the interface configuration application installed on the terminal, or users can also perform interface configuration operations through the web version of the interface configuration application. The interface configuration application includes an interface configuration page and an interface configuration function, and users can implement interface configuration through the interface configuration application.

[0060] In this embodiment, various function controls, parameter input areas, and configuration items, etc., which are predefined, are deployed on the interface configuration page. When configuring application interfaces, users only need to enter the required interface configuration parameters on the interface configuration page.

[0061] S204, in response to the trigger operation on the data structure addition control in the interface configuration page, add a data structure to the data structure enumeration set displayed on the interface configuration page.

[0062] Among them, a control refers to the encapsulation of data and methods. A control is an object with which users can interact to input or operate data. Controls usually appear in dialog boxes or toolbars, and specifically can be in the toolbar area of the interface configuration page. A control can be a complete functional module or an extension or combination of basic elements, and can be used to add preset functional objects.

[0063] A data structure is a way for a computer to store and organize data, which refers to a set of data elements with structural characteristics that have one or more specific relationships with each other. A data structure addition control refers to the control on the interface configuration page for adding data structures. The available data structure addition control can be used to add the data structures required for configuring the interface, so as to configure the predefined data structures required for the interface.

[0064] Specifically, the terminal displays an interface configuration page. The user can trigger a data structure addition control on the interface configuration page of the terminal, and add the required data structure through the data structure addition control. Specifically, the predefined data structure list can be obtained through the data structure addition control, and the user can select the required data structure from the data structure list. The terminal responds to the selection operation of the data structure in the data structure list, and then adds the selected data structure to the data structure enumeration set displayed on the interface configuration page. The data structure enumeration set includes at least one predefined data structure added.

[0065] In this embodiment, the triggering operation and the selection operation include, but are not limited to, long pressing, clicking, swiping, moving, and multi-touch operations.

[0066] S206, in response to the triggering operation on the interface unit addition control in the interface configuration page, add an interface unit to the interface unit set displayed on the interface configuration page.

[0067] Among them, the interface unit refers to the unit body corresponding to the application interface, which can be used to represent the interface unit of the interface, that is, one application interface corresponds to one interface unit. Different from the hardware interface unit, the interface unit in this embodiment is the interface unit corresponding to the software application interface.

[0068] The interface unit addition control is a control used to add an interface unit in the interface configuration page, and the application interface required for configuring the interface can be added through the interface unit addition control.

[0069] Specifically, the user can trigger the interface unit addition control on the interface configuration page of the terminal, and add the required interface unit through the interface unit addition control. Specifically, the predefined interface creation interface can be obtained through the interface unit addition control, and the user can enter the basic information of the interface unit to be created in the interface creation interface, such as parameter information such as the interface name and interface type. The terminal responds to the creation operation of the interface unit in the interface creation interface, and then adds the created interface unit to the interface unit set displayed on the interface configuration page. The interface unit set includes at least one interface unit added.

[0070] S208, in the parameter entry area of the interface configuration page, obtain the interface configuration parameters entered corresponding to the added interface unit.

[0071] Among them, the interface configuration page includes a parameter entry area, and the parameter entry area is used for the user to directly enter the required parameter information in the interface configuration page displayed on the terminal.

[0072] Specifically, the user can input corresponding interface configuration parameters for the added interface units in the parameter input area on the interface configuration page displayed on the terminal. In response to the input operation of the interface configuration parameters corresponding to the interface unit, the terminal obtains the interface configuration parameters input corresponding to the added interface unit.

[0073] In one embodiment, the parameter input area may further include a field set required for configuring the interface. Among them, a field is a variable associated with an object or a class, and a set of fields constitutes a record. Each field describes a certain feature, that is, a data item, and has a unique field identifier that can be recognized by a computer. The user can input corresponding field information through the field set in the parameter input area, so as to input the required interface configuration parameters.

[0074] S210, map the interface configuration parameters to metadata according to the data structure enumeration set, and generate interface code based on the metadata and the pre-configured interface code template.

[0075] Among them, metadata, also known as mediation data or relay data, is data that describes data. It is mainly information that describes the attributes of data, and is used to provide structural data about certain resources, and can effectively establish a machine-readable framework for digital information resources.

[0076] Specifically, after the terminal obtains the interface configuration parameters input through the interface configuration page, it maps the interface configuration parameters to metadata according to the data structure enumeration set. Among them, the data structure enumeration set includes the predefined data structures that have been added. When the terminal maps the interface configuration parameters to metadata, it converts the interface configuration parameters into metadata of the corresponding data structure according to the data structures in the data structure enumeration set. Thus, the interface configuration parameters can be effectively mapped to the metadata of the preset data structure.

[0077] The terminal then generates interface code based on the metadata and the pre-configured interface code template. Specifically, after the terminal maps the interface configuration parameters to metadata, it obtains the pre-configured interface code template, and fills the metadata corresponding to the interface configuration parameters into the interface code template, thereby generating interface code.

[0078] In this embodiment, the interface code template is pre-configured. Based on the metadata and the pre-configured interface code template, the interface code can be directly generated. Therefore, it is not necessary for developers to write code. By directly performing parameter configuration on the interface configuration page, the interface configuration can be quickly and effectively implemented, and the required interface code can be automatically generated.

[0079] In the above interface configuration method, by presenting the interface configuration page, the user can directly add a data structure to the data structure enumeration set through the data structure addition control on the interface configuration page, and add an interface unit to the interface unit set through the interface unit addition control. By presenting the parameter input area of the interface configuration page, the user can directly input the interface configuration parameters corresponding to the added interface units. The terminal then maps the interface configuration parameters to metadata according to the data structure enumeration set, and generates interface code based on the metadata and the pre-configured interface code template, thereby implementing interface configuration. Without the need for the user to write code, custom interface code can be automatically generated, which can avoid code writing errors, shorten the development cycle, and thus effectively improve the development efficiency of the interface code.

[0080] In one embodiment, as Figure 3 shown, another interface configuration method is provided, including the following steps:

[0081] S302, Present the interface configuration page.

[0082] S304, In response to a trigger operation on the data structure addition control in the interface configuration page, add a data structure to the data structure enumeration set shown in the interface configuration page.

[0083] S306, In response to a trigger operation on the server option in the interface configuration page, display server configuration options in the parameter input area of the interface configuration page.

[0084] S308, Obtain the server access parameters entered by editing the server configuration options.

[0085] S310, In response to a trigger operation on the interface unit addition control in the interface configuration page, add an interface unit to the interface unit set shown in the interface configuration page.

[0086] S312, In the parameter input area of the interface configuration page, obtain the interface configuration parameters entered corresponding to the added interface units.

[0087] S314, According to the data structure enumeration set, map the server access parameters and the interface configuration parameters to metadata respectively, and generate interface code based on the metadata and the pre-configured interface code template.

[0088] Mapping the interface configuration parameters to metadata according to the data structure enumeration set includes: According to the data structure enumeration set, map the server access parameters and the interface configuration parameters to metadata respectively.

[0089] Among them, the server access parameters refer to the server parameters of the target server that the application interface needs to access. For example, the server access parameters may include parameter information such as bound domain names, URL prefixes, server program camel case names, default interface parameter types, default interface return types, login state messages, port numbers, etc.

[0090] When the user configures the application interface through the interface configuration page, the user can also enter the corresponding server access parameters on the interface configuration page to configure the server access parameters of the interface.

[0091] Specifically, the parameter entry area on the interface configuration page can display server options. When the user triggers the server options on the interface configuration page, the terminal responds to the trigger operation on the server options on the interface configuration page and displays server configuration options in the parameter entry area of the interface configuration page. The server configuration options are configuration items for configuring server access parameters. The user can enter the required server access parameters by performing selection operations or data input operations on the server configuration options.

[0092] Furthermore, after the user adds a data structure in the data structure enumeration set through the interface configuration page, and obtains the interface configuration parameters entered for the added interface unit in the parameter entry area of the interface configuration page, then according to the data structure enumeration set, the server access parameters and the interface configuration parameters are respectively mapped to metadata, and interface code is generated based on the metadata and the pre-configured interface code template.

[0093] In this embodiment, through the interface configuration page, the user can directly configure the server access parameters and the interface configuration parameters by inputting on the interface configuration page, so that the terminal can directly generate interface code according to the parameter information input by the user, effectively improving the efficiency of interface development.

[0094] As Figure 4 shown, it is a schematic diagram of the interface of the server configuration options on the interface configuration page in an embodiment. Referring to Figure 4 , the top of the interface configuration page is a toolbar, and various function controls are included in the toolbar. For example, it may include function controls of multiple categories. Such as in the project category, there are controls such as "New", "Open", "Open History", "Save", "Close", "Generate", "Offline Documentation", etc.; in the view category, there may be controls such as "Editor", "Source Code", "Documentation", "OpenAPI", etc.; in the edit pane category, there may be controls such as "Resource Manager", "Field Properties", etc.; in the addition category, there may be controls such as "Message / Enumeration", "Sub-module", etc.

[0095] After the user creates an interface configuration task on the interface configuration page and triggers the "Resource Manager" control in the toolbar, the terminal can display a resource management area on the interface configuration page, referring to Figure 4 the left area of the interface configuration page in Figure 4 . The resource management area may include server options and external reference type options. Under the server options, there are also message / enumeration and sub-modules. Among them, message / enumeration is a collection of data structures. The user can trigger the "message / enumeration" add control to add a data structure to the data structure enumeration collection displayed on the interface configuration page. A sub-module is a collection of interface units. The user can trigger the "sub-module" add control to add an interface unit to the interface unit collection displayed on the interface configuration page. After adding the data structure and the interface unit, the added data structure enumeration collection and interface unit collection can be displayed in the resource management area. Among them, the interface unit collection includes the indexes corresponding to the added interface units.

[0096] After the user triggers the server option in the resource management area, the terminal responds to the trigger operation on the server option in the interface configuration page, referring to Figure 4 the right area of the interface configuration page in Figure 4 . The terminal then displays server configuration options in the parameter entry area of the interface configuration page. The server configuration options may include, but are not limited to, various forms such as text input boxes and selection boxes to enter server access parameters.

[0097] In this embodiment, by displaying the server option and the corresponding server option in the interface configuration page, the user can directly enter the server access parameters by editing the server configuration options in the parameter entry area, and the operation method is simple and convenient, without the need for the user to write code.

[0098] In one embodiment, the above interface configuration method further includes: in response to a selection operation on an interface unit in the interface unit collection, displaying, in the parameter entry area of the interface configuration page, interface configuration items corresponding to the selected interface unit; and obtaining interface configuration parameters corresponding to the selected interface unit entered by editing the interface configuration items.

[0099] Among them, a configuration item refers to an item for configuring the information displayed during the configuration management process. The parameter entry area in the interface configuration page may also display interface configuration items.

[0100] Specifically, the user can trigger the interface unit option on the interface configuration page. After the terminal responds to the selection operation on the interface unit in the interface unit collection, the interface configuration items corresponding to the selected interface unit are displayed in the parameter entry area of the interface configuration page. The user can then enter the required interface configuration parameters in the parameter entry area of the interface configuration page.

[0101] Among them, the interface configuration items in the parameter entry area can also include various types of interface configuration items. The user can trigger the selected interface unit, and then the terminal displays the corresponding interface configuration items in the parameter entry area. By editing and inputting the corresponding interface configuration items, the interface configuration parameters corresponding to the respective interface units can be respectively entered.

[0102] As Figure 5 shown, it is a schematic diagram of the interface of the interface unit configuration item in the interface configuration page in an embodiment. The interface configuration parameters can also be various types of interface configuration items. For example, they can include "interface options", "documents", "frequency limits", "request messages", "return messages", "login state plugins", "error code reporting", "interceptors", "process orchestration", "interface debugging", and other types of interface configuration items. Each type of interface configuration item includes corresponding specific configuration parameter items below.

[0103] Referring to Figure 5 , when the user selects the "document" type in the interface configuration item, the parameter entry area for the document interface configuration item is displayed. The user can then enter interface description parameters such as the document title parameter and the document description parameter in this area to enter the required interface configuration parameters.

[0104] In this embodiment, by displaying the interface configuration items corresponding to the interface units in the parameter entry area, the user can directly enter the corresponding interface configuration parameters in the parameter entry area, without the user having to write the corresponding code, and the configuration processing of the interface can be quickly implemented, effectively improving the development efficiency.

[0105] In an embodiment, the interface unit includes at least one main interface unit and at least one sub-interface unit belonging to the main interface unit;

[0106] In response to a trigger operation on the interface unit addition control in the interface configuration page, adding an interface unit to the set of interface units displayed in the interface configuration page includes: when the root index of the set of interface units in the interface configuration page is in the selected state, in response to a trigger operation on the interface unit addition control in the interface configuration page, adding a main interface unit under the root index of the set of interface units; when the main interface unit under the root index of the set of interface units is in the selected state, in response to a trigger operation on the interface unit addition control in the interface configuration page, adding a sub-interface unit under the selected main interface unit.

[0107] Among them, the interface unit includes at least one main interface unit and at least one sub-interface unit belonging to the main interface unit. An interface unit can be a main interface unit, and the sub-interface unit is a plurality of logical interfaces virtualized from a main interface unit. For example, if a certain business project needs to implement a function, the corresponding interface can be configured. When there are multiple sub-function modules under this function, corresponding sub-interfaces can also be established, and each sub-interface can inherit the functions of the main interface.

[0108] Specifically, during the process of creating an interface unit through the interface configuration page, the user can first trigger the interface unit addition control displayed in the toolbar, so that the terminal adds an interface unit to the set of interface units displayed on the interface configuration page. Specifically, the user can continue to add multiple interface units to the set of interface units in this way, and the added interface units are the main interface units.

[0109] Next, the user can select the corresponding main interface unit in the set of interface units, and then can further create the corresponding sub-interface unit under the corresponding main interface unit. Specifically, the set of interface units includes an interface index. When the user selects the root index of the set of interface units on the interface configuration page, by triggering the interface unit addition control on the interface configuration page, a main interface unit is added under the root index of the set of interface units.

[0110] Furthermore, the user can also select the main interface unit under the root index in the set of interface units, and by triggering the interface unit addition control on the interface configuration page, a sub-interface unit is added under the main interface unit of the selected root index, thereby creating the required interface unit.

[0111] As Figure 6 shown, it is a schematic diagram of the interface of the set of interface units on the interface configuration page in an embodiment. Referring to Figure 6 , the left area on the interface configuration page is the resource manager area, and this area includes the set of interface units. For example, the set of interface units includes the main interface unit of "order", and under this main interface unit, there are multiple sub-interface units such as "create order", "query order", "cancel order", and "modify order", and the indexes of each interface unit are displayed in the set of interface units.

[0112] In this embodiment, by directly creating the main interface unit and the corresponding sub-interface unit required for the business on the interface configuration page, the coupling is reduced, so that the corresponding interface configuration parameters can be directly entered, and the corresponding interface is configured, improving the development efficiency of the interface code.

[0113] In one embodiment, in the parameter entry area of the interface configuration page, obtain the interface configuration parameters entered corresponding to the added interface units, including: in the parameter entry area of the interface configuration page, obtain the field configuration information entered corresponding to the added interface units; in response to an attribute configuration operation on the selected field configuration information, display the attribute interface corresponding to the selected field configuration information; in the attribute interface for configuring the field information, obtain the field attribute information entered corresponding to the configured field information; based on the field configuration information and the field attribute information, obtain the interface configuration parameters corresponding to the added interface units.

[0114] Among them, the parameter entry area may further include a field set required for configuring the interface, and the interface configuration parameters may further include multiple field configuration information. Among them, a field is a variable associated with an object or a class, and a set of fields constitutes a field information record. When the user enters the interface configuration parameters, the user can enter the corresponding field configuration information through the field set in the parameter entry area, so as to enter the required interface configuration parameters.

[0115] Specifically, the user can select the interface unit to be configured in the interface unit set on the interface configuration page, and the terminal displays the field configuration information corresponding to the interface unit in the parameter entry area. The user can then directly select the corresponding field configuration information in the parameter entry area for entry and configuration.

[0116] Further, the user can also select the field configuration information, and then perform attribute configuration on the selected field configuration information. The terminal then displays the attribute interface corresponding to the selected field configuration information, and the user can further enter the field attribute information of the field configuration information in the attribute interface. The terminal then obtains the interface configuration parameters of the interface unit according to the field configuration information and the corresponding field attribute information entered by the user in the parameter entry area.

[0117] As Figure 7 shown, it is a schematic diagram of the interface for field attribute configuration in the interface configuration page in one embodiment. Referring to Figure 7 , the attribute interface of the field configuration information may also be displayed in the parameter entry area on the interface configuration page. For example, when the user selects an interface configuration item of the "return message" type, multiple interface configuration items may also be displayed under this interface configuration item. Among them, the interface configuration items include field configuration information. For example, each field configuration information can be displayed below the "field list". The field list also includes operation controls, and the user can add or delete field items through the operation controls. Each field information can also display the corresponding field attribute information.

[0118] When the user selects one of the field items, the terminal displays the property interface corresponding to the selected field item in the parameter entry area. For example, the property interface includes field property parameters such as "multiplicity", "type", "default value", "format", "name", "number", "alias", "encryption / decryption", "field name", "field description", "sample value", "user identification", "dyeing identification", "as a request data packet", etc.

[0119] In one embodiment, after the user selects an option in the field list, the user can perform corresponding operations by triggering the function controls on the interface configuration page. Further, corresponding operations can also be achieved by operating shortcut keys. Taking a terminal with a keyboard as an example, "Ctrl+1" can achieve "adding a unit64 field"; "Ctrl+2" can achieve "adding a unit32 field"; "Ctrl+3" can achieve "adding an int64 field"; "Ctrl+4" can achieve "adding an int32 field"; "Ctrl+Insert" can achieve "cloning the current row"; "Ctrl+Delete" can achieve "deleting the current row"; "Tab / Shift+Tab" can achieve "moving the edit point left and right", etc. Moreover, an operation instruction bar for shortcut keys can be displayed on the interface configuration page to display shortcut operation instruction information to the user, enabling the user to perform corresponding operation processing quickly and conveniently, and effectively improving the input efficiency of interface configuration parameters.

[0120] In this embodiment, by directly configuring the field configuration information corresponding to the interface unit and the corresponding field property information on the interface configuration page, the interface configuration parameters corresponding to the interface unit can be conveniently and effectively input, thereby effectively shortening the development time of the interface code.

[0121] In one embodiment, the above interface configuration method further includes: obtaining the template information of the interface code template; obtaining the document property information of the interface document where the interface code is located; and adding the template information and the document property information to the comment information of the interface document.

[0122] Among them, the interface document refers to a file in which the generated interface code is converted into a document form. The interface document includes the content corresponding to the interface code. Further, the interface document can also include comment information. The comment information refers to the explanatory information, descriptive information, etc. of the generated interface code.

[0123] Specifically, the terminal inputs the data structure enumeration set and the interface configuration parameters through the interface configuration page, maps the interface configuration parameters to metadata according to the data structure enumeration set, and after generating the interface code based on the metadata and the pre-configured interface code template, the interface code can be further converted into the corresponding interface document.

[0124] Further, the terminal can also obtain the document attribute information of the interface document where the interface code is located, and add the template information and the document attribute information to the annotation information of the interface document, so as to generate the corresponding interface document.

[0125] In one embodiment, the terminal can also respond to a document display operation on the configuration page, display an interface document page; and display the interface document in the document display area of the interface document page.

[0126] As Figure 8 shown, it is a schematic diagram of the interface for displaying an interface document in one embodiment. Referring to Figure 8 , the details page and the global thumbnail page of the interface document can also be displayed in the document display area, that is, as shown in the right part of the global thumbnail page document display area. In the first text part of the details page of the interface document, the annotation information of the interface document is displayed and marked in the form of annotations.

[0127] In this embodiment, by generating the corresponding interface document according to the interface code obtained by configuration, the interface document can be automatically and intelligently configured, and the corresponding annotation information can be automatically generated in the interface document, so as to be able to automatically generate a complete and highly usable interface document, thereby being able to efficiently improve the development efficiency.

[0128] In one embodiment, the above interface configuration method further includes: responding to a document display operation triggered on the interface configuration page, displaying the interface code in the interface code display area on the interface configuration page; responding to an edit operation on the interface code, updating the interface code; after the edit operation ends, generating an updated interface document based on the updated interface code.

[0129] Among them, the toolbar on the interface configuration page further includes a document display control for triggering the display of the generated interface document.

[0130] Specifically, the user can trigger the document display control on the interface configuration page to perform a document display operation, and the terminal then displays the content of the generated interface code in the interface code display area on the interface configuration page.

[0131] Further, the user can also directly perform an edit operation on the content of the interface code in the interface code display area to edit and modify the content of the interface code. After the terminal responds to the user's edit operation on the interface code, the interface code is updated. The user can save the current edit operation through the save control in the toolbar on the interface configuration page. After the user's edit operation ends, the terminal then generates an updated interface document according to the updated interface code.

[0132] In this embodiment, the user can manually update the interface code by editing in the interface code display area, enabling the user to edit and update the interface code according to specific requirements, thereby effectively combining the method of automatically generating the interface code with the method of manually updating the interface code, making the interface configuration more flexible.

[0133] In one embodiment, as Figure 9 shown, another interface configuration method is provided, including the following steps:

[0134] S902, display the interface configuration page.

[0135] S904, in response to a trigger operation for adding a control to the data structure in the interface configuration page, add a data structure to the data structure enumeration set shown in the interface configuration page.

[0136] S906, in response to a trigger operation for adding a control to the interface unit in the interface configuration page, add an interface unit to the interface unit set shown in the interface configuration page.

[0137] S908, in the parameter entry area of the interface configuration page, obtain the interface configuration parameters entered corresponding to the added interface units.

[0138] S910, map the interface configuration parameters to metadata according to the data structure enumeration set, and generate interface code based on the metadata and the pre-configured interface code template.

[0139] S912, obtain the business function codes corresponding to each interface unit in the interface unit set.

[0140] S914, generate a business development toolkit based on the interface code and the business function codes.

[0141] Among them, the business development toolkit, namely SDK (Software Development Kit), refers to a collection of related documents, examples, and tools for assisting in the development of a certain type of software. The software development toolkit is usually a collection of development tools when developers build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc. Generally speaking, the SDK is the SDK used to develop application programs under the Windows platform, and it can simply provide application program interfaces for a certain programming language.

[0142] Specifically, the terminal inputs a data structure enumeration set and interface configuration parameters through an interface configuration page, maps the interface configuration parameters to metadata according to the data structure enumeration set, generates interface code based on the metadata and a pre-configured interface code template, and can further obtain the business function code corresponding to each interface unit in the interface unit set. The terminal then generates a corresponding business development toolkit based on the interface code and the obtained business function code. In this way, application interface files for each business corresponding interface required for the business function can be generated efficiently.

[0143] In this embodiment, after automatically generating interface code based on the interface configuration parameters input through the interface configuration page, and further obtaining the corresponding business function code according to the interface code, a corresponding business development toolkit is automatically generated, so that the business development toolkit can be generated efficiently, effectively improving the development efficiency.

[0144] In one embodiment, mapping the interface configuration parameters to metadata according to the data structure enumeration set and generating interface code based on the metadata and a pre-configured interface code template includes: performing mapping encoding on the interface configuration parameters based on the data structure enumeration set to generate metadata corresponding to the interface configuration parameters; and filling the metadata into the pre-configured interface code template through data rendering to generate interface code.

[0145] Among them, mapping encoding means encoding data into another corresponding form according to a preset rule. Data rendering refers to rendering background data into a page or corresponding content. For example, the data rendering methods include string concatenation, Dom loop element filling, string template filling, document fragment (data rearrangement), etc.

[0146] After the user adds a data structure enumeration and interface units in the interface configuration page of the terminal, and inputs interface configuration parameters through the parameter input area of the interface configuration page, the terminal further automatically generates interface code based on the input interface configuration parameters and the data structure enumeration set and a pre-configured interface code template.

[0147] Specifically, the terminal maps the interface configuration parameters to metadata according to the data structure enumeration set. Among them, the data structure enumeration set includes pre-defined data structures that have been added. When the terminal maps the interface configuration parameters to metadata, it performs mapping encoding on the interface configuration parameters according to the data structures in the data structure enumeration set, so as to convert the interface configuration parameters into metadata of the corresponding data structure.

[0148] The terminal further fills the metadata into the pre-configured interface code template. Specifically, the terminal fills the metadata into the pre-configured interface code template through data rendering, thereby generating interface code.

[0149] In this embodiment, by performing mapping encoding on the interface configuration parameters, the interface configuration parameters can be effectively mapped to the metadata of a preset data structure. Through the method of data rendering, the metadata can be accurately filled into the pre-configured interface code template, thereby enabling the efficient automatic generation of interface code without the need for users to manually write code, greatly improving the development efficiency of the interface code.

[0150] In one embodiment, based on the data structure enumeration set, mapping encoding is performed on the interface configuration parameters to generate the metadata corresponding to the interface configuration parameters, including: converting the interface configuration parameters into parameter data in a preset format based on the predefined mapping rules in the data structure enumeration set; encoding the parameter data into the corresponding metadata based on the predefined data structures in the data structure enumeration set.

[0151] Among them, the data structures in the data structure enumeration set have predefined corresponding mapping rules. The mapping rules can be a series of predefined functions that define the correspondence between the interface configuration parameters and the data structures. The data structure can be a data structure template predefined by the user. When configuring the interface, the predefined data structure can be directly added to the interface configuration page.

[0152] Specifically, in the process of the terminal mapping the interface configuration parameters to the metadata, the data structures in the data structure enumeration set are obtained, the predefined mapping rules corresponding to each data structure are identified, and then, according to the predefined mapping rules, the interface configuration parameters are converted into parameter data in a preset format. Further, according to the predefined data structures in the data structure enumeration set, the parameter data is automatically encoded into the corresponding metadata.

[0153] For example, the terminal can convert the interface configuration parameters into metadata in json format. The specific form of the obtained metadata can be as follows:

[0154]

[0155] In this embodiment, after directly adding the predefined data structure to the interface configuration page, it can be directly converted into the corresponding metadata according to the mapping rules and the preset data structure in the data structure set, without the need for the user to manually convert the input interface configuration parameters, effectively shortening the development time and saving the labor cost.

[0156] In one embodiment, by means of data rendering, metadata is filled into a pre-configured interface code template to generate interface code, including: obtaining the service type corresponding to the interface unit in the interface unit set; calling the pre-configured interface code template that matches the service type; by means of data rendering, filling the metadata corresponding to the interface unit into the called interface code template to generate interface code.

[0157] Among them, the interface code template includes pre-configured interface code and character identifiers. The character identifiers are used to fill the metadata into the corresponding positions in the interface code template.

[0158] After the user adds a data structure enumeration and interface units in the interface configuration page of the terminal and enters interface configuration parameters in the parameter entry area, the terminal further maps the interface configuration parameters to metadata according to the entered interface configuration parameters and the data structure enumeration set, and automatically generates interface code based on the pre-configured interface code template.

[0159] Specifically, the interface unit set includes one or more interface units, and each interface unit corresponds to a corresponding service type. When the terminal fills the metadata into the pre-configured interface code template, it first obtains the service type corresponding to the interface unit in the interface unit set, and then calls the pre-configured interface code template that matches the service type.

[0160] The terminal further fills the metadata corresponding to the interface unit into the called interface code template by means of data rendering according to the character identifier in the metadata, specifically fills the metadata corresponding to the interface unit into the corresponding position in the interface code template, and then generates interface code.

[0161] In this embodiment, by means of data rendering, the metadata is filled into the pre-configured interface code template, enabling the terminal to automatically generate the required interface code according to the metadata corresponding to the interface configuration parameters, thereby being able to generate interface code efficiently and accurately.

[0162] In one embodiment, by means of data rendering, metadata is filled into a pre-configured interface code template to generate interface code, including: based on the keyword identifier of the metadata, matching it with the keyword identifier in the interface code template to determine the mapping position of the metadata in the interface code template; according to the mapping position, filling the key-value in the metadata into the interface code template to generate interface code.

[0163] Among them, the metadata includes keyword identifiers and corresponding key-values. For example, the data in the metadata can be in the form of key-value.

[0164] After the terminal calls the pre-configured interface code template that matches the service type corresponding to the interface unit in the interface unit set, the terminal then matches the keyword identifiers included in the metadata with the keyword identifiers in the interface code template. Specifically, string matching can be performed based on the keyword identifiers. When the corresponding keyword identifier is matched in the interface code template, the mapping position of the key value corresponding to the keyword identifier in the interface code template is determined according to the matched keyword identifier, so as to determine the mapping position of the metadata in the interface code template.

[0165] The terminal then fills the key values in the metadata into the interface code template respectively according to the determined mapping position, so as to realize filling the metadata into the interface code template by means of data rendering to generate the interface code.

[0166] For example, the metadata includes version number information, such as "{\"version\":\"1.0.0\"}", indicating that the version number is "1.0.0". The partial code template in the interface code template can be as follows:

[0167]

[0168] The terminal then determines the position of the corresponding field name in the interface code template according to the field identifier, such as the field identifier can be the field name. Then, the value "1.0.0" is directly filled after the field identifier "version" in the interface code template, thereby realizing rendering the metadata into the interface code template.

[0169] In this embodiment, the metadata is filled into the corresponding mapping position in the interface code template through the keyword identifier. Therefore, there is no need for the user to manually write code, and only the required interface configuration parameters need to be entered on the interface configuration page, so that the interface code can be generated accurately and efficiently, effectively improving the development efficiency.

[0170] In a specific embodiment, as Figure 10 shown, a specific interface configuration method is provided, including the following steps:

[0171] S1002, display the interface configuration page.

[0172] S1004, in response to the trigger operation on the control for adding a data structure in the interface configuration page, add a data structure to the data structure enumeration set displayed on the interface configuration page.

[0173] S1006, in response to the trigger operation on the control for adding an interface unit in the interface configuration page, add an interface unit to the interface unit set displayed on the interface configuration page.

[0174] S1008, in the parameter entry area of the interface configuration page, obtain the interface configuration parameters entered corresponding to the added interface units.

[0175] S1010, based on the predefined mapping rules in the data structure enumeration set, convert the interface configuration parameters into parameter data in a preset format.

[0176] S1012, based on the predefined data structure in the data structure enumeration set, encode the parameter data into corresponding metadata.

[0177] S1014, obtain the service types corresponding to the interface units in the interface unit set.

[0178] S1016, call the pre-configured interface code template that matches the service type.

[0179] S1018, based on the keyword identifier of the metadata, match it with the keyword identifier in the interface code template to determine the mapping position of the metadata in the interface code template.

[0180] S1020, according to the mapping position, fill the key values in the metadata into the interface code template to generate the interface code.

[0181] In this embodiment, by displaying the interface configuration page, the user can directly add a data structure to the data structure enumeration set through the data structure addition control on the interface configuration page, and add an interface unit to the interface unit set through the interface unit addition control. By displaying the parameter entry area of the interface configuration page, the user can directly enter the interface configuration parameters corresponding to the added interface units. The terminal then maps the interface configuration parameters to metadata according to the data structure enumeration set, and fills the metadata into the corresponding mapping position in the interface code template through the keyword identifier. Thus, without the user manually writing code, as long as the required interface configuration parameters are entered on the interface configuration page, a custom interface code can be automatically generated to implement the interface configuration, which can accurately and efficiently generate the interface code, avoid code writing errors, shorten the development cycle, and effectively improve the development efficiency.

[0182] This application also provides an application scenario that applies the above interface configuration method. Specifically, the application of the interface configuration method in this application scenario is as follows:

[0183] Users can log in to the web-based interface configuration application through the terminal for interface configuration. For example, it can be a web interface tool based on XCGI. The interface configuration application includes an interface configuration page. When a user needs to configure the development interface of the payment service, after the user enters the interface configuration application, the terminal displays the interface configuration page. The user then adds data structures and interface units on the interface configuration page, and displays the data structure set and the interface unit set in a preset area. For example, in the payment service, there is a main interface unit for "order", and under this main interface unit, there are multiple sub-interface units such as "create order", "query order", "cancel order", and "modify order", and the indexes of each interface unit are displayed in the interface unit set.

[0184] Furthermore, the user can select each interface unit, and the terminal then displays the interface configuration items corresponding to the selected interface unit in the parameter entry area. The user can enter the required parameter information in the parameter entry area to enter the required interface configuration parameters. The terminal then maps the interface configuration parameters to metadata according to the data structure enumeration set, and generates the interface code of the payment service based on the metadata and the pre-configured interface code template.

[0185] Through the interface configuration application in the terminal, the user can directly enter the interface configuration parameters corresponding to the added interface units on the interface configuration page of the interface configuration application and the corresponding parameter entry area. Thus, without the user writing code, custom interface code can be automatically generated to achieve interface configuration, shortening the development cycle and effectively improving the development efficiency of the interface code.

[0186] It should be understood that although Figure 2 、 3 、8, 9, 10 in the flowchart of each step in accordance with the arrows in turn shown, but these steps are not necessarily in the order indicated by the arrows in turn. Unless otherwise specified in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, Figure 2 、 3 、8, 9, 10 at least a portion of the steps may include multiple steps or multiple stages, these steps or stages are not necessarily executed at the same time, but may be executed at different times, the execution order of these steps or stages is not necessarily in sequence, but may be with at least a portion of the steps of other steps or other steps in the steps or stages of rotation or alternately executed.

[0187] In one embodiment, as Figure 11As shown, an interface configuration device 1100 is provided. This device can be a software module, a hardware module, or a combination of both to form part of a computer device. Specifically, the device includes: a page display module 1102, a data addition module 1104, a parameter entry module 1106, and an interface code generation module 1108, where:

[0188] The page display module 1102 is used to display an interface configuration page;

[0189] The data addition module 1104 is used to, in response to a trigger operation on the data structure addition control in the interface configuration page, add a data structure to the data structure enumeration set displayed on the interface configuration page; and in response to a trigger operation on the interface unit addition control in the interface configuration page, add an interface unit to the interface unit set displayed on the interface configuration page;

[0190] The parameter entry module 1106 is used to, in the parameter entry area of the interface configuration page, obtain the interface configuration parameters entered corresponding to the added interface units;

[0191] The interface code generation module 1108 is used to map the interface configuration parameters to metadata according to the data structure enumeration set, and generate interface code based on the metadata and a pre-configured interface code template.

[0192] In one embodiment, the parameter entry module 1106 is further used to, in response to a trigger operation on the server option in the interface configuration page, display server configuration options in the parameter entry area of the interface configuration page; obtain the server access parameters entered by editing the server configuration options; and the interface code generation module 1108 is further used to map the server access parameters and the interface configuration parameters to metadata respectively according to the data structure enumeration set.

[0193] In one embodiment, the parameter entry module 1106 is further used to, in response to a selection operation on an interface unit in the interface unit set, display the interface configuration items corresponding to the selected interface unit in the parameter entry area of the interface configuration page; and obtain the interface configuration parameters corresponding to the selected interface unit entered by editing the interface configuration items.

[0194] In one embodiment, the interface unit includes at least one main interface unit and at least one sub-interface unit belonging to the main interface unit; the data addition module 1104 is further used to, when the root index of the interface unit set in the interface configuration page is in a selected state, in response to a trigger operation on the interface unit addition control in the interface configuration page, add a main interface unit under the root index of the interface unit set; and when the main interface unit under the root index of the interface unit set is in a selected state, in response to a trigger operation on the interface unit addition control in the interface configuration page, add a sub-interface unit under the selected main interface unit.

[0195] In one embodiment, the parameter entry module 1106 is further configured to obtain the field configuration information corresponding to the added interface unit in the parameter entry area of the interface configuration page; in response to an attribute configuration operation on the selected field configuration information, display an attribute interface corresponding to the selected field configuration information; in the attribute interface for configuring the field information, obtain the field attribute information corresponding to the configured field information; and obtain the interface configuration parameters corresponding to the added interface unit based on the field configuration information and the field attribute information.

[0196] In one embodiment, the above interface configuration device 1100 further includes a document generation module, configured to obtain the template information of the interface code template; obtain the document attribute information of the interface document where the interface code is located; and add the template information and the document attribute information to the comment information of the interface document.

[0197] In one embodiment, the page display module 1102 is further configured to display the interface code in the interface code display area of the interface configuration page in response to a document display operation triggered on the interface configuration page; the document generation module 1110 is further configured to update the interface code in response to an edit operation on the interface code; and when the edit operation ends, generate an updated interface document based on the updated interface code.

[0198] In one embodiment, the above interface configuration device 1000 further includes a toolkit generation module, configured to obtain the business function codes corresponding to the respective interface units in the interface unit set; and generate a business development toolkit based on the interface code and the business function codes.

[0199] In one embodiment, the interface code generation module 1108 is further configured to perform mapping encoding on the interface configuration parameters based on the data structure enumeration set to generate metadata corresponding to the interface configuration parameters; and fill the metadata into a pre-configured interface code template in a data rendering manner to generate the interface code.

[0200] In one embodiment, the interface code generation module 1108 is further configured to convert the interface configuration parameters into parameter data in a preset format based on the predefined mapping rules in the data structure enumeration set; and encode the parameter data into corresponding metadata based on the predefined data structures in the data structure enumeration set.

[0201] In one embodiment, the interface code generation module 1108 is further configured to obtain the service type corresponding to the interface unit in the interface unit set; call a pre-configured interface code template that matches the service type; and fill the metadata corresponding to the interface unit into the called interface code template in a data rendering manner to generate the interface code.

[0202] In one embodiment, the interface code generation module 1108 is further configured to match the keyword identifier of the metadata with the keyword identifier in the interface code template to determine the mapping position of the metadata in the interface code template; and fill the key-value in the metadata into the interface code template according to the mapping position to generate the interface code.

[0203] For the specific limitations of the interface configuration device, reference may be made to the limitations on the interface configuration method in the foregoing text, which will not be elaborated herein. Each module in the foregoing interface configuration device can be implemented in whole or in part by software, hardware, and their combination. Each of the foregoing modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the foregoing modules.

[0204] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structural diagram may be as Figure 12 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an interface configuration method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0205] Those skilled in the art can understand that Figure 12 the structure shown in

[0206] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0207] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above method embodiments.

[0208] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the above method embodiments.

[0209] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0210] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0211] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. An interface configuration method, characterized in that, the method includes: displaying an interface configuration page; responding to a trigger operation for adding a control to the data structure in the interface configuration page, and adding a data structure to the data structure enumeration set displayed in the interface configuration page; responding to a trigger operation for adding a control to the interface unit in the interface configuration page, and adding an interface unit to the interface unit set displayed in the interface configuration page; in the parameter entry area of the interface configuration page, obtaining interface configuration parameters entered corresponding to the added interface unit; based on the mapping rules predefined in the data structure enumeration set, converting the interface configuration parameters into parameter data in a preset format; based on the predefined data structure in the data structure enumeration set, encoding the parameter data into corresponding metadata; generating interface code according to the metadata and a pre-configured interface code template.

2. The method according to claim 1, characterized in that, the method further includes: responding to a trigger operation for the server option in the interface configuration page, and displaying server configuration options in the parameter entry area of the interface configuration page; obtaining server access parameters entered by editing the server configuration options; mapping the server access parameters and the interface configuration parameters into metadata respectively according to the data structure enumeration set.

3. The method according to claim 1, characterized in that, the obtaining, in the parameter entry area of the interface configuration page, interface configuration parameters entered corresponding to the added interface unit includes: responding to a selection operation on an interface unit in the interface unit set, and displaying interface configuration items corresponding to the selected interface unit in the parameter entry area of the interface configuration page; obtaining the interface configuration parameters corresponding to the selected interface unit entered by editing the interface configuration items.

4. The method according to claim 1, characterized in that, the interface unit includes at least one main interface unit and at least one sub-interface unit belonging to the main interface unit; the responding to a trigger operation for adding a control to the interface unit in the interface configuration page, and adding an interface unit to the interface unit set displayed in the interface configuration page includes: when the root index of the interface unit set in the interface configuration page is in a selected state, responding to a trigger operation for adding a control to the interface unit in the interface configuration page, and adding a main interface unit under the root index of the interface unit set; when the main interface unit under the root index of the interface unit set is in a selected state, responding to a trigger operation for adding a control to the interface unit in the interface configuration page, and adding a sub-interface unit under the selected main interface unit.

5. The method according to claim 1, characterized in that, the obtaining, in the parameter entry area of the interface configuration page, interface configuration parameters entered corresponding to the added interface unit includes: in the parameter entry area of the interface configuration page, obtaining the field configuration information entered corresponding to the added interface unit. In response to an attribute configuration operation on the selected field configuration information, display an attribute interface corresponding to the selected field configuration information; On the attribute interface corresponding to the field configuration information, obtain the field attribute information entered corresponding to the field configuration information; Based on the field configuration information and the field attribute information, obtain interface configuration parameters corresponding to the added interface unit.

6. The method according to claim 1, wherein, the method further includes: Obtain the template information of the interface code template; Obtain the document attribute information of the interface document where the interface code is located; Add the template information and the document attribute information to the annotation information of the interface document.

7. The method according to claim 1, wherein, the method further includes: In response to a document display operation triggered on the interface configuration page, display the interface code in the interface code display area on the interface configuration page; In response to an edit operation on the interface code, update the interface code; After the edit operation ends, generate an updated interface document based on the updated interface code.

8. The method according to claim 1, wherein, the method further includes: Obtain the business function codes corresponding to each interface unit in the interface unit set; Based on the interface code and the business function codes, generate a business development toolkit.

9. The method according to any one of claims 1 to 8, wherein, generating the interface code according to the metadata and a pre-configured interface code template includes: By means of data rendering, fill the metadata into the pre-configured interface code template to generate the interface code.

10. The method according to claim 9, wherein, the filling the metadata into the pre-configured interface code template by means of data rendering to generate the interface code includes: Obtain the business type corresponding to the interface unit in the interface unit set; Call a pre-configured interface code template that matches the business type; By means of data rendering, fill the metadata corresponding to the interface unit into the called interface code template to generate the interface code.

11. The method according to claim 9, wherein, the filling the metadata into the pre-configured interface code template by means of data rendering to generate the interface code includes: Based on the keyword identifier of the metadata, match it with the keyword identifier in the interface code template to determine the mapping position of the metadata in the interface code template; According to the mapping position, fill the key-value in the metadata into the interface code template to generate the interface code.

12. An interface configuration device, wherein, the device includes: A page display module for displaying an interface configuration page; A data addition module, configured to add a data structure to the data structure enumeration set displayed on the interface configuration page in response to a trigger operation on the data structure addition control in the interface configuration page; and add an interface unit to the interface unit set displayed on the interface configuration page in response to a trigger operation on the interface unit addition control in the interface configuration page. A parameter entry module, configured to obtain interface configuration parameters entered corresponding to the added interface unit in the parameter entry area of the interface configuration page. A mapping module, configured to convert the interface configuration parameters into parameter data in a preset format based on the predefined mapping rules in the data structure enumeration set; and encode the parameter data into corresponding metadata based on the predefined data structures in the data structure enumeration set. An interface code generation module, configured to generate interface code according to the metadata and a pre-configured interface code template.

13. The interface configuration device according to claim 12, wherein, the parameter entry module is further configured to display server configuration options in the parameter entry area of the interface configuration page in response to a trigger operation on the server option in the interface configuration page; obtain server access parameters entered by editing the server configuration options; and the mapping module is further configured to map the server access parameters and the interface configuration parameters into metadata respectively according to the data structure enumeration set.

14. The interface configuration device according to claim 12, wherein, the parameter entry module is further configured to display interface configuration items corresponding to the selected interface unit in the parameter entry area of the interface configuration page in response to a selection operation on the interface unit in the interface unit set; obtain the interface configuration parameters corresponding to the selected interface unit entered by editing the interface configuration items.

15. The interface configuration device according to claim 12, wherein, the interface unit includes at least one main interface unit and at least one sub-interface unit belonging to the main interface unit; the data addition module is further configured to add a main interface unit under the root index of the interface unit set in response to a trigger operation on the interface unit addition control in the interface configuration page when the root index of the interface unit set in the interface configuration page is in a selected state; and add a sub-interface unit under the selected main interface unit in response to a trigger operation on the interface unit addition control in the interface configuration page when the main interface unit under the root index of the interface unit set is in a selected state.

16. The interface configuration device according to claim 12, wherein, The parameter entry module is further configured to obtain, in the parameter entry area of the interface configuration page, the field configuration information corresponding to the added interface unit; in response to an attribute configuration operation on the selected field configuration information, display an attribute interface corresponding to the selected field configuration information; in the attribute interface corresponding to the field configuration information, obtain the field attribute information corresponding to the field configuration information; and obtain interface configuration parameters corresponding to the added interface unit based on the field configuration information and the field attribute information.

17. The interface configuration device according to claim 12, wherein, the device further includes a document generation module, configured to obtain template information of the interface code template; obtain document attribute information of the interface document where the interface code is located; and add the template information and the document attribute information to the annotation information of the interface document.

18. The interface configuration device according to claim 12, wherein, the page display module is further configured to, in response to a document display operation triggered on the interface configuration page, display the interface code in the interface code display area of the interface configuration page; the device further includes a document generation module, configured to update the interface code in response to an edit operation on the interface code; after the edit operation ends, generate an updated interface document based on the updated interface code.

19. The interface configuration device according to claim 12, wherein, the device further includes a toolkit generation module, configured to obtain the service function codes corresponding to the interface units in the interface unit set; and generate a service development toolkit based on the interface code and the service function codes.

20. The interface configuration device according to claim 12, wherein, the interface code generation module is further configured to fill the metadata into a pre-configured interface code template by means of data rendering to generate interface code.

21. The interface configuration device according to claim 20, wherein, the interface code generation module is further configured to obtain the service type corresponding to the interface unit in the interface unit set; call a pre-configured interface code template that matches the service type; and fill the metadata corresponding to the interface unit into the called interface code template by means of data rendering to generate interface code.

22. The interface configuration device according to claim 20, wherein, the interface code generation module is further configured to match the keyword identifier of the metadata with the keyword identifier in the interface code template to determine the mapping position of the metadata in the interface code template; fill the key value in the metadata into the interface code template according to the mapping position to generate interface code.

23. A computer device includes a memory and a processor, and the memory stores a computer program, wherein, when the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.

24. A computer-readable storage medium stores a computer program, It is characterized in that when the computer program is executed by a processor, the method described in any one of claims 1 to 11 is implemented.

25. A computer program product, comprising computer instructions It is characterized in that when the computer instructions are executed by a processor, the method described in any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • A method and device for processing enumeration type codes

    CN109766085A

  • Code generation method, device and system for page module

    CN110020356A