技术领域technical field
本发明涉及一种银行前置交易系统,具体地说是一种基于Websocket的银行前置交易系统的搭建方法。The invention relates to a bank front-end transaction system, in particular to a method for building a bank front-end transaction system based on Websocket.
背景技术Background technique
银行前置交易系统介于外围子业务系统和银行核心业务系统之间,整合对各子业务与银行之间的接口,对各子业务上送及银行核心发出的报文进行统一的管理、转换。一般的接口对接方式有HTTP长/短连接,Socket长/端连接、WebService等。传统情况下,客户端与服务器端消息传递为实现即时通讯,多数采用轮询技术,传统方式轮询和长轮询的信息传递方式。轮询方式一直在不断的向服务端发送HTTP请求,服务端每次都会反馈但不一定携带最新数据。长轮询方式也是在不断的向服务端发送HTTP请求,服务端在有新数据时便会返回。两种方式服务端都不会主动向客户端发送消息。而且HTTP请求的Head非常长,即便很少的内容也会占用很多带宽。The bank front-end transaction system is between the peripheral sub-business system and the bank's core business system, integrates the interface between each sub-business and the bank, and performs unified management and conversion of the messages sent by each sub-business and sent by the bank core . Common interface connection methods include HTTP long/short connection, Socket long/end connection, WebService, etc. Traditionally, in order to realize instant communication, most of the client and server-side message transmission adopts polling technology, traditional polling and long polling information transmission methods. The polling method has been sending HTTP requests to the server continuously, and the server will feedback every time but not necessarily carry the latest data. The long polling method also continuously sends HTTP requests to the server, and the server will return when there is new data. In both ways, the server will not actively send messages to the client. Moreover, the Head of the HTTP request is very long, and even a small amount of content will take up a lot of bandwidth.
外围子业务系统与银行前置交易系统对接,都是通过专线连接,网络带宽受到很大限制,传统方式对于小范围,用户量较少的情况下,运行效果还可以。但是当服务范围扩大,多用户并行访问时,银行前置交易系统在性能、利用率、响应速率方面便有些差强人意。The connection between the peripheral sub-business system and the bank's front-end transaction system is connected through a dedicated line, and the network bandwidth is greatly limited. For a small area and a small number of users, the traditional method works well. However, when the service scope is expanded and multiple users access it in parallel, the performance, utilization rate, and response rate of the bank's front-end transaction system are somewhat unsatisfactory.
WebSocket是HTML5 规定的一种新的通信协议,目前已经得到Safari,Firefox,Opera,IE等主流浏览器的支持。它规定了Web Socket API,支持浏览器与服务器之间的全双工通信,不需要频繁的创建和销毁TCP连接,丢弃了传统http协议的包头部分,服务器与客户端之间交换信息大大减少。WebSocket消息传递,客户端可以随意向服务端发送消息,服务端除了及时反馈客户端的消息请求之外还可以主动向客户端发送消息,消息反馈非常及时。银行前置交易系统,除了要求具有较高的稳定性、安全性之外,响应速度、并发性能、资源利用率等指标也逐渐成为重要的考量指标。如果能将WebSocket引入银行前置交易系统,必将对缓解前置系统网络带宽资源紧缺,提高服务器资源利用率有很大帮助。WebSocket is a new communication protocol stipulated by HTML5, and it has been supported by mainstream browsers such as Safari, Firefox, Opera, and IE. It stipulates the Web Socket API, supports full-duplex communication between the browser and the server, does not need to frequently create and destroy TCP connections, discards the header part of the traditional http protocol, and greatly reduces the exchange of information between the server and the client. WebSocket messaging, the client can send messages to the server at will, and the server can actively send messages to the client in addition to timely feedback of the client's message request, and the message feedback is very timely. In addition to high stability and security requirements for the bank's pre-transaction system, indicators such as response speed, concurrent performance, and resource utilization have gradually become important considerations. If WebSocket can be introduced into the bank's front-end transaction system, it will certainly be of great help to alleviate the shortage of network bandwidth resources in the front-end system and improve the utilization rate of server resources.
发明内容Contents of the invention
本发明的技术任务是针对以上不足之处,提供一种将Websocket引入银行前置交易系统,缓解前置系统网络带宽资源紧缺,提高服务器资源利用率的一种基于Websocket的银行前置交易系统的搭建方法。The technical task of the present invention is to address the above deficiencies, to provide a Websocket-based bank front-end transaction system that introduces Websocket into the bank front-end transaction system, alleviates the shortage of network bandwidth resources in the front-end system, and improves server resource utilization. build method.
本发明解决其技术问题所采用的技术方案是:The technical solution adopted by the present invention to solve its technical problems is:
一种基于Websocket的银行前置交易系统的搭建方法,首先搭建webSocket服务器端、搭建Websocket客户端,部署银行前置交易系统,开启银行前置系统监控状态,记录系统环境信息;A method for building a Websocket-based bank front-end transaction system. First, build a webSocket server, build a Websocket client, deploy the bank front-end transaction system, enable the bank front-end system monitoring status, and record system environment information;
搭建webSocket服务器端的方法包括如下步骤:The method for building a webSocket server includes the following steps:
(1)、初始化一个WebSocket Server对象,参数就是服务器的IP地址及要监听的端口号;(1), initialize a WebSocket Server object, the parameters are the IP address of the server and the port number to be monitored;
(2)、定义Sever Open、Server Close、Server Message、Sever Error消息处理函数;(2), define Sever Open, Server Close, Server Message, Sever Error message processing functions;
(3)、指定WebSocket Server消息处理函数;(3), specify the WebSocket Server message processing function;
(4)、启动WebSocket服务;(4) Start the WebSocket service;
(5)、调用WebSocket Server.send方法,即可实现向客户发送报文;(5) Call the WebSocket Server.send method to send messages to the client;
搭建Websocket客户端的方法包括如下步骤:The method for building a Websocket client includes the following steps:
(1)、获取服务器端IP地址及监听端口号;(1) Obtain the server-side IP address and listening port number;
(2)、初始化WebSocket Client;(2), initialize the WebSocket Client;
(3)、定义on Open、on Close、on Message、on Error消息处理函数;(3), define on Open, on Close, on Message, on Error message processing functions;
(4)、启动WebSocket Client客户端建立连接;(4), start the WebSocket Client client to establish a connection;
(5)、指定WebSocket Client消息处理函数;(5) Specify the WebSocket Client message processing function;
(6)、调用WebSocket Client.send方法,即可实现向服务器端发送报文。(6) Call the WebSocket Client.send method to send messages to the server.
搭建webSocket服务器端的方法中,webSocket服务器端在客户端消息到来时自动触发Server Message消息,连接打开时触发Sever Open消息,连接关闭时触发Server Close消息,消息发送过程出现错误时触发Sever Error消息。In the method of building the webSocket server, the webSocket server automatically triggers the Server Message message when the client message arrives, triggers the Sever Open message when the connection is opened, triggers the Server Close message when the connection is closed, and triggers the Sever Error message when an error occurs during the message sending process.
搭建Websocket客户端的方法中,Websocket客户端在服务器端消息到来时自动触发On message消息,连接打开时触发on Open消息,连接关闭时触发on Close消息,消息发送过程出现错误时触发on Error消息。In the method of building the Websocket client, the Websocket client automatically triggers the On message message when the server-side message arrives, triggers the on Open message when the connection is opened, triggers the on Close message when the connection is closed, and triggers the on Error message when an error occurs during the message sending process.
子业务系统要连入银行前置交易系统先进行注册,注册成功后,得到WebSocket服务环境信息,然后从环境信息中解析出ip地址及端口号,然后建立连接,连接建立成功后,子业务系统与银行前置交易系统双方可以实时通信,通信结束断开连接,释放资源。The sub-business system needs to be connected to the bank's front-end transaction system to register first. After the registration is successful, the WebSocket service environment information is obtained, and then the ip address and port number are analyzed from the environment information, and then the connection is established. After the connection is established successfully, the sub-business system The two parties with the bank's pre-transaction system can communicate in real time. After the communication is completed, the connection is disconnected and the resources are released.
本发明的一种基于Websocket的银行前置交易系统的搭建方法,将Websocket引入银行前置交易系统,缓解前置系统网络带宽资源紧缺,提高服务器资源利用率,因而,具有很好的推广使用价值。A method for building a Websocket-based bank front-end transaction system of the present invention introduces Websocket into the bank front-end transaction system, alleviates the shortage of network bandwidth resources in the front-end system, and improves server resource utilization. Therefore, it has good promotion and use value .
具体实施方式Detailed ways
下面结合具体实施例对本发明作进一步说明。The present invention will be further described below in conjunction with specific examples.
实施例1:Example 1:
本发明的一种基于Websocket的银行前置交易系统的搭建方法,首先搭建webSocket服务器端、搭建Websocket客户端,部署银行前置交易系统,开启银行前置系统监控状态,记录系统环境信息;A method for building a bank front-end transaction system based on Websocket of the present invention, first build a webSocket server end, build a Websocket client, deploy the bank front-end transaction system, open the bank front-end system monitoring status, and record system environment information;
搭建webSocket服务器端的方法包括如下步骤:The method for building a webSocket server includes the following steps:
(1)、初始化一个WebSocket Server对象,参数就是服务器的IP地址及要监听的端口号;(1), initialize a WebSocket Server object, the parameters are the IP address of the server and the port number to be monitored;
(2)、定义Sever Open、Server Close、Server Message、Sever Error消息处理函数;(2), define Sever Open, Server Close, Server Message, Sever Error message processing functions;
(3)、指定WebSocket Server消息处理函数;(3), specify the WebSocket Server message processing function;
(4)、启动WebSocket服务;(4) Start the WebSocket service;
(5)、调用WebSocket Server.send方法,即可实现向客户发送报文;(5) Call the WebSocket Server.send method to send messages to the client;
搭建Websocket客户端的方法包括如下步骤:The method for building a Websocket client includes the following steps:
(1)、获取服务器端IP地址及监听端口号;(1) Obtain the server-side IP address and listening port number;
(2)、初始化WebSocket Client;(2), initialize the WebSocket Client;
(3)、定义on Open、on Close、on Message、on Error消息处理函数;(3), define on Open, on Close, on Message, on Error message processing functions;
(4)、启动WebSocket Client客户端建立连接;(4), start the WebSocket Client client to establish a connection;
(5)、指定WebSocket Client消息处理函数;(5) Specify the WebSocket Client message processing function;
(6)、调用WebSocket Client.send方法,即可实现向服务器端发送报文。(6) Call the WebSocket Client.send method to send messages to the server.
实施例2:Example 2:
本发明的一种基于Websocket的银行前置交易系统的搭建方法,首先搭建webSocket服务器端、搭建Websocket客户端,部署银行前置交易系统,开启银行前置系统监控状态,记录系统环境信息;A method for building a bank front-end transaction system based on Websocket of the present invention, first build a webSocket server end, build a Websocket client, deploy the bank front-end transaction system, open the bank front-end system monitoring status, and record system environment information;
搭建webSocket服务器端的方法包括如下步骤:The method for building a webSocket server includes the following steps:
(1)、初始化一个WebSocket Server对象,参数就是服务器的IP地址及要监听的端口号;(1), initialize a WebSocket Server object, the parameters are the IP address of the server and the port number to be monitored;
(2)、定义Sever Open、Server Close、Server Message、Sever Error消息处理函数;(2), define Sever Open, Server Close, Server Message, Sever Error message processing functions;
(3)、指定WebSocket Server消息处理函数;(3), specify the WebSocket Server message processing function;
(4)、启动WebSocket服务;(4) Start the WebSocket service;
(5)、调用WebSocket Server.send方法,即可实现向客户发送报文;(5) Call the WebSocket Server.send method to send messages to the client;
搭建Websocket客户端的方法包括如下步骤:The method for building a Websocket client includes the following steps:
(1)、获取服务器端IP地址及监听端口号;(1) Obtain the server-side IP address and listening port number;
(2)、初始化WebSocket Client;(2), initialize the WebSocket Client;
(3)、定义on Open、on Close、on Message、on Error消息处理函数;(3), define on Open, on Close, on Message, on Error message processing functions;
(4)、启动WebSocket Client客户端建立连接;(4), start the WebSocket Client client to establish a connection;
(5)、指定WebSocket Client消息处理函数;(5) Specify the WebSocket Client message processing function;
(6)、调用WebSocket Client.send方法,即可实现向服务器端发送报文。(6) Call the WebSocket Client.send method to send messages to the server.
搭建webSocket服务器端的方法中,webSocket服务器端在客户端消息到来时自动触发Server Message消息,连接打开时触发Sever Open消息,连接关闭时触发Server Close消息,消息发送过程出现错误时触发Sever Error消息。In the method of building the webSocket server, the webSocket server automatically triggers the Server Message message when the client message arrives, triggers the Sever Open message when the connection is opened, triggers the Server Close message when the connection is closed, and triggers the Sever Error message when an error occurs during the message sending process.
搭建Websocket客户端的方法中,Websocket客户端在服务器端消息到来时自动触发On message消息,连接打开时触发on Open消息,连接关闭时触发on Close消息,消息发送过程出现错误时触发on Error消息。In the method of building the Websocket client, the Websocket client automatically triggers the On message message when the server-side message arrives, triggers the on Open message when the connection is opened, triggers the on Close message when the connection is closed, and triggers the on Error message when an error occurs during the message sending process.
子业务系统要连入银行前置交易系统先进行注册,注册成功后,得到WebSocket服务环境信息,然后从环境信息中解析出ip地址及端口号,然后建立连接,连接建立成功后,子业务系统与银行前置交易系统双方可以实时通信,通信结束断开连接,释放资源。The sub-business system needs to be connected to the bank's front-end transaction system to register first. After the registration is successful, the WebSocket service environment information is obtained, and then the ip address and port number are analyzed from the environment information, and then the connection is established. After the connection is established successfully, the sub-business system The two parties with the bank's pre-transaction system can communicate in real time. After the communication is completed, the connection is disconnected and the resources are released.
上述具体实施方式仅是本发明的具体个案,本发明的专利保护范围包括但不限于上述具体实施方式,任何符合本发明的一种基于Websocket的银行前置交易系统的搭建方法的权利要求书的且任何所属技术领域的普通技术人员对其所做的适当变化或替换,皆应落入本发明的专利保护范围。The specific implementation described above is only a specific case of the present invention, and the scope of patent protection of the present invention includes but is not limited to the specific implementation described above, and any claims in accordance with the claims of the method of building a Websocket-based bank front-end transaction system of the present invention And any appropriate changes or substitutions made by those skilled in the art shall fall within the scope of patent protection of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410614391.6ACN104463670A (en) | 2014-11-05 | 2014-11-05 | Websocket-based bank preposition transaction system construction method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410614391.6ACN104463670A (en) | 2014-11-05 | 2014-11-05 | Websocket-based bank preposition transaction system construction method |
| Publication Number | Publication Date |
|---|---|
| CN104463670Atrue CN104463670A (en) | 2015-03-25 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410614391.6APendingCN104463670A (en) | 2014-11-05 | 2014-11-05 | Websocket-based bank preposition transaction system construction method |
| Country | Link |
|---|---|
| CN (1) | CN104463670A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106657393A (en)* | 2017-02-08 | 2017-05-10 | 浪潮(苏州)金融技术服务有限公司 | Device remote interaction system and method based on Websocket |
| CN106878378A (en)* | 2016-12-26 | 2017-06-20 | 贵州银行股份有限公司 | Scatterplot processing method in network service management |
| WO2017166095A1 (en)* | 2016-03-30 | 2017-10-05 | 李昕光 | Server front-end method |
| WO2017166099A1 (en)* | 2016-03-30 | 2017-10-05 | 李昕光 | Server front positioning method |
| CN111222074A (en)* | 2020-01-09 | 2020-06-02 | 山东汇贸电子口岸有限公司 | Message pushing method and system based on Websocket protocol |
| CN114915651A (en)* | 2021-02-09 | 2022-08-16 | 武汉斗鱼网络科技有限公司 | Websocket management method and device, electronic device and storage medium |
| CN115292632A (en)* | 2022-06-30 | 2022-11-04 | 中电长城(长沙)信息技术有限公司 | Xinchuang sensorless migration method, system and medium based on browser extension plug-in |
| CN115714804A (en)* | 2022-11-15 | 2023-02-24 | 成都索骥科技有限公司 | Device and method for communication between web page application and local native application program |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1684080A (en)* | 2004-06-25 | 2005-10-19 | 中国银行股份有限公司 | System and method for providing capital remittance service in network |
| CN1932875A (en)* | 2006-10-09 | 2007-03-21 | 杭州东信金融技术服务有限公司 | Prepositional system based on finance industry |
| CN102801799A (en)* | 2012-08-03 | 2012-11-28 | 国电南瑞科技股份有限公司 | Real-time monitoring system based on B/S architecture |
| CN103139051A (en)* | 2013-03-22 | 2013-06-05 | 南京信通科技有限责任公司 | Instant messaging communication method based on Websocket protocol |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1684080A (en)* | 2004-06-25 | 2005-10-19 | 中国银行股份有限公司 | System and method for providing capital remittance service in network |
| CN1932875A (en)* | 2006-10-09 | 2007-03-21 | 杭州东信金融技术服务有限公司 | Prepositional system based on finance industry |
| CN102801799A (en)* | 2012-08-03 | 2012-11-28 | 国电南瑞科技股份有限公司 | Real-time monitoring system based on B/S architecture |
| CN103139051A (en)* | 2013-03-22 | 2013-06-05 | 南京信通科技有限责任公司 | Instant messaging communication method based on Websocket protocol |
| Title |
|---|
| WEB8I: "WebSocket简单使用", 《百度文库》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2017166095A1 (en)* | 2016-03-30 | 2017-10-05 | 李昕光 | Server front-end method |
| WO2017166099A1 (en)* | 2016-03-30 | 2017-10-05 | 李昕光 | Server front positioning method |
| CN106878378A (en)* | 2016-12-26 | 2017-06-20 | 贵州银行股份有限公司 | Scatterplot processing method in network service management |
| CN106878378B (en)* | 2016-12-26 | 2020-02-21 | 贵州银行股份有限公司 | Scatter processing method in network communication management |
| CN106657393A (en)* | 2017-02-08 | 2017-05-10 | 浪潮(苏州)金融技术服务有限公司 | Device remote interaction system and method based on Websocket |
| CN111222074A (en)* | 2020-01-09 | 2020-06-02 | 山东汇贸电子口岸有限公司 | Message pushing method and system based on Websocket protocol |
| CN114915651A (en)* | 2021-02-09 | 2022-08-16 | 武汉斗鱼网络科技有限公司 | Websocket management method and device, electronic device and storage medium |
| CN114915651B (en)* | 2021-02-09 | 2023-09-26 | 武汉斗鱼网络科技有限公司 | WebSocket management method and device, electronic equipment and storage medium |
| CN115292632A (en)* | 2022-06-30 | 2022-11-04 | 中电长城(长沙)信息技术有限公司 | Xinchuang sensorless migration method, system and medium based on browser extension plug-in |
| CN115292632B (en)* | 2022-06-30 | 2025-09-19 | 中电长城(长沙)信息技术有限公司 | Information-based non-inductive migration method, system and medium based on browser extension plug-in |
| CN115714804A (en)* | 2022-11-15 | 2023-02-24 | 成都索骥科技有限公司 | Device and method for communication between web page application and local native application program |
| Publication | Publication Date | Title |
|---|---|---|
| CN104463670A (en) | Websocket-based bank preposition transaction system construction method | |
| CN106330602B (en) | A cloud computing virtual tenant network monitoring method and system | |
| CN102077194B (en) | Network controller based pass-through communication mechanism between local host and management controller | |
| CN101534302B (en) | A method, system and related device for providing TCP service | |
| CN103152378B (en) | A kind of transmission method of network data, system and client | |
| CN101291335B (en) | Method and apparatus for acquiring dynamic data of server based on browser | |
| CN104270355A (en) | A method for transmitting data across security zones based on network bus | |
| CN105610888A (en) | Method of using socket to push message based on Android and system thereof | |
| CN102523207A (en) | VNC (Virtual Network Computer)-based remote resource access method and proxy device | |
| CN104009938A (en) | Method and system for persistent connection based on routing level | |
| CN107122324B (en) | A message transmission method and device | |
| CN106941536A (en) | Data interactive method between client and server based on http protocol | |
| CN108965367A (en) | A kind of method and system of control view networked server | |
| CN108964962A (en) | A kind of method and system of control view networked terminals | |
| CN103843298A (en) | System and method for transmitting and receiving peer-to-peer messages using a media key, and managing the media key | |
| CN101110772B (en) | A device and method for processing messages | |
| CN106850731A (en) | Remote control method, server and system | |
| CN105553809A (en) | STUN tunnel management method and device | |
| CN102917082B (en) | Penetrate information push method and the system of network address translation | |
| CN102685218B (en) | Method and system for reporting and downloading information | |
| CN201657020U (en) | Mobile SSL VPN system based on remote Socks 5 agent | |
| CN101795186B (en) | Linkage disconnecting method, system and equipment | |
| CN105577433B (en) | A kind of ACS cluster management method, device and system | |
| CN101510901B (en) | Communication method, communication apparatus and system between distributed equipment | |
| CN101980481B (en) | Method for realizing session replication and tracking during security terminal emulation protocol monitoring |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication | Application publication date:20150325 |