Interface release management method and device, medium and equipment

By providing interface creation and configuration pages, users can quickly configure and publish API interfaces, solving the inefficiency problem caused by the cumbersome interface development process and achieving fast and efficient interface development and management.

CN119415137AInactive Publication Date: 2025-02-11SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411405397.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The development process of traditional API interfaces is cumbersome, resulting in low development efficiency and cannot meet the rapid needs of innovative applications on the business side.

Method used

Provides interface creation page and configuration page. Users can fill in the interface name and access path, and configure database, query conditions and security verification policies. The query statement template generated by the gateway call or custom statement template is published as the access interface of the database.

Benefits of technology

It realizes rapid configuration and release of API interfaces, reduces dependence on professionals, improves interface development efficiency, and simplifies later interface management and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415137A_ABST
    Figure CN119415137A_ABST
Patent Text Reader

Abstract

The invention provides an interface release management method and device, a medium and equipment. The method comprises the following steps: providing an interface creation page, so that a user fills in an interface name and an access path of a to-be-created interface on the interface creation page; judging whether the to-be-created interface exists or not; if the to-be-created interface does not exist, providing a configuration page, so that a user configures a database butted with the to-be-created interface on the configuration page, and configures query conditions or customizes a query statement template; obtaining table information and field information of the database; a security verification configuration page is provided, so that a user selects whether security verification is started or not and configures a desensitization rule and a security strategy under the condition that the security verification is selected to be started; generating a corresponding query statement template; and issuing the generated query statement template or the user-defined query statement template configured by the user as an access interface of the database by calling a gateway. According to the invention, the interface publishing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of application interface technology, and in particular to an interface publishing management method, device, medium and equipment. Background Art

[0002] API economy is a new economic phenomenon in the information networking era. It is the main driving force for digital transformation in various industries (such as retail, finance, Internet of Things, and medical care). It helps to establish a unified data service center for enterprises and meet the needs of enterprises for static data interfacing and unified service management. By opening and using APIs, enterprises can strengthen collaboration and integration with their partners, expand enterprise service scenarios, and promote the transformation and upgrading of their own business models.

[0003] Traditionally, the development process of an ordinary API interface is long and cumbersome. After going through multiple links, the online cycle of an interface may be several days or at least weeks. This time limit is far from enough to support innovative applications on the business side, that is, the interface development efficiency is low. Summary of the invention

[0004] In view of at least one of the above technical problems, an embodiment of the present invention provides an interface publishing management method, device, medium, and equipment.

[0005] According to a first aspect, an interface publishing management method provided by an embodiment of the present invention includes:

[0006] Providing an interface creation page so that the user can fill in the interface name and access path of the interface to be created on the interface creation page;

[0007] According to the interface name and the access path, determining whether the interface to be created already exists;

[0008] If it does not exist, a configuration page is provided so that the user can configure the database to be connected to the interface to be created on the configuration page, and configure query conditions or a custom query statement template;

[0009] Obtaining table information and field information of the database;

[0010] Provide a security verification configuration page to allow users to choose whether to enable security verification and configure desensitization rules and security policies if they choose to enable security verification;

[0011] If the user chooses not to enable security verification, a corresponding query statement template is generated according to the type of the database, the query conditions, the table information, and the field information; if the user chooses to enable security verification, a corresponding query statement template is generated according to the type of the database, the query conditions, the table information, the field information, the desensitization rules, and the security policy;

[0012] The generated query statement template or the user-defined query statement template configured by the user is published as an access interface of the database by calling a gateway.

[0013] In one embodiment, the method further comprises:

[0014] Obtain the request received by the access interface through the filter, and save the request related information corresponding to the request; wherein the request related information includes request parameters, return content, response code, request flow, request start time and response return time;

[0015] According to the request related information of each request received by the access interface within the preset time period, statistics are collected on the success and failure of the access interface within the preset time period;

[0016] According to the failure situation and the success situation, the configuration information of the access interface is adjusted.

[0017] In one embodiment, the method further comprises:

[0018] The access interface is protected by at least one of a flow control management strategy, an access control strategy, and a fuse management strategy.

[0019] In one embodiment, the protecting the access interface by at least one of a flow control management strategy, an access control strategy, and a fuse management strategy includes:

[0020] Creating a flow control management strategy; wherein the flow control management strategy includes limiting the number of accesses per unit time;

[0021] The flow control management strategy is bound to the access interface so that the gateway controls the number of requests received by the access interface according to the flow control management strategy.

[0022] In one embodiment, the protecting the access interface by at least one of a flow control management strategy, an access control strategy, and a fuse management strategy includes:

[0023] Creating an access control policy; wherein the access control policy includes a whitelist formed by the IP addresses of requests that are allowed to access and a blacklist formed by the IP addresses of requests that are not allowed to access;

[0024] The access control policy is bound to the access interface so that the gateway forwards requests corresponding to the IP addresses in the white list and rejects requests corresponding to the IP addresses in the black list according to the access control policy.

[0025] In one embodiment, the protecting the access interface by at least one of a flow control management strategy, an access control strategy, and a fuse management strategy includes:

[0026] Create a circuit breaker management strategy, wherein the circuit breaker management strategy includes a window duration, a number threshold, a circuit breaker duration, an error code, and a return content when the circuit breaker is tripped;

[0027] Bind the fuse management policy to the access interface so that the gateway determines, based on the fuse management policy, whether the number of times the access interface returns the error code within the window duration exceeds the number threshold. If so, return the return content and control the access interface not to receive requests.

[0028] In one embodiment, the method further comprises at least one of the following:

[0029] Exporting the interface document corresponding to the access interface so that the user can access the access interface according to the interface document;

[0030] For the APP that needs to call the access interface, generate a corresponding application ID and application key; bind the access interface to the application ID and the application key, so that when the gateway receives a request sent by the APP with the application ID, it verifies the identity of the APP through the application key and forwards the request that passes the identity verification to the access interface.

[0031] According to a second aspect, an interface publishing management device provided by an embodiment of the present invention includes:

[0032] A first providing module is used to provide an interface creation page, so that the user can fill in the interface name and access path of the interface to be created on the interface creation page;

[0033] A first judgment module, used for judging whether the interface to be created already exists according to the interface name and the access path;

[0034] The second providing module is used to provide a configuration page if it does not exist, so that the user can configure the database to be connected to the interface to be created on the configuration page, and configure the query conditions or customize the query statement template;

[0035] A first acquisition module, used to acquire table information and field information of the database;

[0036] The third providing module is used to provide a security verification configuration page, so that the user can choose whether to turn on the security verification and configure the desensitization rules and security policies when the security verification is turned on;

[0037] A statement splicing module, for generating a corresponding query statement template according to the type of the database, the query conditions, the table information and the field information when the user chooses not to enable security verification; for generating a corresponding query statement template according to the type of the database, the query conditions, the table information, the field information, the desensitization rules and the security policy when the user chooses to enable security verification;

[0038] The interface publishing module is used to publish the generated query statement template or the user-configured custom query statement template as an access interface of the database by calling a gateway.

[0039] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.

[0040] According to a fourth aspect, an embodiment of the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.

[0041] The interface publishing management method, device, medium, and equipment provided by the embodiment of the present invention, the user fills in the interface name and access path of the interface to be created on the interface creation page, and then determines whether the interface to be created already exists based on the interface name and the access path. If it does not exist, the user can configure the database to be connected to the interface to be created on the configuration page, and configure the query conditions or custom query statement templates, select whether to turn on the security check on the security check configuration page, and configure the desensitization rules and security policies when the security check is turned on. Based on the configuration information on the page and the table information and field information obtained, a query statement template can be formed, so that the generated query statement template or the user-configured custom query statement template is published as the access interface of the database. So far, the release of the access interface is realized. It can be seen that since there is no need to write code, whether it is a developer, an operation and maintenance personnel, or even a business personnel, can perform relevant configurations on the page according to the needs, so as to realize the configuration of the interface and thus publish it, which is convenient and fast, reduces the requirements for manpower, saves costs, and improves the efficiency of interface publishing. The access interface published in this way is very convenient for later management and maintenance, and there is no need to modify the code. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A flowchart of an interface publishing management method according to an embodiment of the present invention;

[0043] Figure 2 A flowchart of an interface publishing management method according to an embodiment of the present invention;

[0044] Figure 3 It is a structural block diagram of an interface publishing management device in one embodiment of the present invention. DETAILED DESCRIPTION

[0045] In enterprises, interfaces provide standardized data exchange formats and methods, allowing different software applications to be seamlessly integrated, thereby promoting the efficient flow and use of data. This not only reduces the phenomenon of data silos, but also improves the efficiency and accuracy of data processing. The use of interfaces is ubiquitous. That is, through the interaction of interfaces, information is no longer isolated, and the value of each data can be brought into play, improving business efficiency and promoting decision-making.

[0046] As the role of data in enterprises increases, data sharing also plays an important role. Therefore, the number of enterprise output interfaces will increase, and it becomes very important to efficiently and uniformly publish interfaces, manage interfaces, and monitor interfaces.

[0047] To this end, in a first aspect, an embodiment of the present invention provides an interface publishing management method, see Figure 1 and Figure 2 The method comprises the following steps S110 to S170:

[0048] S110, providing an interface creation page, so that the user can fill in the interface name and access path of the interface to be created on the interface creation page;

[0049] That is to say, the front end provides an interface creation page so that the user can define the interface name and access path of the interface to be created on the page.

[0050] S120, judging whether the interface to be created already exists according to the interface name and the access path;

[0051] That is, for repeated creation of an interface, it is necessary to determine whether an interface having the interface name and the access path already exists. If it already exists, then subsequent steps do not need to be performed. Only if it does not exist, then subsequent steps are performed.

[0052] S130. If it does not exist, provide a configuration page so that the user can configure the database to be connected to the interface to be created on the configuration page, and configure query conditions or a custom query statement template;

[0053] That is to say, the front end provides a configuration page on which users can configure the database to be connected to the interface to be created. Among them, the types of alternative databases can include MySQL, Oracle, SQLServer, Greenplum, PostgreSQL, Elasticsearch, DAMO, and many other types. In addition to configuring the database, you can also configure query conditions, such as filter conditions, association conditions, request parameters, etc. Of course, for some complex query situations, users can configure custom query statement templates to achieve personalized customization.

[0054] S140, obtaining table information and field information of the database;

[0055] That is, the table information and field information of the database configured in S130 are obtained, that is, the information of the data tables contained in the database and the information of the fields contained in the data tables. The subsequent query scope of the user when performing data query can only be the data corresponding to these fields in these data tables.

[0056] S150, providing a security verification configuration page, so that the user can choose whether to enable security verification and configure desensitization rules and security policies when the security verification is enabled;

[0057] That is, the front end provides a security verification configuration page so that users can choose whether to enable security verification. When users choose to enable security verification, they also need to configure desensitization rules and security policies.

[0058] Among them, desensitization rules refer to the rules for desensitizing sensitive data. For example, the data in the sensitive field of ID card number is replaced.

[0059] The security policy refers to a policy for protecting data, especially data of high importance, such as an encryption policy.

[0060] S160. If the user chooses not to enable security verification, a corresponding query statement template is generated according to the type of the database, the query condition, the table information, and the field information; if the user chooses to enable security verification, a corresponding query statement template is generated according to the type of the database, the query condition, the table information, the field information, the desensitization rule, and the security policy;

[0061] That is, if the user chooses not to enable security verification, the query conditions, the table information, and the field information can be spliced ​​into a query statement template based on the type of database. If the user chooses to enable security verification, the query conditions, the table information, the field information, the desensitization rules, and the security policy need to be spliced ​​into a query statement template based on the type of database.

[0062] It can be seen that the concatenated query statement template can be obtained through S160.

[0063] In actual scenarios, before splicing, to ensure the uniqueness of the interface, you can also verify whether the interface already exists, and check the information in the filter conditions, such as request parameters, whether they are legal, etc. If it does not exist and the filter conditions are legal, then splicing is performed.

[0064] S170: Publishing the generated query statement template or the user-defined query statement template configured by the user as an access interface of the database by calling a gateway.

[0065] It can be seen that the gateway is called to publish the access interface to the outside world, thereby completing the release of the access interface. The gateway can be a self-developed gateway or an open source gateway. After the access interface is released, the access interface can be debugged and accessed. The access interface can only be edited, deleted, and other operations after it is offline.

[0066] In one embodiment, the method may further include:

[0067] Obtain the request received by the access interface through the filter, and save the request related information corresponding to the request; wherein the request related information includes request parameters, return content, response code, request flow, request start time and response return time;

[0068] According to the request related information of each request received by the access interface within the preset time period, statistics are collected on the success and failure of the access interface within the preset time period;

[0069] According to the failure situation and the success situation, the configuration information of the access interface is adjusted.

[0070] It can be seen that all requests received by the access interface are obtained through a filter, and the request parameters, return content, response code, request traffic, request start time, response return time, etc. in the request are saved. Then, statistical analysis is performed based on the saved request-related information to obtain the number of successful and failed accesses to the access interface, and then the configuration information of the access interface is adjusted to achieve further optimization of the access interface.

[0071] In one embodiment, the method may further include:

[0072] The access interface is protected by at least one of a flow control management strategy, an access control strategy, and a fuse management strategy.

[0073] It is understandable that at least one strategy is used to protect the backend service of the access interface, thereby improving the stability of the access interface and the user experience.

[0074] Further, the protecting the access interface by using at least one of a flow control management strategy, an access control strategy, and a fuse management strategy may include:

[0075] 11. Create a flow control management strategy; wherein the flow control management strategy includes a limit on the number of accesses per unit time;

[0076] 12. Bind the flow control management policy to the access interface so that the gateway controls the number of requests received by the access interface according to the flow control management policy.

[0077] It can be seen that the flow control management strategy, for example, limits the number of visits per unit time at four levels: seconds, minutes, hours, and days. The flow control management strategy is bound to the API, so that the flow control management strategy and the API have a corresponding association. When accessing the API, the gateway will make a judgment based on the configured API and the bound flow control management strategy. If the number of visits to the API per unit time exceeds the set access limit, access to the API is not allowed. If it does not exceed, access to the API is allowed.

[0078] Further, the protecting the access interface by using at least one of a flow control management strategy, an access control strategy, and a fuse management strategy may include:

[0079] 21. Create an access control policy; wherein the access control policy includes a whitelist formed by the IP addresses of requests that are allowed to access and a blacklist formed by the IP addresses of requests that are not allowed to access;

[0080] 22. Bind the access control policy to the access interface so that the gateway forwards requests corresponding to the IP addresses in the whitelist and rejects requests corresponding to the IP addresses in the blacklist according to the access control policy.

[0081] As can be seen, the access control policy includes a whitelist of IP addresses that are allowed to access and a blacklist of IP addresses that are prohibited to access. Each IP address in the list is separated by ";". Bind the API and the access control policy. When there is a request to access the API, the gateway will make a judgment based on the configured API and the bound access control policy, and allow the request from the IP address in the whitelist to access the API. For requests from IP addresses in the blacklist, the information that access to the API is not allowed is directly returned.

[0082] In one embodiment, the protecting the access interface by using at least one of a flow control management strategy, an access control strategy, and a fuse management strategy may include:

[0083] 31. Create a circuit breaker management strategy, wherein the circuit breaker management strategy includes window duration, number threshold, circuit breaker duration, error code, and return content when the circuit breaker is tripped;

[0084] 32. Bind the fuse management policy to the access interface so that the gateway determines, based on the fuse management policy, whether the number of times the access interface returns the error code within the window duration exceeds the number threshold. If so, returns the return content and controls the access interface not to receive requests.

[0085] It can be seen that the window duration, number threshold, fuse duration, error code, and return content when the fuse is blown are set in the fuse management policy. Bind the API to the fuse management policy. When accessing the API, the gateway will make a judgment based on the configured API and the bound fuse management policy. If the error code returned by the API exceeds the number threshold within the window duration, the above return content will be returned and the API will no longer be requested. Otherwise, it will be forwarded to the interface for access. Requests to the API within the fuse duration are returned directly until the API is repaired.

[0086] In one embodiment, the method may further include:

[0087] The interface document corresponding to the access interface is exported so that the user can access the access interface according to the interface document.

[0088] It is understandable that the traditional interface management method is online interface documents, document circulation relies on word of mouth, and different development document standards are not unified. The embodiment of the present invention can export the interface document of the access interface, and the interface document can help users guide the quick access to the access interface.

[0089] In one embodiment, the method may further include:

[0090] For the APP that needs to call the access interface, generate a corresponding application ID and application key; bind the access interface to the application ID and the application key, so that when the gateway receives a request sent by the APP with the application ID, it verifies the identity of the APP through the application key and forwards the request that passes the identity verification to the access interface.

[0091] That is, if an APP wants to access the API, it needs to generate the APP's application ID and application key, and bind the application ID and application key to the API, so that the APP can call the API. When the gateway receives a request from the APP, it will verify the identity of the APP based on the application key. Only after the identity verification is passed will the request of the APP be forwarded to the API.

[0092] It can be seen that by authenticating the APP, user identification and protection of the API can be achieved.

[0093] It is understandable that binding the APP's application ID and application key to the API is actually a form of APP authentication. Whether to choose authentication can be configured in the interface creation page, which supports two modes: no authentication and APP authentication. When no authentication is selected, it is not necessary to bind the APP's application ID and application key to the API, so there is no need to verify the identity of the APP. If APP authentication is selected, the APP's application ID and application key need to be bound to the API, so that the identity of the APP is verified when it is accessed.

[0094] It is understandable that the method provided based on the embodiment of the present invention helps to achieve one-stop management of the entire life cycle of the API, including the creation, editing, publishing, authorization, debugging, and offline of the API.

[0095] In summary, the embodiment of the present invention can quickly complete the configuration of the access interface through visual configuration, and then publish and launch it, etc., and the development efficiency is improved by at least 50%. In the prior art, professional R&D personnel are required, but through the embodiment of the present invention, whether it is a developer, operation and maintenance personnel, or even a business personnel, they can complete the configuration and launch of the interface according to the wizard prompts, which is convenient and fast, reduces the requirements for manpower, and saves costs. At the same time, it supports multiple types of data sources for users to choose. In other words, even if you are not a developer, you can easily publish an API, and the efficiency is qualitatively improved in terms of both interface development time and later interface management and maintenance.

[0096] In a second aspect, an embodiment of the present invention provides an interface publishing management device, see Figure 3 , the device 100 comprises:

[0097] The first providing module 110 is used to provide an interface creation page, so that the user can fill in the interface name and access path of the interface to be created on the interface creation page;

[0098] A first judgment module 120, used to judge whether the interface to be created already exists according to the interface name and the access path;

[0099] The second providing module 130 is used to provide a configuration page if it does not exist, so that the user can configure the database to be connected to the interface to be created on the configuration page, and configure the query conditions or customize the query statement template;

[0100] A first acquisition module 140 is used to acquire table information and field information of the database;

[0101] The third providing module 150 is used to provide a security verification configuration page, so that the user can choose whether to enable security verification and configure desensitization rules and security policies when the security verification is enabled;

[0102] The statement splicing module 160 is used to generate a corresponding query statement template according to the type of the database, the query condition, the table information and the field information when the user chooses not to enable security verification; and to generate a corresponding query statement template according to the type of the database, the query condition, the table information, the field information, the desensitization rule and the security policy when the user chooses to enable security verification;

[0103] The interface publishing module 170 is used to publish the generated query statement template or the user-defined query statement template configured by the user as an access interface of the database by calling a gateway.

[0104] In one embodiment, the device may further include:

[0105] The interface optimization module is used to obtain the requests received by the access interface through a filter, and save the request-related information corresponding to the request; wherein the request-related information includes request parameters, return content, response code, request traffic, request start time and response return time; based on the request-related information of each request received by the access interface within a preset time period, statistics are made on the success and failure situations of the access interface within the preset time period; based on the failure situation and the success situation, the configuration information of the access interface is adjusted.

[0106] In one embodiment, the device may further include:

[0107] The interface protection module is used to protect the access interface through at least one of a flow control management strategy, an access control strategy and a fuse management strategy.

[0108] In one embodiment, the interface protection module includes:

[0109] The first protection unit is used to create a flow control management strategy; wherein the flow control management strategy includes a limited number of accesses per unit time; and the flow control management strategy is bound to the access interface so that the gateway controls the number of requests received by the access interface according to the flow control management strategy.

[0110] In one embodiment, the interface protection module includes:

[0111] The second protection unit is used to create an access control policy; wherein the access control policy includes a white list formed by the IP addresses of requests that are allowed to access and a black list formed by the IP addresses of requests that are not allowed to access; the access control policy is bound to the access interface so that the gateway forwards requests corresponding to the IP addresses in the white list and rejects requests corresponding to the IP addresses in the black list according to the access control policy.

[0112] In one embodiment, the interface protection module includes:

[0113] The third protection unit is used to create a fuse management policy, wherein the fuse management policy includes a window duration, a number threshold, a fuse duration, an error code, and return content when the fuse is blown; the fuse management policy is bound to the access interface so that the gateway determines, according to the fuse management policy, whether the number of times the access interface returns the error code within the window duration exceeds the number threshold, and if so, returns the return content and controls the access interface not to receive requests.

[0114] In one embodiment, the device may further include:

[0115] The document export module is used to export the interface document corresponding to the access interface so that the user can access the access interface according to the interface document.

[0116] In one embodiment, the device may further include:

[0117] The identity authentication module is used to generate a corresponding application ID and application key for the APP that needs to call the access interface; bind the access interface with the application ID and the application key, so that when the gateway receives a request sent by the APP with the application ID, it verifies the identity of the APP through the application key and forwards the request after identity verification to the access interface.

[0118] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0119] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0120] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0121] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0122] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0123] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0124] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0125] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0126] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.

[0127] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0128] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0129] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0130] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. An interface publishing management method, characterized in that: include: Providing an interface creation page so that the user can fill in the interface name and access path of the interface to be created on the interface creation page; According to the interface name and the access path, determining whether the interface to be created already exists; If it does not exist, a configuration page is provided so that the user can configure the database to be connected to the interface to be created on the configuration page, and configure query conditions or a custom query statement template; Obtaining table information and field information of the database; Provide a security verification configuration page to allow users to choose whether to enable security verification and configure desensitization rules and security policies if they choose to enable security verification; If the user chooses not to enable security verification, a corresponding query statement template is generated according to the type of the database, the query condition, the table information, and the field information; When the user chooses to enable security verification, a corresponding query statement template is generated according to the type of the database, the query condition, the table information, the field information, the desensitization rule and the security policy; The generated query statement template or the user-defined query statement template configured by the user is published as an access interface of the database by calling a gateway.

2. The method according to claim 1, characterized in that Also includes: Obtain the request received by the access interface through the filter, and save the request related information corresponding to the request; wherein the request related information includes request parameters, return content, response code, request flow, request start time and response return time; According to the request related information of each request received by the access interface within the preset time period, statistics are collected on the success and failure of the access interface within the preset time period; According to the failure situation and the success situation, the configuration information of the access interface is adjusted.

3. The method according to claim 1, characterized in that Also includes: The access interface is protected by at least one of a flow control management strategy, an access control strategy, and a fuse management strategy.

4. The method according to claim 3, characterized in that: The protecting process of the access interface by using at least one of a flow control management strategy, an access control strategy, and a fuse management strategy includes: Creating a flow control management strategy; wherein the flow control management strategy includes limiting the number of accesses per unit time; The flow control management strategy is bound to the access interface so that the gateway controls the number of requests received by the access interface according to the flow control management strategy.

5. The method according to claim 3, characterized in that: The protecting process of the access interface by using at least one of a flow control management strategy, an access control strategy, and a fuse management strategy includes: Creating an access control policy; wherein the access control policy includes a whitelist formed by the IP addresses of requests that are allowed to access and a blacklist formed by the IP addresses of requests that are not allowed to access; The access control policy is bound to the access interface so that the gateway forwards requests corresponding to the IP addresses in the white list and rejects requests corresponding to the IP addresses in the black list according to the access control policy.

6. The method according to claim 3, characterized in that The protecting process of the access interface by using at least one of a flow control management strategy, an access control strategy, and a fuse management strategy includes: Create a circuit breaker management strategy, wherein the circuit breaker management strategy includes a window duration, a number threshold, a circuit breaker duration, an error code, and a return content when the circuit breaker is tripped; Bind the fuse management policy to the access interface so that the gateway determines, based on the fuse management policy, whether the number of times the access interface returns the error code within the window duration exceeds the number threshold. If so, return the return content and control the access interface not to receive requests.

7. The method according to claim 1, characterized in that Also includes at least one of the following: Exporting the interface document corresponding to the access interface so that the user can access the access interface according to the interface document; Generate a corresponding application ID and application key for the APP that needs to call the access interface; The access interface is bound to the application ID and the application key, so that when the gateway receives a request sent by the APP with the application ID, it verifies the identity of the APP through the application key and forwards the request after identity verification to the access interface.

8. An interface publishing management device, characterized in that: include: A first providing module is used to provide an interface creation page, so that the user can fill in the interface name and access path of the interface to be created on the interface creation page; A first judgment module, used for judging whether the interface to be created already exists according to the interface name and the access path; The second providing module is used to provide a configuration page if it does not exist, so that the user can configure the database to be connected to the interface to be created on the configuration page, and configure the query conditions or customize the query statement template; A first acquisition module, used to acquire table information and field information of the database; The third providing module is used to provide a security verification configuration page, so that the user can choose whether to turn on the security verification and configure the desensitization rules and security policies when the security verification is turned on; A statement splicing module, used to generate a corresponding query statement template according to the type of the database, the query condition, the table information and the field information when the user chooses not to enable security verification; When the user chooses to enable security verification, a corresponding query statement template is generated according to the type of the database, the query condition, the table information, the field information, the desensitization rule and the security policy; The interface publishing module is used to publish the generated query statement template or the user-configured custom query statement template as an access interface of the database by calling a gateway.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, system and device for quickly generating interface

    CN112131294A

  • HTTP interface gateway, communication system and communication method

    CN113595991A

  • Method and device for index data query based on page configuration

    CN115481140A

  • Data query method and device and computer readable storage medium

    CN116991872A

  • Automated query file conversions upon switching database-access applications

    US20040249792A1