CN117221114A - Service gateway deployment method, device, equipment and storage medium - Google Patents

Service gateway deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN117221114A
CN117221114A CN202311267641.9A CN202311267641A CN117221114A CN 117221114 A CN117221114 A CN 117221114A CN 202311267641 A CN202311267641 A CN 202311267641A CN 117221114 A CN117221114 A CN 117221114A
Authority
CN
China
Prior art keywords
service
forwarding
request
server
gateway
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.)
Pending
Application number
CN202311267641.9A
Other languages
Chinese (zh)
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.)
China Merchants Bank Co Ltd
Original Assignee
China Merchants Bank 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 China Merchants Bank Co Ltd filed Critical China Merchants Bank Co Ltd
Priority to CN202311267641.9A priority Critical patent/CN117221114A/en
Publication of CN117221114A publication Critical patent/CN117221114A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a service gateway deployment method, a service gateway deployment device, service gateway deployment equipment and a service gateway deployment storage medium, and belongs to the technical field of intelligent gateways. The invention obtains server configuration information and service custom configuration information; assembling a target interceptor according to the service custom configuration information; deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server; and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system. By the method, the target interceptor is established, the server deployment of the universal gateway is carried out according to the service customized configuration information, so that different external systems can be adapted, the new service system is accessed to the universal gateway without secondary development, only the route configuration is required to be added, and the service request of the external system is directly processed and forwarded when the service request of the external system is received.

Description

Service gateway deployment method, device, equipment and storage medium
Technical Field
The present invention relates to the field of intelligent gateways, and in particular, to a service gateway deployment method, device, equipment, and storage medium.
Background
Under the large background of cloud on a host, micro-service of a system and localization of a database, a gateway is used as a bridge for connecting an external system and a service system, and can connect networks with different formats, different communication protocols and different structure types, transmit and receive information packets and forward service requests. As traffic continues to grow, business rules continue to expand, interactions and architecture between systems continue to become complex, and the number of systems continues to rise.
Firstly, micro service architecture has become mainstream, the service system is divided into smaller and more, and the existing solution is to build a special gateway for each newly added service system, and the one-to-one mode makes the gateway number higher along with the water fluctuation of the service system. However, for those systems that are not at high risk or have low traffic, the dedicated gateway is not considered to be built, which not only occupies many unnecessary resources, but also is inconvenient for centralized management and monitoring. In addition, different gateways are provided with different databases to store gateway data, which also causes resource waste.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a service gateway deployment method, device, equipment and storage medium, and aims to solve the technical problems that different service systems in the prior art build special gateways to occupy a lot of unnecessary resources and are inconvenient for centralized management and monitoring.
In order to achieve the above object, the present invention provides a service gateway deployment method, which includes the following steps:
acquiring server configuration information and service custom configuration information;
assembling a target interceptor according to the service custom configuration information;
deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server;
and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system.
Optionally, the assembling the target interceptor according to the service custom configuration information includes:
determining general configuration information, current limiter information and a route forwarding strategy according to the service custom configuration information;
and configuring a target interceptor according to the general configuration information, wherein the target interceptor comprises an address packet verification interceptor, a customized job bar current limiting interceptor and a customized request forwarding interceptor.
Optionally, the deploying and starting the universal gateway server according to the server configuration information and the target interceptor includes:
determining request forwarding server configuration information and local server configuration information according to the server configuration information;
assembling the target interceptor to a request forwarding server, and deploying the request forwarding server according to the request forwarding server configuration information;
deploying a local server according to the local server configuration information;
and starting the request forwarding server and the local server.
Optionally, the receiving the service request of the external system, and forwarding the service request to the service system after processing the service request includes:
when a service request of an external system is received, determining a request address packet and general message information according to the service request;
address packet verification is carried out according to the request address packet, and customized request forwarding verification is carried out according to the general message information;
and forwarding the service request to a service system after the address packet checksum and the customized request forwarding verification are completed.
Optionally, the forwarding the service request to a service system according to the address packet checksum after the completion of the customized request forwarding verification includes:
Determining request content information, a forwarding target system and forwarding route information according to the general message information;
comparing the request content information, the forwarding target system and the forwarding route information with a preset forwarding limit strategy;
determining that the customized request forwarding verification is completed when the comparison is successful, and determining whether a core address packet exists according to the request address packet;
when the core address packet exists and a sending service unit corresponding to the service request is determined, judging that the service request passes through address packet verification, and forwarding the service request to a service system;
and when the core address packet does not exist, performing log printing of the service request, judging that the service request passes address packet verification after printing is finished, and forwarding the service request to the service system.
Optionally, the comparing the request content information, the forwarding target system, and the forwarding route information with a preset forwarding restriction policy includes:
determining a forwarding service system, a forwarding operation bar name, a forwarding address, a message type, a character set, a protocol type and a protocol related context according to the request content information;
Determining a routing factor, a gray value, a sub-library name and a sub-library real-time application cluster according to the forwarding routing information;
and comparing the forwarding service system, the forwarding operation bar name, the forwarding address, the message type, the character set, the protocol type, the protocol related context, the routing factor, the gray value, the sub-library name, the sub-library real-time application cluster and the forwarding target system with a preset forwarding limit strategy.
Optionally, after the deploying and starting the universal gateway server according to the server configuration information and the target interceptor, the method further includes:
acquiring grade configuration data, memory object information and memory configuration information;
determining gateway instance level configuration data and database level configuration data according to the level configuration information;
and carrying out data monitoring and maintenance according to the gateway instance level configuration data, the database level configuration data, the memory object information and the memory configuration information.
In addition, in order to achieve the above object, the present invention also provides a service gateway deployment device, which includes:
the information acquisition module is used for acquiring server configuration information and service custom configuration information;
The interceptor assembling module is used for assembling a target interceptor according to the service custom configuration information;
the server deployment module is used for deploying and starting a universal gateway server according to the server configuration information and the target interceptor, and the universal gateway server comprises a request forwarding server and a local server;
the request processing module is used for receiving the service request of the external system, processing the service request and forwarding the service request to the service system.
In addition, in order to achieve the above object, the present invention also proposes a service gateway deployment device, including: the system comprises a memory, a processor and a service gateway deployment program stored on the memory and running on the processor, wherein the service gateway deployment program is configured to realize the service gateway deployment method.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a service gateway deployment program which, when executed by a processor, implements the service gateway deployment method as described above.
The method comprises the steps of obtaining server configuration information and service custom configuration information; assembling a target interceptor according to the service custom configuration information; deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server; and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system. By the method, the target interceptor is established, the server deployment of the universal gateway is carried out according to the service customized configuration information, so that different external systems can be adapted, the new service system is accessed to the universal gateway without secondary development, only the route configuration is required to be added, and the service request of the external system is directly processed and forwarded when the service request of the external system is received.
Drawings
Fig. 1 is a schematic structural diagram of a service gateway deployment device of a hardware running environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of a service gateway deployment method of the present invention;
FIG. 3 is a schematic diagram of a system architecture according to an embodiment of the service gateway deployment method of the present invention;
FIG. 4 is a schematic diagram of interceptor deployment in an embodiment of a method for deploying a service gateway of the present invention;
fig. 5 is a schematic flow chart of a second embodiment of a service gateway deployment method of the present invention;
fig. 6 is a block diagram of a first embodiment of a service gateway deployment apparatus according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a service gateway deployment device of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the service gateway deployment device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of the service gateway deployment apparatus, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a service gateway deployment program may be included in the memory 1005 as one type of storage medium.
In the service gateway deployment device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the service gateway deployment device of the present invention may be disposed in the service gateway deployment device, where the service gateway deployment device invokes a service gateway deployment program stored in the memory 1005 through the processor 1001, and executes the service gateway deployment method provided by the embodiment of the present invention.
The embodiment of the invention provides a service gateway deployment method, referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the service gateway deployment method of the invention.
In this embodiment, the service gateway deployment method includes the following steps:
Step S10: and acquiring server configuration information and service custom configuration information.
In this embodiment, the execution body of this embodiment may be the service gateway deployment device, where the service gateway deployment device has functions of data processing, data communication, program running, and the like, and the service gateway deployment device may be an intelligent gateway. Of course, other devices with similar functions may be used, and the implementation conditions are not limited thereto. For convenience of explanation, this embodiment will be described by taking a service gateway deployment device as an example.
It should be noted that, under the big background of cloud on the host, micro-service of the system and localization of the database, the gateway is used as a bridge for connecting the external system and the service system, and can connect networks with different formats, different communication protocols and different structure types, transmit and receive information packets, and forward the service request. As traffic continues to grow, business rules continue to expand, interactions and architecture between systems continue to become complex, and the number of systems continues to rise. Firstly, micro service architecture has become mainstream, the service system is divided into smaller and more, and the existing solution is to build a special gateway for each newly added service system, and the one-to-one mode makes the gateway number higher along with the water fluctuation of the service system. However, for those systems that are not at high risk or have low traffic, the dedicated gateway is not considered to be built, which not only occupies many unnecessary resources, but also is inconvenient for centralized management and monitoring. In addition, different gateways are provided with different databases to store gateway data, which also causes resource waste. Secondly, the current mainstream gateway solution focuses on traffic load balancing, format conversion, protocol conversion and the like which are irrelevant to services, and has single function and low expansibility. Current gateway solutions have not been able to meet the ever-evolving business demands and the new functionality has low expansion capability, requiring redesign and extensive effort. For example, as related work is expanded, it is not reasonable to put address packet verification related functions into each service system for implementation. Finally, the gateway lacks a corresponding monitoring mechanism, such as no visualization and monitoring of the gateway configuration, which has a great risk and is not easy to check when encountering problems. In addition, maintenance functions related to monitoring are not perfect, and problems cannot be handled in time.
It should be understood that the problems to be solved in this embodiment are the rapid increase in the number of gateways and the waste of resources caused by the one-to-one manner of the traditional gateway and the service system, the need to redesign and put in a great deal of effort to develop a new service system, the functions of route forwarding and flow control that do not support service customization, low expansibility of gateway service, imperfect monitoring mechanism, and the like. Compared with the existing mainstream gateway solution, the scheme of the embodiment provides a set of highly available and easily-expandable general service gateway solution. Firstly, with the micro-service of the service system, the current mainstream practice is to add more and more dedicated gateways, and this one-to-one mode can cause the increase of the number of gateways and the waste of resources. The patent provides a general gateway solution, namely, a plurality of service systems share a general gateway, a set of general routing strategies is extracted, various service systems are adapted, a new service system is accessed to the general gateway without secondary development, and only the routing configuration is required to be added. Secondly, the current gateway solution does not support functions such as routing forwarding and flow control of service customization, and many of the functions are realized based on the current gateway component, and only focus on functions such as simple routing and authentication which are irrelevant to the service. The universal gateway supports the current limiting control according to dimensions of operation bars, service systems and the like, supports different service systems to customize a route forwarding strategy according to actual service demands in a configuration mode, such as forwarding according to user information, forwarding according to bank card information, forwarding according to transaction information, forwarding according to contract information and the like, and facilitates expansion of more functions. The universal gateway not only meets the requirements under most service scenes, but also reduces the burden of the related work of the service system to a certain extent. Finally, the current gateway lacks a corresponding monitoring mechanism and visualization, the general gateway monitors and visualizes the conditions of the memory configuration and the database configuration at the instance level, and the general gateway monitors from the micro-service global view. The main ideas of the high-availability and easy-to-expand general service gateway solution are as follows: firstly, a configuration management system is built and is specially responsible for managing the configuration of all the universal gateways, so that all the universal gateways are stateless, and resources are saved by regularly removing the mode that the configuration management system pulls the memory. And secondly, expanding gateway functions by adding a custom interceptor mode, wherein the gateway functions comprise address packet verification, authentication, a service customized flow limiting strategy, a service customized request forwarding strategy and the like. Finally, the general gateway perfects the monitoring mechanism, and not only monitors the situation of the memory configuration and the database configuration at the instance level. The scheme can be used as a reference for constructing the gateway of each system, is suitable for most service systems, can provide functional codes, and can be grafted into the stock gateway to help the stock gateway to quickly obtain expansion capability.
It should be noted that the highly available and easily scalable generic gateway service solution consists of the following modules: the general gateway module, the configuration management module, the gateway monitoring module and the maintenance processing module, and the whole frame diagram is shown in fig. 3. The aggregation work in this stage is important, in which the universal gateway is directly interfaced with the external system, the number is variable, and which service systems are suitable for sharing the same gateway can be determined according to the characteristics of the downstream service systems. The gateway is provided with two ports for providing services, wherein the port 1 provides external system call, requests sequentially pass through a plurality of interceptors such as an address packet verification interceptor, a service customization flow limiting interceptor, a service customization route forwarding interceptor and the like in the gateway, and the requests are forwarded to a service system, so that the main functions of the gateway are realized; the port 2 is provided for maintenance system and monitoring system call, and is mainly used for maintaining and monitoring configuration data in the gateway micro service instance memory and the like. The gateway can communicate with the configuration management application to pull the configuration when being started, and the configuration data can be refreshed at a later time so as to ensure the real-time performance of the configuration data in the gateway memory. And the monitoring system can monitor the memory configuration and the database configuration of the micro service instance level. The maintenance front-end application provides maintenance functions for gateway instances and database configuration and the like.
It should be understood that after the gateway is started, the configuration of the forwarding request server is loaded first, then the service custom configuration (such as the traffic customized current limit, the application forwarding configuration, the job bar forwarding configuration, etc. acquired by the communication configuration management system) is loaded, then the interceptor is assembled, and finally the server is started and provides services for the external system, so that the server configuration information and the service custom configuration information are acquired first.
Step S20: and assembling a target interceptor according to the service custom configuration information.
In a specific implementation, firstly, service custom configuration information is invoked, so that target interceptors can be assembled, as shown in fig. 4, which is a schematic diagram of interceptor deployment, wherein the target interceptors are three kinds of address book checking interceptors, custom operation bar current limiting interceptors and custom request forwarding interceptors, and link tracking interceptors, performance tracking interceptors, data source trackers and the like can be deployed except for the target interceptors, and different request interceptors and response interceptors can be deployed among different corresponding service system nodes, so that different requirements of different service systems are realized. Specifically, the user or administrator can perform custom addition and deletion, and the starting and closing of the running states of the interceptors and the running rules can be freely adjusted in the using process.
Further, to assemble the target interceptor, step S20 includes: determining general configuration information, current limiter information and a route forwarding strategy according to the service custom configuration information; and configuring a target interceptor according to the general configuration information, wherein the target interceptor comprises an address packet verification interceptor, a customized job bar current limiting interceptor and a customized request forwarding interceptor.
It should be noted that, first, general configuration information is determined according to service custom configuration information, then, a target interceptor is configured according to the general configuration information, specifically, deployment and assembly of an address packet checking interceptor are performed according to the general configuration information, deployment and assembly of a custom operation bar current limiting interceptor are performed according to current limiter information, and deployment and assembly of a custom request forwarding interceptor are performed according to a routing forwarding policy.
It should be understood that, the address packet checking interceptor is used for performing address checking of the service request, the customized operation bar current limiting interceptor performs current limiting control on the service request in a configuration mode, and can perform combination flexible current limiting according to dimensions of service application, operation bar, external system and the like, and the customized request forwarding interceptor performs forwarding control on the service request through service customized configuration and customized routing forwarding policy.
In specific implementation, the number and the deployment sequence of the three target interceptors can be any sequence, the interceptors can be adjusted according to different requirements, and a plurality of different service systems can be used for parallel sharing of the interceptors.
By the method, the interceptor is deployed, and subsequent automatic service for an external system is facilitated.
Step S30: and deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server.
In a specific implementation, after the target interceptor is assembled, the deployment of the generic gateway server is performed according to the server configuration information, and the generic gateway server is directly started, so that the service to the external system is realized, and the generic gateway server comprises a request forwarding server (forwarding request) and a local server (processing local request).
Further, in order to perform deployment and startup of the server, step S30 includes: determining request forwarding server configuration information and local server configuration information according to the server configuration information; assembling the target interceptor to a request forwarding server, and deploying the request forwarding server according to the request forwarding server configuration information; deploying a local server according to the local server configuration information; and starting the request forwarding server and the local server.
It should be noted that, firstly, the configuration information of the request forwarding server and the local server is respectively extracted according to the server configuration information, then the target interceptor is deployed to the request forwarding server, then the configuration information of the request forwarding server is loaded, the deployed request forwarding server is obtained, the local server is loaded according to the deployment information of the local server, and finally the two servers are started, thereby completing the gateway configuration.
Further, the data monitoring and maintenance of the gateway are needed to be implemented and performed at the same time, and after step S30, the method further includes: acquiring grade configuration data, memory object information and memory configuration information; determining gateway instance level configuration data and database level configuration data according to the level configuration information; and carrying out data monitoring and maintenance according to the gateway instance level configuration data, the database level configuration data, the memory object information and the memory configuration information.
It should be understood that the local server in the universal gateway is responsible for interacting with the maintenance system and the monitoring system and performing local processing for maintaining and monitoring the gateway memory data. After the gateway is started, the server configuration is loaded firstly, then the interceptor is assembled, and finally the server is started to provide service for the outside. The service provided by the local server comprises configuration data of a gateway instance level and a database level, wherein the configuration data comprises a job bar current limiting configuration, an application forwarding configuration, refreshing and inquiring of the job bar forwarding configuration and the like; gateway instance level memory object information maintenance, such as restrictor refresh, etc.; monitoring the memory configuration and the database configuration of the instance level under the global view of the micro-service; more functions need only be developed simply.
In a specific implementation, under the current micro-uniform architecture, the conventional gateway lacks a monitoring mechanism of a global view. The method improves the monitoring mechanism of the gateway, avoids risks caused by inconsistent configuration information on each gateway instance, supports the real-time acquisition, verification and display of memory configuration conditions of all gateway instances under a micro-service architecture, and monitors and visualizes gateway configuration objects from a micro-service global view.
Step S40: and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system.
It should be understood that when a service request of an external system is received, the service request is processed, filtered by an interceptor, and forwarded to the service system after all the service requests are completed.
The embodiment obtains server configuration information and service custom configuration information; assembling a target interceptor according to the service custom configuration information; deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server; and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system. By the method, the target interceptor is established, the server deployment of the universal gateway is carried out according to the service customized configuration information, so that different external systems can be adapted, the new service system is accessed to the universal gateway without secondary development, only the route configuration is required to be added, and the service request of the external system is directly processed and forwarded when the service request of the external system is received.
Referring to fig. 5, fig. 5 is a schematic flow chart of a second embodiment of a service gateway deployment method according to the present invention.
Based on the above first embodiment, the service gateway deployment method in this embodiment includes, in the step S40:
step S401: when receiving a service request of an external system, determining a request address packet and general message information according to the service request.
When receiving a service request from an external system, the method determines a request address packet and general message information according to the service request, wherein the request address packet includes address packet related information, and the general message information includes character information, message type, message format and the like. The external system may be a random multiple active service system, a single database service system, or a multiple database service system.
Step S402: and performing address packet verification according to the request address packet, and performing customized request forwarding verification according to the general message information.
It should be understood that the verification is performed on the request address packet first, and the verification of the customized request forwarding of the general message information is performed at the same time, that is, the verification of the interceptor is verified through the address packet and the verification of the customized request forwarding interceptor.
Step S403: and forwarding the service request to a service system after the address packet checksum and the customized request forwarding verification are completed.
In the implementation, firstly, the verification of the customized request forwarding interceptor is performed, meanwhile, the verification of the address packet verification interceptor is performed, and after the verification of the customized request forwarding interceptor and the verification of the address packet verification interceptor pass, the request can be forwarded to the service system for processing.
Further, to complete the verification of the interceptor, step S403 includes: determining request content information, a forwarding target system and forwarding route information according to the general message information; comparing the request content information, the forwarding target system and the forwarding route information with a preset forwarding limit strategy; determining that the customized request forwarding verification is completed when the comparison is successful, and determining whether a core address packet exists according to the request address packet; when the core address packet exists and a sending service unit corresponding to the service request is determined, judging that the service request passes through address packet verification, and forwarding the service request to a service system; and when the core address packet does not exist, performing log printing of the service request, judging that the service request passes address packet verification after printing is finished, and forwarding the service request to the service system.
It should be noted that, firstly, the request content information, the forwarding target ohmmeter system and the forwarding route information are determined and compared with the preset forwarding limit policy, so as to determine whether the interception requirement of the customized request forwarding interceptor is met.
It should be appreciated that the overname of address packet verification is: general information inspection: checking message formats, protocol types, forwarding application checks, etc.; and (3) checking an address packet: and acquiring an address packet sent by an external system, wherein the address packet comprises a calling party sending service unit. The core address packet exists, and the service unit is necessary to fill; the core address packet does not exist, and the log is printed and then directly released. The service unit is transmitted and can also carry out authentication; other information inspection: the self-defined verification address package is allowed to be used for other elements, only simple development is needed, and the expansibility is strong.
Further, in order to perform customized request forwarding verification, the step of comparing the request content information, the forwarding target system, and the forwarding route information with a preset forwarding restriction policy includes: determining a forwarding service system, a forwarding operation bar name, a forwarding address, a message type, a character set, a protocol type and a protocol related context according to the request content information; determining a routing factor, a gray value, a sub-library name and a sub-library real-time application cluster according to the forwarding routing information; and comparing the forwarding service system, the forwarding operation bar name, the forwarding address, the message type, the character set, the protocol type, the protocol related context, the routing factor, the gray value, the sub-library name, the sub-library real-time application cluster and the forwarding target system with a preset forwarding limit strategy.
In specific implementation, forwarding control is performed on the service request through service customized configuration and customized routing forwarding strategy. The interceptor characteristics are as follows: supporting the conversion of service request general message information, namely, the request content information comprises a forwarding service system, a forwarding operation bar name, a forwarding address, a message type, a character set, a protocol type, a protocol related context and the like; the service system supporting the service request forwarding of various micro-service architectures comprises a forwarding random multi-active service system, a single database service system, a multi-database service system and the like; the micro-service routing information is converted through a preset routing forwarding strategy, and the forwarding routing information comprises a routing factor, a gray value, a sub-library name, a sub-library real-time application cluster (Real Application Cluster, RAC) and the like.
It should be noted that, the preset routing forwarding policy can flexibly expand service functions of various scenes in a configuration mode, and the purpose of forwarding or processing the request under different service scenes can be achieved by modifying the configuration on the premise that the external system does not modify the request message. The routing forwarding strategy is a general rule which analyzes most of service scenes and improves, for example, forwarding according to user information, forwarding according to bank card information, forwarding according to transaction information, forwarding according to contract information and the like. If the request forwarding function needs to be expanded, only configuration modification or simple development is needed, and the expansibility is high. The supported configuration content includes, but is not limited to, the following: system name, application name, operation bar name, forwarding application name, forwarding operation bar name, forwarding address, message type, communication protocol, application type, message interface, message field, routing factor rule, database sequence number rule, start-stop bitmap, etc.
It should be understood that, each time a conventional gateway adds a routing forwarding logic or modifies the routing forwarding logic, the conventional gateway needs to perform the processes of transformation, implementation, test, deployment, and verification, which is time-consuming and labor-consuming, and the transformation is distributed to each system, and has no unified standard, so that the quality of transformation and test cannot be guaranteed. The general gateway of the scheme has the advantages that the routing forwarding logic under most service scenes is arranged and realized in advance, the configuration mode is effective, the core logic is uniform, errors are not easy to occur, and the quality is guaranteed through detailed test.
In a specific implementation, the interceptor for performing the verification further comprises a custom job bar current limiting interceptor in the target interceptor: the flow limiting control is carried out on the service request in a configuration mode, and the flexible flow limiting can be combined according to the dimensions of service application, operation bars, external systems and the like. Checking whether a current limiter with specified dimension exists in the current limiting manager, if not, creating a current limiter by using the current limiting configuration, and putting the current limiter into the current limiting manager.
When a service request of an external system is received, the embodiment determines a request address packet and general message information according to the service request; address packet verification is carried out according to the request address packet, and customized request forwarding verification is carried out according to the general message information; and forwarding the service request to a service system after the address packet checksum and the customized request forwarding verification are completed. By the method, more services are expanded on the basis of the traditional gateway, the function of customizing the service is supported, flexible plug can be realized by configuration, and more functions are conveniently expanded. The universal gateway not only meets the requirements under most service scenes, but also reduces the burden of the related work of the service system to a certain extent.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium is stored with a service gateway deployment program, and the service gateway deployment program realizes the steps of the service gateway deployment method when being executed by a processor.
Because the storage medium adopts all the technical schemes of all the embodiments, the storage medium has at least all the beneficial effects brought by the technical schemes of the embodiments, and the description is omitted here.
Referring to fig. 6, fig. 6 is a block diagram illustrating a first embodiment of a service gateway deployment apparatus according to the present invention.
As shown in fig. 6, the service gateway deployment device provided by the embodiment of the present invention includes:
the information acquisition module 10 is configured to acquire server configuration information and service custom configuration information.
And the interceptor assembling module 20 is configured to assemble a target interceptor according to the service custom configuration information.
The server deployment module 30 is configured to deploy and start a generic gateway server according to the server configuration information and the target interceptor, where the generic gateway server includes a request forwarding server and a local server.
The request processing module 40 is configured to receive a service request from an external system, process the service request, and forward the processed service request to the service system.
The embodiment obtains server configuration information and service custom configuration information; assembling a target interceptor according to the service custom configuration information; deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server; and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system. By the method, the target interceptor is established, the server deployment of the universal gateway is carried out according to the service customized configuration information, so that different external systems can be adapted, the new service system is accessed to the universal gateway without secondary development, only the route configuration is required to be added, and the service request of the external system is directly processed and forwarded when the service request of the external system is received.
In an embodiment, the interceptor assembly module 20 is further configured to determine general configuration information, restrictor information, and a routing forwarding policy according to the service custom configuration information; and configuring a target interceptor according to the general configuration information, wherein the target interceptor comprises an address packet verification interceptor, a customized job bar current limiting interceptor and a customized request forwarding interceptor.
In an embodiment, the server deployment module 30 is further configured to determine request forwarding server configuration information and local server configuration information according to the server configuration information; assembling the target interceptor to a request forwarding server, and deploying the request forwarding server according to the request forwarding server configuration information; deploying a local server according to the local server configuration information; and starting the request forwarding server and the local server.
In an embodiment, the request processing module 40 is further configured to, when receiving a service request of an external system, determine a request address packet and general packet information according to the service request; address packet verification is carried out according to the request address packet, and customized request forwarding verification is carried out according to the general message information; and forwarding the service request to a service system after the address packet checksum and the customized request forwarding verification are completed.
In one embodiment, the request processing module 40 is further configured to determine request content information, forwarding target system, and forwarding route information according to the general packet radio service; comparing the request content information, the forwarding target system and the forwarding route information with a preset forwarding limit strategy; determining that the customized request forwarding verification is completed when the comparison is successful, and determining whether a core address packet exists according to the request address packet; when the core address packet exists and a sending service unit corresponding to the service request is determined, judging that the service request passes through address packet verification, and forwarding the service request to a service system; and when the core address packet does not exist, performing log printing of the service request, judging that the service request passes address packet verification after printing is finished, and forwarding the service request to the service system.
In an embodiment, the request processing module 40 is further configured to determine a forwarding service system, a forwarding job bar name, a forwarding address, a message type, a character set, a protocol type, and a protocol-related context according to the request content information; determining a routing factor, a gray value, a sub-library name and a sub-library real-time application cluster according to the forwarding routing information; and comparing the forwarding service system, the forwarding operation bar name, the forwarding address, the message type, the character set, the protocol type, the protocol related context, the routing factor, the gray value, the sub-library name, the sub-library real-time application cluster and the forwarding target system with a preset forwarding limit strategy.
In one embodiment, the server deployment module 30 is further configured to obtain the level configuration data, the memory object information, and the memory configuration information; determining gateway instance level configuration data and database level configuration data according to the level configuration information; and carrying out data monitoring and maintenance according to the gateway instance level configuration data, the database level configuration data, the memory object information and the memory configuration information.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the invention as desired, and the invention is not limited thereto.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present invention, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
In addition, technical details not described in detail in this embodiment may refer to the service gateway deployment method provided in any embodiment of the present invention, which is not described herein again.
Furthermore, it should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. Read Only Memory)/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The service gateway deployment method is characterized by comprising the following steps:
acquiring server configuration information and service custom configuration information;
assembling a target interceptor according to the service custom configuration information;
deploying and starting a universal gateway server according to the server configuration information and the target interceptor, wherein the universal gateway server comprises a request forwarding server and a local server;
and receiving a service request of an external system, processing the service request, and forwarding the service request to the service system.
2. The service gateway deployment method according to claim 1, wherein said assembling a target interceptor according to said service custom configuration information comprises:
determining general configuration information, current limiter information and a route forwarding strategy according to the service custom configuration information;
and configuring a target interceptor according to the general configuration information, wherein the target interceptor comprises an address packet verification interceptor, a customized job bar current limiting interceptor and a customized request forwarding interceptor.
3. The service gateway deployment method according to claim 1, wherein said deploying and starting a generic gateway server according to said server configuration information and said target interceptor comprises:
Determining request forwarding server configuration information and local server configuration information according to the server configuration information;
assembling the target interceptor to a request forwarding server, and deploying the request forwarding server according to the request forwarding server configuration information;
deploying a local server according to the local server configuration information;
and starting the request forwarding server and the local server.
4. The service gateway deployment method according to claim 1, wherein the receiving the service request of the external system and forwarding the service request to the service system after processing the service request comprises:
when a service request of an external system is received, determining a request address packet and general message information according to the service request;
address packet verification is carried out according to the request address packet, and customized request forwarding verification is carried out according to the general message information;
and forwarding the service request to a service system after the address packet checksum and the customized request forwarding verification are completed.
5. The service gateway deployment method according to claim 4, wherein said forwarding the service request to a service system according to the address packet checksum after the completion of the customized request forwarding verification comprises:
Determining request content information, a forwarding target system and forwarding route information according to the general message information;
comparing the request content information, the forwarding target system and the forwarding route information with a preset forwarding limit strategy;
determining that the customized request forwarding verification is completed when the comparison is successful, and determining whether a core address packet exists according to the request address packet;
when the core address packet exists and a sending service unit corresponding to the service request is determined, judging that the service request passes through address packet verification, and forwarding the service request to a service system;
and when the core address packet does not exist, performing log printing of the service request, judging that the service request passes address packet verification after printing is finished, and forwarding the service request to the service system.
6. The service gateway deployment method according to claim 5, wherein said comparing said request content information, said forwarding target system, and said forwarding route information with a preset forwarding restriction policy comprises:
determining a forwarding service system, a forwarding operation bar name, a forwarding address, a message type, a character set, a protocol type and a protocol related context according to the request content information;
Determining a routing factor, a gray value, a sub-library name and a sub-library real-time application cluster according to the forwarding routing information;
and comparing the forwarding service system, the forwarding operation bar name, the forwarding address, the message type, the character set, the protocol type, the protocol related context, the routing factor, the gray value, the sub-library name, the sub-library real-time application cluster and the forwarding target system with a preset forwarding limit strategy.
7. The service gateway deployment method according to any one of claims 1 to 6, wherein after deploying and starting a generic gateway server according to the server configuration information and the target interceptor, further comprising:
acquiring grade configuration data, memory object information and memory configuration information;
determining gateway instance level configuration data and database level configuration data according to the level configuration information;
and carrying out data monitoring and maintenance according to the gateway instance level configuration data, the database level configuration data, the memory object information and the memory configuration information.
8. A service gateway deployment apparatus, the service gateway deployment apparatus comprising:
The information acquisition module is used for acquiring server configuration information and service custom configuration information;
the interceptor assembling module is used for assembling a target interceptor according to the service custom configuration information;
the server deployment module is used for deploying and starting a universal gateway server according to the server configuration information and the target interceptor, and the universal gateway server comprises a request forwarding server and a local server;
the request processing module is used for receiving the service request of the external system, processing the service request and forwarding the service request to the service system.
9. A service gateway deployment device, the service gateway deployment device comprising: a memory, a processor, and a service gateway deployment program stored on the memory and running on the processor, the service gateway deployment program configured to implement the service gateway deployment method of any of claims 1 to 7.
10. A storage medium having stored thereon a service gateway deployment program which, when executed by a processor, implements the service gateway deployment method of any of claims 1 to 7.
CN202311267641.9A 2023-09-26 2023-09-26 Service gateway deployment method, device, equipment and storage medium Pending CN117221114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311267641.9A CN117221114A (en) 2023-09-26 2023-09-26 Service gateway deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311267641.9A CN117221114A (en) 2023-09-26 2023-09-26 Service gateway deployment method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117221114A true CN117221114A (en) 2023-12-12

Family

ID=89040519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311267641.9A Pending CN117221114A (en) 2023-09-26 2023-09-26 Service gateway deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117221114A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118337428A (en) * 2024-04-08 2024-07-12 三峡高科信息技术有限责任公司 Network security data interception method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118337428A (en) * 2024-04-08 2024-07-12 三峡高科信息技术有限责任公司 Network security data interception method and system

Similar Documents

Publication Publication Date Title
US8402132B2 (en) Method, system and device for device capabilities exchange
CN109474936B (en) Internet of things communication method and system applied among multiple lora gateways
CN109656688B (en) Method, system and server for realizing distributed business rules
US8341285B2 (en) Method and system for transferring files
CN103051551A (en) Distributed system and automatic maintaining method for same
CN112637037B (en) Cross-region container communication system, method, storage medium and computer equipment
CN112637332B (en) Service registration discovery method and system
CN117221114A (en) Service gateway deployment method, device, equipment and storage medium
CN113746928B (en) Cross-cloud service calling method, device and system
CN115086176B (en) System for realizing dynamic issuing of service administration strategy based on spring cloud micro-service technology
CN114036236A (en) Multi-gateway cluster system
CN111770122A (en) Service communication agent SCP registration method, service calling method and network equipment
CN112968965A (en) Metadata service method, server and storage medium for NFV network node
CN100484014C (en) Distributed cluster service management system and service management method in intelligent network
CN112351106B (en) Service grid platform containing event grid and communication method thereof
CN113918326B (en) Method and device for processing request
CN113742100B (en) Service calling method, system, equipment and medium based on micro-service architecture
CN113259146B (en) Micro-service access control method and device and micro-service system
CN110324425B (en) Hybrid cloud transaction route processing method and device
CN105229990B (en) The method and apparatus for loading webpage
CN112689013A (en) System, method and device for service discovery
CN110830602A (en) Distribution network terminal communication test system and method based on dynamic domain name resolution
CN115102854B (en) Remote procedure call route management control method, system and equipment for micro-service
CN112187816B (en) RPC request processing method, equipment and storage medium
CN115361298B (en) Service management method based on data subscription distribution network

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