Request routing method and device based on public gateway, computer equipment and storage medium

By using a request routing method based on a public gateway, the problems of data inconsistency and performance fluctuations in service systems in the medical and financial fields during multi-environment isolation deployments were solved, achieving independent deployment and data isolation, and ensuring system stability and testing efficiency.

CN121037293APending Publication Date: 2025-11-28PING AN HEALTH CLOUD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511274679.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

When service systems in the healthcare and financial sectors are deployed in multiple isolated environments, there are high risks of data inconsistency disruption, data contamination, and performance fluctuations that can affect other environments, leading to business interruptions and low testing efficiency.

Method used

By adopting a request routing method based on a public gateway, and by configuring a preset environment mapping table and routing rules, the system analyzes the request header identifiers or business information in external requests, and automatically routes the requests to the target internal processing environment, thereby achieving independent deployment and data isolation of each environment.

Benefits of technology

This enables independent deployment of each internal processing environment, reducing the risk of data contamination, protecting patient privacy, avoiding business interruptions, and improving testing efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121037293A_ABST
    Figure CN121037293A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet, can be applied to the technical field of medical treatment and finance, and discloses a request routing method and device based on a public gateway, computer equipment and a storage medium, and the method comprises the steps: receiving an external request transmitted by an external system based on the public gateway; calling the public gateway, analyzing the external request by the public gateway according to the preset environment mapping table and the preset routing rule, and determining a target internal processing environment matched with the external request; and utilizing the public gateway to route the external request to the target internal processing environment for processing. A common library mode is not needed for deployment, risks of data pollution and leakage of patient privacy in the medical field are reduced, meanwhile, normal operation of other internal processing environments cannot be affected when version deployment and pressure testing are performed in each internal processing environment, interruption of clinical or financial services is avoided, testing efficiency is guaranteed, and the testing efficiency is improved. And the stability is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology and can be applied to the fields of medical and financial technology. In particular, it relates to a request routing method, apparatus, computer equipment and storage medium based on a public gateway. Background Technology

[0002] In the healthcare and finance sectors, system stability, data security, and compliance are core safeguards for business operations. The healthcare industry involves sensitive patient health information, requiring assurance of data privacy and integrity during collection, storage, transmission, and callback. The financial industry handles large amounts of user financial data and transaction records, necessitating prevention of data leaks or misuse. Furthermore, healthcare and financial services have high real-time requirements; data delays or system failures can lead to serious consequences, such as delayed medical decisions or failed financial transactions. Therefore, service systems in the healthcare and finance sectors typically employ multi-environment isolation to achieve independent operation of functional verification, performance testing, and production environments. Requests are also routed strategically to prevent test data from contaminating the production environment, ensuring version compatibility and system stability.

[0003] In related technologies, service systems in the medical and financial fields adopt a "many-to-one" deployment model when connecting with external services. That is, multiple isolated environments (such as SIT, UAT) are deployed internally to support the testing needs of different departments, while external services provide a testing environment (such as third-party payment interfaces, medical insurance settlement platforms, etc.) so that their callback requests can only be routed to a certain internal environment (such as SIT).

[0004] However, the applicant recognizes that the relevant technology has at least the following technical problems:

[0005] To reduce deployment costs, internal environments often share the same database. However, different environments may have different application versions and data structures. Sharing a database not only leads to cross-writing of test data and production data, compromising data consistency and increasing the risk of data pollution, which could potentially trigger patient privacy lawsuits in the medical field, but also causes performance fluctuations in internal environments during version deployment or stress testing. These fluctuations can directly affect other internal environments through the shared database, causing disruptions to clinical or financial services, triggering user complaints, and preventing parallel testing across multiple environments, thus limiting testing efficiency. Summary of the Invention

[0006] This invention provides a request routing method, apparatus, computer device, and storage medium based on a public gateway to address the technical problems of data inconsistency, high risk of data contamination, performance fluctuations in the internal environment during version deployment or stress testing that directly affect other internal environments through the shared library, causing clinical or financial business interruptions, user complaints, and the inability to conduct parallel testing in multiple environments, thus limiting testing efficiency.

[0007] Firstly, a request routing method based on a public gateway is provided, including:

[0008] Based on receiving external requests transmitted from external systems through a public gateway, the public gateway is configured with a preset environment mapping table and preset routing rules;

[0009] The public gateway is invoked, and the public gateway analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request.

[0010] The external request is routed to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

[0011] Secondly, a request routing device based on a public gateway is provided, comprising:

[0012] The receiving module is used to receive external requests transmitted by external systems based on a public gateway, wherein the public gateway is configured with a preset environment mapping table and preset routing rules;

[0013] The determination module is used to call the public gateway, which analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request.

[0014] The routing module is used to route the external request to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

[0015] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the public gateway-based request routing method as described in any of the first aspects above.

[0016] Fourthly, a storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the request routing method based on a public gateway as described in any of the first aspects above.

[0017] In the aforementioned scheme implemented by the request routing method, apparatus, computer equipment, and storage medium based on a public gateway, external requests transmitted from external systems can be received via a public gateway. The public gateway is configured with a preset environment mapping table and preset routing rules. When the public gateway is invoked, it analyzes the external request according to the preset environment mapping table and preset routing rules to determine the target internal processing environment matching the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request business information in the external request. Using the public gateway, the external request is routed to the target internal processing environment so that the external request is processed within that environment. This is particularly relevant for medical... In scenarios with high real-time requirements, such as medical and financial services, the target internal processing environment can be determined by analyzing the target request header identifier or target request business information in external requests. External requests are then automatically routed to the target internal processing environment for processing. This allows each internal processing environment to be deployed independently with data isolated from each other, eliminating the need for a shared database deployment mode. This reduces the risk of data pollution and patient privacy leaks in the medical field. At the same time, it ensures that version deployment and stress testing of each internal processing environment do not affect the normal operation of other internal processing environments, avoiding interruptions to clinical or financial services, ensuring testing efficiency, and providing good stability. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of an application environment for a request routing method based on a public gateway according to an embodiment of the present invention;

[0020] Figure 2 This is a flowchart illustrating a request routing method based on a public gateway in one embodiment of the present invention;

[0021] Figure 3 This is a flowchart illustrating a specific implementation of step S20;

[0022] Figure 4 This is a flowchart illustrating a specific implementation of step S22;

[0023] Figure 5 This is a flowchart illustrating a specific implementation of step S23;

[0024] Figure 6This is another flowchart illustrating a request routing method based on a public gateway in one embodiment of the present invention;

[0025] Figure 7 This is a schematic diagram of a request routing device based on a public gateway in one embodiment of the present invention;

[0026] Figure 8 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;

[0027] Figure 9 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] The request routing method based on a public gateway provided in this embodiment of the invention can be applied to applications such as... Figure 1 In this application environment, external and internal systems communicate via a network. Internal systems utilize a deployed public gateway to receive external requests from external systems. The internal system also deploys multiple pre-defined internal processing environments, allowing the public gateway to route external requests to the appropriate environment for processing. Specifically, the internal system receives external requests from external systems through the public gateway, which is configured with a pre-defined environment mapping table and routing rules. When the internal system invokes the public gateway, it analyzes the external request according to the pre-defined environment mapping table and routing rules, determines the target internal processing environment that matches the request, and routes the request to that environment for processing.

[0030] In this invention, for scenarios with high real-time requirements, such as medical and financial services, the target internal processing environment can be determined by analyzing the target request header identifier or target request business information in external requests. External requests are then automatically routed to the target internal processing environment for processing. This allows each internal processing environment to be deployed independently, with data isolated from each other, eliminating the need for a shared database deployment model. This reduces the risk of data pollution and patient privacy leaks in the medical field. Furthermore, it ensures that version deployment and stress testing of each internal processing environment do not affect the normal operation of other internal processing environments, avoiding interruptions to clinical or financial services and ensuring testing efficiency and stability. The invention will be described in detail below through specific embodiments.

[0031] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a request routing method based on a public gateway provided in an embodiment of the present invention includes the following steps:

[0032] S10: Receive external requests transmitted from external systems based on the public gateway.

[0033] The request routing method based on a public gateway provided by this invention can be applied to internal systems in various application scenarios. Internal systems are usually implemented through a server, which can be implemented by a standalone server or a server cluster composed of multiple servers.

[0034] In this embodiment of the invention, the public gateway, as the core entry point of the entire request routing system, is configured at the front end of the internal system to receive various requests from external systems. The public gateway is configured with a preset environment mapping table and preset routing rules. The preset environment mapping table is a data structure pre-defined in the public gateway, which records in detail the correspondence between multiple request header identifiers and internal service addresses. Request header identifiers are specific identification information carried in external requests, used to indicate the source, type, and other characteristics of the request; internal service addresses are the service access addresses corresponding to various internal processing environments within the internal system. The preset routing rules are also pre-configured in the public gateway. Their function is to determine a matching internal processing environment for the received external request based on certain logic and algorithms when the public gateway fails to identify the request header identifier from the external request.

[0035] External systems can be patient client applications in the medical field, such as mobile medical apps used by patients, or online banking clients used by bank customers in the financial field. When an external system initiates an external request, the request is transmitted over the network to the public gateway. The public gateway opens its receiving port, receives the request completely, and temporarily stores it. For example, in the medical field, a patient initiates an appointment request through a mobile medical app, and this request is transmitted to the public gateway as an external request; in the financial field, a bank customer initiates a transfer request through an online banking client, and this request is also transmitted to the public gateway.

[0036] In this way, by pre-configuring pre-defined environment mapping tables and routing rules, the public gateway can process various external requests in a structured manner, improving the standardization and manageability of the internal system. In the medical field, this ensures that patient requests can smoothly enter the internal system for processing, guaranteeing the normal operation of medical services; in the financial field, it ensures the accurate receipt of bank customer transaction requests, maintaining the stability of financial transactions.

[0037] Before step S10, a public gateway needs to be built and the corresponding parameters need to be deployed. The specific process is as follows:

[0038] First, a public gateway is constructed based on a predefined transmission protocol. This protocol is a set of predefined rules that regulate the format and method of data transmission in the network, ensuring accurate and efficient data interaction between different systems. The public gateway built according to this predefined transmission protocol has the ability to uniformly receive external requests, becoming the unified entry point for interaction between the entire internal system and external systems.

[0039] After completing the construction of the public gateway, a preset environment mapping table needs to be configured within it. This table is a crucial data structure that records the mapping relationships between multiple request header identifiers and internal service addresses. Request header identifiers are specific information fragments carried in external requests, used to identify the source, type, and other characteristics of the request. Internal service addresses are the service access paths corresponding to various processing environments within the internal system. Through this mapping relationship, the public gateway can quickly locate the corresponding internal processing environment based on the request header identifier.

[0040] Simultaneously, it's necessary to obtain preset routing rules and configure them in the public gateway. Preset routing rules are a set of pre-defined logic and algorithms used to determine the appropriate internal processing environment for received external requests when no request header identifier is identified. For example, preset routing rules might make judgments and selections based on factors such as the request's business type and the request's originating region. Through this configuration, the public gateway adds routing and distribution capabilities, enabling it to accurately route requests to the appropriate internal processing environment based on different request scenarios.

[0041] The process of constructing a public gateway and deploying corresponding parameters outlined above lays a solid foundation for subsequent request routing based on the public gateway. Unified reception of external requests makes the internal system's management of external interactions more centralized and standardized, improving the overall security of the internal system. The routing and distribution function ensures that external requests can accurately and quickly reach the target internal processing environment, improving the processing efficiency and real-time performance of the internal system. Simultaneously, this design allows each internal processing environment to be deployed independently, with data isolated and unaffected by each other, eliminating the need for a shared database deployment model. This effectively reduces the risk of data contamination, significantly minimizing the possibility of patient privacy leaks in the medical field and ensuring the security of customer funds and transaction information in the financial field. Furthermore, version deployment and stress testing of each internal processing environment will not interfere with the normal operation of other internal processing environments, avoiding interruptions to clinical or financial services due to system upgrades or testing, and ensuring testing efficiency and system stability.

[0042] For example, in the healthcare industry, a large hospital needs to build an internal online medical service system to meet patients' needs for remote registration and consultation. When building this system, a public gateway is constructed and its parameters are deployed according to the above scheme. The public gateway is built with reference to common data transmission protocols in the healthcare industry to ensure accurate interaction with various internal hospital systems and the mobile clients used by patients. A preset environment mapping table records the mapping relationship between request header identifiers of different departments and different business types and the corresponding internal service addresses of those departments. For example, when a patient initiates a registration request for the cardiology department through a mobile client, the request header carries a specific identifier for cardiology. The preset routing rules stipulate that if the request header identifier cannot be recognized, the target internal processing environment is determined based on information such as the department name entered by the patient. When a patient initiates a registration request, the public gateway first receives the request, then quickly finds the internal service address of cardiology in the preset environment mapping table based on the request header identifier, and routes the request to the registration processing environment of that department. In this way, the registration processing environments of each department can be deployed independently, and patients' registration information will not be confused with that of other departments, effectively protecting patient privacy. Meanwhile, when a department is upgrading its system or conducting stress tests, it will not affect the normal registration services of other departments, thus ensuring the stability and efficiency of the hospital's online registration service.

[0043] For example, in the financial sector, a bank wants to build a comprehensive financial service platform to provide customers with various financial services such as account inquiries, transfers, and wealth management. When building this platform, a public gateway is first constructed and its parameters are deployed. The public gateway is built according to the data transmission security protocols of the financial industry to ensure the security of customer transaction data during transmission. A pre-defined environment mapping table records the mapping relationship between the request header identifiers of different financial business types (such as savings, wealth management, and loan businesses) and the corresponding internal service addresses. Pre-defined routing rules are set so that if the request header identifier cannot be identified, the target internal processing environment is determined based on information such as the business keywords or transaction amount range entered by the customer. When a customer initiates a request to purchase a wealth management product through online banking, the request header carries the identifier of the wealth management business. After receiving the request, the public gateway routes the request to the wealth management business processing environment according to the pre-defined environment mapping table. Each financial business processing environment is deployed independently, and customer account information, transaction records, and other data are isolated from each other, reducing the risk of data leakage and tampering. Moreover, when the wealth management department conducts online testing of new wealth management products, it will not affect the normal operation of other businesses such as savings and loan businesses, ensuring the stability and reliability of the bank's comprehensive financial services.

[0044] S20: Invoke the public gateway, which analyzes the external request according to the preset environment mapping table and preset routing rules to determine the target internal processing environment that matches the external request.

[0045] In this embodiment of the invention, when the public gateway receives an external request, the internal system invokes the public gateway. The public gateway analyzes the external request according to a preset environment mapping table and preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by the public gateway by analyzing the target request header identifier or target request service information in the external request.

[0046] Specifically, first, the public gateway attempts to extract the request header identifier from the external request. If the request header identifier is successfully extracted, the public gateway looks up the internal service address corresponding to that request header identifier in a preset environment mapping table. The internal processing environment pointed to by this internal service address is the target internal processing environment. The target internal processing environment is an independent environment in the internal system used to process specific types of requests; it has independent computing resources and data storage. If the public gateway fails to identify the request header identifier from the external request, it will analyze it according to preset routing rules, determining the target internal processing environment based on factors such as the request's business type and the region from which the request originates.

[0047] For example, in the healthcare field, assuming a patient's registration request includes a registration-related header, the public gateway uses a pre-defined environment mapping table to find the corresponding hospital's internal service address for handling registration, and uses the internal processing environment indicated by that address as the target internal processing environment. As another example, in the financial field, a bank customer's request to purchase a wealth management product may not include an explicit header. The public gateway, based on pre-defined routing rules, analyzes the business information in the request, determines it to be a wealth management transaction, and thus identifies the target internal processing environment as the wealth management transaction processing environment.

[0048] In this way, the above process can accurately determine the target internal processing environment to which external requests should be routed. Furthermore, the dual analysis mechanism of request header identifiers and preset routing rules improves the accuracy and flexibility of request routing. In the medical field, this ensures that patients' registration requests accurately reach the corresponding hospital's registration processing environment, improving registration efficiency. In the financial field, it guarantees that bank customers' wealth management requests are correctly routed to the wealth management business processing environment, enhancing customer experience.

[0049] Among them, such as Figure 3 As shown, in step S20, which involves calling the public gateway, the public gateway analyzes the external request according to the preset environment mapping table and preset routing rules to determine the target internal processing environment that matches the external request. This includes the following steps:

[0050] S21: Determine the request header in the external request and call the public gateway to analyze the request header to identify whether there is a specified string in the request header that is consistent with the format of multiple request header identifiers recorded in the preset environment mapping table.

[0051] In this embodiment of the invention, when the public gateway receives an external request transmitted from an external system, it first locates and extracts the request header from the request. The request header contains key information areas within the external request, typically used to convey metadata related to the request, such as the request's source, type, and format. The public gateway has the capability to analyze and process the request header. It compares the extracted request header with a preset environment mapping table, which records multiple request header identifiers and their corresponding format information. A request header identifier is a string used to uniquely identify a specific request source or type, while the format specifies the concrete representation of these identifiers, such as specific character combinations and length limits. The public gateway checks each request header to see if it contains a specified string whose format matches the request header identifier format recorded in the preset environment mapping table.

[0052] For example, in the medical field, suppose a hospital has built an online medical service platform, and the external system might be a mobile medical app used by patients. When a patient initiates a registration request through the app, the request is transmitted to a public gateway. Upon receiving the request, the public gateway retrieves the request header and analyzes whether it contains a string that matches the header identifier format recorded in a pre-defined environment mapping table, representing registration requests for different departments. For example, if the pre-defined environment mapping table records the header identifier for cardiology registration as "XX_heart_registration," the public gateway will check if a string with a similar format exists in the request header. Similarly, in the financial field, when a bank customer initiates a transfer request through an online banking client, the public gateway similarly first locates the request header and then checks if a specified string matches the header identifier format recorded in the pre-defined environment mapping table, representing different transfer types (such as intra-bank transfers and inter-bank transfers).

[0053] In this way, by accurately analyzing the request headers, it is possible to quickly determine whether an external request carries clear identifying information, providing a foundation for accurately determining the target's internal processing environment. In the medical field, this helps to quickly guide patients' registration requests to the correct department's processing environment; in the financial field, it ensures that transfer requests are accurately routed to the corresponding transfer processing module, improving system processing efficiency and accuracy.

[0054] S22: When it is determined that a specified string exists in the request header, the specified string is used as the target request header identifier, and the target internal processing environment is determined from multiple preset internal processing environments using the target request header identifier and the preset environment mapping table.

[0055] In this embodiment of the invention, if the public gateway identifies a specified string in the request header that matches the format of the request header identifier recorded in the preset environment mapping table, it will determine that specified string as the target request header identifier. The target request header identifier is key information used to accurately point to a specific internal processing environment. Subsequently, the public gateway will consult the preset environment mapping table again based on this target request header identifier. The preset environment mapping table records the internal service address corresponding to each request header identifier, and the internal service address is directly associated with multiple preset internal processing environments within the system. Through this mapping relationship, the public gateway can quickly determine the target internal processing environment that matches the target request header identifier.

[0056] For example, in the healthcare field, if a public gateway identifies the target request header identifier "XX_heart_registration" in a patient registration request header, it will find the internal service address of the cardiology registration business corresponding to that identifier according to a preset environment mapping table, and thus determine that the target internal processing environment is the cardiology registration processing module. Similarly, in the financial field, when a public gateway identifies a target request header identifier representing an intra-bank transfer in a transfer request header, it can determine, based on a preset environment mapping table, that the target internal processing environment is the bank's internal transfer processing system.

[0057] In this way, through the above process, when an external request carries a clear identifier, it can quickly and accurately locate the target's internal processing environment, improving the efficiency and accuracy of request routing. In the medical field, this ensures that patients' registration requests can quickly reach the corresponding departments, reducing patient waiting time; in the financial field, it guarantees that transfer requests can be processed in a timely and accurate manner, improving customer experience.

[0058] Among them, such as Figure 4 As shown, step S22, which involves determining the target internal processing environment from among multiple preset internal processing environments using the target request header identifier and the preset environment mapping table, includes the following steps:

[0059] S221: Traverse each request header identifier included in the preset environment mapping table, and determine the specified request header identifier that matches the target request header identifier from among the multiple request header identifiers included in the preset environment mapping table.

[0060] In this embodiment of the invention, after obtaining the target request header identifier, the public gateway initiates a traversal operation of a preset environment mapping table, sequentially checking each request header identifier in the table and comparing the currently checked request header identifier with the target request header identifier character by character. The character comparison is performed one by one according to the order and content of the characters. Only when all the constituent characters in the two identifiers are completely identical, including character type, capitalization, and order, can the two identifiers be considered to be identical. When a request header identifier that completely matches the target request header identifier is found, it is designated as the specified request header identifier.

[0061] For example, in the medical field, suppose a hospital system has a preset environment mapping table that stores the request header identifiers corresponding to different department registration requests. For instance, the request header identifier for cardiology registration is "Heart_Reg_001," and for neurology registration, it's "Neuro_Reg_002." When a patient initiates a cardiology registration request through a specific medical app, the public gateway obtains the target request header identifier as "Heart_Reg_001." At this point, the public gateway begins to traverse the preset environment mapping table, checking each request header identifier until it finds "Heart_Reg_001," which matches the target request header identifier, and identifies it as the designated request header identifier. Similarly, in the financial field, a bank system's preset environment mapping table records the request header identifiers for different types of transfer transactions. For example, the request header identifier for intra-bank transfers is "InBank_Transfer_001," and for inter-bank transfers, it's "OutBank_Transfer_002." When a customer initiates an intra-bank transfer request, the public gateway obtains the target request header identifier as "InBank_Transfer_001", finds a matching identifier by traversing the preset environment mapping table, and determines it as the specified request header identifier.

[0062] In this way, through precise character comparison and traversal operations, the specified request header identifier that matches the target request header identifier can be accurately found from the preset environment mapping table, providing a precise basis for subsequently determining the target's internal processing environment. In the medical field, this ensures that patient registration requests can be accurately associated with the corresponding department; in the financial field, it ensures that transfer requests can correctly identify the business type, improving the accuracy and efficiency of system processing.

[0063] S222: In the preset environment mapping table, query the specified internal service address that has a mapping relationship with the specified request header identifier.

[0064] After determining the specified request header identifier, the public gateway will access the preset environment mapping table again. Based on the specified request header identifier, it will look up the internal service address that has a mapping relationship with it in the preset environment mapping table. This internal service address will then be determined as the specified internal service address.

[0065] For example, in the medical field, continuing with the example of a cardiovascular medicine registration request, once the public gateway determines that the specified request header identifier is "Heart_Reg_001", it queries the preset environment mapping table for the internal service address corresponding to this identifier. Assuming the preset environment mapping table records "Heart_Reg_001" as mapping to the internal service address of the cardiovascular medicine registration processing module as "http: / / XXX", then this address is the specified internal service address. Similarly, in the financial field, for an intra-bank transfer request, once the specified request header identifier is determined to be "InBank_Transfer_001", the preset environment mapping table finds its corresponding internal service address to be "http: / / YYY", which is also the specified internal service address.

[0066] In this way, by using the mapping relationships in the pre-defined environment mapping table, the specified internal service address corresponding to the specified request header identifier can be found quickly and accurately, providing a clear target for the routing of external requests. In the medical field, this ensures that patient registration requests are accurately delivered to the cardiology registration processing module; in the financial field, it guarantees that intra-bank transfer requests are correctly routed to the corresponding processing system, improving the system's response speed and processing efficiency.

[0067] S223: Obtain multiple preset internal processing environments, and determine the internal processing environment indicated by the specified internal service address as the target internal processing environment among the multiple internal processing environments.

[0068] In this embodiment of the invention, after obtaining a specified internal service address, the public gateway acquires multiple preset internal processing environments within the internal system. These internal processing environments are independently deployed modules or service sets to meet different business needs. They are isolated from each other, and their data does not affect each other. Each internal processing environment has its specific functions and processing logic, and is identified and accessed through an internal service address. The public gateway then matches and searches among the acquired internal processing environments based on the specified internal service address, finds the internal processing environment corresponding to that address, and identifies it as the target internal processing environment.

[0069] For example, in the medical field, internal systems pre-configure multiple internal processing environments, including those for cardiology, neurology, and examination reports. When the public gateway obtains the specified internal service address "http: / / XXX", it searches among these environments and finds that the address corresponds to the cardiology registration environment. It then designates this environment as the target internal processing environment, and the patient's registration request will be routed to it for processing. Similarly, in the financial field, banking systems pre-configure multiple internal processing environments, such as intra-bank transfer processing, inter-bank transfer processing, and account inquiry processing. When the public gateway obtains the specified internal service address "http: / / YYY", it finds the corresponding intra-bank transfer processing environment among these environments and designates it as the target internal processing environment. The customer's intra-bank transfer request will be processed in this environment.

[0070] In this way, the above process accurately routes external requests to the target internal processing environment corresponding to the specified internal service address, achieving independent deployment and data isolation for each internal processing environment. In the medical field, this avoids data interference between different departments and protects patient privacy; in the financial field, it ensures the secure processing of different types of financial transactions, while ensuring that each internal processing environment does not affect each other during version deployment and stress testing, guaranteeing system stability and testing efficiency.

[0071] S23: When it is determined that the specified string does not exist in the request header, the external request is identified, the target request business information is determined, and the target internal processing environment is determined from multiple internal processing environments based on the target request business information and the preset routing rules.

[0072] In this embodiment of the invention, when it is determined that the specified string does not exist in the request header, it means that the external system may not support adding identification information to the request header. Therefore, the public gateway will identify the external request to determine the target request business information. The target request business information is key data that reflects the specific business type of the external request. For example, in the medical field, it may be business types such as registration, consultation, and examination; in the financial field, it may be business types such as deposit, withdrawal, and wealth management. The public gateway will process this target request business information according to preset routing rules. The preset routing rules are a set of pre-defined logic and algorithms that comprehensively consider various factors, such as business type, request source, and request time, to determine the most suitable target internal processing environment for the external request.

[0073] For example, in the medical field, suppose a patient initiates a request through a simple medical consultation app, which does not add any identification information to the request header. After analyzing the request content, the public gateway determines that the target request business information is "general consultation". According to preset routing rules, considering the current volume of general consultation business and the working status of various doctors, the public gateway will route the request to the consultation processing environment of a relatively idle doctor. As another example, in the financial field, a bank customer initiates a small payment request through a third-party payment platform. Because the third-party platform does not add an identification to the request header, the public gateway analyzes the request and determines that the target request business information is "small payment". Based on preset routing rules and the current system load, the public gateway will route the request to an internal processing environment that is more efficient at handling small payment transactions.

[0074] In this way, through the above process, even when external requests do not carry explicit identifiers, the system can still analyze the request's business information and, with the help of preset routing rules, reasonably determine the target's internal processing environment, ensuring the system's flexibility and adaptability. In the medical field, this ensures that medical requests initiated from various channels are properly handled; in the financial field, it guarantees the normal operation of different types of financial transactions, improving the overall stability and reliability of the system.

[0075] Among them, such as Figure 5 As shown, step S23, which involves identifying the external request, determining the target request business information, and determining the target internal processing environment from multiple internal processing environments based on the target request business information and preset routing rules, includes the following steps:

[0076] S231: Identify external requests and extract multiple request fields from them.

[0077] In this embodiment of the invention, the public gateway analyzes the data structure of external requests and extracts multiple request fields from different parts of the request, such as the header and body, according to a predetermined protocol format. Request fields are the smallest units used to convey various information in an external request; they can contain key data such as the request type, source, and parameters. For example, in the HTTP protocol, request fields may include the request method (GET, POST, etc.), user agent information in the request header, and form data in the request body. Through parsing and extraction operations, it is ensured that no request fields that may be useful for subsequent processing are omitted.

[0078] For example, in the medical field, consider a patient's online consultation request initiated through a hospital's official app. When the app sends a request to the hospital's system server, the public gateway extracts request fields such as patient ID, consulting department, and symptom description. The patient ID identifies the patient, the consulting department field indicates the department the patient wishes to consult, and the symptom description field details the patient's symptoms. Similarly, in the financial field, when a customer initiates a transfer request through mobile banking, the public gateway extracts request fields such as transfer amount, recipient account, and sender account. The transfer amount specifies the exact amount transferred, while the recipient and sender accounts identify the recipient and sender of the funds, respectively.

[0079] In this way, by comprehensively and accurately extracting multiple request fields from external requests, a rich data foundation is provided for subsequently determining the target request's business information. In the medical field, this helps to fully understand patients' consultation needs; in the financial field, it enables the accurate acquisition of key information for transfer transactions, improving the accuracy and efficiency of system processing.

[0080] S232: Identify the relevant request field among multiple request fields, and determine the target request business information based on the specified request field.

[0081] After obtaining multiple request fields, the public gateway filters these fields to determine which are directly related to the business type; these are the designated request fields. The designated request fields can be business type fields or external domain name fields. The business type field directly indicates the type of business the request corresponds to, such as registration, consultation, and examination in the medical field, or transfer, deposit, and wealth management in the financial field. The external domain name field can reflect the source of the request or the scope of the business to some extent. By analyzing the designated request fields, the public gateway extracts and combines key information to determine the target request business information. For example, if the designated request field is a business type field with the value "registration," then the target request business information is registration. If the designated request field includes an external domain name field, indicating a business request from a specific partner institution, combining it with the business type field can further clarify the specific business information.

[0082] In the medical field, continuing with online consultation requests as an example, the consultation department field is selected as the designated request field after screening. If the value of this field is "Cardiovascular Medicine," then based on this designated request field, the target request business information can be determined to be an online consultation service in Cardiovascular Medicine. In the financial field, for transfer requests, the business type field "Transfer" and potentially involved external domain name fields (such as the name of the cooperating bank) can be used as designated request fields. If the business type field is "Transfer" and the external domain name field is "XX Bank," then the target request business information can be determined to be a transfer to XX Bank.

[0083] By precisely filtering specified request fields and determining the target request's business information, the specific business type of external requests can be clearly defined, providing a clear basis for selecting the appropriate internal processing environment based on the business information. In the medical field, this helps the system accurately allocate patient requests to the corresponding department processing modules; in the financial field, it ensures that transfer requests are processed according to the correct business rules, improving the system's business processing capabilities and accuracy.

[0084] S233: Using the target request business information, perform a fuzzy search within the rule content of the preset routing rules to obtain the internal environment identifier obtained from the search.

[0085] In this embodiment of the invention, the public gateway utilizes the target request service information to perform a fuzzy search within the rules of a preset routing rule to obtain the searched internal environment identifier. The preset routing rule defines in detail the correspondence between different target request service information and internal environment identifiers. The internal environment identifier is a symbol or code used to uniquely identify each internal processing environment, accurately pointing to a specific internal processing environment within the internal system. Once the target request service information is determined, the internal system invokes the public gateway to initiate a fuzzy search algorithm, searching the preset routing rule for entries that match or are similar to the target request service information. The fuzzy search algorithm allows for a certain degree of matching error, handling subtle differences in the description of the target request service information, improving the flexibility and accuracy of the search. Through fuzzy search, the internal environment identifier corresponding to the target request service information can be found. The specific fuzzy search process is as follows:

[0086] First, the content of the preset routing rules is preprocessed to construct a searchable data structure, such as an inverted index. The inverted index uses keywords from the target request's business information as index entries, with each entry corresponding to a rule containing that keyword and its internal context identifier. Once the target request's business information is obtained, it is segmented into multiple meaningful keywords. These keywords are extracted based on preset segmentation rules that fully consider the characteristics of the medical and financial business domains. For example, in the medical field, professional terms such as department names and business types are identified as keywords, while in the financial field, key information such as bank names and business operation types are extracted as keywords.

[0087] After word segmentation, these keywords are used for preliminary retrieval in the inverted index. For each keyword, the set of rule entries containing that keyword can be quickly located. Then, these preliminary rule entry sets are comprehensively processed. Considering the potential differences in expression between the target request business information and the rule content, a similarity calculation algorithm can be used to measure the degree of matching between the target request business information and each rule entry. The similarity calculation algorithm comprehensively considers factors such as keyword overlap, keyword order, and semantic similarity. For example, when calculating keyword overlap, the number of keywords that appear together in the target request business information and rule entries is counted; for keyword order, a certain weight is given, and if the keyword order is close to the order in the rule entries, the similarity will be increased accordingly; in terms of semantic similarity, a pre-trained semantic model can be used to convert the business information and rule entries into semantic vectors, and the semantic similarity is measured by calculating the cosine of the angle between the vectors.

[0088] Next, the calculated similarity scores are further filtered based on a preset similarity threshold. Only rule entries with similarity scores higher than the threshold are retained. For the retained rule entries, their corresponding internal environment identifiers are further analyzed. If only one rule entry meets the criteria, its corresponding internal environment identifier is directly obtained. If multiple rule entries with high similarity exist, an appropriate decision-making strategy is adopted to determine the final internal environment identifier. For example, the internal environment identifier corresponding to the rule entry with the highest similarity is prioritized, or factors such as the importance of the business and historical processing frequency are considered in a comprehensive decision. Through this series of complex fuzzy search processes, the internal environment identifier that best matches the target request's business information can be accurately found within the content of the preset routing rules, providing a crucial basis for subsequently routing external requests to the correct target internal processing environment.

[0089] In the medical field, suppose the preset routing rule specifies that the internal environment identifier corresponding to "online consultation in cardiology" is "Heart_Consult_Env". When the target request service information is "online consultation in cardiology", a fuzzy search is used to find a matching entry in the preset routing rule, thus obtaining the internal environment identifier "Heart_Consult_Env". In the financial field, if the preset routing rule specifies that the internal environment identifier corresponding to "transfer to XX bank" is "XX_Bank_Transfer_Env", when the target request service information is "transfer of funds to XX bank", a fuzzy search algorithm can identify its similarity to the service in the preset rule, thereby obtaining the internal environment identifier "XX_Bank_Transfer_Env".

[0090] In this way, by using fuzzy search algorithms to quickly and accurately obtain internal environment identifiers from preset routing rules, the processing capability for target request business information expressed in different ways is enhanced, improving the flexibility and adaptability of routing. In the medical field, it can better handle various patient consultation business descriptions; in the financial field, it can handle diverse expressions in customer transfer business requests, ensuring that requests are correctly routed.

[0091] S234: Obtain multiple preset internal processing environments, and determine the internal processing environment indicated by the internal environment identifier as the target internal processing environment among the multiple internal processing environments.

[0092] In this embodiment of the invention, the public gateway can maintain a pre-defined list of multiple internal processing environments. These internal processing environments are deployed independently, each with its own specific functions and data processing capabilities, and are distinguished by an internal environment identifier. Upon obtaining an internal environment identifier, the public gateway searches and matches it within the pre-defined list of internal processing environments. By comparing the identifiers, it finds the internal processing environment that perfectly matches the identifier and designates it as the target internal processing environment. In this way, external requests can be accurately routed to the target internal processing environment for processing.

[0093] In the medical field, an internal system might have multiple pre-defined internal processing environments, such as a cardiovascular medicine consultation processing environment, a neurology consultation processing environment, and a test report processing environment. Upon obtaining the internal environment identifier "Heart_Consult_Env", the public gateway searches among these environments, finds the corresponding cardiovascular medicine consultation processing environment, and designates it as the target internal processing environment. The patient's online consultation request will then be routed to this environment for processing. In the financial field, a bank's internal system might have multiple pre-defined internal processing environments, such as intra-bank transfer processing, inter-bank transfer processing, and account inquiry processing. Upon obtaining the internal environment identifier "XX_Bank_Transfer_Env", the public gateway finds the corresponding inter-bank transfer processing environment (assuming a transfer to XX Bank falls under the category of inter-bank transfers) among these environments and designates it as the target internal processing environment. The customer's transfer request will then be processed in this environment.

[0094] In this way, the above process accurately routes external requests to the target internal processing environment corresponding to the internal environment identifier, achieving independent deployment and data isolation for each internal processing environment. In the medical field, this avoids data interference between different departments and protects patient privacy; in the financial field, it ensures the secure processing of different types of financial transactions, while ensuring that each internal processing environment does not affect each other during version deployment and stress testing, thus guaranteeing system stability and testing efficiency.

[0095] S30: Utilize a public gateway to route external requests to the target's internal processing environment, so that the external requests can be processed within the target's internal processing environment.

[0096] After identifying the target's internal processing environment, the internal system uses a public gateway to route external requests to that environment, ensuring that the requests are processed within it. Specifically, the public gateway constructs a request forwarding path based on the internal service address corresponding to the target's internal processing environment and forwards the external request along this path, ensuring that the request data is transmitted completely and accurately to the target's internal processing environment. Upon receiving the request, the target's internal processing environment initiates the corresponding processing flow, invoking its internal business logic and data processing modules to handle the request.

[0097] For example, in the healthcare field, when a public gateway routes a patient's registration request to the target hospital's registration processing environment, that environment begins processing the request. If there are available appointments, the registration is completed, and the patient is notified of successful registration and specific registration information; otherwise, a registration failure message is returned. As another example, in the financial field, after a public gateway routes a bank customer's wealth management purchase request to the wealth management business processing environment, that environment assesses the customer's risk tolerance. If the customer meets the requirements, the wealth management product purchase operation is completed, and purchase confirmation information is returned to the customer.

[0098] In this way, the above process achieves efficient integration between external requests and internal processing environments, enabling each internal processing environment to be deployed independently with data isolation. In the healthcare field, the independence of different internal processing environments avoids the risks of data contamination and patient information leakage. Furthermore, each business processing environment can be upgraded and maintained independently without affecting the normal operation of other hospital services. In the financial field, the processing environments for different financial services operate independently, ensuring the security of customer funds and the privacy of transaction data. Version deployment and stress testing of each business environment will not affect other services, ensuring the stability and continuity of financial operations.

[0099] In another alternative implementation, in scenarios with high real-time requirements, such as healthcare and financial services, once the target internal processing environment completes processing an external request, it generates a request processing result. After receiving the result, the internal system transmits it to the external system that initiated the request via a public gateway, ensuring the external system can obtain the processing result promptly. When the external system receives the request processing result and generates feedback, it sends the feedback back via the public gateway. When the internal system receives the feedback via the public gateway, it routes the feedback to the target internal processing environment. This allows the feedback to be further processed within the target internal processing environment, which is familiar with the business context, ensuring consistency and accuracy in the processing.

[0100] Furthermore, considering the stringent requirements for data accuracy and business consistency in medical and financial business scenarios, request headers, as key identifying information in business data flow, are used to accurately identify the source system, business type, related transactions, and other core attributes of the request. They serve as crucial evidence for correctly routing requests, verifying data validity, and ensuring the accurate execution of business logic. Therefore, in another optional implementation, upon receiving a result feedback, the internal system will also parse the result feedback based on the public gateway to identify whether it carries a request header identifier. Simultaneously, the internal system will retrieve the target request header identifier previously determined upon receiving an external request from local storage or relevant configurations. It will then perform a field-by-field comparison to verify the consistency between the extracted request header identifier and the target request header identifier. If a difference is found, it is considered a request header identifier inconsistency. In this case, the internal system will obtain the specified internal service address of the target internal processing environment and query a preset environment mapping table for request header identifiers that have a mapping relationship with the specified internal service address as the standard request header identifier. Then, the internal system generates a request header identifier exception alert using the request header identifier. This alert can include key information such as the exception identifier field name, exception identifier value, target correct identifier value, exception occurrence timestamp, and relevant business transaction ID, enabling the external system to accurately locate the problem and take targeted action. After the result feedback is processed, the internal system transmits the processing information and request header identifier exception alert to the external system through the public gateway. Upon receiving the transmitted data, the external system can extract the processing information and request header identifier exception alert. The external system performs a secondary verification of the request header identifier carried in the result feedback and corrects the abnormal request header identifier based on the verification result, such as directly replacing it with a standard request header identifier, recording the exception, and notifying relevant operations and maintenance personnel for manual intervention. Through this series of processes, business processing anomalies caused by incorrect request header identifiers can be effectively avoided, ensuring the stable and reliable operation of the medical and financial business systems.

[0101] In summary, the overall logic of the technical solution of this invention is summarized as follows: See Figure 6When an external system sends a request to the public gateway, if the external system supports including a request header in the request and does so, the public gateway will determine the corresponding internal processing environment based on the request header. If it matches internal processing environment 1, the request will be processed by internal processing environment 1; if it matches internal processing environment 2, the request will be processed by internal processing environment 2. However, if the external system does not support including a request header in the request, the public gateway will enter the rule routing stage. Through preset routing rule configuration, it can point to internal processing environment 1, internal processing environment 2, or other internal processing environments. If it points to internal processing environment 1, the request will be processed by internal processing environment 1; if it points to internal processing environment 2, the request will be processed by internal processing environment 2; and if it points to other internal processing environments, the request will be processed by those other internal processing environments.

[0102] As can be seen, in the above solution, for scenarios with high real-time requirements such as medical and financial services, the target internal processing environment can be determined by analyzing the target request header identifier or target request business information in the external request. The external request is then automatically routed to the target internal processing environment for processing. This allows each internal processing environment to be deployed independently, and the data in each internal processing environment is isolated from each other, without affecting each other. There is no need to use a shared database mode for deployment, which reduces the risk of data pollution and leakage of patient privacy in the medical field. At the same time, it can also ensure that the normal operation of other internal processing environments is not affected when each internal processing environment is deployed and stress tested, avoiding interruptions to clinical or financial services, ensuring testing efficiency, and providing good stability.

[0103] It should be understood that the sequence number of each step in the above embodiments 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 the present invention.

[0104] In one embodiment, a public gateway-based request routing apparatus is provided, which corresponds one-to-one with the public gateway-based request routing methods described in the above embodiments. For example... Figure 7 As shown, the public gateway-based request routing device includes a receiving module 701, a determining module 702, and a routing module 703. Detailed descriptions of each functional module are as follows:

[0105] The receiving module 701 is used to receive external requests transmitted by external systems based on a public gateway, wherein the public gateway is configured with a preset environment mapping table and preset routing rules;

[0106] The determination module 702 is used to call the public gateway, which analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request.

[0107] The routing module 703 is used to route the external request to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

[0108] In one embodiment, the public gateway-based request routing device further includes:

[0109] A construction module is used to construct the public gateway with reference to a preset transmission protocol; in the public gateway, a preset environment mapping table is configured, which records the mapping relationship between multiple request header identifiers and internal service addresses; the preset routing rules are obtained and configured in the public gateway, which are used to determine the internal processing environment that matches the received external request when no request header identifier is identified.

[0110] In one embodiment, the determining module 702 is configured to determine a request header in the external request and to call the public gateway to analyze the request header to identify whether a specified string exists in the request header that has the same format as multiple request header identifiers recorded in the preset environment mapping table; when the specified string is identified as existing in the request header, the specified string is used as the target request header identifier, and the target internal processing environment is determined in multiple preset internal processing environments using the target request header identifier and the preset environment mapping table; when the specified string is identified as not existing in the request header, the external request is identified to determine the target request service information, and the target internal processing environment is determined in the multiple internal processing environments based on the target request service information and the preset routing rules.

[0111] In one embodiment, the determining module 702 is configured to traverse each request header identifier included in the preset environment mapping table, determine a specified request header identifier that is consistent with the target request header identifier from among the multiple request header identifiers included in the preset environment mapping table, wherein the characters constituting the specified request header identifier are the same as the characters constituting the target request header identifier; query the preset environment mapping table for a specified internal service address that has a mapping relationship with the specified request header identifier; obtain the preset multiple internal processing environments, and determine the internal processing environment indicated by the specified internal service address as the target internal processing environment from among the multiple internal processing environments.

[0112] In one embodiment, the determining module 702 is configured to identify the external request, extract multiple request fields from the external request, determine a designated request field related to the business among the multiple request fields, determine the target request business information based on the designated request field, wherein the designated request field is a business type field or an external domain name field; use the target request business information to perform a fuzzy search in the rule content of the preset routing rules to obtain the searched internal environment identifier; obtain the preset multiple internal processing environments, and determine the internal processing environment indicated by the internal environment identifier as the target internal processing environment among the multiple internal processing environments.

[0113] In one embodiment, the public gateway-based request routing device further includes:

[0114] The feedback module is used to obtain the request processing result of the external request, and transmit the request processing result to the external system based on the public gateway; when the public gateway receives the result feedback on the request processing result, the public gateway is used to route the result feedback to the target internal processing environment so that the result feedback can be processed in the target internal processing environment.

[0115] In one embodiment, the feedback module is further configured to identify, based on the public gateway, whether the result feedback carries a request header identifier; if the public gateway identifies that the result feedback carries a request header identifier and the requested header identifier is inconsistent with the target request header identifier, then the module obtains a specified internal service address of the target internal processing environment, and queries the preset environment mapping table for a request header identifier that has a mapping relationship with the specified internal service address as a standard request header identifier; generates a request header identifier exception alert using the request header identifier; and after the result feedback is processed, transmits the processing information of the result feedback and the request header identifier exception alert to the external system, so that the external system can use the standard request header identifier to verify and rectify the request header identifier carried in the result feedback.

[0116] This invention provides a request routing device based on a public gateway. For scenarios with high real-time requirements, such as medical and financial services, it can determine the target internal processing environment by analyzing the target request header identifier or target request business information in external requests, and automatically route external requests to the target internal processing environment for processing. This allows each internal processing environment to be deployed independently with data isolation between them, eliminating the need for a shared database deployment mode. This reduces the risk of data pollution and patient privacy leaks in the medical field. Furthermore, it ensures that version deployment and stress testing of each internal processing environment do not affect the normal operation of other internal processing environments, avoiding interruptions to clinical or financial services, ensuring testing efficiency and good stability.

[0117] For specific limitations regarding the public gateway-based request routing device, please refer to the limitations of the public gateway-based request routing method above, which will not be repeated here. Each module in the aforementioned public gateway-based request routing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0118] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When executed by the processor, the computer program implements server-side functions or steps of a request routing method based on a public gateway.

[0119] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a request routing method based on a public gateway.

[0120] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0121] Based on receiving external requests transmitted from external systems through a public gateway, the public gateway is configured with a preset environment mapping table and preset routing rules;

[0122] The public gateway is invoked, and the public gateway analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request.

[0123] The external request is routed to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

[0124] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0125] Based on receiving external requests transmitted from external systems through a public gateway, the public gateway is configured with a preset environment mapping table and preset routing rules;

[0126] The public gateway is invoked, and the public gateway analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request.

[0127] The external request is routed to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

[0128] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0129] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to 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.

[0131] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A request routing method based on a public gateway, characterized in that, include: Based on receiving external requests transmitted from external systems through a public gateway, the public gateway is configured with a preset environment mapping table and preset routing rules; The public gateway is invoked, and the public gateway analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request. The external request is routed to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

2. The method according to claim 1, characterized in that, Before receiving an external request transmitted by at least one external system based on the public gateway, the method further includes: The public gateway is constructed according to a preset transmission protocol; In the public gateway, a preset environment mapping table is configured, which records the mapping relationship between multiple request header identifiers and internal service addresses; Obtain the preset routing rules and configure them in the public gateway. The preset routing rules are used to determine the internal processing environment that matches the received external request when no request header identifier is identified.

3. The method according to claim 1, characterized in that, The invocation of the public gateway involves the public gateway analyzing the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment matching the external request, including: The request header is determined in the external request, and the public gateway is invoked to analyze the request header to identify whether there is a specified string in the request header that is consistent with the format of multiple request header identifiers recorded in the preset environment mapping table; When it is determined that the specified string exists in the request header, the specified string is used as the target request header identifier, and the target internal processing environment is determined in a plurality of preset internal processing environments using the target request header identifier and the preset environment mapping table. When it is determined that the specified string does not exist in the request header, the external request is identified, the target request business information is determined, and the target internal processing environment is determined among the multiple internal processing environments based on the target request business information and the preset routing rules.

4. The method according to claim 3, characterized in that, The step of determining the target internal processing environment from multiple preset internal processing environments using the target request header identifier and the preset environment mapping table includes: Traverse each request header identifier included in the preset environment mapping table, and determine a specified request header identifier that is consistent with the target request header identifier from among the multiple request header identifiers included in the preset environment mapping table, wherein the characters constituting the specified request header identifier are the same as the characters constituting the target request header identifier; In the preset environment mapping table, query the specified internal service address that has a mapping relationship with the specified request header identifier; Obtain the preset plurality of internal processing environments, and determine the internal processing environment indicated by the specified internal service address as the target internal processing environment among the plurality of internal processing environments.

5. The method according to claim 3, characterized in that, The process of identifying the external request, determining the target request service information, and determining the target internal processing environment from among the multiple internal processing environments based on the target request service information and the preset routing rules includes: The external request is identified, and multiple request fields are extracted from the external request; Among the plurality of request fields, a specific request field related to the business is determined, and the target request business information is determined based on the specific request field, wherein the specific request field is a business type field or an external domain name field; Using the target request service information, a fuzzy search is performed on the rule content of the preset routing rule to obtain the searched internal environment identifier; Obtain the preset plurality of internal processing environments, and determine the internal processing environment indicated by the internal environment identifier as the target internal processing environment among the plurality of internal processing environments.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the request processing result of the external request, and transmit the request processing result to the external system based on the public gateway; When the public gateway receives a result feedback on the processing result of the request, the public gateway is used to route the result feedback to the target internal processing environment so that the result feedback can be processed in the target internal processing environment.

7. The method according to claim 6, characterized in that, The method further includes: Based on the public gateway, identify whether the result feedback carries a request header identifier; If the public gateway identifies that the result feedback carries a request header identifier and that the request header identifier is inconsistent with the target request header identifier, then the specified internal service address of the target internal processing environment is obtained, and the request header identifier that has a mapping relationship with the specified internal service address is queried in the preset environment mapping table as the standard request header identifier. The request header identifier is used to generate a request header identifier exception alert. After the result feedback is processed, the processing information of the result feedback and the request header identifier exception alert are transmitted to the external system so that the external system can use the standard request header identifier to verify and rectify the request header identifier carried in the result feedback.

8. A request routing device based on a public gateway, characterized in that, include: The receiving module is used to receive external requests transmitted by external systems based on a public gateway, wherein the public gateway is configured with a preset environment mapping table and preset routing rules; The determination module is used to call the public gateway, which analyzes the external request according to the preset environment mapping table and the preset routing rules to determine the target internal processing environment that matches the external request. The target internal processing environment is determined by analyzing the target request header identifier or target request service information in the external request. The routing module is used to route the external request to the target internal processing environment using the public gateway, so that the external request can be processed in the target internal processing environment.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the public gateway-based request routing method as described in any one of claims 1 to 7.

10. A storage medium, wherein the computer-readable storage medium stores a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the public gateway-based request routing method as described in any one of claims 1 to 7.