CN105188087B - A kind of service communication method and system based on Short Message Service Gateway - Google Patents
A kind of service communication method and system based on Short Message Service Gateway Download PDFInfo
- Publication number
- CN105188087B CN105188087B CN201410261460.XA CN201410261460A CN105188087B CN 105188087 B CN105188087 B CN 105188087B CN 201410261460 A CN201410261460 A CN 201410261460A CN 105188087 B CN105188087 B CN 105188087B
- Authority
- CN
- China
- Prior art keywords
- short message
- gateway
- proxy server
- message service
- service gateway
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of service communication method and system based on Short Message Service Gateway, is related to mobile communication technology field.Short Message Service Gateway proxy server is set between more CASP and ISMG, and proxy server and ISMG establish long connection;Multiple CASP establish short connection with proxy server respectively;The short message request received from CASP termination is sent to ISMG by long connection by proxy server, realizes the service communication of application service.What is established due to CASP and Short Message Service Gateway proxy server is short connection, and short message request is sent to proxy server and can disconnected by CASP, the short message request that multiple CASP are sent can be sent to Short Message Service Gateway by long connection by long connection.The limited problem of the connection number resource of joint connection in site Short Message Service Gateway is overcome, is not limited by connectivity port provided by Short Message Service Gateway, the receptible CASP quantity of Short Message Service Gateway institute is improved, alleviates the application service load of 4A platform.
Description
Technical field
The present invention relates to mobile communication technology field, in particular to a kind of service communication method based on Short Message Service Gateway and it is
System.
Background technique
Various internet short message gateway interface protocols are to establish short message service center and ICP (Internet Content
Provider, Web content service provider) between access, the offer of business and information completed by ICP, ICP and ISMG
When carrying out information exchange between (InternetShortMessageGateway, Internet Short Message Gateway), it can be connected using long
Mode is connect, short connection type can also be used.So-called long connection, multiple data packets can be continuously transmitted in a connection by referring to,
It is then turned off connection, during connecting holding, if sent without data packet, both sides is needed to send out link detecting packet.Short connection is
When referring to that communication two party has data interaction, a connection is just established, after data are sent completely, then disconnects this connection, is i.e. connection every time
Only complete the transmission of a business.
Original 4A (unified security management platform) platform sends short message, is realized by the direct-connected ISMG of application service socket
Short message receiving-transmitting.The method that 4A platform realizes short message receiving-transmitting by the direct-connected ISMG of socket communication mode by application service CASP
Shown in Figure 1, the application service CASP component of 4A platform itself has Collective qualification function, supports the short message certification of ISMG
Mode, agreement that short message transmission process is followed support the communication modes of long connection, therefore it is required that the end CASP and the end ISMG not between
Connection breaking.
Due to the operator SMS gateway connectivity port limited amount that is used to receive short message open to CASP, a connection
Port is only capable of connecting with a CASP certificate server, leads to that the CASP certificate server quantity for sending short message service can be provided
Limited, at application service end, when being increased using the number of users of short message certification mode, the burden of CASP certificate server also can be by
It is cumulative big.
With being increasing for 4A system application service, the function of needing to send short messages is also more and more, but joint connection in site
The connection number resource of Short Message Service Gateway is limited, causes largely to apply, has seriously limited services system and has sent short message
Forwarding capability is buffered, the growth requirement of existing services system is much unable to satisfy.
Summary of the invention
In view of the above problems, the embodiment of the present invention provides a kind of service communication method and system based on Short Message Service Gateway, leads to
Setting short message receiving-transmitting proxy server is crossed, the connection number resource to solve Short Message Service Gateway is limited to cause services system to send short message
The limited problem of buffering forwarding capability.
The embodiment of the present invention uses following technical solution:
One embodiment of the invention provides a kind of service communication method based on Short Message Service Gateway, in more applying for 4A platform
It services and Short Message Service Gateway proxy server is set between CASP and Internet Short Message Gateway ISMG, the method includes:
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
It connects;
The multiple application service CASP that need to carry out short message communication are acted on behalf of by short connection type and the Short Message Service Gateway respectively
Server establishes connection;
The Short Message Service Gateway proxy server passes through the short message request received from application service CASP termination described
Long connection is sent to Internet Short Message Gateway ISMG, realizes the service communication of application service.
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
Further include after connecing:
Short Message Service Gateway proxy server periodicity sending heartbeat verification information is to Internet Short Message Gateway ISMG, with maintenance
Long connection between Internet Short Message Gateway ISMG.
The multiple application service CASP that need to carry out short message communication are respectively by short connection type and the Short Message Service Gateway
Proxy server establishes connection:
The connectivity port that the Internet Short Message Gateway ISMG is provided be it is N number of, then it is described to pass through long connection type and institute
Stating Internet Short Message Gateway ISMG and establishing the Short Message Service Gateway proxy server of connection is M, each Short Message Service Gateway agency service
Device establishes long connection with a port Internet Short Message Gateway ISMG respectively, and M is less than or equal to N;
The multiple application service CASP that need to carry out short message communication are respectively by short connection type and the Short Message Service Gateway
Proxy server establishes connection:
When application service CASP need to carry out short message communication, application service CASP determines current according to load-balancing algorithm
Preferred Short Message Service Gateway proxy server;
Application service CASP establishes connection by short connection type and currently preferred Short Message Service Gateway proxy server.
The application service CASP determines currently preferred Short Message Service Gateway proxy server packet according to load-balancing algorithm
It includes:
Application service CASP sends a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Each Short Message Service Gateway agency
Server calculates the response time according to own processing capabilities, and the response time is fed back to application service CASP;Using clothes
Short Message Service Gateway proxy server corresponding to the shortest response time is determined as currently preferred Short Message Service Gateway and acted on behalf of by business CASP
Server;
Or
Application service CASP sends a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Each Short Message Service Gateway agency
Server feeds back to application service CASP according to itself current connection number computation-free number, and by the idle number;Using clothes
Short Message Service Gateway proxy server corresponding to most idle numbers is determined as currently preferred Short Message Service Gateway agency clothes by business CASP
Business device;
Or,
Application service CASP according to polling algorithm determine with the last time or on the Short Message Service Gateway proxy server that connect several times
Different Short Message Service Gateway proxy server, as currently preferred Short Message Service Gateway proxy server.
The Short Message Service Gateway proxy server passes through the short message request received from application service CASP termination described
Long connection is sent to Internet Short Message Gateway ISMG, realizes that the service communication of application service includes:
The short message received from application service CASP termination is requested asynchronous storage by the Short Message Service Gateway proxy server
Into task pool;
Short Message Service Gateway proxy server is connected the request of short message described in task pool by the length according to task scheduling algorithm
It receives and sends to Internet Short Message Gateway ISMG, and the short message solicited message of transmission is recorded into log.
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
Connect including:
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
It connects, and one socket session of creation carries out the receipts and hair operation of short message in the long connection;Or
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
It connects, and creates two socket sessions in the long connection, be respectively used to carry out the hair operation of bring drill to an end work and the short message of short message.
In addition, the embodiment of the invention also provides a kind of service communication system based on Short Message Service Gateway, the system comprises:
More application service CASP, the Internet Short Message Gateway ISMG of 4A platform and 4A platform more application service CASP and interconnection
The Short Message Service Gateway proxy server being arranged between net short message gateway ISMG;
The Short Message Service Gateway proxy server includes:
Gateway link block, for establishing connection by long connection type and the Internet Short Message Gateway ISMG;
CASP link block, for passing through short connection type and multiple application service CASP that short message communication need to be carried out respectively
Establish connection;
Business module, the short message request for will receive from application service CASP termination are sent by the long connection
To Internet Short Message Gateway ISMG, the service communication of application service is realized.
The Short Message Service Gateway proxy server further includes:
Maintenance module is connected, for periodicity sending heartbeat verification information to Internet Short Message Gateway ISMG, with maintenance
Long connection between Internet Short Message Gateway ISMG.
The CASP link block be specifically used for each Short Message Service Gateway proxy server respectively with an interconnection net short message
Long connection is established in the port gateway ISMG;The connectivity port that the Internet Short Message Gateway ISMG is provided be it is N number of, then it is described to pass through
The Short Message Service Gateway proxy server that long connection type and the Internet Short Message Gateway ISMG establish connection is M, M be less than or
Equal to N;
The application service CASP further includes:
Load balancing module when for that need to carry out short message communication, determines currently preferred short message according to load-balancing algorithm
Gateway proxy server;
Preferentially link block, for being connected by the CASP of short connection type and currently preferred Short Message Service Gateway proxy server
Connection module establishes connection.
The load balancing module includes:
First balanced unit, for sending a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Receive short message
Short Message Service Gateway proxy server corresponding to the shortest response time is determined as by the response time of gateway proxy server feedback
Currently preferred Short Message Service Gateway proxy server;Or
Second balanced unit, for sending a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Receive short message
Short Message Service Gateway proxy server corresponding to most idle numbers is determined as currently by the idle number of gateway proxy server feedback
Preferred Short Message Service Gateway proxy server;Or
Third balanced unit, for according to polling algorithm it is determining with it is last or on Short Message Service Gateway agency's clothes for connecting several times
The different Short Message Service Gateway proxy server of business device, as currently preferred Short Message Service Gateway proxy server;
The Short Message Service Gateway proxy server includes load parameter computing module, and the load parameter computing module specifically wraps
It includes:
First load parameter computing unit, the probe requests thereby sent for receiving first balanced unit, according to certainly
It is in the reason capacity calculation response time, and the response time is fed back into first balanced unit;Or
Second load parameter computing unit, the probe requests thereby sent for receiving second balanced unit, according to certainly
The current connection number computation-free number of body, and the idle number is fed back into second balanced unit.
The business module includes:
Task location, for the short message received from application service CASP termination to be requested asynchronous store to task
Chi Zhong;
Task scheduling unit, for the request of short message described in task pool to be passed through the long connection according to task scheduling algorithm
It is sent to Internet Short Message Gateway ISMG, and the short message solicited message of transmission is recorded into log;
The gateway link block includes:
Transceiver unit, for establishing connection by long connection type and the Internet Short Message Gateway ISMG, and
One socket session of creation carries out the receipts and hair operation of short message in the long connection;Or
Separative unit is received and dispatched, for establishing connection by long connection type and the Internet Short Message Gateway ISMG, and
Two socket sessions are created in the long connection, are respectively used to carry out the hair operation of bring drill to an end work and the short message of short message.
A kind of service communication method and system based on Short Message Service Gateway provided in an embodiment of the present invention, in 4A platform answer more
With Short Message Service Gateway proxy server is arranged between service CASP and Internet Short Message Gateway ISMG, the Short Message Service Gateway agency is taken
Business device establishes connection by long connection type and the Internet Short Message Gateway ISMG;It need to carry out multiple applications of short message communication
Service CASP establishes connection by short connection type and the Short Message Service Gateway proxy server respectively;The Short Message Service Gateway agency clothes
The short message request received from application service CASP termination is sent to interconnection net short message net by the long connection by business device
ISMG is closed, realizes the service communication of application service.As it can be seen that since the multiple application service CASP that need to carry out short message communication are to pass through
Short connection type and Short Message Service Gateway proxy server establish connection, in this way, short message request is sent to phase by application service CASP
The Short Message Service Gateway proxy server answered can disconnect, so that other CASP and proxy server is allowed to establish short connection,
Short message request is sent, and connection is established by long connection between Short Message Service Gateway proxy server and Short Message Service Gateway, so as to will
The short message request that multiple CASP are sent is sent to Short Message Service Gateway by long connection.Therefore the embodiment of the present invention overcomes joint connection in site
The limited problem of the connection number resource of Short Message Service Gateway, can not be limited by connectivity port provided by Short Message Service Gateway, be greatly improved
The receptible CASP quantity of Short Message Service Gateway institute, alleviates the application service load of 4A platform.
Detailed description of the invention
Fig. 1 is the network architecture for realizing service communication based on Short Message Service Gateway in the prior art;
A kind of Fig. 2 method flow diagram that service communication is realized based on Short Message Service Gateway provided in an embodiment of the present invention;
Fig. 3 is a kind of network architecture that service communication is realized based on Short Message Service Gateway provided in an embodiment of the present invention;
Fig. 4 is a kind of specific method example signal provided in an embodiment of the present invention that service communication is realized based on Short Message Service Gateway
Figure;
Fig. 5 is a kind of system structure diagram that service communication is realized based on Short Message Service Gateway provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Referring to fig. 2, the embodiment of the present invention provides a kind of method for realizing service communication based on Short Message Service Gateway.
Firstly, S201:Short message is set between the more application service CASP and Internet Short Message Gateway ISMG of 4A platform
Gateway proxy server, referring specifically to shown in Fig. 3.
4A refers to:Authentication, account Account, authorization Authorization, audit Audit are authenticated, in
Literary fame is known as unified security management Platform Solution.I.e. by authentication, authorization, audit and account (i.e. non-repudiation and
Data integrity) four big component parts of network security are defined as, to establish authentication in whole network security system
In status and effect.
Method provided in an embodiment of the present invention includes:
S202:Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
It connects.
Specifically, the Short Message Service Gateway proxy server passes through long connection type and the Internet Short Message Gateway ISMG
Further include after establishing connection:
Short Message Service Gateway proxy server periodicity sending heartbeat verification information is to Internet Short Message Gateway ISMG, with maintenance
Long connection between Internet Short Message Gateway ISMG.
That is, Short Message Service Gateway proxy server and Short Message Service Gateway heartbeat detection:Short Message Service Gateway proxy server and short
After believing that gateway establishes long connection, need to regularly send heartbeat packet to maintain the normal of connection, otherwise network management by short messages side can actively eventually
Only connect.Specifically, heartbeat packet can be regularly sent according to group of China Mobile CMPP2.0 or CMPP3.0 agreement to maintain
What is connected is normal.
Wherein, CMPP (China Mobile Peer to Peer, China Mobile) describes China Mobile's short message industry
The types of related news in business between each network element (including ISMG, GNS and SP) and definition, it is specified that information resource station entity with
The Applied layer interface agreement of Internet Short Message Gateway.
As a preferred embodiment, in this step, the Short Message Service Gateway proxy server passes through long connection type and institute
Stating Internet Short Message Gateway ISMG and establishing connection specifically can be:
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
It connects, and one socket session of creation carries out the receipts and hair operation of short message in the long connection.
Alternatively, the Short Message Service Gateway proxy server is built by long connection type and the Internet Short Message Gateway ISMG
Vertical connection can also be specially:
The Short Message Service Gateway proxy server is established by long connection type and the Internet Short Message Gateway ISMG to be connected
It connects, and creates two socket sessions in the long connection, be respectively used to carry out the hair operation of bring drill to an end work and the short message of short message.
That is, the long connection established between Short Message Service Gateway proxy server and Short Message Service Gateway, can be compatible with transmitting-receiving one
Body is connected with transmitting-receiving two kinds of working methods of separation with Short Message Service Gateway.It is specific as follows:
1. transceiver, referring to that cmppserver establishes connection and send short message and obtain short message with ISMG is at one
It is completed in socket session.Such as transceiver mode can be operator of each province distribution No. SP connected with ISMG receive and dispatch it is short
Letter is completed in a socket connection.
2. transmitting-receiving separation, referring to that cmppserver establishes connection and send short message and obtain short message with ISMG is at two
It is completed in socket session.Such as transmitting-receiving clastotype can be operator of each province distribution No. SP connected with ISMG receive and dispatch it is short
Letter is completed by two socket connections.
S203:Multiple application service CASP of short message communication need to be carried out respectively by short connection type and the Short Message Service Gateway
Proxy server establishes connection.
It should be noted that as a kind of preferred embodiment, multiple application service CASP that short message communication need to be carried out
Connection is established with the Short Message Service Gateway proxy server by short connection type respectively to specifically include:
The connectivity port that the Internet Short Message Gateway ISMG is provided be it is N number of, then it is described to pass through long connection type and institute
Stating Internet Short Message Gateway ISMG and establishing the Short Message Service Gateway proxy server of connection is M, each Short Message Service Gateway agency service
Device establishes long connection with a port Internet Short Message Gateway ISMG respectively, and M is less than or equal to N.
It can support to establish short connection between more CASP and Short Message Service Gateway proxy server in the embodiment of the present invention, and work as
When CASP has short message to request transmission demand, it is preferred that current performance preferably short message net can be selected according to load-balancing algorithm
It closes proxy server and establishes connection.
Specifically, multiple application service CASP that short message communication need to be carried out respectively by short connection type with it is described short
Letter gateway proxy server establishes connection and includes:
When application service CASP need to carry out short message communication, application service CASP determines current according to load-balancing algorithm
Preferred Short Message Service Gateway proxy server;
Application service CASP establishes connection by short connection type and currently preferred Short Message Service Gateway proxy server.
Above-mentioned load-balancing algorithm determines that currently preferred Short Message Service Gateway proxy server can there are many modes, with following
Three kinds of load-balancing algorithms are lifted to be illustrated:
1) Best-case Response Time strategy is detected, means that casp is requesting it to Short Message Service Gateway proxy server transmission short message
Preceding first to send a probe requests thereby to all Short Message Service Gateway proxy servers, Short Message Service Gateway proxy server can be according to oneself
Processing request one response time of power feedback gives this casp, then that shortest Short Message Service Gateway of casp Response to selection time
Proxy server sends short message request.
2) minimum idle policy is detected, means casp meeting before sending short message request to Short Message Service Gateway proxy server
A probe requests thereby first is sent to all Short Message Service Gateway proxy servers, Short Message Service Gateway proxy server can be according to oneself at present
Connection number situation feed back an idle number to this casp, that Short Message Service Gateway agency that then casp selects idle number optimal
Server sends short message request.
3) polling schemas, mean casp send every time short message all select with last time or on a different several times short message net
Proxy server is closed to send.
Specifically, the application service CASP determines currently preferred Short Message Service Gateway agency clothes according to load-balancing algorithm
Business device include:
Mode one:Application service CASP sends a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Each short message
Gateway proxy server calculates the response time according to own processing capabilities, and the response time is fed back to application service
CASP;Short Message Service Gateway proxy server corresponding to the shortest response time is determined as currently preferred short by application service CASP
Believe gateway proxy server.
Or, mode two:Application service CASP sends a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;It is each short
Believe that gateway proxy server feeds back to application service according to itself current connection number computation-free number, and by the idle number
CASP;Short Message Service Gateway proxy server corresponding to most idle numbers is determined as currently preferred short message by application service CASP
Gateway proxy server.
Or, mode three:Application service CASP according to polling algorithm determine with the last time or on the Short Message Service Gateway that connect several times
The different Short Message Service Gateway proxy server of proxy server, as currently preferred Short Message Service Gateway proxy server.
S204:Short Message Service Gateway proxy server passes through the short message request received from application service CASP termination described
Long connection is sent to Internet Short Message Gateway ISMG, realizes the service communication of application service.
The Short Message Service Gateway proxy server passes through the short message request received from application service CASP termination described
Long connection is sent to Internet Short Message Gateway ISMG, realizes that the service communication of application service includes:
The short message received from application service CASP termination is requested asynchronous storage by the Short Message Service Gateway proxy server
Into task pool;
Short Message Service Gateway proxy server is connected the request of short message described in task pool by the length according to task scheduling algorithm
It receives and sends to Internet Short Message Gateway ISMG, and the short message solicited message of transmission is recorded into log.
Preferably, the embodiment of the invention also includes:
After long connection is established between Short Message Service Gateway proxy server and Short Message Service Gateway, a receiving thread is created, it is short to receive
The answer short message that letter gateway issues, is sent to service port, to realize business function.
A kind of service communication method based on Short Message Service Gateway provided in an embodiment of the present invention, in more application services of 4A platform
Short Message Service Gateway proxy server is set between CASP and Internet Short Message Gateway ISMG, and the Short Message Service Gateway proxy server is logical
Too long connection type and the Internet Short Message Gateway ISMG establish connection;It need to carry out multiple application services of short message communication
CASP establishes connection by short connection type and the Short Message Service Gateway proxy server respectively;The Short Message Service Gateway proxy server
The short message request received from application service CASP termination is sent to Internet Short Message Gateway by the long connection
ISMG realizes the service communication of application service.As it can be seen that since the multiple application service CASP that need to carry out short message communication are by short
Connection type and Short Message Service Gateway proxy server establish connection, in this way, short message request is sent to accordingly by application service CASP
Short Message Service Gateway proxy server can disconnect, to allow other CASP and proxy server establishes short connection, send out
It send short message to request, and connection is established by long connection between Short Message Service Gateway proxy server and Short Message Service Gateway, so as to will be more
The short message request that a CASP is sent is sent to Short Message Service Gateway by long connection.Therefore it is short to overcome joint connection in site for the embodiment of the present invention
Believe the limited problem of the connection number resource of gateway, can not be limited, be substantially increased by connectivity port provided by Short Message Service Gateway
The receptible CASP quantity of Short Message Service Gateway institute, alleviates the application service load of 4A platform.
Referring to fig. 4, the embodiment of the present invention provides a kind of specific method example that service communication is realized based on Short Message Service Gateway, with
A kind of method for realizing national treasury service authentication based on the Short Message Service Gateway that China Mobile provides.
China Mobile short message receiving-transmitting proxy server CMPP Server (i.e. Short Message Service Gateway proxy server), which abides by
China Mobile message gateway interface agreement CMPP2.0 and CMPP3.0 are followed, the two kinds of work of transceiver and transmitting-receiving separation can be compatible with
Mode is connected with Short Message Service Gateway:
It is at one that transceiver mode, which refers to that No. SP of China Mobile of each province distribution connects transmitting-receiving short message with ISMG,
It is completed in socket connection.
It is by two that transmitting-receiving clastotype, which refers to that No. SP of China Mobile of each province distribution connects transmitting-receiving short message with ISMG,
Socket connection is completed.
In this example, for 4A system by taking CASP certificate server as an example, specific processing step is as follows:
1.CMPPServer service starting:CMPPServer can be initialized after starting as an independent java process
The configuration file connection Short Message Service Gateway for reading itself, waits for receiving the transmission in client-side Socket link after successful connection
Request, and more detailed logging record is done to the processing of forwarding.
2.CMPPServer server-side receives request:The CASP certificate server end for needing to send short message needs to introduce one
CmppClient.jar packet, client packet mainly provide short message transmission interface and CMPPServer establish Socket connect it is real
Existing short message is sent.The short message request that the side 4A sends over, CMPPServer server-side can receive filtering, and record log.
3.CMPPServer core missions pond:Request that CMPPServer server-side received send short messages, can asynchronous placement
Into core missions pond, subsequent processing is then realized by task pool own schedule.
4.CMPPServer task schedule sends short message:The request of sending short messages being placed into core missions pond, task pool meeting
Automatic dispatching executes, and the request for sending short message is transmitted to the Short Message Service Gateway connected, and the relevant short message content of log recording
To journal file, problem is checked for implementing personnel.
5.CMPPServer and Short Message Service Gateway heartbeat detection:After CMPPServer and Short Message Service Gateway establish long connection, need
It is normal to maintain to connect to regularly send heartbeat packet according to group of China Mobile CMPP2.0 or CMPP3.0 agreement, otherwise short message
It network management side can active termination connection.
6.CMPPServer scanning receives short message:When CMPPServer service starting, a receiving thread will create to determine
When the scanning and Socket connecting link of Short Message Service Gateway, receive the answer short message that Short Message Service Gateway issues, once receive, can be in day
Received short message content is recorded in will file, and forwarding short message gives subsequent processing application program.
Wherein, each CASP component in CASP certificate server side will authenticate short message request through Short Message Service Gateway proxy server
CMPPServer and Short Message Service Gateway are sent to certification backstage and are authenticated, the certification knot that Short Message Service Gateway will be received from certification backstage
Fruit is sent to national treasury service, and then realizes national treasury business function.
As it can be seen that CMPPServer proxy server, is placed between CASP certificate server and ISMG, on the one hand alleviates
The certification load of CASP certificate server, and avoid the long connecting communication between CASP and ISMG.
Referring to Fig. 5, the embodiment of the present invention provides a kind of system for realizing service communication based on Short Message Service Gateway, the system packet
It includes:
More application service CASP501, the Internet Short Message Gateway ISMG502 of 4A platform and more applying in 4A platform
The Short Message Service Gateway proxy server 503 being arranged between service CASP and Internet Short Message Gateway ISMG;
The Short Message Service Gateway proxy server 503 includes:
Gateway link block 5031 connects for being established by long connection type and the Internet Short Message Gateway ISMG
It connects;
CASP link block 5032, for passing through short connection type and multiple application services that short message communication need to be carried out respectively
CASP establishes connection;
Business module 5033, the short message request for that will receive from application service CASP termination pass through the long connection
It is sent to Internet Short Message Gateway ISMG, realizes the service communication of application service.
Preferably, the Short Message Service Gateway proxy server further includes:
Maintenance module is connected, for periodicity sending heartbeat verification information to Internet Short Message Gateway ISMG, with maintenance
Long connection between Internet Short Message Gateway ISMG.
Further, the CASP link block is interconnected with one respectively specifically for each Short Message Service Gateway proxy server
Long connection is established in the net short message port gateway ISMG;The connectivity port that the Internet Short Message Gateway ISMG is provided be it is N number of, then
The Short Message Service Gateway proxy server for establishing connection by long connection type and the Internet Short Message Gateway ISMG is M
A, M is less than or equal to N.
Preferably, the application service CASP further includes:
Load balancing module when for that need to carry out short message communication, determines currently preferred short message according to load-balancing algorithm
Gateway proxy server;
Preferentially link block, for being connected by the CASP of short connection type and currently preferred Short Message Service Gateway proxy server
Connection module establishes connection.
Specifically, above-mentioned load balancing module includes:
First balanced unit, for sending a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Receive short message
Short Message Service Gateway proxy server corresponding to the shortest response time is determined as by the response time of gateway proxy server feedback
Currently preferred Short Message Service Gateway proxy server.
Or, the second balanced unit, for sending a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;It receives short
The idle number for believing gateway proxy server feedback, Short Message Service Gateway proxy server corresponding to most idle numbers is determined as working as
Preceding preferred Short Message Service Gateway proxy server.
Or, third balanced unit, for according to polling algorithm determine with the last time or on Short Message Service Gateway generation for connecting several times
The different Short Message Service Gateway proxy server of server is managed, as currently preferred Short Message Service Gateway proxy server.
Correspondingly, the Short Message Service Gateway proxy server includes load parameter computing module, load parameter computing module tool
Body includes:
First load parameter computing unit, the probe requests thereby sent for receiving first balanced unit, according to certainly
It is in the reason capacity calculation response time, and the response time is fed back into first balanced unit.
Or, the second load parameter computing unit, the probe requests thereby sent for receiving second balanced unit, according to
Itself current connection number computation-free number, and the idle number is fed back into second balanced unit.
Further, the business module includes:
Task location, for the short message received from application service CASP termination to be requested asynchronous store to task
Chi Zhong;
Task scheduling unit, for the request of short message described in task pool to be passed through the long connection according to task scheduling algorithm
It is sent to Internet Short Message Gateway ISMG, and the short message solicited message of transmission is recorded into log.
Preferably, the gateway link block includes:
Transceiver unit, for establishing connection by long connection type and the Internet Short Message Gateway ISMG, and
One socket session of creation carries out the receipts and hair operation of short message in the long connection.
Or, transmitting-receiving separative unit, for establishing connection by long connection type and the Internet Short Message Gateway ISMG,
And two socket sessions are created in the long connection, it is respectively used to carry out the hair operation of bring drill to an end work and the short message of short message.
It should be noted that the working principle and treatment process of modules or unit in present system embodiment
It may refer to the associated description in embodiment of the method shown in above-mentioned Fig. 2-Fig. 4, details are not described herein again.
A kind of service communication system based on Short Message Service Gateway provided in an embodiment of the present invention, in more application services of 4A platform
Short Message Service Gateway proxy server is set between CASP and Internet Short Message Gateway ISMG, and the Short Message Service Gateway proxy server is logical
Too long connection type and the Internet Short Message Gateway ISMG establish connection;It need to carry out multiple application services of short message communication
CASP establishes connection by short connection type and the Short Message Service Gateway proxy server respectively;The Short Message Service Gateway proxy server
The short message request received from application service CASP termination is sent to Internet Short Message Gateway by the long connection
ISMG realizes the service communication of application service.As it can be seen that since the multiple application service CASP that need to carry out short message communication are by short
Connection type and Short Message Service Gateway proxy server establish connection, in this way, short message request is sent to accordingly by application service CASP
Short Message Service Gateway proxy server can disconnect, to allow other CASP and proxy server establishes short connection, send out
It send short message to request, and connection is established by long connection between Short Message Service Gateway proxy server and Short Message Service Gateway, so as to will be more
The short message request that a CASP is sent is sent to Short Message Service Gateway by long connection.Therefore it is short to overcome joint connection in site for the embodiment of the present invention
Believe the limited problem of the connection number resource of gateway, can not be limited, be substantially increased by connectivity port provided by Short Message Service Gateway
The receptible CASP quantity of Short Message Service Gateway institute, alleviates the application service load of 4A platform.
For the ease of clearly describing the technical solution of the embodiment of the present invention, in the embodiment of invention, use " first ",
Printed words such as " second " distinguish function and the essentially identical identical entry of effect or similar item, and those skilled in the art can manage
The printed words such as solution " first ", " second " are not defined quantity and execution order.
It will appreciated by the skilled person that implement the method for the above embodiments be can be with
Relevant hardware is instructed to complete by program, the program can be stored in a computer readable storage medium,
The program when being executed, includes the following steps:(the step of method), the storage medium, such as:ROM/RAM, magnetic disk, CD
Deng.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of service communication method based on Short Message Service Gateway, which is characterized in that 4A platform more application service CASP and mutually
Short Message Service Gateway proxy server is set between networking short messaging gateway ISMG, the method includes:
The Short Message Service Gateway proxy server establishes connection by long connection type and the Internet Short Message Gateway ISMG;
Multiple application service CASP of short message communication need to be carried out respectively by short connection type and the Short Message Service Gateway agency service
Device establishes connection;
The Short Message Service Gateway proxy server connects the short message request received from application service CASP termination by the length
Receive and send the service communication that application service is realized to Internet Short Message Gateway ISMG.
2. the service communication method according to claim 1 based on Short Message Service Gateway, which is characterized in that the Short Message Service Gateway generation
It manages after server establishes connection with the Internet Short Message Gateway ISMG by long connection type and further includes:
Short Message Service Gateway proxy server periodicity sending heartbeat verification information is to Internet Short Message Gateway ISMG, with maintenance and mutually
Long connection between networking short messaging gateway ISMG.
3. the service communication method according to claim 1 based on Short Message Service Gateway, which is characterized in that described to carry out short message
Multiple application service CASP of communication establish connection with the Short Message Service Gateway proxy server by short connection type respectively and include:
The connectivity port that the Internet Short Message Gateway ISMG is provided be it is N number of, then it is described by long connection type and described mutual
The Short Message Service Gateway proxy server that networking short messaging gateway ISMG establishes connection is M, each Short Message Service Gateway proxy server point
Long connection is not established with a port Internet Short Message Gateway ISMG, M is less than or equal to N;
The multiple application service CASP that need to carry out short message communication are acted on behalf of by short connection type and the Short Message Service Gateway respectively
Server establishes connection:
When application service CASP need to carry out short message communication, application service CASP determines presently preferred according to load-balancing algorithm
Short Message Service Gateway proxy server;
Application service CASP establishes connection by short connection type and currently preferred Short Message Service Gateway proxy server.
4. the service communication method according to claim 3 based on Short Message Service Gateway, which is characterized in that the described application service
CASP determines that currently preferred Short Message Service Gateway proxy server includes according to load-balancing algorithm:
Application service CASP sends a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Each Short Message Service Gateway agency service
Device calculates the response time according to own processing capabilities, and the response time is fed back to application service CASP;Application service
Short Message Service Gateway proxy server corresponding to the shortest response time is determined as currently preferred Short Message Service Gateway agency clothes by CASP
Business device;
Or
Application service CASP sends a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Each Short Message Service Gateway agency service
Device feeds back to application service CASP according to itself current connection number computation-free number, and by the idle number;Application service
Short Message Service Gateway proxy server corresponding to most idle numbers is determined as currently preferred Short Message Service Gateway agency service by CASP
Device;
Or,
Application service CASP according to polling algorithm determine with the last time or on the Short Message Service Gateway proxy server that connects several times it is different
Short Message Service Gateway proxy server, as currently preferred Short Message Service Gateway proxy server.
5. the service communication method according to claim 1 based on Short Message Service Gateway, which is characterized in that the Short Message Service Gateway generation
Reason server will terminate the short message request that receive from the application service CASP and be sent to that internet is short to disappear by the long connection
Gateway ISMG is ceased, realizes that the service communication of application service includes:
The Short Message Service Gateway proxy server will from the application service CASP terminate receive short message request it is asynchronous store to appoint
It is engaged in pond;
The request of short message described in task pool is passed through the long connection hair according to task scheduling algorithm by Short Message Service Gateway proxy server
It send to Internet Short Message Gateway ISMG, and the short message solicited message of transmission is recorded into log.
6. the service communication method according to claim 1 based on Short Message Service Gateway, which is characterized in that the Short Message Service Gateway generation
Reason server establishes connection with the Internet Short Message Gateway ISMG by long connection type and includes:
The Short Message Service Gateway proxy server establishes connection by long connection type and the Internet Short Message Gateway ISMG, and
One socket session of creation carries out the receipts and hair operation of short message in the long connection;Or
The Short Message Service Gateway proxy server establishes connection by long connection type and the Internet Short Message Gateway ISMG, and
Two socket sessions are created in the long connection, are respectively used to carry out the hair operation of bring drill to an end work and the short message of short message.
7. a kind of service communication system based on Short Message Service Gateway, which is characterized in that the system comprises:The mostly application clothes of 4A platform
Be engaged in CASP, Internet Short Message Gateway ISMG and more application service CASP and Internet Short Message Gateway ISMG in 4A platform
Between the Short Message Service Gateway proxy server that is arranged;
The Short Message Service Gateway proxy server includes:
Gateway link block, for establishing connection by long connection type and the Internet Short Message Gateway ISMG;
CASP link block, for being established respectively by short connection type with the multiple application service CASP that need to carry out short message communication
Connection;
Business module, the short message request for will receive from application service CASP termination are sent to mutually by the long connection
Network short messaging gateway ISMG, realizes the service communication of application service.
8. the service communication system according to claim 7 based on Short Message Service Gateway, which is characterized in that the Short Message Service Gateway generation
Managing server further includes:
Maintenance module is connected, for periodicity sending heartbeat verification information to Internet Short Message Gateway ISMG, with maintenance and mutually
Long connection between networking short messaging gateway ISMG.
9. the service communication system according to claim 7 based on Short Message Service Gateway, which is characterized in that
The CASP link block be specifically used for each Short Message Service Gateway proxy server respectively with an Internet Short Message Gateway
Long connection is established in the port ISMG;The connectivity port that the Internet Short Message Gateway ISMG is provided be it is N number of, then it is described to be connected by long
It is M that mode, which is connect, with the Internet Short Message Gateway ISMG Short Message Service Gateway proxy server for establishing connection, and M is less than or equal to
N;
The application service CASP further includes:
Load balancing module when for that need to carry out short message communication, determines currently preferred Short Message Service Gateway according to load-balancing algorithm
Proxy server;
Preferentially link block, for connecting mould with the CASP of currently preferred Short Message Service Gateway proxy server by short connection type
Block establishes connection;
The load balancing module includes:
First balanced unit, for sending a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Receive Short Message Service Gateway
The response time of proxy server feedback, Short Message Service Gateway proxy server corresponding to the shortest response time is determined as currently
Preferred Short Message Service Gateway proxy server;Or
Second balanced unit, for sending a probe requests thereby to multiple Short Message Service Gateway proxy servers simultaneously;Receive Short Message Service Gateway
The idle number of proxy server feedback, Short Message Service Gateway proxy server corresponding to most idle numbers is determined as presently preferably
Short Message Service Gateway proxy server;Or
Third balanced unit, for according to polling algorithm determine with the last time or on the Short Message Service Gateway proxy server that connect several times
Different Short Message Service Gateway proxy server, as currently preferred Short Message Service Gateway proxy server;
The Short Message Service Gateway proxy server includes load parameter computing module, and the load parameter computing module specifically includes:
First load parameter computing unit, the probe requests thereby sent for receiving first balanced unit, according to being in certainly
The capacity calculation response time is managed, and the response time is fed back into first balanced unit;Or
Second load parameter computing unit, the probe requests thereby sent for receiving second balanced unit, works as according to itself
Preceding connection number computation-free number, and the idle number is fed back into second balanced unit.
10. the service communication system according to claim 7 based on Short Message Service Gateway, which is characterized in that
The business module includes:
Task location, for the short message received from application service CASP termination to be requested asynchronous store to task pool
In;
Task scheduling unit, for being sent the request of short message described in task pool by the long connection according to task scheduling algorithm
To Internet Short Message Gateway ISMG, and the short message solicited message of transmission is recorded into log;
The gateway link block includes:
Transceiver unit, for establishing connection by long connection type and the Internet Short Message Gateway ISMG, and in institute
State receipts and hair operation that one socket session of creation in long connection carries out short message;Or
Separative unit is received and dispatched, for establishing connection by long connection type and the Internet Short Message Gateway ISMG, and in institute
It states in long connection and creates two socket sessions, be respectively used to carry out the hair operation of bring drill to an end work and the short message of short message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410261460.XA CN105188087B (en) | 2014-06-12 | 2014-06-12 | A kind of service communication method and system based on Short Message Service Gateway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410261460.XA CN105188087B (en) | 2014-06-12 | 2014-06-12 | A kind of service communication method and system based on Short Message Service Gateway |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105188087A CN105188087A (en) | 2015-12-23 |
CN105188087B true CN105188087B (en) | 2018-11-23 |
Family
ID=54909875
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410261460.XA Active CN105188087B (en) | 2014-06-12 | 2014-06-12 | A kind of service communication method and system based on Short Message Service Gateway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105188087B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109710878A (en) * | 2018-12-28 | 2019-05-03 | 北京百佑科技有限公司 | Data interactive method and server |
CN111131400B (en) * | 2019-12-04 | 2022-08-16 | 浪潮软件股份有限公司 | Service agent system and method based on gateway |
CN113612827A (en) * | 2021-07-26 | 2021-11-05 | 海南港澳资讯产业股份有限公司 | Method and system for efficiently transmitting financial information in batches |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1633189A (en) * | 2004-12-27 | 2005-06-29 | 中国联合通信有限公司 | Response method for short message sending |
CN1633190A (en) * | 2004-12-27 | 2005-06-29 | 中国联合通信有限公司 | Authentication method and system for short message value-added service |
CN101001412A (en) * | 2007-01-15 | 2007-07-18 | 华为技术有限公司 | Short message gateway bridging system, method and short message gateway bridge module |
WO2012155651A1 (en) * | 2011-07-22 | 2012-11-22 | 中兴通讯股份有限公司 | Online processing system and method for implementing terminal application |
-
2014
- 2014-06-12 CN CN201410261460.XA patent/CN105188087B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1633189A (en) * | 2004-12-27 | 2005-06-29 | 中国联合通信有限公司 | Response method for short message sending |
CN1633190A (en) * | 2004-12-27 | 2005-06-29 | 中国联合通信有限公司 | Authentication method and system for short message value-added service |
CN101001412A (en) * | 2007-01-15 | 2007-07-18 | 华为技术有限公司 | Short message gateway bridging system, method and short message gateway bridge module |
WO2012155651A1 (en) * | 2011-07-22 | 2012-11-22 | 中兴通讯股份有限公司 | Online processing system and method for implementing terminal application |
Also Published As
Publication number | Publication date |
---|---|
CN105188087A (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11991153B2 (en) | Systems and methods for providing communications between on-premises servers and remote devices | |
CN104065731B (en) | A kind of ftp file Transmission system and transmission method | |
CN104753887B (en) | Security management and control implementation method, system and cloud desktop system | |
US7949704B2 (en) | Administration of a broker-based publish/subscribe messaging system | |
CN107426339A (en) | A kind of cut-in method, the apparatus and system of data interface channel | |
CN105471964B (en) | For the method for data-pushing, server, client and system | |
CN105530254B (en) | A kind of data communications method between intranet and extranet | |
CN105531979B (en) | It is a kind of for exchanging the method and server of data between a client and a server | |
EP1859597B1 (en) | Method for communication between an application and a client | |
US20130238715A1 (en) | Enabling communication between source and target mail transfer agents | |
CN107204901A (en) | The service of proof is provided | |
CN103973488B (en) | Operation management system based on RDP agreements and method | |
CN108200104A (en) | The method and system that a kind of progress SSL shakes hands | |
CN109361753A (en) | A kind of Internet of things system framework and encryption method | |
CN103701928B (en) | It is applied to the method that load equalizer improves server and SSL gateway operational efficiency | |
CN109150800A (en) | Login access method, system and storage medium | |
CN110166577A (en) | Distributed Application cluster conversation processing system and method | |
CN105188087B (en) | A kind of service communication method and system based on Short Message Service Gateway | |
CN103856454B (en) | IP IP multimedia subsystem, IMSs and the method and business intercommunication gateway of Internet service intercommunication | |
US8804717B2 (en) | Serial redirector device and associated methods | |
CN105591959A (en) | System and method for load balancing by SSL session resuming | |
CN108259249A (en) | Method for network access, router, terminal device, server and network system | |
CN108092993A (en) | A kind of network data transmission control method and system | |
CN105704008B (en) | A kind of webpage instant communication method, system and terminal | |
CN112422395A (en) | Data transmission method, device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder | ||
CP02 | Change in the address of a patent holder |
Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080 Patentee after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd. Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A Room 601 Patentee before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd. |