CN114785883B - Dialing processing method and device - Google Patents

Dialing processing method and device Download PDF

Info

Publication number
CN114785883B
CN114785883B CN202210709437.7A CN202210709437A CN114785883B CN 114785883 B CN114785883 B CN 114785883B CN 202210709437 A CN202210709437 A CN 202210709437A CN 114785883 B CN114785883 B CN 114785883B
Authority
CN
China
Prior art keywords
dialed
library
dialing
information corresponding
sqlite database
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202210709437.7A
Other languages
Chinese (zh)
Other versions
CN114785883A (en
Inventor
鲍立志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Bodian Technology Co ltd
Original Assignee
Chengdu Bodian Technology Co ltd
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 Chengdu Bodian Technology Co ltd filed Critical Chengdu Bodian Technology Co ltd
Priority to CN202210709437.7A priority Critical patent/CN114785883B/en
Publication of CN114785883A publication Critical patent/CN114785883A/en
Application granted granted Critical
Publication of CN114785883B publication Critical patent/CN114785883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/27485Appending a prefix to or inserting a pause into a dialling sequence
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/27467Methods of retrieving data
    • H04M1/2748Methods of retrieving data by matching character strings

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a dialing processing method and a device, wherein the method comprises the following steps: receiving a number to be dialed, which is input by a user through the fixed telephone; if the digit number of the number to be dialed is 11 digits, inquiring administrative region information corresponding to the number to be dialed in a pre-established number library; comparing whether the administrative district information corresponding to the number to be dialed is the same as administrative district information pre-configured by the landline phone; if the numbers are the same, dialing the number to be dialed; if not, adding 0 to the top of the number to be dialed to obtain a first number to be dialed and dialing the first number to be dialed. In the scheme, after the number to be dialed is received, according to the number of digits of the number to be dialed, the administrative district information corresponding to the number to be dialed is inquired in the number library, and the administrative district information corresponding to the number to be dialed is compared with administrative district information pre-configured by a telephone, so that whether 0 needs to be added before the number to be dialed or not is determined, the dialing time is saved, automatic 0 supplementing is realized, and one-key dialing and dialing of a hidden number are realized.

Description

Dialing processing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing a dial.
Background
At present, when a mobile phone number in an other place is dialed by using a traditional telephone, 0 is added at the beginning of the mobile phone number to normally dial the mobile phone number, however, a dialing person does not know whether the dialed number is local or in the other place, if 0 is added before any number, the mobile phone number cannot be normally dialed when the local number is met, and the mobile phone number needs to be dialed twice, so that the time is wasted. In particular, since no 0 is stored in the call log, one-touch dialing cannot be performed in the call log. In addition, if the private telephone is sold, in order to prevent the client resource from leaking, 4 bits in the middle of the telephone number of the incoming call are usually hidden, the number can not be manually input for dialing when the private telephone is sold, the hidden number can only be dialed by one-key dialing, and if the private telephone number is a remote telephone number, the remote dialing can not be realized.
Therefore, the existing fixed telephone dialing mode cannot realize automatic 0 supplementing, one-key dialing and hidden number dialing, and dialing time is wasted.
Disclosure of Invention
In view of this, embodiments of the present invention provide a dialing processing method and apparatus, so as to solve the problem in the prior art that automatic 0 complementing, one-key dialing, and hidden number dialing cannot be implemented.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiment of the invention discloses a dialing processing method, which comprises the following steps:
receiving a number to be dialed, which is input by a user through a fixed telephone;
if the number to be dialed is 11 digits, inquiring administrative region information corresponding to the number to be dialed in a pre-established number library, wherein the number library is established based on a sqlite database and comprises all number segments and administrative region information corresponding to the number segments;
comparing whether the administrative district information corresponding to the number to be dialed is the same as administrative district information pre-configured by the landline phone;
if the numbers are the same, dialing the numbers to be dialed out;
if not, adding 0 to the forefront of the number to be dialed to obtain a first number to be dialed, and dialing out the first number to be dialed.
Optionally, the method further includes:
if the digits of the number to be dialed are 12 digits, judging whether the foremost digit of the number to be dialed is 0;
if the foremost digit of the number to be dialed is 0, deleting the foremost 0 of the number to be dialed, and inquiring administrative area information corresponding to the number to be dialed in the number library;
comparing whether the administrative region information corresponding to the number to be dialed is the same as administrative region information pre-configured by the fixed telephone;
if the numbers are the same, deleting the foremost 0 of the numbers to be dialed to obtain a second number to be dialed, and dialing the second number to be dialed;
if not, dialing the number to be dialed;
and if the foremost digit of the number to be dialed is not 0, dialing the number to be dialed.
Optionally, the process of pre-establishing the number library includes:
establishing an initial number library;
acquiring a plain text file storing number data in a plain text form, wherein the number data comprises all number segments and administrative area information corresponding to the number segments;
converting the plain text file into a sqlite database generation file based on a sqlite database tool, wherein the sqlite database generation file is stored in a program package or a disk file;
and initializing the initial number library by using the sqlite database generation file to generate a number library.
Optionally, the method further includes:
when a number data updating request is acquired, downloading a latest sqlite database generation file based on the number data request, wherein the number data request comprises number supplementing or deleting information;
and replacing the sqlite database generation file with the latest sqlite database generation file to obtain the latest number library.
Optionally, the querying, in a pre-established number library, the administrative area information corresponding to the number to be dialed includes:
packaging the number to be dialed into a uniform resource identifier uri;
calling a query interface corresponding to a pre-established number library according to the uniform resource identifier uri;
inquiring whether a number segment matched with the number to be dialed exists in the number library based on the inquiry interface;
and inquiring administrative area information corresponding to the number to be dialed in the number library based on the number segment.
Optionally, the method further includes:
when a number corresponding to one-touch dialing is received, the number of digits of the number is judged, and the dialing processing method in any one of the first aspect of the embodiments of the present invention is executed based on the number of digits of the number.
A second aspect of the embodiments of the present invention discloses a dial processing apparatus, including:
the receiving module is used for receiving the number to be dialed, which is input by a user through the fixed telephone;
the first query module is used for querying administrative region information corresponding to the number to be dialed in a pre-established number library if the digit number of the number to be dialed is 11 digits, wherein the number library is established based on an sqlite database and comprises all number segments and administrative region information corresponding to the number segments;
the first comparison module is used for comparing whether the administrative district information corresponding to the number to be dialed is the same as the administrative district information pre-configured by the telephone, if so, the first processing module is executed, and if not, the second processing module is executed;
the first processing module is used for dialing the number to be dialed;
and the second processing module is used for adding 0 to the forefront of the number to be dialed to obtain a first number to be dialed and dialing out the first number to be dialed.
Optionally, the method further includes:
the judging module is used for judging whether the foremost digit of the number to be dialed is 0 if the digit of the number to be dialed is 12 digits, executing the second inquiring module if the foremost digit of the number to be dialed is 0, and executing the first processing module if the foremost digit of the number to be dialed is not 0;
the second query module is used for deleting the foremost 0 of the number to be dialed and querying administrative area information corresponding to the number to be dialed in the number library;
the second comparison module is used for comparing whether the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the fixed telephone or not, if so, the third processing module is executed, and if not, the first processing module is executed;
and the third processing module is used for deleting the foremost 0 of the numbers to be dialed, obtaining a second number to be dialed and dialing out the second number to be dialed.
Optionally, the method further includes: the pre-establishing module is used for pre-establishing a number library;
the pre-establishment module comprises:
the establishing unit is used for establishing an initial number library;
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a plain text file for storing number data in a plain text form, and the number data comprises all number segments and administrative area information corresponding to the number segments;
the conversion unit is used for converting the plain text file into a sqlite database generation file based on a sqlite database tool, wherein the sqlite database generation file is stored in a program package or a disk file;
and the initialization unit is used for initializing the initial number library by using the sqlite database generation file to generate the number library.
Optionally, the method further includes:
the download unit is used for downloading the latest sqlite database generation file based on the number data request when the number data update request is acquired, wherein the number data request comprises number information supplement or deletion;
and the replacing unit is used for replacing the sqlite database generation file with the latest sqlite database generation file to obtain a latest number library.
Based on the dialing processing method and the device provided by the embodiment of the invention, the method comprises the following steps: receiving a number to be dialed, which is input by a user through the fixed telephone; if the number to be dialed is 11 digits, inquiring administrative region information corresponding to the number to be dialed in a pre-established number library, wherein the number library is established based on a sqlite database and comprises all number segments and administrative region information corresponding to the number segments; comparing whether the administrative district information corresponding to the number to be dialed is the same as administrative district information pre-configured by the landline phone; if the numbers are the same, dialing the numbers to be dialed out; if not, adding 0 to the forefront of the number to be dialed to obtain a first number to be dialed, and dialing out the first number to be dialed. In the scheme, after the number to be dialed is received, according to the number of digits of the number to be dialed, the administrative district information corresponding to the number to be dialed is inquired in the number library, and the administrative district information corresponding to the number to be dialed is compared with administrative district information pre-configured by a telephone, so that whether 0 needs to be added before the number to be dialed or not is determined, the dialing time is saved, automatic 0 supplementing is realized, and one-key dialing and dialing of a hidden number are realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a dialing processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of pre-establishing a number library according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of another pre-established number library according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a process of querying administrative area information corresponding to a number to be dialed in a number library according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a dial processing device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein.
In order to facilitate understanding of the technical solution of the present invention, technical terms appearing in the present invention are explained:
a fixed-line machine: a telephone using a telephone line.
An android system: an operating system for a mobile device.
sqlite database: a database technology used in a mobile device can store a large amount of data and can query the data quickly and efficiently.
Remote dialing 0: when the fixed-line telephone is used for dialing, if the mobile phone number of the different place is dialed, 0 is added.
ContentProvider: the method is a data sharing mode among the processes in the android, and the data is quickly and efficiently transmitted among the processes by using a unique binder technology of an android system.
And (4) process: the task of executing programs in the operating system is that in the fixed telephone, applications such as dialing and setting are applied to run in different processes.
Administrative areas: each fixed telephone area number corresponds to one area, and the number section of the mobile phone number belongs to the areas.
As known from the background art, the existing landline dialing method cannot realize automatic 0 complementing, and cannot realize one-key dialing and hidden number dialing, thereby wasting the dialing time.
Therefore, in the present disclosure, after a number to be dialed is received, the administrative area information corresponding to the number to be dialed is queried in a number library according to the number of digits of the number to be dialed, and the administrative area information corresponding to the number to be dialed is compared with administrative area information pre-configured by a telephone, so as to determine whether to add 0 in front of the number to be dialed, thereby saving dialing time, and implementing automatic 0 supplementing, one-key dialing and hidden number dialing.
Fig. 1 is a schematic flow chart of a dialing processing method according to an embodiment of the present invention.
It should be noted that the dialing processing method is applicable to a landline system.
Optionally, in a specific embodiment, the dialing processing method is applicable to a desktop application process of a landline system.
It should be noted that the desktop application process is an app, and is used as an intermediary to manage the database for other apps to query data.
The dialing processing method mainly comprises the following steps:
step S101: and receiving the number to be dialed input by the user through the fixed telephone.
In the process of implementing step S101 specifically, when the user dials through the landline, the landline system receives the number to be dialed, which is input by the user through the landline.
Step S102: and judging whether the number of digits of the number to be dialed is 11 digits, if so, executing step S103, and if not, executing step S107.
In the process of implementing step S102 specifically, after receiving the number to be dialed input by the user through the landline, the landline system first determines whether the digit of the number to be dialed is 11 digits, if so, executes step S103, otherwise, indicates that the digit of the number to be dialed is not 11 digits, the digit of the number to be dialed may be 12 digits, and the digit of the number to be dialed may be other digits, and executes step S107.
Step S103: and inquiring administrative region information corresponding to the number to be dialed in a pre-established number library.
In step S103, a number library is established based on the sqlite database, and the number library includes all number segments and administrative area information corresponding to the number segments.
In the process of implementing step S103, a number library is established in advance, and after determining that the digit number of the number to be dialed is 11 digits, the landline system queries administrative area information corresponding to the number to be dialed in the established number library.
Step S104: and comparing whether the administrative district information corresponding to the number to be dialed is the same as the administrative district information preset by the landline phone, if so, executing the step S105, and if not, executing the step S106.
In step S104, an area code of the base unit is set in the setting option of the base unit system, and the area code is used for identifying the administrative area information of the base unit, in other words, the administrative area information of the base unit is configured in advance.
It should be noted that the area code set in the setting option of the base unit system is stored in the file of the base unit system, that is, stored in the disk file, and all application processes can be acquired.
In the process of specifically implementing the step S104, whether the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the landline phone is compared, if so, the step S105 is executed if the number to be dialed is the local number, and if not, the step S106 is executed if the number to be dialed is not the local number.
Step S105: and dialing the number to be dialed.
In the process of specifically implementing step S105, it is obtained through comparison that the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the landline telephone, and if the number to be dialed is a local number, the number to be dialed is directly dialed.
Step S106: and adding 0 to the forefront of the number to be dialed to obtain a first number to be dialed and dialing the first number to be dialed.
In the embodiment of the invention, the first number to be dialed is a foreign number.
In the process of implementing step S106 specifically, it is obtained through comparison that the administrative area information corresponding to the number to be dialed is different from the administrative area information pre-configured by the landline telephone, and it is stated that the number to be dialed is not a local number, 0 is added to the forefront of the number to be dialed to obtain a first number to be dialed, and the first number to be dialed is dialed, that is, 0 is added to the forefront of the number to be dialed to obtain an external number, and the external number is dialed.
Step S107: and judging whether the number of digits of the number to be dialed is 12 digits, if so, executing step S108, and if not, executing step S105.
In the process of implementing step S107 specifically, when the landline telephone system receives the number to be dialed input by the user through the landline telephone and determines that the number of digits of the number to be dialed is not 11 digits, it needs to determine whether the number of digits of the number to be dialed is 12 digits, if so, step S108 is executed, and if not, it indicates that the number of digits of the number to be dialed is neither 11 digits, nor 12 digits, step S105 is executed.
Step S108: and judging whether the foremost digit of the number to be dialed is 0, if so, executing step S109, and if not, executing step S105.
In the process of implementing step S108, it is determined whether the foremost digit of the number to be dialed is 0, if so, step S109 is executed, and if not, it is determined that the foremost digit of the number to be dialed is not 0, the number to be dialed is directly dialed, that is, step S105 is executed.
Step S109: and deleting the foremost 0 of the number to be dialed, and inquiring administrative area information corresponding to the number to be dialed in a number library.
In the process of implementing step S109 specifically, after determining that the foremost digit of the number to be dialed is 0, deleting the foremost 0 of the number to be dialed, and querying the administrative area information corresponding to the number to be dialed in the number library.
Step S110: and comparing whether the administrative district information corresponding to the number to be dialed is the same as the administrative district information preset by the landline phone, if so, executing step S111, and if not, executing step S105.
In the process of implementing step S110 specifically, comparing whether the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the landline telephone, if so, indicating that the number to be dialed is a local number, executing step S111, otherwise, indicating that the administrative area information corresponding to the number to be dialed is not the same as the administrative area information pre-configured by the landline telephone, and if not, directly dialing the number to be dialed, namely executing step S105.
Step S111: and deleting the foremost 0 of the numbers to be dialed to obtain a second number to be dialed, and dialing the second number to be dialed.
In the embodiment of the invention, the second number to be dialed is a local number.
In the process of specifically implementing step S111, if it is obtained through comparison that the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the landline telephone, the first 0 of the number to be dialed is deleted, a second number to be dialed is obtained, and the second number to be dialed is dialed, that is, the first 0 of the number to be dialed is deleted, a local number is obtained, and the local number is dialed.
Optionally, after the step is performed, the method further includes:
when the number corresponding to the one-touch dialing is received, the number digits are judged, and the dialing processing method from the step S102 to the step S111 is executed based on the number digits of the number.
Optionally, after the foregoing steps are performed, the method further includes:
when receiving the corresponding number of the dialing hidden number, judging the number digit of the number, and executing the dialing processing method from the step S102 to the step S111 based on the number digit of the number.
It is understood that when a corresponding number to dial a hidden number is received, that is, a corresponding number to one-touch dial is received, the number of digits of the number is determined, and the dial processing method of steps S102 to S111 is performed based on the number of digits of the number.
The dialing processing method provided by the embodiment of the invention receives the number to be dialed, which is input by a user through a fixed telephone; if the number to be dialed is 11 digits, inquiring administrative region information corresponding to the number to be dialed in a pre-established number library, wherein the number library is established based on a sqlite database and comprises all number segments and administrative region information corresponding to the number segments; comparing whether the administrative region information corresponding to the number to be dialed is the same as administrative region information pre-configured by the fixed telephone; if the number is the same, dialing the number to be dialed; if not, adding 0 to the top of the number to be dialed to obtain a first number to be dialed and dialing the first number to be dialed. In the scheme, after the number to be dialed is received, according to the number of digits of the number to be dialed, the administrative district information corresponding to the number to be dialed is inquired in the number library, and the administrative district information corresponding to the number to be dialed is compared with administrative district information pre-configured by a telephone, so that whether 0 needs to be added before the number to be dialed or not is determined, the dialing time is saved, automatic 0 supplementing is realized, and one-key dialing and dialing of a hidden number are realized.
Based on the foregoing dialing processing method provided in the embodiment of the present invention, a process of querying administrative area information corresponding to a number to be dialed in a number library established in advance in step S103 is executed, as shown in fig. 2, which is a schematic flow diagram of a number library established in advance according to an embodiment of the present invention, and the method mainly includes the following steps:
step S201: and establishing an initial number library.
In step S201, the initial number library is a blank initial number library.
In the process of implementing step S201, when a number library is generated, the number library is generated on the basis of a blank number library, and a blank initial number library is first established.
Step S202: a plain text file storing number data in plain text form is obtained.
In step S202, the number data includes all number segments and administrative area information corresponding to the number segments.
In embodiments of the present invention, plain text files include, but are not limited to, CSV files.
Note that, CSV (Comma-Separated Values) is used because the Separated characters may not be commas, and the file stores table data (numbers and text) in plain text.
Plain text means that the file is a sequence of characters, containing no data that must be interpreted like binary digits. CSV files are composed of any number of records, and the records are separated by a certain linefeed character; each record is made up of fields, and the separators between fields are other characters or strings, most commonly commas or tabs. Usually, all records have the same field sequence, all are plain text files, and are recommended to be opened by WORDPAD or notepad, and then opened by EXCEL after new files are stored.
In the process of implementing step S202, after the blank initial number library is established, number data necessary for generating the number library needs to be acquired, and a plain text file storing the number data in a plain text form is specifically acquired.
Step S203: and converting the plain text file into a sqlite database generation file based on the sqlite database tool.
In step S203, the sqlite database generation file is stored in a package or a disk file.
In embodiments of the present invention, the sqlite database generation file includes, but is not limited to, a db file.
In embodiments of the present invention, the sqlite database tool includes, but is not limited to, SQL pro for sqlite.
It should be noted that SQL pro for sqlite is a tool on the macos system.
In the process of implementing step S203 specifically, the obtained plain text file is converted into a sql ite database generation file based on the sql ite database tool.
That is, the obtained plain text file is converted into a SQL lite database generation file using SQL pro for SQL.
Step S204: and initializing an initial number library by using the sqlite database generation file to generate a number library.
It is understood that in the desktop application process of the desktop system, the sqlite database is initialized by using the db file, that is, the initial number library is initialized by using the db file, and the number library is generated.
Note that the interface for initializing the database using the db file is sqlitedatabase.
According to the dialing processing method provided by the embodiment of the invention, the initial number library is initialized by utilizing the sqlite database generation file, the number library is generated, and a data query basis is provided for querying administrative area information corresponding to the number to be dialed in the number library subsequently, so that the dialing time is saved, the automatic 0 complementing, one-key dialing and the dialing of the hidden number are realized.
Based on the above-mentioned dialing processing method provided in the embodiment of the present invention, a process of querying administrative area information corresponding to a number to be dialed in a pre-established number library in step S103 is executed, as shown in fig. 3, a schematic flow diagram of another pre-established number library provided in the embodiment of the present invention mainly includes the following steps:
step S301: and establishing an initial number library.
Step S302: a plain text file storing number data in plain text form is obtained.
Step S303: and converting the plain text file into a sqlite database generation file based on the sqlite database tool.
Step S304: and initializing an initial number library by using the sqlite database generation file to generate a number library.
It should be noted that the execution principle and procedure of the above steps S301 to S304 are the same as the execution principle and procedure of the steps S201 to S204 disclosed in fig. 2, and it can be referred to that, which is not described herein again.
Step S305: and judging whether a request for updating the number data is acquired, if so, executing step S306, and if not, continuing to execute step S305.
In step S305, the number data request includes addition or deletion of number information.
Step S306: and downloading the latest sqlite database generation file based on the number data request.
In the process of specifically implementing step S306, when the update number data request is acquired, the latest sql ite database generation file is downloaded from the server of the landline system based on the acquired update number data request.
Step S307: and replacing the sqlite database generation file with the latest sqlite database generation file to obtain the latest number library.
In the process of specifically implementing step S307, the sql ite database generation file is replaced with the latest sql ite database generation file based on the downloaded latest sql ite database generation file, and the latest number library is obtained.
That is, the latest db file is used to replace the local db file, so as to obtain the latest number library.
According to the dialing processing method provided by the embodiment of the invention, when the number data updating request is obtained, the sqlite database is replaced to generate a file based on the obtained number data updating request, the latest number library is obtained, and a data query basis is provided for querying administrative area information corresponding to the number to be dialed in the number library subsequently, so that the dialing time is saved, and automatic 0 supplementing, one-key dialing and hidden number dialing are realized.
Based on the dialing processing method provided in the foregoing embodiment of the present invention, a process of querying information of an administrative area corresponding to a number to be dialed in a number library established in advance in step S103 is executed, as shown in fig. 4, a schematic flow diagram for querying information of an administrative area corresponding to a number to be dialed in a number library provided in an embodiment of the present invention mainly includes the following steps:
step S401: and encapsulating the number to be dialed into a uniform resource identifier uri.
In the process of implementing step S401 specifically, after receiving a number to be dialed input by a user through a landline and determining that the digit of the number to be dialed is 11 digits, the number to be dialed is encapsulated into a uniform resource identifier uri.
Step S402: and calling a query interface corresponding to the pre-established number library according to a Uniform Resource Identifier (uri).
In step S402, the query interface includes, but is not limited to, a query interface.
It should be noted that, because the number library is located in the desktop process of the landline system, other application processes such as dialing, setting, and the like cannot directly access the number library, and the ContentProvider needs to be used to share data with other processes, the ContentProvider is created in the desktop process, the query interface of the ContentProvider is used to provide data to other processes, and the interface can query data from the database according to uri provided by other processes, and then return the obtained result.
The result returned by the obtained result is administrative district information of a number or administrative district information of an area code.
It should be noted that the uniform resource identifier uri includes an address of the query interface.
In the process of implementing step S402, an address of a query interface corresponding to the pre-established number repository is obtained according to a Uniform Resource Identifier (uri), and then the query interface corresponding to the pre-established number repository is called based on the address of the query interface corresponding to the pre-established number repository.
Step S403: and inquiring whether a number segment matched with the number to be dialed exists in the number library based on the inquiry interface.
In the process of implementing step S403 specifically, based on the query interface, it is queried whether there is a number segment matching the number to be dialed in the number library, and if so, it is determined that the number segment matching the number to be dialed is queried.
Step S404: and inquiring administrative area information corresponding to the number to be dialed in the number library based on the number segment.
In the process of implementing step S404 specifically, after the number segment matched with the number to be dialed is queried, based on the number segment, it is queried whether there is administrative area information corresponding to the number to be dialed in the number segment, and if there is administrative area information corresponding to the number to be dialed in the query number library, it is described.
Based on the uniform resource identifier uri obtained by encapsulation, the inquiry interface corresponding to the number to be dialed is called to inquire the administrative area information corresponding to the number to be dialed, and data support is provided for subsequent comparison of the administrative area information corresponding to the number to be dialed and administrative area information pre-configured by a telephone, so that the dialing time is saved, automatic 0 compensation is realized, one-key dialing is realized, and a hidden number is dialed.
Corresponding to the dialing processing method shown in the above embodiment of the present invention, an embodiment of the present invention further provides a dialing processing apparatus, as shown in fig. 5, where the dialing processing apparatus includes: a receiving module 51, a first query module 52, a first comparison module 53, a first processing module 54 and a second processing module 55.
And the receiving module 51 is used for receiving the number to be dialed, which is input by the user through the fixed telephone.
The first query module 52 is configured to query, in a pre-established number library, administrative area information corresponding to a number to be dialed if the number to be dialed is 11 digits.
The number library is established based on the sqlite database, and the number library comprises all number sections and administrative area information corresponding to the number sections.
And the first comparison module 53 is used for comparing whether the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the fixed telephone, if so, executing the first processing module, and if not, executing the second processing module.
The first processing module 54 is used for dialing the number to be dialed.
And the second processing module 55 is configured to add 0 to the foremost of the numbers to be dialed to obtain a first number to be dialed, and dial the first number to be dialed.
It should be noted that, the specific principle and the execution process of each module in the dialing processing apparatus disclosed in the above embodiment of the present invention are the same as the dialing processing method implemented in the above embodiment of the present invention, and reference may be made to the corresponding parts in the dialing processing method disclosed in the above embodiment of the present invention, which are not described again here.
The dialing processing device provided by the embodiment of the invention receives the number to be dialed, which is input by a user through a fixed telephone; if the number to be dialed is 11 digits, inquiring administrative region information corresponding to the number to be dialed in a pre-established number library, wherein the number library is established based on a sqlite database and comprises all number segments and administrative region information corresponding to the number segments; comparing whether the administrative district information corresponding to the number to be dialed is the same as administrative district information pre-configured by the landline phone; if the numbers are the same, dialing the number to be dialed; if not, 0 is added to the forefront of the number to be dialed to obtain a first number to be dialed, and the first number to be dialed is dialed. In the scheme, after the number to be dialed is received, according to the number of digits of the number to be dialed, the administrative district information corresponding to the number to be dialed is inquired in the number library, and the administrative district information corresponding to the number to be dialed is compared with administrative district information pre-configured by a telephone, so that whether 0 needs to be added before the number to be dialed or not is determined, the dialing time is saved, automatic 0 supplementing is realized, and one-key dialing and dialing of a hidden number are realized.
Based on the dialing processing device shown in fig. 5, in combination with fig. 5, the dialing processing device is further provided with a determining module, a second querying module, a second comparing module, and a third processing module.
And the judging module is used for judging whether the foremost digit of the number to be dialed is 0 or not if the digit of the number to be dialed is 12 digits, executing the second inquiring module if the foremost digit of the number to be dialed is 0, and executing the first processing module if the foremost digit of the number to be dialed is not 0.
And the second query module is used for deleting the foremost 0 of the number to be dialed and querying administrative area information corresponding to the number to be dialed in the number library.
And the second comparison module is used for comparing whether the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the fixed telephone, if so, executing the third processing module, and if not, executing the first processing module.
And the third processing module is used for deleting the foremost 0 of the numbers to be dialed, obtaining a second number to be dialed and dialing the second number to be dialed.
According to the dialing processing device provided by the embodiment of the invention, after the number to be dialed is received, the administrative area information corresponding to the number to be dialed is inquired in the number library according to the digits of the number to be dialed, and the administrative area information corresponding to the number to be dialed is compared with the administrative area information pre-configured by the telephone, so that whether 0 needs to be added in front of the number to be dialed is determined, the dialing time is saved, the automatic 0 complementing is realized, and the hidden number is dialed by one key.
Based on the dialing processing device shown in fig. 5, in combination with fig. 5, the dialing processing device is further provided with a pre-establishment module for pre-establishing a number library.
A pre-establishment module comprising:
and the establishing unit is used for establishing an initial number library.
An acquisition unit configured to acquire a plain text file storing number data in a plain text form.
The number data comprises all number segments and administrative area information corresponding to the number segments.
And the conversion unit is used for converting the pure text file into the sqlite database generation file based on the sqlite database tool.
And the sqlite database generation file is stored in a program package or a disk file.
And the initialization unit is used for initializing the initial number library by using the sqlite database generation file and generating the number library.
According to the dialing processing device provided by the embodiment of the invention, the initial number library is initialized by utilizing the sqlite database generation file, the number library is generated, and a data query basis is provided for querying administrative area information corresponding to the number to be dialed in the number library subsequently, so that the dialing time is saved, the automatic 0 complementing, one-key dialing and the dialing of the hidden number are realized.
Based on the dialing processing apparatus shown in fig. 5, in combination with fig. 5, the pre-establishment module further includes:
and the downloading unit is used for downloading the latest sqlite database generation file based on the number data request when the number data updating request is acquired.
Wherein the number data request includes supplementing or deleting number information.
And the replacing unit is used for replacing the sqlite database generation file with the latest sqlite database generation file to obtain the latest number library.
According to the dialing processing device provided by the embodiment of the invention, when the number data updating request is obtained, the sqlite database is replaced to generate a file based on the obtained number data updating request, the latest number library is obtained, and a data query basis is provided for querying administrative area information corresponding to the number to be dialed in the number library subsequently, so that the dialing time is saved, the automatic 0 supplementing, one-key dialing and the dialing of the hidden number are realized.
Optionally, based on the first query module 52 shown in fig. 5, the first query module 52 is specifically configured to:
packaging the number to be dialed into a uniform resource identifier uri; calling a query interface corresponding to a pre-established number library according to the uniform resource identifier uri; based on the query interface, querying the number section which is matched with the number to be dialed and exists in the number library; and inquiring administrative area information corresponding to the number to be dialed in the number library based on the number segment.
Based on the uniform resource identifier uri obtained by encapsulation, the dial processing device provided by the embodiment of the invention calls the inquiry interface corresponding to the number library to inquire the administrative area information corresponding to the number to be dialed, and provides data support for subsequent comparison of the administrative area information corresponding to the number to be dialed and the administrative area information pre-configured by the telephone, thereby saving the dial time, realizing automatic 0 compensation, one-key dial and dial of hidden numbers.
Based on the dialing processing device shown in fig. 5, in conjunction with fig. 5, the dialing processing device is further provided with a one-key dialing module;
and the one-key dialing module is used for judging the digits of the number when receiving the number corresponding to the one-key dialing and executing the dialing processing method in the figure 1 based on the digits of the number.
Based on the dialing processing device provided by the embodiment of the invention, when the corresponding number of one-key dialing is received, the dialing processing method shown in the figure 1 is executed based on the digits of the number, so that the dialing time is saved, and automatic 0 complementing, one-key dialing and hidden number dialing are realized.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method of dial processing, the method comprising:
receiving a number to be dialed input by a user through the landline phone, or receiving a corresponding number to be dialed of the hidden number;
if the number to be dialed is 11 digits, inquiring administrative region information corresponding to the number to be dialed in a pre-established number library, wherein the number library is established based on a sqlite database and comprises all number segments and administrative region information corresponding to the number segments;
comparing whether the administrative region information corresponding to the number to be dialed is the same as administrative region information pre-configured by the fixed telephone;
if the number is the same as the local number, determining that the number to be dialed is the local number, and dialing the number to be dialed;
if not, determining that the number to be dialed is not a local number, adding 0 to the forefront of the number to be dialed to obtain a first number to be dialed, and dialing out the first number to be dialed;
if the digits of the number to be dialed are 12 digits, judging whether the foremost digit of the number to be dialed is 0;
if the foremost digit of the number to be dialed is 0, deleting the foremost 0 of the number to be dialed, and inquiring administrative area information corresponding to the number to be dialed in the number library;
comparing whether the administrative region information corresponding to the number to be dialed is the same as administrative region information pre-configured by the fixed telephone;
if the numbers are the same, deleting the foremost 0 of the numbers to be dialed to obtain a second number to be dialed, and dialing the second number to be dialed;
if not, dialing the number to be dialed;
and if the foremost digit of the number to be dialed is not 0, dialing the number to be dialed.
2. The method of claim 1, wherein the pre-establishing a number library comprises:
establishing an initial number library;
acquiring a plain text file storing number data in a plain text form, wherein the number data comprises all number segments and administrative area information corresponding to the number segments;
converting the pure text file into a sqlite database generation file based on a sqlite database tool, wherein the sqlite database generation file is stored in a program package or a disk file;
and initializing the initial number library by using the sqlite database generation file to generate a number library.
3. The method of claim 2, further comprising:
when a number data updating request is acquired, downloading a latest sqlite database generation file based on the number data request, wherein the number data request comprises number supplementing or deleting information;
and replacing the sqlite database generation file with the latest sqlite database generation file to obtain the latest number library.
4. The method according to claim 1, wherein the inquiring the administrative area information corresponding to the number to be dialed in the pre-established number library comprises:
packaging the number to be dialed into a uniform resource identifier uri;
calling a query interface corresponding to a pre-established number library according to the uniform resource identifier uri;
inquiring whether a number segment matched with the number to be dialed exists in the number library based on the inquiry interface;
and inquiring administrative area information corresponding to the number to be dialed in the number library based on the number segment.
5. The method of claim 1, further comprising:
when a number corresponding to one-touch dialing is received, the number digits are judged, and the dialing processing method of claim 1 is executed based on the number digits of the number.
6. A dial processing apparatus, comprising:
the receiving module is used for receiving the number to be dialed input by a user through the landline phone or receiving the number to be dialed corresponding to the hidden number;
the first query module is used for querying administrative region information corresponding to the number to be dialed in a pre-established number library if the digit number of the number to be dialed is 11 digits, wherein the number library is established based on an sqlite database and comprises all number segments and administrative region information corresponding to the number segments;
the first comparison module is used for comparing whether the administrative area information corresponding to the number to be dialed is the same as administrative area information pre-configured by a fixed-line telephone, if so, the number to be dialed is determined to be a local number, the first processing module is executed, and if not, the number to be dialed is determined not to be the local number, and the second processing module is executed;
the first processing module is used for dialing the number to be dialed;
the second processing module is used for adding 0 to the forefront of the number to be dialed to obtain a first number to be dialed and dialing out the first number to be dialed;
the judging module is used for judging whether the foremost digit of the number to be dialed is 0 or not if the digit of the number to be dialed is 12 digits, executing the second inquiring module if the foremost digit of the number to be dialed is 0, and executing the first processing module if the foremost digit of the number to be dialed is not 0;
the second query module is used for deleting the foremost 0 of the number to be dialed and querying administrative area information corresponding to the number to be dialed in the number library;
the second comparison module is used for comparing whether the administrative area information corresponding to the number to be dialed is the same as the administrative area information pre-configured by the fixed telephone or not, if so, the third processing module is executed, and if not, the first processing module is executed;
and the third processing module is used for deleting the foremost 0 of the numbers to be dialed, obtaining a second number to be dialed and dialing out the second number to be dialed.
7. The apparatus of claim 6, further comprising: the pre-establishing module is used for pre-establishing a number library;
the pre-establishment module comprises:
the establishing unit is used for establishing an initial number library;
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a plain text file for storing number data in a plain text form, and the number data comprises all number segments and administrative area information corresponding to the number segments;
the conversion unit is used for converting the plain text file into a sqlite database generation file based on a sqlite database tool, wherein the sqlite database generation file is stored in a program package or a disk file;
and the initialization unit is used for initializing the initial number library by using the sqlite database generation file to generate the number library.
8. The apparatus of claim 7, further comprising:
the download unit is used for downloading the latest sqlite database generation file based on the number data request when the number data update request is acquired, wherein the number data request comprises number information supplement or deletion;
and the replacing unit is used for replacing the sqlite database generation file with the latest sqlite database generation file to obtain a latest number library.
CN202210709437.7A 2022-06-22 2022-06-22 Dialing processing method and device Active CN114785883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210709437.7A CN114785883B (en) 2022-06-22 2022-06-22 Dialing processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210709437.7A CN114785883B (en) 2022-06-22 2022-06-22 Dialing processing method and device

Publications (2)

Publication Number Publication Date
CN114785883A CN114785883A (en) 2022-07-22
CN114785883B true CN114785883B (en) 2022-11-22

Family

ID=82422245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210709437.7A Active CN114785883B (en) 2022-06-22 2022-06-22 Dialing processing method and device

Country Status (1)

Country Link
CN (1) CN114785883B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1297302A (en) * 2000-12-24 2001-05-30 杨枕 Alarm method and device with default secondary dialing call based on local telephone network
CN102438081A (en) * 2011-08-29 2012-05-02 惠州Tcl移动通信有限公司 Method and mobile terminal device for automatically dialing internet protocol (IP) toll number
CN202261477U (en) * 2011-08-30 2012-05-30 北京平治东方科技发展有限公司 Fixed-line telephone capable of displaying incoming call district and calling back incoming call
CN102958037A (en) * 2011-08-25 2013-03-06 联芯科技有限公司 Dialing method and dialing device for mobile terminal
CN103259900A (en) * 2012-05-29 2013-08-21 杨鹏 Call making system and call making method thereof
CN106131807A (en) * 2016-07-20 2016-11-16 上海携程商务有限公司 The outer paging system of intelligence of call center
CN205812151U (en) * 2016-07-08 2016-12-14 黄冈职业技术学院 Possess long-distance mobile phone and redial the telephone set of key
CN106302916A (en) * 2015-06-05 2017-01-04 北京京东尚科信息技术有限公司 Telephone set
CN107332964A (en) * 2017-06-27 2017-11-07 平安万家医疗投资管理有限责任公司 Automatic decision toll number matches method, device and the storage medium of mood profile
CN108156171A (en) * 2018-01-08 2018-06-12 北京鸿博信通科技有限公司 IP phone exchange system and exchange method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6556664B1 (en) * 1994-06-20 2003-04-29 Sigma Communications, Inc. Public notification system and method
US6813346B2 (en) * 1998-08-10 2004-11-02 Sbc Properties, L.P. System and method for selecting a destination number upon receiving a dialed number from a calling party
US20110098028A1 (en) * 2009-10-22 2011-04-28 General Motors Company Method and system for updating a mobile dialing number of a telematics-equipped mobile vehicle
CN106550084B (en) * 2016-12-06 2019-06-04 北京安云世纪科技有限公司 Directory number format processing method, system and its equipment
CN109587354A (en) * 2018-12-20 2019-04-05 平安科技(深圳)有限公司 Communication hiding number method, apparatus, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1297302A (en) * 2000-12-24 2001-05-30 杨枕 Alarm method and device with default secondary dialing call based on local telephone network
CN102958037A (en) * 2011-08-25 2013-03-06 联芯科技有限公司 Dialing method and dialing device for mobile terminal
CN102438081A (en) * 2011-08-29 2012-05-02 惠州Tcl移动通信有限公司 Method and mobile terminal device for automatically dialing internet protocol (IP) toll number
CN202261477U (en) * 2011-08-30 2012-05-30 北京平治东方科技发展有限公司 Fixed-line telephone capable of displaying incoming call district and calling back incoming call
CN103259900A (en) * 2012-05-29 2013-08-21 杨鹏 Call making system and call making method thereof
CN106302916A (en) * 2015-06-05 2017-01-04 北京京东尚科信息技术有限公司 Telephone set
CN205812151U (en) * 2016-07-08 2016-12-14 黄冈职业技术学院 Possess long-distance mobile phone and redial the telephone set of key
CN106131807A (en) * 2016-07-20 2016-11-16 上海携程商务有限公司 The outer paging system of intelligence of call center
CN107332964A (en) * 2017-06-27 2017-11-07 平安万家医疗投资管理有限责任公司 Automatic decision toll number matches method, device and the storage medium of mood profile
CN108156171A (en) * 2018-01-08 2018-06-12 北京鸿博信通科技有限公司 IP phone exchange system and exchange method

Also Published As

Publication number Publication date
CN114785883A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
US7627767B2 (en) Methods and systems for remotely securing data in a wireless device in a communications network
CN1729468B (en) Data synchronization
US7162474B1 (en) Recipient controlled contact directories
CN100586211C (en) Method and system for implementing real name calling service based on mobile terminal client terminal module
US9532196B2 (en) Method for implementing unstructured supplementary service data service
WO2002058364A2 (en) Method and apparatus for automatic update of the prefixes of telephone numbers in the phonebook
US9270821B2 (en) Methods and apparatus to provide contact management with directory assistance
CN101945184B (en) IVR (Interactive Voice Response) realization method and device based on NGN (Next Generation Network) network
CA2544008C (en) Centralized personal directory scheme for communications networks
CN114785883B (en) Dialing processing method and device
CN102365856A (en) Method and system for sending messages over telecommunication networks
US10079932B2 (en) Method and system for logging and reporting call detail information
US8189756B2 (en) Telephone menu selection
US20090016508A1 (en) System and method for generating a personalized bill using a personal address book
US20040127205A1 (en) Over the air maintenance of mobile station telephone directories
WO2008079936A1 (en) Methods and apparatus for dial string to contact matching in a wireless communication device
US6009322A (en) Automated Private Numbering Plan (PNP) subscription provisioning
CN113810535B (en) Information processing method and electronic device
CN100579268C (en) A '+' code dialing method and system for the mobile console
CN110545527B (en) Call forwarding method, video communication server and calling terminal
CN107820222B (en) Method and device for managing multiple tenants
CN1539236A (en) Method for determining billing target
US20060199573A1 (en) Mobile unit and method for efficiently establishing a multi-party call
CN107835284B (en) Voice call method and device of gateway equipment
CN100536508C (en) Method and system for performing color message reporting to enquiry terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant