CN105744494A - Short message sending method and device - Google Patents

Short message sending method and device Download PDF

Info

Publication number
CN105744494A
CN105744494A CN201410767851.9A CN201410767851A CN105744494A CN 105744494 A CN105744494 A CN 105744494A CN 201410767851 A CN201410767851 A CN 201410767851A CN 105744494 A CN105744494 A CN 105744494A
Authority
CN
China
Prior art keywords
smsc
service
index list
message
index
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.)
Withdrawn
Application number
CN201410767851.9A
Other languages
Chinese (zh)
Inventor
胡丽蓉
钱建阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201410767851.9A priority Critical patent/CN105744494A/en
Priority to PCT/CN2015/074968 priority patent/WO2016090764A1/en
Publication of CN105744494A publication Critical patent/CN105744494A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a short message sending method. According to the method, an SMSC index list in matching with a business type is acquired by the protocol stack processing equipment according to the business type of a received business message sent by a business subsystem; the business message comprises a business type identification and the short message content; the SMSC index list is polled, the business message is sent to the SMSC when the SMSC corresponding to a polled SMSC index is determined to satisfy preset short message sending conditions. The invention further discloses a short message sending device.

Description

Short message sending method and device
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a short message sending method and apparatus.
Background
With the popularization of mobile terminals, short message services are widely used, and include various information services, and subscription and on-demand services based on a short message platform, and the contents of the short message services include six types of services related to information publishing, personal information management, transaction, entertainment, industry application and location. With the increase of service types, the service volume of users increases rapidly, and especially in holiday such as sunset and christmas, the gateway equipment of a single node is far from bearing heavy load. At present, some operators have adopted a multi-node Short Message Service Center (SMSC) or a short message gateway device to realize short message load sharing, but how to effectively exert the processing capability of each node and improve the overall service processing capability is still an important task.
In order to solve the problem of short message load sharing, the prior art discloses a scheme for distributing short messages in proportion according to the proportion value of the processing capacity of each node, and the main processing flow of the scheme comprises the following steps: the method comprises the steps of firstly summing the proportional values of the service processing capacity of each node to obtain a base number, then performing modulus operation on the obtained base number by using the short message characteristic value, and then determining which node the short message is sent to according to the proportional values.
The above scheme has the following disadvantages:
1) the short message receiving and sending has a certain loss rate. Firstly, the processing capacity proportion value of the equipment is difficult to be definite and quantitative, distribution according to the estimated processing capacity proportion value of the equipment is difficult to ensure that certain equipment does not have overload operation, and especially when massive short message services are processed, if certain equipment is in an overload operation state but still receives short messages continuously, part of short messages are inevitably lost; in addition, absent a load sharing protection mechanism, messages should be distributed to other node devices when a device is about to be or has been overloaded.
2) When a fault occurs, specific services cannot be quickly positioned, and specific fault reasons are positioned. Because the modules are simply taken and distributed in proportion, the destination short message center to which various services are sent has randomness, and specific services are difficult to be positioned at the first time after a fault occurs.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention are expected to provide a short message sending method and apparatus.
The embodiment of the invention provides a short message sending method, which comprises the following steps:
the protocol stack processing equipment obtains a Short Message Service Center (SMSC) index list matched with the service type according to the service type of the received service message sent by the service subsystem; the service message comprises: service type identification and short message content;
polling the SMSC index list, and when determining that the SMSC corresponding to the polled SMSC index meets the preset short message sending condition, sending the service message to the SMSC.
In the above solution, the protocol stack processing device obtaining, according to the service type of the service message sent by the received service subsystem, an SMSC index list matched with the service type, including:
and the protocol stack processing equipment analyzes the service message to obtain a service type identifier, and searches an SMSC index list matched with the service identifier in a local memory by taking the service type identifier as a keyword.
In the foregoing solution, when the service type identifier is used as a key word and an SMSC index list matched with the service identifier is not found in a local memory, the method further includes:
the protocol stack processing equipment uses the service type identification as a key word to search an SMSC index which has a mapping relation with the service type identification in a configuration relation table of the service type identification and the SMSC index of a local database;
generating an SMSC index list matched with the service type according to the SMSC index which is searched and has a mapping relation with the service type identification;
and storing the generated SMSC index list in a local memory.
In the above scheme, it is determined that the polled SMSC satisfies the preset short message sending condition by the following means:
judging whether the sum of the number of the short messages after the current service message is split and the number of the short messages which are sent to the polled SMSC and are waiting for processing is less than or equal to the number of the short messages supported by the corresponding SMSC; if the link of the SMSC is not more than the activation state, judging whether the link of the SMSC is in the activation state, if so, confirming that the SMSC meets the preset short message sending condition.
In the foregoing solution, before the protocol stack processing device determines whether the link of the SMSC is in an activated state, the method further includes:
the protocol stack processing device manages the link state of the SMSC by:
after sending the service message to SMSC each time, detecting the state of the service message, and if the SMSC overtimes the response of the service message or fails to respond, adding 1 to a preset abnormal counter;
if the abnormal count value reaches a preset number within a first preset time, deactivating a link corresponding to the SMSC, setting a timer, and activating the link corresponding to the SMSC when the set timer reaches a second preset time; if the counting time of the abnormal counter reaches the first preset time but the abnormal count value does not reach the preset times, resetting the count value of the abnormal counter and detecting the state of the service message of the next period again; and if the abnormal count value does not reach the preset times and the counting time of the abnormal counter does not reach the first preset time, continuously detecting the state of the service message.
Further, the method further comprises: and when the SMSC index list is polled and the SMSC meeting the preset short message sending condition is not found, returning an error response message to the service subsystem to indicate the reason why the current short message can not be sent.
The embodiment of the invention provides a short message sending device, which comprises: the short message service center SMSC index list acquisition module, the processing module and the service message sending module; wherein,
the SMSC index list obtaining module is used for obtaining an SMSC index list matched with the service type according to the service type of the service message sent by the received service subsystem; the service message comprises: service type identification and short message content;
the processing module is used for polling the SMSC index list and triggering the service message sending module when determining that the SMSC corresponding to the polled SMSC index meets the preset short message sending condition;
and the service message sending module is used for sending the service message to the SMSC when triggered by the processing module.
In the above scheme, the SMSC index list obtaining module obtains the SMSC index list matched with the service type of the service message by the following method:
and the SMSC index list acquisition module analyzes the service message to acquire a service type identifier, and searches an SMSC index list matched with the service identifier in a local memory by taking the service type identifier as a keyword.
In the foregoing solution, the SMSC index list obtaining module is further configured to generate the SMSC index list in the following manner when the SMSC index list matched with the service identifier is not found in the local memory:
the SMSC index list acquisition module takes the service type identification as a key word to search the SMSC index which has a mapping relation with the service type identification in a configuration relation table of the service type identification and the SMSC index of a local database;
generating an SMSC index list matched with the service type according to the SMSC index which is searched and has a mapping relation with the service type identification; the SMSC index list comprises all searched SMSC indexes which have mapping relation with the service type identification;
and storing the generated SMSC index list in a local memory.
In the above scheme, the processing module determines that the polled SMSC meets the preset short message sending condition by the following method:
judging whether the sum of the number of the short messages after the service message is split and the number of the short messages which are sent to the polled SMSC and are waiting for processing is less than or equal to the number of the short messages supported by the corresponding SMSC; if the link of the SMSC is not more than the activation state, judging whether the link of the SMSC is in the activation state, if so, confirming that the SMSC meets the preset short message sending condition.
In the above solution, the apparatus further includes a link state management module, configured to manage the link state of the SMSC by the following manner before the processing module determines whether the link of the SMSC is in the activated state:
after sending the service message to SMSC each time, detecting the state of the service message, and if the SMSC overtimes the response of the service message or fails to respond, adding 1 to a preset abnormal counter;
if the abnormal count value reaches a preset number within a first preset time, deactivating a link corresponding to the SMSC, setting a timer, and activating the link corresponding to the SMSC when the set timer reaches a second preset time; if the counting time of the abnormal counter reaches the first preset time but the abnormal count value does not reach the preset times, resetting the count value of the abnormal counter and detecting the state of the service message of the next period again; and if the abnormal count value does not reach the preset times and the counting time of the abnormal counter does not reach the first preset time, continuously detecting the state of the service message.
In the above scheme, the apparatus further comprises: and the response module is used for returning an error response message to the service subsystem to indicate the reason why the current short message cannot be sent when the processing module finishes polling the SMSC index list and does not find the SMSC meeting the preset short message sending condition.
The embodiment of the invention provides a short message sending method and a device, wherein protocol stack processing equipment obtains an SMSC index list matched with a service type according to the service type of a received service message sent by a service subsystem; the service message comprises: service type identification and short message content; polling the SMSC index list, and when determining that the SMSC corresponding to the polled SMSC index meets the preset short message sending condition, sending the service message to the SMSC. Therefore, the protocol stack processing equipment can select a transmittable SMSC for the service message according to the service type of the service message, judge whether the SMSC meets the short message sending condition in the selected SMSC, and send the service message to the corresponding SMSC only when the short message sending condition is met, so that the service message is divided according to the service type, and only the SMSC matched with the service type is polled to select the SMSC meeting the short message sending condition for sending the short message, thereby reasonably sharing the load of the short message service by the SMSC, and greatly increasing the probability of successful short message sending when the SMSC is selected to send the short message by the short message sending mode with the protection mechanism; in addition, because the selected SMSC has stronger regularity when the short message is sent, the fault can be quickly positioned when the fault occurs.
Drawings
Fig. 1 is a flow chart of a short message sending method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating an SMSC index list matching with a service type identifier according to an embodiment of the present invention;
fig. 3 is a first mapping relationship between a service type identifier and an SMSC index according to an embodiment of the present invention;
fig. 4 is a second mapping relationship between the service type identifier and the SMSC index provided in the embodiment of the present invention;
fig. 5 is a system structure for implementing short message sending according to an embodiment of the present invention;
FIG. 6 is a flow diagram of managing the link state of an SMSC according to an embodiment of the present invention;
fig. 7 is a basic structure diagram of a short message sending apparatus according to an embodiment of the present invention;
fig. 8 is a first flowchart illustrating an exemplary short message sending method according to an embodiment of the present invention;
fig. 9 is a flowchart of an example of a short message sending method according to an embodiment of the present invention.
Detailed Description
In the embodiment of the invention, protocol stack processing equipment obtains an SMSC index list matched with the service type according to the service type of the received service message sent by a service subsystem; the service message at least comprises: service type identification and short message content; polling the SMSC index list, and when determining that the SMSC corresponding to the polled SMSC index meets the preset short message sending condition, sending the service message to the SMSC.
The invention is further described in detail below with reference to the figures and the specific embodiments.
Example one
An embodiment of the present invention provides a short message sending method, as shown in fig. 1, the method includes the following steps:
step 101: the protocol stack processing equipment obtains an SMSC index list matched with the service type according to the service type of the received service message sent by the service subsystem;
specifically, the service message includes: service type identification, short message content and destination terminal number.
Specifically, the service subsystem identifies the service type of the service message through a service type identifier in the service message, that is, the service subsystem distinguishes different service types through the service type identifier carried in the service message; therefore, the protocol stack processing device obtains an SMSC index list matched with the service type according to the service type of the service message sent by the service subsystem, and the method includes: the protocol stack processing equipment analyzes the service message to obtain a service type identifier; searching an SMSC index list matched with the service identifier in a local memory by taking the service type identifier as a keyword; when the matched SMSC index list is found, directly switching to the step 102 to continue execution; when the SMSC index list matching the service type identifier is not found, the following processing flow is continued to generate an SMSC index list matching the service type identifier, and the flow chart is shown in fig. 2:
step S201: the protocol stack processing equipment takes the service type identification as a key word to search an SMSC index which has a mapping relation with the service type identification in a configuration relation table of the service type identification and the SMSC index in a local database;
it should be noted that, in practical applications, the service type identifier and the SMSC may be one-to-one mapping, one-to-many mapping, many-to-one mapping, or many-to-many mapping, and therefore, one or more SMSC indexes found in the configuration relationship table may be used.
Fig. 3 is a first mapping relationship between service type identifier and SMSC index according to an embodiment of the present invention, which is used as an example to describe the distribution process of the mapping relationship, as shown in fig. 3, where the SMSC1 and SMSC2 have strong processing capability, and the traffic flow of the service type identifiers USSD and AA is large, so that USSD and AA services can be mapped with SMSC1 and SMSC2 respectively according to the relationship distribution of fig. 3, and other services with small traffic flow include: BB. And both the CC and the DD establish a mapping relation with the SMSC 3.
Index identification numbers 0, 1 and 2 respectively represent SMSC1, SMSC2 and SMSC3, 5 service type identifications are stored in a configuration relation table of the service type identification and the SMSC index stored in a local database, each service type identification has a corresponding relation with the SMSC, and the corresponding relation shown in fig. 3 is as follows: USSD (0, 1), AA (0, 1), BB (2), CC (2), DD (2), i.e. USSD corresponds to SMSC1 and SMSC2, AA corresponds to SMSC1 and SMSC2, and BB, CC and DD each correspond to SMSC 3.
Fig. 4 is a second mapping relationship between service type identifier and SMSC index according to an embodiment of the present invention, which is taken as an example to describe the allocation of the mapping relationship, as shown in fig. 4:
if the processing capacity of the 3 SMSCs is equivalent, the traffic of the service type AA is larger, all SMSCs can be distributed to the SMSCs, namely, the AA corresponds to all SMSCs, and the rest service type identifications USSD and BB can poll two short message centers;
index identification numbers 0, 1 and 2 respectively represent SMSC1, SMSC2 and SMSC3, 3 service type identifications are stored in a local SMSC index table, each service type identification has a corresponding relation with SMSC, and the corresponding relation shown in fig. 4 is as follows: USSD (0, 1), AA (0, 1, 2), BB (1, 2), i.e. USSD corresponds to SMSC1 and SMSC2, AA corresponds to SMSC1, SMSC2 and SMSC3, BB corresponds to SMSC2 and SMSC 3.
In practical application, since the traffic required by different types of services is different from the processing capability of the SMSC, a mapping relationship needs to be made according to practical situations. In an extreme case, for example, as shown in fig. 4, with slight changes, all kinds of services can be made to correspond to SMSC1, SMSC2 and SMSC3, so that the load sharing effect can be achieved, but there is no isolation between services.
Step S202: generating an SMSC index list matched with the service type according to the SMSC index which is searched and has a mapping relation with the service type identification;
step S203: the generated SMSC index list is saved in local memory and transferred to step 102, where the generated SMSC index list is polled.
Step 102: polling the SMSC index list, and sending the service message to the SMSC when the polled SMSC is determined to meet the preset short message sending condition.
The system structure for implementing short message sending is shown in fig. 5, and as can be seen from fig. 5, the service subsystem is connected to the protocol stack processing device, and the protocol stack processing device is respectively connected to a plurality of SMSCs to implement short message sending;
in addition, it should be understood by those skilled in the art that the protocol stack processing device may be located within the service subsystem when actually implemented.
In this step, when the SMSC index list is polled for the first time, the initial value of the polled index can be determined based on various ways according to actual needs, that is, which SMSC index to start polling is selected; for example, the initial value of the index entry may be selected by the following three methods:
the method comprises the following steps: taking the number of index entries in the SMSC index list as a base number, taking a value obtained by modulo the base number by using the mantissa of the destination terminal number of the current service message as an index initial value, and searching a corresponding SMSC index in the SMSC index list; for example, the last three digits or the last four digits of the destination terminal number may be selected;
the second method comprises the following steps: taking the next index of the SMSC index corresponding to the successful sending of the service type message as the initial value of the index entry; if the service type is polled for the first time, namely the SMSC index list is created and generated for the first time, the first SMSC index in the SMSC index list is taken as the initial value of the index entry;
the third method comprises the following steps: and randomly selecting a certain SMSC index in the SMSC index list as an index initial value.
After determining the initial index value, polling an SMSC corresponding to the initial index value, and judging whether the SMSC meets a short message sending condition; if not, continuing to poll the next index of the index initial value, and judging whether the corresponding SMSC meets the short message sending condition; analogizing in sequence until all SMSC indexes in the SMSC index list are traversed, and if no SMSC meeting the short message sending condition is found, directly returning error information to the service subsystem to indicate that the short message sending is unsuccessful; alternatively, the following processing steps are performed:
setting a timer, and polling an SMSC in an SMSC index list when the timer is overtime until an SMSC meeting a short message sending condition is found; how to not find yet, repeat the step;
usually, after the steps are carried out for a specific number of times for polling the SMSC index list, when an SMSC meeting the short message sending condition is not found, an error message is returned to the service subsystem to indicate that the short message sending is unsuccessful; wherein, the specific times can be set according to actual needs.
This first method is illustrated below with reference to fig. 4:
for the service with the service type mark as AA, the mapping relationship is AA (0, 1, 2), according to the first method, 4 digits at the end of the destination terminal number in the service message are taken, the 4 digits at the end are assumed to be 6911, and since the index list includes 3 elements, the modulus base number is 3, the result of taking the modulus of 3 by 6911 is 2, then 2 is selected as the initial value of the polling index, and the index 2 corresponds to SMSC 3.
For the SMSC index polled each time, it needs to determine whether the corresponding SMSC meets the preset short message sending condition, specifically, it determines whether the SMSC meets the preset short message sending condition by the following method:
judging whether the sum of the number of the short messages after the current service message is split and the number of the short messages which are sent to the corresponding SMSC and are waiting for processing is less than or equal to the number of the short messages supported by the corresponding SMSC; if so, determining that the corresponding SMSC does not meet the preset short message sending condition; if the number of the short message sending processes is less than or equal to the preset number of the short message sending processes, whether the link of the corresponding SMSC is in an activated state is further confirmed, if so, the SMSC is confirmed to meet the preset short message sending condition, the service message is sent to the corresponding SMSC, the current short message sending process is ended, and if not, the SMSC is confirmed to not meet the preset short message sending condition. It should be noted that the number of words in the content of the short message included in the service message may be large, and the short message needs to be split into a plurality of short messages for sending according to the requirement of the number of words; and if the word number of the short message content meets the requirement of the related word number, the splitting is not needed.
Specifically, the number of short messages supported by the SMSC is represented by the size of the sliding window of the SMSC, so in actual operation, the split number of short messages and the number of short messages which are sent to the corresponding SMSC and are waiting for processing can be added and summed, and whether the summed result is smaller than or equal to the size of the sliding window of the corresponding SMSC is compared, and if the summed result is smaller than or equal to the size of the sliding window, whether the link of the corresponding SMSC is in an activated state is further confirmed; and if the SMSC is larger than the size of the sliding window, determining that the SMSC does not meet the short message sending condition.
Specifically, before this step, after the protocol stack processing device sends the short messages to the corresponding SMSC each time, the number of the short messages is recorded as the number of the short messages which are sent to the SMSC and are to be processed, and meanwhile, when the SMSC finishes processing the corresponding short messages (namely, sends the short messages to the specific terminal), a response message is returned to the protocol stack processing device, and at this time, the protocol stack processing device updates the number of the short messages which are sent to the SMSC and are to be processed, namely, the number of the short messages which are received the response message is subtracted from the number of the short messages which are recorded.
Specifically, before confirming whether a link of a corresponding SMSC is in an activated state, the method further includes: the protocol stack processing device manages a link state of the SMSC, the link state including: the method comprises the steps of activating and deactivating, wherein the link is available in the activating state, and the link is unavailable in the deactivating state; specifically, the link status of the SMSC is managed by the following method, and the flowchart is shown in fig. 6:
s601: after sending the service message to SMSC each time, detecting the state of the service message;
s602: judging whether the service message state is response overtime or response failure;
that is, it is detected whether the SMSC has responded overtime or failed to the service message;
if yes, go to step S603; if not, go to step S601 to continue detecting the service message status, that is, perform the service message status detection of the next cycle again;
s603: adding 1 to a preset abnormal counter;
s604: judging whether the abnormal count value reaches a preset number of times X;
if yes, go to S605; otherwise, go to S608;
s605: deactivating a link corresponding to the SMSC and setting a timer;
s606: judging whether the timer reaches a second preset time Z minutes or not; if yes, go to step S607; if not, maintaining the current state, continuing timing and continuing to judge;
s607: the link is in an activated state, and the link recovery of the SMSC is available;
s608: judging whether the counting time of the abnormal counter reaches a first preset time or not; if yes, go to step S609; if not, directly turning to the step S601 to continue the service message detection;
step S609: and clearing the count value of the abnormal counter, and directly returning to the step S601 to detect the service message again after clearing.
In the above steps, the X, Y and Z values can be configured according to actual needs, for example, Y can be set between 5 minutes and 10 minutes; x may be set between 20 times and 100 times, and preferably, X may be set between 20 times and 30 times; the value of Z can be set between 3 minutes and 5 minutes; additionally, the anomaly detection function is not enabled by default when X, Y and Z have values of 0.
When confirming that the current polling SMSC does not meet the preset short message sending condition, continuing polling the next SMSC index in the SMSC index list, judging whether the next SMSC meets the short message sending condition or not, and if so, sending the service message to the corresponding SMSC; if not, continuing to poll the next SMSC in the SMSC index list until the polled SMSC meets the short message sending condition, sending the service message to the corresponding SMSC and ending the current short message sending process;
if the SMSC which meets the preset short message sending condition is not found after the SMSC index list is polled for one time, an error response message is returned to the service subsystem to indicate the reason that the current short message can not be sent; or, a timer may be set, and when the timer is overtime, re-polling is performed, and when an SMSC meeting a preset short message sending condition is not found after polling is performed for a certain number of times (for example, three times, which may be set as required in the practical application) in total, an error response message is returned to the service subsystem to indicate a reason why the current short message cannot be sent; the reason why the current short message cannot be sent includes: link exception, SMSC overload (i.e., SMSC send window is full), etc.
In this step, after the service message is sent to the corresponding SMSC, the SMSC parses the service message, generates a short message according to the content of the short message, and sends the generated short message to the destination terminal number.
EXAMPLE III
An embodiment of the present invention provides a short message sending apparatus, which is applied to a protocol stack processing device, and as shown in fig. 7, the apparatus includes: an SMSC index list obtaining module 71, a processing module 72 and a service message sending module 73; wherein,
the SMSC index list obtaining module 71 is configured to obtain, according to the service type of the received service message sent by the service subsystem, an SMSC index list matched with the service type; the service message at least comprises: service type identification and short message content;
the processing module 72 is configured to poll the SMSC index list, and trigger the service message sending module 73 when it is determined that the SMSC corresponding to the polled SMSC index meets a preset short message sending condition;
the service message sending module 73 is configured to send a service message to the SMSC when triggered by the processing module 72.
Specifically, the SMSC index list obtaining module 71 obtains the SMSC index list matched with the service type of the service message by the following method:
the SMSC index list obtaining module 71 analyzes the service message to obtain a service type identifier; and searching an SMSC index list matched with the service identifier in a local memory by taking the service type identifier as a key word.
Further, the SMSC index list obtaining module 71 is further configured to, when the SMSC index list matching the service identifier is not found, generate an SMSC index list by the following steps:
the SMSC index list obtaining module 71 uses the service type identifier as a keyword, and searches an SMSC index having a mapping relation with the service type identifier in a configuration relation table of the service type identifier and the SMSC index of the local database;
generating an SMSC index list matched with the service type according to the SMSC index which is searched and has a mapping relation with the service type identification; the SMSC index list comprises all searched SMSC indexes which have mapping relation with the service type identification;
and storing the generated SMSC index list in a local memory.
Specifically, the processing module 72 determines that the polled SMSC meets the preset short message sending condition by the following method:
judging whether the sum of the number of the short messages after the service message is split and the number of the short messages which are sent to the polled SMSC and are waiting for processing is less than or equal to the number of the short messages supported by the corresponding SMSC; if the link is not more than the preset short message sending condition, further judging whether the link of the SMSC is in an activated state, if so, confirming that the SMSC meets the preset short message sending condition.
Further, the apparatus further includes a link state management module 74, configured to manage the link state of the SMSC before the processing module 72 determines whether the link of the SMSC is in the activated state, by:
after sending the service message to SMSC each time, detecting the state of the service message, and if the SMSC overtimes the response of the service message or fails to respond, adding 1 to a preset abnormal counter;
if the abnormal count value reaches a preset number within a first preset time, deactivating a link corresponding to the SMSC, setting a timer, and activating the link corresponding to the SMSC when the set timer reaches a second preset time; if the counting time of the abnormal counter reaches the first preset time but the abnormal count value does not reach the preset times, resetting the count value of the abnormal counter and detecting the state of the service message of the next period again; and if the abnormal count value does not reach the preset times and the counting time of the abnormal counter does not reach the first preset time, continuously detecting the state of the service message.
Further, the apparatus further comprises: a response module 75, configured to, when the processing module 72 finishes polling the SMSC index list and no SMSC meeting a preset short message sending condition is found, return an error response message to the service subsystem to indicate a reason why the current short message cannot be sent; specifically, after 1 polling, or when no SMSC meeting the preset short message sending condition is found after N polling, an error response message may be returned to the service subsystem.
The method according to the embodiment of the present invention is described in detail below by two specific examples;
example 1
As shown in fig. 8, this example includes the steps of:
step 801: receiving a service message and extracting a service type identifier;
step 802: traversing the local memory area service type identifier array, searching the SMSC index List corresponding to the service type identifier, if the service type identifier is found, directly entering the step S804, otherwise, entering the step S803;
the SMSC index list is an index list which is established in a memory area according to a preset service type identification and an SMSC configuration relation table;
step 803: creating an SMSC index list and adding the SMSC index list to the existing list;
specifically, an SMSC corresponding to the service identifier type is searched in a configuration relation table of a service type identifier and an SMSC preset locally, an index list corresponding to the service type identifier is created, and the index list is added to an existing list of a local memory area;
step 804: polling the SMSC index list;
if the current SMSC index list is polled for the first time, selecting an index initial value in the SMSC index list, starting polling from the SMSC index corresponding to the initial value, and polling the next SMSC index in sequence when one SMSC index is polled and the SMSC corresponding to the SMSC index does not meet the short message sending condition;
step 805: judging whether the sum of the current short message number N and the short message number waiting for the SMSC response is smaller than the sending window size of the SMSC;
wherein, the current short message number refers to the number of short messages contained in the current service message; the number of short messages waiting for the SMSC response is: number of messages that have been sent to the currently polled SMSC and are waiting for the SMSC to respond; in this step, if the determination result is yes, go to step 806 to continue processing, otherwise, go to step 808;
step 806: judging whether the current polling SMSC link is in the activated state, if yes, turning to step 807, otherwise, turning to step 808;
step 807: sending N short messages in the service message to an SMSC (short message service center), and increasing N by a short message counter waiting for the response of the SMSC;
in this step, it is also necessary to record the SMSC index corresponding to the current service type, so as to select an index initial value when polling the next message of the service message type (assuming that the initial value is selected twice in the above manner);
step 808: judging whether the polling times reaches the total number of elements in the List of the SMSC index, if not, turning to step 804 to continue polling the next SMSC index; otherwise, go to step 809;
step 809: and recording the reason of the short message sending failure and ending the process.
Example two
As shown in fig. 9, this example includes the steps of:
step 901: receiving a service message and extracting a service type identifier;
step 902: traversing the local memory area service type identifier array, searching an SMSC index List corresponding to the service type identifier, if the service type identifier is found, directly entering step 904, otherwise, entering step 903;
the SMSC index list is an index list which is established in a memory area according to a preset service type identification and an SMSC configuration relation table;
step 903: creating an SMSC index list and adding the SMSC index list to the existing list;
searching an SMSC corresponding to the service identification type in a configuration relation table of a service type identification and an SMSC preset locally, creating an index list corresponding to the service type identification, and adding the index list to an existing list of a local memory area;
step 904: polling the SMSC index list;
if the current SMSC index list is polled for the first time, selecting an index initial value in the SMSC index list, starting polling from the SMSC index corresponding to the initial value, and polling the next SMSC index in sequence when one SMSC index is polled and the SMSC corresponding to the SMSC index does not meet the short message sending condition;
step 905: judging whether the sum of the current short message number N and the short message number waiting for the SMSC response is smaller than the sending window size of the SMSC;
wherein, the current short message number refers to the number of short messages contained in the current service message; the number of short messages waiting for the SMSC response is: number of messages that have been sent to the currently polled SMSC and are waiting for the SMSC to respond; in this step, if the determination result is yes, go to step 906 to continue processing, otherwise, go to step 908;
step 906: judging whether the current polling SMSC link is in the activated state, if yes, turning to step 907, otherwise, turning to step 908;
step 907: sending N short messages in the service message to an SMSC (short message service center), and increasing N by a short message counter waiting for the response of the SMSC;
in this step, it is also necessary to record the SMSC index corresponding to the current service type, so as to select an index initial value when polling the next message of the service message type (assuming that the initial value is selected twice in the above manner);
step 908: judging whether the polling times reaches the total number of elements in the List of the SMSC index, if not, turning to step 904 to continue polling the next SMSC index; otherwise, go to step 909;
step 909: adding 1 to the count value of the traversal counter;
specifically, the traversal counter is used for counting the number of times of traversing all elements in the SMSC, that is, when all elements in the SMSC are polled, the value of the traversal counter is increased by 1;
step 910: judging whether the traversal counter reaches a specific threshold value;
before this step, the threshold value of the traversal counter can be set according to actual needs; when the traversing counter reaches a specific threshold, turning to step 911; when the traversal counter does not reach a specific threshold, go to step 912;
step 911: recording the reason of the short message sending failure;
step 912: setting a timer;
step 913: judging whether the timer is overtime; and when the timer is overtime, re-polling the SMSC index list; returning to continue counting when the timer has not timed out, and re-polling the SMSC when the timer times out.
In a specific implementation process, the SMSC index list obtaining module 71, the processing module 72, the service message sending module 73, the link state management module 74 and the response module 75 may be implemented by a Central Processing Unit (CPU), a microprocessor unit (MPU), a Digital Signal Processor (DSP), or a programmable logic array (FPGA) in a protocol stack processing device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (12)

1. A short message sending method is characterized by comprising the following steps:
the protocol stack processing equipment obtains a Short Message Service Center (SMSC) index list matched with the service type according to the service type of the received service message sent by the service subsystem; the service message comprises: service type identification and short message content;
polling the SMSC index list, and when determining that the SMSC corresponding to the polled SMSC index meets the preset short message sending condition, sending the service message to the SMSC.
2. The method of claim 1, wherein the protocol stack processing device obtains an SMSC index list matching the service type according to the service type of the service message sent by the service subsystem, and the method comprises:
and the protocol stack processing equipment analyzes the service message to obtain a service type identifier, and searches an SMSC index list matched with the service identifier in a local memory by taking the service type identifier as a keyword.
3. The method of claim 2, wherein when the service type identifier is used as a key to find an SMSC index list matching the service identifier in a local memory, the method further comprises:
the protocol stack processing equipment uses the service type identification as a key word to search an SMSC index which has a mapping relation with the service type identification in a configuration relation table of the service type identification and the SMSC index of a local database;
generating an SMSC index list matched with the service type according to the SMSC index which is searched and has a mapping relation with the service type identification;
and storing the generated SMSC index list in a local memory.
4. A method as claimed in claim 1, 2 or 3, wherein the polled SMSC is determined to satisfy the preset short message sending condition by:
judging whether the sum of the number of the short messages after the current service message is split and the number of the short messages which are sent to the polled SMSC and are waiting for processing is less than or equal to the number of the short messages supported by the corresponding SMSC; if the link of the SMSC is not more than the activation state, judging whether the link of the SMSC is in the activation state, if so, confirming that the SMSC meets the preset short message sending condition.
5. The method of claim 4, wherein before the protocol stack processing device determines whether the link of the SMSC is active, the method further comprises:
the protocol stack processing device manages the link state of the SMSC by:
after sending the service message to SMSC each time, detecting the state of the service message, and if the SMSC overtimes the response of the service message or fails to respond, adding 1 to a preset abnormal counter;
if the abnormal count value reaches a preset number within a first preset time, deactivating a link corresponding to the SMSC, setting a timer, and activating the link corresponding to the SMSC when the set timer reaches a second preset time; if the counting time of the abnormal counter reaches the first preset time but the abnormal count value does not reach the preset times, resetting the count value of the abnormal counter and detecting the state of the service message of the next period again; and if the abnormal count value does not reach the preset times and the counting time of the abnormal counter does not reach the first preset time, continuously detecting the state of the service message.
6. A method according to claim 1, 2 or 3, characterized in that the method further comprises: and when the SMSC index list is polled and the SMSC meeting the preset short message sending condition is not found, returning an error response message to the service subsystem to indicate the reason why the current short message can not be sent.
7. A short message sending device, characterized in that the device comprises: the short message service center SMSC index list acquisition module, the processing module and the service message sending module; wherein,
the SMSC index list obtaining module is used for obtaining an SMSC index list matched with the service type according to the service type of the service message sent by the received service subsystem; the service message comprises: service type identification and short message content;
the processing module is used for polling the SMSC index list and triggering the service message sending module when determining that the SMSC corresponding to the polled SMSC index meets the preset short message sending condition;
and the service message sending module is used for sending the service message to the SMSC when triggered by the processing module.
8. The apparatus of claim 7, wherein the SMSC index list obtaining module obtains the SMSC index list matching the service type of the service message by:
and the SMSC index list acquisition module analyzes the service message to acquire a service type identifier, and searches an SMSC index list matched with the service identifier in a local memory by taking the service type identifier as a keyword.
9. The apparatus of claim 8, wherein the SMSC index list obtaining module is further configured to generate the SMSC index list when the SMSC index list matching the service identifier is not found in the local memory by:
the SMSC index list acquisition module takes the service type identification as a key word to search the SMSC index which has a mapping relation with the service type identification in a configuration relation table of the service type identification and the SMSC index of a local database;
generating an SMSC index list matched with the service type according to the SMSC index which is searched and has a mapping relation with the service type identification; the SMSC index list comprises all searched SMSC indexes which have mapping relation with the service type identification;
and storing the generated SMSC index list in a local memory.
10. The apparatus of claim 7, 8 or 9, wherein the processing module determines that the polled SMSC satisfies a preset sms sending condition by:
judging whether the sum of the number of the short messages after the service message is split and the number of the short messages which are sent to the polled SMSC and are waiting for processing is less than or equal to the number of the short messages supported by the corresponding SMSC; if the link of the SMSC is not more than the activation state, judging whether the link of the SMSC is in the activation state, if so, confirming that the SMSC meets the preset short message sending condition.
11. The apparatus of claim 10, further comprising a link state management module configured to manage the link state of the SMSC before the processing module determines whether the link of the SMSC is in an active state by:
after sending the service message to SMSC each time, detecting the state of the service message, and if the SMSC overtimes the response of the service message or fails to respond, adding 1 to a preset abnormal counter;
if the abnormal count value reaches a preset number within a first preset time, deactivating a link corresponding to the SMSC, setting a timer, and activating the link corresponding to the SMSC when the set timer reaches a second preset time; if the counting time of the abnormal counter reaches the first preset time but the abnormal count value does not reach the preset times, resetting the count value of the abnormal counter and detecting the state of the service message of the next period again; and if the abnormal count value does not reach the preset times and the counting time of the abnormal counter does not reach the first preset time, continuously detecting the state of the service message.
12. The apparatus of claim 7, 8 or 9, further comprising: and the response module is used for returning an error response message to the service subsystem to indicate the reason why the current short message cannot be sent when the processing module finishes polling the SMSC index list and does not find the SMSC meeting the preset short message sending condition.
CN201410767851.9A 2014-12-12 2014-12-12 Short message sending method and device Withdrawn CN105744494A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410767851.9A CN105744494A (en) 2014-12-12 2014-12-12 Short message sending method and device
PCT/CN2015/074968 WO2016090764A1 (en) 2014-12-12 2015-03-24 Short message transmitting method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410767851.9A CN105744494A (en) 2014-12-12 2014-12-12 Short message sending method and device

Publications (1)

Publication Number Publication Date
CN105744494A true CN105744494A (en) 2016-07-06

Family

ID=56106538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410767851.9A Withdrawn CN105744494A (en) 2014-12-12 2014-12-12 Short message sending method and device

Country Status (2)

Country Link
CN (1) CN105744494A (en)
WO (1) WO2016090764A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109699047A (en) * 2017-10-20 2019-04-30 中国移动通信集团浙江有限公司 A kind of short message interacting platform implementation method and device
CN110072199A (en) * 2018-01-23 2019-07-30 优信拍(北京)信息科技有限公司 A kind of monitoring short message sends the method and system of exception
CN111356092A (en) * 2018-12-24 2020-06-30 中兴通讯股份有限公司 Delivery domain query method and device, and short message delivery method and device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111210045B (en) * 2018-11-22 2023-07-04 中国移动通信集团湖南有限公司 Shutdown instruction sending optimization method
CN113747378A (en) * 2020-05-29 2021-12-03 中国移动通信有限公司研究院 Short message transmission method, device and network equipment
CN118259921A (en) * 2024-05-30 2024-06-28 杭州海浔科技有限公司 Ammeter freezing data reading method and device, concentrator and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1262849A (en) * 1997-06-03 2000-08-09 诺基亚网络有限公司 Routing short message

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010035726A (en) * 1999-10-01 2001-05-07 서평원 E-Mail Transceive Method Of Using Mobile Telecommunication Network
US7941165B2 (en) * 2005-03-02 2011-05-10 Cisco Technology, Inc. System and method for providing a proxy in a short message service (SMS) environment
CN100455055C (en) * 2006-08-02 2009-01-21 侯万春 System and method for implementing short message additional service

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1262849A (en) * 1997-06-03 2000-08-09 诺基亚网络有限公司 Routing short message

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109699047A (en) * 2017-10-20 2019-04-30 中国移动通信集团浙江有限公司 A kind of short message interacting platform implementation method and device
CN110072199A (en) * 2018-01-23 2019-07-30 优信拍(北京)信息科技有限公司 A kind of monitoring short message sends the method and system of exception
CN111356092A (en) * 2018-12-24 2020-06-30 中兴通讯股份有限公司 Delivery domain query method and device, and short message delivery method and device
CN111356092B (en) * 2018-12-24 2022-08-02 中兴通讯股份有限公司 Delivery domain query method and device, and short message delivery method and device

Also Published As

Publication number Publication date
WO2016090764A1 (en) 2016-06-16

Similar Documents

Publication Publication Date Title
CN105744494A (en) Short message sending method and device
EP3386150B1 (en) Terminal failure processing method, device and system
US9104676B2 (en) Hash algorithm-based data storage method and system
CN106973093B (en) A kind of service switch method and device
CN110995513B (en) Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN105635051B (en) Data interaction method, device and system
US9930632B2 (en) M2M application remote registration method, device, system and storage medium
CN105306300A (en) Real-time network cluster monitoring method and system
CN104572727A (en) Data querying method and device
EP3258644B1 (en) Monitoring processing method and device
US10219133B2 (en) Notification message transmission method and device, and computer storage medium
CN112995266B (en) Information pushing method and related equipment
CN104021141A (en) Method, device and system for data processing and cloud service
US20170126828A1 (en) Sending Method and Apparatus and Computer Storage Medium of Notification Message
EP3185598B1 (en) Application registration method and apparatus
CN109379764B (en) Message sending method and device
CN105471700B (en) A kind of methods, devices and systems of Message Processing
KR101852699B1 (en) Method and apparatus for sharing environment context
CN108830724B (en) Resource data packet processing method and terminal equipment
US11595419B2 (en) Communication monitoring system, communication monitoring apparatus, and communication monitoring method
CN114338794B (en) Service message pushing method and device, electronic equipment and storage medium
EP3220671A1 (en) Group resource update processing method, device and system, and cse
CN106912032B (en) Information processing method, system, client and server
CN104869532B (en) Group member management method and device
CN105847030A (en) Information processing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20160706