CN112653618A - Gateway registration method and device of micro-service application API endpoint - Google Patents

Gateway registration method and device of micro-service application API endpoint Download PDF

Info

Publication number
CN112653618A
CN112653618A CN202011419586.7A CN202011419586A CN112653618A CN 112653618 A CN112653618 A CN 112653618A CN 202011419586 A CN202011419586 A CN 202011419586A CN 112653618 A CN112653618 A CN 112653618A
Authority
CN
China
Prior art keywords
api
application
micro
service
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011419586.7A
Other languages
Chinese (zh)
Other versions
CN112653618B (en
Inventor
万哲韬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Vispractice Technology Co ltd
Original Assignee
Shenzhen Vispractice Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Vispractice Technology Co ltd filed Critical Shenzhen Vispractice Technology Co ltd
Priority to CN202011419586.7A priority Critical patent/CN112653618B/en
Publication of CN112653618A publication Critical patent/CN112653618A/en
Application granted granted Critical
Publication of CN112653618B publication Critical patent/CN112653618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a gateway registration method and a gateway registration device for an API (application program interface) endpoint of micro-service application, wherein the method comprises the following steps: acquiring a target micro-service application file corresponding to the micro-service application to be registered; analyzing application service port information corresponding to the target micro-service application file and API calling information corresponding to each API endpoint; and executing gateway registration operation on each API endpoint of the target micro-service application file based on the acquired application service port information and the API calling information. Therefore, automatic proxy of the gateway for each API endpoint in the micro-service application is realized, and fine management for different API endpoints is facilitated.

Description

Gateway registration method and device of micro-service application API endpoint
Technical Field
The application belongs to the technical field of communication equipment, and particularly relates to a gateway registration method and device for a micro-service application API endpoint.
Background
Under the micro-service architecture, an Application Programming Interface (API) gateway encapsulates the internal architecture of the system, and can provide a customized API for each client. The API gateway is responsible for service request routing, combining and protocol conversion, and all requests of the client first pass through the API gateway, and then it routes the requests to the appropriate micro-services to implement functions such as authentication, monitoring, load balancing, caching, request fragmentation and management, static response processing, etc.
At present, more and more enterprises are transforming to the micro service architecture, which has the following characteristics: 1) application partitioning into finer lines results in a large increase in the number of interface services. 2) Most microservice application-to-application integration employs REST style protocols. 3) Integration is the most important technology in the micro-service application related technology, and the micro-service can be maintained as autonomy, independently modified and released by a proper integration technology. 4) The API gateway and the API gateway management platform under the micro-service architecture are responsible for ensuring the safety, high efficiency, traceability and manageability of integration between micro-service applications.
However, in the transformation process of the micro service architecture, the whole micro service component is generally used as a service proxy to the gateway, and a plurality of API endpoints may exist in the micro service component, which is not favorable for the fine management of a single API endpoint in the micro service component, for example, it is difficult to distinguish the security authentication mechanism of a single API endpoint.
In view of the above problems, no better solution is available in the industry.
Disclosure of Invention
In view of this, embodiments of the present application provide a gateway registration method and an apparatus for API endpoints of a micro service application, so as to at least solve the problem that a gateway in the prior art cannot implement fine management for each API endpoint in the micro service application.
A first aspect of an embodiment of the present application provides a gateway registration method for an API endpoint of a micro service application, which is applied to a gateway controller, where the micro service application has multiple API endpoints, and the method includes: acquiring a target micro-service application file corresponding to the micro-service application to be registered; analyzing application service port information corresponding to the target micro-service application file and API calling information corresponding to each API endpoint; and executing gateway registration operation on each API endpoint of the target micro-service application file based on the acquired application service port information and the API calling information.
A second aspect of the embodiments of the present application provides a gateway registration apparatus for API endpoints of a micro service application, where the micro service application has a plurality of API endpoints, the apparatus includes: the file acquisition unit is configured to acquire a target micro-service application file corresponding to the micro-service application to be registered; the information analysis unit is configured to analyze application service port information corresponding to the target micro-service application file and API calling information corresponding to each API endpoint; and the gateway registration unit is configured to execute gateway registration operation on each API endpoint of the target micro-service application file based on the acquired application service port information and the API calling information.
A third aspect of embodiments of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the steps of the method as described above.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on a mobile terminal, causes the mobile terminal to implement the steps of the method as described above.
Compared with the prior art, the embodiment of the application has the advantages that:
according to the embodiment of the application, the gateway controller can acquire the target micro-service application file corresponding to the micro-service application to be registered, and analyze the corresponding application service port information and API call information from the file, so that gateway registration operation can be executed for each corresponding API endpoint. Therefore, the gateway controller can register the API endpoint in the micro service application to the gateway by using the micro service application file when the gateway deploys the micro service application, so that the gateway can automatically proxy each API endpoint in the micro service application, and the fine management operation aiming at different API endpoints is conveniently implemented.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart illustrating an example of a gateway registration method for a microservice application API endpoint according to an embodiment of the present application;
FIG. 2 illustrates a flow diagram of one example of obtaining a target microservice application file in accordance with an embodiment of the present application;
FIG. 3 illustrates a flow diagram of one example of determining a target microservice application file in accordance with an embodiment of the present application;
FIG. 4 illustrates a user interface diagram of a client selecting an example of microservice application information, according to an embodiment of the present application;
FIG. 5 illustrates a user interface diagram of a client for an example of a business service listing for a microservice application in accordance with an embodiment of the present application;
FIG. 6 illustrates a flow diagram of an example of API endpoint configuration for a gateway in accordance with an embodiment of the present application;
FIG. 7 is a flowchart illustrating an example of a gateway registration method for a microservice application API endpoint according to an embodiment of the present application;
FIG. 8 is a block diagram illustrating an example of a gateway registration apparatus for a microservice application API endpoint according to an embodiment of the present application;
fig. 9 is a schematic diagram of an example of a mobile terminal according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the mobile terminals described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the devices described above are not portable communication devices, but are computers having touch-sensitive surfaces (e.g., touch screen displays).
In the discussion that follows, a mobile terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
Various applications that may be executed on the mobile terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
Fig. 1 is a flowchart illustrating an example of a gateway registration method for an API endpoint of a microservice application according to an embodiment of the present application. As for the execution subject of the method embodiment of the present application, it may be a gateway controller provided in a gateway device (e.g., Kong).
Here, the micro service application has a plurality of API endpoints and needs to register each API endpoint in the gateway, and if the micro service application is many and the number of API endpoints in a single micro service application is huge, it will inevitably cause a considerable gateway service agent work.
It should be noted that, in the related art, after the conventional micro service application gateway completes deployment, the entire micro service application can be proxied and routed through the gateway, and although the operation is simple, the granularity of micro service management performed by the gateway becomes coarse. Illustratively, there are 3 endpoints in a microservice application: the gateway can only realize proxy and routing of the http:// IP: port/api-002 and http:// IP: port/api-003, and cannot support the endpoints api-001, api-002 and api-003 to respectively realize different gateway security authentication mechanisms (such as IP authentication, Oauth2.0, username and password authentication and the like).
In some cases, it may be considered to change the way in which the gateway proxies the entire microservice application to each endpoint in the gateway proxy microservice application, requiring the user to register at the gateway separately for each endpoint. However, if the number of micro-service applications is large and the number of API endpoints in a single micro-service application is also large, it will inevitably cause a considerable gateway service agent work.
As shown in fig. 1, in step 110, the gateway controller obtains a target microservice application file corresponding to the microservice application to be registered. Here, the micro service application file may indicate a program installation package corresponding to the micro service application.
In one example of an embodiment of the present application, a gateway controller may receive a target microservice application file from a client. In another example of the embodiment of the present application, the gateway controller may receive application information from the client and determine a corresponding target microservice application file from a specific storage space, and all of which fall within the scope of the embodiment of the present application.
In step 120, the gateway controller parses application service port information corresponding to the target microservice application file and API call information corresponding to each API endpoint. Here, the application port information may represent index or path information of the microservice application, and the API call information may represent index or path information of the API endpoint.
In step 130, the gateway controller performs a gateway registration operation on each API endpoint of the target microservice application file based on the obtained application service port information and API call information. Illustratively, the API call information may include an API call address and an API call mode, so that the gateway controller may automatically perform a gateway registration operation using the application service port information and the API call information.
According to the embodiment of the application, the gateway controller can identify the API endpoint related information in the micro-service application file and automatically perform corresponding gateway registration operation, manual configuration for each API endpoint is not needed, labor cost of micro-service architecture configuration can be reduced, and registration efficiency of the gateway API endpoint is improved. In this way, automatic proxy for different API endpoints can be realized in the gateway, and the gateway can conveniently implement fine management operation for different API endpoints. Therefore, convenience can be improved, usability can be enhanced, workload in micro-service implementation can be reduced, and management granularity and management level of a micro-service application interface can be improved.
In some examples of embodiments of the present application, the gateway controller may perform registration operations for various API endpoints in the microservice application based on a preset API registry. Specifically, the gateway controller may write the acquired call information of each API endpoint and corresponding application service port information into the API registry, and perform a gateway registration operation based on the API registry. For example, the gateway controller may detect information in the API registry in real time or periodically and perform a gateway registration operation using updated application service port information and API call information when there is an update in the information in the API registry.
Specifically, the technology of an API registry and an open interface in front of the API gateway may be adopted, the Swagger component is integrated in the micro service application, the API registry interface in front of the API gateway is automatically called when the micro service is deployed, the API endpoint in the micro service application is written into the registry, and the micro service application is classified according to the name of the micro service application. Therefore, according to the preposed API registry of the gateway, the API endpoints in the micro service application can be proxied to the gateway in a one-key mode through the operations of analyzing the address of the API registry, separating the service and the routing attribute, accessing the cyclic proxy and the like.
Fig. 2 shows a flowchart of an example of obtaining a target microservice application file according to an embodiment of the present application.
As shown in fig. 2, in step 210, the gateway controller receives user operation request information from the client. Illustratively, the user can operate the client, establish communication connection with the gateway controller and send out corresponding user operation request information.
In step 220, the gateway controller detects whether the user operation request information matches a preset registration operation rule. Here, the registration operation rule may represent an operation specification designed in advance for triggering the API endpoint registration function, for example, a user triggers the registration function for the API endpoint for an operation of setting a control.
If the detection result in step 220 indicates that the user operation request information matches the registration operation rule, it jumps to step 230. If the detection result in step 220 indicates that the user registration operation information does not match the registration operation rule, the operation is ended.
In step 230, the gateway controller sends the API registration interface profile to the client, so that the client displays the file input control based on the API registration interface profile. Illustratively, the API registration interface profile may be a web page profile, and the client may display a corresponding web page based on the API registration interface profile, and the web page may have a corresponding display file input control.
In step 240, the gateway controller receives a user interaction based on the file input control to determine a corresponding target microservice application file. Illustratively, the file input control may be a file import control, and the user imports a target microservice application file prepared in advance by interoperating the control.
Through the embodiment of the application, the user can interactively operate with the gateway to customize, register and configure the API endpoint in the gateway so as to meet personalized requirements of services.
In some examples of this embodiment, after step 240, the gateway controller may further detect whether each API endpoint corresponding to the target microservice application file is successfully registered. And if the registration of each API endpoint is successful, the gateway controller feeds back an application API successful registration notification to the client. In addition, if the first API endpoint registration in the target microservice application file fails, the gateway controller feeds back an application API failure registration notification containing information of the first API endpoint to the client. Therefore, the gateway controller can feed back the API registration result to the client, so that the gateway controller can know whether the API endpoint is successfully registered or not, and the user interaction service experience is improved. In addition, the user can quickly acquire the information of the first API endpoint which is not successfully registered, so that the user can perform gateway registration operation on the first API endpoint again by using other policies (for example, manually) in time, so as to ensure that all API endpoints in the microservice application can be registered in the gateway.
In some examples of embodiments of the present application, the file input control may represent a control corresponding to a list of micro-service applications, and fig. 3 illustrates a flowchart of one example of determining a target micro-service application file according to embodiments of the present application.
As shown in fig. 3, in step 310, the gateway controller receives a user interaction operation based on the micro-service application list corresponding to the file input control to determine corresponding target micro-service application information.
FIG. 4 illustrates a user interface diagram of a client selecting an example of microservice application information according to an embodiment of the present application.
As shown in fig. 4, the user may select each piece of application information in the micro-service application list displayed by the client, for example, by a pull-down menu selection operation, to determine corresponding target micro-service application information.
In step 320, the gateway controller determines a target microservice application file corresponding to the target application information from the microservice application file library. Here, the micro service application file repository stores micro service application files corresponding to the respective pieces of micro service application information in the micro service application list. Illustratively, each micro-service application file or installation package file corresponding to each piece of micro-service application information in the micro-service application list is pre-stored in the gateway.
Fig. 5 is a schematic diagram illustrating a user interface of a client according to an example of a business service list of a micro-service application according to an embodiment of the present application.
As shown in fig. 5, different API endpoints in the micro service application may be assigned a corresponding plurality of service addresses, and the user may also know the relevant description information configured by the corresponding API interface service, such as API creation time, host IP, and so on.
In the embodiment of the application, source code transformation is performed on the API gateway, and one-key proxy operation is performed by selecting the micro-service application name from the pre-positioned API registry, so that all API endpoints in all the API registries can automatically generate the routing service of the gateway. Assuming 100 API endpoints in a microservice application, in connection with an application scenario, it may take hours or days if manual operations are performed one by one to configure gateway proxy information. In the real-time stream of the application, the API registry can be utilized to perform one-key proxy according to the application, so that the rapid proxy of all API endpoints in the micro-service application can be completed, a large amount of time and energy of implementing personnel are saved, the problems of fine management and monitoring of the service granularity of the micro-service application are solved, and the management level of the micro-service can be optimized.
According to the embodiment of the application, a user can select a specific micro-service application from a preset micro-service application list, the corresponding micro-service application can be directly registered and installed in the local gateway based on user selection operation without a transmission process between the gateway and a client, and the registration efficiency of the micro-service application and each API endpoint can be improved. Therefore, all API endpoints in the micro-service component can be automatically registered to the API registry of the gateway when the micro-service application is deployed, and business services and routing services of the gateway can be generated by one-key agent according to the application name through the API registry.
Fig. 6 shows a flowchart of an example of API endpoint configuration for a gateway according to an embodiment of the application.
As shown in fig. 6, in step 610, the gateway controller retrieves the API personalization service configuration message. Here, the API personalization service configuration message includes target API call information and target service configuration information. Illustratively, the service configuration information may have some personalized configurations of the user for the API endpoints, such as a throttling policy, a plug-in processing policy, and a security authentication mechanism for each API endpoint, among others.
In step 620, the gateway controller determines a target API corresponding to the target API call information.
In step 630, the gateway controller performs a service configuration operation on the target API based on the target service configuration information.
In the embodiment of the application, a user can realize the personalized management process of different API endpoints in the micro service application by sending an API personalized service configuration message to the gateway controller, for example, the API endpoints 1 to 50 may use a first service policy, and the API endpoints 51 to 100 may use a second service policy. Thus, the user can perform personalized service configuration operations for different API endpoints in the microservice application.
Fig. 7 is a flowchart illustrating an example of a gateway registration method for API endpoints of microservice applications according to an embodiment of the present application.
As shown in FIG. 7, in step 710, the user adds registration service development configuration information, such as a registration address, port, username, and password of the pre-existing API registry, to the installation package of the microservice application.
In step 720, the gateway deploys the microservice application, such as a regular deployment operation or a containerized deployment operation.
In step 730, the user checks the API endpoint information in the API registry on the management platform of the gateway to see if the respective endpoint in the microservice application has been registered in the front-end library of the gateway.
In step 740, the gateway may select a single application name in the management platform of the gateway for one-touch proxy operation. Further, after completing the proxy, the user may check to see if the corresponding route and traffic service have been generated peer-to-peer in both the traffic service and the routing service of the gateway.
According to the embodiment of the application, the micro-service application is adopted for generating the rapid registration and release of the gateway proxy routing service, the management and monitoring level of the micro-service is improved, the workload required when the micro-service proxies to the gateway is greatly reduced, meanwhile, the probability of the error of the gateway proxy in the past is reduced by the full-automatic processing chain, and the implementation management level of the API endpoint aiming at the gateway is improved.
Fig. 8 is a block diagram illustrating an example of a gateway registration apparatus of an API endpoint of a micro service application according to an embodiment of the present application.
As shown in fig. 8, the gateway registration apparatus 800 of the micro service application API endpoint includes a file obtaining unit 810, an information parsing unit 820, and a gateway registration unit 830.
The file obtaining unit 810 is configured to obtain a target microservice application file corresponding to the microservice application to be registered.
The information parsing unit 820 is configured to parse application service port information corresponding to the target microservice application file and API call information corresponding to each API endpoint.
The gateway registration unit 830 is configured to perform a gateway registration operation on each API endpoint of the target microservice application file based on the acquired application service port information and API call information.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 9 is a schematic diagram of an example of a mobile terminal (or gateway device) according to an embodiment of the present application. As shown in fig. 9, the mobile terminal 900 of this embodiment includes: a processor 910, a memory 920, and a computer program 930 stored in the memory 920 and operable on the processor 910. The processor 910, when executing the computer program 930, implements the steps in the above-described gateway registration method embodiments of microservice application API endpoints, such as steps 110 to 130 shown in fig. 1. Alternatively, the processor 910, when executing the computer program 930, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the units 810 to 830 shown in fig. 8.
Illustratively, the computer program 930 may be partitioned into one or more modules/units that are stored in the memory 920 and executed by the processor 910 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program 930 in the mobile terminal 900. For example, the computer program 930 may be divided into a file acquisition program module, an information analysis program module and a gateway registration program module, and each program module has the following specific functions:
the file acquisition program module is configured to acquire a target micro-service application file corresponding to the micro-service application to be registered.
And the information analysis program module is configured to analyze the application service port information corresponding to the target micro-service application file and the API calling information corresponding to each API endpoint.
The gateway registration program module is configured to perform a gateway registration operation on each API endpoint of the target microservice application file based on the obtained application service port information and API call information.
The mobile terminal 900 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The mobile terminal may include, but is not limited to, a processor 910, a memory 920. Those skilled in the art will appreciate that fig. 9 is only an example of a mobile terminal 900 and is not intended to be limiting of the mobile terminal 900, and that it may include more or less components than those shown, or some components may be combined, or different components, for example, the mobile terminal may also include input output devices, network access devices, buses, etc.
The Processor 910 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 920 may be an internal storage unit of the mobile terminal 900, such as a hard disk or a memory of the mobile terminal 900. The memory 920 may also be an external storage device of the mobile terminal 900, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the mobile terminal 900. Further, the memory 920 may also include both internal and external memory units of the mobile terminal 900. The memory 920 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 920 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/mobile terminal and method may be implemented in other ways. For example, the above-described apparatus/mobile terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The above units can be implemented in the form of hardware, and also can be implemented in the form of software.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A gateway registration method of an API endpoint of a micro service application is applied to a gateway controller, the micro service application is provided with a plurality of API endpoints, and the method is characterized by comprising the following steps:
acquiring a target micro-service application file corresponding to the micro-service application to be registered;
analyzing application service port information corresponding to the target micro-service application file and API calling information corresponding to each API endpoint;
and executing gateway registration operation on each API endpoint of the target micro-service application file based on the acquired application service port information and the API calling information.
2. The method of claim 1, wherein performing a gateway registration operation on each API endpoint of the target microservice application file based on the obtained application service port information and API call information comprises:
writing the obtained calling information of each API endpoint and the corresponding application service port information into an API registry;
and executing gateway registration operation based on the API registry.
3. The method of claim 1, wherein the obtaining a target microservice application file corresponding to the microservice application to be registered comprises:
receiving user operation request information from a client;
detecting whether the user operation request information is matched with a preset registration operation rule or not;
when the user operation request information is matched with the registration operation rule, sending an API registration interface configuration file to the client so that the client displays a file input control based on the API registration interface configuration file;
and receiving user interaction operation based on the file input control to determine a corresponding target microservice application file.
4. The method of claim 3, wherein after performing a gateway registration operation on each API endpoint of the target microservice application file, the method further comprises:
detecting whether each API endpoint corresponding to the target micro-service application file is registered successfully or not;
if the registration of each API endpoint is successful, feeding back an application API successful registration notification to the client;
and if the first API endpoint in the target microservice application file fails to register, feeding back an application API failure registration notification containing the information of the first API endpoint to the client.
5. The method of claim 3, wherein receiving user interaction based on the file input control to determine a corresponding target microservice application file comprises:
receiving user interaction operation based on the micro-service application list corresponding to the file input control so as to determine corresponding target micro-service application information;
and determining a target micro-service application file corresponding to the target application information from a micro-service application file library, wherein the micro-service application file library stores micro-service application files corresponding to all micro-service application information in a micro-service application list.
6. The method of claim 1, wherein after performing a gateway registration operation on each API endpoint of the target microservice application file, the method further comprises:
obtaining an API personalized service configuration message, wherein the API personalized service configuration message comprises target API calling information and target service configuration information;
determining a target API corresponding to the target API call information;
and executing service configuration operation on the target API based on the target service configuration information.
7. The method of claim 1, wherein the API call information includes an API call address and an API call mode.
8. A gateway registration apparatus for an API endpoint of a microservice application, the microservice application having a plurality of API endpoints, the apparatus comprising:
the file acquisition unit is configured to acquire a target micro-service application file corresponding to the micro-service application to be registered;
the information analysis unit is configured to analyze application service port information corresponding to the target micro-service application file and API calling information corresponding to each API endpoint;
and the gateway registration unit is configured to execute gateway registration operation on each API endpoint of the target micro-service application file based on the acquired application service port information and the API calling information.
9. A mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the gateway registration method of a micro service application API endpoint according to any of claims 1-7 when executing the computer program.
10. A computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the gateway registration method of a micro service application API endpoint according to any of claims 1-7.
CN202011419586.7A 2020-12-07 2020-12-07 Gateway registration method and device of micro-service application API (application program interface) endpoint Active CN112653618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011419586.7A CN112653618B (en) 2020-12-07 2020-12-07 Gateway registration method and device of micro-service application API (application program interface) endpoint

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011419586.7A CN112653618B (en) 2020-12-07 2020-12-07 Gateway registration method and device of micro-service application API (application program interface) endpoint

Publications (2)

Publication Number Publication Date
CN112653618A true CN112653618A (en) 2021-04-13
CN112653618B CN112653618B (en) 2023-08-08

Family

ID=75351034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011419586.7A Active CN112653618B (en) 2020-12-07 2020-12-07 Gateway registration method and device of micro-service application API (application program interface) endpoint

Country Status (1)

Country Link
CN (1) CN112653618B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113973129A (en) * 2021-09-30 2022-01-25 广西中科曙光云计算有限公司 Gateway supporting multiple registration center microservices
CN114218608A (en) * 2021-12-31 2022-03-22 深圳达实旗云智慧医疗有限公司 API registration type-based data privacy protection method, storage medium and system
CN114817821A (en) * 2022-06-30 2022-07-29 数字广东网络建设有限公司 Display method and device of government affair information, electronic equipment and storage medium
CN114866617A (en) * 2022-04-28 2022-08-05 济南浪潮数据技术有限公司 Micro-service request processing method, device, equipment and medium
CN115242761A (en) * 2022-07-01 2022-10-25 浪潮云信息技术股份公司 Dynamic OpenAPI automatic registration method
CN115514633A (en) * 2022-08-29 2022-12-23 中国电信股份有限公司 Dynamic configuration method and device of API gateway, and electronic equipment
CN115857935A (en) * 2023-02-15 2023-03-28 北京微吼时代科技有限公司 Front-end development method and device independent of framework
CN116319090A (en) * 2023-05-18 2023-06-23 中国电子信息产业集团有限公司第六研究所 Power and environment monitoring system and method based on micro-service

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612955A (en) * 2016-07-12 2018-01-19 深圳市远行科技股份有限公司 Micro services provide method, apparatus and system
CN108306917A (en) * 2017-01-13 2018-07-20 中国移动通信集团江西有限公司 The register method and device of data processing method and device, micro services module
CN109542796A (en) * 2018-12-28 2019-03-29 深圳云天励飞技术有限公司 Test method and Related product
CN110278284A (en) * 2019-07-10 2019-09-24 中国民航信息网络股份有限公司 A kind of service calling method and device
CN110990081A (en) * 2019-12-10 2020-04-10 北京懿医云科技有限公司 Microservice registration and discovery method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612955A (en) * 2016-07-12 2018-01-19 深圳市远行科技股份有限公司 Micro services provide method, apparatus and system
CN108306917A (en) * 2017-01-13 2018-07-20 中国移动通信集团江西有限公司 The register method and device of data processing method and device, micro services module
CN109542796A (en) * 2018-12-28 2019-03-29 深圳云天励飞技术有限公司 Test method and Related product
CN110278284A (en) * 2019-07-10 2019-09-24 中国民航信息网络股份有限公司 A kind of service calling method and device
CN110990081A (en) * 2019-12-10 2020-04-10 北京懿医云科技有限公司 Microservice registration and discovery method and device, storage medium and electronic equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113973129A (en) * 2021-09-30 2022-01-25 广西中科曙光云计算有限公司 Gateway supporting multiple registration center microservices
CN113973129B (en) * 2021-09-30 2024-02-20 广西中科曙光云计算有限公司 Gateway supporting multiple registry micro services
CN114218608A (en) * 2021-12-31 2022-03-22 深圳达实旗云智慧医疗有限公司 API registration type-based data privacy protection method, storage medium and system
CN114218608B (en) * 2021-12-31 2023-02-14 深圳达实旗云健康科技有限公司 API registration type-based data privacy protection method, storage medium and system
CN114866617A (en) * 2022-04-28 2022-08-05 济南浪潮数据技术有限公司 Micro-service request processing method, device, equipment and medium
CN114817821A (en) * 2022-06-30 2022-07-29 数字广东网络建设有限公司 Display method and device of government affair information, electronic equipment and storage medium
CN114817821B (en) * 2022-06-30 2022-09-16 数字广东网络建设有限公司 Display method and device of government affair information, electronic equipment and storage medium
CN115242761A (en) * 2022-07-01 2022-10-25 浪潮云信息技术股份公司 Dynamic OpenAPI automatic registration method
CN115514633A (en) * 2022-08-29 2022-12-23 中国电信股份有限公司 Dynamic configuration method and device of API gateway, and electronic equipment
CN115857935A (en) * 2023-02-15 2023-03-28 北京微吼时代科技有限公司 Front-end development method and device independent of framework
CN116319090A (en) * 2023-05-18 2023-06-23 中国电子信息产业集团有限公司第六研究所 Power and environment monitoring system and method based on micro-service

Also Published As

Publication number Publication date
CN112653618B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN112653618B (en) Gateway registration method and device of micro-service application API (application program interface) endpoint
CN110535831B (en) Kubernetes and network domain-based cluster security management method and device and storage medium
CN111314141B (en) Route updating method and device
US11190407B2 (en) Internet of things device discovery and configuration
CN110225104B (en) Data acquisition method and device and terminal equipment
US20120072969A1 (en) Determining a sensitivity label of document information in real time
US9990214B2 (en) Dynamic agent delivery
US11290322B2 (en) Honeypot asset cloning
US10216601B2 (en) Agent dynamic service
CN110601880A (en) Cloud platform, service processing method, command interface and computer equipment
US10404568B2 (en) Agent manager for distributed transaction monitoring system
US20190334938A1 (en) System, method, and computer program product for dynamically configuring a virtual environment for identifying unwanted data
US11882154B2 (en) Template representation of security resources
US8984124B2 (en) System and method for adaptive data monitoring
CN113923008B (en) Malicious website interception method, device, equipment and storage medium
CN108415767B (en) Server thread control method, device, equipment and readable storage medium
CN114661375A (en) Application integration method and device
CN111190664A (en) Method and system for generating page
CN111722994A (en) Task request response method and device
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN116170274A (en) Web application access method, device, system and computing equipment
US11190553B2 (en) Gateway action framework
US10911305B2 (en) Efficient rule processing for device management data evaluation
CN112835609A (en) Method and device for modifying dependent package download address
EP2915311B1 (en) Apparatus and method of content containment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant