Disclosure of Invention
The invention aims at overcoming the defects of the prior art and providing a configured channel access system.
In order to achieve the above purpose, the invention provides a configurated channel access system, which comprises a background configuration management system, a receiving side system and a gateway;
The background configuration management system is used for providing page functions of channel parameter configuration, channel transaction summarization and error processing, and when a user adds, deletes or modifies channel parameter configuration information through the background configuration management system, the background configuration management system sends the modified or new channel parameter configuration information to the acceptance side system and the gateway for storage;
The system at the receiving side is used for providing a transaction standard interface for the upstream system so that the upstream system can send a transaction request to the system at the receiving side by calling the corresponding transaction standard interface, the system at the receiving side executes a standard service processing flow according to the interface called by the upstream system so as to obtain channel request initial parameters, and finally the channel request initial parameters are sent to the gateway;
The gateway converts the channel request initial parameters into downstream channel request parameters through a core interface according to channel parameter configuration information provided by a background configuration management system, and sends the downstream channel request parameters to downstream channels, so that the downstream channels execute transaction operations according to the downstream channel request parameters, the downstream channels generate return information according to execution results and send the return information to the gateway through the core interface, the gateway maps the return information to transaction results, and finally the transaction results are returned to an upstream system through a receiving side system.
Further, the transaction standard interface comprises a short message application interface, a signing interface, a gold-in interface, a gold-out interface and a billing interface.
Further, the channel parameter configuration includes a channel basic information configuration, a channel message mapping configuration and a channel communication parameter configuration.
Further, the channel basic information configuration comprises a channel name, a channel main flow, a channel encryption and verification method and a channel encryption and decryption method.
Further, the channel message mapping configuration includes a channel preamble message mapping configuration, a channel request parameter message mapping configuration, and a response message mapping configuration.
Further, the channel communication parameter configuration comprises interface information configuration of a calling channel, channel timeout information configuration and transaction result mapping information configuration.
Furthermore, the background configuration management system issues newly added, deleted or modified channel parameter configuration information to the event of redis, and the acceptance side system and the gateway use the monitoring function of redis at the same time, so that the modified information is saved in the memory again after the newly added, deleted or modified channel parameter configuration is monitored.
The method has the beneficial effects that 1, the access efficiency of the channels is improved, the variability among the channels is shielded, the complex parameter conversion of different channels can be realized through simple configuration, and a developer can realize the method by only familiarizing with a configuration flow and matching with a small amount of codes;
2. The inter-channel coupling is reduced, the stability of the channels is improved, and developers do not influence other channels due to the fact that the service of a certain channel is modified, so that the stability of each channel is improved;
3. The channel configuration is managed uniformly, all parameter configurations of the channel are managed in a background, and if the parameter configurations are changed, for example, channel merchants, channel interfaces and the like are changed, the channel configurations are only required to be changed in a background to take effect in real time, so that the channel operation and maintenance efficiency is improved;
The 4-channel interface is standardized, so that the service success rate of the standard interface can be monitored at the acceptance side, each channel or each bank can be monitored at the gateway layer, and the safety of the channels is improved.
Detailed Description
The invention will be further illustrated by the following drawings and specific examples, which are carried out on the basis of the technical solutions of the invention, it being understood that these examples are only intended to illustrate the invention and are not intended to limit the scope of the invention.
As shown in FIG. 1, the embodiment of the invention provides a configured channel access system, which is realized based on java development, wherein a third party framework is applied to the bottom layer springboot, a mysql is adopted to a database, and middleware comprises redis, zk, kafka and the like. The access of a channel mainly comprises the following processes of 1 pre-business docking, 2 product analysis requirements, 3 product requirement, 4 development of a docking channel interface document, 5 channel code development, 6 channel joint debugging test, and 7 channel online and gray scale. The system specifically comprises a background configuration management system 1, a receiving side system 2 and a gateway 3. After defining the channel interface document and the related parameters provided by the channel, the developer can complete the access work of most channels through the channel parameter configuration of the background configuration management system 1 and the template configuration of the receiving side system, and can start joint debugging with the channels after all the configurations are completed.
The background configuration management system 1 is used for providing page functions of channel parameter configuration, channel transaction summarization and error processing, and when a user adds, deletes or modifies channel parameter configuration information through the background configuration management system 1, the background configuration management system 1 sends the modified or new channel parameter configuration information to the acceptance side system 2 and the gateway 3. Referring specifically to fig. 6, the channel parameter configuration includes a channel basic information configuration, a channel message mapping configuration, and a channel communication parameter configuration. The channel basic information configuration comprises a channel name, a channel main flow, a channel encryption and verification method, a channel encryption and decryption method and the like. The channel message mapping configuration comprises a channel pre-message mapping configuration, a channel request parameter message mapping configuration and a response message mapping configuration. Referring specifically to fig. 7, the channel message mapping configuration may be configured by using a partial message template illustrated in fig. 7. The channel pre-message mapping configuration mainly maps the upstream system parameters into values required by the channel, such as amount conversion, time format conversion, card mechanism coding mapping and the like. The channel request parameter message mapping configuration is used for assembling the parameters after signature verification and pre-mapping into a format required by the channel, such as json, xml and the like. The response message mapping configuration is used for assembling the response message segments returned by the channel into a standard format for judging whether the transaction is successful or not by the acceptance side. The channel communication parameter configuration is the same as the channel basic information configuration, after the receiving side system sends the message to the gateway, the configuration information is loaded into the memory and is transmitted to the thread end along with the transaction thread. The channel communication parameter configuration information mainly comprises interface information of a calling channel, channel timeout information, transaction result mapping information and the like, and can be seen in fig. 8. Referring to fig. 2, preferably, the background configuration management system 1 may issue the newly added, deleted or modified channel parameter configuration information to the redis, where the receiving side system 2 and the gateway 3 use the monitoring function of the redis at the same time, and the modified information is saved in the memory after the newly added, deleted or modified channel parameter configuration is monitored.
The receiving side system 2 is configured to provide a transaction standard interface for the upstream system 4, so that the upstream system 4 sends a transaction request to the receiving side system 2 by calling a corresponding transaction standard interface, the receiving side system 2 executes a standard service processing procedure according to the interface called by the upstream system 4 to obtain a channel request initial parameter, and finally sends the channel request initial parameter to the gateway 3. The transaction standard interface comprises a short message application interface, a signing interface, a gold-in interface, a gold-out interface, a billing interface and the like. The above standard business processing flow is illustrated by taking a signing interface as an example, firstly checking a simple entry, then checking a signing relation, warehousing the request parameters after the checking is passed, assembling the standard channel request initial parameters, and finally transmitting the standard channel request initial parameters to the gateway 3. The gateway 3 converts the channel request initial parameters into downstream channel request parameters through a core Handler (decode) interface according to the channel parameter configuration information provided by the background configuration management system 1, and sends the downstream channel request parameters to the downstream channel 5, so that the downstream channel 5 executes transaction operation according to the downstream channel request parameters, the downstream channel 5 generates return information according to the execution result and sends the return information to the gateway 3 through the core interface, the gateway 3 maps the return information into transaction results, and finally the transaction results are returned to the upstream system 4 through the receiving side system 2.
Referring to fig. 3, the core module of the background configuration management system 1 is illustrated in fig. 3, wherein EnventPublisher has the function that, when the user operates the background configuration management system 1, configuration information is newly added, deleted or modified each time, the information is sent to a common redis through the type, and the redis broadcasts events to the receiving side system 2 and the gateway 3. The channel configuration information is mainly divided into three types, MSGMAPPING (storing parameter mapping information of channel message conversion), tunnelConfig (storing configuration information such as channel encryption and verification signature, encryption and decryption modes and the like) and PIPDICTVIEW (storing configuration information of a system dictionary table).
Referring to fig. 4, fig. 4 illustrates a core module of the receiving side system 2, where ApplyProvider functions to provide a transaction standard interface, including payment, application for sending a sms, signing up, authentication, and the like. TEMPLATESERVICE is a template service interface class, and has the functions of providing a query route channel template, querying a template ID according to a payment mode and a channel number, and obtaining an execution method corresponding to the template through scene coding. The service mainly realizes the route configuration of the channel acceptance test, and when a channel is newly added, the routing function can be realized through the interface only by configuring a corresponding channel template in the database. REFLECTHANDLER is used for realizing the concrete execution flow of channel transactions, and the same transaction of different channels is similar from the whole flow, for example, the application for sending short messages, SMSAPPLYCLIENT is a short message sending service interface class, and the concrete flow is that 1. Checking in parameters, 2. Sending short message pre-processing, 3. Running information warehousing, 4. Sending application, 5. Returning results, 6. Modifying warehousing information, 7. Synchronously returning upstream results.
Referring to fig. 5, fig. 5 illustrates a core module of the gateway 3, where PIPGATEWAYSERVICE is a gateway interface class, and is used to provide a channel 5 standard interface downstream from the accept side system 2 call. Commpent is a configuration information component for storing configuration detailed information of a background configuration management system, wherein ParamCommpent (parameter mapping component) maps upstream parameters into parameters required by a channel, and TunConfigCommpent (channel configuration component) stores main configuration information of the channel, including a signature encryption and verification mode, a decryption mode, a signature encryption and verification field, an encryption and decryption field and the like. HttpConfigComment (channel communication component) stores channel communication specific configuration information, including information such as communication address, communication mode, key certificate path, etc. The Handler is used for calling a channel specific business process, and the channel 5 calls the main business process as follows, 1, encrypting a message field, 2, assembling the message into a format required by the channel, 3, signing the assembled message, 4, connecting the channel to send a channel request, 5, analyzing the channel message, 6, verifying the analyzed message, 7, assembling a return message, 8, decrypting the encryption field of the return message, and 9, returning the result information of the upstream channel. The converter is a message converter, and is also an important expansion point for the system to interface with the channel 5, so that messages in any format, including json format, xml format and http format, can be converted into the result required by the channel 5, and the conversion mode is based on specific information of different channel configurations.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that other parts not specifically described are within the prior art or common general knowledge to a person of ordinary skill in the art. Modifications and alterations may be made without departing from the principles of this invention, and such modifications and alterations should also be considered as being within the scope of the invention.