WO2024094107A1 - 手机号码归属运营商查询方法、装置、存储介质及设备 - Google Patents

手机号码归属运营商查询方法、装置、存储介质及设备 Download PDF

Info

Publication number
WO2024094107A1
WO2024094107A1 PCT/CN2023/129279 CN2023129279W WO2024094107A1 WO 2024094107 A1 WO2024094107 A1 WO 2024094107A1 CN 2023129279 W CN2023129279 W CN 2023129279W WO 2024094107 A1 WO2024094107 A1 WO 2024094107A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile phone
phone number
record
operator
portability
Prior art date
Application number
PCT/CN2023/129279
Other languages
English (en)
French (fr)
Inventor
劳逸凡
陈鑫
丁嘉嘉
Original Assignee
天翼数字生活科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 天翼数字生活科技有限公司 filed Critical 天翼数字生活科技有限公司
Publication of WO2024094107A1 publication Critical patent/WO2024094107A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of telecommunication technology, and in particular to a method, device, storage medium and equipment for querying the operator to which a mobile phone number belongs.
  • Number portability means that users can switch from the original telecom operator to another telecom operator through service processing without changing their mobile phone numbers.
  • the emergence of number portability services reduces a series of changes caused by the change of user mobile phone numbers and reduces the cost of network switching for users.
  • the emergence of number portability services also changes the binding of number segments and telecom operators. The original number segments were bound to telecom operators, and different number segments belonged to different telecom operators. Generally, the specific telecom operator of the mobile phone number can be determined based on the first three digits of the mobile phone. Therefore, in the original service development process, technical personnel determined the operator of the mobile phone number by the number segment, and used this as a basis to send corresponding services to users.
  • the method of determining the operator of the mobile phone number based on the number segment is no longer applicable, resulting in users who have switched their numbers being unable to receive services that match the operator they belong to.
  • the present invention provides a method, device, storage medium and equipment for querying the operator to which a mobile phone number belongs, which can quickly and accurately find the operator to which a mobile phone number belongs by combining number portability data and mobile phone number segment query.
  • the present invention provides a method for querying the operator to which a mobile phone number belongs, comprising:
  • the mobile phone number's carrier is obtained from the network transfer record
  • the home operator of the mobile phone number is obtained according to the number portability record.
  • the present invention provides a device for querying the operator to which a mobile phone number belongs, comprising:
  • a number acquisition module is used to obtain the mobile phone number to be queried
  • a cache query module used to query the number portability record of the mobile phone number from the cache
  • a first operator acquisition module is used to obtain the home operator of the mobile phone number according to the number portability record if the number portability record of the mobile phone number is queried in the cache;
  • a database query module configured to query the number portability record of the mobile phone number in the database according to the horizontal sub-table if no number portability record of the mobile phone number is found in the cache;
  • the second operator acquisition module is used to query the number portability record of the mobile phone number in the database, and obtain the home operator of the mobile phone number according to the number portability record.
  • the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods for querying the operator to which a mobile phone number belongs in the first aspect are implemented.
  • the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it executes any one of the methods for querying the operator to which a mobile phone number belongs in the first aspect.
  • the beneficial effects of adopting the above technical solution are: due to the development of the number portability service, the method of simply querying the mobile phone number's affiliated operator based on the number segment is not feasible. In this case, when querying the mobile phone number's affiliated operator, first query whether there is a record of number portability for the mobile phone number, and through secondary query of the cache and database, quickly determine the mobile phone number's affiliated operator based on the number portability record, and accurately query the mobile phone number's affiliated operator.
  • FIG1 is a schematic diagram of a method for querying a mobile phone number's operator in accordance with an embodiment of the present application
  • FIG2 is a schematic diagram of a process for storing a mobile phone number portability record in one embodiment of the present application
  • FIG3 is an exemplary flow chart of a method for querying a mobile phone number's home operator in one embodiment of the present application
  • FIG. 4 is a schematic diagram of a device for querying a mobile phone number's operator in accordance with an embodiment of the present application.
  • Number portability means that users can switch from the original telecom operator to another telecom operator through service processing without changing their mobile phone numbers.
  • the emergence of number portability services reduces a series of changes caused by the change of user mobile phone numbers and reduces the cost of network switching for users.
  • the number of new number portability services is as high as 100,000 per day.
  • the cumulative increase in number portability services in one year is as high as 36-37 million.
  • the current stock has reached more than 50 million. According to the current trend, the development of number portability services has put great pressure on the database.
  • the number segment was bound to the telecommunications operator, and different number segments belonged to different telecommunications operators.
  • the technicians could determine the operator of the mobile phone number by the number segment, and use this as a basis to send corresponding services to users.
  • the above method is no longer applicable. Users who have ported their numbers cannot receive calls from the operator they belong to. Business that matches the business.
  • the embodiment of the present application provides a specific application scenario of the method for querying the mobile phone number's operator.
  • the application scenario includes the terminal device provided in the embodiment, and the terminal device includes but is not limited to a smart phone and a computer device, wherein the computer device can be at least one of a desktop computer, a portable computer, a laptop computer, a tablet computer, and the like.
  • the user operates the terminal device, and the terminal device executes the method for querying the mobile phone number's operator of the present invention.
  • the specific process please refer to the embodiment of the method for querying the mobile phone number's operator.
  • Step S101 Obtain the mobile phone number to be queried.
  • Step S102 Query the cache to see whether it contains the number portability record of the mobile phone number.
  • the buffer stores the number portability records within the most recent first preset time, and the first preset time can be set according to the specific data storage capacity of the buffer.
  • the number portability records in the buffer are short-term caches, and the first preset time can generally be set to 3 months, 2 months or 1 month.
  • Step S103 If the number portability record of the mobile phone number is found in the cache, the home operator of the mobile phone number is obtained according to the number portability record.
  • the number portability record of the mobile phone number is found in the cache, it means that the mobile phone number has undergone number portability service in a short period of time. Then, the specific operator to which the mobile phone number belongs can be obtained based on the number portability record found in the cache.
  • Step S104 If no number portability record of the mobile phone number is found in the cache, the number portability record of the mobile phone number is searched in the database according to the horizontal sub-table.
  • no number portability record of the mobile phone number is found in the cache, it means that the mobile phone number has not had any number portability service in the short term, and it is necessary to transfer to the database to query whether the mobile phone number has had any number portability service in a longer period of time.
  • the database stores relevant service records of each mobile phone number.
  • the horizontal sub-table is to divide the database into several database sub-tables, and divide the mobile phone numbers and related business records stored in the database into different database sub-tables according to the mobile phone numbers.
  • the database sub-table has the same data structure as the data stored in the database.
  • Step S105 If the number portability record of the mobile phone number is found in the database, the home operator of the mobile phone number is obtained according to the number portability record.
  • the number portability record of the mobile phone number is found in the database, it means that the mobile phone has undergone number portability service, and the accurate operator of the mobile phone number can be found based on the number portability record.
  • the method for querying the mobile phone number's operator also includes:
  • Step S106 If no number portability record of the mobile phone number is found in the database, the home operator of the mobile phone number is obtained according to the number segment of the mobile phone number.
  • the specific operator can be determined based on the number segment of the mobile phone number. Specifically, the specific operator can be determined based on the first three digits of the mobile phone number.
  • the above method for querying the mobile phone number's operator involves storing the number portability record of the mobile phone number, specifically including:
  • Step S201 saving the number portability record of the mobile phone number to a cache at a first preset time, and synchronizing the number portability record to a database.
  • the first preset time is the preset time for the buffer to record the number portability record of the mobile phone number, which can generally be set to a specific time point or a preset time interval. Since the number portability service occurs frequently during the day, in order to enable the mobile phone number that handles the number portability service to quickly receive new business services, the preset time frequency recorded in the buffer can be set to be higher, for example, the first preset time is set to include 3-10 specific time points every day, or the preset time interval is set to 2 hours, 1 hour or 30 minutes. In this embodiment, the first preset time is set to 20 minutes, then the buffer records the number portability record of the newly added mobile phone number every 20 minutes.
  • the number portability record of a mobile phone number includes: the mobile phone number, the operator from which the number is ported, the operator to which the number is ported, the current operator of the mobile phone number, and the execution time of the number portability service.
  • the above parameters constitute a string in json format and are stored in the cache.
  • Storing the daily newly added number portability data in the cache for a short period of time can effectively avoid resource pressure caused by frequent database queries, while also meeting the requirements of number portability users to quickly receive various service change notifications after the service occurs.
  • the database since a large number of mobile phone numbers and their business records are stored in the database, in order to quickly find the specific records of the corresponding mobile phone numbers in the database, it also includes: horizontally sub-table according to the mobile phone numbers, and storing the number portability records in the corresponding database sub-table according to the horizontal sub-table.
  • the database includes several database sub-tables.
  • the horizontal sub-table according to the mobile phone number is specifically as follows: a number of database sub-tables are set in the database, and the structure of the database sub-table is consistent with that of the database; for the number portability record of the newly added mobile phone number, the mobile phone number is taken as a remainder, and the number portability record of the mobile phone number is stored in the corresponding sub-table according to the remainder, thereby ensuring that the data volume of each database sub-table is in a reasonable range.
  • the database is set with five database sub-tables, and the mobile phone number is modulo 5, and the remainder is 0-4, which corresponds to the five database sub-tables one by one. According to the remainder of the mobile phone number, the number portability record of the mobile phone number is placed in the corresponding database sub-table.
  • the mobile phone number is first modulo, the database sub-table where the mobile phone number is located is determined according to the remainder, and the number portability record of the mobile phone number is queried from the corresponding database sub-table.
  • the database is also set up with a master database and a slave database.
  • the master database only performs write operations, and the slave database only performs read operations.
  • the data structure and stored data of the master database and the slave database are completely consistent.
  • the master database and the slave database are set up so that when the master database fails, it can quickly switch to the slave database to ensure the query quality.
  • Network records also include:
  • Step S202 After the number portability record is stored in the cache for a second preset time, the number portability record is deleted from the cache.
  • the second preset time for deleting the number portability record can be set to a longer service processing cycle, such as two weeks, one month or two months. In this embodiment, the second preset time is set to three months.
  • the queried mobile phone number may have multiple number portability service operations.
  • the number portability record storage of the corresponding mobile phone number also includes:
  • Step S203 If the mobile phone number stored in the buffer is ported again, the new porting record is saved in the buffer overwriting the historical porting record.
  • the number portability record of the mobile phone number stored in the cache is only used to query the current operator of the mobile phone number. Therefore, the latest number portability record of the mobile phone number is stored in the cache, that is, after the user applies for the number portability service, if he/she applies for the number portability service again within a short period of time, the new number portability record will overwrite the old number portability record.
  • the database there is no problem of limited storage capacity. On this basis, every number portability record of the mobile phone number in the database can be saved, and there is no need to overwrite the old number portability record with a new number portability record. Therefore, the database can also query the historical number portability record of the mobile phone number, and obtain each number portability record of the mobile phone number from account opening to cancellation. The historical number portability record can be used for data analysis and trend prediction.
  • the number portability record of the number if the number portability record of the number cannot be found in the cache, query whether there is a number portability record of the number in the database; if the number portability record of the number cannot be found in the database, re-query the cache and the database to see whether there is a number portability record of the number based on the first 7 or 9 digits of the mobile phone number; if the number portability record of the mobile phone number is still not found after re-querying, determine the operator to which the mobile phone number belongs based on the first 3 digits (i.e., the number segment) of the mobile phone number.
  • steps in the flowchart of FIG. 1 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in FIG. 1 may include multiple sub-steps or sub-stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
  • the above-mentioned embodiment disclosed in the present invention describes in detail a method for querying the operator to which a mobile phone number belongs.
  • the above-mentioned method disclosed in the present invention can be implemented using various forms of equipment. Therefore, the present invention also discloses a mobile phone number operator query device corresponding to the above-mentioned method.
  • a specific embodiment is given below for detailed description.
  • the number acquisition module 301 is used to acquire the mobile phone number to be queried.
  • the cache query module 302 is used to query the number portability record of the mobile phone number from the cache.
  • the first operator acquisition module 303 is configured to obtain the home operator of the mobile phone number according to the number portability record if the number portability record of the mobile phone number is found in the cache.
  • the database query module 304 is used to query the number portability record of the mobile phone number in the database according to the horizontal sub-table if the number portability record of the mobile phone number is not found in the cache.
  • the second operator acquisition module 305 is used to obtain the mobile phone number if the mobile phone number is found in the database.
  • the number portability record is used to obtain the operator to which the mobile phone number belongs according to the number portability record.
  • the mobile phone number operator query device further comprises:
  • the third operator acquisition module 306 is used to obtain the home operator of the mobile phone number according to the number segment of the mobile phone number if no number portability record of the mobile phone number is found in the database.
  • Each module in the above device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above modules can be embedded in or independent of the processor of the terminal device in hardware form, or stored in the memory of the terminal device in software form, so that the processor can call and execute the operations corresponding to the above modules.
  • the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for querying the operator to which a mobile phone number belongs in the first aspect are implemented.
  • the computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM (erasable programmable read-only memory), a hard disk or a ROM.
  • the computer-readable storage medium includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium has storage space for program codes for executing any method step in the above method. These program codes may be read from or written into one or more computer program products, and the program codes may be compressed in an appropriate form.
  • the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the above-mentioned method for querying the operator to which a mobile phone number belongs when executing the computer program.
  • the computer device comprises a memory, a processor and one or more computer programs, wherein One or more computer programs may be stored in the memory and configured to be executed by one or more processors, and one or more application programs may be configured to execute the above-mentioned method for querying the mobile phone number's operator.
  • the processor may include one or more processing cores.
  • the processor uses various interfaces and lines to connect various parts of the entire computer device, and executes various functions of the computer device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory.
  • the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA).
  • DSP digital signal processing
  • FPGA field programmable gate array
  • PDA programmable logic array
  • the processor can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem.
  • the CPU mainly processes the operating system, user interface, and application programs;
  • the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor, but may be implemented separately through a communication chip.
  • the memory may include a random access memory (RAM) or a read-only memory (ROM).
  • the memory may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.
  • the data storage area may also store data created by the terminal device during use, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供手机号码归属运营商查询方法、装置、存储介质及设备,包括:获取待查询的手机号码;从缓存器中查询所述手机号码的携号转网记录;若在缓存器中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商;若在缓存器中未查询到所述手机号码的携号转网记录,根据水平分表在数据库中查询是否包含所述手机号码的携号转网记录;若在数据库中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。通过在缓存器和数据库中查询手机号码的携号转网记录,能够快速准确地根据携号转网记录确定手机号码的归属运营商。

Description

手机号码归属运营商查询方法、装置、存储介质及设备 技术领域
本发明涉及电信技术领域,具体涉及手机号码归属运营商查询方法、装置、存储介质及设备。
背景技术
携号转网是指用户不需要改变自己的手机号码,通过业务办理即可从原来电信运营商的用户转为另一家电信运营商的用户。携号转网业务的出现减少了用户手机号码变更引起的一系列变更,减少了用户的转网成本。携号转网业务的出现也改变了号段和电信运营商绑定的情况,原来的号段与电信运营商绑定,不同号段归属的电信运营商不同,一般根据手机的前三位数字可以判断手机号码的具体电信运营商。因此技术人员在原来的业务开发过程中,通过号段判断手机号码的运营商归属,并以此作为依据向用户发送相应的服务。而随着携号转网服务的推进,根据号段判断手机号码的运营商归属的方法不再适用,导致携号转网的用户无法接收与归属运营商相匹配的业务。
发明内容
基于此,本发明提供手机号码归属运营商查询方法、装置、存储介质及设备,通过携号转网数据以及手机号段查询结合,快速准确查找到手机号码的归属运营商。
第一方面,本发明提供一种手机号码归属运营商查询方法,包括:
获取待查询的手机号码;
从缓存器中查询所述手机号码的携号转网记录;
若在所述缓存器中查询到所述手机号码的携号转网记录,根据所述携号 转网记录得到所述手机号码的归属运营商;
若在所述缓存器中未查询到所述手机号码的携号转网记录,根据水平分表在数据库中查询所述手机号码的携号转网记录;
若在所述数据库中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
第二方面,本发明提供一种手机号码归属运营商查询装置,包括:
号码获取模块,用于获取待查询的手机号码;
缓存查询模块,用于从缓存器中查询所述手机号码的携号转网记录;
第一运营商获取模块,用于若在所述缓存器中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商;
数据库查询模块,用于若在所述缓存器中未查询到所述手机号码的携号转网记录,根据水平分表在数据库中查询所述手机号码的携号转网记录;
第二运营商获取模块,用于在所述若数据库中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
第三方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面中任一项手机号码归属运营商查询方法的步骤。
第四方面,本发明提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时,执行第一方面中任一项手机号码归属运营商查询方法。
采用上述技术方案的有益效果为:由于携号转网业务的开展,单纯根据号段查询手机号码的归属运营商方法不可行,在此情况下,在查询手机号码的归属运营商时首先查询手机号码是否存在携号转网的记录,通过缓存器和数据库的二级查询,快速根据携号转网的记录确定手机号码的归属运营商,准确查询到手机号码的归属运营商。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。
图1为本申请一个实施例中手机号码归属运营商查询方法的示意图;
图2为本申请一个实施例中手机号码的携号转网记录存储过程示意图;
图3为本申请一个实施例中手机号码的归属运营商查询方法的示例流程图;
图4为本申请一个实施例中手机号码归属运营商查询装置的示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。为了更详细说明本发明,下面结合附图对本发明提供的手机号码归属运营商查询方法、装置、存储介质及设备,进行具体地描述。
携号转网是指用户不需要改变自己的手机号码,通过业务办理即可从原来电信运营商的用户转为另一家电信运营商的用户。携号转网业务的出现减少了用户手机号码变更引起的一系列变更,减少用户的转网成本。目前随着携号转网政策的推进,每日新增的携号转网服务数量高达10万,综合一年的携号转网服务增量累计高达3600-3700万,目前的存量已高达5000多万,按照目前的趋势,携号转网业务的开展对数据库造成很大的压力。
在原来的电信业务服务中,号段与电信运营商绑定,不同号段归属的电信运营商不同,技术人员在原来的业务开发过程中,通过号段即可判断手机号码的运营商归属,并以此作为依据向用户发送相应的服务。但是随着携号转网业务的推进,上述方法不再适用,携号转网的用户无法接收与归属运营 商相匹配的业务。
本申请实施例提供了手机号码归属运营商查询方法的具体应用场景。该应用场景包括实施例提供的终端设备,终端设备包括但不限于智能手机和计算机设备,其中计算机设备可以是台式计算机、便携式计算机、膝上型计算机、平板电脑等设备中的至少一种。用户对终端设备进行操作,终端设备执行本发明的手机号码归属运营商查询方法,具体过程请参见手机号码归属运营商查询方法的实施例。
步骤S101:获取待查询的手机号码。
步骤S102:从缓存器中查询是否包含所述手机号码的携号转网记录。
所述缓存器存储最近第一预设时间内的携号转网记录,第一预设时间可根据缓存器具体的数据存储量设定。缓存器内的携号转网记录是短时间的缓存,一般可将第一设定时间定为3个月、2个月或1个月。
步骤S103:若在缓存器中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
具体地,若在缓存器中查询到该手机号码的携号转网记录,表示所述手机号码在短期内发生了携号转网的业务,则可根据在缓存器中查询到的携号转网记录得到手机号码的具体归属运营商。
步骤S104:若在缓存器中未查询到所述手机号码的携号转网记录,根据水平分表在数据库中查询所述手机号码的携号转网记录。
具体地,若在缓存器内未查询到该手机号码的携号转网记录,则表示该手机号码并未在短期内发生携号转网的业务,则需要转移到数据库查询在更长的时间段内该手机号码是否发生携号转网的业务。数据库存储有各个手机号码的相关业务记录。
所述水平分表为将数据库划分为若干个数据库分表,根据手机号码将数据库中存储的手机号码及其相关业务记录划分至不同的数据库分表。其中数据库分表与数据库中存储的数据结构相同。
步骤S105:若在数据库中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
具体地,若在数据库中查询到该手机号码的携号转网记录,则表示该手机发生了携号转网的业务,即可根据携号转网记录找到该手机号码的准确归属运营商。
进一步地,所述手机号码归属运营商查询方法还包括:
步骤S106:若在数据库中未查询到所述手机号码的携号转网记录,根据所述手机号码的号段得到所述手机号码的归属运营商。
在查询缓存器与数据库后都没有找到该手机号码的携号转网记录时,则表示该手机号码并未发生携号转网服务,在此情况下,可根据手机号码的号段判断具体的归属运营商。具体地,根据手机号码的前三位判断具体的归属运营商。
对上述手机号码归属运营商查询方法,结合附图2,其中涉及存储手机号码的携号转网记录,具体包括:
步骤S201:在第一预设时间将手机号码的携号转网记录保存至缓存器,并将所述携号转网记录同步至数据库中。
其中,第一预设时间为缓存器记录手机号码的携号转网记录的预设时间,一般可设置为特定的时间点或预设的时间间隔,由于日内携号转网业务的发生频率较高,为了使办理携号转网业务的手机号码能够快速接收到新的业务服务,可设置缓存器记录的预设时间频率较高,例如设置第一预设时间包括每日的3-10个特定时间点,或设置预设的时间间隔为2小时、1小时或者30分钟。在本实施例中,设置所述第一预设时间为20分钟,那么每隔20分钟缓存器则记录新增手机号码的携号转网记录。
手机号码的携号转网记录包括:手机号码、携号转出的运营商、携号转入的运营商、手机号码当前的归属运营商以及携号转网业务的执行时间。上述参数构成json格式的字符串,并存入缓存器。
将每日新增的携号转网数据短期保存至缓存器中,能够有效地避免频繁查询数据库造成资源压力,同时也能满足携号转网用户在业务发生后快速接收到各种业务变更通知的要求。
上述手机号码的携号转网记录除了按照第一预设时间的缓存处理外,还需要将这部分数据存入数据库持久化保存,故在手机号码的携号转网记录保存至缓存器的同时,将相同的携号转网记录保存到实现持久化保存的数据库中。
进一步地,由于所述数据库内存储着大量的手机号码及其业务记录,为了在数据库中能够快速找到相应手机号码的具体记录,还包括:根据所述手机号码进行水平分表,根据所述水平分表将所述携号转网记录存储至对应的数据库分表,所述数据库包括若干个数据库分表。
其中,根据所述手机号码进行水平分表具体为:数据库内设置有若干个数据库分表,所述数据库分表与数据库的结构一致;对于新增的手机号码的携号转网记录,对手机号码取余,按照余数将手机号码的携号转网记录存储至对应的分表,保证了每个数据库分表的数据量处于合理区间。
例如,本实施例中将数据库设置有五个数据库分表,则将手机号码对5进行取余,所述余数为0-4,分别与五个数据库分表一一对应,按照手机号码的余数将该手机号码的携号转网记录放置到相应的数据库分表。
同理,当查询所述手机号码的携号转网记录时也是先对手机号码取余,根据余数确定该手机号码所在的数据库分表,从对应的数据库分表中查询该手机号码的携号转网记录。
另外,数据库还设置有主数据库和从数据库,主数据库只进行写入操作,从数据库只进行读取操作,主数据库与从数据库的数据结构以及存储的数据完全一致。设置主数据库和从数据库是为了主数据库发生故障时,能够快速切换到从数据库,保证查询质量。
进一步,手机号码归属运营商查询方法中涉及的存储手机号码的携号转 网记录,还包括:
步骤S202:在所述携号转网记录在缓存器保存达到第二预设时间后,将所述携号转网记录从缓存器中删除。
具体地,由于每日新增的携号转网业务数量较多,缓存器的数据存储容量有限,则需要设置所述携号转网记录在缓存器保存达到第二预设时间后,将所述携号转网记录从缓存器中删除。考虑到用户在办理携号转网业务后一段时间内会以较高的频率收到各种业务变更的短信,为避免频繁查询数据库造成资源压力,可将删除携号转网记录的第二预设时间设置为较长的业务办理周期,例如两周、一个月或两个月。本实施例将所述第二预设时间设置为三个月。
进一步,查询的手机号码有可能发生多次携号转网业务操作,此时,对应的手机号码的携号转网记录存储还包括:
步骤S203:若缓存器内保存的手机号码再次发生携号转网操作,在缓存器中将新的携号转网记录覆盖历史的携号转网记录进行保存。
具体地,由于缓存器的存储容量有限,缓存器保存的手机号码的携号转网记录仅用于查询该手机号码当前的归属运营商,因此,缓存器中保存手机号码最新的携号转网记录,即用户在办理携号转网业务后,短期内再一次办理携号转网业务,用新的携号转网记录覆盖掉旧的携号转网记录。
而对于数据库来说,并不存在存储容量有限的问题,在此基础上,数据库中的手机号码的每一条携号转网记录都可以保存下来,并不需要用新的携号转网记录覆盖旧的携号转网记录。由此,数据库中还可查询手机号码的历史携号转网记录,得到该手机号码从开户到注销过程中每一次携号转网记录,该历史携号转网记录可用于数据分析以及趋势预测。
为了更好地说明本申请的手机号码归属运营商查询方法,结合附图3,给出相应的实施例进行说明。在使用短信验证码登录功能前,需要对手机号码的归属运营商进行查询。首先,根据所述手机号码查询缓存器中是否存在 该号码的携号转网记录;若所述缓存器中未能查询到该号码的携号转网记录,查询数据库中是否存在该号码的携号转网记录;若数据库中也未能查询到该号码的携号转网记录,则根据所述手机号码的前7位或前9位数字,重新查询缓存器以及数据库中是否存在该号码的携号转网记录;若重新查询后仍然未查询到该手机号码的携号转网记录,则根据手机号码的前3位(即号段)确定该手机号码的归属运营商。
应该理解的是,虽然附图1的流程图中各个步骤按照箭头额定指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以按其他的顺序执行。而且附图1中的至少一部分步骤可以包括多个子步骤或者子阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
上述本发明公开的实施例中详细描述了手机号码归属运营商查询方法,对于本发明公开的上述方法可以采用多种形式的设备实现,因此本发明还公开了对应上述方法的手机号码归属运营商查询装置,结合附图4,下面给出具体的实施例进行详细说明。
号码获取模块301,用于获取待查询的手机号码。
缓存查询模块302,用于从缓存器中查询所述手机号码的携号转网记录。
第一运营商获取模块303,用于若在所述缓存器中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
数据库查询模块304,用于若在所述缓存器中未查询到所述手机号码的携号转网记录,根据水平分表在数据库中查询所述手机号码的携号转网记录。
第二运营商获取模块305,用于若在所述数据库中查询到所述手机号码 的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
进一步,所述手机号码归属运营商查询装置还包括:
第三运营商获取模块306,用于若在所述数据库中未查询到所述手机号码的携号转网记录,根据所述手机号码的号段得到所述手机号码的归属运营商。
关于手机号码归属运营商查询装置的具体限定可以参见上文中对于方法的限定,在此不再赘述。上述装置中的各个模块可全部或者部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或者独立于终端设备的处理器中,也可以以软件形式存储于终端设备的存储器中,以便处理器调用执行以上各个模块对应的操作。
在一个实施例中,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面手机号码归属运营商查询方法的步骤。
所述计算机可读存储介质可以是诸如闪存、EEPROM(电可擦除可编只读程存储器)、EPROM(可擦除可编只读程存储器)、硬盘或者ROM之类的电子存储器。可选的,计算机可读存储介质包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质具有执行上述方法中的任何方法步骤的程序代码的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入这一个或者多个计算机程序产品中,所述程序代码可以以适当形式进行压缩。
在一个实施例中,本发明提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时执行上述手机号码归属运营商查询方法的步骤。
所述计算机设备包括存储器、处理器以及一个或多个计算机程序,其中 一个或多个计算机程序可以被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个应用程序配置用于执行上述手机号码归属运营商查询方法。
处理器可以包括一个或多个处理核。处理器利用各种接口和线路连接整个计算机设备内的各个部分,通过运行或执行存储在存储器内的指令、程序、代码集或指令集,以及调用存储在存储器内的数据,执行计算机设备的各种功能和处理数据。可选地,处理器可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器可集成中央处理器(Central Processing Unit,CPU)、埋点数据的上报验证器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器中,单独通过一块通信芯片进行实现。
存储器可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器可用于存储指令、程序、代码、代码集或指令集。存储器可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等。存储数据区还可以存储终端设备在使用中所创建的数据等。
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种手机号码归属运营商查询方法,其特征在于,包括:
    获取待查询的手机号码;
    从缓存器中查询所述手机号码的携号转网记录;
    若在所述缓存器中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商;
    若在所述缓存器中未查询到所述手机号码的携号转网记录,根据水平分表在数据库中查询所述手机号码的携号转网记录;
    若在所述数据库中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
  2. 如权利要求1所述的手机号码归属运营商查询方法,其特征在于,还包括:
    若在所述数据库中未查询到所述手机号码的携号转网记录,根据所述手机号码的号段得到所述手机号码的归属运营商。
  3. 如权利要求1所述的手机号码归属运营商查询方法,其特征在于,所述方法还包括:
    在第一预设时间将手机号码的携号转网记录保存至缓存器,并将所述携号转网记录同步至数据库中。
  4. 如权利要求3所述的手机号码归属运营商查询方法,其特征在于,所述方法还包括:
    在所述携号转网记录保存至缓存器到达第二预设时间后,将所述携号转网记录从缓存器中删除。
  5. 如权利要求3所述手机号码归属运营商查询方法,其特征在于,所述方法还包括:
    若缓存器内保存的手机号码再次发生携号转网操作,在缓存器中将新的携号转网记录覆盖历史的携号转网记录保存。
  6. 如权利要求3所述手机号码归属运营商查询方法,所述将携号转网记录同步到数据库中,包括:
    根据所述手机号码进行水平分表,根据所述水平分表将所述携号转网记录存储至对应的数据库分表,所述数据库包括若干个数据库分表。
  7. 一种手机号码归属运营商查询装置,其特征在于,包括:
    号码获取模块,用于获取待查询的手机号码;
    缓存查询模块,用于从缓存器中查询所述手机号码的携号转网记录;
    第一运营商获取模块,用于若在所述缓存器中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商;
    数据库查询模块,用于若在所述缓存器中未查询到所述手机号码的携号转网记录,根据水平分表查询在数据库中查询所述手机号码的携号转网记录;
    第二运营商获取模块,用于若在所述数据库中查询到所述手机号码的携号转网记录,根据所述携号转网记录得到所述手机号码的归属运营商。
  8. 如权利要求7所述的手机号码归属运营商查询装置,其特征在于,还包括:
    第三运营商获取模块,用于若在所述数据库中未查询到所述手机号码的携号转网记录,根据所述手机号码的号段得到所述手机号码的归属运营商。
  9. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-6中任一项所述的手机号码归属运营商查询方法的步骤。
  10. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时,执行权利要求1-6中任一项所述的手机号码归属运营商查询方法。
PCT/CN2023/129279 2022-11-02 2023-11-02 手机号码归属运营商查询方法、装置、存储介质及设备 WO2024094107A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211363097.3A CN115905280A (zh) 2022-11-02 2022-11-02 手机号码归属运营商查询方法、装置、存储介质及设备
CN202211363097.3 2022-11-02

Publications (1)

Publication Number Publication Date
WO2024094107A1 true WO2024094107A1 (zh) 2024-05-10

Family

ID=86488754

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/129279 WO2024094107A1 (zh) 2022-11-02 2023-11-02 手机号码归属运营商查询方法、装置、存储介质及设备

Country Status (2)

Country Link
CN (1) CN115905280A (zh)
WO (1) WO2024094107A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115905280A (zh) * 2022-11-02 2023-04-04 天翼数字生活科技有限公司 手机号码归属运营商查询方法、装置、存储介质及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110103164A (ko) * 2010-03-12 2011-09-20 서울신용평가정보 주식회사 신용정보를 이용한 휴대폰 번호 인증 처리 방법 및 시스템
CN110248321A (zh) * 2019-05-22 2019-09-17 中国联合网络通信集团有限公司 一种携号转网号码管理的方法和系统
CN111698345A (zh) * 2020-06-10 2020-09-22 山东伏羲智库互联网研究院 域名查询方法、递归服务器和存储介质
CN115905280A (zh) * 2022-11-02 2023-04-04 天翼数字生活科技有限公司 手机号码归属运营商查询方法、装置、存储介质及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110103164A (ko) * 2010-03-12 2011-09-20 서울신용평가정보 주식회사 신용정보를 이용한 휴대폰 번호 인증 처리 방법 및 시스템
CN110248321A (zh) * 2019-05-22 2019-09-17 中国联合网络通信集团有限公司 一种携号转网号码管理的方法和系统
CN111698345A (zh) * 2020-06-10 2020-09-22 山东伏羲智库互联网研究院 域名查询方法、递归服务器和存储介质
CN115905280A (zh) * 2022-11-02 2023-04-04 天翼数字生活科技有限公司 手机号码归属运营商查询方法、装置、存储介质及设备

Also Published As

Publication number Publication date
CN115905280A (zh) 2023-04-04

Similar Documents

Publication Publication Date Title
WO2024094107A1 (zh) 手机号码归属运营商查询方法、装置、存储介质及设备
CN104750740A (zh) 数据更新的方法及装置
CN108124252A (zh) 一种获取信息的方法、终端及计算机可读存储介质
CN105701122A (zh) 一种日志收集方法、装置及系统
US20140237024A1 (en) Network communication devices and file tracking methods thereof
US10594862B2 (en) Contextual contact substitution for mobile devices
WO2021057064A1 (zh) 基于人工智能的数据交互转换方法、装置、设备及介质
CN110648216A (zh) 一种风控方法和装置
EP3506599B1 (en) Method for synchronizing contact information, apparatus and medium
CN113190534A (zh) 数据库数据迁移方法及装置
CN109933595B (zh) 一种物联网设备信息共享系统、装置及终端设备
CN104219356A (zh) 一种显示搜索联系人信息的方法、装置和移动终端
CN110032578B (zh) 一种海量数据查询缓存的方法及装置
US9264870B2 (en) Mobile terminal, server and calling method based on cloud contact list
CN110474972B (zh) 一种联系人信息的同步方法和装置
CN110300222B (zh) 一种短信显示方法、系统、终端设备及计算机可读存储介质
US20140192969A1 (en) Optimized call handling for recycled telephone numbers
CN113301203B (zh) 基于通讯录对历史信息数据进行更新的方法及装置
CN114428589B (zh) 一种数据处理方法、装置、电子设备及存储介质
CN109656936A (zh) 数据同步方法、装置、计算机设备和存储介质
CN111443945A (zh) 组件代码修改方法及设备
CN101594435B (zh) 一种彩铃业务数据的管理方法和系统
CN108052521A (zh) 协调数据显示方法、应用服务器及存储介质
CN109587353B (zh) 短信号码归属信息的识别方法、装置及存储介质
CN113329117A (zh) 针对电话本应用中的电话记录数据的处理方法及装置