A gateway architecture method, apparatus, and storage medium that supports custom routing rules.

By using a gateway architecture with custom routing rules, the problem of inefficiency in handling dynamic network requests in traditional gateway architectures is solved, enabling flexible route management and efficient network traffic processing.

CN118474015BActive Publication Date: 2026-01-30SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410821888.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2026-01-30
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Traditional gateway architectures are inefficient at handling dynamic and diverse network requests, and existing static routing rules cannot meet actual needs.

Method used

Design a gateway architecture that supports custom routing rules, including a routing rule configuration module, a routing rule parsing module, a routing processing module, and a network interface module. Configure routing rules through a graphical interface or scripting language, perform syntax and logic verification, monitor network traffic in real time, and execute corresponding actions.

Benefits of technology

It improves the system's processing efficiency and stability, enabling it to adapt to various dynamic routing management scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474015B_ABST
    Figure CN118474015B_ABST
Patent Text Reader

Abstract

This paper presents a gateway architecture method supporting custom routing rules, relating to the field of network communication technology. The architecture includes a routing rule configuration module, a routing rule parsing module, a routing processing module, and a network interface module. Through a flexible routing management mechanism, the system's processing efficiency and stability are improved, enabling its widespread application in various scenarios requiring dynamic routing management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, and specifically to a gateway architecture method, apparatus, and storage medium that supports custom routing rules. Background Technology

[0002] With the rapid development of the internet, the complexity of network architectures is constantly increasing, and traditional gateway architectures are proving inadequate in handling dynamic and diverse network requests. Especially when facing a large number of user requests and different application scenarios, existing static routing rules cannot meet practical needs. Therefore, designing a gateway architecture that supports custom routing rules has become crucial to solving this problem. Summary of the Invention

[0003] To overcome the shortcomings of the above technologies, this invention provides a gateway architecture method, device, and storage medium that can be widely applied to various scenarios requiring dynamic routing management.

[0004] The technical solution adopted by this invention to overcome its technical problems is:

[0005] A gateway architecture method that supports custom routing rules includes:

[0006] S1. Establish a routing rule configuration module. Users can use the routing rule configuration module to customize routing rules, set different routing conditions, routing actions, and routing priorities through a graphical interface or scripting language.

[0007] S2. Establish a routing rule parsing module. The routing rule parsing module parses the user-configured routing rules and generates executable routing rule instructions.

[0008] S3. Establish a routing processing module, which processes network traffic according to the routing rule instructions parsed by the routing rule parsing module;

[0009] S4. Establish a network interface module to enable the gateway to connect and communicate with the external network. The routing processing module monitors the network traffic received by the network interface module in real time, matches the source address, destination address, and port number information in the network traffic with the routing rules, and executes the corresponding routing actions.

[0010] Furthermore, in step S1, based on the request header routing, requests containing specific fields in the request header are routed to the backend cluster.

[0011] Furthermore, in step S1, the URL path-based routing routes requests that meet the path rules to the backend service, adding specific request header information to the request header.

[0012] Furthermore, in step S1, based on weighted load balancing routing, all requests that meet the specified characteristics are sent to different service clusters in the backend based on the load balancing algorithm.

[0013] Furthermore, step S2 includes the following steps:

[0014] S2-1. The routing rule parsing module reads the routing rules configured by the user;

[0015] S2-2. The routing rule parsing module performs syntax analysis on the read routing rules, decomposing the routing rules into several syntax units;

[0016] S2-3. The routing rule parsing module constructs the logical structure of routing rules;

[0017] S2-4. The routing rule parsing module performs logical verification on the routing rules. Logical verification includes: checking whether there are logical conflicts between conditions, and checking whether the actions and priorities are logically consistent.

[0018] S2-5. If the routing rule passes the logical verification, the routing rule parsing module will convert the routing rule into an executable routing rule instruction;

[0019] S2-6. If a syntax error or logical error occurs during syntax analysis, the routing rule parsing module generates the corresponding error message and notifies the user.

[0020] Furthermore, in step S2-1, the routing rule parsing module checks whether the syntax unit conforms to the predefined syntax rules.

[0021] Furthermore, the logical structure in step S2-2 includes: identifying the conditions, actions, and priorities in the routing rules, and determining the logical relationships between the conditions, actions, and priorities.

[0022] Furthermore, the routing rule instructions in steps S2-5 include condition judgment statements, action execution statements, and priority control statements.

[0023] Furthermore, step S3 includes the following steps:

[0024] S3-1. The network interface module transmits the received network traffic to the routing processing module, which listens for network requests in real time.

[0025] S3-2. The routing processing module executes the corresponding routing actions based on the routing rule instructions parsed by the routing rule parsing module.

[0026] S3-3. The routing processing module feeds back the processing results to the network interface module;

[0027] S3-4. The routing processing module records relevant log information.

[0028] Furthermore, the routing actions in step S3-2 include: performing forwarding actions, sending traffic to the specified destination address, performing rejection actions, blocking traffic from passing, performing redirection, performing traffic shaping, and performing load balancing; the log information in step S3-4 includes: received traffic information and executed routing actions.

[0029] The beneficial effects of this invention are: it designs a gateway architecture that supports custom routing rules, including a routing rule configuration module, a routing rule parsing module, a routing processing module, and a network interface module. Through a flexible routing management mechanism, it improves the system's processing efficiency and stability, and can be widely applied to various scenarios requiring dynamic routing management. Attached Figure Description

[0030] Figure 1 This is a structural diagram of the gateway architecture of the present invention. Detailed Implementation

[0031] The following is in conjunction with the appendix Figure 1 The preferred embodiments of the present invention will be described in detail so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more explicit definition of the scope of protection of the present invention.

[0032] In the description of this invention, it should be noted that the embodiments described in this invention are only some embodiments of this invention, not all embodiments; based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0033] The terms "first," "second," etc., used in this specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0034] A gateway architecture method that supports custom routing rules includes:

[0035] S1. Establish a routing rule configuration module. Users can customize routing rules, set different routing conditions, routing actions, and routing priorities through a graphical interface or scripting language, thereby creating routing rules that meet their own business needs.

[0036] S2. Establish a routing rule parsing module. This module parses the user-configured routing rules and generates executable routing rule instructions. During the parsing process, the module performs syntax checks and logical verifications on the routing rules to ensure their correctness and validity.

[0037] S3. Establish a routing processing module, which processes network traffic according to the routing rule instructions parsed by the routing rule parsing module.

[0038] S4. Establish a network interface module to enable the gateway to connect and communicate with external networks. The routing processing module monitors the network traffic received by the network interface module in real time, matches the source address, destination address, and port number information in the network traffic with routing rules, and executes the corresponding routing actions. The network interface module supports multiple network interface protocols and physical interfaces, which can be selected and configured according to actual needs. Simultaneously, the module is also responsible for sending the network traffic processed by the routing processing module to the destination address, completing the network communication process.

[0039] In one embodiment of the present invention, in step S1, based on the routing of the request header, requests containing specific fields in the request header are routed to the backend cluster.

[0040] In one embodiment of the present invention, in step S1, based on the URL path routing, requests that meet the path rules are routed to the backend service, and specific request header information is added to the request header.

[0041] In one embodiment of the present invention, in step S1, based on weighted load balancing routing, all requests that meet the specified characteristics are sent to different service clusters in the backend based on a load balancing algorithm.

[0042] In one embodiment of the present invention, step S2 includes the following steps:

[0043] S2-1. The routing rule parsing module reads the routing rules configured by the user. These rules can be configured on a graphical interface or written in a scripting language.

[0044] S2-2. The routing rule parsing module performs syntax analysis on the read routing rules, decomposing the routing rules into several syntax units (such as keywords, variables, and operators).

[0045] S2-3. The routing rule parsing module constructs the logical structure of routing rules.

[0046] S2-4. The routing rule parsing module performs logical verification on the routing rules. Logical verification includes: checking whether there are logical conflicts between conditions (such as mutually exclusive conditions) and checking whether the actions and priorities are logically consistent.

[0047] S2-5. If the routing rule passes logical validation, the routing rule parsing module converts the routing rule into executable routing rule instructions. These instructions will be used by the routing processing module in the actual routing process.

[0048] S2-6. If a syntax error or logical error occurs during syntax analysis, the routing rule parsing module generates the corresponding error message and notifies the user to make corrections.

[0049] In one embodiment of the present invention, in step S2-1, the routing rule parsing module checks whether the syntax unit conforms to the predefined syntax rules.

[0050] In one embodiment of the present invention, the logical structure in step S2-2 includes: identifying the conditions, actions, and priorities in the routing rules, determining the logical relationships between the conditions, actions, and priorities, and determining the logical relationships between them.

[0051] In one embodiment of the present invention, the routing rule instructions in steps S2-5 include condition judgment statements, action execution statements, and priority control statements.

[0052] In one embodiment of the present invention, step S3 includes the following steps:

[0053] S3-1. The network interface module transmits the received network traffic to the routing processing module, which listens for network requests in real time.

[0054] S3-2. The routing processing module executes the corresponding routing actions based on the routing rule instructions parsed by the routing rule parsing module.

[0055] S3-3. The routing processing module feeds back the processing results to the network interface module for subsequent processing or user notification.

[0056] S3-4. The routing processing module records relevant log information, which can be used for subsequent analysis and auditing to help administrators understand the flow and processing of network traffic.

[0057] In one embodiment of the present invention, the routing actions in step S3-2 include: performing forwarding actions, sending traffic to a specified destination address, performing rejection actions, blocking traffic from passing through, performing redirection, performing traffic shaping, and performing load balancing; the log information in step S3-4 includes: received traffic information and executed routing actions.

[0058] It should be understood that in the various embodiments of this document, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0059] It should also be understood that, in the embodiments herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.

[0060] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.

[0061] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0062] In the embodiments provided herein, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.

[0063] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments described herein, depending on actual needs.

[0064] Furthermore, the functional units in the various embodiments of this document can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0065] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this paper, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this paper. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0066] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A gateway architecture method supporting custom routing rules, characterized by, Comprise: S1. Establish a routing rule configuration module, users through the graphical interface or script language way to use the routing rule configuration module to customize routing rules, set different routing conditions, routing action, routing priority; S2. Establish a routing rule analysis module, the routing rule analysis module parses the user configured routing rules, generates executable routing rule instructions; S3. Establish a routing processing module, routing processing module according to the routing rule analysis module after the routing rule instruction parsed by network traffic routing processing; S4. Establish a network interface module, for the connection and communication of gateway with external network, routing processing module real-time monitoring network interface module received network traffic, according to the source address, destination address, port number information in network traffic and routing rules matching, execute corresponding routing action; Step S2 includes the following steps: S2-1. The routing rule analysis module reads the user configured routing rules; S2-2. The routing rule analysis module performs syntax analysis on the read routing rules, and decomposes the routing rules into a plurality of syntax units; S2-3. The routing rule analysis module constructs the logical structure of the routing rules; S2-4. The routing rule analysis module performs logical verification on the routing rules, which includes checking whether there is a logical conflict between the conditions, checking whether the action and the priority are consistent with the logic; S2-5. If the routing rules pass the logical verification, the routing rule analysis module converts the routing rules into executable routing rule instructions; S2-6. If there is a syntax error or a logical error during syntax analysis, the routing rule analysis module generates corresponding error information and notifies the user.

2. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: Step S1 based on the request header routing, routing the request containing specific fields in the request header to the backend cluster.

3. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: Step S1 based on URL path routing, routing requests that meet the path rules to the backend service, and adding specific request header information in the request header.

4. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: Step S1 based on weight load balancing routing, based on load balancing algorithm, all requests that meet the specified characteristics are sent to different service clusters in the backend.

5. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: In step S2-1, the routing rule analysis module checks whether the syntax unit conforms to the predefined syntax rules.

6. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: In step S2-2, the logical structure includes identifying the conditions, actions, and priorities in the routing rules, and determining the logical relationship between the conditions, actions, and priorities.

7. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: In step S2-5, the routing rule instruction includes condition judgment statement, action execution statement, and priority control statement.

8. The gateway architecture method of supporting custom routing rules according to claim 1, wherein, Step S3 includes the following steps: S3-1. The network interface module passes the received network traffic to the routing processing module, and the routing processing module real-time monitors network requests; S3-2. According to the routing rule instruction executed by the routing processing module according to the routing rule analysis module after the routing rule analysis, execute corresponding routing action; S3-3. The routing processing module feeds back the processing result to the network interface module; S3-4. The routing processing module records relevant log information.

9. The gateway architecture method of supporting custom routing rules according to claim 1, wherein: In step S3-2, the routing action includes executing forwarding action, sending traffic to specified target address, executing rejection action, preventing traffic from passing, executing redirection, executing traffic shaping, and executing load balancing; The log information in step S3-4 includes: received traffic information, executed routing action.

Citation Information

Patent Citations

  • Routing engine configuration method and device, storage medium and electronic device

    CN114157567A

  • Implementation and interpretation of API routing domain-specific language

    US20240143323A1