Abstract:
A method for implementing a number portability (NP) service includes: by a local NP database, receiving a called user number from a switching device; determining an NP database storing NP data of the callee according to a preset correspondence between the called number and identifiers (IDs) of NP databases storing the NP data of the callee; and obtaining the NP data of the callee from the determined NP database and returning the obtained NP data to the switching device so that the switching device routes a call to the callee according to the returned NP data. In addition, a system for implementing an NP service is provided, including an NP database and a switching device. Two types of NP databases are also provided. With the present invention, each NP database only needs to store partial NP data, which lessens the load of each NP database in storing and updating NP data.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is a continuation of International Application No. PCT/CN2008/072169, filed on Aug. 27, 2008, which claims priority to Chinese Patent Application No. 200710148005.9, filed on Aug. 27, 2007, both of which are hereby incorporated by reference in their entireties. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention relates generally to mobile service technologies, and in particular, to a method and system for implementing an NP service, and number portability (NP) database. 
       BACKGROUND OF THE INVENTION 
       [0003]    A telephone network includes multiple telephone exchanges that are interconnected through trunk lines and signaling networks. A telephone user belongs to a specified telephone exchange, usually the exchange where the telephone user opens an account. NP means that telephone users can change their access points and even their operators, without changing their telephone numbers. As required by the times, the NP technology meets the requirement for keeping original telephone numbers when people change their addresses and working places, breaks the monopoly, and facilitates users to choose freely among different operators. NP appears first in fixed telephone networks and then in mobile telephone networks. In the countries and regions where mobile services develop fast, mobile NP develops fast. 
         [0004]    An NP service is a service in which resources are shared inside a telephone network.  FIG. 1  shows a networking diagram for implementing an NP service in the prior art. As shown in  FIG. 1 , when the access point of a user changes, a service applying and managing unit submits the NP data ((B, B′) of the user to an NP number management center. In the (B, B′), B indicates a called user number and B′ indicates the routing number of the new access point. As a data center controlled by the telephone supervision department, the NP number management center is a network-wide infrastructure and is used to check the validity of the (B, B′) and deliver the valid (B, B′) to various local service management systems. Each local service management system delivers the received (B, B′) to the connected local NP databases. Each local NP database records the NP data of each user. 
         [0005]    When user A calls user B, the access telephone exchange of user A receives the call, queries the local NP database for B′ of the new access point of user B, and routes B′ to user B. 
         [0006]    During the implementation of the present invention, the inventor discovers at least the following problems in the prior art: 
         [0007]    (1) Each local NP database needs to store the NP data of all the users on the network, which requires that each local NP database should have a large storage space. The updated NP data of any user on the telephone network needs to be synchronized to each local NP database as soon as possible, which occupies the processing resources of each local NP database. In addition, each local NP database stores the data of all the users on the network, which causes possible security problems. 
         [0008]    (2) The NP data is transmitted through the NP number management center, local service management system, and local NP database. The local service management system only supports data relay, which increases the complexity and investments. 
       SUMMARY OF THE INVENTION 
       [0009]    The embodiments of invention related to a method and system for implementing an NP service, and NP database to lessen the storage and processing load of an NP database. 
         [0010]    Embodiments of the present disclosure provide a method for implementing an NP service, including: 
         [0011]    receiving, by a local NP database, a called user number from a switching device; 
         [0012]    determining, by the local NP database, an NP database storing NP data of the callee according to a preset correspondence between the called number and identifiers (IDs) of NP databases storing the NP data of the callee; and 
         [0013]    obtaining, by the local NP database, the NP data of the callee from the determined NP database and returning the obtained NP data to the switching device so that the switching device routes a call to the callee according to the returned NP data. 
         [0014]    Embodiments of the present disclosure provide a method for implementing an NP service, including: 
         [0015]    receiving, by an NP delivery database, NP data; 
         [0016]    determining, by the NP delivery database, at least one of NP databases storing the NP data of the users according to preset correspondences between the called number and IDs of NP databases storing the NP data of users; and 
         [0017]    sending, by the NP delivery database, the NP data to the determined at least one of NP databases so that the NP databases storing the NP data may provide an NP service. 
         [0018]    Embodiments of the present disclosure provide a system for implementing an NP service which includes an NP database and a switching device, where 
         [0019]    the NP database includes an NP delivery database and a local NP database and the NP database is in communication with a switching device; 
         [0020]    the NP delivery database receives NP data selects at least one of NP databases storing the received NP data according to an user number in the NP data, and sends the received NP data to at least one of the selected NP databases; 
         [0021]    the local NP database receives a called user number from a telephone exchange, determines an NP database storing the NP data of the callee according to the received called number, obtains the NP data of the callee from the determined NP database, and sends the obtained NP data to the switching device; and 
         [0022]    the switching device receives a call from a caller, sends the called number to the local NP database where the caller resides, and routes the call to the callee according to the NP data returned from the local NP database. 
         [0023]    Embodiments of the present invention provide an NP database which includes an NP data transceiving module and an NP data storage determining module, where 
         [0024]    the NP data transceiving module is capable of communicating with an NP data storage determining module; 
         [0025]    the NP data transceiving module receives NP data, sends an user number in the received NP data to the NP data storage determining module, receives the NP database ID from the NP data storage determining module, and sends the NP data to at least one of the NP databases corresponding to the received NP database ID; and 
         [0026]    the NP data storage determining module calculates the NP database ID storing the NP data of the user according to the received user number from the NP data transceiving module and sends the calculated NP database ID to the NP data transceiving module. 
         [0027]    Embodiments of the present disclosure provide an NP database which includes an NP data querying and receiving module and an NP data storage determining module, where 
         [0028]    the NP data querying and receiving module is capable of communicating with an NP data querying module; 
         [0029]    the NP data querying and receiving module receives a called user number from a switching device, sends the received called number to the NP data storage determining module, receives an NP database ID from the NP data storage determining module, obtains the NP data corresponding to the user number from the NP database corresponding to the received NP database ID, and sends the obtained NP data to the switching device so that the switching device may route the call to the callee according to the received NP data; and 
         [0030]    the NP data storage determining module receives the called number from the NP data querying and receiving module, calculates the NP database ID storing the NP data of the callee according to the called number, and sends the calculated NP database ID to the NP data querying and receiving module. 
         [0031]    In the embodiments of the present invention, the NP data generated by a user is stored to the NP databases selected according to the called number so that each NP database needs to store only partial NP data and the load of each NP database in storing and updating NP data is lessened, which is different from the prior art. In addition, a specified algorithm is used to determine the NP database storing NP data, which improves the security of NP data. 
         [0032]    Moreover, in the embodiments of the present invention, no local service management system is required and the NP number management center may directly send NP data to NP databases. This simplifies the transmission of NP data and the network architecture for implementing the NP service. In addition, the NP data may be stored to multiple NP databases so that the reliability of the NP service is improved. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0033]    To make the technical solution under the present invention or in the prior art clearer, the accompanying drawings for illustrating the embodiments of the present invention or illustrating the prior art are outlined below. Evidently, the accompanying drawings are exemplary only, and those skilled in the art can derive other drawings from such accompanying drawings without creative work. 
           [0034]      FIG. 1  is a networking diagram for implementing an NP service in the prior art; 
           [0035]      FIG. 2  shows a process of delivering an NP service in a first embodiment of the present invention; 
           [0036]      FIG. 3  shows a process of delivering an NP service in a second embodiment of the present invention; 
           [0037]      FIG. 4  shows a process of querying an NP service in an embodiment of the present invention; 
           [0038]      FIG. 5  is a networking diagram for implementing an NP service in an embodiment of the invention; 
           [0039]      FIG. 6  shows a structure of an NP delivery database in an embodiment of the present invention; and 
           [0040]      FIG. 7  shows a structure of a local NP database in an embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0041]    The technical solution of the present invention is hereinafter described in detail with reference to the accompanying drawings. It is evident that the embodiments are exemplary only and the present invention is not limited to such embodiments. Other embodiments that those skilled in the art derive from the embodiments of the present invention without creative work also fall in the scope of protection of the present invention. 
         [0042]    The implementation of an NP service includes two processes: 
         [0043]    (1) NP service delivering process: indicates the process of delivering new routing information to the NP database on the telephone network after the access point of a telephone user changes inside the telephone network. 
         [0044]    (2) NP service querying process: indicates the process of querying the NP database to obtain the current access point of a telephone user when the telephone user is called. 
         [0045]      FIG. 2  shows a process of delivering an NP service in an embodiment of the present invention. The process includes the following steps: 
         [0046]    S 201 . Number all the NP databases from 0, such as NP database  0 , NP database  1 , . . . , NP database n−1, and select one or more NP databases as the NP delivery database(s). The NP number management center stores the IDs of the selected NP delivery databases. 
         [0047]    n is a positive integer. Optionally, the administrator may select NP delivery databases and store the IDs of the selected NP delivery databases to the NP number management center. 
         [0048]    S 202 . The service applying and managing unit determines the user who generates NP data and sends the (B, B′) of the user to the NP number management center, where B indicates a called user number and B′ indicates a current routing number. 
         [0049]    S 203 . The NP number management center checks whether the received (B, B′) is valid and sends the valid (B, B′) to the NP delivery database. 
         [0050]    To ensure the reliability of delivering NP data, more NP delivery databases may be set. In this case, the NP number management center sends the valid (B, B′) to one NP delivery database that is currently available. For example, the NP number management center first sends the valid (B, B′) to the NP delivery database with the smallest ID according to the IDs of various NP delivery databases. If the NP delivery database returns a success response, the NP number management center determines that the NP data is successfully delivered this time. Otherwise, the NP number management center continues to send the valid (B, B′) to the NP delivery database with the second smallest ID until the NP data is successfully delivered. 
         [0051]    S 204 . The NP delivery database performs operations on B according to the preset algorithm, determines the ID(s) of one or more NP databases storing the (B, B′) according to the operation result, and sends the (B, B′) to the determined NP database(s). 
         [0052]    In this step, the preset algorithm may be a function with B as the input, such as a Hash function. 
         [0053]    Optionally, the ID of the NP database to which the (B, B′) is sent may be determined as follows according to the operation result: 
         [0054]    If the operation result is a, the IDs of the NP databases to which the (B,B′) is sent are a%n, (a+p)%n, (a+2p)%n, . . . , (a+(m−1)*p)%n, where, m is a preset integer, indicating the number of NP databases to which the (B,B′) is sent; p is a preset positive integer; and % indicates a modulo operation. 
         [0055]    S 205 . The NP database stores the received (B, B′). 
         [0056]    The (B, B′) described in the embodiment shown in  FIG. 2  is classified into the following cases: 
         [0057]    Case 1: B and B′ are both E.164 numbers. 
         [0058]    Case 2: B is an E.164 number and B′ is a uniform resource locator (URL). For example, B is 07552878000 and B′ is abc@sohu.com. 
         [0059]    Case 3: B and B′ are both URLs. 
         [0060]    Case 4: B is a URL and B′ is an E.164 number. 
         [0061]    Case 5: B is a service application number of a telephone network and B′ is an E.164 number. For example, B is 8008302118 (a free telephone service number) and B′ is 075528560000. 
         [0062]    Case 6: B is a service application number of a telephone network and B′ is a URL. For example, B is 8008302118 (a free telephone service number) and B′ is service@huawei.com. 
         [0063]    In cases 1 to 4, the frequency of generating NP data by users may be high. For example, a user uses B for communications after work and uses B′ for communications at work. In this way, the user needs to report and cancel the (B, B′) once each time the user starts to work or is off duty. It is very inconvenient if the user reports the (B, B′) to the service applying and managing unit such as a business hall each time. Thus, the user may directly report the (B, B′) to the home telephone exchange to speed up the reporting. To solve this issue, a process of delivering an NP service is provided in the second embodiment of the present invention. 
         [0064]      FIG. 3  shows a process of delivering an NP service in the second embodiment of the present invention. In this embodiment, each NP database also acts as an NP delivery database. As shown in  FIG. 3 , the process includes the following steps: 
         [0065]    S 301 . A user terminal determines that NP data is generated and sends the NP data (B, B′) to its home telephone exchange. 
         [0066]    S 302 . After receiving the (B, B′), the home telephone exchange sends the (B,B′) to one connected local NP database that is currently available. 
         [0067]    S 303 . The connected local NP database performs operations on B in the received (B, B′) according to the preset algorithm, determines the ID(s) of one or more NP databases storing the (B, B′) according to the operation result, and sends the (B, B′) to the determined NP database(s). 
         [0068]    S 304 . The NP database stores the received (B, B′). 
         [0069]      FIG. 4  shows a process of querying an NP service in an embodiment of the present invention. The process includes the following steps: 
         [0070]    S 401 . User A calls user B. 
         [0071]    S 402 . The access telephone exchange of user A receives the call and sends the telephone number (hereinafter referred to as B) of user B to the connected local NP database. 
         [0072]    S 403 . The local NP database performs operations on B according to the preset algorithm to obtain the ID of the NP database storing the NP data of user B. 
         [0073]    The algorithm used by the local NP database must be the same as that used by the NP delivery database to deliver the (B, B′). 
         [0074]    S 404 . The local NP database sends B to the corresponding NP database according to the obtained NP database ID. 
         [0075]    Suppose that the same NP data is stored to multiple NP databases when the NP service is delivered. In step S 403 , the local NP database may obtain multiple NP database IDs. In step S 404 , the local NP database may first send B to the NP database with the smallest ID according to the NP database IDs. If no response is received from the NP database, the local IP database continues to send B to the NP database with the second smallest ID until the response from the NP database is received. 
         [0076]    S 405 . After receiving B, the NP database searches for the corresponding routing number B′ and returns the (B, B′) to the local NP database. 
         [0077]    S 406 . The local NP database sends the (B, B′) to the access telephone exchange of user A. 
         [0078]    S 407 . The access telephone exchange of user A routes the call to user B according to received B′. 
         [0079]      FIG. 5  shows a networking diagram for implementing an NP service in an embodiment of the present invention. The network includes a service applying and managing unit  51 , an NP number management center  52 , an NP delivery database  53 , a local NP database  54 , and a telephone exchange  55 . The NP delivery database  53  and the local NP database  54  are uniformly referred to as an NP database. 
         [0080]    The service applying and managing unit  51  is adapted to send the (B, B′) received from the user to the NP number management center  52 , where, B indicates a called user number and B′ indicates a current routing number. 
         [0081]    The NP number management center  52  is adapted to: receive the (B, B′) sent from the service applying and managing unit  51 , check whether the received (B, B′) is valid, and send the valid (B, B′) to the NP delivery database  53 . 
         [0082]    The NP delivery database  53  is adapted to: receive the (B, B′) sent from the NP number management center  52 , perform operations on B according to the preset algorithm, determine the ID(s) of one or more NP databases storing the (B, B′), and send the (B, B′) to the determined NP database(s). 
         [0083]    The local NP database  54  is adapted to: receive a query request sent from the telephone exchange  55 , obtain a called user number B from the received query request, perform operations on B according to the preset algorithm, determine the ID of an NP database storing the (B, B′) of the callee according to the operation result, send the query request to the determined NP database, and return the (B, B′) sent from the NP database to the telephone exchange  55 . 
         [0084]    In this embodiment, the NP database  54  is further adapted to: receive the (B, B′) sent from the telephone exchange  55 , perform operations on B according to the preset algorithm, determine the ID of an NP databases storing the (B, B′), and send the (B, B′) to the determined NP database. 
         [0085]    The telephone exchange  55  is adapted to: receive the call from a caller, send the called number B carried in the call to the connected local NP database  54  through a query request, and route the call to the callee according to B′ returned from the local NP database  54 . 
         [0086]    In this embodiment, the telephone exchange  55  is further adapted to: receive the (B, B′) sent from a connected user terminal and send the (B, B′) to the connected local NP database  54 . 
         [0087]    In actual applications, the NP delivery database  53  supports all the functions of the local NP database  54 ; and the local NP database  54  supports all the functions of the NP delivery database  53 . That is, NP databases may be classified into NP delivery databases and local NP databases according to functions. Optionally, NP databases may not be classified. In this case, the functions of all the NP databases are the same; that is, each NP database acts as an NP delivery database and a local NP database at the same time. 
         [0088]      FIG. 6  shows a structure of an NP delivery database in an embodiment of the present invention. The NP delivery database includes an NP data transceiving module  531  and an NP data storage determining module  532 . 
         [0089]    The NP data transceiving module  531  is adapted to: receive the (B, B′) sent from the NP number management center  52 , send B to the NP data storage determining module  532 , receive the NP database ID sent from the NP data storage determining module  532 , and send the (B, B′) to the corresponding NP database according to the received NP database ID, where, B indicates a called user number and B′ indicates a current routing number. 
         [0090]    The NP data storage determining module  532  is adapted to: calculate the ID of the NP database storing the corresponding NP data according to B sent from the NP data transceiving module  531  and send the calculated ID to the NP data transceiving module  531 . 
         [0091]    In this embodiment, the NP delivery database  53  may further include an NP data storing module  533  and an NP data querying module  534 . 
         [0092]    The NP data storing module  533  is adapted to receive and store the NP data sent from the NP data transceiving module  531  of the NP delivery database  53  or other NP databases. 
         [0093]    In addition, the NP data transceiving module  531  sends the (B, B′) sent from the NP number management center  52  to the NP data storing module  533  when detecting that the NP database ID sent from the NP data storage determining module  532  is the same as the ID of the NP delivery database  53 . 
         [0094]    The NP data querying module  534  is adapted to: receive a query request carrying B sent from other NP database, query the NP data storing module  533  for B′ corresponding to B, and send the (B, B′) to the other NP database. 
         [0095]      FIG. 7  shows a structure of a local NP database in an embodiment of the present invention. The local NP database includes an NP data querying and receiving module  542 , an NP data storage determining module  542 , an NP data storing module  543 , and an NP data querying module  544 . 
         [0096]    The NP data querying and receiving module  541  is adapted to: receive a query request carrying B sent from the telephone exchange  55 , send B to the NP data storage determining module  542 , receive the NP database ID sent from the NP data storage determining module  542 , send the query request to the corresponding NP database according to the received NP database ID to obtain the corresponding (B, B′), and send the obtained (B, B′) to the telephone exchange  55 , where, B indicates a called user number and B′ indicates a current routing number. 
         [0097]    If the ID of the local NP database is sent from the NP data storage determining module  542 , the NP data querying and receiving module  541  sends the query request carrying B to the NP data storing module  543 . 
         [0098]    The NP data storage determining module  542  is adapted to: receive B sent from the NP data querying and receiving module  541 , calculate the ID of the NP database storing the corresponding NP data according to received B, and send the calculated ID to the NP data querying and receiving module  541 . 
         [0099]    The NP data storing module  543  is adapted to receive and store the NP data sent from the NP delivery database  53  or other NP databases. 
         [0100]    The NP data querying module  544  is adapted to: receive a query request carrying B sent from other NP databases, query the NP data storing module  543  for B′ corresponding to B, and send the (B, B′) to the other NP databases. 
         [0101]    In this embodiment, the local NP database may further include an NP data transceiving module  545 . The NP data transceiving module  545  is adapted to: receive the (B, B′) sent from the telephone exchange  55 , send B in the received (B, B′) to the NP data storage determining module  542 , receive the NP database ID sent from the NP data storage determining module  542 , and send the (B, B′) to the corresponding NP database according to the received NP database ID. 
         [0102]    If the ID of the local NP database is received, the NP data transceiving module  545  sends the (B, B′) to the NP data storing module  543  of the local NP database. 
         [0103]    It should be noted that the NP delivery database shown in  FIG. 6  may have all the functions of the local NP database shown in  FIG. 7  and the local NP database shown in  FIG. 7  may also have all the functions of the NP delivery database shown in  FIG. 6 . For example, the NP data storing module  543  shown in  FIG. 7  may have all the functions of the NP data storing module  533  shown in  FIG. 6  and the NP data transceiving module  545  shown in  FIG. 7  may also have all the functions of the NP data transceiving module  531  shown in  FIG. 6 . 
         [0104]    In addition, in the embodiments of the present invention, the telephone exchange may be replaced by any switching device which supports switching functions. 
         [0105]    The following describes a specific embodiment of the present invention. 
         [0106]    Suppose that the Hash function is used to perform operations on B and that the algorithm is hash=(X+Y+Z+P+Q+R+A+B+C+D+E)%m, where, % indicates a modulo operation, and XZYPQRABCDE indicates B, and m indicates a preset integer. 
         [0107]    The following describes the processes of delivering and querying the NP service respectively. 
         [0108]    (1) The NP Service Delivering Process 
         [0109]    As shown in  FIG. 5 , suppose that the access point of user B (75528780848) is changed and that B′ at the new access point is 59487294231. 
         [0110]    The service applying and managing unit reports the new (B, B′) to the NP number management center. The NP number management center checks whether the received (B, B′) is valid and sends the valid (B, B′) to the NP database  0 . 
         [0111]    The NP database  0  calculates Hash (B) (that is, Hash(B)=(7+5+5+2+8+7+8+0+8+4+8)%30=2) and sends the (B,B′) to the NP database  2 , NP database  2 +m, NP database  2 +2m, . . . . 
         [0112]    (2) The NP Service Querying Process 
         [0113]    As shown in  FIG. 5 , user A (75526427370) calls user B (75528780848) and the access point of user A queries the connected NP database q for the NP data of user B. 
         [0114]    The NP database q calculates Hash (B) (that is, Hash (B=2)). Then the NP database q sends a request for querying the NP data of user B to one of the NP database  2 , NP database  2 +m, NP database  2 +2m, . . . , and returns the obtained (B, B′) to the access point of user A. After receiving the (B, B′), the access point of user A originates a call to B′ to find user B. 
         [0115]    Through the preceding description of embodiments of the present invention, those skilled in the art may understand that embodiments of the present invention may be implemented by hardware or by software in combination with a necessary hardware platform. Thus, the technical solution of the present invention may be made into software. The software may be stored in a non-volatile storage medium such as a compact disc-read only memory (CD-ROM), a USB disk, or a mobile hard disk, and include several instructions that instruct a computer device such as a personal computer (PC), a server, or a network device to perform the methods provided in each embodiment of the present invention. 
         [0116]    Although specific embodiments of the present invention have been described, it will be understood by those skill in the art that there are other embodiments that are equivalent to the described embodiments. Accordingly, it is to be understood that the invention is not to be limited by the specific illustrated embodiments, but only by the scope of the appended claims.