Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and an apparatus for implementing number portability in a short message system, which do not need to build NPDB related devices, and are simple and convenient to implement.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for realizing number portability in a short message system, which comprises the following steps:
the NPDB is built in the SMSC and comprises the following steps: creating an independent NPDB physical library in an SMSC, and simultaneously dividing a part of area in a memory library in the SMSC to create an NPDB memory library;
after receiving the short message, the short message center SMSC queries the NPDB of its own built-in number portability database for the routing number RN information of the called subscriber, which includes: SMSC sends a query request for the information of the current called user RN to the built-in NPDB through internal information, wherein the query request at least comprises the user number of the called user; the built-in NPDB searches corresponding RN information according to the user number, packages the inquired RN information in an inquiry result and feeds back the inquired RN information to the SMSC through internal information; the RN information comprises: RN of number carry-out network and RN of number carry-in network;
the SMSC judges whether the RN information points to the local network where the SMSC is located according to the inquired RN information: judging whether the RN of the number carrying-in network points to a local network, if so, the SMSC carries out short message final calling; otherwise, the SMSC sends the short message to a network pointed by the RN information according to the acquired RN information, and finally calls the short message.
Wherein, the network to which the short message is sent to the RN information is: and sending the short message to a network pointed by the RN of the number portability network.
After the SMSC queries the built-in NPDB of itself for the RN information of the called subscriber, the method further includes: judging whether the query is successful, if so, judging whether the RN information points to a local network; and if the query fails, matching the number corresponding to the called user in the preset number section and RN of the carry-in network in the corresponding table of RNs according to the number section to which the user number of the called user belongs.
The method further comprises the following steps: synchronizing the data in the built-in NPDB, specifically: the data stored in the global NPDB in the whole network is synchronized to the built-in NPDB regularly; alternatively, the built-in NPDB is periodically synchronized with built-in NPDBs of other networks.
Wherein, when synchronizing the built-in NPDB, the method further comprises: and adding, deleting, modifying and/or updating the data of the built-in NPDB.
The invention also provides a device for realizing number portability in a short message system, wherein the NPDB is internally arranged in the SMSC, and the device comprises: creating an independent NPDB physical library in an SMSC, and simultaneously dividing a part of area in a memory library in the SMSC to create an NPDB memory library; the device includes: the NPDB, the NPDB management module, the service processor and the front-end processor are arranged in the network; wherein,
the built-in NPDB comprises: the NPDB physical library and the NPDB memory library are used for respectively storing RN information of the user; the RN information comprises: RN of number carry-out network and RN of number carry-in network;
the NPDB management module includes: the NPDB physical library management module and the NPDB internal memory library management module are configured to query the RN information in the built-in NPDB, and include: the service processor sends a message for inquiring the RN information of the called user to the NPDB memory bank management module; the NPDB memory bank management module inquires the RN information from the NPDB memory bank and returns the inquired RN information to the service processor; and feeding back the inquired RN information to the service processor;
the service processor is configured to determine whether the RN information points to a local network according to the queried RN information: judging whether the RN of the number carried-in network points to a local network or not to obtain a judgment result;
the front-end processor is used for carrying out short message final calling when the RN information points to a local network according to the judgment result; and when the RN information does not point to the local network, sending a short message to the network pointed by the RN information.
The service processor is further configured to send a message for querying information of a called user RN to the NPDB management module;
correspondingly, the NPDB management module is further configured to receive the message for querying the RN information of the called subscriber, and query the RN information according to the message for querying the RN information of the called subscriber.
The service processor is further configured to, when the RN information returned by the NPDB management module is not received, match the RN information corresponding to the called user in a preset number segment and RN correspondence table according to the number segment to which the user number of the called user belongs;
correspondingly, the device further comprises: and the configuration table is used for presetting a corresponding table of the number segment and the RN and synchronizing the corresponding table to the service processor.
The configuration table is further used for controlling the NPDB management module to add, delete, modify and/or update the data of the built-in NPDB.
The configuration table controls the NPDB physical library management module to add, and/or delete, and/or modify, and/or update the NPDB physical library;
correspondingly, the NPDB physical library management module controls the NPDB bank management module to add, delete, modify, and/or update the NPDB bank.
The method and device for realizing number portability in short message system provided by the invention sets NPDB in local network by establishing NPDB physical library and/or internal memory library, preferably NPDB is arranged in SMSC, thus, the process of inquiring NPDB is arranged in SMSC to realize, SMSC can directly inquire built-in NPDB to obtain required data without going out for inquiry when inquiring RN information; meanwhile, the NPDB is inquired internally without being influenced by network factors, so that the efficiency of inquiring and processing data is improved.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
The NPDB is arranged in the local network, preferably the NPDB is arranged in the SMSC, an independent NPDB physical library can be established in the SMSC, and a part of area can be divided from the memory library in the SMSC to establish the NPDB memory library, so that the NPDB is arranged in the SMSC, and the implementation is simpler. In the application process, the SMSC can inquire the required information in the NPDB physical library through a database writing/reading (DBI/O) interface for accessing the NPDB physical library in the local network; or the NPDB physical library is synchronized into the NPDB memory library, and the SMSC can inquire the required information from the NPDB memory library directly through an internal message interface.
The method for implementing number portability in a short message system, as shown in fig. 1, includes:
step 101, after receiving the short message, the SMSC queries the RN corresponding to the current subscription network of the called subscriber from its own built-in NPDB.
The NPDB is mainly used to store NP information of a user, the NP information at least including: a subscriber number, an RN for which the number is ported out of the network, and an RN for which the number is ported into the network. The number carrying-out network is a network to which the user belongs before number carrying; the number portability network is a network to which the user belongs after the number portability occurs, namely a currently signed network.
After receiving a short message, the SMSC first needs to query the RN information of the called subscriber corresponding to the short message, including the RN of the number portability network and the RN of the number portability network. It should be noted that, for the forwarding of the short message, the present invention only concerns the current subscription network of the called user, and the SMSC of the current subscription network performs the final call for the short message. Therefore, after acquiring the RN information of the called user, the SMSC only concerns the RN of the number portability network.
Specifically, the SMSC sends a query request for the information of the current called user RN to the NPDB through an internal message, such as an NPQry _ Req message, where the message at least includes the user number of the called user; the NPDB searches corresponding RN information according to the user number, packages the RN information in a query result and feeds back the RN information to the SMSC through internal information, such as NPQry _ Ack information.
Step 102, judging whether the query is successful, if so, executing step 103; if not, step 106 is performed.
Preferably, a field may be set in the query result to indicate whether the query was successful, and the SMSC determines whether the query was successful by reading the value of the field. Certainly, there may be other ways to determine, for example, the SMSC is set to receive the RN information as a success query; otherwise, the query fails.
If the query is successful, the SMSC is indicated to acquire the RN information of the called user, and the called user is indicated to be a number-carrying user; if the query fails, the SMSC cannot acquire the RN information of the called subscriber, that is, the built-in NPDB does not store the RN information of the subscriber, which indicates that the called subscriber is not a number portability subscriber.
103-104, judging whether the acquired RN points to a local network, if so, executing step 104, carrying out final calling by an SMSC (short message service center), and finishing the current processing flow; if not, step 105 is performed.
Preferably, the SMSC is internally configured with a table of RN to network correspondence, which can be loaded in the memory base, one RN for each network. In general, a network includes an HLR, and RN and HLR are in one-to-one correspondence. However, some networks may have multiple HLRs, where the multiple HLRs correspond to an RN and each HLR corresponds to a pre-set number segment. If the SMSC does not acquire the RN information corresponding to the called user from the NPDB for some reason, the HLR can be matched with the number segment to which the user number of the called user belongs, so that the corresponding RN information is matched. Specifically, the case where the SMSC does not acquire RN information corresponding to the called subscriber from the NPDB for some reason will be described in the following steps.
After acquiring the RN information of the called user, the SMSC judges whether the RN points to the local network or not through the RN of the number-carried network, namely judges whether the current signed network of the called user is the local network or not. Specifically, whether the current RN corresponds to the local network or not can be obtained by querying the corresponding table of the RN and the network, that is, whether the RN points to the local network or not. If the RN is judged to point to the local network, the current signed network of the called user is the local network, step 104 is executed, and the SMSC carries out final calling aiming at the current short message; otherwise step 105 is performed.
The specific process of the final call is as follows: SMSC obtains the route of terminal call to local HLR; and after obtaining the response of the local HLR on the route, the SMSC carries out final calling. The specific implementation of this process is the prior art, and is not described herein again.
And 105, the SMSC sends the short message to a corresponding network according to the acquired RN, and the current processing flow is finished.
According to the judgment of step 103 as to whether the RN points to the local network, if the RN of the number-carrying network does not point to the local network, which indicates that the current subscription network of the called subscriber is not the local network, the network to which the RN points needs to be found according to the correspondence table between the RN and the network, and the current short message is sent to the network to which the RN points after protocol conversion, and the network finally calls the current short message. Since the network is the network pointed by the RN of the number-carrying network, the network is the network currently subscribed by the called user, and the SMSC of the network can terminate the short message. The specific implementation of the protocol conversion for the short message is the prior art, and is not described herein again.
And step 106, matching the RN of the current signed network of the called user according to the number segment to which the user number of the called user belongs.
If the operation of the SMSC for inquiring the RN information of the called subscriber fails, the RN needs to be matched according to the number segment to which the subscriber number of the called subscriber belongs, and the matched RN is the RN corresponding to the current subscription network of the called subscriber.
Here, the reasons for causing the SMSC to fail to query the RN information of the called subscriber mainly include the following two reasons:
1. the called subscriber does not carry the number, the built-in NPDB does not store the corresponding RN information, and if the RN of the number carrying-out network and the RN of the number carrying-in network are carried out, the SMSC does not acquire the RN information of the called subscriber.
2. The user carries out number portability, but the built-in NPDB has errors, and the RN information of the user cannot be returned to the SMSC.
Of course, there may be other reasons for the SMSC to fail to query the RN information of the called subscriber, which are not listed here. As long as the SMSC does not acquire the RN information of the current called subscriber, the SMSC needs to match the RN according to the number segment to which the subscriber number of the current called subscriber belongs. Specifically, according to the relationship between the RN and the network, the HLR in the network, and the number segment in the network in step 103, the RN matched with the current subscriber number may be queried by querying a pre-configured correspondence table between the number segment and the RN. Preferably, the correspondence table between the number segment and the RN can be loaded in a memory library.
It should be noted that, in the prior art, based on the external NPDB, the RN obtained by matching the RN of the currently called subscriber subscription network with the number segment may be wrong. Assuming that RN corresponding to network a is a, HLR of network a is pre-allocated with a specific number segment N, that is, the HLR manages all subscribers belonging to the number segment N, and then the home network, that is, the subscription network of these subscribers is network a. When the user a belonging to the number segment N carries out number portability and the subscription network of the user a is changed to the network B, the NPDB needs to record NP information of the user a, which at least includes the user number of the user a and the RN of the number portability network: a and RN of number portability network: B. if the SMSC obtains the RN information of the user a from the external NPDB at this time, due to common problems such as busy network or bottleneck of network processing capability, the SMSC may not obtain the RN information of the user a from the external NPDB, the SMSC needs to obtain the RN information of the user a by querying a corresponding table of the number segment and the RN: and the user a belongs to the number segment N, the RN corresponding to the number segment N is A, and the SMSC obtains that the current signed network of the user a is the network A. Because the current subscribed network of the user a is the network B, if the SMSC sends the short message to the network a, the network a cannot forward the short message to the user a, so as to provide the service for the user a.
However, based on the built-in NPDB, the SMSC does not need to go out to inquire the RN information, and is not affected by common network factors. In the invention, because the process and implementation of the SMSC for inquiring the RN information are carried out in the SMSC, the possibility of failure of inquiring the RN information is very small, and the possibility of error when the SMSC sends the short message according to the RN is also very small. This step is set by the present invention for the case where the SMSC fails to acquire the RN due to an accident.
In addition, for the condition that the number portability does not occur to the user, when the RN is matched through the number segment, the error condition can not occur, because the relationship between the number segment to which the user belongs and the HLR can not be changed, and the relationship between the HLR and the network can not be changed, the correct RN can be matched through the number segment to which the user number belongs.
After acquiring the RN, the SMSC returns to execute step 103.
Generally, the SMSC only needs to query the built-in NPDB once for each short message, but when an operator operates multiple networks simultaneously to support inter-network liberty service function, a user can switch between different networks at will, and each switching can be understood as one number portability. Therefore, before each terminal call, the SMSC needs to query the NPDB for the RN information of the called subscriber to determine whether the called subscriber has carried the number and the network to which the number is carried.
In addition, the invention can also count the related parameters of NPDB inquiry through the short message center, thereby reflecting the condition that the user uses number portability for the reference of operators. The statistical parameters include the number of times of querying the RN, the number of times of receiving a query result, the number of times of successful querying, and the like.
In order to facilitate the charging of the short message user by the prepaid platform, the invention also provides related implementation of charging, which specifically comprises the following steps: generally, the SMSC needs to send the calling number to the prepaid platform through a prepaid deduction request message to calculate the rate of the calling subscriber using the related service. Specifically, the prepaid platform also needs to calculate the rate according to the subscription network of the calling subscriber. However, in practical applications, some prepaid platforms do not support NP query function, if SMSC does not add RN information in the prepaid fee deduction request message, the prepaid platform cannot know the subscription network of the calling subscriber, and thus cannot calculate the rate, under this condition, SMSC needs to add RN information in the prepaid fee deduction request message to allow the prepaid platform to calculate the rate; and some prepaid platforms support NP inquiry function, the prepaid platform can find out the correspondent contracted network to calculate the charge rate directly according to the calling number.
The SMSC also needs to add RN information in the call ticket of the calling subscriber to be used for charging the number portability subscriber and the non-number portability subscriber differently. For example, the user who carries the RN information in the traffic list may be set as a number portability user, otherwise, the user is set as a non-number portability user. In addition, the traffic list sorting system can also set whether to sort the RN information in the traffic list according to the requirement.
In order to ensure the validity and integrity of the built-in NPDB data, the built-in NPDB needs to be synchronized periodically, specifically: if a uniform global NPDB exists in the whole network and is mainly used for storing NP information of all users in the whole network, periodically synchronizing data stored in the global NPDB into a built-in NPDB, and transmitting data files through an FTP interface in a text interface processing mode; if the whole network does not have a global NPDB, the data file synchronization method periodically synchronizes with the built-in NPDBs of other networks, so that the built-in NPDBs of all the networks can share the stored data with each other, and the synchronization condition can also adopt a text interface processing mode to transmit the data file through an FTP interface.
Synchronizing the built-in NPDB includes: and adding, deleting, modifying and/or updating the data stored by the NPDB.
The networking method of the present invention will be specifically described based on the above-described implementation of data synchronization with the built-in NPDB.
Fig. 2 is a schematic diagram of a networking embodiment of the present invention. The global NPDB is mainly used for storing NP information of network-wide users, and operations of adding, deleting, modifying and updating the NP information are managed by a third party. Other network NPDBs, including both built-in NPDBs and external NPDBs, require periodic data synchronization from the global NPDB.
As shown in fig. 2, if network 1 does not have NPDB, its SMSC1 can only query from global NPDB when it needs to query RN information; network 2 has an external NPDB from which SMSC2 needs to query for RN information. Both of the two query modes require the SMSC to perform outbound query, so that the SMSC is easily influenced by network factors, and the failure rate of the query is high.
The network 3 to the network n in fig. 2 adopt the way of the built-in NPDB of the present invention. The built-in NPDB periodically performs data synchronization from the global NPDB, and keeps the validity and the integrity of user information. Preferably, an FTP interface is adopted between the built-in NPDB and the global NPDB, and when NP information in the global NPDB changes, the global NPDB writes the changed NP information into a database file; the built-in NPDB downloads the database file at regular time through the FTP interface and updates the NP information of the built-in NPDB. When SMSC3 or SMSCn queries RN information, the RN information can be directly queried in the corresponding built-in NPDB without being queried out, so that the RN information is not influenced by network factors, and the probability of query errors is greatly reduced.
Fig. 3 is a schematic diagram of a networking mode embodiment two of the present invention. In this networking method, a global NPDB does not exist, and the NPDBs built in the respective networks share stored NP information. Preferably, the built-in NPDB in each network synchronizes NP information by constituting an FTP file sequential transmission loop. When data stored in one built-in NPDB changes, if RN information changes, an SMSC corresponding to the built-in NPDB writes the changed NPDB into a database file, then sends the database file to a next-level SMSC according to configuration information, the SMSC updates the built-in NPDB of the SMSC according to the database file, and simultaneously sends the database file to the next-level SMSC according to the configuration data until the built-in NPDB in each network of the whole network is updated.
For example: when the RN information in the built-in NPDB1 of the SMSC1 is changed, the SMSC1 writes the changed RN information into the corresponding database file 1, and transmits the database file 1 to its next-level SMSC2 in an FTP manner. Note that database file 1 stores the number of the SMSC that generated the database file, such as SMSC 1. And the current SMSC can obtain the number of the next-level SMSC according to the configuration data of the database file.
The SMSC2 detects the FTP directory at regular time, and updates the changed RN information to the built-in NPDB2 of the SMSC according to the detected database file 1; the SMSC2 can know that the receiver of the database file 1 is the SMSC3 through the configuration data, so the SMSC2 sends the database file 1 to its next-level SMSC3 through the FTP method; and the SMSC in the file name of database file 1 is still SMSC 1.
Subsequent SMSC operations are the same as SMSC2 up to SMSCn. The SMSCn detects the FTP directory at regular time, and updates the changed RN information to the built-in NPDBn of the SMSCn according to the detected database file 1; meanwhile, SMSCn can know that the receiver of database file 1 is SMSC1 through the configuration data, and the file name of database file 1 contains the serial number of SMSC1, so SMSCn does not perform FTP transmission on database file 1. In this way, the built-in NPDBs of the respective networks in the entire network complete the synchronization of the RN information for the change.
In order to implement the method for implementing the number portability in the short message system, the present invention further provides an apparatus for implementing the number portability in the short message system, the apparatus is applied in an SMSC, as shown in fig. 4, the SMSC40 in the present invention includes: built-in NPDB41, NPDB management module 42, service handler 43, and front-end processor 44, wherein,
the built-in NPDB41 is used for storing RN information of a user;
the NPDB management module 42 is used for inquiring RN information from the built-in NPDB 41; and feeds back the queried RN information to the service processor 43;
a service processor 43, configured to determine whether the RN information points to the local network according to the queried RN information, and obtain a determination result;
a front-end processor 44, configured to perform short message terminating call when the RN information points to the local network according to the determination result; and when the RN information does not point to the local network, sending the short message to the network to which the RN information points.
The service processor 43 is further configured to send a message for querying information of the called user RN to the NPDB management module 42;
correspondingly, the NPDB management module 42 is further configured to receive a message for querying the RN information of the called subscriber, and query the RN information according to the message.
In addition, the service processor 43 is further configured to, when the RN information returned by the NPDB management module 42 is not received, match the RN information corresponding to the called user in the preset number segment and RN correspondence table according to the number segment to which the user number of the called user belongs;
accordingly, SMSC40 further includes: and the configuration table 45 is used for presetting a corresponding table of the number segments and the RNs, and synchronizing the corresponding table to the service processor 43 for the service processor 43 to use. Wherein the configuration station 45 may synchronize the correspondence table to the service handler 43 through the FTP interface.
The configuration table 45 is also used for controlling the NPDB management module 42 to add, delete, modify, and/or update data of the built-in NPDB 41.
Additionally, the built-in NPDB41 of the present invention may include: NPDB physical store 411 and NPDB bank 412 for storing RN information of the subscriber, respectively. The NPDB physical library 411 may be created inside the SMSC by using existing database development software; NPDB bank 412 may be created by partitioning a portion of the area within the SMSC internal bank. It should be noted that the NPDB management module 42 may directly query the RN information from the NPDB physical library 411 or directly query the RN information from the NPDB memory library 412, but the speed of reading the information through the memory is greatly improved compared with the speed of directly accessing the physical library.
Accordingly, the NPDB management module 42 includes: NPDB physical library management module 421 and NPDB bank management module 422. The NPDB physical library management module 421 may adopt a DBI/O module; the NPDB bank management module 422 may employ a common database load query module (GDB, global date Base).
In addition, the user may also query, and/or add, and/or delete, and/or modify, and/or update the data stored by the built-in NPDB41 through the configuration table 45: when querying data through the configuration table 45, the configuration table 45 sends a message to notify the NPDB physical library management module 421 to read out and feed back the required data from the NPDB physical library 411, and displays the data on the configuration table 45; when data stored by the built-in NPDB41 is added, and/or deleted, and/or modified, and/or updated, the configuration stage 45 may control the NPDB physical library management module 421 to perform operations such as adding, and/or deleting, and/or modifying, and/or updating on the NPDB physical library 411; meanwhile, the NPDB physical library management module 421 controls the NPDB bank management module 422 to add, delete, modify, and/or update the NPDB bank 412. A message interface is arranged between the configuration platform 45 and the NPDB physical library management module 421, and a browser/server (B/S) architecture or a client/server (C/S) architecture can be adopted; a database interface is arranged between the NPDB physical library management module 421 and the NPDB physical library 411; a message interface is formed between the NPDB physical library management module 421 and the NPDB bank management module 422, and a message interface is formed between the NPDB bank management module 422 and the NPDB bank 412.
When the RN information is queried, the service processor 43 sends a message for querying the RN information of the called subscriber to the NPDB memory base management module 422; the NPDB memory bank management module 422 queries the NPDB memory bank 412 for RN information, and returns the queried RN information to the service processor 43. The manner of the NPDB bank 412 based on the present invention is more efficient when performing operations such as querying, and/or adding, and/or deleting, and/or modifying, and/or updating.
It should be noted that the NPDB bank 412 is normally present as long as the device is not powered down. In order to prevent the abnormal power failure of the equipment, the device of the invention is protected as follows:
when the NPDB bank management module 422 is started, and it is found that the NPDB bank 412 is not established, the NPDB bank management module 422 reads data from the NPDB physical bank 411 through the database interface, and loads the data into the NPDB bank 412.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.