Summary of the invention
Technical problem to be solved by this invention is to provide a kind of command code recognition methods to reach the short message signaling hold-up interception method based on command code, can be in the identification and the interception of SCCP layer segment complete operation sign indicating number.
In order to solve the problems of the technologies described above, the invention provides a kind of short message signaling hold-up interception method based on command code, comprising:
The SCCP layer sends SCCP layer data bag to the Message Transfer Part layer that receives and disassembles, and from unit data, obtains transaction-capable application data bag;
Said SCCP layer is said decodes to transaction-capable application data bag; Obtain the opcode field of business information in the composition partial information unit; Discerning command code in the said opcode field and whether be the object run sign indicating number that the desire preset is tackled, is then to carry out signaling catching.
Preferably, according to the label and the length of said information unit, locate said opcode field.
Preferably; At said SCCP layer one decoding functions is set; Said decoding functions is provided with the first decoding pointer and the second decoding pointer, the head of the said user data part of the said first decoding pointed, the afterbody of the said user data part of the said second decoding pointed;
The said first decoding pointer is located the content field of said information unit according to the label and the length of said information unit;
Carry out said decoding through moving the said first decoding pointer.
Preferably, the type of message according to signaling moves the said first decoding pointer.
Preferably, said signaling catching and global title route selection function are integrated, realize according to different global title number short message signaling interceptions.
Preferably, during preset said object run sign indicating number, configuration is routed to the global title number of target short message service center on Signalling Transfer Point;
If the command code in the said opcode field is said object run sign indicating number; And the global title number in the signaling that said Message Transfer Part layer sends is the global title number that is routed to said target short message service center, and then said Signalling Transfer Point is tackled the said signaling that said Message Transfer Part layer sends.
In order to solve the problems of the technologies described above, the present invention also provides the recognition methods of a kind of signaling manipulation sign indicating number, comprising:
The SCCP layer sends SCCP layer data bag to the Message Transfer Part layer that receives and disassembles, and from unit data, obtains transaction-capable application data bag;
Said SCCP layer is said decodes to transaction-capable application data bag, obtains the opcode field of business information in the composition partial information unit, identifies the command code in the said opcode field.
Preferably, according to the label and the length of said information unit, locate said opcode field.
Preferably; At said SCCP layer one decoding functions is set; Said decoding functions is provided with the first decoding pointer and the second decoding pointer, the head of the said user data part of the said first decoding pointed, the afterbody of the said user data part of the said second decoding pointed;
The said first decoding pointer is located the content field of said information unit according to the label and the length of said information unit;
Carry out said decoding through moving the said first decoding pointer.
Preferably, the type of message according to signaling moves the said first decoding pointer.
Compared with prior art, technical scheme of the present invention is just partly not exclusively decoded to the user data of unit data (UDT) when message is up to the SCCP layer, has improved decoding efficiency, has reduced overhead.For at the SCCP layer with regard to the short message that is abandoned by interception, can not continue uply again, need not the signaling process of TCAP layer and MAP layer, alleviated the processing burden of upper-layer protocol module, improved the efficient of system.In addition, signaling identification proposed by the invention can also combine with global title (GT) routing function of SCCP layer with hold-up interception method, realizes that the different GT number of foundation that has practicality more carries out the function that short message signaling is tackled.
Embodiment
Below will combine accompanying drawing and embodiment to specify execution mode of the present invention, how the application technology means solve technical problem to the present invention whereby, and the implementation procedure of reaching technique effect can make much of and implement according to this.
No.7 signalling system has adopted hierarchy, can send or receive signaling as long as make each level obtain the required signaling information of this layer, and the information that need not understand can directly be encapsulated in carries out transparent transmission in the packet.
Short message original calling, exhale eventually, signalings such as route requests and short message notification, mainly be to recognize through the command code of MAP layer data bag the inside, belong to the category of service application.So,, should in MAP layer decoder packet, handle in theory if realize the interception of a certain short message signaling is abandoned.But; Handle if this task is transferred to the MAP layer, so every signaling will be up to the MAP layer always and just can be identified and tackle and abandon, if the signaling of the type that need abandon in the network is more; Will certainly increase the MAP layer with and the following burden of each layer; Take more system resource, overhead is bigger, has reduced system effectiveness.
Fig. 1 is the handling process sketch map of short message signaling catching in the prior art.Protocol hierarchy structure according to No.7 signalling system; Each bar signaling sends to after the short message service center; Can pass through successively message transmission (MTP), signaling connects control (SCCP), transaction-capable and uses (TCAP) and move and use (MAP), transfers to service processor at last and carries out concrete short message service and handle.Because the every information that will install one section this protocol hierarchy through a protocol hierarchy additional of signaling; So actual signaling content inclusion relation is: the service application interface message of the superiors is included in the business information the inside of MAP layer; The business information of MAP layer is included in the inside, composition partial information unit of TCAP layer data bag again; TCAP layer data bag is included in the user data the inside of the unit data (UDT) of SCCP layer again, and SCCP layer data bag is included in signaling information field (SIF) the inside of the message signal unit (MSU) of MTP layer again.
As shown in Figure 1, short message signaling intercept process of the prior art mainly comprises the steps:
Step S110, the MTP layer receives the short message signaling code stream of sending from bottom;
Step S120, the MTP layer is disassembled this short message signaling code stream, obtains SCCP layer data bag in the message signal unit to send to the SCCP layer;
Step S130, the SCCP layer is disassembled packet, obtains the TCAP packet in the unit data to send to the TCAP layer;
Step S140, the TCAP layer is disassembled this TCAP packet, and the business information that obtains the MAP layer in the composition partial information unit sends to the MAP layer;
Step S150, the MAP layer is decoded to this business information, obtains relevant information from the inside, sends to the service processor interface then.
The general handling process of short message signaling interception is when the successively up MAP of the being resolved to layer of signaling message carries out the business information decoding, is a certain command code of tackling wanted as if identifying wherein command code, then carries out the interception of message and carries out subsequent treatment.Here the business information of MAP layer decoding is a kind of complete decoding, and promptly each field of packet all must decoding, is the very work of occupying system resources and efficient.
Fig. 2 is short message signaling identification and an intercept process schematic flow sheet proposed by the invention.As shown in Figure 2, signaling identification of the present invention and interception flow process mainly comprise the steps:
Step S210 is with step S110;
Step S220 is with step S120;
Step S230, the SCCP layer is disassembled packet, in unit data, obtains the TCAP packet; And the TCAP packet decoded; Obtain the opcode field of the business information of the inside, composition partial information unit, whether the value that identifies this command code according to this opcode field is exactly the object run sign indicating number that the hope that is provided with is in advance tackled, if then carry out signaling catching and carry out subsequent treatment such as abandoning; If not then the TCAP packet being sent to the TCAP layer, continue subsequent treatment.
This shows; When message is up to the SCCP layer; The SCCP layer just to the TCAP decoded packet data of unit data (UDT) to opcode field, if find it is the object run sign indicating number (like the command code of short message original calling) that is provided with in advance, then carry out identification, interception and the subsequent treatment of message.
The difference of above-mentioned flow process of the present invention and prior art shown in Figure 1 is; Decoding among the present invention is incomplete decoding; The process of the positioning action code field of saying so more accurately, other fields all need not to be concerned about, so higher than decoding efficiency of the prior art shown in Figure 1.In addition, owing to message just is dropped at the SCCP layer, can be not up again, so deducted the signaling process burden of TCAP layer and MAP layer fully, improved the efficient of system.
Fig. 3 is short message signaling identification of the present invention and the application example schematic flow sheet of hold-up interception method in identification and interception short message original calling.Application example shown in Figure 3 mainly comprises the steps:
Step S310 receives the object run sign indicating number that the outside desire of importing will identify and tackle, and such as being to hope to have tackled to exhale signaling in the present embodiment, then this input is exactly the command code of short message original calling;
Step S320; Each bar signaling of sending for the MTP layer; Calling a decoding functions partly decodes to the user data of SCCP layer UDT unit data the inside; The input parameter of this decoding functions comprises user data structure of arrays, the length of array and the command code of short message original calling signaling partly;
Step S330; The first decoding pointer and the second decoding pointer are set; Point to the head and the afterbody of this signaling user data part respectively; Then with reference to TCAP, locate label, length and the content field of each information unit through the first decoding pointer of points cephalad, the second decoding pointer that points to afterbody then is used for carrying out the protection of crossing the border of decode procedure;
Can know that with reference to TCAP rise and exhale message only to be present in beginning (Begin) message or continuation (Continue) message, the TCAP message packets of other types can not handled, therefore can come to move rapidly the first decoding pointer through type of message;
Can know with reference to agreement; Begin message must contain origin transaction ID (label of origin ID is 0x48); Continue message had both contained origin transaction ID; Contain purpose transaction ID (label of purpose ID is 0x49) again, therefore, the first decoding pointer need be skipped these fields exactly;
Can know that with reference to agreement the dialogue part is Optional Field (label of dialogue part is 0x6B), so if contain the dialogue part in the message body, the first decoding pointer need be skipped exactly;
Step S340 when the first decoding pointer arrives the composition part (label of composition part is 0x6C), can call the structure of composition type according to Invoke, gradually the first decoding pointer movement is arrived opcode field, obtains and identify the command code of this signaling;
Step S350 compares the command code that gets access to the object run sign indicating number of outside input, obtain the interception result, i.e. decision need be tackled this signaling.
Decoding among the above-mentioned steps S320 is in order to obtain the command code of signaling; All the other contents also are indifferent to; Therefore when when decoding, need not in prior art the MAP layer decoder one by one field resolve, only need follow the institutional framework of packet, the decoding pointer is jumped to the opcode field of composition part rapidly; The command code of obtaining this signaling gets final product, and therefore can be regarded as SCCP layer user data partly not exclusively decoded.
SCCP layer user data part among the above-mentioned steps S320, actual is exactly the encapsulating structure of TCAP layer.Research through to TCAP can know that the message of TCAP layer is made up of information unit, and an information unit is divided into label (Tag), length (Length) and content (Contents) three parts.Therefore, when carrying out the decoding among the step S320, can locate each content field rapidly according to the label and the length of information unit.
Further analyze the TCAP layer and can find that TCAP is made up of two sub-layer, be i.e. Transaction Sub-Layer and composition sublayer.Transaction Sub-Layer is handled the message that comprises composition between two " TCAP users ", and composition sub-layer processes composition promptly transmits the protocol Data Unit of far-end operation and response.
Generally there are composition part and dialogue part in the composition sublayer; In the unit data that contains MAP message (UDT); Include the composition part mostly, but not necessarily contain the dialogue part, and opcode field is positioned at the composition part; Only need can get access to command code when therefore decoding to composition part selective analysis.
Need to prove that TCAP layer encapsulating structure is not a fixed structure.Information unit can be nested; Some information unit is not indispensable; The length of information unit also might be random length, and these all are the problems that in decode procedure, should be noted that, therefore need strictly contrast TCAP and utilize condition judgment and recursive algorithm to carry out decoding processing.
Can know that according to prior art the SCCP layer has a big critical function, just provides the route selection function based on global title (GT), can make the direct transmission of carrying out signaling between the different Signaling System Number 7 nets of worldwide interconnection.Because the function of the signaling manipulation sign indicating number that the present invention proposes identification and signaling catching realizes at the SCCP layer; So can also the identification of signaling be integrated with interception function and GT routing function, thereby realize function according to different GT number short message signaling interceptions.
Function according to different GT number interception short message signalings; Has very high practical value; This function ratio is simple tackles signaling according to command code has bigger application advantage; Because in current demand, the user does not often hope all signalings are not tackled not selectedly and abandons, but hopes to send to the signaling catching of certain signalling point.Therefore in this case can the GT routing function of interception function proposed by the invention and SCCP layer itself is integrated, thus satisfy user's demand.
For instance; The short message original calling signaling is through the GT routing function of SCCP layer signaling to be delivered to each short message service center; At this moment will be sent to rising of certain short message service center if desired and exhale signaling all to tackle to abandon, and not be sent to rising of other short message service centers and exhale signaling but do not influence, this moment just can be to the GT number of the short message service center that needs tackle; The command code of configuration interception is carried out the stronger interception of specific aim.
Fig. 4 is combine with the GT routing function schematic flow sheet of embodiment of signaling identification of the present invention and interception.As shown in Figure 4, present embodiment mainly comprises the steps:
Step S410 when configuration is routed to the GT number of the A of short message service center on Signaling Transfer Point, disposes the corresponding desire identification of this number and the object run sign indicating number (referred in this example and exhaled command code) of interception simultaneously;
Rise and to exhale signaling all need pass through certain Signaling Transfer Point to be routed to each short message service center; Exhale the whole interceptions of signaling to abandon if at this moment only need to be routed to rising of the A of short message service center; Exhale signaling to send as usual and be routed to rising of other short message service centers; So on Signalling Transfer Point; When configuration is routed to the GT number of the A of short message service center, only need disposes the corresponding desire identification of this number and the object run sign indicating number of interception simultaneously and get final product;
Step S420, for each bar signaling that the MTP layer sends, when the SCCP layer carried out GT translation and routing, the command code recognition methods of using the present invention to propose was compared the command code that gets access to the object run sign indicating number that is provided with in advance;
Judge whether the GT number in the current signaling is the GT number that is routed to the A of short message service center of configuration, and judge whether the command code that gets access to current signaling is the command code of desire interception, if these two conditions all satisfy, then changes step S430 over to; If have at least a condition not satisfy, then change step S440 over to;
Step S430, this signaling meets the interception condition, and STP is with this signaling catching and abandon, and therefore can not send to the A of short message service center, finishes;
Step S440, this signaling does not meet the interception condition, and explanation might this signaling not be to exhale signaling; Also might this to exhale signaling be not to be routed to the A of short message service center, but be routed to other short message service centers, so this signaling is not done interception; STP carries out normal signaling and transmits processing, finishes.
Technical scheme provided by the invention; Be the user data part (being the encapsulating structure of TCAP layer) of SCCP layer not exclusively to be decoded apace at the SCCP layer; The rapid command code of this signaling of location can realize the interception of short message signaling and abandons at the agreement bottom, has alleviated the processing burden of upper layer module; Avoid taking more system resource, thereby improved the efficient of system.In addition, technical scheme of the present invention can also combine with the GT routing function of SCCP layer, realizes the short message signaling interception function according to different GT numbers.Technical scheme of the present invention can also be applied in other multiple Signaling System Number 7 flow processs except in the short message signaling flow process that is applied in No.7 signalling system.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any those skilled in the art are in the technical scope that the present invention disclosed; 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.