CN114416314B - Service arrangement method based on API gateway - Google Patents

Service arrangement method based on API gateway Download PDF

Info

Publication number
CN114416314B
CN114416314B CN202210053233.2A CN202210053233A CN114416314B CN 114416314 B CN114416314 B CN 114416314B CN 202210053233 A CN202210053233 A CN 202210053233A CN 114416314 B CN114416314 B CN 114416314B
Authority
CN
China
Prior art keywords
service
api gateway
calling
services
new
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.)
Active
Application number
CN202210053233.2A
Other languages
Chinese (zh)
Other versions
CN114416314A (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.)
Beijing Institute of Computer Technology and Applications
Original Assignee
Beijing Institute of Computer Technology and Applications
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 Beijing Institute of Computer Technology and Applications filed Critical Beijing Institute of Computer Technology and Applications
Priority to CN202210053233.2A priority Critical patent/CN114416314B/en
Publication of CN114416314A publication Critical patent/CN114416314A/en
Application granted granted Critical
Publication of CN114416314B publication Critical patent/CN114416314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Abstract

The invention relates to a service arranging method based on an API gateway, and belongs to the field of cloud computing. The invention comprises the following steps: according to specific calling requirements, carrying out standard constraint on services which need to be exposed to other systems for calling, and registering the services to the API gateway; creating a new service protocol on the API gateway in advance, and then uniformly arranging the related services by adopting a workflow way through the related services registered on the API gateway and a plug-in tool on the API gateway; and (4) outputting a result after arrangement, packaging the result into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling the service according to specific requirements by a service calling party. The invention is friendly to the front end, does not need to request for many times, does not need to change the front end under the condition of changing the old system, can make compatibility to the data through the gateway, has higher business response speed and can generate the service quickly compared with the traditional service architecture, and is more beneficial to the integral improvement of the office efficiency of the following government and enterprise staff.

Description

Service arrangement method based on API gateway
Technical Field
The invention belongs to the field of cloud computing, and particularly relates to a service arrangement method based on an API gateway.
Background
In a new era, the development of data drive has become a new direction of the change of the government and enterprise, and the government and enterprise can accelerate the release of data value and complete digital transformation only by continuously improving the internal informatization construction level. With the further prominent introduction of cloud technology and service role, the construction of an efficient, stable and prospective informatization system becomes a new need for the development of numerous government enterprises. Experience and achievement in the process of past government and enterprise information construction are summarized, government and enterprise work increasingly pays attention to content accuracy and process efficiency, however, problems of large quantity of process approval redundancy, repeated interface access and the like still exist in daily operation of various office systems, office efficiency of government and enterprise workers is greatly reduced, and the problems can be flexibly and efficiently solved through the API gateway-based service arrangement method.
The API gateway mainly comprises 4 modules of API application, configuration management, monitoring and early warning and safety management. The API application module mainly provides functions of full life cycle management, service registration and discovery, request distribution, API release, gray release and the like for API services, and meets the use requirements of different application scenes; the configuration management module mainly provides functions of overtime fusing, cross-domain access, access control, service current limiting, multi-protocol API calling support, plug-in expansion support and the like, and provides fine-grained and multi-level API management service; the monitoring and early warning module monitors interface services registered on the API gateway from the global level, the application level and the single multi-level, mainly provides functions of API monitoring, API abnormity early warning, hot spot service statistics, log record pushing and the like, and provides support for safe and stable operation of the API; the safety module mainly provides functions of API authentication authorization, IP limitation, URL rewriting, multi-tenant management, user authority management and the like, and safety control capacity of the API gateway is improved.
Therefore, the API gateway is the only entrance of the internal program of the external access system, facing a large amount of service forwarding, authentication and authorization, the API gateway is the intermediate platform of all external services, the original independent operation or repeated operation can be performed through customizing the extension event, the recombination of the services is performed after the rearrangement, a new service is constructed on the basis of the original service, the service bearing capacity of the system is enhanced, the maintenance and development cost is greatly reduced, and the response degree and the office efficiency of the page can be greatly improved while the completeness and the accuracy of content processing are ensured.
In addition, microservice as a new technology for deploying applications and services in the cloud has become a hot topic at present. Compared with the traditional architecture, the micro-service architecture depends more on realizing a complete business process through the cooperation among the micro-services, the cooperation is service arrangement, and by decomposing the application and the service into smaller and loosely coupled components and matching with the API gateway, the system application and the service can be developed, upgraded, expanded and deployed more easily.
Disclosure of Invention
Technical problem to be solved
The technical problem to be solved by the invention is how to provide a service arranging method based on an API gateway, so as to solve the problems that data exchange among a plurality of services exists for APP or Web application, most time is consumed in establishing connection because the data exchange is remote connection, in addition, due to the complexity and diversity of calling scenes, the service registered on the API gateway by a service provider often cannot meet the calling requirement of a service caller, and time and labor are wasted if a new service is redeveloped.
(II) technical scheme
In order to solve the technical problem, the invention provides a service arranging method based on an API gateway, which comprises the following steps:
s1, a service provider carries out standard constraint on services which need to be exposed to other systems for calling according to specific calling requirements and registers the services to an API gateway;
s2, a service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies service names, parameter types and calling modes, and then uniformly arranges related services in a workflow mode through plug-in tools on the API gateway, namely a service calling engine and a database operation engine;
and S3, outputting a result after arrangement, packaging the result into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling by a service caller according to specific requirements.
Further, the standard constraint on the service in step S1 includes checking whether a network protocol, a parameter type, and a calling manner of the service to be registered by the service registrar meet standards, registering and accessing the service meeting the standards as required, storing the callable information included in the service in a database, and providing a modification and upgrade requirement for the service not meeting the standards.
Furthermore, the network protocol is an http protocol, the parameter type is a Json object, and the calling mode is post and get requests.
Further, the step S2 of creating a new service agreement on the API gateway in advance only includes the service shell.
Further, in the process of the arrangement in the step S2, the whole process runs in the form of a workflow, and involves participation, invocation, and audit of a plurality of services inside and outside the service registry system.
Further, the operations of the arrangement are filtering, moving, renaming, packing and unpacking.
Further, the step S3 specifically includes: and after the arrangement is finished, the API gateway packages the arrangement result into a new service and registers the new service in a service list of the API gateway, and the new service can be repeatedly called according to the subsequent calling requirements.
Further, the step S1 specifically includes: a request is sent in the personnel system, and various information details related to the request are called and returned through inputting names.
Further, the step S2 specifically includes: the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies service names, parameter types and calling modes, calls office and telephone information services registered on the API gateway according to the requirements of the newly created service protocol, and uniformly arranges the office and telephone information services through plug-in tools, namely a service calling engine and a database operation engine, on the gateway.
Further, the step S3 specifically includes: and outputting personal information details after arrangement, packaging the personal information details into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling by a service calling party according to specific requirements.
(III) advantageous effects
The invention provides a service arranging method based on an API gateway, which has the beneficial effects that: compared with the traditional architecture, under the micro-service architecture, government and enterprise work can rely more on realizing a complete business process through cooperation among micro-services, and the cooperation is service arrangement. The invention uses the service arrangement method, can obtain the required data from various services rapidly, implement the fast response to the business; by using the API gateway technology, the system is expanded by a powerful self-defined plug-in system, and the service data can be adapted and compatible, so that the interaction cost of a service provider and a caller is reduced, and the whole service calling process is more complete and efficient. Above showing technical progress, having obtained good result of use in actual operation, greatly improved the office efficiency and the use experience of government and enterprise staff.
Drawings
FIG. 1 is a schematic diagram of the service orchestration method based on the API gateway according to the present invention;
fig. 2 is a flowchart of an embodiment of the service orchestration method based on the API gateway according to the present invention.
Detailed Description
In order to make the objects, contents and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
The invention relates to integrated application of an API gateway and flow arrangement of micro-services, in particular to a service arrangement method based on the API gateway, which mainly relates to the technical field of government and enterprise services.
The technical problem to be solved by the invention is as follows: for APP or Web application, data exchange among a plurality of services exists, most of time is consumed in establishing connection because the data exchange is remote connection, and in addition, due to the complexity and diversity of calling scenes, the service registered by a service provider on an API gateway often cannot meet the calling requirement of a service caller, and time and labor are wasted if new service is redeveloped.
The technical scheme of the invention is as follows: the service arranging method based on the API gateway comprises the following steps:
s1, a service provider carries out standard constraint on services which need to be exposed to other systems for calling according to specific calling requirements and registers the services to an API gateway;
s2, a service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies a service name, a parameter type and a calling mode, and then uniformly arranges related services in a workflow mode through related services registered on the API gateway, namely a service calling engine and a database operation engine, and plug-in tools on the API gateway;
and S3, outputting the result after arrangement, packaging the result into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling the service by a service calling party according to specific requirements.
The step S1 specifically includes: carrying out standard constraint on services, including checking whether a network protocol, a parameter type and a calling mode of services to be registered of a service registry meet standards or not, wherein the network protocol is an http protocol, the parameter type is a Json object, the calling mode is a post and get request, registering and accessing the services meeting the standards according to requirements, storing callable information contained in the services in a database, and providing transformation and upgrade requirements for the services not meeting the standards;
the step S2 specifically includes: the method comprises the steps that a new service which is created in advance only comprises shells such as a service name and the like, registration and calling specifications are determined for the new service which is registered after subsequent arrangement, and in the arrangement process, the whole process is operated in a workflow mode and relates to the participation, calling and auditing of a plurality of services inside and outside a service registrant system, for example, the result of a service A can be used as the input of a service B and the like;
the step S3 specifically includes: and after the arrangement is finished, the API gateway packages the arrangement result into a new service and registers the new service in a service list of the API gateway, and the new service can be repeatedly called according to the subsequent calling requirements.
Example 1:
fig. 2 shows a service orchestration method based on an API gateway, which mainly implements the following steps:
the method comprises the following steps: service registration preparation and data verification
In the face of a plurality of service information details related to a call request, firstly, logic carding is carried out on the service information details, whether data information is complete or not and whether a service standard is standard or not are checked, and then the service information details are registered on an API gateway;
step two: new service agreement creation and service orchestration
The method comprises the following steps that a service provider firstly creates a new service protocol on an API gateway according to specific calling requirements, specifies a service name, a parameter type and a calling mode, then calls related services registered on the API gateway, and uniformly arranges the related services (including filtering, moving, renaming, packaging, unpacking and the like) in a workflow mode through plug-in tools, namely a service calling engine and a database operation engine, on the API gateway;
step three: service encapsulation and registration invocation
And (4) outputting a result after arrangement, packaging the result into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling the service according to specific requirements by a service calling party.
The invention relates to a service arranging method based on an API gateway, which adopts a service aggregation/splitting mode to uniformly manage the entrance, converts the original service data and encapsulates and creates a new service, thereby greatly reducing the service calling cost and the page response speed.
The following further describes the process of the present invention with reference to the specific examples and the accompanying drawings:
the first step is as follows: sending a request in a personnel system, calling and returning various information details related to the request by inputting a name;
the second step is that: the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, and specifies a service name, a parameter type and a calling mode;
the third step: the service provider calls services such as office and telephone information registered on the API gateway according to the requirement of a newly created service protocol, and the services are uniformly arranged through plug-in tools, namely a service calling engine and a database operation engine, on the gateway;
the fourth step: and outputting personal information details after arrangement, packaging the personal information details into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling by a service calling party according to specific requirements.
Example 2:
the service arranging method based on the API gateway comprises the following steps: 1. according to specific calling requirements, carrying out standard constraint on services which need to be exposed to other systems for calling, and registering the services to an API gateway; 2. creating a new service protocol on the API gateway in advance, and then uniformly arranging the related services by adopting a workflow way through the related services registered on the API gateway and a plug-in tool on the API gateway; 3. and the output result after the arrangement is finished is packaged into a new service by the API gateway and is registered in a service list of the API gateway, and a service caller can call the service according to specific requirements. .
Further, performing standard constraint on the service in the first step, including checking whether a network protocol, a parameter type and a calling mode of the service to be registered by the service registrar meet standards, wherein the network protocol is an http protocol, the parameter type is a Json object, the calling mode is a post and get request, performing registration access on the service meeting the standards according to requirements, storing the callable information contained in the service in a database, and providing a transformation and upgrade requirement for the service not meeting the standards;
furthermore, the new service created in advance in the second step only comprises shells such as service names and the like, registration and calling specifications are determined for the new service registered after subsequent arrangement, and in the arrangement process, the whole process runs in a workflow mode and relates to the participation, calling, auditing and the like of a plurality of services inside and outside the service registrant system;
further, the middle row of the third step is finished, the API gateway packages the arrangement result into a new service and registers the new service in the service list of the API gateway, and the call can be repeated according to the subsequent call requirement.
The invention has the beneficial effects that: compared with the traditional architecture, under the micro-service architecture, government and enterprise work can rely more on realizing a complete business process through cooperation among micro-services, and the cooperation is service arrangement. The invention uses the service arrangement method, can obtain the required data from various services rapidly, implement the fast response to the business; by using the API gateway technology, the system is expanded by a powerful self-defined plug-in system, and the service data can be adapted and compatible, so that the interaction cost of a service provider and a caller is reduced, and the whole service calling process is more complete and efficient. Above showing technological progress, having obtained good result of use in actual operation, greatly improved the office efficiency and the use experience of government and enterprise staff.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, it is possible to make various improvements and modifications without departing from the technical principle of the present invention, and those improvements and modifications should be considered as the protection scope of the present invention.

Claims (8)

1. A service arranging method based on an API gateway is characterized by comprising the following steps:
s1, a service provider carries out standard constraint on services which need to be exposed to other systems for calling according to specific calling requirements and registers the services to an API gateway;
s2, the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies service names, parameter types and calling modes, and then uniformly arranges related services in a workflow mode through plug-in tools, namely a service calling engine and a database operation engine, on the API gateway;
s3, outputting a result after arrangement, packaging the result into a new service by the API gateway, registering the new service in a service list of the API gateway, and calling by a service calling party according to specific requirements;
in the step S2, a new service protocol is created on the API gateway in advance and only comprises a service shell;
in the step S2, in the process of arrangement, the whole process runs in the form of a workflow, and involves participation, call, and audit of a plurality of services inside and outside the service registry system.
2. The API gateway-based service orchestration method according to claim 1, wherein performing specification constraint on the service in step S1 includes checking whether a network protocol, a parameter type, and a calling manner of a service to be registered by the service registrar meet standards, registering and accessing the service meeting the standards as required, storing callable information included in the service in a database, and making a modification and upgrade requirement for the service not meeting the standards.
3. The API gateway-based service orchestration method according to claim 2, wherein the network protocol is an http protocol, the parameter type is a Json object, and the invocation means is post and get requests.
4. The API gateway based service orchestration method of claim 1, wherein the orchestration operations are filtering, moving, renaming, encapsulating, and unpacking.
5. The API gateway-based service orchestration method according to claim 4, wherein step S3 specifically comprises: and after the arrangement is finished, the API gateway packages the arrangement result into a new service and registers the new service in a service list of the API gateway, and the new service can be repeatedly called according to the subsequent calling requirements.
6. The API gateway-based service orchestration method according to claim 1, wherein step S1 specifically comprises: a request is sent in the personnel system, and various information details related to the request are called and returned through inputting names.
7. The API gateway-based service orchestration method according to claim 6, wherein step S2 specifically comprises: the service provider firstly creates a new service protocol on the API gateway according to specific calling requirements, specifies service names, parameter types and calling modes, calls offices and telephone information services registered on the API gateway according to the requirements of the newly created service protocol, and uniformly arranges the services by using plug-in tools, namely a service calling engine and a database operation engine, on the gateway.
8. The API gateway-based service orchestration method according to claim 7, wherein step S3 specifically comprises: and the details of the personal information output after the arrangement are packaged into a new service by the API gateway and registered in a service list of the API gateway, and a service calling party can call the new service according to specific requirements.
CN202210053233.2A 2022-01-18 2022-01-18 Service arrangement method based on API gateway Active CN114416314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210053233.2A CN114416314B (en) 2022-01-18 2022-01-18 Service arrangement method based on API gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210053233.2A CN114416314B (en) 2022-01-18 2022-01-18 Service arrangement method based on API gateway

Publications (2)

Publication Number Publication Date
CN114416314A CN114416314A (en) 2022-04-29
CN114416314B true CN114416314B (en) 2023-01-10

Family

ID=81274365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210053233.2A Active CN114416314B (en) 2022-01-18 2022-01-18 Service arrangement method based on API gateway

Country Status (1)

Country Link
CN (1) CN114416314B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242629A (en) * 2022-06-29 2022-10-25 浪潮通信技术有限公司 Data aggregation method and device based on API gateway

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037830A (en) * 2021-03-04 2021-06-25 浪潮云信息技术股份公司 Micro-service API (application program interface) arranging method and system based on gateway

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953745B (en) * 2019-12-10 2023-07-11 顺丰科技有限公司 Service calling method, system, computer device and storage medium
CN111245916B (en) * 2020-01-07 2023-03-17 苏宁云计算有限公司 Service calling method, service arranging method and device based on micro-service gateway
CN111610979B (en) * 2020-04-15 2023-06-13 河南大学 API gateway subjected to persistence and coupling degree optimization and method thereof
US11611436B2 (en) * 2020-04-24 2023-03-21 Netapp, Inc. Management services API gateway
CN113595788A (en) * 2021-07-28 2021-11-02 上海华兴数字科技有限公司 API gateway management method and device based on plug-in

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037830A (en) * 2021-03-04 2021-06-25 浪潮云信息技术股份公司 Micro-service API (application program interface) arranging method and system based on gateway

Also Published As

Publication number Publication date
CN114416314A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN109246251B (en) Micro-service calling method, device, system, equipment and readable storage medium
CN107147704B (en) block chain-oriented universal service middleware system
CN110738454B (en) Enterprise management platform system
CN101826987B (en) System and method for supporting mixed service based on integrated open network
KR100724522B1 (en) Method and system for automatically generating service interfaces for a service oriented architecture
EP2561656B1 (en) Servlet api and method for xmpp protocol
US9009058B2 (en) Aiding creation of service offers associated with a service delivery framework
CN112256248B (en) Intelligent cloud low-code platform capable of achieving starting effect
CN101472140A (en) System for distributing and requiring multimedia program and implementing method thereof
WO2010130165A1 (en) Method and system for generating open telecommunication service based on internet
CN106775751A (en) A kind of web front-end frame system and framework method
CN113037831A (en) Service gateway message processing method and device
CN114416314B (en) Service arrangement method based on API gateway
CN113709221A (en) API management and API gateway calling method
CN100388665C (en) Telecommunication network calling centre system and its implementing method
CN103399735A (en) Method for developing intermediate layer of remote function call interface
CN112073923A (en) Communication method, device, gateway and readable storage medium compatible with multiple operators
CN113190513A (en) Data integration system and method
CN105959385A (en) Information communication method, device and system
CN112966833B (en) Machine learning model platform based on Kubernetes cluster
CN112860462A (en) Method, device and system for realizing interconnection and intercommunication of IOT platform bases
CN114666113A (en) Dynamic response data desensitization method based on API gateway
CN111045928A (en) Interface data testing method, device, terminal and storage medium
CN105260179A (en) Method for achieving flex and servlet interaction
CN114296985A (en) Global exception handling method and platform in large-scale micro-service cluster scene

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