Method, apparatus and device for processing number portability and storage medium
Patent Information
- Application Number
- CN202310745944.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-06-21
AI Technical Summary
[0005]本申请提供一种携号转网的处理方法、装置、设备和存储介质,用以解决现有技术中存在的用一个号码分别在多个运营商的携转表中进行归属运营商查询时查询效率低下且查询时长较高的问题
Smart Images

Figure CN116723498B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method, apparatus, device and storage medium for number portability. Background Technology
[0002] Number portability (NMP) is a service that allows mobile communication users to change their contracted telecommunications operator while keeping their phone number unchanged within the same local network. Before NMP, the initiating user's operator could quickly locate the called user's operator using the MAC address. However, with NMP, MAC addresses are exchanged between multiple operators, making it impossible to quickly determine the called user's operator using only the MAC address.
[0003] Currently, after the number portability service is launched, the method for locating the operator to which the called user's mobile number belongs is as follows: the operator stores all ported numbers separately. When a user calls a ported user, the operator corresponding to the initiating user's mobile number queries each operator's portable number database to determine the operator corresponding to the called user's mobile number, and then provides services such as calling and sending SMS.
[0004] However, using a single number to search the portability tables of multiple operators is extremely inefficient. Furthermore, as the number of portable users gradually increases, the query time consumed by this method increases significantly, further reducing the user's communication efficiency. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for number portability, in order to solve the problems of low query efficiency and long query time when using a single number to query the portability tables of multiple operators.
[0006] On the one hand, this application provides a method for number portability, which includes:
[0007] According to the operator portability table, obtain the ported number for each operator after switching networks; wherein, the operator portability table stores number portability information for multiple operators;
[0008] For each operator, the ported-in number is hashed according to the target hash function to obtain the first mapping position of each ported-in number in the porting hash table;
[0009] The first mapping position in the portability hash table is identified to indicate that the first mapping position corresponds to a ported-in number; wherein, the portability hash table is used to query the operator after each ported-in number has switched networks.
[0010] Optionally, after identifying the first mapping location, the method further includes:
[0011] The second mapping position is obtained by performing a hash operation on the mobile phone number to be queried according to the target hash function.
[0012] Based on the second mapping location and the portability hash table of each operator, the operator to which the queried mobile phone number belongs is determined.
[0013] Optionally, the target hash function contains N different sub-hash functions, where N is an integer; the step of performing a hash operation on the imported number according to the target hash function to obtain the first mapping position of each imported number in the porting hash table includes:
[0014] The carried-in number is hashed sequentially according to the N sub-hash functions to obtain N hash result values;
[0015] Based on the N hash operation results, N first mapping positions are obtained, wherein the hash operation results are the same as the sorting values of the first mapping positions in the carry-over hash table.
[0016] Optionally, identifying the first mapping position in the transfer hash table includes:
[0017] Set a first identifier at the position corresponding to the first mapping position in the transfer hash table;
[0018] A second identifier is set in the carry-over hash table at a position other than the first mapping position, and the first identifier is different from the second identifier.
[0019] Optionally, determining the operator to which the queried mobile number belongs based on the second mapping location and the portability hash table of each operator includes:
[0020] The portability hash table of each operator is queried in turn to determine whether there is a portability hash table corresponding to the target operator, and the identifier of the position corresponding to the second mapping position is the first identifier;
[0021] If so, then among the at least one target operator, determine the operator to which the queried mobile phone number belongs.
[0022] Optionally, determining the operator to which the queried mobile phone number belongs among the at least one target operator includes:
[0023] If the number of target operators is 1, then the target operator is determined to be the operator to which the mobile phone number to be queried belongs;
[0024] If there are multiple target operators, the operator portability table will be used to determine the operator to which the queried mobile number belongs.
[0025] Optionally, the method includes:
[0026] Obtain the updated operator portability table according to the preset cycle;
[0027] Based on the updated operator portability table and the current operator portability table, obtain the added and / or deleted portable numbers;
[0028] Update the portability hash table based on the added and / or deleted portability numbers.
[0029] Secondly, this application provides a number portability processing device, the device comprising:
[0030] Acquisition module: Based on the operator portability table, acquire the ported-in number for each operator after switching networks; wherein, the operator portability table stores number portability information for multiple operators;
[0031] Processing module: For each operator, perform a hash operation on the ported-in number according to the target hash function to obtain the first mapping position of each ported-in number in the porting hash table;
[0032] Identification module: Identifies the first mapping position in the portability hash table to indicate that the first mapping position corresponds to a ported-in number; wherein, the portability hash table is used to query the operator after each ported-in number has switched networks.
[0033] Optionally, the number portability processing device further includes: a determination module;
[0034] The processing module is further configured to perform a hash operation on the mobile phone number to be queried according to the target hash function to obtain the second mapping position;
[0035] The determining module is used to determine the operator to which the queried mobile phone number belongs based on the second mapping location and the portability hash table of each operator.
[0036] Optionally, the processing module is further configured to perform hash operations on the carried-in number sequentially according to the N sub-hash functions to obtain N hash operation result values;
[0037] The processing module is further configured to obtain N first mapping positions based on the N hash operation results, wherein the hash operation results are the same as the sorting values of the first mapping positions in the carry-over hash table.
[0038] Optionally, the identification module is further configured to set a first identifier at the position corresponding to the first mapping position in the transfer hash table;
[0039] The identification module is further configured to set a second identifier at a position other than the first mapping position in the transfer hash table, wherein the first identifier is different from the second identifier.
[0040] Optionally, the number portability processing device further includes: a query module and a judgment module;
[0041] The query module is used to query the portability hash table of each of the operators in turn;
[0042] The judgment module is used to determine whether there is a target operator in the portability hash table, and the identifier of the position corresponding to the second mapping position is the first identifier;
[0043] The determining module is further configured to determine, among the at least one target operator, the operator to which the mobile phone number to be queried belongs.
[0044] Optionally, the determining module is further configured to determine the target operator as the operator to which the mobile phone number to be queried belongs when the number of target operators is 1.
[0045] The query module is also used to determine the operator to which the mobile number to be queried belongs by searching according to the operator portability table when there are multiple target operators.
[0046] Optionally, the number portability processing device further includes: an update module;
[0047] The acquisition module is also used to acquire the updated operator portability table according to a preset period;
[0048] The acquisition module is also used to acquire added and / or deleted portable numbers based on the updated operator portability table and the current operator portability table;
[0049] The update module is used to update the portability hash table based on the added and / or deleted portability numbers.
[0050] Thirdly, this application provides a number portability processing device, comprising:
[0051] Memory;
[0052] processor;
[0053] The memory stores computer-executed instructions;
[0054] The processor executes computer execution instructions stored in the memory to implement the number portability processing method as described in the first aspect and various possible implementations of the first aspect.
[0055] Fourthly, this application provides a computer storage medium storing computer execution instructions thereon, which are executed by a processor to implement the number portability processing method as described in the first aspect and various possible implementations of the first aspect. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0057] Figure 1 This application outlines the process for handling number portability. Figure 1 .
[0058] Figure 2 This application outlines the process for handling number portability. Figure 2 .
[0059] Figure 3 This application outlines the process for handling number portability. Figure 3 .
[0060] Figure 4 This application outlines the process for handling number portability. Figure 4 .
[0061] Figure 5 This is a schematic diagram of the number portability hash operation provided in this application.
[0062] Figure 6 This is a schematic diagram of the number portability processing device provided in this application.
[0063] Figure 7 This is a schematic diagram of the processing equipment for number portability provided in this application.
[0064] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0066] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0067] In this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0068] First, let me explain the terms used in this application:
[0069] A hash table is a data structure that allows direct access based on a key value. Records are accessed by mapping key values to a location in the table, thus speeding up the search process. This mapping function is called a hash function, and the array storing the records is called a hash table.
[0070] Hash function: A hash function is a function that maps the key value of an element in a hash table to the storage location of the element.
[0071] Number portability (NP) is a value-added service enabled by the intelligentization of telephone networks. Users who sign up for this service can keep their original phone numbers when installing a new phone or migrating to another network.
[0072] Number portability (NMP) is a service that allows mobile communication users to change their contracted telecommunications operator while keeping their phone number unchanged within the same local network. Before NMP, the initiating user's operator could quickly locate the called user's operator using the MAC address. However, with NMP, MAC addresses are exchanged between multiple operators, making it impossible to quickly determine the called user's operator using only the MAC address.
[0073] Currently, after the number portability service is launched, to find out the new operator corresponding to a mobile number after the number portability service, it is necessary to search in the operator's number portability database. That is, to compare the number ported in each operator's number portability database in turn to see if the number to be queried has ported in information, and finally determine the operator to which the number belongs, so as to provide services such as calling and sending SMS.
[0074] However, using a single number to search the portability tables of multiple operators is extremely inefficient. As more and more users use the number portability service, the search time will also increase, resulting in a poor user experience.
[0075] The number portability processing method provided in this application obtains the ported-in number for each operator through the operator's portability table. Based on a target hash function and hash calculation, it obtains and identifies the mapping position of the ported-in number in the portability hash table of its respective home operator. When querying the home operator of a number to be queried, the mapping position of the number to be queried in the portability hash table is obtained based on the target hash function and hash calculation. By comparing and analyzing the identification information of the mapping position of the number to be queried in each operator's portability hash table, the home operator of the number to be queried is finally determined. Compared with the existing technology of sequentially querying each operator's number portability table to determine the home operator, this method is more efficient. Furthermore, this method periodically updates the operator's portability hash table, ensuring the accuracy and maintainability of the query.
[0076] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0077] Figure 1 This application provides a flowchart of a number portability processing method. Figure 1 .like Figure 1 As shown in the figure, this embodiment illustrates a method for number portability, which includes:
[0078] S101: Obtain the ported-in number for each operator according to the operator portability table; wherein, the operator portability table stores number portability information for multiple operators.
[0079] The operator portability table stores number portability information for multiple operators. This information may include, for example, basic user information, the user's mobile phone number, and the portability details associated with that number. The portability details indicate the operator the user's mobile phone number belonged to before porting and the operator it now belongs to. Based on the portability details in the operator portability table, the mobile phone number that belongs to each operator after porting can be obtained, i.e., the ported-in number.
[0080] S102: For each operator, perform a hash operation on the ported-in number according to the target hash function to obtain the first mapping position of each ported-in number in the porting hash table.
[0081] The target hash function contains N different sub-hash functions, where N can be, for example, three, meaning the target hash function can contain three different sub-hash functions. By sequentially performing hash operations on the carried-in number using the sub-hash functions of the target hash function, different mapping result values can be obtained, where each mapping result value is an integer.
[0082] By mapping the mapping result value to the position number in the transfer hash table, the first mapping position of the imported number in the transfer hash table can be obtained. In this method, the storage capacity of the transfer hash table can reach the millions. For example, if the imported number, after being processed by the three sub-hash functions in the target hash function, yields results of 1, 4, and 8, these results can be mapped to position numbers in the transfer hash table that are sequentially 1, 4, and 8. That is, the position number sequentially 1, 4, and 8 is the first mapping position of the imported number in the transfer hash table.
[0083] In such Figure 5 In the number portability hash operation mapping diagram, element 'a' represents the ported-in number belonging to the corresponding operator in the number portability hash table. K1, K2, and K3 are three different sub-hash functions contained in the target hash. Through the operation of the sub-hash functions, element 'a' can be mapped to positions 1, 4, and 8 in the number portability hash table, which are the first mapping positions of the ported-in number represented by element 'a'. After mapping all the ported-in numbers, the first mapping position of each ported-in number in its respective operator's number portability hash table can be obtained.
[0084] S103: Identify the first mapping position in the portability hash table to indicate that the first mapping position corresponds to a ported-in number; wherein, the portability hash table is used to query the operator after each ported-in number has switched networks.
[0085] Specifically, after mapping all the ported-in numbers to the porting hash table of their respective home operators and obtaining the first mapping position, the ported-in numbers can be identified by marking the first mapping position in the porting hash table of the home operator of the ported-in number to indicate that the ported-in number belongs to that operator.
[0086] The identification method could be, for example, marking the first mapping position as 1 in the transfer hash table and marking all other positions in the transfer hash table as 0. In such cases... Figure 5 In the illustrated diagram of number portability hash operation mapping, elements a, b, and c represent ported numbers belonging to the corresponding operator in the number portability hash table. In this hash table, the first mapped position number obtained by operating elements a, b, and c using the target hash function is marked as 1, while positions other than those mapped by a, b, and c are marked as 0. In subsequent steps, by analyzing the identifier information of the first mapped position in the number portability hash table, the operator to which the queried number belongs after porting can be determined.
[0087] The number portability processing method provided in this embodiment first obtains the ported-in number corresponding to each operator according to the operator portability table. Then, for each operator, the ported-in number is hashed according to the target hash function to obtain the first mapping position of each ported-in number in the portability hash table. The first mapping position is marked in the portability hash table to indicate that the first mapping position corresponds to the ported-in number.
[0088] This method saves storage resources when querying the operator to which a ported number belongs. When querying the operator to which the number to be queried belongs, it is only necessary to analyze the identification information of the location mapped by the number to be queried in the porting hash to make a judgment. Compared with the existing technology of querying the porting number database of each operator separately to determine the operator to which the number to be queried belongs, this method is more efficient and faster, and brings a good user experience to customers.
[0089] Figure 2 This is the flowchart of the number portability processing method provided in the embodiments of this application. Figure 2 This embodiment is... Figure 1 Based on the implementation examples, a detailed explanation is provided on mapping the ported-in number to the porting hash table and identifying it. For example... Figure 3 As shown in this embodiment, the method for number portability includes:
[0090] S201: Based on the operator portability table, obtain the ported-in number for each operator after the porting process.
[0091] The operator portability table stores number portability information for multiple operators. This information includes the operator to which the user's mobile number belonged before the portability process and the operator to which the mobile number belongs after the portability process. Based on the operator information of the user's mobile number after the portability process in the operator portability table, the corresponding mobile number belonging to that operator after the portability process can be obtained, i.e., the ported-in number.
[0092] S202: Perform hash operations on the carried-in number sequentially according to the N sub-hash functions contained in the target hash function to obtain N hash operation result values.
[0093] In this method, the N sub-hash functions are all different. By applying these N sub-hash functions to the ported-in number, N hash operation results can be obtained. The purpose of this method is to map the ported-in number to N different positions in the operator's porting hash table, where the hash operation result is an integer. For example, the value of N can be three, meaning that the ported-in number can be hashed sequentially using three sub-hash functions to obtain three hash operation results.
[0094] S203: Based on the N hash operation results, obtain N first mapping positions.
[0095] Specifically, after performing hash operations on the ported number sequentially using N sub-hash functions to obtain N result values, these N result values can be correlated with the position numbers in the porting hash table of the operator to which the ported number belongs, thus obtaining the first mapped position. For example, when N equals three, if the ported number yields results of 1, 4, and 8 after being processed by the three sub-hash functions, these values can be correlated with position numbers 1, 4, and 8 in the porting hash table of the operator to which the ported number belongs. These 1, 4, and 8 represent the first mapped position in this example.
[0096] S204: Set a first identifier at the position corresponding to the first mapping position in the carry-over hash table.
[0097] Specifically, after mapping all the ported-in numbers to their respective home operator's porting hash table and obtaining the first mapping position, the ported-in number belongs to that operator by identifying the first mapping position in the porting hash table of the home operator of the ported-in number. The identifier at the first mapping position is the first identifier, which can be, for example, 1. This identifier indicates that the ported-in number is mapped to that position after hashing by the target hash function.
[0098] S205: Set a second identifier in the carry-over hash table at a position other than the first mapping position.
[0099] The purpose of the second identifier is to distinguish it from the first identifier. If a position in the operator's portability hash table is identified by the second identifier, it indicates that no ported-in number is currently mapped to that position. The first identifier can be, for example, 0.
[0100] The number portability processing method provided in this embodiment obtains the ported-in number for each operator according to the operator portability table. The ported-in number is then hashed sequentially using N sub-hash functions contained in the target hash function to obtain N hash result values, which in turn yield N first mapping positions. A first identifier is set at the position corresponding to the first mapping position in the portability hash table, and a second identifier is set at all other positions.
[0101] This method uses a target hash function and hash operations to map the ported-in number to its home operator's porting hash table and identifies the mapped position. This saves storage resources when querying the home operator of a ported-in number. When querying the home operator of a number to be queried, only the identification information of the mapped position of the number to be queried in the porting hash needs to be analyzed to make a determination, making the process of querying the home operator of a number more efficient and faster, and providing customers with a better user experience.
[0102] Figure 3 This is the flowchart of the number portability processing method provided in the embodiments of this application. Figure 3 This embodiment is... Figure 1 Based on Example 1 or Example 2, the specific implementation method for querying the operator to which the number to be queried belongs will be described in detail. For example... Figure 3 As shown in this embodiment, the method for number portability includes:
[0103] S301: Perform a hash operation on the mobile phone number to be queried according to the target hash function to obtain the second mapping position.
[0104] Specifically, the target hash function is used to perform a hash operation on the queried mobile number. Since the target hash function contains N sub-hash functions, N hash operation result values are obtained. These N result values are then matched with the position numbers in the porting hash table of the operator to which the ported number belongs, to obtain the second mapping position. For example, when N equals three, if the queried mobile number is calculated using the three sub-hash functions and the result values are 1, 4, and 8, then these values can be matched with position numbers 1, 4, and 8 in the porting hash table of the operator to which the ported number belongs. These 1, 4, and 8 represent the second mapping position in this example.
[0105] S302: Query the portability hash table for each of the aforementioned operators in sequence.
[0106] Specifically, after obtaining the second mapping position of the mobile phone number to be queried in the operator's portability hash table after hashing, the portability hash table of each operator can be queried sequentially. By analyzing the identification information in the second mapping position of each operator's portability hash table, the operator to which the mobile phone number belongs can be determined.
[0107] S303: Determine if there is a target operator's corresponding portability hash table where the identifier at the second mapping location is the first identifier; if yes, execute S304; otherwise, the process ends.
[0108] Wherein, after the mobile phone number to be queried is processed by the target hash function, since the target hash function includes N sub-hash functions, N hash operation result values will be obtained. The hash operation result values are matched with the position numbers in the operator portability hash table to obtain N mapped position numbers. That is, the second mapped position corresponds to N mapped positions in the operator portability hash table.
[0109] The portability hash table of each operator is sequentially queried to see if all N mapping location numbers, i.e., the identifiers of the second mapping location numbers, are the first identifier. If all N mapping location numbers in the portability hash table of a certain operator are the first identifier, it indicates that the operator may be the owner of the number to be queried.
[0110] S304: Determine whether the number of target operators is 1; if yes, execute S305; otherwise, execute S306.
[0111] Due to potential collisions in hash mapping, different ported-in numbers may be mapped to the same position in the operator's portability hash table through the target hash function. If, in a certain operator's portability hash table, all N mapping positions mapped by the target hash function for the queried number have the first identifier, it only indicates that the operator may be the home operator of the queried number. The home operator of the queried number should be further determined by counting the number of operators whose identifiers corresponding to the second mapping position in the operator's portability hash table are the first identifier.
[0112] S305: Determine that the target operator is the operator to which the mobile phone number to be queried belongs.
[0113] If there is only one operator whose identifier at the second mapping position in the operator portability hash table is the first identifier, then that operator can be identified as the operator to which the number to be queried belongs.
[0114] S306: Determine the operator to which the mobile number to be queried belongs by searching the operator portability table.
[0115] If the operators whose identifiers at the second mapping position in the operator portability hash table are not unique, then the operator to which the queried number belongs needs to be determined based on the operator portability hash table. It is understood that the storage capacity of the operator portability hash table is on the order of millions, and the probability of different ported-in numbers being mapped to the same position in the operator portability hash table through the target hash function is extremely small. Therefore, determining the operator to which the queried number belongs can usually be completed in step S305.
[0116] The number portability processing method provided in this embodiment obtains a second mapping position by performing a hash operation on the mobile phone number to be queried according to the target hash function. The portability hash table of each operator is queried sequentially. It is determined whether there is a target operator in the portability hash table where the identifier corresponding to the second mapping position is the first identifier; then, it is immediately determined whether the number of target operators is 1; if so, the target operator is determined to be the original operator of the mobile phone number to be queried.
[0117] This method can determine the operator to which the queried number belongs by analyzing the identification information of the location mapped to the queried number in the portability hash. Compared with the existing technology of querying the portability number database of each operator, the method of determining the operator corresponding to the called queried number is more efficient and faster, bringing a good user experience to customers.
[0118] Figure 4 This is the flowchart of the number portability processing method provided in the embodiments of this application. Figure 4 This embodiment is... Figure 1 Based on Example 1 or Example 2, the method for optimizing the query of the operator to which a ported-in number belongs will be described in detail. For example... Figure 4 As shown in this embodiment, the method for number portability includes:
[0119] S401: Obtain the updated carrier portability table according to the preset cycle.
[0120] The preset period could be, for example, retrieving the updated operator portability table daily at 8:00 AM. This is understandable, as new users activate number portability services daily, while others exit or further change their mobile number's operator. Retrieving the updated operator portability table according to the preset period ensures the accuracy of the operator assigned to the queried number after it has activated number portability.
[0121] S402: Based on the updated operator portability table and the current operator portability table, obtain the added and / or deleted portable numbers.
[0122] Since new users activate number portability services daily, and some users withdraw or further change their mobile number's operator, it is necessary to obtain the daily added and / or deleted portable numbers based on the updated operator portability table and the current operator's portability table.
[0123] S403: Update the portability hash table based on the added and / or deleted portability numbers.
[0124] To improve the accuracy of querying the operator to which a number belongs and to ensure the sustainability and maintainability of the number portability processing method in this application, the number portability hash table needs to be updated daily based on the added and / or deleted number portability numbers. The update method could be, for example, mapping newly added portable numbers to the portability hash table of their respective operators using a target hash function and setting the identifier of the first mapping position in the portability hash table as a first identifier; and setting the identifier of portable numbers leaving their respective operators' services to the first mapping position in their operators' portability hash tables as a second identifier.
[0125] The number portability processing method provided in this embodiment obtains the updated operator portability table according to a preset period. Based on the updated operator portability table and the current operator portability table, it retrieves the added and / or deleted portable numbers. Based on the added and / or deleted portable numbers, it updates the portability hash table. This method improves the accuracy of ported-in number queries by periodically updating the portability hash table of each operator, thus enhancing the sustainability and maintainability of the number portability processing method.
[0126] Figure 6 A schematic diagram of the number portability processing device provided in this application. Figure 6 As shown, this application provides a number portability processing device, the number portability processing device 500 including:
[0127] Acquisition module 501: Based on the operator portability table, acquire the ported-in number for each operator after switching networks; wherein, the operator portability table stores number portability information for multiple operators;
[0128] Processing module 502: For each operator, perform a hash operation on the ported number according to the target hash function to obtain the first mapping position of each ported number in the porting hash table;
[0129] Identification module 503: Identifies the first mapping position in the portability hash table to indicate that the first mapping position corresponds to a ported-in number; wherein, the portability hash table is used to query the operator after each ported-in number has switched networks.
[0130] Optionally, the number portability processing device further includes: a determination module 504;
[0131] The processing module 502 is further configured to perform a hash operation on the mobile phone number to be queried according to the target hash function to obtain a second mapping position;
[0132] The determining module 504 is used to determine the operator to which the mobile phone number to be queried belongs based on the second mapping location and the portability hash table of each operator.
[0133] Optionally, the processing module 502 is further configured to perform hash operations on the carried-in number sequentially according to the N sub-hash functions to obtain N hash operation result values;
[0134] The processing module 502 is further configured to obtain N first mapping positions based on the N hash operation results, wherein the hash operation results are the same as the sorting values of the first mapping positions in the carry-over hash table.
[0135] Optionally, the identification module 503 is further configured to set a first identifier at the position corresponding to the first mapping position in the transfer hash table;
[0136] The identification module 503 is further configured to set a second identifier at a position other than the first mapping position in the transfer hash table, wherein the first identifier is different from the second identifier.
[0137] Optionally, the number portability processing device further includes: a query module 505 and a judgment module 506;
[0138] The query module 505 is used to query the portability hash table of each of the operators in sequence;
[0139] The judgment module 506 is used to determine whether there is a target operator's corresponding portability hash table, and the identifier of the position corresponding to the second mapping position is the first identifier;
[0140] The determining module 504 is further configured to determine, among the at least one target operator, the operator to which the mobile phone number to be queried belongs.
[0141] Optionally, the determining module 504 is further configured to determine the target operator as the operator to which the mobile phone number to be queried belongs when the number of target operators is 1.
[0142] The query module 505 is also used to determine the operator to which the mobile phone number to be queried belongs by searching according to the operator portability table when there are multiple target operators.
[0143] Optionally, the number portability processing device further includes: an update module 507;
[0144] The acquisition module 501 is also used to acquire the updated operator portability table according to a preset period.
[0145] The acquisition module 501 is also used to acquire added and / or deleted portable numbers based on the updated operator portability table and the current operator portability table;
[0146] The update module 507 is used to update the portability hash table based on the added and / or deleted portability numbers.
[0147] Figure 7 A schematic diagram of the processing equipment for number portability provided in this application. Figure 7 As shown, this application provides a number portability processing device 600, which includes: a receiver 601, a transmitter 602, a processor 603, and a memory 604.
[0148] Receiver 601 is used to receive instructions and data;
[0149] Transmitter 602 is used to send commands and data;
[0150] Memory 604 is used to store instructions executed by the computer;
[0151] The processor 603 is used to execute computer execution instructions stored in the memory 604 to implement the various steps of the number portability processing method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the number portability processing method.
[0152] Alternatively, the memory 604 can be either standalone or integrated with the processor 603.
[0153] When the memory 604 is set up independently, the electronic device also includes a bus for connecting the memory 604 and the processor 603.
[0154] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the number portability processing method performed by the aforementioned number portability processing device.
[0155] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0156] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for handling number portability, characterized in that, The method includes: According to the operator portability table, obtain the ported number for each operator after switching networks; wherein, the operator portability table stores number portability information for multiple operators; For each operator, the ported-in number is hashed according to the target hash function to obtain the first mapping position of each ported-in number in the porting hash table; The first mapping position in the portability hash table is identified to indicate that the first mapping position corresponds to a ported-in number; wherein, the portability hash table is used to query the operator after each ported-in number has switched networks; The target hash function is used to perform a hash operation on the mobile phone number to be queried to obtain the second mapping position; Based on the second mapping location and the portability hash table of each operator, determine the operator to which the queried mobile phone number belongs; The target hash function contains N different sub-hash functions, where N is an integer; the step of performing a hash operation on the imported number according to the target hash function to obtain the first mapping position of each imported number in the porting hash table includes: The carried-in number is hashed sequentially according to the N sub-hash functions to obtain N hash result values; Based on the N hash operation results, N first mapping positions are obtained, wherein the hash operation results are the same as the sorting values of the first mapping positions in the carry-over hash table.
2. The method according to claim 1, characterized in that, The step of identifying the first mapping position in the carry-over hash table includes: Set a first identifier at the position corresponding to the first mapping position in the transfer hash table; A second identifier is set in the carry-over hash table at a position other than the first mapping position, and the first identifier is different from the second identifier.
3. The method according to claim 1, characterized in that, The step of determining the operator to which the queried mobile number belongs based on the second mapping location and the portability hash table of each operator includes: The portability hash table of each operator is queried in turn to determine whether there is a portability hash table corresponding to the target operator, and the identifier of the position corresponding to the second mapping position is the first identifier; If so, then among at least one target operator, determine the operator to which the queried mobile number belongs.
4. The method according to claim 3, characterized in that, The step of determining the operator to which the queried mobile phone number belongs among at least one target operator includes: If the number of target operators is 1, then the target operator is determined to be the operator to which the mobile phone number to be queried belongs; If there are multiple target operators, the operator portability table will be used to determine the operator to which the queried mobile number belongs.
5. The method according to claim 1, characterized in that, The method includes: Obtain the updated operator portability table according to the preset cycle; Based on the updated operator portability table and the current operator portability table, obtain the added and / or deleted portable numbers; Update the portability hash table based on the added and / or deleted portability numbers.
6. A number portability processing device, characterized in that, include: The acquisition module is used to obtain the ported-in number for each operator according to the operator portability table; wherein, the operator portability table stores number portability information for multiple operators; The processing module is used to perform a hash operation on the ported-in number according to the target hash function for each operator, so as to obtain the first mapping position of each ported-in number in the porting hash table; An identification module is used to identify the first mapping position in the portability hash table to indicate that the first mapping position corresponds to a ported-in number; wherein, the portability hash table is used to query the operator after each ported-in number has switched networks; The target hash function contains N different sub-hash functions, where N is an integer; the processing module is specifically used to perform hash operations on the carried-in number sequentially according to the N sub-hash functions to obtain N hash operation result values; and to obtain N first mapping positions according to the N hash operation result values, wherein the hash operation result value is the same as the sort value of the first mapping position in the carry-over hash table; The processing module is further configured to perform a hash operation on the mobile phone number to be queried according to the target hash function to obtain a second mapping position; and determine the operator to which the mobile phone number to be queried belongs based on the second mapping position and the portability hash table of each operator.
7. A number portability processing device, characterized in that, include: Memory; processor; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the number portability processing method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the number portability processing method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method, platform and system for querying subscriber home network information
CN101977371A
Mobile phone contacts number inquiry information processing method
CN102572050A