Method, device, equipment, and computer-readable storage medium for creating an interface

By receiving user interface configuration information and automatically creating and publishing database interfaces, the problem of time-consuming and inflexible interface development in the existing technology is solved, efficient and flexible interface creation is achieved, and the applicability and stability of the system are improved.

CN119782397APending Publication Date: 2025-04-08BEIJING QUANTUM SONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411847282.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, interface development requires developers to write code manually, which is time-consuming and cannot be flexibly adjusted, and lacks applicability and stability.

Method used

By receiving interface configuration information written by the user through the page, including query statements and parameter information, an interface for the database is created based on this information, and the custom function of the interface is determined based on the parameter information, and the interface is finally released for the user to call.

Benefits of technology

It reduces the time to manually write interface code, improves work efficiency, enhances interface compatibility and applicability, implements different functional modules, and improves the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782397A_ABST
    Figure CN119782397A_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a method, apparatus, device, and computer-readable storage medium for creating an interface. The method includes: receiving interface configuration information for a database, the interface configuration information is information written by a user through a page for configuring interface creation, and the interface configuration information includes query statements and parameter information; based on the interface configuration information, creating an interface for the database; based on the parameter information, determining the custom function of the interface; and publishing the created interface to provide the interface to the user for calling. According to the scheme of the present disclosure, the interface is created based on the interface configuration information for the database, which reduces the time for manually writing interface code, thereby improving the overall efficiency of interface development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to a method, apparatus, device, and computer-readable storage medium for creating an interface. Background Art

[0002] With the widespread application of data warehouses in enterprises and the growing demand for data queries, developers need to quickly and flexibly create interfaces for databases to meet business needs. In related technologies, the interface development method requires developers to manually write interface codes, which consumes a lot of time and human resources. In addition, the interface cannot be flexibly adjusted and modified according to actual needs, lacking flexibility and applicability. Therefore, a more efficient interface creation solution is needed to deal with these problems. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for creating an interface is provided. The method includes: receiving interface configuration information for a database, the interface configuration information being information written by a user through a page for configuring interface creation, the interface configuration information including query statements and parameter information; creating an interface for the database based on the interface configuration information; determining a custom function of the interface based on the parameter information; and publishing the created interface to provide the interface to a user for calling.

[0004] In a second aspect of the present disclosure, a device for creating an interface is provided. The device includes: a receiving module configured to receive interface configuration information for a database, the interface configuration information is information written by a user through a page for configuring interface creation, and the interface configuration information includes query statements and parameter information; a creating module configured to create an interface for the database based on the interface configuration information; a function module configured to determine a custom function of the interface based on the parameter information; and a publishing module configured to publish the created interface to provide the interface to a user for calling.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect of the present disclosure.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to perform the method according to the first aspect of the present disclosure.

[0007] It should be understood that the contents described in the summary of the invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0010] Figure 2 A flowchart showing a process for interface creation according to some embodiments of the present disclosure is shown;

[0011] Figure 3A A flowchart showing a process of performing interface creation according to some embodiments of the present disclosure is shown;

[0012] Figure 3B A flowchart showing a process of performing interface checking according to some embodiments of the present disclosure is shown;

[0013] Figure 4 A block diagram showing an apparatus for interface creation according to some embodiments of the present disclosure; and

[0014] Figure 5 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0017] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0018] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0019] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0021] With the widespread application of data warehouses in various fields and the growing demand for data query, developers need to develop fast and flexible data query functions to meet business needs.

[0022] In addition, data query must be standardized and data security must be ensured. Therefore, access to external users needs to be restricted and controlled. To achieve this goal, the system needs to provide unified interfaces and develop functions such as interface verification. This requires developers to write interface code and collaborate with data warehouse developers to clarify the required data and query logic, write data query statements and code, and increase the cost of interface development.

[0023] In the related art, an interface can be generated by loading an Extensible Markup Language (XML) file through a database interface mapping service, such as Just Data. However, developers need to write corresponding XML files according to each query service, and the project needs to be restarted each time the XML file is modified, which increases the instability of the system. The method of writing data query scripts and configuration parameters through the Database Application Programming Interface (DBAPI) cannot dynamically generate interface codes according to user configuration or requirements at runtime, and lacks support for functions such as log management, permission verification, and exception handling. Therefore, a more efficient and flexible interface creation solution is needed to deal with these problems.

[0024] In view of this, an improved scheme for interface creation is proposed in an embodiment of the present disclosure. According to an embodiment of the present disclosure, interface configuration information for a database is received, the interface configuration information is information written by a user through a page for configuring interface creation, and the interface configuration information includes query statements and parameter information; based on the interface configuration information, an interface for the database is created; based on the parameter information, the custom functions of the interface are determined; and the created interface is published to provide the interface for user calls. Thus, an interface is created based on the interface configuration information for a database, which reduces the time for manually writing interface code, thereby improving overall work efficiency. Moreover, the custom functions of the interface are determined based on the parameter information, so that the created interface has good compatibility and can implement different functional modules, thereby improving the applicability and stability of the system.

[0025] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0026] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1In the environment 100, the electronic device 110 can receive interface configuration information 120 for a database. According to an embodiment of the present disclosure, the interface configuration information 120 includes a query statement 121 and parameter information 122. The interface configuration information 120 can be information written by a user through a page for configuring interface creation. For example, a user can interact on the interface, such as entering text, clicking a button, selecting an option, or dragging an element, etc., to determine a query statement 121 and related parameter information 122 for performing a data query. Based on the interface configuration information 120, the electronic device 110 can create an interface 130 for a database. In some embodiments, the electronic device 110 can determine the custom function of the interface 130 based on the parameter information 122. The electronic device 110 can also publish the created interface 130 to provide the interface 130 to the user for calling.

[0027] exist Figure 1 In the embodiment, the electronic device 110 may include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, servers, etc. The terminal device may involve any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server includes but is not limited to a mainframe, an edge computing node, a computing device in a cloud environment, and the like.

[0028] It should be understood that Figure 1 The components and arrangements in the environment 100 shown are merely examples, and a computing system suitable for implementing the exemplary implementation described in the present disclosure may include one or more different components, other components, and / or different arrangements. The implementation of the present disclosure is not limited in this respect.

[0029] Figure 2 A flowchart of a process 200 for interface creation according to some embodiments of the present disclosure is shown. The process 200 may be implemented in the environment 100, for example, the process 200 may be implemented at the electronic device 110.

[0030] In block 210 , the electronic device 110 receives interface configuration information for a database, where the interface configuration information includes a query statement and parameter information.

[0031] In some embodiments, the interface configuration information may be information written by a user through a page for configuring interface creation.

[0032] As an example, the user can interact on the interface, such as inputting text, clicking a button, selecting an option, or dragging an element, to determine a query statement and related parameter information for performing a data query, and transmit the interface configuration information to the electronic device 110. The query statement may include a dynamic structured query language (SQL) script. For example, the data source for performing a data query through the interface, the data to be queried, and the data query method, etc., may be determined through a dynamic SQL script.

[0033] In some embodiments, the electronic device 110 may parse the query statement to determine the data source. Based on the parsing result of the query statement, the electronic device 110 may perform a verification operation on the data source.

[0034] As an example, the electronic device 110 can parse the SQL script to determine the data source to be queried, such as database connection information, table name or view name, etc. The electronic device 110 can also parse the SQL script to determine the specific data that the user needs to obtain through the interface, such as field name, data type, etc., and determine the user's operation method on the data. The electronic device 110 can also perform a verification operation on the data source based on the parsed result of the SQL script, such as checking whether the database connection is legal, whether the table name exists, whether the field name is correct, etc.

[0035] In the disclosed embodiment, the electronic device 110 can improve configuration efficiency, reduce configuration errors, and enhance data security by parsing the query statements configured by the user, thereby providing the user with a more convenient, efficient, and secure interface configuration experience.

[0036] In block 220 , the electronic device 110 creates an interface to the database based on the interface configuration information.

[0037] In some embodiments, after the user completes the configuration of the interface configuration information, the electronic device 110 can automatically create a corresponding interface according to the interface configuration information, so that the user can quickly generate an interface without manually writing code.

[0038] For example, please refer to Figure 3A , Figure 3A A flowchart of a process 300A for performing interface creation according to some embodiments of the present disclosure is shown. The process 300A may be implemented at the electronic device 110 .

[0039] In block 311 , the electronic device 110 creates a class object based on the interface configuration information.

[0040] In some embodiments, the electronic device 110 may obtain the interface configuration information through a database form or a configuration file, and generate a class object based on the interface configuration information to dynamically create an implementation class of the interface.

[0041] In the process of interface creation, the electronic device 110 needs to dynamically generate the implementation code of the interface according to the interface configuration information configured by the user. The implementation classes of these interfaces usually contain specific business logic and data processing logic, which need to be dynamically generated according to the user configuration at runtime. By creating a class object, the electronic device 110 can dynamically load and execute the implementation code of the interface at runtime, thereby realizing flexible interface creation and calling. This method of dynamically generating class objects can realize dynamic configuration and expansion of interfaces without the need to develop and modify source code.

[0042] As an example, after the user writes the information for configuring the interface creation through the page, the interface configuration information is saved in the database. The electronic device 110 obtains the interface configuration information through the database form. And through the dynamic scripting language, the interface configuration information is loaded and the corresponding class object is generated. For example, the electronic device 110 can dynamically generate the corresponding dynamic scripting language Groovy script according to the interface configuration port information, and use the class loader GroovyClassLoader to load these scripts, and finally generate the corresponding class objects. These class objects are the dynamically generated interface implementation classes.

[0043] In block 312 , the electronic device 110 registers the class object as a callable interface.

[0044] In some embodiments, the electronic device 110 may register the generated class object as a callable interface, which enables the electronic device 110 to more conveniently manage the class object, such as performing operations such as creation, destruction, and dependency injection.

[0045] As an example, after determining that there is no interface identical to the interface to be created in the current container, the electronic device 110 can register the created class object in the container to uniformly manage and maintain these objects. For example, the electronic device 110 registers the class object in the Spring container to implement dependency injection, that is, automatically inject the required objects at runtime. In this way, the Spring container can be responsible for managing the life cycle of this interface.

[0046] In the disclosed embodiment, the electronic device 110 can create a class object based on the interface configuration information and register the class object as a callable interface. This method can dynamically create an interface implementation class according to the user's interface configuration information at runtime, and realize dynamic configuration and expansion of the interface without developing and modifying the source code.

[0047] In some embodiments, the electronic device 110 may perform an operation of binding with a uniform resource identifier path on the created interface to perform routing request and distribution of the interface.

[0048] The Uniform Resource Identifier path is a part of the Uniform Resource Identifier (URI) and is used to uniquely identify the location of a resource. The URI path can be used to specify the path or location to access a resource. In the embodiment of the present disclosure, the function of the processing method of binding the created interface to the URI path is to implement the routing request and distribution of the interface.

[0049] As an example, by binding the URI path with the corresponding interface, the electronic device 110 can determine the interface address called by the user. When the client sends an interface call request, the request includes the requested URI path. The electronic device 110 can determine how to process the request and determine the corresponding interface address based on the URI path, thereby realizing dynamic configuration and calling of the interface.

[0050] Continue to refer Figure 2 , in box 230, the electronic device 110 determines the customized function of the interface based on the parameter information.

[0051] In some embodiments, the user can customize the functions that can be implemented by the interface by setting the parameter information in the interface configuration information. After receiving the interface configuration information, the electronic device 110 can configure corresponding functions for the interface based on the parameter information.

[0052] In some embodiments, the custom function includes at least one of the following: interface current limiting, permission verification, and exception handling.

[0053] The interface current limiting function is a mechanism to control the access rate of the interface, which is used to limit the frequency of client requests to the interface. The interface current limiting function can prevent excessive pressure caused by too many requests from affecting the stability of the system.

[0054] The permission verification function is used to verify the client's access rights to the interface, ensuring that only authorized users can access the interface. By verifying the user's identity and permission information, the access rights to the interface can be controlled to protect the security of the system.

[0055] The exception handling function is used to handle abnormal situations that may occur during the interface call process, such as internal server errors, parameter verification failures, business logic exceptions, etc. Through a suitable exception handling mechanism, exceptions can be captured and processed, and appropriate error information can be returned to ensure the stability and reliability of the interface.

[0056] In some embodiments, the parameter information includes at least one of the following: interface current limiting parameters, interface permission information, and exception handling information, and wherein based on the parameter information, determining the custom function of the interface includes at least one of the following: based on the interface current limiting parameters, controlling the access rate of the interface; based on the interface permission information, performing permission verification operations on the interface to determine the accessibility of the interface to the authorized user; based on the exception handling information, handling abnormal operations of the interface and returning error information.

[0057] As an example, the interface current limiting parameters may include the query rate per second (QPS), and the electronic device 110 may control the access rate of the interface based on the interface current limiting parameters. For example, it may be set to allow only a certain number of requests to be processed per second, and requests exceeding the limited number will be rejected or delayed. The interface permission information may include user identity information and permission information. The electronic device 110 may determine whether the user has the right to access or call the created interface based on the interface permission information. The exception handling information may include exception type, processing strategy, error information, exception log, etc. Based on the exception handling information, the electronic device 110 may capture, record and handle exceptions in a timely manner when an interface call encounters an abnormal situation to ensure the stability and reliability of the system.

[0058] In the disclosed embodiment, the electronic device 110 can implement various customized functions of the interface such as interface current limiting, authority verification, and exception handling based on the parameter information configured by the user, so that the interface has higher flexibility and configurability. In addition, when the interface application requirements change, new functions can be implemented or existing functions can be adjusted by modifying the configured parameter information without recoding the interface, which facilitates the expansion and upgrade of the interface function.

[0059] Continue to refer Figure 2 In block 240 , the electronic device 110 publishes the created interface to provide the interface for the user to call.

[0060] In some embodiments, the electronic device 110 may publish the created interface after the interface is created, so as to provide the interface for other users to call.

[0061] As an example, the electronic device 110 may publish the interface through a memory data storage system for implementing data caching and message delivery. For example, the electronic device 110 may use a Redis subscription mode to implement real-time publishing and subscription of the created interface information, ensuring that all components in the system can obtain the latest interface information in a timely manner.

[0062] For example, please refer to Figure 3B , Figure 3BA flow chart of a process 300B for performing an interface check according to some embodiments of the present disclosure is shown.

[0063] In block 321 , the electronic device 110 may perform a periodic check operation on the interfaces to determine interfaces that have not been successfully published or have been published less than the number of machines deployed with the project.

[0064] In some embodiments, a restart may occur due to a system upgrade or failure. In this case, the created interface needs to be re-injected and published. In response to this situation, the electronic device 110 can periodically check the publishing status of all interfaces to determine which interfaces have not been successfully published for some reason, or the number of publications is less than the number of machines deployed in the project.

[0065] In block 322 , for the interface that is determined to have not been successfully published or has been published less than the number of machines to which the project is deployed, the electronic device 110 may re-execute the publishing operation.

[0066] In the disclosed embodiment, the electronic device 110 can periodically perform an interface check operation. Through such check and re-publish operations, it can be ensured that all deployed machines can obtain the latest interface information, and problems in the interface creation and calling process can be discovered and solved in a timely manner, thereby improving the stability and reliability of the system. In addition, such check and re-publish operations reduce the impact of system failures on the business, and improve the operating efficiency and business continuity of the system.

[0067] Figure 4 A block diagram of a device 400 for creating an interface according to some embodiments of the present disclosure is shown. The device 400 may be implemented as or included in the electronic device 110.

[0068] The device 400 includes a receiving module 410, which is configured to receive interface configuration information for a database, the interface configuration information is information written by a user through a page for configuring interface creation, and the interface configuration information includes query statements and parameter information; a creation module 420, which is configured to create an interface for a database based on the interface configuration information; a function module 430, which is configured to determine the custom function of the interface based on the parameter information; and a publishing module 440, which is configured to publish the created interface to provide the interface to the user for calling.

[0069] In some embodiments, the apparatus 400 further includes a parsing module 450, which is configured to parse the query statement to determine the data source; and perform a verification operation on the data source based on the parsing result of the query statement.

[0070] In some embodiments, the creation module 420 is further configured to create a class object based on the interface configuration information; and register the class object as a callable interface.

[0071] In some embodiments, the creation module 420 is further configured to perform an operation of binding with a uniform resource identifier path on the interface to perform routing request and distribution of the interface.

[0072] In some embodiments, the custom function includes at least one of the following: interface current limiting, permission verification, and exception handling.

[0073] In some embodiments, the parameter information includes at least one of the following: interface current limiting parameters, interface permission information, and exception handling information, and wherein based on the parameter information, determining the custom function of the interface includes at least one of the following: based on the interface current limiting parameters, controlling the access rate of the interface; based on the interface permission information, performing permission verification operations on the interface to determine the accessibility of the interface to the authorized user; based on the exception handling information, handling abnormal operations of the interface and returning error information.

[0074] In some embodiments, the device 400 also includes an inspection module 460, which is configured to perform a periodic inspection operation on the interface to determine the interface that has not been successfully published or the number of publications is less than the number of machines deployed in the project; and for the interface that is determined to have not been successfully published or the number of publications is less than the number of machines deployed in the project, re-execute the publishing operation.

[0075] The modules included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0076] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 500 may be implemented as or included in Figure 1 Electronic device 110 or Figure 4 In the device 400.

[0077] like Figure 5As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.

[0078] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 500.

[0079] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0080] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0081] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0082] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0083] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0084] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0085] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0086] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0087] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the implementations disclosed herein.

Claims

1. A method for creating an interface, comprising: Receiving interface configuration information for a database, wherein the interface configuration information is information written by a user through a page for configuring interface creation, and the interface configuration information includes query statements and parameter information; Based on the interface configuration information, create an interface for the database; Based on the parameter information, determining a custom function of the interface; as well as The created interface is published to provide the interface for users to call.

2. The method according to claim 1, further comprising: Parsing the query statement to determine the data source; as well as Based on the parsing result of the query statement, a verification operation is performed on the data source.

3. The method according to claim 1, wherein the step of creating an interface to the database based on the interface configuration information comprises: Creating a class object based on the interface configuration information; as well as Registers the class object as a callable interface.

4. The method according to claim 3, wherein based on the interface configuration information, creating an interface to the database further comprises: An operation bound to a uniform resource identifier path is performed on the interface to perform routing requests and distribution of the interface.

5. The method according to claim 1, wherein the custom function includes at least one of the following: interface current limiting, permission verification, and exception handling.

6. The method according to claim 5, wherein the parameter information includes at least one of the following: interface current limiting parameters, interface permission information, and exception handling information, and wherein determining the custom function of the interface based on the parameter information includes at least one of the following: Based on the interface current limiting parameter, controlling the access rate of the interface; Based on the interface permission information, performing a permission verification operation on the interface to determine accessibility of the interface to the authorized user; Based on the exception handling information, the abnormal operation of the interface is handled and error information is returned.

7. The method according to claim 1, further comprising: Performing a periodic check operation on the interface to determine interfaces that have not been successfully published or have been published less than the number of machines deployed in the project; as well as For the interface determined to be unsuccessfully published or published a number of times less than the number of machines deployed in the project, the publishing operation is re-executed.

8. An interface creation device, comprising: A receiving module is configured to receive interface configuration information for a database, wherein the interface configuration information is information written by a user through a page for configuring interface creation, and the interface configuration information includes a query statement and parameter information; A creation module, configured to create an interface for the database based on the interface configuration information; A function module, configured to determine a custom function of the interface based on the parameter information; as well as The publishing module is configured to publish the created interface to provide the interface for users to call.

9. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 7 when executed by the at least one processing unit.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 7.