1. Technical Field
Embodiments of the present disclosure relate to network technology, and particularly to an electronic device and method for managing packet transmission using the electronic device. 2. Description of Related Art
When an electronic device (e.g., a mobile phone) establishes a connection with a wireless base station, one or more applications (e.g., an email application) in the electronic device may send data packets (e.g., refresh packets) to the wireless base station using a modem of the electronic device. When the electronic device loses communication signals (e.g., mobile phone signals), and is disconnected from the wireless base station, the modem sends disconnection information to the one or more applications through a plurality of layers (e.g., a telephony framework layer and a radio interface layer) of the electronic device. After the electronic device reacquires communication signals and is reconnected from the wireless base station, the modem sends reconnection information to the one or more applications, then the one or more applications sends the same data packets (e.g., the refresh packets) to the wireless base station again.
However, the electronic device may be disconnected from the wireless base station because the electronic device loses the communication signals temporarily. Thus, the above solution sends the same data packets to the wireless base stations every time that the electronic device reacquires the interrupted communication signals within a short time period. For example, when the electronic device is located in a place where the communication signals received by the electronic device are unstable, many needless same data packets of the applications are repeatedly sent to the wireless base station.
Accordingly, system resources of the electronic device and the wireless base station are wasted by using the above solution. Therefore, an efficient method for managing packet transmission using the electronic device is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
The controlling system 10 determines whether the electronic device 1 receives communication signals (e.g., mobile/cell phone signals) when the electronic device 1 is disconnected from a wireless base station, and controls the electronic device 1 not to send disconnection information to applications in the electronic device 1 within a predetermined time period, therefore avoiding repeatedly sending same data packets (e.g., refresh packets) to the wireless base station from the applications when the electronic device 1 reacquires the communication signals within the predetermined time period (e.g., 2 seconds). A detailed description of the controlling system 10 will be given in the following paragraphs.
In one embodiment, the electronic device 1 may be a mobile phone, a tablet computer, a personal digital assistant, a notebook computer, or other device. In one embodiment, the controlling system 10 includes computerized instructions in the form of one or more programs that are executed by the at least one processor 11 and stored in the storage device 12. The storage device 12 stores one or more programs, such as operating systems, applications of the electronic device 1, and various kinds of data, such as images. In some embodiments, the storage device 12 may be an external storage card, such as a memory stick, a smart media card, a compact flash card, a secure digital card, or any other type of memory storage device.
A relationship between the telephony framework layer 13, the RIL 14, and the modem 15 is shown in
For example, when the electronic device 1 is disconnected from the wireless base station, the modem 15 may transmit disconnection information to applications of the electronic device 1 through the RIL 14 and the telephony framework layer 13 as shown in
In step S2, the determination module 102 determines one or more applications that send refreshed packets to the wireless base station when the electronic device 1 is connected from the wireless base station, and determines the one or more applications as refreshed applications.
For example, every time that the electronic device 1 is connected from the wireless base station, the refreshed applications in the electronic device 1 send refreshed packets to a network server of a provider through the connection between the electronic device 1 and the wireless base station, so as to refresh data of the applications. For another example, an email application in the electronic device 1 may send refreshed packets to an email server for refreshing an inbox of email messages received by the electronic device 1 through the above mentioned connection. That is, such an email application is determined to be the refreshed application.
One refreshed application is determined as follows.
In step S4, the detection module 104 detects a disconnection signal received by the electronic device 1. In some embodiments, when a disconnection between the electronic device 1 and the wireless base station occurs, the disconnection causes the modem 15 to issue a disconnection signal, which is sent to the telephony framework layer 13 using the modem 15, and the disconnection signal is then received by the detection module 104.
In step S6, the detection module 104 detects whether the disconnection signal is a result of a disconnection operation performed by a user of the electronic device 1. In some embodiments, the detection module 104 detects whether the disconnection signal is the result of the disconnection operation performed by the user, by detecting operation signals on the electronic device 1 in response to the disconnection operation performed by the user.
For example, when the detection module 104 detects the operation signals, the detection module 104 determines that the disconnection operation has been performed by the user on the electronic device 1, and the disconnection signal is the result of the disconnection operation, then the procedure goes to step S8.
When the detection module 104 detects no operation signals, the detection module 104 determines that no disconnection operation has been performed by the user on the electronic device 1, and the disconnection signal is not the result of the disconnection operation, then the procedure goes to step S10.
In step S8, the controlling module 108 changes the connected state of the electronic device 1 to a disconnected state, and sends disconnection information to the refreshed applications through the RIL 14 and the telephony framework layer 13. Thus, when the electronic device 1 is reconnected from the wireless base station because of a connection operation or a reconnection operation of the user, the modem 15 of the electronic device 1 sends the refreshed packets of the refreshed applications to the wireless base station.
In step S10, the checking module 106 checks whether the electronic device 1 receives any communication signals (e.g., mobile phone communication signals). If the electronic device 1 receives the communication signals, the procedure goes to step S8. If the electronic device 1 does not receive any communication signals, the procedure goes to step S12.
In step S12, the controlling module 108 controls the electronic device 1 to attempt to reconnect to the wireless base station within a predetermined time period (e.g., 2 seconds), and controls the electronic device 1 not to send any disconnection information to the refreshed applications during the predetermined time period. In some embodiments, the predetermined time period is used as a period for the electronic device 1 to attempt to reacquire the communication signals and reconnected from the wireless base station, thereby reducing a number of the refreshed packets that may be sent to the wireless base station. A detailed procedure of step S12 is provided in
In other embodiments, the controlling module 108 determines and records connection state of the electronic device 1. The connection state may include, but is not limited to, a connected state and a disconnected state. For example, when the electronic device 1 is connected from the wireless base station, the controlling module 108 determines and records that the electronic device 1 is in the connected state. Otherwise, when the electronic device 1 is disconnected from the wireless base station, the controlling module 108 determines and records that the electronic device 1 is in the disconnected state.
In other embodiments, the controlling module 108 further checks whether the electronic device 1 receives the communication signals when the electronic device 1 receives a service change notice, and records a current connection state of the electronic device 1. In some embodiments, the service change notice indicates a service state of the electronic device 1 has been changed, and the service state of the electronic device 1 may be a roaming state, for example.
In step S120, the controlling module 108 determines whether the predetermined time period has elapsed. When the predetermined time period has not elapsed, the procedure goes to step S122. When the predetermined time period has elapsed, the procedure goes to step S124.
In step S122, the controlling module 108 controls the electronic device 1 to attempt to reconnect to the wireless base station, and controls the electronic device 1 not to send any disconnection information to the refreshed applications, then the procedure returns to step S120.
In step S124, the controlling module 108 determines whether the electronic device 1 is still in the disconnected state.
When the electronic device 1 is still in the disconnected state, in step S126, the controlling module 108 sends the disconnection information to the refreshed application. Afterwards, when the refreshed application receives the disconnection information, the controlling module 108 resends the refreshed packets of the refreshed application to the wireless base station using the modem 15.
When the electronic device 1 is not in the disconnected state, that is, the electronic device 1 is in the connected state, the procedure ends.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, set forth for a clear understanding of the principles of the disclosure.
Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure is protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
101114617 | Apr 2012 | TW | national |