Search

CN-116489214-B - Unified service scheduling method, device, medium and equipment based on micro service gateway

CN116489214BCN 116489214 BCN116489214 BCN 116489214BCN-116489214-B

Abstract

The invention discloses a unified service scheduling method, a device, a medium and equipment based on a micro-service gateway, belonging to the technical field of micro-service gateways, comprising the steps of deploying the service gateway to each middle tenant; the service gateway acquires the full initialization data of the service gateway through the management and control tool, connects the service gateway with the registration center in the corresponding middle tenant to realize automatic registration and route construction of the service, and sends a change notification to the message component through the management and control tool when the route is changed, and the service gateway receives the change notification and updates the memory route. The invention solves the technical problems that the micro-service gateway-based system in the prior art cannot realize fault isolation and cannot automatically realize service registration, realizes hierarchical routing and multi-tenant isolation by arranging the multi-stage gateway component, ensures the flow isolation of each middle station, avoids single node faults, realizes automatic service registration and routing construction, and effectively unifies the call management of each middle station.

Inventors

  • LI ZHONGYANG
  • LIANG MING
  • QIU DONGPEI

Assignees

  • 国电南瑞科技股份有限公司

Dates

Publication Date
20260508
Application Date
20230425

Claims (7)

  1. 1. The unified service scheduling method based on the micro service gateway is characterized by comprising the following steps of: deploying a service gateway to each middle tenant, and configuring corresponding middle tenant IDs (identity) of the service gateway, wherein the service gateway is connected with a gateway configuration center, a management and control tool and a message component; pulling corresponding service configuration from a gateway configuration center through the service gateway, and starting monitoring of a message component main body by the service gateway according to default configuration of the message component; Acquiring full initialization data of the service gateway and corresponding center tenant IDs through the management and control tool, and connecting the service gateway with a registration center in the corresponding center tenant to realize automatic service registration and route construction; when the route is changed, sending a change notification to a message component through the management and control tool, and receiving the change notification and updating the memory route by the service gateway; Before deploying the service gateway to each middle tenant, taking the flow gateway as a flow inlet of a service request; when a service gateway is deployed to each middle tenant, other components are deployed to the public VPC so as to realize unified entry and dispatch management of the service; When a service gateway is deployed to each middle tenant, cascading gateways are arranged to be cascaded with the service gateway and the traffic gateway, wherein the cascading gateways are used for realizing authentication and authentication by service connection and basic capability between parallel networks and performing mutual trust authentication with the next gateway.
  2. 2. The micro-service gateway-based unified service scheduling method of claim 1, further comprising collecting service gateway running logs through the message component, subscribing to processing by a regulatory tool.
  3. 3. The unified service scheduling method based on micro service gateway according to claim 1, wherein the service gateway starts monitoring of message component body according to default configuration of message component, including monitoring related route change, authority change and configuration parameter information of message component.
  4. 4. The unified service scheduling method based on micro service gateway according to claim 1, wherein the service gateway adopts a responsive programming and Filter chaining processing mode and improves throughput through full asynchronization processing, and inserts a custom extension component into a processing chain through the Filter chaining processing mode, wherein the custom extension component comprises a black and white list component, an authentication and authorization component and an access log component.
  5. 5. A unified service scheduling device based on a micro service gateway, comprising: the gateway deployment module is used for deploying the service gateway to each middle tenant and configuring the corresponding middle tenant ID; the gateway configuration module is used for pulling corresponding service configuration from a gateway configuration center through the service gateway, and the service gateway starts monitoring of the message component main body according to default configuration of the message component; the data initialization module is used for acquiring the full initialization data of the service gateway and the corresponding center tenant ID through the management and control tool, and connecting the service gateway with a registration center in the corresponding center tenant to realize automatic service registration and route construction; The change notification module is used for sending a change notification to the message component through the management and control tool when the route is changed, and the service gateway receives the change notification and updates the memory route; Before deploying the service gateway to each middle tenant, taking the flow gateway as a flow inlet of a service request; when a service gateway is deployed to each middle tenant, other components are deployed to the public VPC so as to realize unified entry and dispatch management of the service; When a service gateway is deployed to each middle tenant, cascading gateways are arranged to be cascaded with the service gateway and the traffic gateway, wherein the cascading gateways are used for realizing authentication and authentication by service connection and basic capability between parallel networks and performing mutual trust authentication with the next gateway.
  6. 6. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements a micro service gateway based unified service scheduling method according to any of claims 1-4.
  7. 7. An apparatus, comprising: A memory for storing instructions; A processor configured to execute the instructions to cause the apparatus to perform operations to implement the micro service gateway-based unified service scheduling method of any one of claims 1-4.

Description

Unified service scheduling method, device, medium and equipment based on micro service gateway Technical Field The invention relates to a unified service scheduling method, device, medium and equipment based on a micro service gateway, and belongs to the technical field of micro service gateways. Background With the comprehensive promotion of digital transformation of enterprises in China, the national network companies are greatly promoting the strategy of the middle station of the enterprises, constructing the middle station of the business, the middle station of the data, the middle station of the technology, covering the business such as the power grid production, the financial management, the marketing service, the project management and the like of the enterprises, the data analysis requirements such as the data summarization, the data calculation and the like, and the technical fields such as the artificial intelligence, the GIS, the video and the like, constructing the digital application mode of 'large middle station and small front station', and laying a solid foundation for the enterprises to rapidly and flexibly respond to new business requirements and provide emerging services. On an enterprise platform, business applications such as marketing 2.0, PMS3.0, internet and national networks and the like are built, and digital application requirements for a novel power system are rapidly supported. However, in the promotion of the middle stage strategy, the middle stage value and the service front stage business aspect are fully exerted, and some problems still exist, so that the popularization and the use are influenced: Because of different construction time sequences and different use products, the middle stations have certain differences on the technical routes of the micro-service gateways, most newly built middle stations construct a micro-service system based on SpringCloud, and partially use the micro-service gateway products of a primary cloud manufacturer, such as CSB, APIGateway, romma, and the like, and the technical differences have certain difficulties in the aspects of service fusion and unified service scheduling although the technical differences have not much influence when the front-end service is applied. Most of the intermediate stations adopt a mainstream oauth2.0 protocol to complete authentication and authorization between a client and a service in authentication and authentication, adopt Appid, appSecret and the like to participate in transferring client identification and key information, and use a service path URL in routing for service routing. However, some intermediate stations have early construction time sequences, and consider the reason that the conventional business service is compatible and the webservice technology is adopted, so that the intermediate stations can automatically design and maintain routing and authentication information to realize related functions. However, these problems cause great trouble to the subsequent application developer when using each intermediate service, and cause a certain threshold, so that different authentication logics are often needed to be realized by using different intermediate services, and different parameters are transmitted. Micro-services (or micro-service architecture) is a cloud-native architecture approach in which a single application consists of many loosely-coupled and independently-deployable smaller components or services. Its main function is to break down the functions into discrete individual services, thereby reducing the system's coupling and providing more flexible service support. The concept of micro-services (Microservice) emerged in 2012, and as a way to accelerate the Web and mobile application development process, 2014 began to receive attention from parties, while 2015 could be said to be the year of micro-services. He is mainly distinguished from the traditional web development mode monomer development in that: The single architecture model packages all functions in a WAR package, has no external dependence (except a container), and is deployed in a JEE container (Tomcat, JBoss, webLogic) and comprises all logic such as DO/DAO, service, UI and the like. The method has the advantages of simple development, centralized management, basically no repeated development, local functions and no distributed management and calling consumption. But also has the problems of low trails, difficult maintenance, inflexibility, poor expansibility and the like. The micro-service architecture splits a single application into independent micro-services according to the principles of service decoupling and the like to jointly form a service application, so that agile development and deployment are realized. Different micro-services generally have different network addresses, and an external client may need to call interfaces of a plurality of services to complete a service requirement, if the client is enabled to direc