CN114390032A - Method, device, equipment and medium for requesting exit gateway - Google Patents

Method, device, equipment and medium for requesting exit gateway Download PDF

Info

Publication number
CN114390032A
CN114390032A CN202210032183.XA CN202210032183A CN114390032A CN 114390032 A CN114390032 A CN 114390032A CN 202210032183 A CN202210032183 A CN 202210032183A CN 114390032 A CN114390032 A CN 114390032A
Authority
CN
China
Prior art keywords
configuration information
request
gateway
placeholder
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210032183.XA
Other languages
Chinese (zh)
Inventor
王滔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengcaiyun Co ltd
Original Assignee
Zhengcaiyun 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 Zhengcaiyun Co ltd filed Critical Zhengcaiyun Co ltd
Priority to CN202210032183.XA priority Critical patent/CN114390032A/en
Publication of CN114390032A publication Critical patent/CN114390032A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

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

Abstract

The application discloses a method, a device, equipment and a medium for requesting an exit gateway, which comprise the following steps: acquiring an application request for calling a third-party gateway; determining target gateway configuration information corresponding to the application request from all gateway configuration information; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information; analyzing placeholders in a request template in the target gateway configuration information according to placeholder configuration information in the target gateway configuration information to obtain an analyzed request template; and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template. The efficiency of the butt joint of export gateway and third party's gateway can be promoted to, the butt joint technical degree of difficulty is reduced.

Description

Method, device, equipment and medium for requesting exit gateway
Technical Field
The present application relates to the field of gateway technologies, and in particular, to a method, an apparatus, a device, and a medium for requesting an egress gateway.
Background
The gateway system can be generally divided into an egress gateway and an ingress gateway, wherein the egress gateway refers to a gateway calling an external third party gateway, and the ingress gateway refers to a gateway called by an external interface. In the prior art, since the egress gateway needs to call various external third-party gateways, developers need to spend a lot of time developing codes for docking different third-party gateways, the docking efficiency is low, the docking technical difficulty is high, and the requirements on the technical level of related personnel are high.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device and a medium for requesting an egress gateway, which can improve the docking efficiency between the egress gateway and a third-party gateway and reduce the difficulty of the docking technology. The specific scheme is as follows:
in a first aspect, the present application discloses an egress gateway request method, including:
acquiring an application request for calling a third-party gateway;
determining target gateway configuration information corresponding to the application request from all gateway configuration information; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information;
analyzing placeholders in a request template in the target gateway configuration information according to placeholder configuration information in the target gateway configuration information to obtain an analyzed request template;
and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template.
Optionally, the determining, from the gateway configuration information, target gateway configuration information corresponding to the application request includes:
forming a target key value based on a target field in the application request;
matching the target key value with key values corresponding to the gateway configuration information to obtain matching key values;
and determining the gateway configuration information corresponding to the matching key value as the target gateway configuration information corresponding to the application request.
Optionally, the placeholder configuration information includes an analytic mode; correspondingly, the analyzing the placeholder in the request template in the target gateway configuration information according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template includes:
determining an analysis mode corresponding to a placeholder in a request template in the target gateway configuration information from the placeholder configuration information in the target gateway configuration information;
and calling an analysis node corresponding to the analysis mode to analyze the placeholder, so as to obtain an analyzed request template.
Optionally, the placeholder configuration information further includes value information corresponding to the parsing manner; correspondingly, the calling the resolution node corresponding to the resolution mode to resolve the placeholder to obtain the resolved request template includes:
and calling an analysis node corresponding to the analysis mode, and analyzing the placeholders in the value information and the placeholders in the request template based on a recursive mode to obtain the analyzed request template.
Optionally, the method further includes:
when the analysis value of any placeholder is analyzed, judging whether the analysis value exists in the request context cache of the application request, if not, adding the analysis value to the request context cache;
correspondingly, before any placeholder is resolved, whether a resolving value corresponding to the placeholder exists in the request context cache is judged, and if the resolving value exists, the resolving value is directly obtained from the request context cache.
Optionally, the analysis node is an analysis node corresponding to a security verification mode of the third-party gateway.
Optionally, any gateway configuration information further includes a request mode; correspondingly, sending a call request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template, including:
determining a request mode in the target gateway configuration information;
and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the request mode and the analyzed request template.
In a second aspect, the present application discloses an egress gateway request apparatus, including:
the application request acquisition module is used for acquiring an application request for calling a third-party gateway;
a configuration information determining module, configured to determine, from each gateway configuration information, target gateway configuration information corresponding to the application request; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information;
the request template analysis module is used for analyzing placeholders in the request template in the target gateway configuration information according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template;
and the calling request sending module is used for sending a calling request to the third-party gateway corresponding to the target gateway configuration information based on the analyzed request template.
In a third aspect, the present application discloses an electronic device comprising a processor and a memory; wherein the content of the first and second substances,
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the egress gateway request method.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the egress gateway request method as described above.
Therefore, the application requests for calling the third-party gateways are obtained first, and then the target gateway configuration information corresponding to the application requests is determined from the gateway configuration information; the gateway configuration information is configuration information of each third-party gateway, any gateway configuration information comprises a request template and placeholder configuration information, a placeholder in the request template in the target gateway configuration information is analyzed according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template, and finally a calling request is sent to the third-party gateway corresponding to the target gateway configuration information based on the analyzed request template. That is, in the present application, after acquiring an application request for calling a third-party gateway, an egress gateway determines target gateway configuration information from gateway configuration information of each third-party gateway, then parses the target gateway configuration information including a request template and placeholder configuration information, and finally sends a call request to a corresponding third-party gateway based on the parsed request template, so that the third-party gateway is docked by the gateway configuration information of each third gateway without separately developing codes, thereby improving the docking efficiency of the egress gateway and the third-party gateway, and reducing the difficulty of the docking technique, even if a service person who does not understand a program can dock the third-party gateway by configuration.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an egress gateway request method disclosed in the present application;
fig. 2 is a schematic diagram of specific gateway configuration information disclosed in the present application;
fig. 3 is a flow chart of a specific egress gateway request method disclosed herein;
fig. 4 is a schematic diagram of a specific egress gateway request method disclosed in the present application;
fig. 5 is a schematic structural diagram of an egress gateway request apparatus disclosed in the present application;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, since the egress gateway needs to call various external third-party gateways, developers need to spend a lot of time developing codes for docking different third-party gateways, the docking efficiency is low, the docking technical difficulty is high, and the requirements on the technical level of related personnel are high. Therefore, the export gateway request scheme is provided, the docking efficiency of the export gateway and the third-party gateway can be improved, and the docking technical difficulty is reduced.
Referring to fig. 1, an embodiment of the present application discloses an egress gateway request method, including:
step S11: and acquiring an application request for calling the third-party gateway.
Step S12: determining target gateway configuration information corresponding to the application request from all gateway configuration information; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information.
In a specific embodiment, a target key value may be composed based on a target field in the application request; matching the target key value with key values corresponding to the gateway configuration information to obtain matching key values; and determining the gateway configuration information corresponding to the matching key value as the target gateway configuration information corresponding to the application request.
For example, a channel field, a product field and a function field in the application request form a unique key value to obtain a target key value, wherein the channel field represents a bank corresponding to the request, the product field represents a product corresponding to the request, and the function field represents a function corresponding to the product.
And if the target gateway configuration information corresponding to the application request is not determined, directly returning failure information.
It should be noted that in the embodiment of the present application, each third-party gateway is correspondingly configured with a request template, the format of the request template is configured based on the format specified by the third-party gateway document, and the request template uses a text format, where a field that needs to be changed for each request is replaced with a placeholder "$ { variable }", the placeholder starts with "$ {" and ends with "}", and the intermediate variable is a variable. And each third-party gateway is correspondingly configured with a configuration variable table, and the configuration variable table comprises placeholder configuration information corresponding to each placeholder. For example, referring to fig. 2, fig. 2 is a schematic diagram of specific gateway configuration information disclosed in the present application, and the configuration variable table includes: the field "variable" corresponds to the variable of the placeholder, the field "resolve" represents a parsing manner, the parsing manner includes value (direct value), join (multiple values are connected), sign (tag), encode (encryption), function (execution function), and the like, the field "resolveType" represents a type corresponding to the parsing manner, such as value corresponding to the type having config (i.e., value directly in the configuration variable table) and request (value from the application request), sign corresponding to the type having RSA, RSA2, SM2, and the like, the field "value" represents value information, including value information with the placeholder and value information without the placeholder, such as version in the table, corresponding value information is 1.0, and does not include the placeholder, and the value information corresponding to the sign includes the placeholder. Usually, each third-party gateway has a set of api in a data format conforming to its own standard, and the third-party gateways are different from each other. According to the embodiment of the application, the placeholder is added into the request template, so that the access message format of more than 95% of the third-party gateways can be adapted. And the format and the field of the request message of each third-party gateway are different, the request message formats of different third-party gateways can be butted through the configuration request template, and the work of manually developing special codes for adaptation by programmers is omitted.
Step S13: and analyzing the placeholders in the request template in the target gateway configuration information according to the placeholder configuration information in the target gateway configuration information to obtain the analyzed request template.
In a specific embodiment, the placeholder configuration information includes a resolution; correspondingly, the analyzing the placeholder in the request template in the target gateway configuration information according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template includes: determining an analysis mode corresponding to a placeholder in a request template in the target gateway configuration information from the placeholder configuration information in the target gateway configuration information; and calling an analysis node corresponding to the analysis mode to analyze the placeholder, so as to obtain an analyzed request template.
The analysis node is an analysis node corresponding to the security verification mode of the third-party gateway, the analysis node realizes a corresponding analysis function, and according to the security verification mode of the third-party gateway, the analysis node can comprise an encryption node, a decryption node, a signing node, an encoding node, a decoding node, a request node and the like. In a specific embodiment, the aforementioned parsing node may be called by using a uniform interface, and if the existing function is insufficient, a new node may be added to implement the corresponding parsing function. And adding a corresponding analysis mode in the variable configuration table.
It should be noted that different security authentication methods exist for different third party gateways. According to the embodiment of the application, the safe encryption mode of the third-party gateway can be docked in a configurable mode, for example, the encryption and signature modes of the corresponding interface, so that the work that a programmer carries out manual development and sets a special program to dock the corresponding interface is omitted.
Further, the placeholder configuration information further includes value information corresponding to the parsing manner; correspondingly, the calling the resolution node corresponding to the resolution mode to resolve the placeholder to obtain the resolved request template includes: and calling an analysis node corresponding to the analysis mode, and analyzing the placeholders in the value information and the placeholders in the request template based on a recursive mode to obtain the analyzed request template.
It should be noted that the recursive resolution is selected because the value information corresponding to the placeholder in the variable configuration table may still include the placeholder to be resolved. Thus, the analysis template is a root node of a tree, the return value of each node is the value required by the placeholder of the upper node, and the analyzed request template is obtained after the whole tree is analyzed.
Further, in the embodiment of the present application, when an analysis value of any placeholder is analyzed, it may be determined whether the analysis value exists in a request context cache of the application request, and if the analysis value does not exist, the analysis value is added to the request context cache; correspondingly, before any placeholder is resolved, whether a resolving value corresponding to the placeholder exists in the request context cache is judged, and if the resolving value exists, the resolving value is directly obtained from the request context cache. Thus, the analysis speed can be increased.
In a specific embodiment, each application request corresponds to an independent request context cache, and the request context cache stores request entry information, target gateway configuration information corresponding to the request, and an analysis value of the current request for analysis completion.
Step S14: and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template.
Further, any gateway configuration information also includes a request mode; correspondingly, sending a call request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template, including: determining a request mode in the target gateway configuration information; and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the request mode and the analyzed request template.
It should be noted that network transmission protocols adopted by different third-party gateways may be different, and the network transmission protocol of the third-party gateway must be adopted for interaction with the third-party gateway.
For example, referring to fig. 3, in a specific egress gateway request method disclosed in this embodiment of the present application, an application request reaches an egress gateway, and the gateway obtains corresponding target gateway configuration information according to a unique key formed by three fields, namely, a channelCode, a productCode, and a funcCode, and places the target gateway configuration information and the request information in a request context cache. Reading a request template in the gateway configuration information, further reading placeholders in the request template, calling corresponding analysis nodes to recursively analyze the placeholders according to the configuration information of the placeholders, such as tagging, encryption, field mapping and the like, and calling corresponding third-party gateway interfaces according to a request mode in the gateway configuration information after the request template is analyzed.
In a specific implementation manner, a request parser may be generated, for example, as shown in fig. 4, fig. 4 is a schematic diagram of a specific egress gateway request method disclosed in this embodiment of the present application, where a request context cache includes request entry information, target gateway configuration information, and a resolution value of a resolution completion of this request, the request parser reads the target gateway configuration information, reads placeholders in a request template, calls resolution placeholders of a recursion of corresponding resolution nodes according to the placeholder configuration information, a specific request parsing stack is given in fig. 4, the request parser preferentially obtains a placeholder at the top of the stack for resolution, calls the corresponding parsing node by reading the placeholder configuration information in the configuration information table, returns a resolved resolution value, and if there is a placeholder in a node execution or a value returned by the node, the request parser adds a latest placeholder to a header of the request parsing stack, the placeholders for the headers are resolved preferentially. And after the request template is analyzed, calling a corresponding third-party gateway interface according to the interface mode corresponding to the gateway by calling the node assembly request.
Therefore, in the embodiment of the application, an application request for calling a third-party gateway is obtained first, and then target gateway configuration information corresponding to the application request is determined from all gateway configuration information; the gateway configuration information is configuration information of each third-party gateway, any gateway configuration information comprises a request template and placeholder configuration information, a placeholder in the request template in the target gateway configuration information is analyzed according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template, and finally a calling request is sent to the third-party gateway corresponding to the target gateway configuration information based on the analyzed request template. That is, in the present application, after acquiring an application request for calling a third-party gateway, an egress gateway determines target gateway configuration information from gateway configuration information of each third-party gateway, then parses the target gateway configuration information including a request template and placeholder configuration information, and finally sends a call request to a corresponding third-party gateway based on the parsed request template, so that the third-party gateway is docked by the gateway configuration information of each third gateway without separately developing codes, thereby improving the docking efficiency of the egress gateway and the third-party gateway, and reducing the difficulty of the docking technique, even if a service person who does not understand a program can dock the third-party gateway by configuration.
Referring to fig. 5, the present application discloses an egress gateway requesting device, including:
an application request obtaining module 11, configured to obtain an application request for invoking a third-party gateway;
a configuration information determining module 12, configured to determine, from each gateway configuration information, target gateway configuration information corresponding to the application request; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information;
a request template analysis module 13, configured to analyze placeholders in a request template in the target gateway configuration information according to placeholder configuration information in the target gateway configuration information, so as to obtain an analyzed request template;
and a calling request sending module 14, configured to send a calling request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template.
Therefore, in the embodiment of the application, an application request for calling a third-party gateway is obtained first, and then target gateway configuration information corresponding to the application request is determined from all gateway configuration information; the gateway configuration information is configuration information of each third-party gateway, any gateway configuration information comprises a request template and placeholder configuration information, a placeholder in the request template in the target gateway configuration information is analyzed according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template, and finally a calling request is sent to the third-party gateway corresponding to the target gateway configuration information based on the analyzed request template. That is, in the present application, after acquiring an application request for calling a third-party gateway, an egress gateway determines target gateway configuration information from gateway configuration information of each third-party gateway, then parses the target gateway configuration information including a request template and placeholder configuration information, and finally sends a call request to a corresponding third-party gateway based on the parsed request template, so that the third-party gateway is docked by the gateway configuration information of each third gateway without separately developing codes, thereby improving the docking efficiency of the egress gateway and the third-party gateway, and reducing the difficulty of the docking technique, even if a service person who does not understand a program can dock the third-party gateway by configuration.
The configuration information determining module 12 specifically includes:
a target key value generation submodule, configured to form a target key value based on a target field in the application request;
the target key value matching submodule is used for matching the target key value with the key values corresponding to the gateway configuration information to obtain a matching key value;
and the configuration information determining submodule is used for determining the gateway configuration information corresponding to the matching key value as the target gateway configuration information corresponding to the application request.
Wherein the placeholder configuration information comprises a resolution mode; correspondingly, the request template parsing module includes:
the analysis mode determining submodule is used for determining an analysis mode corresponding to a placeholder in a request template in the target gateway configuration information from the placeholder configuration information in the target gateway configuration information;
and the placeholder analyzing submodule is used for calling the analyzing node corresponding to the analyzing mode to analyze the placeholder so as to obtain the analyzed request template.
Further, the placeholder configuration information further includes value information corresponding to the parsing manner; correspondingly, the placeholder parsing submodule is specifically configured to call a parsing node corresponding to the parsing manner, and parse the placeholder in the value information and the placeholder in the request template based on a recursive manner to obtain a parsed request template.
Further, the apparatus further comprises:
the cache judging module is used for judging whether the analysis value exists in the request context cache of the application request or not when the analysis value of any placeholder is analyzed by the request template analyzing module;
the analysis value caching module is used for adding the analysis value to the request context cache if the cache judging module judges that the analysis value does not exist in the request context cache;
correspondingly, before the request template analyzing module analyzes any placeholder, the cache judging module is used for judging whether an analysis value corresponding to the placeholder exists in the request context cache or not, and if the cache judging module judges that the analysis value exists in the request context cache, the request template analyzing module directly obtains the analysis value from the request context cache.
And the analysis node is an analysis node corresponding to the security verification mode of the third-party gateway.
Further, any gateway configuration information also includes a request mode; accordingly, the call request sending module 14 includes:
a request mode determining module, configured to determine a request mode in the target gateway configuration information;
and the calling request sending module is used for sending a calling request to the third-party gateway corresponding to the target gateway configuration information based on the request mode and the analyzed request template.
Referring to fig. 6, an embodiment of the present application discloses an electronic device 20, which includes a processor 21 and a memory 22; wherein, the memory 22 is used for saving computer programs; the processor 21 is configured to execute the computer program, and the egress gateway requesting method disclosed in the foregoing embodiment.
For the specific process of the egress gateway request method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
The memory 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, and the storage mode may be a transient storage mode or a permanent storage mode.
In addition, the electronic device 20 further includes a power supply 23, a communication interface 24, an input-output interface 25, and a communication bus 26; the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to a specific application requirement, which is not specifically limited herein.
Further, the present application also discloses a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the egress gateway request method disclosed in the foregoing embodiments.
For the specific process of the egress gateway request method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, apparatus, device and medium for requesting an egress gateway provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An egress gateway request method, comprising:
acquiring an application request for calling a third-party gateway;
determining target gateway configuration information corresponding to the application request from all gateway configuration information; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information;
analyzing placeholders in a request template in the target gateway configuration information according to placeholder configuration information in the target gateway configuration information to obtain an analyzed request template;
and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template.
2. The egress gateway requesting method according to claim 1, wherein said determining target gateway configuration information corresponding to the application request from each gateway configuration information includes:
forming a target key value based on a target field in the application request;
matching the target key value with key values corresponding to the gateway configuration information to obtain matching key values;
and determining the gateway configuration information corresponding to the matching key value as the target gateway configuration information corresponding to the application request.
3. The egress gateway request method according to claim 1, wherein the placeholder configuration information comprises a resolution; correspondingly, the analyzing the placeholder in the request template in the target gateway configuration information according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template includes:
determining an analysis mode corresponding to a placeholder in a request template in the target gateway configuration information from the placeholder configuration information in the target gateway configuration information;
and calling an analysis node corresponding to the analysis mode to analyze the placeholder, so as to obtain an analyzed request template.
4. The egress gateway request method according to claim 3, wherein the placeholder configuration information further includes value information corresponding to the parsing scheme; correspondingly, the calling the resolution node corresponding to the resolution mode to resolve the placeholder to obtain the resolved request template includes:
and calling an analysis node corresponding to the analysis mode, and analyzing the placeholders in the value information and the placeholders in the request template based on a recursive mode to obtain the analyzed request template.
5. The egress gateway request method according to claim 4, further comprising:
when the analysis value of any placeholder is analyzed, judging whether the analysis value exists in the request context cache of the application request, if not, adding the analysis value to the request context cache;
correspondingly, before any placeholder is resolved, whether a resolving value corresponding to the placeholder exists in the request context cache is judged, and if the resolving value exists, the resolving value is directly obtained from the request context cache.
6. The egress gateway request method according to claim 3, wherein the parsing node is a parsing node corresponding to a security verification method of a third-party gateway.
7. The egress gateway request method according to any one of claims 1 to 6, wherein any gateway configuration information further includes a request mode; correspondingly, sending a call request to a third-party gateway corresponding to the target gateway configuration information based on the analyzed request template, including:
determining a request mode in the target gateway configuration information;
and sending a calling request to a third-party gateway corresponding to the target gateway configuration information based on the request mode and the analyzed request template.
8. An egress gateway request apparatus, comprising:
the application request acquisition module is used for acquiring an application request for calling a third-party gateway;
a configuration information determining module, configured to determine, from each gateway configuration information, target gateway configuration information corresponding to the application request; the gateway configuration information is the configuration information of each third-party gateway, and any gateway configuration information comprises a request template and placeholder configuration information;
the request template analysis module is used for analyzing placeholders in the request template in the target gateway configuration information according to the placeholder configuration information in the target gateway configuration information to obtain an analyzed request template;
and the calling request sending module is used for sending a calling request to the third-party gateway corresponding to the target gateway configuration information based on the analyzed request template.
9. An electronic device comprising a processor and a memory; wherein the content of the first and second substances,
the memory is used for storing a computer program;
the processor configured to execute the computer program to implement the egress gateway request method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the egress gateway request method of any of claims 1 to 7.
CN202210032183.XA 2022-01-12 2022-01-12 Method, device, equipment and medium for requesting exit gateway Pending CN114390032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210032183.XA CN114390032A (en) 2022-01-12 2022-01-12 Method, device, equipment and medium for requesting exit gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210032183.XA CN114390032A (en) 2022-01-12 2022-01-12 Method, device, equipment and medium for requesting exit gateway

Publications (1)

Publication Number Publication Date
CN114390032A true CN114390032A (en) 2022-04-22

Family

ID=81201537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210032183.XA Pending CN114390032A (en) 2022-01-12 2022-01-12 Method, device, equipment and medium for requesting exit gateway

Country Status (1)

Country Link
CN (1) CN114390032A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108037961A (en) * 2017-12-07 2018-05-15 北京锐安科技有限公司 A kind of application program collocation method, device, server and storage medium
CN108768727A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 Access method, electronic device and the readable storage medium storing program for executing of third party's service
US20190068406A1 (en) * 2017-08-29 2019-02-28 eperi GmbH Gateway computer system with intermediate data processing according to rules that are specified by templates
CN110968296A (en) * 2019-12-03 2020-04-07 政采云有限公司 Data acquisition method, device, equipment and readable storage medium
CN112181541A (en) * 2020-09-29 2021-01-05 京东数字科技控股股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113381866A (en) * 2020-02-25 2021-09-10 北京同邦卓益科技有限公司 Service calling method, device, equipment and storage medium based on gateway
CN113778846A (en) * 2020-11-30 2021-12-10 北京沃东天骏信息技术有限公司 Method and apparatus for generating test data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190068406A1 (en) * 2017-08-29 2019-02-28 eperi GmbH Gateway computer system with intermediate data processing according to rules that are specified by templates
CN108037961A (en) * 2017-12-07 2018-05-15 北京锐安科技有限公司 A kind of application program collocation method, device, server and storage medium
CN108768727A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 Access method, electronic device and the readable storage medium storing program for executing of third party's service
CN110968296A (en) * 2019-12-03 2020-04-07 政采云有限公司 Data acquisition method, device, equipment and readable storage medium
CN113381866A (en) * 2020-02-25 2021-09-10 北京同邦卓益科技有限公司 Service calling method, device, equipment and storage medium based on gateway
CN112181541A (en) * 2020-09-29 2021-01-05 京东数字科技控股股份有限公司 Data processing method and device, electronic equipment and storage medium
CN113778846A (en) * 2020-11-30 2021-12-10 北京沃东天骏信息技术有限公司 Method and apparatus for generating test data

Similar Documents

Publication Publication Date Title
CN110704518B (en) Business data processing method and device based on Flink engine
CN111600909A (en) Data processing method, device, protocol conversion equipment and storage medium
US20080187004A1 (en) Parsing Messages with Multiple Data Formats
CN111694797B (en) File uploading and analyzing method, device, server and medium
US7263691B2 (en) Parsing structured data
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
US20030105806A1 (en) Service facilitator for automating object conversions and communication connections in client-server systems
CN111984561A (en) IPMI command processing method, system, device and medium for BMC
CN115408169A (en) Remote procedure calling method, device, equipment and readable storage medium
CN114490889A (en) Configuration information processing method, device, equipment, medium and program product
CN113778725A (en) Data verification method and device
CN114390032A (en) Method, device, equipment and medium for requesting exit gateway
CN107885604B (en) Method and device for communication between heterogeneous systems, computer equipment and storage medium
CN112433752B (en) Page analysis method, device, medium and electronic equipment
CN115811513A (en) Third-party interface request design method, device and storage medium
CN114979307A (en) Communication protocol analysis method, intelligent terminal and storage medium
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
CN111309319B (en) Inheritable office data dynamic page configuration method and device
CN115113869A (en) Online webpage development method and device based on browser
CN112632109A (en) Information extraction method and device, electronic equipment and readable storage medium
McQuistin et al. Investigating Automatic Code Generation for Network Packet Parsing
CN113779018A (en) Data processing method and device
CN113285997B (en) Data processing method, device, medium and product based on heterogeneous system
CN113825166B (en) Base station testing method and device, electronic equipment and storage medium
US6823361B2 (en) Computationally efficient, platform-independent data transfer protocol

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