Summary of the invention
Main purpose of the present invention is to provide the delivery method of a kind of Multimedia Message center and message, to address the above problem.
One aspect of the present invention provides a kind of MMSC, comprising: business module, coding/decoding module and buffer process module, and wherein, business module is used for message to be sent is issued to buffer process module; Buffer process module is used for buffer memory message to be sent, and the speed that can handle according to SMSC issues the message to be sent of self buffer memory to coding/decoding module; Coding/decoding module is used for the message to be sent that receives from buffer process module is encoded, and the message to be sent behind the coding is issued to SMSC.
Further, buffer process module is the speed that the mode of the message to be sent of sending threshold value comes control messages to issue by issue quantity in a dispatching cycle, wherein, and speed=sending threshold value that SMSC can handle/dispatching cycle.
Further, buffer process module is controlled the beginning of each dispatching cycle by timer message, and wherein, the moment that timer message began in each dispatching cycle is triggered.
Further, buffer process module comprises: receiver module is used to receive the message to be sent from business module; Judge module is used to judge current issue speed and whether reach the speed that SMSC can handle; Scheduler module, the judged result that is used at judge module is under the situation that is, scheduling buffer process module and first issues module, the judged result of judge module for situation not under, scheduling second issues module; Buffer process module is used for the message to be sent that the buffer memory receiver module receives; First issues module, and the speed that is used for can handling according to SMSC issues the message to be sent of buffer process module buffer memory to coding/decoding module; Second issues module, and being used for directly not, the message to be sent of buffer memory is issued to coding/decoding module.
Further, scheduler module also is used under the situation of buffer process module cache failure, and scheduling second issues module; Second issues the message to be sent that module also is used for issuing to coding/decoding module cache failure.
Another aspect of the present invention provides a kind of delivery method of message, comprising: MMSC generates message to be sent; MMSC buffer memory message to be sent, and from the message to be sent of buffer memory, select message to be sent according to the speed that SMSC can handle; MMSC encodes to the message of selecting to be sent, and the message to be sent behind the coding is issued to SMSC.
Further, MMSC is the speed that the mode of the message to be sent of sending threshold value comes control messages to issue by select quantity in a dispatching cycle, wherein, and speed=sending threshold value that SMSC can handle/dispatching cycle.
Further, MMSC controls the beginning of dispatching cycle by timer message, and wherein, the moment that timer message began in each dispatching cycle is triggered.
Further, before MMSC buffer memory message to be sent, also comprise: judge current issue speed and whether reach the speed that SMSC can handle, if then continue subsequent treatment; Otherwise, directly the message to be sent of buffer memory is not encoded, the message to be sent behind the coding is issued to SMSC.
Further, under the situation of buffer memory message buffering failure to be sent, directly the message to be sent of cache failure is encoded, the message to be sent behind the coding is issued to SMSC.
The present invention is by setting up buffer process module between the business module of MMSC and coding/decoding module, this module is issued to coding/decoding module with message to be sent according to the speed that SMSC can handle, solved in the correlation technique that flow surpasses disposal ability in the SMSC short time, thereby cause the problem that message can't normal process, when having avoided Multimedia Message center business surge sms center is caused moment impact, both can reduce the sms center performance requirement, can improve service success rate again.
Embodiment
Hereinafter will describe the present invention with reference to the accompanying drawings and in conjunction with the embodiments in detail.Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Present embodiment provides a kind of MMSC, and Fig. 2 is the structured flowchart according to the MMSC of the embodiment of the invention, and this MMSC comprises: business module 22, coding/decoding module 26 and buffer process module 24, wherein,
Business module 22 is used for message to be sent (message to be sent can be notice message or user's delivery report) is issued to buffer process module 24;
Buffer process module 24 is used for buffer memory message to be sent, and the speed that can handle according to SMSC issues the message to be sent of self buffer memory to coding/decoding module 26;
Coding/decoding module 26 is used for the message to be sent that receives from buffer process module 24 is encoded, and the message to be sent behind the coding is issued to SMSC.
MMSC in the present embodiment, carry out buffer memory by the message to be sent that increases by 24 pairs of business modules 22 of buffer process module, and according to the speed that SMSC can handle message to be sent is sent to coding/decoding module 26 and encodes, having changed in the correlation technique business module 22 produces message to be sent and promptly sends into coding/decoding module 26 and encode and be sent to the mode of SMSC then, issuing of message to be sent carried out current limliting, solved in the correlation technique that flow surpasses disposal ability in the SMSC short time, thereby cause the problem that message can't normal process, when having avoided Multimedia Message center business surge sms center is caused moment impact, both can reduce the sms center performance requirement, can improve service success rate again.
Need to prove that the speed that above SMSC can handle can be the speed of fixing, also can be the speed that changes, and wherein, fixing speed can be the value default according to the practical operation situation of system; The speed that changes can be that section changes in time, or along with current disposal ability dynamic change of MMSC or the like, concrete variation strategy can be pre-configured.
Issue in message under the situation of the speed disposal ability dynamic change current along with MMSC, MMSC can be in real time or regularly by obtaining the current disposal ability information of SMSC, determine that according to this information current message issues speed again, also can be that SMSC feeds back to MMSC when the disposal ability information change of self, MMSC determines that according to this information current message issues speed again.
For the control that issues speed, for for simplicity, buffer process module 24 can be the speed that the mode of the message to be sent of sending threshold value comes control messages to issue by issue quantity in a dispatching cycle, wherein, and speed=sending threshold value that SMSC can handle/dispatching cycle.Handle very conveniently in this way, and by selecting different dispatching cycles, can adjust the precision of rate controlled, choose more little dispatching cycle, and the precision of rate controlled is high more, and the speed that message issues is level and smooth more.
Buffer process module 24 is carried out in the process of rate controlled, can scan the current time at any time, so that whether check current dispatching cycle finishes, whether should begin new dispatching cycle, the realization of this mode is more direct, but may be more to the resource cost of buffer process module, therefore, processing for the ease of buffer process module 24, buffer process module 24 can be controlled the beginning of dispatching cycle by timer message, wherein, timer message was triggered in the moment that begins each dispatching cycle.Adopt such processing mode, buffer process module 24 just can be restarted a dispatching cycle when receiving this timer message, and need not to determine whether to restart a dispatching cycle by the mode of scanning at any time, the system resource that takies is less, and is convenient to management.
Fig. 3 is the preferred structure block diagram according to the MMSC of the embodiment of the invention, and as shown in Figure 3, buffer process module 24 can comprise:
Receiver module 30 is used to receive the message to be sent from business module 22;
Judge module 31 is coupled to receiver module 30, is used to judge current issue speed and whether reach the speed that SMSC can handle;
Scheduler module 32 is coupled to judge module 31, and the judged result that is used at judge module 31 is under the situation that is, scheduling buffer process module 33 and first issues module 34, the judged result of judge module 31 for situation not under, scheduling second issues module 35;
Buffer process module 33 is coupled to business module 22 and scheduler module 32, is used for the message to be sent that buffer memory receiver module 30 receives;
First issues module 34, is coupled to buffer process module 33, and the speed that is used for can handling according to SMSC issues the message to be sent of buffer process module 33 buffer memorys to coding/decoding module 26;
Second issues module 35, is coupled to business module 22 and scheduler module 32, and being used for directly not, the message to be sent of buffer memory is issued to coding/decoding module 26.
Judgement by above judge module 31, do not reach as yet in current speed under the situation of the speed that SMSC can handle, then the message to be sent that directly receiver module 30 is received issues module 35 by second and is sent to coding/decoding module 26, reduce the link of buffer memory, thereby improved the handling property of system.
Preferably, scheduler module 32 also is used under the situation of buffer process module 33 cache failures, and scheduling second issues module 35; Second issues the message to be sent that module 35 also is used for issuing to coding/decoding module 26 cache failure.By increasing the branch of a fault processing for scheduler module 32, under the situation of buffer process module 33 cache failures, direct message to be sent with cache failure issues module 35 by second and sends to coding/decoding module 26, prevent the information drop-out that causes because of cache failure, improved the stability of system.
Fig. 4 is the flow chart according to the delivery method of the message of the embodiment of the invention, and this method comprises:
Step S402, MMSC generate message to be sent;
Step S404, MMSC buffer memory message to be sent, and from the message to be sent of buffer memory, select message to be sent according to the speed that SMSC can handle;
Step S406, MMSC encodes to the message to be sent that chooses, and the message to be sent behind the coding is issued to SMSC.
This method has been carried out current limliting to issuing of message to be sent, solved in the correlation technique that flow surpasses disposal ability in the SMSC short time, thereby cause the problem that message can't normal process, when having avoided Multimedia Message center business surge sms center is caused moment impact, both can reduce the sms center performance requirement, can improve service success rate again.
Preferably, MMSC can be the speed that the mode of the message to be sent of sending threshold value comes control messages to issue by select quantity in a dispatching cycle, wherein, and speed=sending threshold value that SMSC can handle/dispatching cycle.Handle very conveniently in this way, and by selecting different dispatching cycles, can adjust the precision of rate controlled, choose more little dispatching cycle, and the precision of rate controlled is high more, and the speed that message issues is level and smooth more.
Preferably, MMSC controls the beginning of dispatching cycle by timer message, and wherein, the moment that timer message began in each dispatching cycle is triggered.Adopt such processing mode, just can restart a dispatching cycle when receiving this timer message, and need not to determine whether to restart a dispatching cycle by the mode of scanning at any time, the system resource that takies is less, and is convenient to management.
Preferably, before MMSC buffer memory message to be sent, also comprise: judge current issue speed and whether reach the speed that SMSC can handle, if then continue subsequent treatment; Otherwise, directly the message to be sent of buffer memory is not encoded, the message to be sent behind the coding is issued to SMSC.This method does not reach under the situation of the speed that SMSC can handle as yet in current speed, does not then carry out buffer memory, directly message to be sent is encoded, and has reduced the link of buffer memory, thereby has improved the handling property of system.
Preferably, under the situation of buffer memory message buffering failure to be sent, directly the message to be sent of cache failure is encoded, the message to be sent behind the coding is issued to SMSC.This processing mode has prevented the information drop-out that causes because of cache failure, has improved the stability of system.
The message that the scheme that more than provides makes MMSC be issued to MMSC is carried out with level and smooth speed, avoids the moment impact to SMSC, both can reduce the sms center performance requirement, can improve service success rate, guarantee benefits of operators again.
The embodiment 1-2 that describes below is that example is illustrated above scheme with the situation of getting second dispatching cycle, and embodiment 1-2 combines the technical scheme of above-mentioned a plurality of preferred embodiments.
Embodiment 1
Fig. 5 is that this method may further comprise the steps according to the method flow diagram of the MMSC issuing message of embodiment 1:
Step 501:MMSC business module produces issuing message, and issuing message is sent to the MMSC buffer process module;
Step 502:MMSC buffer process module is received the issuing message of business module, then applies for this message of spatial cache and buffer memory, or directly sends to coding/decoding module;
The speed issuing message of step 503:MMSC buffer process module control per second some is to the MMSC coding/decoding module;
Step 504:MMSC coding/decoding module is received issuing message, is handed down to SMSC after encoding by the SMPP agreement, and the message that is handed down to SMSC is submit_sm;
Step 505:SMSC receives the submit_sm message of MMSC, returns response sumit_sm_resp to MMSC, and to user's transmitting short message content;
The MMSC coding/decoding module is received after response message that SMSC returns is decoded by the SMPP agreement and is converted the MMSC inside story to.
As can be seen, by between MMSC business module and MMSC coding/decoding module, increasing buffer process module, the issuing message of business module directly sends to buffer process module, buffer process module is received the laggard row cache of issuing message, and be handed down to coding/decoding module by the message of per second fixed number, after encoding, coding/decoding module is handed down to SMSC.Like this, MMSC is handed down to the message of SMSC, being on the time of unit with the second, is in smooth state all the time, both can reduce the sms center performance requirement, can improve service success rate, guarantee benefits of operators again.
Embodiment 2
In this scheme, the processing of buffer process module is an important ring, and this embodiment describes the logical process flow process of buffer process module in detail, and Fig. 6 is the disposed of in its entirety flow chart according to the buffer process module of embodiment 2, may further comprise the steps:
Step S601:MMSC buffer process module begins to start;
Step S602:MMSC buffer process module application spatial cache, initialization idle queues and used formation is set second timer etc.;
Step S603:MMSC buffer process module is received processing messages, processing messages comprises professional issuing message and second timer message, and wherein, professional issuing message is that business module issues, second, timer message was that the MMSC module self is sent, and was used for the replacement of per second;
Whether what the judgement of step S604:MMSC buffer process module was received is sending down service message, if, execution in step S605, if not, execution in step S606;
Step S605: receive that message is that sending down service message then enters sending down service Message Processing flow process;
Step S606: if the message that buffer process module is received be not sending down service message then judge whether to be timer message second, if, execution in step S607, otherwise return;
Step S607: if the message of receiving is second timer message then enters the timed message handling process.
Fig. 7 is the process chart according to the sending down service message of embodiment 2, and as shown in Figure 7, step S605 sending down service Message Processing flow process can may further comprise the steps:
Step S701: receive sending down service message, at first judge the bar number that has sent in this second, whether the maximum bar number that sends less than the permission of default; Judged result is true, and then expression can continue to send, then execution in step S702; Judged result is false, represents that then the quota that allows in this second to send uses up, and can not continue to send, and need carry out buffer memory, then execution in step S704;
Step S702: sending down service message is sent to coding/decoding module encode;
Step S703: the bar number that has sent in this second adds 1, returns;
Step S704: whether the idle queues of judging buffer memory still has idle node, if idle node is arranged, expression can buffer memory, then execution in step S705; If there is not idle node, illustrate that buffer memory takes, this moment is buffered message message no longer, execution in step S706;
Step S705: get the idle node of idle queues, buffer memory sending down service message is inserted into and uses formation, returns;
Step S706: this step is the exception handling of buffer queue, sending down service message is sent to coding/decoding module encode, and returns.
Fig. 8 is the flow chart according to the timed message handling process of embodiment 2, and as described in Figure 8, step S607 timed message handling process can may further comprise the steps:
Step S801: receive a second timed message, new one second of expression beginning is at first counted zero clearing with having sent bar in this second;
Step S802: judge the bar number that has sent in this second, whether the maximum bar number that sends less than the permission of default (for the situation that be dispatching cycle second, this maximum bar number is identical with the speed of maximum permission); Judged result is true, and then expression can continue to send, then execution in step S803; Judged result is false, represents that then the quota that allows in this second to send uses up, and can not continue to send, and returns;
Step S803: get and use the formation node, the sending down service message of buffer memory is taken out send to coding/decoding module and encode, simultaneously, this node is inserted idle queues;
Step S804: the bar number that has sent in this second adds 1, jumps to step S802 and carries out.
In sum, the scheme that the embodiment of the invention provides is compared with original flow process, open up the issuing message spatial cache at MMSC, the message of temporary cache sending down service, be issued to SMSC with level and smooth speed then, when avoiding Multimedia Message center business surge sms center caused moment impact, both can reduce the sms center performance requirement, can improve service success rate, guarantee benefits of operators again.
Need to prove, can in computer system, carry out in the step shown in the flow chart of accompanying drawing such as a set of computer-executable instructions, and, though there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.