Gateway configuration method and device and computer equipment

By providing gateway configuration methods and devices, supporting visual configuration and hot-swapping of filters, the problems of cumbersome configuration and difficult routing management of existing industrial application gateways are solved, achieving efficient routing management and real-time updates, and improving the ease of use and flexibility of application gateways.

CN119011391APending Publication Date: 2024-11-22石化盈科信息技术有限责任公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410952816.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing industrial application gateways are cumbersome to configure and difficult to change, making it difficult to achieve flexible routing management and real-time updates, which can lead to temporary network link interruptions.

Method used

This paper provides a gateway configuration method that generates an application gateway by responding to filter selection and setting instructions. It supports visual configuration and hot-swapping of filters and combines a visual interface and API interface to achieve dynamic management and real-time updates of routes.

Benefits of technology

It improves the configuration and routing flexibility of the application gateway, enables efficient processing of various requests, simplifies operation and maintenance, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011391A_ABST
    Figure CN119011391A_ABST
Patent Text Reader

Abstract

The invention provides a gateway configuration method and device and computer equipment, and the method comprises the steps: responding to a filter selection instruction, and selecting a target filter from alternative filters; in response to a filter setting instruction, setting the target filter; and generating an application gateway based on the set target filter. According to the method provided by the embodiment of the invention, the configuration flexibility and the routing flexibility of the application gateway can be improved, and efficient processing of each request is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a gateway configuration method, device and computer equipment. Background Art

[0002] With the development of the industrial Internet, various industrial application systems have also continued to emerge, and many offline operations of staff have gradually transformed into online operations for industrial application systems. However, due to the wide variety of industrial application systems, staff often need to log in to each system repeatedly to complete daily business. The industrial Internet platform can integrate various industrial application systems to form a unified entrance. Among them, the industrial application gateway can serve as the same entrance of the industrial Internet platform, which can connect various industrial application systems to realize the functions of authentication, management, distribution and statistics of network traffic. However, most of the existing industrial application gateways are based on open source API gateway components, which have problems such as cumbersome configuration, difficult changes, difficult business control, and the need to start the application gateway for the changes to take effect, resulting in temporary interruption of the network link. Summary of the invention

[0003] In order to solve the problem of insufficient flexibility of existing Internet gateways, the present application provides a gateway configuration method, apparatus and computer equipment, which can improve the flexibility of application gateway configuration and routing flexibility and realize efficient processing of various requests.

[0004] In one aspect, a gateway configuration method is provided, the method comprising:

[0005] In response to the filter selection instruction, a target filter is selected from the candidate filters;

[0006] In response to the filter setting instruction, the target filter is set;

[0007] An application gateway is generated based on the set target filter.

[0008] In some embodiments, the filter setting instruction includes a sequence adjustment instruction and a parameter configuration instruction; the response filter setting instruction sets the target filter, including:

[0009] In response to the order adjustment instruction, adjusting the order of each of the target filters;

[0010] In response to the parameter configuration instruction, the parameters of each of the target filters are adjusted.

[0011] In some embodiments, the method further comprises:

[0012] Display the candidate filters, respond to the filter selection instruction on the display interface, and select the target filter;

[0013] Responding to the filter setting instruction on the display interface, setting the target filter;

[0014] Displays the application gateway generated based on the target filter that has been set.

[0015] In some embodiments, generating an application gateway based on the set target filter includes:

[0016] In addition to the original filter link in the application gateway, generating a target filter link based on the target filter;

[0017] The application gateway is generated based on the original filter link and the target filter link.

[0018] In some embodiments, the method further comprises:

[0019] In response to a filter link template selection instruction, a pre-stored filter link template is obtained;

[0020] The application gateway is generated based on the filtering link template.

[0021] In some embodiments, after producing an application gateway based on the set target filter, the method further includes:

[0022] Receive target request information, traverse each route based on the target request information and a pre-stored configuration policy, and determine a target route;

[0023] Sending the target request information to the filter link corresponding to the target route;

[0024] The target request information is forwarded to a server cluster based on the filter link.

[0025] In another aspect, a gateway configuration device is provided, the device comprising:

[0026] A filter selection module, used to respond to a filter selection instruction and select a target filter from among the candidate filters;

[0027] A filter setting module, used to respond to a filter setting instruction and set the target filter;

[0028] The application gateway generation module is used to generate an application gateway based on the set target filter.

[0029] In some embodiments, the filter setting module is specifically used to:

[0030] In response to the order adjustment instruction, adjusting the order of each of the target filters;

[0031] In response to the parameter configuration instruction, the parameters of each of the target filters are adjusted.

[0032] In some embodiments, the device is further used to:

[0033] Display the candidate filters, respond to the filter selection instruction on the display interface, and select the target filter;

[0034] Responding to the filter setting instruction on the display interface, setting the target filter;

[0035] Displays the application gateway generated based on the target filter that has been set.

[0036] In some embodiments, the application gateway generation module is specifically used to:

[0037] In addition to the original filter link in the application gateway, generating a target filter link based on the target filter;

[0038] The application gateway is generated based on the original filter link and the target filter link.

[0039] In some embodiments, the device is further used to:

[0040] In response to a filter link template selection instruction, a pre-stored filter link template is obtained;

[0041] The application gateway is generated based on the filtering link template.

[0042] In some embodiments, the device is further used to:

[0043] Receive target request information, traverse each route based on the target request information and a pre-stored configuration policy, and determine a target route;

[0044] Sending the target request information to the filter link corresponding to the target route;

[0045] The target request information is forwarded to a server cluster based on the filter link.

[0046] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the processor can load and execute at least one instruction, at least one program, a code set or an instruction set to implement the gateway configuration method provided in the above-mentioned application embodiment.

[0047] On the other hand, an application gateway is provided, including a reverse proxy module and a load balancing module;

[0048] The reverse proxy module is used to receive and parse request information, and forward the request information to the load balancing module;

[0049] The load balancing module is used to forward the request information to the background server cluster based on the pre-stored forwarding strategy.

[0050] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, code set or instruction set is stored, and a processor can load and execute at least one instruction, at least one program, code set or instruction set to implement the gateway configuration method provided in the above-mentioned embodiment of the present application.

[0051] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer program instructions, and the computer program instructions are stored in a computer-readable storage medium. The processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions, so that the computer device executes the gateway configuration method described in any of the above embodiments.

[0052] The beneficial effects brought by the technical solution provided by the present application include at least: the embodiment of the present invention provides a gateway configuration method, device and computer equipment, the method includes responding to a filter selection instruction, selecting a target filter from candidate filters; responding to a filter setting instruction, setting the target filter; generating an application gateway based on the set target filter. The method provided by the embodiment of the present invention can improve the configuration flexibility and routing flexibility of the application gateway and realize efficient processing of each request. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 A schematic diagram of an implementation flow of a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0055] Figure 2 A filter link schematic diagram in a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0056] Figure 3 A schematic diagram of a filter hot-swap mechanism in a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0057] Figure 4 A schematic diagram of a request processing flow in a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0058] Figure 5 A schematic diagram of a processing flow after a request to enter a gateway in a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0059] Figure 6 Another implementation flow diagram of a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0060] Figure 7 A structural diagram of a gateway configuration device provided by an exemplary embodiment of the present application is shown;

[0061] Figure 8 A schematic diagram showing the structure of a computer device corresponding to a gateway configuration method provided by an exemplary embodiment of the present application is shown;

[0062] Fig. 9 A gateway function schematic diagram corresponding to a gateway configuration method provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0063] In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0064] Existing application gateways can be implemented based on software or hardware, and have capabilities such as reverse proxy, load balancing, security, caching, compression, and network traffic monitoring. However, it is difficult to manage large amounts of routing link data, and there are still some problems in actual production environment applications.

[0065] For example, F5 is a hardware-based gateway component that can support some common gateway functions such as load balancing, security, caching, and compression. It is usually used for common gateway solutions such as load balancing and proxy. However, this type of gateway is expensive, difficult to deploy, and difficult to achieve customized business expansion.

[0066] Nginx is a reverse proxy and load balancing open source gateway based on TCP / HTTP protocol. It can be used as an API gateway in microservice architecture to provide routing, load balancing, security, monitoring and other functions. This type of gateway implements routing management based on configuration files, has no visual configuration interface, and is difficult to achieve dynamic management and real-time update of a large number of routes. In addition, the development and deployment of the corresponding customized plug-ins requires compilation and installation, which is a cumbersome process and requires high technical proficiency and technical support, and a long development cycle.

[0067] Kong is a visual configuration API gateway based on Nginx, which can realize visual configuration interface and plug-in management. Its open source version can provide basic routing, load balancing, authentication, monitoring and other functions and support plug-in extension. However, the plug-in of this type of gateway open source version is difficult to meet actual needs, and the performance of the plug-in implemented based on Lua script is poor, and the cost of long-term operation and maintenance is high.

[0068] Zuul is an open source API gateway provided by Netflix, which provides dynamic routing, monitoring, elastic scaling and other functions. This type of gateway is based on Java and implements routing management through configuration files. It has no visual configuration interface, making it difficult to dynamically manage and update a large number of routes in real time. In addition, its plug-in mechanism is globally effective, which makes it difficult to meet the customization requirements of various applications on the Industrial Internet platform.

[0069] Gateway is an open source API gateway provided by Spring Cloud. It is implemented based on Java and has a plug-in mechanism. It provides basic functions similar to Zuul. It uses the asynchronous grid framework Netty as the basic component and has high performance. Its routing configuration and plug-in mechanism can be dynamically loaded and take effect in real time through the API interface. This type of gateway supports caching and configuration files to achieve routing management. It has no visual configuration interface, making it difficult to achieve dynamic management and real-time updates of a large number of routes.

[0070] Embodiment 1

[0071] Figure 1 A schematic diagram of an implementation flow of a gateway configuration method provided by an embodiment of the present invention is shown.

[0072] See also Figure 1 The gateway configuration method provided in the embodiment of the present invention may include steps 101 to 103.

[0073] Step 101: In response to a filter selection instruction, a target filter is selected from candidate filters.

[0074] Step 102: In response to the filter setting instruction, the target filter is set.

[0075] In some embodiments, the filter setting instruction includes a sequence adjustment instruction and a parameter configuration instruction; the response filter setting instruction sets the target filter, including:

[0076] In response to the order adjustment instruction, adjusting the order of each of the target filters;

[0077] In response to the parameter configuration instruction, the parameters of each of the target filters are adjusted.

[0078] In some embodiments, the method further comprises:

[0079] Display the candidate filters, respond to the filter selection instruction on the display interface, and select the target filter;

[0080] Responding to the filter setting instruction on the display interface, setting the target filter;

[0081] Displays the application gateway generated based on the target filter that has been set.

[0082] Step 103: Generate an application gateway based on the set target filter.

[0083] In some embodiments, generating an application gateway based on the set target filter includes:

[0084] In addition to the original filter link in the application gateway, generating a target filter link based on the target filter;

[0085] The application gateway is generated based on the original filter link and the target filter link.

[0086] Figure 2 A filter link schematic diagram provided by an embodiment of the present invention is shown.

[0087] See also Figure 2 , filters are used to analyze, verify and process http requests, and are the core of completing a series of business operations. The filter link configuration connects a group of business operation filters in series to form a link to achieve the required function. The parameter configuration and order of the filters are presented visually, which can greatly improve the usability of the industrial Internet platform. Specifically, the request passes through each filter in the filter chain in turn and enters the service cluster. The processing results of the service cluster are then output by the filter chain. During the transmission and processing process, the filter is used to determine whether there is an abnormality or whether it needs to be interrupted in advance.

[0088] Figure 3 A schematic diagram of a filter hot-swap mechanism provided by an embodiment of the present invention is shown.

[0089] See also Figure 3 , the filter hot-swap mechanism applies the filter link to the routing link, achieves the effect of specifying different filter link processing for different routes, and realizes the routing-level filter hot-swap mechanism. The routing-level filter plug-in does not affect each other's routing link processing, ensures the real-time performance of filter hot-swap, and improves the flexibility of application gateway routing. Specifically, the request enters the filter link processing through the routing strategy. The filter link can hot-swap various filters in the filter list, select filter access based on the actual needs of the user, and then enter the service cluster after routing forwarding and load balancing processing to achieve efficient processing of each request.

[0090] The embodiment of the present invention realizes the basic functions of the gateway through routing management, and realizes flexible and diverse routing link control capabilities through hot plug mechanism and service filter store.

[0091] In some embodiments, the method further comprises:

[0092] In response to a filter link template selection instruction, a pre-stored filter link template is obtained;

[0093] The application gateway is generated based on the filtering link template.

[0094] In some embodiments, after producing an application gateway based on the set target filter, the method further includes:

[0095] Receive target request information, traverse each route based on the target request information and a pre-stored configuration policy, and determine a target route;

[0096] Sending the target request information to the filter link corresponding to the target route;

[0097] The target request information is forwarded to a server cluster based on the filter link.

[0098] Figure 4 A schematic diagram of a request processing flow provided by an embodiment of the present invention is shown.

[0099] See also Figure 4 In the processing flow provided by the embodiment of the present invention, the request enters the application gateway, undergoes user authentication, user information transmission, routing forwarding and load balancing operations in the gateway, and sends the request carrying user information to the service cluster for further processing. The authentication system can authenticate the user information.

[0100] Figure 5 A schematic diagram of the processing flow after a request enters a gateway provided by an embodiment of the present invention is shown.

[0101] See also Figure 5 , the routing strategy is divided into path strategy and domain name strategy. When the request enters the gateway, the gateway traverses all routes. During the traversal process, the gateway uses the configured strategy to determine whether the current request meets the forwarding requirements until a route that meets the requirements is found. Then the request enters the corresponding route to perform subsequent filter link processing. Specifically, after the request enters the gateway, it traverses all routes to enter the matching service cluster for processing. In any route, the routing strategy needs to perform path assertion and / or domain name assertion, and after filtering link processing, the route is finally forwarded to the corresponding service cluster under the condition of satisfying load balancing.

[0102] Furthermore, the gateway provided by the embodiment of the present invention can manage discarded texts, realize the persistence of routing data through a visual interface and a database, and support the management of routing data with large amounts of data. The visual link configuration interface can simplify the professionalism and complexity of routing configuration and reduce the operation and maintenance costs of the gateway. On the other hand, the API interface provided to the gateway component can realize the dynamic synchronization of routing change information, dynamic routing loading, and real-time effectiveness of configuration changes.

[0103] The common business functions of the Industrial Internet platform include network security, user authentication, link management and business data carrying. Among them, the network security function is used to verify the legitimacy of requests in the Industrial Internet, including XSS vulnerability attack protection, SQL injection attack protection, referer anti-hotlink protection and special character verification. User authentication includes authentication based on multiple authentication protocols, such as CAS authentication protocol, OAuth2 authentication protocol, SAML authentication protocol and simple and Basic Auth authentication. Link management includes rewriting request headers and rewriting request paths, and supports modifying the request headers and request paths of the original request in the routing forwarding signature. Business data carrying includes request session management, user information transmission and log audit information. Request session management implements distributed session management based on Redis, supports cluster deployment, and realizes session sharing between gateway clusters for storing business data. User information transmission function After the user authentication is completed, the user reads the user's basic information and transmits the user information to the background service during routing forwarding. The background service can use the information for authentication or further business processing. Specifically, the log audit information includes the basic information of the original request, the basic information of the response and the matching routing forwarding configuration details. The above business functions are implemented based on multiple filters. The filter store displays business filters in groups, provides filter configuration properties and parameter descriptions, and implements visual selection, order adjustment, and parameter configuration of filters.

[0104] The gateway provided by the embodiment of the present invention can realize flexible and diverse routing link control through hot-swap mechanism and business filter store on the basic functions of the gateway. The industrial Internet application gateway can configure a variety of filter plug-ins based on the filter plug-in store, and cooperate with the hot-swap mechanism to realize flexible configuration of routing management services. Furthermore, the visual console interface and API interface provided by the gateway component can be used to connect configuration personnel and other management and control components, which can improve the usability, flexibility and business development capabilities of the application gateway, reduce the threshold and cost of operation and maintenance, and effectively improve the efficiency of operation and maintenance.

[0105] Furthermore, the application gateway in the gateway configuration method provided in the embodiment of the present invention can provide a unified entry for various software systems of the industrial Internet, and add dynamic plug-in and unplug-out of filters, real-time configuration update, filter store, visual filter link configuration and filter link template configuration, effectively improving the flexibility and usability of the soft gateway, and is suitable for various industrial software integration application fields. In addition to the industrial Internet field, the application gateway provided in the embodiment of the present invention is also used in many Internet system integration scenarios. Through the gateway provided by the present invention, the integration of various API interfaces in the Internet system can be realized, and the security of the request link can be guaranteed by exposing a unified entry address, and the link can be flexibly managed.

[0106] In summary, the gateway configuration method provided in the embodiment of the present invention can realize the basic functions of gateway load balancing and reverse proxy, realize the hot-swap mechanism of the filter, support real-time update and real-time effectiveness of routing configuration, realize the visual dynamic configuration function of the filter, and support flexible and diverse routing link control requirements. Specifically, the order of filters can be adjusted by dragging the console filter, and the filter chain template configuration function can be added through the filter store to simplify the configuration process of link processing. The pluggable business filter application gateway provided in this application can provide a visual console page and four types of filters, simplify the configuration process and operation and maintenance operations of the application gateway, and improve the stability, usability and flexibility of the application gateway.

[0107] Embodiment 2

[0108] Figure 6 Another implementation flow diagram of the gateway configuration method provided by an embodiment of the present invention is shown.

[0109] See also Figure 6 In a specific example, the implementation process of the gateway configuration method provided by the embodiment of the present invention is as follows.

[0110] Select filters from the filter store, drag filters to adjust the order, click filter configuration parameters, and finally submit. That is, in the visual filter link configuration interface, select several filters from the filter store. This step supports dragging to adjust the order of filters. Click to configure the filter properties. After all configurations are completed, submit to complete the configuration of route filter link processing.

[0111] Furthermore, as a supplement to the visual filter link configuration, the method provided by the embodiment of the present invention can perform visual filter link template configuration, specify common business scenarios, and enhance the reusability of filter link configuration. Specifically, during the link configuration process, a prefabricated filter link template can be directly selected to complete the filter link configuration, reducing the repetitive work of operators and simplifying the configuration process. In addition, the routing filter link can be visually adjusted at any time, which improves the flexibility of the filter chain configuration while ensuring ease of use and efficiency.

[0112] Existing gateways and traffic control methods may include gateway working nodes and gateway management nodes, wherein the gateway working nodes are used to process access requests and limit the flow of access requests, and the gateway management nodes are used to manage the flow of gateway working nodes and update the configurable parameters of the gateway working nodes. Such gateways can implement traffic control and avoid system anomalies caused by abnormal access traffic.

[0113] Compared with existing gateways, the gateway configuration method provided by this application can apply the gateway to process access requests, perform load balancing and traffic forwarding, support visual management and control of millions of routing data, and support hot plugging of business filters, and provide filter stores and filter link template management. The gateway for industrial Internet platform applications provided by the present invention can avoid the problems that traditional gateways are difficult to manage large amounts of routing configuration data, difficult to flexibly control routing link processing, and difficult for configurations to take effect in real time. Through a visual interface, the industrial Internet platform application gateway provided by an embodiment of the present invention can improve the usability of the industrial Internet platform and achieve flexible business expansion.

[0114] In a specific example, the background service is the server address that provides processing capabilities for the business, which can be registered in the application gateway as the final target of the user request. Background services can be divided into two types: manual registration and automatic registration. Manual registration refers to the configuration entry of the IP address and port of the background service through the configuration interface, and automatic registration refers to the background service integrating the service registration and discovery center of the Internet platform to realize dynamic registration of the background service address and service health status check.

[0115] The gateway configuration method provided by the embodiment of the present invention can realize the basic functions of the gateway through routing management, and realize flexible and diverse routing link control through hot plug mechanism and service filtering store, which can be applied in network security, user authentication, link management and service data bearing. The application gateway provided by the embodiment of the present invention provides 4 cores and 8G memory concurrency, supports 4000qps forwarding volume and millisecond forwarding loss, supports millisecond matching of millions of routing data volumes, and has built-in multiple load balancing algorithms, such as polling algorithm, random algorithm and weighted polling algorithm.

[0116] Embodiment 3

[0117] Figure 7 A schematic diagram of the structure of a gateway configuration device provided by an embodiment of the present invention is shown.

[0118] See also Figure 7 , the gateway configuration device provided by the embodiment of the present invention may include:

[0119] The filter selection module 201 is used to respond to the filter selection instruction and select a target filter from the candidate filters;

[0120] The filter setting module 202 is used to respond to the filter setting instruction and set the target filter;

[0121] The application gateway generation module 203 is used to generate an application gateway based on the set target filter.

[0122] In some embodiments, the filter setting module 202 is specifically used to:

[0123] In response to the order adjustment instruction, adjusting the order of each of the target filters;

[0124] In response to the parameter configuration instruction, the parameters of each of the target filters are adjusted.

[0125] In some embodiments, the device is further used to:

[0126] Display the candidate filters, respond to the filter selection instruction on the display interface, and select the target filter;

[0127] Responding to the filter setting instruction on the display interface, setting the target filter;

[0128] Displays the application gateway generated based on the target filter that has been set.

[0129] In some embodiments, the application gateway generation module 203 is specifically used to:

[0130] In addition to the original filter link in the application gateway, generating a target filter link based on the target filter;

[0131] The application gateway is generated based on the original filter link and the target filter link.

[0132] In some embodiments, the device is further used to:

[0133] In response to a filter link template selection instruction, a pre-stored filter link template is obtained;

[0134] The application gateway is generated based on the filtering link template.

[0135] In some embodiments, the device is further used to:

[0136] Receive target request information, traverse each route based on the target request information and a pre-stored configuration policy, and determine a target route;

[0137] Sending the target request information to the filter link corresponding to the target route;

[0138] The target request information is forwarded to a server cluster based on the filter link.

[0139] In summary, the device provided by the embodiment of the present invention can improve the configuration flexibility and routing flexibility of the application gateway and realize efficient processing of each request.

[0140] Embodiment 4:

[0141] Figure 8 A schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown, and the computer device includes:

[0142] The processor 301 includes one or more processing cores. The processor 301 executes various functional applications and data processing by running software programs and modules.

[0143] The receiver 302 and the transmitter 303 can be implemented as a communication component, and the communication component can be a communication chip. Optionally, the communication component can be implemented to include a signal transmission function. That is, the transmitter 303 can be used to transmit a control signal to the image acquisition device and the scanning device, and the receiver 302 can be used to receive the corresponding feedback instruction.

[0144] The memory 304 is connected to the processor 301 via a bus 305 .

[0145] The memory 304 may be used to store at least one instruction, and the processor 301 may be used to execute the at least one instruction to implement steps 101 to 102 in the above method embodiment.

[0146] Those skilled in the art will understand that Figure 8 It is only an example of a computer device and does not constitute a limitation of the computer device. The computer device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include a network access device, etc.

[0147] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0148] The memory 304 may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The memory 304 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the memory 304 may also include both an internal storage unit of the computer device and an external storage device. The memory 304 is used to store the computer program and other programs and data required by the terminal device. The memory 304 may also be used to temporarily store data that has been output or is to be output.

[0149] Embodiment 5

[0150] The embodiment of the present application also provides an application gateway, 9 including a reverse proxy module and a load balancing module;

[0151] The reverse proxy module is used to receive and parse request information, and forward the request information to the load balancing module;

[0152] The load balancing module is used to forward the request information to the background server cluster based on the pre-stored forwarding strategy.

[0153] Fig. 9 A schematic diagram of gateway functions provided by an embodiment of the present invention is shown.

[0154] See also Fig. 9 The industrial Internet gateway provided by the embodiment of the present invention can realize the reverse proxy and load balancing functions. Specifically, after the inlet traffic enters the application gateway, it enters the load balancer through the forwarding of the reverse proxy, and the load balancer sends the data to different clusters of the background server to realize data transmission and processing.

[0155] The reverse proxy function is used to provide a unified entry, parse http requests, and forward requests to the corresponding backend service address according to the domain name and / or path. Load balancing is used when the backend service is a multi-node cluster service. The gateway provides different forwarding strategies based on the load balancing algorithm, where the load balancing algorithm includes but is not limited to the polling algorithm, random algorithm, weighted polling algorithm, etc.

[0156] The routing management mechanism includes routing strategy, filter link configuration and background service configuration. Routing means distributing requests to background services according to the specified routing strategy and returning the response of the background service to the requester; the routing strategy is the basis for judging whether the request meets the forwarding requirements, and the background service is the IP address and port of one or more specified servers.

[0157] Embodiment 6

[0158] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, so as to be loaded and executed by a processor to implement the above-mentioned gateway configuration method.

[0159] Optionally, the computer readable storage medium may include: a read only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk, etc. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM).

[0160] Embodiment 7

[0161] The present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the gateway configuration method described in any of the above embodiments.

[0162] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the implementation.

[0163] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned embodiments can be completed by hardware, or by instructing the relevant hardware to complete the steps through a program. The program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk or an optical disk, etc. Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0164] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0165] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0166] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.

[0167] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A gateway configuration method, characterized in that: The method comprises: In response to the filter selection instruction, a target filter is selected from the candidate filters; In response to the filter setting instruction, the target filter is set; An application gateway is generated based on the set target filter.

2. The method according to claim 1, characterized in that The filter setting instruction includes a sequence adjustment instruction and a parameter configuration instruction; the response filter setting instruction sets the target filter, including: In response to the order adjustment instruction, adjusting the order of each of the target filters; In response to the parameter configuration instruction, the parameters of each of the target filters are adjusted.

3. The method according to claim 1, characterized in that: The method further comprises: Display the candidate filters, respond to the filter selection instruction on the display interface, and select the target filter; Responding to the filter setting instruction on the display interface, setting the target filter; Displays the application gateway generated based on the target filter that has been set.

4. The method according to claim 1, characterized in that: The generating an application gateway based on the set target filter includes: In addition to the original filter link in the application gateway, generating a target filter link based on the target filter; The application gateway is generated based on the original filter link and the target filter link.

5. The method according to claim 1, characterized in that The method further comprises: In response to a filter link template selection instruction, a pre-stored filter link template is obtained; The application gateway is generated based on the filtering link template.

6. The method according to any one of claims 1 to 5, characterized in that: After producing the application gateway based on the set target filter, the method further includes: Receive target request information, traverse each route based on the target request information and a pre-stored configuration policy, and determine a target route; Sending the target request information to the filter link corresponding to the target route; The target request information is forwarded to a server cluster based on the filter link.

7. A gateway configuration device, characterized in that: The device comprises: A filter selection module, used to respond to a filter selection instruction and select a target filter from among the candidate filters; A filter setting module, used to respond to a filter setting instruction and set the target filter; The application gateway generation module is used to generate an application gateway based on the set target filter.

8. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the gateway configuration method according to any one of claims 1 to 6.

9. An application gateway, characterized in that: Including reverse proxy module and load balancing module; The reverse proxy module is used to receive and parse request information, and forward the request information to the load balancing module; The load balancing module is used to forward the request information to the background server cluster based on the pre-stored forwarding strategy.

10. A computer-readable storage medium, characterized in that: The readable memory medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by a processor to implement the gateway configuration method according to any one of claims 1 to 6.