CN110620727B - Gateway automatic routing method and related equipment in multi-environment - Google Patents

Gateway automatic routing method and related equipment in multi-environment Download PDF

Info

Publication number
CN110620727B
CN110620727B CN201910846020.3A CN201910846020A CN110620727B CN 110620727 B CN110620727 B CN 110620727B CN 201910846020 A CN201910846020 A CN 201910846020A CN 110620727 B CN110620727 B CN 110620727B
Authority
CN
China
Prior art keywords
interface path
isolation identifier
environment
environment isolation
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910846020.3A
Other languages
Chinese (zh)
Other versions
CN110620727A (en
Inventor
郑炳秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910846020.3A priority Critical patent/CN110620727B/en
Publication of CN110620727A publication Critical patent/CN110620727A/en
Priority to PCT/CN2020/099579 priority patent/WO2021047252A1/en
Application granted granted Critical
Publication of CN110620727B publication Critical patent/CN110620727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of cloud, in particular to an automatic gateway routing method and related equipment under a multi-environment, which comprises the following steps: receiving a service request sent by a user side, and extracting an interface path from the service request; traversing a preset interface path classification table containing an environment isolation identifier to inquire whether the interface path contains the environment isolation identifier; if the interface path contains the environment isolation identifier, determining a micro service component corresponding to the service request according to the interface path and the environment isolation identifier; and sending the service request to a micro service component corresponding to the service request for processing, receiving a processing result, and returning the processing result to the user side. The invention well solves the problem that the gateway can not decide which test environment of the corresponding micro-service component the interface request is routed to at present through the environment isolation identifier.

Description

Gateway automatic routing method and related equipment in multi-environment
Technical Field
The invention relates to the technical field of cloud, in particular to an automatic gateway routing method and related equipment in a multi-environment.
Background
Under the micro-service architecture, the gateway is responsible for forwarding the service request to the correct micro-service component for processing according to the routing strategy. Generally, the interfaces of the micro service components and the micro services are in one-to-one correspondence.
In iterative development, a micro service component may have multiple sets of test environments for different versions of a test, the same micro service component has the same interface in different environments, in which case the gateway cannot decide which environment to route an interface request to the corresponding micro service component.
Disclosure of Invention
Based on the method, the gateway automatic routing method and the related equipment under the multi-environment are provided for solving the problem that the current gateway cannot make a decision and route the interface request to the test environment corresponding to the micro-service component.
A gateway automatic routing method under multi-environment comprises the following steps:
receiving a service request sent by a user side, and extracting an interface path from the service request;
traversing a preset interface path classification table containing an environment isolation identifier to inquire whether the interface path contains the environment isolation identifier;
if the interface path contains the environment isolation identifier, determining a micro service component corresponding to the service request according to the interface path and the environment isolation identifier;
and sending the service request to a corresponding micro service component for processing, receiving a processing result, and returning the processing result to the user side.
In one possible embodiment, the extracting, from the service request, the interface path of the service request sent by the receiving user side includes:
receiving a plurality of service requests sent by a user side through a preset receiving inlet, and extracting grade information of the service requests from each service request;
according to the grade information of the service requests, the service requests are ranked in a grading way;
and extracting interface paths in the service requests at the same level in parallel.
In one possible embodiment, the traversing a preset interface path classification table containing an environment isolation identifier to query whether the interface path contains the environment isolation identifier includes:
calling a preset interface path classification table containing an environmental isolation identifier, and performing keyword query on an interface path according to entries in the preset interface path classification table containing the environmental isolation identifier;
if the interface path is inquired in a preset interface path classification table containing the environment isolation identifier, determining that the interface path contains the environment isolation identifier, otherwise, determining that the interface path does not contain the environment isolation identifier.
In one possible embodiment, if the interface path includes the environment isolation identifier, determining, according to the interface path and the environment isolation identifier, a micro service component corresponding to the service request includes:
if the interface path contains the environment isolation identifier, separating the environment isolation identifier from the interface path to obtain the interface path without the environment isolation identifier;
according to the interface path without the environment isolation identifier, searching an application name of the micro-service component corresponding to the interface path without the environment isolation identifier in a preset routing strategy file;
adding the environment isolation identifier separated from the interface path to the application name of the micro-service component to obtain the application name of the micro-service component containing the environment isolation identifier;
and searching a target micro-service component corresponding to the application name containing the same environment isolation identifier in a registry according to the application name of the micro-service component containing the environment isolation identifier, wherein the target micro-service component is the micro-service component corresponding to the service request.
In one possible embodiment, if the interface path includes the environment isolation identifier, the separating the environment isolation identifier from the interface path to obtain an interface path without an environment isolation identifier further includes:
extracting a first character string determined by a first specified characteristic character and a first specified position from the interface path according to a preset extraction rule, wherein the first specified position refers to the position of the first specified characteristic character;
intercepting a second character string determined by a second specified characteristic character and a second specified position in the first character string, separating the second character string from the interface path to obtain the interface path without the environment isolation identifier, wherein the second specified position is the position of the second specified characteristic character, and the second specified characteristic character is different from the first specified characteristic character.
In one possible embodiment, the sending the service request to a corresponding micro service component for processing, receiving a processing result, and returning the processing result to the user side includes:
acquiring a server address of the micro-service component;
connecting a corresponding cloud server according to the server address, and sending the service request to the cloud server for processing;
and receiving feedback information of the cloud server, extracting the processing result from the feedback information and returning the processing result to the user side.
In one possible embodiment, the traversing a preset interface path classification table containing an environment isolation identifier to query whether the interface path contains the environment isolation identifier, if the interface path contains the environment isolation identifier, after acquiring a micro service component of a corresponding environment according to the interface path and the environment isolation identifier, the method for automatically routing a gateway in a multi-environment further includes:
if the interface path does not contain the environment isolation identifier, searching an application name of the micro service component corresponding to the interface path in a preset routing policy file according to the interface path, searching the micro service components under a plurality of corresponding environments in a registry according to the application name of the micro service component, and sending the service request to the micro service components under any environment for processing.
A gateway automatic routing device under multi-environment comprises the following modules:
the receiving module is used for receiving a service request sent by a user side and extracting an interface path from the service request;
the query module is used for traversing a preset interface path classification table containing the environment isolation identifier to query whether the interface path contains the environment isolation identifier;
the processing module is used for determining the micro service component corresponding to the service request according to the interface path and the environment isolation identifier if the interface path contains the environment isolation identifier;
and the sending module is used for sending the service request to the corresponding micro-service component for processing, receiving a processing result and returning the processing result to the user side.
Based on the same concept, the present invention proposes a computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the above-mentioned gateway automatic routing method in multi-environment.
Based on the same concept, the present invention proposes a storage medium readable and writable by a processor, the storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the gateway automatic routing method in the multi-environment described above.
Compared with the prior art, the method and the system well solve the problem that the gateway cannot decide which test environment of the corresponding microservice component the interface request is routed to at present through the environment isolation identifier.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
FIG. 1 is a flowchart illustrating an overall method for automatic routing of gateways in a multi-environment, in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an interface path extraction process in a gateway automatic routing method under multiple environments according to an embodiment of the present invention;
FIG. 3 is a process diagram illustrating the determine microservice component of the gateway automatic routing method in a multi-environment in accordance with an embodiment of the present invention;
fig. 4 is a block diagram of a gateway automatic routing apparatus in a multi-environment in one embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Fig. 1 is an overall flowchart of a multi-environment gateway automatic routing method according to an embodiment of the present invention, and the multi-environment gateway automatic routing method includes the following steps:
s1, receiving a service request sent by a user side, and extracting an interface path from the service request;
the service request refers to a request for the micro service component to provide corresponding functional services under the micro service architecture. For example, under the micro service architecture, the system may be divided into a plurality of micro service components according to functions, and provide services to the outside in a restful interface form, the correction component provides a correction function service, the printing component provides a printing function service, and the query component provides a data (such as a policy, a batch, and the like) query function service. If the policy data needs to be inquired, a service request can be sent to the gateway, the service request comprises an interface path, a corresponding inquiry component can be matched in the routing policy file according to the interface path, and the service request is forwarded to the inquiry component, so that the inquiry service can be provided. Specifically, when only one set of test environment exists, the interface path of the query component is/query/policy; when there are multiple sets of test environments, the interface path will typically bring up an environmental isolation label.
S2, traversing a preset interface path classification table containing the environment isolation identifier to inquire whether the interface path contains the environment isolation identifier;
the preset interface path classification table containing the environment isolation identifier is preset, and all interface paths containing different environment isolation identifiers are recorded in the classification table. The context isolation identifier is in the form of a character string, and if the interface path includes the context isolation identifier, the context isolation identifier is usually attached to the interface path, for example, the interface path with the context isolation identifier of the query component is/query _ stg1/policy, where "_ stg 1" is the context isolation identifier.
In one embodiment, the traversing a preset interface path classification table containing an environment isolation identifier to query whether the interface path contains the environment isolation identifier includes:
calling a preset interface path classification table containing an environmental isolation identifier, and performing keyword query on an interface path according to entries in the preset interface path classification table containing the environmental isolation identifier;
if the interface path is inquired in a preset interface path classification table containing the environment isolation identifier, determining that the interface path contains the environment isolation identifier, otherwise, determining that the interface path does not contain the environment isolation identifier.
S3, if the interface path contains the environment isolation identifier, determining the micro service component corresponding to the service request according to the interface path and the environment isolation identifier;
specifically, the different environment isolation identifiers correspond to different micro service components, for example, a correction component in the micro service components provides a correction function service, a printing component provides a printing function service, and an inquiry component provides a data (such as a policy, a batch, etc.) inquiry function service. And the environment isolation identifier corresponding to the batched component is "query _ stg 1" in the interface path/query _ stg1/policy, namely "query _ stg 1" exists in the interface path, and then the interface path corresponds to the batched component.
And S4, sending the service request to the corresponding micro service component for processing, receiving a processing result, and returning the processing result to the user side.
Specifically, the processing result of the micro service component may be a normal result or an abnormal result, and before the processing result of the micro service component is returned to the user side, the processing result may be classified, and if the processing result is a normal result, the processing result is directly returned, and if the processing result is an abnormal result, an abnormal tag is assigned.
In the embodiment, the problem that the gateway cannot make a decision at present and routes the interface request to which test environment of the corresponding microservice component is well solved through the environment isolation identifier.
Fig. 2 is a schematic diagram illustrating a process of extracting an interface path in a gateway automatic routing method in a multi-environment according to an embodiment of the present invention, as shown in the drawing, the S1 includes:
s101, receiving a plurality of service requests sent by a user side through a preset receiving inlet, and extracting grade information of the service requests from each service request;
the service request level can be divided into normal, urgent, etc., and the service request with the "urgent" level is generally prioritized according to the different service request levels.
S102, according to the grade information of the service requests, the service requests are ranked in a grading way;
specifically, the ordering rule is to preferably order the service request with the level "urgent" to the task that is executed with priority, and order the task with the level "urgent" to the rear of the level "urgent".
S103, extracting interface paths in the service requests in the same level in parallel.
In the embodiment, the service requests are ranked, and the sub-information about the interface path at the same level is extracted in parallel, so that the speed of obtaining the interface path is increased, and the efficiency of path selection is improved.
Fig. 3 is a schematic process diagram of a determine microservice component in a gateway automatic routing method in a multi-environment according to an embodiment of the present invention, where, as shown in the drawing, the S3 includes:
s301, if the interface path contains the environment isolation identifier, separating the environment isolation identifier from the interface path to obtain an interface path without the environment isolation identifier;
in one embodiment, after step S301, the method further comprises the steps of:
extracting a first character string determined by a first specified characteristic character and a first specified position from the interface path according to a preset extraction rule, wherein the first specified position refers to the position of the first specified characteristic character;
the preset extraction rule is to extract a feature character of a specified type and a specified position, such as "/endrose _ stg 1/quote", extract the feature character of the specified type as "/", and extract the feature character of the specified position as a first character string between a first "/" feature character and a second "/" feature character, namely "endrose _ stg 1"
Intercepting a second character string determined by a second specified characteristic character and a second specified position in the first character string, separating the second character string from the interface path to obtain the interface path without the environment isolation identifier, wherein the second specified position is the position of the second specified characteristic character, and the second specified characteristic character is different from the first specified characteristic character.
Intercepting a second characteristic character of the first character string of a specified type and position and a second character string after the second characteristic character, for example, intercepting a _ "characteristic character in" endorse _ stg1 "and a second character string" stg1 "after the _" characteristic character, wherein the intercepted _ stg1 "is an environment isolation identifier, and removing the" _ stg1 "from an interface path, thereby obtaining the interface path without the environment isolation identifier.
S302, searching an application name of the micro-service component corresponding to the interface path without the environment isolation identifier in a preset routing strategy file according to the interface path without the environment isolation identifier;
the routing policy file records a corresponding relationship between the interface path and the micro service component, for example, the micro service component corresponding to the interface path "/endrase/quote" is a. The interface path in the routing policy file does not contain the environment isolation identifier, so the application name of the corresponding micro-service component can be found in the routing policy file only by removing the environment isolation identifier.
S303, adding the environment isolation identifier separated from the interface path to the application name of the micro service component to obtain the application name of the micro service component containing the environment isolation identifier;
s304, according to the application name of the micro service component containing the environment isolation identifier, searching a target micro service component corresponding to the application name containing the same environment isolation identifier in a registry, wherein the target micro service component is the micro service component corresponding to the service request.
When the micro service component is deployed in the operating environment, the application name of the micro service component is registered in the registry (the micro service component may have multiple servers, and the IP and the port of each server are recorded in the registry after registration). For example, when only one set of test environment exists, the service name registered by the wholesale component in the registry is a, the request interface/endrase/quote is matched with the micro-service component a from the routing rule set, and the gateway finds the server address with the service name a from the configuration center, so as to forward the interface to the wholesale component a.
When a plurality of sets of test environments exist, the service name registered in the registry by the modifying component running on the test environment stg1 is a _ stg1, the service name registered in the registry by the requesting interface/endorse _ stg1/quote is/endorse/quote after the environment isolation identifier is removed, the matched micro-service component is a, then the environment isolation identifier is added to the matched micro-service component name, namely a _ stg1, the gateway searches whether the service name exists in the registry according to a _ stg1, if so, the address of the server subordinate to the component is obtained, and then the interface request is forwarded to the modifying component of the test environment stg 1. If the interface path does not contain the environment isolation identifier, although the micro service component a can be matched from the route set, the service component can not be found by searching the registration center according to the service name a because the environment isolation identifier does not exist, and thus the service can not be found. For this case, the gateway will have a default handling scheme, such as forwarding to the test environment stg1 by default. The environment isolation identifier is flexible, and when the micro-service component is registered, the service name band is the environment isolation identifier, so the interface path is required to be provided with the environment isolation identifier; the micro-service component registers without the context isolation identifier for the service name, and the interface path does not need to have the context isolation identifier.
According to the embodiment, the environment isolation identifier is effectively separated from the interface path, so that the efficiency of searching the micro service component is improved.
In one embodiment, the S4 includes:
acquiring a server address of the micro-service component;
connecting a corresponding cloud server according to the server address, and sending the service request to the cloud server for processing;
and receiving feedback information of the cloud server, extracting the processing result from the feedback information and returning the processing result to the user side.
In this embodiment, the system includes three terminals, which are a local server, a cloud server and a client, respectively, and the execution main body of this embodiment is the local server.
Specifically, the feedback information may be divided into several sub-segments, and the rule of the sub-segment division is a special symbol, such as ","; "punctuation mark equal. And then, performing result characteristic character recognition on characters in each subsection, wherein the result characteristic characters are preset in a database and can be compared after being called from the database.
In the embodiment, the server address is utilized to accurately send the processing result of the micro service component to the corresponding user side, so that the result error caused by improper selection of the micro service component is avoided.
In one embodiment, after traversing a preset interface path classification table containing an environment isolation identifier to query whether the interface path contains the environment isolation identifier, the method for automatically routing the gateway in the multi-environment further includes:
if the interface path does not contain the environment isolation identifier, searching an application name of the micro service component corresponding to the interface path in a preset routing policy file according to the interface path, searching the micro service components under a plurality of corresponding environments in a registry according to the application name of the micro service component, and sending the service request to the micro service components under any environment for processing.
In an embodiment, an automatic gateway routing apparatus in a multi-environment is provided, as shown in the figure, including a receiving module 10, an inquiring module 20, a processing module 30, and a sending module 40, specifically:
a receiving module 10, configured to receive a service request sent by a user, and extract an interface path from the service request;
the query module 20 is configured to traverse a preset interface path classification table containing an environmental isolation identifier to query whether the interface path contains the environmental isolation identifier;
the processing module 30 is configured to determine, if the interface path includes the environment isolation identifier, a micro service component corresponding to the service request according to the interface path and the environment isolation identifier;
and the sending module 40 is configured to send the service request to a corresponding micro service component for processing, receive a processing result, and return the processing result to the user side.
In one embodiment, a computer device is provided, the computer device includes a memory and a processor, the memory stores computer readable instructions, and when executed by the processor, the processor executes the steps of the gateway automatic routing method in the multi-environment in the above embodiments.
In one embodiment, a storage medium storing computer-readable instructions is provided, which when executed by one or more processors, cause the one or more processors to perform the steps of the method for gateway automatic routing in multi-environment in the above embodiments. Wherein the storage medium may be a non-volatile storage medium.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-described embodiments are merely illustrative of some embodiments of the present invention, and the description is specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A gateway automatic routing method in a multi-environment is characterized by comprising the following steps:
receiving a service request sent by a user side, and extracting an interface path from the service request;
traversing a preset interface path classification table containing an environment isolation identifier to inquire whether the interface path contains the environment isolation identifier;
if the interface path contains the environment isolation identifier, determining a micro service component corresponding to the service request according to the interface path and the environment isolation identifier;
if the interface path contains the environment isolation identifier, separating the environment isolation identifier from the interface path to obtain the interface path without the environment isolation identifier;
according to the interface path without the environment isolation identifier, searching an application name of a micro-service component corresponding to the interface path without the environment isolation identifier in a preset routing policy file, wherein the micro-service component comprises a correcting component, a printing component and a query component, and the query component is obtained by matching the interface path with the preset routing policy file;
adding the environment isolation identifier separated from the interface path to the application name of the micro-service component to obtain the application name of the micro-service component containing the environment isolation identifier;
searching a server address of the component in a registration center according to the application name of the micro-service component containing the environment isolation identifier;
and sending the service request to the correction component for processing according to the address of the server subordinate to the component, receiving a processing result, and returning the processing result to the user side.
2. The method according to claim 1, wherein the extracting interface paths from the service request sent by the receiving client comprises:
receiving a plurality of service requests sent by a user side through a preset receiving inlet, and extracting grade information of the service requests from each service request;
according to the grade information of the service requests, the service requests are ranked in a grading way;
and extracting interface paths in the service requests at the same level in parallel.
3. The method according to claim 1, wherein the traversing a preset interface path classification table containing a context isolation identifier, and querying whether the interface path contains a context isolation identifier comprises:
calling a preset interface path classification table containing an environmental isolation identifier, and performing keyword query on an interface path according to entries in the preset interface path classification table containing the environmental isolation identifier;
if the interface path is inquired in a preset interface path classification table containing the environment isolation identifier, determining that the interface path contains the environment isolation identifier, otherwise, determining that the interface path does not contain the environment isolation identifier.
4. The method according to claim 1, wherein if the interface path includes the environment isolation identifier, the method further comprises, after separating the environment isolation identifier from the interface path and obtaining an interface path without an environment isolation identifier:
extracting a first character string determined by a first specified characteristic character and a first specified position from the interface path according to a preset extraction rule, wherein the first specified position refers to the position of the first specified characteristic character;
intercepting a second character string determined by a second specified characteristic character and a second specified position in the first character string, separating the second character string from the interface path to obtain the interface path without the environment isolation identifier, wherein the second specified position is the position of the second specified characteristic character, and the second specified characteristic character is different from the first specified characteristic character.
5. The method according to claim 1, wherein the sending the service request to the modification component for processing according to the address of the server subordinate to the component, receiving a processing result, and returning the processing result to the user side comprises:
connecting a corresponding cloud server according to the server address of the component, and sending the service request to the cloud server for processing;
and receiving feedback information of the cloud server, extracting the processing result from the feedback information and returning the processing result to the user side.
6. The method according to claim 1, wherein after traversing the preset interface path classification table containing the environment isolation identifier to query whether the interface path contains the environment isolation identifier, the method further comprises:
if the interface path does not contain the environment isolation identifier, searching an application name of the micro service component corresponding to the interface path in a preset routing policy file according to the interface path, searching the micro service components under a plurality of corresponding environments in a registry according to the application name of the micro service component, and sending the service request to the micro service components under any environment for processing.
7. The gateway automatic routing device under the multi-environment is characterized by comprising the following modules:
the receiving module is used for receiving a service request sent by a user side and extracting an interface path from the service request;
the query module is used for traversing a preset interface path classification table containing the environment isolation identifier to query whether the interface path contains the environment isolation identifier;
the processing module is used for determining the micro service component corresponding to the service request according to the interface path and the environment isolation identifier if the interface path contains the environment isolation identifier; if the interface path contains the environment isolation identifier, separating the environment isolation identifier from the interface path to obtain the interface path without the environment isolation identifier; according to the interface path without the environment isolation identifier, searching an application name of a micro-service component corresponding to the interface path without the environment isolation identifier in a preset routing policy file, wherein the micro-service component comprises a correcting component, a printing component and a query component, and the query component is obtained by matching the interface path with the preset routing policy file; adding the environment isolation identifier separated from the interface path to the application name of the micro-service component to obtain the application name of the micro-service component containing the environment isolation identifier; searching a server address of the component in a registration center according to the application name of the micro-service component containing the environment isolation identifier;
and the sending module is used for sending the service request to the correction component for processing according to the address of the server subordinate to the component, receiving a processing result and returning the processing result to the user side.
8. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by one or more of the processors, cause the one or more processors to perform the steps of the multi-environment gateway auto-routing method of any one of claims 1 to 6.
9. A storage medium readable by a processor, the storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the multi-environment gateway auto-routing method of any one of claims 1 to 6.
CN201910846020.3A 2019-09-09 2019-09-09 Gateway automatic routing method and related equipment in multi-environment Active CN110620727B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910846020.3A CN110620727B (en) 2019-09-09 2019-09-09 Gateway automatic routing method and related equipment in multi-environment
PCT/CN2020/099579 WO2021047252A1 (en) 2019-09-09 2020-06-30 Method and apparatus for automatic routing of gateway in multiple environments, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910846020.3A CN110620727B (en) 2019-09-09 2019-09-09 Gateway automatic routing method and related equipment in multi-environment

Publications (2)

Publication Number Publication Date
CN110620727A CN110620727A (en) 2019-12-27
CN110620727B true CN110620727B (en) 2022-02-22

Family

ID=68922630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910846020.3A Active CN110620727B (en) 2019-09-09 2019-09-09 Gateway automatic routing method and related equipment in multi-environment

Country Status (2)

Country Link
CN (1) CN110620727B (en)
WO (1) WO2021047252A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110620727B (en) * 2019-09-09 2022-02-22 平安科技(深圳)有限公司 Gateway automatic routing method and related equipment in multi-environment
CN112953996B (en) * 2020-08-03 2022-09-27 深圳市明源云链互联网科技有限公司 Service method and system thereof
CN112532523B (en) * 2020-11-23 2021-11-12 福建顶点软件股份有限公司 In-process scheduling method based on sub-service routing and storage device
CN112995269B (en) * 2020-12-10 2022-01-11 腾讯科技(深圳)有限公司 Data processing method, computer device and readable storage medium
CN112882752B (en) * 2021-01-26 2022-10-28 苏州达家迎信息技术有限公司 Method and device for processing micro services in batches, computer equipment and storage medium
CN112801504A (en) * 2021-01-28 2021-05-14 国网浙江省电力有限公司信息通信分公司 Power grid service processing method based on micro-service architecture
CN112965700B (en) * 2021-05-17 2021-08-20 太平金融科技服务(上海)有限公司 Routing-based micro-service processing method and device, computer equipment and medium
CN113301155B (en) * 2021-05-24 2022-08-16 挂号网(杭州)科技有限公司 Data routing method, device, equipment and storage medium
CN114064475B (en) * 2021-11-11 2024-08-20 中国联合网络通信集团有限公司 Cloud native application testing method, device, equipment and storage medium
CN114726854B (en) * 2021-12-27 2024-06-07 天翼云科技有限公司 Service request processing method and device and cloud service system
CN114500027B (en) * 2022-01-21 2024-01-12 杭州玳数科技有限公司 Nacos-based service registration and service invocation method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878393A (en) * 2017-01-16 2017-06-20 深圳市商沃科技发展有限公司 A kind of system based on fusion micro services framework
CN107612959A (en) * 2017-07-21 2018-01-19 哈尔滨工程大学 A kind of cloud service platform based on cloud micro services Self management
CN107979508A (en) * 2017-11-24 2018-05-01 深圳乐信软件技术有限公司 Micro services test method and device
CN109495559A (en) * 2018-11-06 2019-03-19 用友网络科技股份有限公司 Service registration and call method, the registration and calling system of micro services client
CN109688191A (en) * 2018-10-24 2019-04-26 华为技术有限公司 Traffic scheduling method and communication device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9787690B2 (en) * 2014-12-19 2017-10-10 Microsoft Technology Licensing, Llc Security and permission architecture
US9992272B2 (en) * 2015-08-29 2018-06-05 Vmware, Inc. Enterprise connectivity to the hybrid cloud
CN106911648B (en) * 2015-12-23 2019-12-24 阿里巴巴集团控股有限公司 Environment isolation method and equipment
US10467039B2 (en) * 2017-08-07 2019-11-05 Open Data Group Inc. Deployment and management platform for model execution engine containers
CN110620727B (en) * 2019-09-09 2022-02-22 平安科技(深圳)有限公司 Gateway automatic routing method and related equipment in multi-environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878393A (en) * 2017-01-16 2017-06-20 深圳市商沃科技发展有限公司 A kind of system based on fusion micro services framework
CN107612959A (en) * 2017-07-21 2018-01-19 哈尔滨工程大学 A kind of cloud service platform based on cloud micro services Self management
CN107979508A (en) * 2017-11-24 2018-05-01 深圳乐信软件技术有限公司 Micro services test method and device
CN109688191A (en) * 2018-10-24 2019-04-26 华为技术有限公司 Traffic scheduling method and communication device
CN109495559A (en) * 2018-11-06 2019-03-19 用友网络科技股份有限公司 Service registration and call method, the registration and calling system of micro services client

Also Published As

Publication number Publication date
WO2021047252A1 (en) 2021-03-18
CN110620727A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
CN110620727B (en) Gateway automatic routing method and related equipment in multi-environment
US10305776B2 (en) Network verification
CN102549988B (en) Router and the method performed by router
CN109714239B (en) Management message issuing method, VNFM (virtual network management frequency) equipment and server
CN114186100B (en) Data storage and query method, device and database system
US7814165B2 (en) Message classification system and method
US8223785B2 (en) Message processing and content based searching for message locations in an asynchronous network
CN105989457A (en) Information query method and apparatus thereof
CN110213365B (en) User access request processing method based on user partition and electronic equipment
JP4542580B2 (en) Route hijack detection method, route monitoring device, route hijack detection system, and route hijack detection program
CN112565091A (en) Message forwarding method and device, storage medium and terminal equipment
CN115809301B (en) Database processing method and device, electronic equipment and readable storage medium
US11811587B1 (en) Generating incident response action flows using anonymized action implementation data
CN108718277B (en) Message forwarding method based on routing table, routing table maintenance method and related device
JP2006277158A (en) Data update system, server and program
CN112351050A (en) Method, device, communication equipment and storage medium for mirroring data stream
CN113688289B (en) Data packet key field matching method, device, equipment and storage medium
CN113037630B (en) Table entry issuing method and device and table entry processing method and device
JP7231032B2 (en) Country Estimator, Country Estimation Method and Country Estimation Program
US10936488B1 (en) Incident response in an information technology environment using cached data from external services
US20170244642A1 (en) Multi-dimensional packet classification
CN112564928A (en) Service classification method and equipment and Internet system
CN107547405B (en) Routing agent method and device
CN111669338B (en) Message forwarding method and device, high-density server and storage medium
CN111132121B (en) Information processing method and network warehouse function NRF network element

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant