A kind of system and method for supporting a plurality of protocol stacks
Technical field
The present invention relates to communication technique field, relate in particular to a kind of system and method for supporting a plurality of protocol stacks.
Background technology
Along with developing rapidly of data value-added service, each office point service management demand difference, SMAP (Service Management Access Protocol) protocol extension becomes three kinds of SMAP, ISMAP, BSMAP protocol stack, and every kind of protocol stack also has different editions, will have the protocol stack of SMAP1.0, SMAP1.2, ISMAP1.1 and BSMAP1.0 or the like coexistence.Message inserts at Access Layer, distributes between a plurality of SMAP protocol stacks, how to have the problem of route.
At present, prior art solutions as shown in Figure 1, concrete treatment step comprises:
1) during system start-up, Access Layer reads out the protocol type of current configuration, for example SMAP, ISMAP, BSMAP;
2) external business enables parts and sends a request message to system, is with protocol version in the message;
3) Access Layer and protocol stack find the certain protocol stack according to the protocol type of configuration and the version number of information reporting, and particular protocol stack is to the request decoding;
4) particular protocol stack becomes inside story with described message conversion;
5) send inside story to the service logic key-course;
6) the service logic key-course is according to the protocol type of configuration, and completion logic is handled;
7) the service logic key-course returns the processing response message;
8) Access Layer and protocol stack find particular protocol stack according to the protocol type of configuration and the version number of information reporting, and particular protocol stack is encoded to described replying;
9) echo reply message enables parts to business.
In the technique scheme, system can only support simultaneously one type SMAP agreement, and in the actual motion in some office point, need system to support the agreement of two or more types simultaneously, therefore present scheme can not satisfy the demand of supporting multiple SMAP agreement.
Summary of the invention
The object of the present invention is to provide a kind of system and method for supporting a plurality of protocol stacks.
The objective of the invention is to be achieved through the following technical solutions:
A kind of method of supporting a plurality of protocol stacks comprises:
The corresponding relation that business enables parts and protocol type is obtained in A, system start-up, Access Layer, and protocol stack layers is dynamically to the corresponding relation of Access Layer log-in protocol type and protocol version and protocol stack corresponding with service;
B, Access Layer receive the professional login request message that parts send that enables, and enable according to described login request message and described business that the correspondence relationship information of the corresponding relation of parts and protocol type and protocol type and protocol version and protocol stack corresponding with service is definite to enable the corresponding service of parts corresponding protocols stack with described business;
C, definite enable the corresponding service of parts corresponding protocols stack with described business the business operation request that the follow-up described business that receives enables parts is handled according to described.
Described login request message comprises: business enables component identification and version number.
Described step B further comprises:
Access Layer returns with the professional identical or close protocol stack version number information of version number that parts provide that enables and enables parts to business.
Described step C further comprises:
Access Layer according to the business obtained enable parts and protocol type corresponding relation, and professional enable component identification, and protocol stack layers dynamically enable the corresponding service of parts corresponding protocols stack with described business to the corresponding relation of the protocol type of Access Layer registration and protocol version and protocol stack corresponding with service is definite, and preserve the correspondence relationship information that described business enables the parts service corresponding with described corresponding protocols stack.
Described step D specifically comprises:
The Access Layer business of receiving enables the request of parts business operation;
The decoding service of invocation protocol stack layer becomes inside story with the described request message conversion, sends to the service logic key-course afterwards;
After the service logic key-course is finished the respective logic processing, return inner response message and give protocol stack layers;
Protocol stack layers is replied the service of encoding to described, afterwards it is returned to Access Layer;
Access Layer enables parts with the described response message business of returning to.
The corresponding relation that described business enables the corresponding with service of parts and protocol stack comprises: business enables the corresponding relation of component identification and protocol type, protocol version, protocol stack corresponding with service.
A kind of system that supports a plurality of protocol stacks comprises:
The registration management module is arranged at protocol stack layers, is used for registering to Access Layer the corresponding relation of the service of current protocol type and protocol version and protocol stack;
The message maintenance module is arranged at Access Layer, and the interface with described registration management module is provided, and is used to receive the message that the registration management module reports, and safeguards that login back external business enables the corresponding relation of parts and protocol stack corresponding with service, and it is kept at Access Layer;
The information searching module is arranged at Access Layer, is used for enabling the configuration file that the component identification reading system is stored according to business, obtains with business and enables parts corresponding protocols type.
As seen from the above technical solution provided by the invention, the present invention is by setting in advance the corresponding relation that business enables parts and protocol stack at Access Layer, and the mode that adopts protocol stack layers initiatively to register to Access Layer, realized that system's Access Layer supports a plurality of protocol stacks simultaneously, satisfied the demand of current system operation, applying flexible, extensibility is strong.
Description of drawings
Fig. 1 is the process chart of prior art systems allocation plan;
Fig. 2 is a kind of embodiment module diagram of system of the present invention;
Fig. 3 is a kind of embodiment operational flowchart of the method for the invention.
Embodiment
Core concept of the present invention provides a kind of system and method for supporting a plurality of protocol stacks, adopt protocol stack layers initiatively to register to Access Layer, safeguard and the professional mapping relations that enable between parts and the protocol stack layers of preservation by Access Layer, make system's Access Layer can support the various protocols stack simultaneously.
The invention provides a kind of system that supports a plurality of protocol stacks, its a kind of embodiment module diagram as shown in Figure 2, described system is provided with the registration management module in protocol stack layers, is used for registering to Access Layer the corresponding relation of the service of current protocol type and protocol version and protocol stack; Described system is provided with the message maintenance module at Access Layer, interface with described registration management module is provided, is used to receive the message that the registration management module reports, enable the sign of parts according to the external business of login, safeguard described corresponding relation, and it is kept at Access Layer; The described corresponding relation of preserving in the described Access Layer can adopt the structure of following mapping table:
Field |
Explanation |
The external entity sign |
Unique differentiation external business enables the sign of parts |
Protocol type |
For example SMAP, ISMAP, BSMAP or the like |
Protocol version |
1.0 |
ServiceName |
Realize the service name of concrete protocol stack encoding and decoding |
Described Access Layer also is provided with the information searching module, is used for the configuration file that reading system is stored when system start-up, enables component identification according to business and obtains the corresponding protocol type of corresponding protocols stack.
The invention provides a kind of method of supporting a plurality of protocol stacks, its operating process specifically comprises following operation as shown in Figure 3:
Step 1: system start-up, Access Layer reads configuration file, and obtain all business and enable parts and protocol type correspondence relationship information, as the external entity in the following table 1 sign corresponding relation with protocol type:
The external entity sign |
Protocol type |
SMS?GW1 |
SMAP |
SMS?GW2 |
ISMP |
WAP?GW1 |
SMAP |
During system start-up, protocol stack is registered described corresponding relation from the trend Access Layer, as following table 2:
Protocol type |
Protocol version |
The Servcie of protocol stack |
SMAP |
1.24 |
SMAPService1.24 |
ISMP |
1.1 |
ISMPService1.1 |
SMAP |
1.3 |
SMAPService1.3 |
Step 2: after the system start-up success, business enables parts and sends login request message to Access Layer;
The business of carrying enables the information such as version number of component identification, support in the described request message;
Step 3: after Access Layer receives described login request message, the information searching module enables component identification according to the business in the described request message, in the above-mentioned configuration file that reads, search corresponding protocols stack corresponding protocols type, return with business and enable the identical or immediate version number of component request;
System can safeguard the following table 3 of preserving in the Access Layer this moment:
The external entity sign |
Protocol type |
Protocol version |
SMS?GW1 |
SMAP |
1.24 |
SMS?GW2 |
ISMP |
1.1 |
WAP?GW1 |
SMAP |
1.3 |
Associative list 2 and table 3 obtain a complete table 4, preserve corresponding relation such as following table 4 that described external business enables parts and protocol stack corresponding with service:
The external entity sign |
Protocol type |
Protocol version |
The Servcie of protocol stack |
SMS?GW1 |
SMAP |
1.24 |
SMAPService1.24 |
SMS?GW2 |
ISMP |
1.1 |
ISMPService1.1 |
WAP?GW1 |
SMAP |
1.3 |
SMAPService1.3 |
Can find the service that enables the corresponding particular protocol stack of parts with the external business of logining according to last table;
Step 4: external business enables parts and sends Business Processing message to Access Layer, the table 4 that Access Layer obtains according to described maintenance, the decoding service of calling the particular protocol stack layer, the request decoding, that is, the described request message conversion is become inside story, send to the service logic key-course afterwards;
Step 5: after the service logic key-course receives described message, carry out corresponding logical process;
Mainly be to finish the corresponding business operational processes according to service request;
Step 6: after the service logic key-course is finished the respective logic processing, return inner response message and give protocol stack layers, comprise result;
Step 7: the particular protocol stack layer is replied the service of encoding to described, afterwards it is returned to Access Layer;
Step 8: Access Layer enables parts with the described response message business of returning to.
The present invention will be described with instantiation below:
Suppose two Short Message Service Gateway SMS GW1 and SMS GW2 are arranged at present, support SMAP1.24 and ISMP1.1 respectively, a WAP gateway WAP GW1 is arranged in addition, support SMAP1.3, and current DSMP supports four kinds of agreement SMAP1.24, SMAP1.3, ISMP1.1, BSMAP1.0.
When DSMP starts, read configuration file, obtain the correspondence relationship information that all business enable parts and protocol type, simultaneously, system supports the corresponding relation of all protocol stacks to the service of system registry protocol type and protocol version and protocol stack.When having received three gateways need connect up as client the time, three gateways at first send log messages, and Access Layer obtains the sign of three gateways, and protocol type and the protocol version supported respectively.The external entity of need safeguarding DSMP arrives the mapping table of protocol stack service, obtains the correspondence relationship information as following table:
The external entity sign |
Protocol type |
Protocol version |
Protocol stack Servcie |
SMS?GW1 |
SMAP |
1.24 |
SMAPService1.24 |
SMS?GW2 |
ISMP |
1.1 |
ISMPService1.1 |
WAP?GW1 |
SMAP |
1.3 |
SMAPService1.3 |
When SMS GW2 sends SMAP business operation message, can report external entity sign SMSGW2, Access Layer can find the unique ISMP Service1.1 correspondence of protocol stack layers, and ISMPServcie1.1 decodes to request message then, convert inside story to, send to the service logic key-course and handle; After the service logic key-course is handled, return result and give ISMP Service1.1, the response message coding returns to Access Layer, and Access Layer is transparent to SMS GW2 replying.This process is the message processing procedure of SMS GW2, and the operating process of other outside access parts in like manner.
In sum, the present invention is by setting in advance the corresponding relation that business enables parts and protocol stack at Access Layer, and the mode that adopts protocol stack layers initiatively to register to Access Layer, has realized that system's Access Layer supports a plurality of protocol stacks simultaneously.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.