Current location - Quotes Website - Collection of slogans - [Design of enterprise SMS application platform] The mobile phone can't receive SMS verification code.
[Design of enterprise SMS application platform] The mobile phone can't receive SMS verification code.
As a very important way of communication, SMS has been paid more and more attention by enterprises. The enterprise short message application platform introduced in this paper is simple and easy to operate, which can provide enterprises with convenient and flexible two-way communication channels based on short messages. Over the years, collecting front-end sales data in time and accurately, and quickly delivering all kinds of news to the target population, has been the goal pursued by all kinds of enterprises. Although PC plus Internet is a good means, it is inconvenient to put it on the counter or carry it by users because of its large size, and if everyone is equipped with a laptop or PDA, the investment is also relatively large. On the other hand, according to the statistics of the Ministry of Information Industry, there were more than 390 million mobile phone users in China in 2005, and the number of short messages sent in the whole year was 304.6 billion, an increase of 40% over 2004 and 303% over 2000. With the increasing popularity of mobile phones and the low price of short messages, short messages have gradually penetrated into our lives.

As a part of enterprise informatization, many enterprises have begun to consider establishing an enterprise short message application platform to provide enterprises with convenient and flexible two-way communication channels based on short messages. At present, the existing application forms are: sending short messages in groups through the short message platform to query the receiving status of mobile phones; SMS reminders of employees' emails, official documents, schedules, etc. Receive all kinds of information sent by mobile phones, and carry out relevant processing for different information, such as information editing, transaction approval, on-demand and other operations.

Workflow of SMS platform

In order to ensure the consistency and security of access, mobile operators require all service providers to access the SMS center through the SMS gateway. The SMS system consists of the following parts:

1. Participating entities of the safety management system.

Service Provider (SP): the information provider of short message service.

Internet short message gateway (ISMG): provides a channel for data exchange between SP and SMS center, and connects with SP through CMPP (China Mobile Peer-to-Peer) protocol and SMS center through SMPP 3.3 protocol.

SMSC short message service center): use signaling network to send short messages to mobile phone users.

2. Workflow of SMS service

User's short message service (that is, MO service, such as information on demand, etc. ): the short message center sends the short message content to the connected short message gateway through SMPP protocol, and the short message gateway sends the short message content to the corresponding SP through CMPP protocol according to the short message sending number (that is, the service code of the SP), which is processed by the SP.

User's SMS receiving service (i.e. MT service, such as SMS group sending, etc. ): SP providing this service sends the short message content to the connected short message gateway through CMPP protocol, and the short message gateway sends it to the short message center to which the user belongs through SMPP protocol according to the user's mobile phone number segment; The short message center sends the short message to the user's mobile phone terminal.

System design and implementation

The construction of enterprise SMS application platform should first consider the following issues:

● Fault tolerance: good fault tolerance judgment and detailed log record.

● Scalability: The platform has strong scalability for sending or receiving. In terms of sending function, it is only necessary to add the short message content to the short message platform and send it uniformly by the sending service; In the aspect of receiving function, only the developer needs to develop the processing of new functions, and the configuration does not need to modify the SMS transceiver program when adding new functions to receive.

● Reliability: Confirm whether the mobile phone has received successfully by checking the sending success status.

● Configurability: Regardless of the connection parameters, forwarding times and time interval of the SMS center, the received functions can be modified and expanded through configuration.

● Support long SMS sending and WAP push types.

● Personalized SMS customization: Users can customize SMS filtering function. Users can customize the SMS sender, SMS mailbox, domain name and SMS receiving time through the SMS personalized interface. Messages that meet the filtering criteria will not be sent to users.

The following describes the specific design and implementation of SMS application platform.

1. System preparation and parameter setting

In order to realize the interconnection with SMS gateway, enterprises need to apply to mobile operators for access number, user name, password and enterprise code to access SMS gateway, and obtain MO and MT slogans. After the above preconditions are met, the enterprise can access the SMS gateway as SP. Specifically involves the following contents:

● Network connection: apply for a dedicated line or other means to connect to the SMS gateway of the mobile operator.

● System parameters: parameter settings include the IP address, user name, password, service number, MT port, MO port and other information of SMS gateway; A collection of SMS application types that require status reports; WAP service information type set; The number of retransmissions and the time interval of transmission failure; Alarm receiving address and other information.

● Operating environment: it can be realized based on Windows, such as the combination of Windows 2000 Advance Server and Microsoft SQL Server 2000.

2. Database design

There are not many requirements for the database platform. If the enterprise already has a database platform, it can continue to use it. The scheme adopts MS SQL 2000, and the SMS application platform includes four database tables, which store the messages to be sent, received messages, parameter configuration and receiving configuration information respectively. The receiving configuration table is used to record the handlers corresponding to various business codes.

3. Design and implementation of gateway service program.

SMS gateway service includes receiving and sending programs, which run in the form of services and communicate with SMS gateway (ISMG) of operators through CMPP protocol (see Figure 2). There are two main processes: one is the sender thread connected to the SMS gateway of the operator as the sender, and the other is the receiver thread connected to the SMS gateway of the operator as the receiver. The main function of the sending program is to connect the SMS gateway of the operator, monitor the sending list, parse and filter the original SMS, form a message that can be sent, and send it to the designated mobile phone user to complete the information transmission function; The receiver process connects with the SMS gateway of the operator, receives and analyzes all kinds of messages sent by the SMS center, confirms the receiving status of the mobile phone, and realizes functions such as on-demand, approval and information summary.

(1) SMS

Here we need to pay special attention to the following three points:

● The filtering of the original SMS is based on the individual's filtering settings for SMS.

● When sending long short messages, the protocol format requirements must be strictly observed. For example, a long short message must be submitted in UCS2 encoding format, and the message body content should be encoded in Unicode format, and then the high and low bytes of each Unicode character should be exchanged. There are two identification bits in the title structure, one is used to declare the total number of articles and the other is used to declare which article it is.

WAP push SMS has two parts: message prompt and URL. The encoding format is UTF-8 (Variable Byte Number Coding) format, and should be sent in strict accordance with the format requirements.

(2) receiving a thread stream

The work of SMS receiving thread includes: recording the receipt ID of ISMG; Recording the received information code returned by ISMG successfully received by the mobile phone terminal, that is, the status report; Analyze and process the content of short messages sent by users.

Work 1 is used to confirm the success of SMS Gateway (ISMG) reception. The second working state is used to confirm that the mobile phone has received the short message. In the third case, different information needs to be processed differently, that is, according to the matching between the service code of the content (here, the information in the special separator in the short message content is defined as the service code, and the service code can also be defined by the long code function) and the receiving configuration table, the corresponding processing program is called, and all the short message content except the service code is passed to the processing program, which is analyzed and processed by the programs of each module, thus ensuring that the receiving threads can be flexibly increased.

When the length of the message sent by the user does not exceed 70 Chinese characters, it can be parsed normally according to the message format; When the length of the message sent by the user exceeds 70 Chinese characters, the short message center will distribute the message content in segments, in which the first 6 bytes of the message body are the header structure of the long message. The information needs to be completely parsed by the receiving thread.

4. SMS security

The security of SMS data worries many enterprises. Because of the short message transmission path, it is one of the considerations for enterprises to worry about whether the short message will be lost in the middle, and to distinguish whether the sent short message is correct.

Using the program can completely solve the fear of loss. For the sent SMS, you can add a confirmation receipt and request the SMS center to return the mobile phone. After the SMS center sends it to the mobile phone, it will return the receipt to the SMS application platform of the enterprise after receiving the receipt from the mobile phone successfully. If the SMS application platform does not receive the confirmation within a certain period of time, it can resend it. The same is true for information sent by mobile phones to SMS application platforms, such as document processing. After receiving the information sent by the user, the SMS application platform will send the processing result to the user regardless of whether the processing is successful or not.

Application example

Enterprise SMS application platform realizes centralized sending and receiving of SMS, and can expand more applications on this basis, such as number inquiry, SMS group sending, document SMS approval and so on.

The number inquiry function realizes the inquiry of the contact telephone number of enterprise employees. Here, the query service code is defined as dh, the query program dhcx is developed, and the corresponding relationship between the service code and the program is added to the receiving configuration table. When the user inquires about Zhang San's phone number, he inputs "Zhang San" in the short message content, and the receiver inputs "enterprise access number" and sends it to the enterprise short message platform.

The SMS service calls the dhcx program to query, and the dhcx program returns the query result to the enterprise SMS platform, and the SMS service sends the result to the user, thus realizing the number query function.

The short message group sending function realizes the short message notification of enterprises, which can be used as meeting notification, business promotion and other applications. The SMS notification module only needs to send the user notification content to the enterprise SMS platform, and the SMS service will be sent uniformly.

Generally speaking, as a low-cost carrier, SMS can be used by enterprises. The above-mentioned SMS platform is only a basic application framework, and we can completely expand it to achieve more functions to meet the different business needs of enterprises and institutions.

(Author: Liaoning Mobile Communication Co., Ltd.)