A method, device and equipment for implementing an adaptive transaction baffle platform
The client plug-in intercepts the remote call request and forwards it to the baffle platform, which solves the problem of interdependence of interface calls between services, improves the flexibility of the transaction baffle platform, supports the access and flexible configuration of different protocols, and improves development and Test efficiency.
Patent Information
- Application Number
- CN202210743286.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-06-28
AI Technical Summary
When existing technology solves the interdependence of interface calls between services, there is a problem of insufficient flexibility in the development and testing phases. In particular, frequent code adjustments are required when simulating external interface returns, and the self-built transaction barrier platform cannot be switched according to transaction levels. , affecting development and testing progress.
Intercept the remote call request through the client plug-in, determine whether to enable access to the bezel platform, obtain the interface configuration information, and forward the remote call request to the bezel platform, convert it into an internal key-value pair, and perform matching mapping according to preset rules. Return results.
It improves the flexibility of the trading baffle platform, supports the access and flexible configuration of different protocols, reduces the cost of development and testing, and improves efficiency.
Smart Images

Figure CN115134397B
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed technology, and in particular to a method, device and equipment for implementing an adaptive transaction baffle platform. Background Art
[0002] As computer systems become larger and larger, the architecture that centrally deploys all business units on one or several mainframes is increasingly unable to meet the needs of today's computer systems, especially the rapid development of large-scale Internet systems. At this time, distributed processing methods are becoming more and more popular in the industry.
[0003] However, when solving the problem of inter-service interface call interdependence, two problems are usually faced: First, in the development stage, it is usually necessary to rely on self-developed mocks to simulate the return of external interfaces. When different data returns need to be mocked, the code often needs to be adjusted continuously. Second, in the testing stage, it is usually necessary to build a self-built transaction baffle to simulate the return of the external system, but this self-built baffle is usually rough, and different baffles may need to be built for calls of different protocols. For transactions in the same module, there is no way to switch between baffles or real connections according to the transaction level. The only way is to switch between baffles or real connections as a whole, which is not very flexible. Therefore, how to solve the problem of inter-dependence of interface calls between application modules or systems, which in turn affects the development and testing progress, and improve the flexibility of the transaction baffle platform is a problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to provide a method, device and equipment for realizing an adaptive transaction barrier platform, which can solve the problem of mutual dependence of interface calls between application modules or systems, thereby affecting the development and testing progress, and improve the flexibility of the transaction barrier platform.
[0005] In a first aspect, an embodiment of the present application provides a method for implementing an adaptive transaction baffle platform, the method comprising:
[0006] Intercept remote call requests of different protocols through client plug-ins;
[0007] After determining that the client has enabled the baffle platform access, calling the interface related information, and obtaining the configuration information of the interface from the baffle platform; and when determining that the baffle platform has configured the interface and the interface has enabled the baffle, forwarding the remote call request to the corresponding baffle platform;
[0008] Receiving, through the baffle platform, transaction messages sent on various channels corresponding to the remote call request;
[0009] After loading the pre-configured parsing rules of each interface, convert the message into an internal key-value pair key-value object;
[0010] According to the preset baffle rules and the internal key-value pair key-value object, matching mapping is performed to obtain a matching mapping result;
[0011] The matching mapping result is returned to the client.
[0012] Optionally, the method further includes:
[0013] When it is determined that the client has not enabled the baffle platform access, the real service is directly called and executed, and the obtained result is returned to the client.
[0014] Optionally, the method further includes:
[0015] When it is determined that the baffle platform is not configured with the interface and / or the interface does not enable the baffle, the real service is directly called and executed, and the obtained result is returned to the client.
[0016] Optionally, performing matching mapping on the key-value object according to the preset baffle rule and the internal key-value pair to obtain a matching mapping result includes:
[0017] When the pre-set baffle rule is a fixed message mapping, the message pre-configured by the baffle platform is directly returned as the matching mapping result;
[0018] Alternatively, when the preset baffle rule is template message mapping, the internal key-value object is filled into the placeholder corresponding to the template message;
[0019] Alternatively, when the preset baffle rule is a rule message mapping, the request message needs to be matched with priority, and after meeting a specific rule, template message mapping or fixed message mapping is selected to perform matching mapping to obtain a matching mapping result.
[0020] In a second aspect, the embodiment of the present application further provides a device for implementing an adaptive transaction baffle platform, the device comprising:
[0021] The interception unit is used to intercept remote call requests of different protocols through client plug-ins;
[0022] A forwarding unit, configured to call interface-related information and obtain configuration information of the interface from the baffle platform after determining that the client has enabled baffle platform access; and forward the remote call request to the corresponding baffle platform when determining that the baffle platform has configured the interface and the interface has enabled baffle;
[0023] A receiving unit, used for receiving, through the baffle platform, transaction messages sent on various channels corresponding to the remote call request;
[0024] A conversion unit, used to convert the message into an internal key-value pair key-value object after loading the pre-configured interface parsing rules;
[0025] A matching unit, used for matching and mapping the key-value object according to the preset baffle rule and the internal key-value pair to obtain a matching and mapping result;
[0026] The returning unit is used to return the matching mapping result to the client.
[0027] Optionally, the device further comprises:
[0028] The first calling unit is used to directly call and execute the real service when it is determined that the client has not enabled the baffle platform access, and return the obtained result to the client.
[0029] Optionally, the device further comprises:
[0030] The second calling unit is used to directly call and execute the real service when it is determined that the baffle platform is not configured with the interface and / or the interface does not open the baffle, and return the obtained result to the client.
[0031] Optionally, the matching unit is specifically used for:
[0032] When the pre-set baffle rule is a fixed message mapping, the message pre-configured by the baffle platform is directly returned as the matching mapping result;
[0033] Alternatively, when the preset baffle rule is template message mapping, the internal key-value object is filled into the placeholder corresponding to the template message;
[0034] Alternatively, when the preset baffle rule is a rule message mapping, the request message needs to be matched with priority, and after meeting a specific rule, template message mapping or fixed message mapping is selected to perform matching mapping to obtain a matching mapping result.
[0035] The embodiment of the present application also provides a device for implementing an adaptive transaction baffle platform, including: a processor, a memory, and a system bus;
[0036] The processor and the memory are connected via the system bus;
[0037] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementation methods of the above-mentioned adaptive transaction barrier platform.
[0038] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes any one of the implementation methods of the above-mentioned adaptive transaction baffle platform.
[0039] The implementation method, device and equipment of an adaptive transaction baffle platform provided by the embodiment of the present application first intercept remote call requests of different protocols through a client plug-in, then, after judging that the client has enabled the baffle platform access, call the interface related information and obtain the configuration information of the interface from the baffle platform; and when judging that the baffle platform has a configured interface and the interface has an open baffle, forward the remote call request to the corresponding baffle platform, then, receive the transaction message sent on various channels corresponding to the remote call request through the baffle platform, and after loading the pre-configured interface parsing rules, convert the message into an internal key-value pair key-value object, and then match and map according to the pre-set baffle rules and internal key-value objects, obtain the matching mapping result, and return the matching mapping result to the client. This solves the problem that the interface calls between application modules or systems are mutually dependent, thereby affecting the development and testing progress, and improves the flexibility of the transaction baffle platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A flowchart of a method for implementing an adaptive transaction baffle platform provided in an embodiment of the present application;
[0042] Figure 2 An overall flow chart of the implementation of the adaptive transaction baffle platform provided in the embodiment of the present application;
[0043] Figure 3 A schematic diagram of the overall module relationship of the adaptive transaction baffle platform provided in the embodiment of the present application;
[0044] Figure 4A schematic diagram of the composition of an implementation device of an adaptive transaction baffle platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] At present, there are two main solutions to the problem of service interface interdependence, depending on the stage: developing self-mock and independent baffle modules. However, both methods have their own shortcomings:
[0046] 1) Develop your own mocks. During the development phase, you rely on writing mock code when developing your own unit tests to achieve test logic coverage, which increases the development workload. In addition, different mock returns are required in different scenarios, so the mock method is cumbersome and not flexible enough.
[0047] 2) Self-developed baffles. Usually developed independently for a certain protocol, lacking unified coordination, not flexible enough, unable to switch baffles individually for a certain module or a certain transaction of the system, only overall switching. Lack of unified baffle return rule configuration, limited supported protocols.
[0048] In order to solve the above defects, the embodiment of the present application provides an implementation method of an adaptive transaction baffle platform, firstly, the remote call request of different protocols is intercepted by the client plug-in, then, after judging that the client has enabled the baffle platform access, the interface related information is called, and the configuration information of the interface is obtained from the baffle platform; and when judging that the baffle platform has a configuration interface and the interface has an open baffle, the remote call request is forwarded to the corresponding baffle platform, and then, the transaction message sent on various channels corresponding to the remote call request is received through the baffle platform, and after loading the pre-configured interface parsing rules, the message is converted into an internal key-value pair key-value object, and then matching and mapping can be performed according to the pre-set baffle rules and internal key-value objects to obtain the matching mapping result, and the matching mapping result is returned to the client. Thereby solving the problem that the interface calls between application modules or systems are mutually dependent, thereby affecting the development and testing progress, and improving the flexibility of the transaction baffle platform.
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] First embodiment
[0051] See also Figure 1, is a flow chart of a method for implementing an adaptive transaction baffle platform provided in this embodiment, the method comprising the following steps:
[0052] S101: intercepting remote call requests of different protocols through a client plug-in.
[0053] In this embodiment, in order to solve the problem of mutual dependence of interface calls between application modules or systems, which in turn affects the progress of development and testing, and to improve the flexibility of the transaction baffle platform, this application strives to uniformly configure the baffle platform when reducing the interface dependence between application modules or systems. Whether it is http, socket, dubbo or mq message, it can be seamlessly connected to the transaction baffle platform provided by this application, only through simple configuration, without intrusion into the business code. At the same time, it can control in real time whether a single transaction goes through the baffle platform, and the baffle return rules can be flexibly configured on the platform.
[0054] Specifically, if Figure 2 As shown, firstly, remote call requests of different protocols are intercepted by the client plug-in, that is, the client plug-in can be used to intercept remote call requests of different protocols (such as http / socket / dubbo / mq).
[0055] S102: after determining that the client has enabled the baffle platform access, calling the interface related information and obtaining the configuration information of the interface from the baffle platform; and when determining that the baffle platform has a configuration interface and the interface has an enabled baffle, forwarding the remote call request to the corresponding baffle platform.
[0056] In this embodiment, after intercepting remote call requests of different protocols in step S101, it can be determined whether the client itself has enabled the baffle platform access. If not, the real service is directly called and executed, and the obtained result is returned to the client. Figure 2 As shown, directly jump to the last step to call the real service and return to the client; conversely, after determining that the client has enabled the baffle platform access, the interface related information can be called and the configuration information of the interface can be obtained from the baffle platform; and when it is determined that the baffle platform has a configuration interface and the interface has an enabled baffle, the remote call request is forwarded to the corresponding baffle platform.
[0057] Specifically, the Java reflection mechanism can be used to obtain information related to the call interface, and the configuration information of the interface can be obtained from the baffle platform. It is determined whether the baffle platform has configured the interface or whether the interface has an open baffle. If it is determined that the baffle platform has not configured the interface and / or the interface has not opened the baffle, the real service is directly called and the result is returned to the client, that is, Figure 2 As shown, jump directly into the last step to call the real service and return to the client, otherwise forward the transaction to the baffle platform.
[0058] S103: Receive transaction messages sent on various channels corresponding to the remote call request through the baffle platform.
[0059] In this embodiment, after forwarding the remote call request to the corresponding baffle platform through step S102, the baffle platform can further receive transaction messages sent on various channels corresponding to the remote call request, perform basic permission control verification, and then parse the message to execute the subsequent step S104.
[0060] S104: After loading the pre-configured parsing rules for each interface, convert the message into an internal key-value pair object.
[0061] In this embodiment, after receiving the transaction messages sent on various channels corresponding to the remote call request through the baffle platform in step S103, the messages can be further converted into internal key-value pairs after loading the pre-configured interface parsing rules to execute the subsequent step S105.
[0062] S105: Matching and mapping the key-value objects according to the preset baffle rules and the internal key-value pairs to obtain matching and mapping results.
[0063] In this embodiment, after the message is converted into an internal key-value pair key-value object through step S104, a matching mapping can be further performed according to the preset baffle rules and the internal key-value pair key-value object to obtain a matching mapping result for executing the subsequent step S106.
[0064] Specifically, an optional implementation method is that when the pre-set baffle rule is a fixed message mapping, the message pre-configured by the baffle platform is directly returned as the matching mapping result; or, when the pre-set baffle rule is a template message mapping, the internal key-value object is filled into the placeholder corresponding to the template message (the platform provides a built-in default key-value); or, when the pre-set baffle rule is a rule message mapping, it is necessary to match the request message with priority, and after meeting the specific rules, choose whether to use template message mapping or fixed message mapping, perform matching mapping, and obtain the matching mapping result. Among them, it can support the configuration of multiple matching rules and matching priorities.
[0065] S106: Return the matching mapping result to the client.
[0066] In this embodiment, after obtaining the matching mapping result in step S105, the matching mapping result may be further returned to the client.
[0067] In this way, when executing the above steps S101-S106, dynamic access to the application module can be achieved through simple configuration, and it can flexibly support the access of http, socket, dubbo, and mq requests. It also supports messages in any format (fixed length, xml, json, etc.). Only through flexible configuration on the platform side, baffle messages with different rules can be returned, which greatly reduces the cost of development, joint debugging, and testing, and improves development and testing efficiency.
[0068] It should be noted that, in order to facilitate understanding of the adaptive transaction baffle platform provided in the embodiment of the present application, the present application also provides the following Figure 3 The schematic diagram of the overall module relationship of the adaptive trading baffle platform is shown in FIG. Figure 3 As shown, the transaction baffle platform may specifically include: a client plug-in module, an access management module, an access message parsing module, and a baffle rule management module.
[0069] Among them, the client plug-in module is the core module of the baffle platform. It is embedded in the access party application in a jar-dependent manner. The access party only needs to make simple configurations, and the client plug-in will not invade the access party's business code. The client plug-in will intercept different remote call requests (http / dubbo / socket / mq) and forward the transaction to the baffle platform according to the rules configured by the baffle platform.
[0070] The platform access module is responsible for the access of requests of different protocols, including HTTP requests, Dubbo requests, socket requests and MQ requests. MQ message requests can be extended. Whether it is RabbitMQ, RocketMQ or Kafka, they can all support seamless access. The specific MQ access rules can be configured in the platform portal management end.
[0071] The access message parsing module has multiple message parsers built in, including fixed-length message parsers, XML message parsers, and JSON message parsers. The parser loads the parsing rules of each interface from the memory to achieve differentiated parsing. If a new interface is added or the interface is modified, it is maintained in real time on the portal side, and the latest parsing rules will be refreshed in memory in real time. The core of the access message parsing module is to achieve dynamic parsing of messages of different formats by loading parsing rules in real time, which is not affected by interface changes, does not stop the system, and does not involve program version updates.
[0072] For each transaction, the baffle rule mapping module needs to return the baffle message according to the pre-configured baffle rules. The platform mainly provides three rules: fixed message mapping, template message mapping and matching message mapping. The fixed message mapper is used to return fixed messages, and the template message mapper is used to return pre-set template messages (providing placeholders to obtain the original message filling). The matching message mapper is the most flexible and can be seen as a combination of the first two mappers. According to the content of the request message, different baffle messages will be dynamically returned by matching specific rules.
[0073] The Portal management terminal is a management module that provides visual access management configuration, message parsing rule configuration, baffle rule configuration, etc.
[0074] In this way, using Figure 3 The client-side component provided by the transaction baffle platform shown will be embedded in the access party's application in a jar manner. The client will intercept remote calls of different protocols, and after interception, call the platform interface to query whether the transaction is in the baffle configuration. If it is enabled, the transaction will be forwarded to the baffle platform, which will return the preset response message based on the parsed message and the pre-configured baffle return rules. If the baffle platform is not configured or enabled, the transaction will be forwarded to the real service provider. At the same time, the platform management end will provide parameterized configurations including access party configuration and baffle return rule configuration to achieve flexible configuration.
[0075] In summary, the implementation method of an adaptive transaction baffle platform provided in this embodiment first intercepts remote call requests of different protocols through a client plug-in, and then, after determining that the client has enabled the baffle platform access, calls the interface related information and obtains the configuration information of the interface from the baffle platform; and when it is determined that the baffle platform has a configuration interface and the interface has an open baffle, forwards the remote call request to the corresponding baffle platform, and then, receives the transaction message sent on various channels corresponding to the remote call request through the baffle platform, and after loading the pre-configured interface parsing rules, converts the message into an internal key-value pair key-value object, and then can perform matching mapping according to the pre-set baffle rules and internal key-value objects, obtain matching mapping results, and return the matching mapping results to the client. This solves the problem of mutual dependence of interface calls between application modules or systems, which in turn affects the development and testing progress, and improves the flexibility of the transaction baffle platform.
[0076] Second embodiment
[0077] This embodiment will introduce an implementation device of an adaptive transaction baffle platform. For related content, please refer to the above method embodiment.
[0078] See also Figure 4 , which is a schematic diagram of the composition of an implementation device of an adaptive transaction baffle platform provided in this embodiment, specifically comprising:
[0079] An interception unit 401 is used to intercept remote call requests of different protocols through a client plug-in;
[0080] The forwarding unit 402 is used to call the interface related information and obtain the configuration information of the interface from the baffle platform after determining that the client has enabled the baffle platform access; and forward the remote call request to the corresponding baffle platform when it is determined that the baffle platform has configured the interface and the interface has enabled the baffle;
[0081] The receiving unit 403 is used to receive the transaction messages sent on various channels corresponding to the remote call request through the baffle platform;
[0082] The conversion unit 404 is used to convert the message into an internal key-value pair object after loading the pre-configured interface parsing rules;
[0083] The matching unit 405 is used to perform matching mapping on the key-value object according to the preset baffle rule and the internal key-value pair to obtain a matching mapping result;
[0084] The returning unit 406 is used to return the matching mapping result to the client.
[0085] In an implementation of this embodiment, the device further includes:
[0086] The first calling unit is used to directly call and execute the real service when it is determined that the client has not enabled the baffle platform access, and return the obtained result to the client.
[0087] In an implementation of this embodiment, the device further includes:
[0088] The second calling unit is used to directly call and execute the real service when it is determined that the baffle platform is not configured with the interface and / or the interface does not open the baffle, and return the obtained result to the client.
[0089] In an implementation of this embodiment, the matching unit 405 is specifically configured to:
[0090] When the pre-set baffle rule is a fixed message mapping, the message pre-configured by the baffle platform is directly returned as the matching mapping result;
[0091] Alternatively, when the preset baffle rule is template message mapping, the internal key-value object is filled into the placeholder corresponding to the template message;
[0092] Alternatively, when the preset baffle rule is a rule message mapping, the request message needs to be matched with priority, and after meeting a specific rule, template message mapping or fixed message mapping is selected to perform matching mapping to obtain a matching mapping result.
[0093] In summary, the implementation device of an adaptive transaction baffle platform provided in this embodiment first intercepts remote call requests of different protocols through a client plug-in, and then, after determining that the client has enabled the baffle platform access, calls the interface related information and obtains the configuration information of the interface from the baffle platform; and when it is determined that the baffle platform has a configured interface and the interface has an open baffle, forwards the remote call request to the corresponding baffle platform, and then receives the transaction message sent on various channels corresponding to the remote call request through the baffle platform, and after loading the pre-configured interface parsing rules, converts the message into an internal key-value pair key-value object, and then can perform matching mapping according to the pre-set baffle rules and internal key-value objects, obtain matching mapping results, and return the matching mapping results to the client. This solves the problem of mutual dependence of interface calls between application modules or systems, which in turn affects the development and testing progress, and improves the flexibility of the transaction baffle platform.
[0094] Furthermore, the embodiment of the present application also provides a device for implementing an adaptive transaction baffle platform, including: a processor, a memory, and a system bus;
[0095] The processor and the memory are connected via the system bus;
[0096] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementation methods of the above-mentioned adaptive transaction barrier platform.
[0097] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes any one of the implementation methods of the above-mentioned adaptive transaction baffle platform.
[0098] It can be known from the description of the above implementation mode that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0099] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0100] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0101] In addition, it should be noted that the implementation method, device and equipment of the adaptive transaction baffle platform provided by the present invention can be used in the distributed field and the financial field. The above is only an example and does not limit the application field of the implementation method, device and equipment of the adaptive transaction baffle platform provided by the present invention.
[0102] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for implementing an adaptive trading baffle platform, characterized in that: The method comprises: Intercept remote call requests of different protocols through client plug-ins; After determining that the client has enabled the baffle platform access, calling the interface related information, and obtaining the configuration information of the interface from the baffle platform; and when determining that the baffle platform has configured the interface and the interface has enabled the baffle, forwarding the remote call request to the corresponding baffle platform; Receiving, through the baffle platform, transaction messages sent on various channels corresponding to the remote call request; After loading the pre-configured parsing rules of each interface, convert the message into an internal key-value pair key-value object; According to the preset baffle rules and the internal key-value pair key-value object, matching mapping is performed to obtain a matching mapping result; Returning the matching mapping result to the client; The matching and mapping of the key-value objects according to the preset baffle rules and the internal key-value pairs to obtain the matching and mapping results includes: When the pre-set baffle rule is a fixed message mapping, the message pre-configured by the baffle platform is directly returned as the matching mapping result; Alternatively, when the preset baffle rule is template message mapping, the internal key-value object is filled into the placeholder corresponding to the template message; Alternatively, when the preset baffle rule is a rule message mapping, it is necessary to match the request message with priority, and then choose to use template message mapping or fixed message mapping after meeting the specific rule, perform matching mapping, and obtain the matching mapping result; The method further comprises: When it is determined that the client has not enabled the baffle platform access, the real service is directly called and executed, and the obtained result is returned to the client; The method further comprises: When it is determined that the baffle platform is not configured with the interface and / or the interface does not enable the baffle, the real service is directly called and executed, and the obtained result is returned to the client.
2. A device for implementing an adaptive transaction baffle platform, characterized in that: The device comprises: The interception unit is used to intercept remote call requests of different protocols through client plug-ins; A forwarding unit, configured to call interface-related information and obtain configuration information of the interface from the baffle platform after determining that the client has enabled baffle platform access; and forward the remote call request to the corresponding baffle platform when determining that the baffle platform has configured the interface and the interface has enabled baffle; A receiving unit, used for receiving, through the baffle platform, transaction messages sent on various channels corresponding to the remote call request; A conversion unit, used to convert the message into an internal key-value pair key-value object after loading the pre-configured interface parsing rules; A matching unit, used for matching and mapping the key-value object according to the preset baffle rule and the internal key-value pair to obtain a matching and mapping result; A returning unit, used to return the matching mapping result to the client; The matching unit is specifically used for: When the pre-set baffle rule is a fixed message mapping, the message pre-configured by the baffle platform is directly returned as the matching mapping result; Alternatively, when the preset baffle rule is template message mapping, the internal key-value object is filled into the placeholder corresponding to the template message; Alternatively, when the preset baffle rule is a rule message mapping, it is necessary to match the request message with priority, and then choose to use template message mapping or fixed message mapping after meeting the specific rule, perform matching mapping, and obtain the matching mapping result; The device also includes: The first calling unit is used to directly call and execute the real service when it is determined that the client has not enabled the baffle platform access, and return the obtained result to the client; The device also includes: The second calling unit is used to directly call and execute the real service when it is determined that the baffle platform is not configured with the interface and / or the interface does not open the baffle, and return the obtained result to the client.
3. A device for implementing an adaptive transaction baffle platform, characterized in that: include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor is caused to perform the method of claim 1.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method according to claim 1.
