The present disclosure relates generally to dialing methods and systems, and more particularly, to dialing methods and systems that recognize phone numbers in a page and dial accordingly, and related apparatuses and devices.
Nowadays, content services are widely provided on Web pages through networks. Devices, such as computer systems and portable devices with network capabilities, can connect to a network and read web pages via a browser thereof. For example, a user can wirelessly browse a web page describing restaurants by a mobile phone.
To make a call to reserve a table at a restaurant, typically, people need to record the phone number listed on the web page first, and then switch to a dial function of the mobile phone to input the phone number manually.
WTA (Wireless Telephony Application) of WAP (Wireless Application Protocol) provides a specific tag similar to hyperlinks in HTML (HyperText Markup Language). When creating or editing a web page, the content provider can mark the phone number with the specific tag so that the number will be selectable. When the phone number link is selected, users can dial the number directly. WTA, however, is not popular, and is not supported in most devices. Additionally, it is time-consuming to modify existing web pages. Moreover, conventional dialing practices are inconvenient.
Dialing methods and systems, and related apparatuses and devices are provided. In an exemplary embodiment of a dialing method, a page of data is read. The page of data is parsed to obtain at least one set of numerals having a specific format. The set of numerals is set to be selectable in the page. The set of numerals is selected for dialing accordingly.
An exemplary embodiment of a dialing system comprises a browser, a parser, and a processing module. The browser reads a page of data. The parser parses the page of data to obtain at least one set of numerals having a specific format. The processing module coupled to the parser to set the set of numerals to be selectable in the page. The set of numerals is selected for dialing accordingly.
An exemplary embodiment of an apparatus for providing a set of numerals for a dialing module comprises a parser and a processing module. The parser parses a page of data read from a browser to obtain at least one set of numerals having a specific format. The processing module coupled to the parser to determine whether the set of numerals is dialable. If dialable, the processing module sets the set of numerals to be selectable in the page. The set of numerals is selected for dialing by the dialing module.
Dialing methods and systems may take the form of program code embodied in a tangible media. When the program code is loaded into and executed by a machine, the machine becomes an apparatus for practicing the disclosed method.
The invention will become more fully understood by referring to the following detailed description with reference to the accompanying drawings, wherein:
Dialing methods and systems, and related apparatuses and devices are provided.
Table 1 is an example showing an area code table 141. In table 1, each area name corresponds to an area code.
The phone number formats may be regular expressions for possible phone numbers comprising fixed lines and mobile phones. For example, the regular expressions comprise “XXXX-XXXX”, “XXXXXXXX”, “XX-XXXX-XXXX”, “XX-XXXXXXXX”, “(XX)XXXX-XXXX”, “(XX)XXXXXXXX”, “0937XXXXXXX”, “0937-XXX-XXX”, and others, in which “X” represents an arbitrary number. It is understood that the regular expressions are flexible and dependent on telecommunication systems and user behavior.
In step S201, a page of data is read using the browser 110. In step S202, the parser 120 parses the page to obtain a plurality of tokens. It is understood that the tokens may be sets of numerals, sets of characters, and others. In step S203, it is determined whether respective tokens conform to the phone number formats in the database 142. If so (Yes in step S204), in step S205, the position and length of the conforming token are recorded. It is understood that if a token conforms to the phone number formats, the token is a set of numerals. In step S206, the browser 110 sets the conforming token to be selectable in the page according to the position and length thereof. If not (No in step S204), in step S207, it is determined whether all of the tokens have been checked. If so (Yes in step S207), the procedure goes to step S208. If not (No in step S207), the procedure returns to step S204 to locate other tokens.
In step S208, it is determined whether respective tokens correspond to the area names recorded in the area code table 141. In some embodiments, the corresponding relationship can be implemented by locating the respective area name from the page. If not (No in step S209), the procedure is completed. If so (Yes in step S209), in step S210, the area code corresponding to the corresponding area name is retrieved from the area code table 141 and recorded, and in step S211, the position of the corresponding token is recorded. It is understood that if a token corresponds to the area names, the token is a set of characters.
It is further determined whether the set of numerals comprises an area code, and whether the set of numerals conforms to a mobile phone format. The corresponding result can be also recorded, as shown in Table 2. After these sets of numerals “2772-0701” and “2771-4344” are recognized as phone numbers, the sets of numerals “2772-0701” and “2771-4344” are respectively set to be selectable according to the position and length thereof. Once the sets of numerals are set to be selectable, a user can use direction keys to locate the sets of numerals. The located set of numerals is highlighted. When a predetermined key, such as dialing key is pressed, a call is dialed according to the highlighted set of numerals.
Additionally, after the tokens of the web page 300 are compared with the area names in the area code table 141, the corresponding token and position thereof is recoded, as shown in Table 3.
In step S501, it is determined whether any token has been selected. If not (No in step S501), the procedure remains at step S501. If so (Yes in step S501), in step S502, it is determined whether the selected token conforms to the mobile phone format. If so (Yes in step S502), in step S503, a number is dialed according to the content of the token via the dialing module 150. If not (No in step S502), in step S504, it is determined whether the selected token comprises an area code. If so (Yes in step S504), in step S503, a number is dialed according to the content of the token. If not (No in step S504), in step S505, an area code is retrieved for the selected token, and in step S506, a number is dialed according to the area code and the token via the dialing module 150.
In some embodiments, the area code is retrieved according to a weighting between the selected token and each of the recorded tokens corresponding to a specific area name in the area code table 141. The weighting is based on the relative position of two tokens. In some embodiments, if the selected token and a token corresponding to a specific area name are in the same row, the area code corresponding to the area name is retrieved from the area code table 141 for the selected token, instead of the area code corresponding to another token corresponding to another specific area name in the different columns of the selected token. In some embodiments, a weighting formula is as follows:
W=abs(TT.C−AT.C)×A+abs(TT.R−AT.R)×B,
where TT.C is the column value of the selected token, AT.C is the column value of the token corresponding to a specific area name, TT.R is the row value of the selected token, AT.R is the row value of the token corresponding to a specific area name, and A and B are factors, in which B>>A.
After the weightings corresponding to respective area name are calculated, the area code corresponding to the area name having the lowest weighting is retrieved for the selected token. For example, if token “2772-0701” is selected, area code “02” corresponding to area name “Taipei” is retrieved, and a call is dialed according to the area code and the phone number of the selected token in table 2 (“0227720701”).
Dialing methods and systems, or certain aspects or portions thereof, may take the form of program code (i.e., executable instructions) embodied in tangible media, such as products, floppy diskettes, CD-ROMS, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer or a device comprising a mobile phone, the machine thereby becomes an apparatus for practicing the methods. The methods may also be embodied in the form of program code transmitted over some transmission medium, such as electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as a computer or a device comprising a mobile phone, the machine becomes an apparatus for practicing the disclosed methods. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates analogously to application specific logic circuits.
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. Those who are skilled in this technology can still make various alterations and modifications without departing from the scope and spirit of this invention. Therefore, the scope of the present invention shall be defined and protected by the following claims and their equivalents.