Virtual number attribution number selection method and device, equipment and storage medium
By constructing a area code mapping set of caller and called numbers, priority matching of the home information of the called number to select the outgoing number, the problem of low connectivity rate in traditional VOIP communication is solved, and line utilization and user experience are improved.
Patent Information
- Application Number
- CN202510226490.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-20
AI Technical Summary
In traditional VOIP communication, the virtual number acquisition strategy ignores the home location of the called number, resulting in low call access rate and difficult to improve line utilization.
By obtaining the information of the calling number and the called number, a calling area code mapping set and a called area code mapping set are constructed, and the called area code or provincial capital area code are preferred to select a suitable exit number to improve the connectivity rate.
It improves the connection rate and line utilization rate of VOIP calls to meet the service needs of users to "choose wherever they call".
Smart Images

Figure CN120186263A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of virtual number communication, and particularly to a method, device, equipment and storage medium for selecting a virtual number's area of origin. Background Art
[0002] Currently, in VOIP communication, a virtual number associated with a number pool is generally used to select the outgoing line number to maximize the utilization of number resources. The traditional number selection strategy gives priority to the balanced strategy of number usage, but this strategy ignores the influence of the called number's area of origin. Since the called number of a call may not be in the area of origin of the outgoing number, this number is easily intercepted or rejected by the operator, resulting in a low effective connection rate of voice calls and difficult improvement of line utilization rate.
[0003] This situation not only affects the call quality of users but also reduces the line utilization efficiency of the operator. For some user groups widely distributed in different regions, the traditional balanced number selection strategy cannot effectively improve the connection rate. An efficient number outgoing strategy needs to be able to quickly match the area of origin of the called number and select a suitable outgoing number to improve the call success rate.
[0004] Therefore, there is an urgent need for a VOIP line number allocation technology that can quickly locate the area of origin of the called number during a call and select a suitable outgoing number according to the area of origin of the called number, so as to improve the number connection rate, effectively improve the line utilization rate and service quality, and meet the business requirements of "selecting the appropriate number according to the destination" of users. Summary of the Invention
[0005] To overcome the deficiencies of the prior art, this application provides a method, device, equipment and storage medium for selecting a virtual number's area of origin, which can quickly locate the area of origin of the called number during a call and select a suitable outgoing number according to the area of origin of the called number, so as to improve the number connection rate, effectively improve the line utilization rate and service quality, and meet the business requirements of "selecting the appropriate number according to the destination" of users.
[0006] The technical solution adopted by this application to solve its technical problems is as follows: In a first aspect, this application provides a method for selecting a virtual number's area of origin, the method comprising: Obtain a plurality of calling numbers and the called number in the call information, determine a set of calling area code mappings according to each of the calling numbers, and determine the called area code corresponding to the called number; the set of calling area code mappings includes a plurality of calling area codes, and one of the calling area codes corresponds to one area of origin; Judge whether there is a key corresponding to the called area code in the set of calling area code mappings, if so, extract the number of the corresponding calling area code for outgoing; otherwise, obtain the provincial capital area code corresponding to the called area code; Determine whether there is a key of the provincial capital area code in the called area code mapping set. If so, extract the number of the corresponding calling area code and route it out; Otherwise, obtain the associated area code mapping set of the called area code, and determine the intersection area code based on the calling area code mapping set and the associated area code mapping set; the associated area code mapping set is the set of all cities and their corresponding area codes in the province corresponding to the called area code; Determine whether there is a key of the intersection area code in the calling area code mapping set. If so, extract the number of the corresponding calling area code and route it out.
[0007] Optionally, the step of determining the calling area code mapping set according to the calling number includes: Parse out the calling number type of each calling number, and extract the calling area code for each calling number using the extraction scheme corresponding to the calling number type to obtain a plurality of calling area codes; Construct the calling area code mapping set based on each calling number and the calling area code corresponding to the calling number.
[0008] Optionally, the step of determining the called area code corresponding to the called number includes: Parse out the called number type of the called number; Extract the called area code from the called number according to the called number type.
[0009] Optionally, the step of obtaining the provincial capital area code corresponding to the called area code includes: Obtain the location to which the called area code belongs; Determine the province of the called area corresponding to the called area code according to the location to which the called area code belongs, and obtain the corresponding provincial capital area code according to the province of the called area.
[0010] Optionally, the step of obtaining the associated area code mapping set of the called area code includes: Obtain all city names corresponding to the province of the called area; Determine the city area code corresponding to each city name, and record the city name and its corresponding area code as the associated area code mapping set.
[0011] Optionally, the step of determining the intersection area code based on the calling area code mapping set and the associated area code mapping set includes: Traverse all area codes in the associated area code mapping set to filter out the intersection between the calling area code mapping set and the associated area code mapping set; The intersection between the calling area code mapping set and the associated area code mapping set is recorded as the intersection area code.
[0012] Optionally, the step of determining whether the key of the intersection area code exists in the calling area code mapping set further includes: If the key of the intersection area code does not exist in the calling area code mapping set, it is determined that the number selection fails, and a corresponding error prompt message is sent.
[0013] In a second aspect, the present application provides a device for selecting a location of a virtual number, including: A call information extraction module, used to obtain multiple caller numbers and called numbers in the call information, determine a calling area code mapping set according to each of the calling numbers, and determine a called area code corresponding to the called number; the calling area code mapping set includes multiple calling area codes, and one calling area code corresponds to one home location; The first level number selection module is used to determine whether there is a key corresponding to the called area code in the calling area code mapping set, and if so, extract the number corresponding to the calling area code to exit; A provincial capital area code acquisition module, used for otherwise acquiring the provincial capital area code corresponding to the called area code; The second level number selection module is used to determine whether there is a key of the provincial capital area code in the called area code mapping set, and if so, extract the number of the corresponding calling area code to exit; An intersection area code acquisition module is used to otherwise acquire the associated area code mapping set of the called area code, and determine the intersection area code based on the calling area code mapping set and the associated area code mapping set; the associated area code mapping set is a set of all cities and their corresponding area codes in the province corresponding to the called area code; The third level number selection module is used to determine whether there is a key of the intersection area code in the calling area code mapping set, and if so, extract the number of the corresponding calling area code to exit.
[0014] In a third aspect, the present application provides an electronic device, including: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.
[0015] Fourthly, the present application provides a computer-readable storage medium storing a program or instructions, which, when run, implement the method according to any one of claims 1 to 7.
[0016] The beneficial effects of the present application are as follows: By combining the calling number information and the called number's area code information, a more efficient virtual number outgoing strategy is achieved. When receiving a call message, the system first obtains the calling area code mapping set according to the calling number and determines the area code information of the called number. Then, the system first judges whether there is a key corresponding to the called area code in the calling area code mapping set. If so, it directly selects the number with the calling area code for outgoing. If not, the system attempts to match with the provincial capital area code corresponding to the called number and still preferentially selects the number corresponding to the called area code for outgoing. If both of the above attempts fail, the system obtains the city and area code information associated with the called area code, takes the intersection with the calling area code mapping set to find the common area code, and then selects the number corresponding to this area code for outgoing. This method effectively improves the connection rate and line utilization rate of VOIP calls, and can meet the user's service requirement of "selecting the desired number for the desired destination" as much as possible under the condition of limited number resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic flowchart of the method for selecting a virtual number's area of jurisdiction according to an embodiment of the present application; Figure 2 is a schematic virtual structure diagram of the device for selecting a virtual number's area of jurisdiction provided by the present application; Figure 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] The present application will be further described below with reference to the drawings and embodiments.
[0019] The concept, specific structure and technical effects generated by the present application will be clearly and completely described below in conjunction with the embodiments and the drawings to fully understand the purpose, features and effects of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, other embodiments obtained by those skilled in the art without creative efforts shall fall within the scope of protection of the present application. In addition, all the connection / connection relationships involved in the patent do not simply refer to the direct connection of components, but refer to the more optimal connection structure that can be formed according to the specific implementation situation by adding or reducing connection accessories. Each technical feature in the present invention can be combined interactively without conflicting with each other.
[0020] Refer to Figure 1 , Figure 1: This is a flow chart of a method for selecting a location of a virtual number provided in an embodiment of the present application, which specifically includes the following steps, which are described in detail below: In step S1, a plurality of calling numbers and called numbers in call information are obtained, a calling area code mapping set is determined according to each of the calling numbers, and a called area code corresponding to the called number is determined.
[0021] The calling area code mapping set includes multiple calling area codes, and one calling area code corresponds to one home location.
[0022] Specifically, all existing relevant calling numbers are extracted, where the calling numbers can be recorded in the calling number database. Then, based on the first preset digits of each calling number, the area code to which each calling number belongs is determined. If the calling numbers are 010XXXXXXXX, 021XXXXXXXX and 0755XXXXXXXX, respectively, where the area code of Beijing is 010, the area code of Shanghai is 021, and the area code of Shenzhen is 0755, then it can be determined that the corresponding place of number 1: 010XXXXXXXX is Beijing, the corresponding place of number 2: 021XXXXXXXX is Shanghai, and the corresponding place of number 3: 0755XXXXXXXX is Shenzhen. Then, the area code corresponding to each number of number 1, number 2 and number 3 is stored according to their corresponding relationship in a mapping table (MAP) with area code as key and number as value, so as to obtain a calling area code mapping set.
[0023] More specifically, since there are two situations for different calling numbers, namely fixed telephones and mobile phones, the corresponding area code values are also different. Considering this situation, the embodiment of the present application proposes that the step of determining the calling area code mapping set according to the calling number includes: Parsing the calling number type of each calling number, and extracting the calling area code of each calling number using an extraction scheme corresponding to the calling number type to obtain a plurality of calling area codes; The calling area code mapping set is constructed based on each calling number and the calling area code corresponding to the calling number.
[0024] Specifically, the calling number type is divided into mobile phone or landline, where the mobile number is usually composed of 11 digits, of which the first 3 digits are the mobile access code, which is used to identify the mobile communication network to which the mobile user belongs, and the middle 4 digits are the area code, which is used to confirm the location of the mobile phone number. Although this method cannot be accurate to the county or district level, it can usually be determined to the city level. Therefore, when the determined calling number type is a mobile phone, the corresponding digits in the calling number are extracted as the calling area code.
[0025] The structure of a fixed telephone number varies by region but usually includes an area code. For fixed telephone numbers in China, the area code can be three or four digits. For example, the area code for Beijing is 010, for Shanghai is 021, and for Shenzhen is 0755, etc. By extracting the first 3 to 4 digits of a fixed telephone number, the area code of the region to which the number belongs can be directly determined. These area codes are summarized based on existing area code rules, such as there is only one 010, three-digit numbers starting with 02, and four-digit numbers starting with 03 to 09, etc. Therefore, when the determined calling number type is a fixed telephone number, the first 3 to 4 digits of the calling number are extracted as the calling area code corresponding to the calling number.
[0026] Further, obtain the called number of the current call from the real-time call data, and use the same method as above for identifying the calling number area code to determine the area code of the called number. Specifically, the steps for determining the called area code corresponding to the called number include: Parse out the called number type of the called number; Extract the called number based on the called number type to obtain the called area code.
[0027] Specifically, the method for determining the called area code based on the called number type corresponding to the called number can refer to the above method for extracting the calling area code corresponding to the calling number, and will not be elaborated here.
[0028] In step S2, determine whether there is a key in the calling area code mapping set corresponding to the called area code.
[0029] Specifically, after determining the called area code, it is necessary to access the previously constructed calling area code mapping set. The keys in this set are the area codes of the calling numbers, and the values are the lists of calling numbers related to these area codes. For example, assume that the current calling area code mapping set includes three calling area codes (keys): 010, 021, and 0755. In this step, it is determined whether the called area code corresponds to any of the keys 010, 021, and 0755.
[0030] More specifically, the step of determining whether there is a key in the calling area code mapping set corresponding to the called area code can be expressed by the following formula: ; where n represents taking the first n digits of the called or calling number, LocalB is the set of local calling numbers obtained; is the set of all urban area codes, represents the single map relationship between the number segment and the area code; refers to the set of keys (area codes) in the calling area code mapping set; A set of multiple values (calling number) corresponding to multiple keys in the calling area code mapping set; If it is not an empty set, the value corresponding to the intersection is taken; otherwise, it is determined that the number acquisition has failed.
[0031] In step S21, if the number exists, the corresponding calling area code is extracted and the number is out.
[0032] Specifically, if any key included in the calling area code mapping set corresponds to the called area code, the value corresponding to the key in the calling area code mapping set is extracted. Specifically, assuming that the current calling area code mapping set includes three calling area codes (keys) of 010, 021 and 0755, if the called area code corresponding to the current called number is 0755, it is determined that there is a key corresponding to the called area code in the calling area code mapping set, in which case the value (calling number) 0755XXXXXXXX corresponding to 0755 is obtained and is output as the calling number of this dialing.
[0033] In step S22, the provincial capital area code corresponding to the called area code is obtained.
[0034] Specifically, if all the keys included in the calling area code mapping set do not correspond to the called area code, in this case, the next level of number selection strategy is entered to obtain the provincial capital area code corresponding to the province where the called area code is located, so as to facilitate the subsequent determination of whether the provincial capital area code corresponds to any key in the calling area code mapping set. Specifically, the step of obtaining the provincial capital area code corresponding to the called area code provided in the embodiment of the present application includes: Obtain the called area code location corresponding to the called area code; The called area province corresponding to the called area code is determined according to the called area code attribution, and the corresponding provincial capital area code is obtained according to the called area province.
[0035] Specifically, first determine the city name where the called area code is located based on the called area code's corresponding place of origin. For example, the called number corresponds to the area code 0769, and the corresponding place of origin of 0769 is Dongguan. In this case, the mapping relationship between the regional city and the province where the city is located is searched based on the city name, so as to determine the corresponding called regional province. For example, Dongguan City is a city in Guangdong Province, that is, the corresponding called regional province is Guangdong Province. Then, based on the mapping relationship between the called regional province and its provincial capital, find the name of its provincial capital and the area code corresponding to the provincial capital name. For example, find the provincial capital Guangzhou City corresponding to Guangdong Province, and then determine the area code 020 corresponding to Guangzhou City.
[0036] In step S3, it is determined whether there is a key of the provincial capital area code in the called area code mapping set.
[0037] Specifically, access the pre-constructed calling area code mapping set, and determine whether any key in the calling area code mapping set corresponds to the provincial capital area code determined in the above steps. For ease of understanding, taking the calling area code as 0769 and the provincial capital area code as 020 as an example, if there is a key of 020 in the calling area code mapping set, enter the following step S31; otherwise, enter step S32.
[0038] Specifically, in the embodiment of the present application, the step of determining whether there is a key of the provincial capital area code in the called area code mapping set can be represented by the following formula: ; where n represents taking the first n digits of the called or calling number; PrivCapB represents the set of calling numbers with the area code of the provincial capital city in the same province; represents the set of calling numbers merged according to the area code; fB represents the single map relationship between the area code and the prefecture-level city, fC represents the single map relationship between the prefecture-level city and the provincial region, and fD represents the single map relationship between the provincial region and the provincial capital city; represents the set of area codes of the provincial capital cities in the same province of the called numbers; If the intersection of is empty, then there is no key of the provincial capital area code in the called area code mapping set.
[0039] In step S31, if it exists, extract the number of the corresponding calling area code and make an outgoing call.
[0040] Specifically, if there is any key in the calling area code mapping set corresponding to the provincial capital area code obtained in the above steps, take the value corresponding to the key corresponding to the above provincial capital area code as the calling number of this call and make an outgoing call.
[0041] In step S32, obtain the associated area code mapping set of the called area code, and determine the intersection area code based on the calling area code mapping set and the associated area code mapping set.
[0042] Among them, the associated area code mapping set is the set of all cities and their corresponding area codes in the province corresponding to the called area code.
[0043] Specifically, if there is no key in the calling area code mapping set corresponding to the provincial capital area code obtained in the above steps, in this case, enter the next-level number selection strategy, obtain the associated area code mapping set related to the called area code, and determine the intersection area code of the associated area code mapping set and the calling area code mapping set to find a calling number of any city in the same province as the location of the called number.
[0044] For example, assume that through the above steps, it has been determined that the province where the location of the current called number belongs is Guangdong Province. In this case, all cities in Guangdong Province and their corresponding area codes are obtained to construct an associated area code set. Specifically, the steps for obtaining the associated area code mapping set of the called area code provided in the embodiments of the present application include: Obtain all city names corresponding to the province of the called area; Determine the city area code corresponding to each city name, and record the city name and its corresponding area code as the associated area code mapping set.
[0045] Specifically, access a database containing geographical information, such as a list of all cities in the country and their affiliated provinces, and filter out the city names corresponding to all the cities included in the province of the called area from it. Subsequently, obtain the specific area code of each city, and record these city names and the area code corresponding to each city name as a mapping set to obtain the associated area code mapping set.
[0046] For example, if it is known that the province of the called area is Guangdong Province, it can be determined through a relevant geographical data mapping table that cities in Guangdong Province include Guangzhou, Shenzhen, Dongguan, Zhuhai, etc. Subsequently, obtain the area code corresponding to each city, and form an associated area code mapping set (key-value table) after corresponding the city name with its corresponding area code one by one.
[0047] Furthermore, take the intersection of the associated area code mapping set and the calling area code mapping set for number selection. In the embodiments of the present application, the steps for determining the intersection area code based on the calling area code mapping set and the associated area code mapping set include: Traverse all area codes in the associated area code mapping set to filter out the intersection between the calling area code mapping set and the associated area code mapping set; Record the intersection between the calling area code mapping set and the associated area code mapping set as the intersection area code.
[0048] Specifically, traverse all area codes in the associated area code mapping set. For each area code obtained from the associated area code mapping set, it is necessary to check whether it also exists in the calling area code mapping set. If so, then this area code is the intersection of the two sets and is recorded as the intersection area code. At the same time, extract the value (calling number) corresponding to this intersection area code as the key in the calling area code mapping set for subsequent number selection.
[0049] More specifically, if the intersection area code acquisition fails, an error needs to be reported in this case. For example, there may be no cities and their corresponding area codes in the province corresponding to the called area code, then the associated area code mapping set will be empty, resulting in the inability to perform the intersection operation, or the data format is incorrect, the data reading is incorrect, etc. The system can send the corresponding error message to the relevant personnel after a preliminary analysis of the error cause, so that the relevant personnel can master the error information and complete the repair as soon as possible.
[0050] In step S4, it is determined whether there is a key of the intersection area code in the calling area code mapping set.
[0051] Specifically, based on the intersection area code obtained in the above steps, it is matched with the calling area code mapping set to determine the key corresponding to the calling number to be dialed out. For example, assume that the province of the called area is Guangdong, and the place of origin of the called number is Dongguan (area code 0769). After step S32 above, the area codes of all cities in Guangdong Province and the intersection of the area codes corresponding to all cities in Guangdong Province and the calling area code mapping set have been determined. Assume that the set of keys in the calling area code mapping set is (010, 021, 0755), and the set of area codes of all cities in Guangdong Province is (020, 0755, 0756, 0754, 0769,... 0757). At this time, the intersection area code is "0755". If there is an intersection area code, it is determined that there is a key of the intersection area code in the calling area code mapping set.
[0052] In step S41, if it exists, the number corresponding to the calling area code is extracted and dialed out.
[0053] Specifically, based on the example mentioned in step S4 above, if there is an intersection area code, the corresponding number is extracted based on the value corresponding to the key of the intersection area code as the calling number to complete the number selection.
[0054] In step S42, if there is no key of the intersection area code in the calling area code mapping set, it is determined that the number selection fails, and the corresponding error prompt message is sent.
[0055] Specifically, if there is no key of the intersection area code in the calling area code mapping set, it means that there is no number in the currently set calling numbers that is close to the place of origin of the called number. In this case, it is prompted that the number acquisition fails, and the corresponding error prompt message can be sent to inform the relevant personnel that the calling number with a place of origin close to that of the called number cannot be selected, and an error can be reported or feedback can be sent upward to add new numbers to the calling numbers. The error prompt message includes but is not limited to information prompts, audio prompts, etc.
[0056] Furthermore, the determination of whether there is a key of the intersection area code in the calling area code mapping set provided in the embodiment of the present application can be expressed by the following formula: ; where n represents taking the first n digits of the called or calling number; PrivB represents the set of calling numbers taking all city area codes in the same province; is the set of all city area codes in a certain province; If is an empty set, there is no key for the intersection area code in the calling area code mapping set, and it is determined that the number selection fails.
[0057] Refer to Figure 2 , Figure 2 is the virtual structure diagram of the virtual number's home location number selection device provided by this application. The second aspect of this application provides a virtual number's home location number selection device, including: A call information extraction module 100, configured to obtain a plurality of calling numbers and the called number in the call information, determine a calling area code mapping set according to each of the calling numbers, and determine the called area code corresponding to the called number; the calling area code mapping set includes a plurality of calling area codes, and one calling area code corresponds to one home location; A first-level number selection module 200, configured to determine whether there is a key corresponding to the called area code in the calling area code mapping set, and if so, extract the number of the corresponding calling area code and make an outgoing call; A provincial capital area code acquisition module 300, configured to otherwise, obtain the provincial capital area code corresponding to the called area code; A second-level number selection module 400, configured to determine whether there is a key for the provincial capital area code in the called area code mapping set, and if so, extract the number of the corresponding calling area code and make an outgoing call; An intersection area code acquisition module 500, configured to otherwise, obtain an associated area code mapping set of the called area code, and determine an intersection area code based on the calling area code mapping set and the associated area code mapping set; the associated area code mapping set is the set of all cities and their corresponding area codes in the province corresponding to the called area code; A third-level number selection module 600, configured to determine whether there is a key for the intersection area code in the calling area code mapping set, and if so, extract the number of the corresponding calling area code and make an outgoing call.
[0058] The virtual number's home location number selection device described in the embodiments of this application can execute the virtual number's home location number selection method provided in the above embodiments. The virtual number's home location number selection device has the corresponding functional steps and beneficial effects of the virtual number's home location number selection method described in the above embodiments. For details, please refer to the embodiments of the virtual number's home location number selection method. The embodiments of this application will not be elaborated here.
[0059] The embodiments of this application also provide an electronic device. Please refer to Figure 3 ,Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may include a processor and a memory, and the processor and the memory may be connected through a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., or a combination of the above types of chips. As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the method for selecting the location of a virtual number in the embodiments of the present application. By running the non-transitory software programs, instructions, and modules stored in the memory, the processor can execute various functional applications and data processing of the processor, that is, implement the method for selecting the location of a virtual number in the above method embodiments.
[0060] The memory may include a program storage area and a data storage area. Among them, the program storage area can store the operating system and application programs required for at least one function; the data storage area can store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. The one or more modules are stored in the memory and, when executed by the processor, perform the method for selecting the location of a virtual number in the above method embodiments. The specific details of the above electronic device can be understood corresponding to the relevant descriptions and effects in the above method embodiments, and will not be elaborated here. Those skilled in the art can understand that to implement all or part of the processes in the above method embodiments, it can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium can be an embedded multimedia card (e.MMC), a universal flash storage (UFS), a universal serial bus (USB), a micro flash card (TF Card), or a solid-state drive (SSD), etc., which are storage media using NAND FLASH; the storage medium can also include a combination of the above types of memories.
[0061] In the specification provided herein, a large number of specific details are set forth. However, it is understood that the embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail in order not to obscure the understanding of this specification.
[0062] Similarly, it should be understood that in order to streamline the present disclosure and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the intention that the claimed present application requires more features than are expressly recited in each claim. Rather, as reflected by the claims, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, where each claim itself serves as a separate embodiment of the present application.
[0063] It should be noted that the above embodiments are illustrative of the present application rather than restrictive of the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims.
Claims
1. A method for selecting a virtual number based on its location, characterized in that: The method comprises: Acquire multiple calling numbers and called numbers in the call information, determine a calling area code mapping set according to each calling number, and determine a called area code corresponding to the called number; the calling area code mapping set includes multiple calling area codes, and one calling area code corresponds to one home location; Determine whether there is a key corresponding to the called area code in the calling area code mapping set, if so, extract the number corresponding to the calling area code to exit; otherwise, obtain the provincial capital area code corresponding to the called area code; Determine whether there is a key of the provincial capital area code in the called area code mapping set, and if so, extract the number of the corresponding calling area code to exit; Otherwise, obtain the associated area code mapping set of the called area code, and determine the intersection area code based on the calling area code mapping set and the associated area code mapping set; the associated area code mapping set is a set of all cities and their corresponding area codes in the province corresponding to the called area code; It is determined whether the key of the intersection area code exists in the calling area code mapping set, and if so, the number of the corresponding calling area code is extracted for exit.
2. The method for selecting a virtual number according to claim 1, characterized in that: The step of determining a calling area code mapping set according to the calling number comprises: Parsing the calling number type of each calling number, and extracting the calling area code of each calling number using an extraction scheme corresponding to the calling number type to obtain a plurality of calling area codes; The calling area code mapping set is constructed based on each calling number and the calling area code corresponding to the calling number.
3. The method for selecting a virtual number according to claim 1, characterized in that: The step of determining the called area code corresponding to the called number comprises: Parsing the called number type of the called number; The called number is extracted according to the called number type to obtain the called area code.
4. The method for selecting a location of a virtual number according to claim 1, characterized in that: The step of obtaining the provincial capital area code corresponding to the called area code comprises: Obtain the called area code location corresponding to the called area code; The called area province corresponding to the called area code is determined according to the called area code attribution, and the corresponding provincial capital area code is obtained according to the called area province.
5. The method for selecting a location of a virtual number according to claim 4, characterized in that: The step of obtaining the associated area code mapping set of the called area code comprises: Get all city names corresponding to the called province; The city area code corresponding to each city name is determined, and the city name and the corresponding area code are recorded as the associated area code mapping set.
6. The method for selecting a virtual number according to claim 1, characterized in that: The step of determining the intersection area code based on the calling area code mapping set and the associated area code mapping set comprises: Traversing all area codes in the associated area code mapping set to filter out the intersection between the calling area code mapping set and the associated area code mapping set; The intersection between the calling area code mapping set and the associated area code mapping set is recorded as the intersection area code.
7. The method for selecting a location of a virtual number according to claim 1, characterized in that: The step of determining whether there is a key of the intersection area code in the calling area code mapping set also includes: If the key of the intersection area code does not exist in the calling area code mapping set, it is determined that the number selection fails, and a corresponding error prompt message is sent.
8. A device for selecting a location of a virtual number, characterized in that: include: A call information extraction module, used to obtain multiple caller numbers and called numbers in the call information, determine a calling area code mapping set according to each of the calling numbers, and determine a called area code corresponding to the called number; the calling area code mapping set includes multiple calling area codes, and one calling area code corresponds to one home location; The first level number selection module is used to determine whether there is a key corresponding to the called area code in the calling area code mapping set, and if so, extract the number corresponding to the calling area code to exit; A provincial capital area code acquisition module, used for otherwise acquiring the provincial capital area code corresponding to the called area code; The second level number selection module is used to determine whether there is a key of the provincial capital area code in the called area code mapping set, and if so, extract the number of the corresponding calling area code to exit; An intersection area code acquisition module is used to otherwise acquire the associated area code mapping set of the called area code, and determine the intersection area code based on the calling area code mapping set and the associated area code mapping set; the associated area code mapping set is a set of all cities and their corresponding area codes in the province corresponding to the called area code; The third level number selection module is used to determine whether there is a key of the intersection area code in the calling area code mapping set, and if so, extract the number of the corresponding calling area code to exit.
9. An electronic device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 7 is implemented.