Recently, an electronic device generally has many different network interfaces (heterogeneously network) for transmitting data or control signals. Because the data transmission has large power consumption, a network interface control mechanism is applied to some energy constrained devices to save power. However, the conventional network interface control mechanism only considers the battery state or the transmission powers of the network interfaces, so the power management may not be optimized due to the loss of some important factors.
It is therefore an objective of the present invention to provide a method for controlling a plurality of network interfaces of the electronic device, which can control the network interfaces by considering more factors such as standby power, switch overhead and/or data size, to solve the above-mentioned problems.
According to one embodiment of the present invention, a processing circuit of an electronic device is provided, wherein the electronic device comprises a plurality of network interfaces for wirelessly communicating with other electronic devices and a storage unit for storing at least one table comprising information associated with a plurality of routing costs, and the routing costs correspond to at least paths between each of the network interfaces of the electronic device and the other electronic devices. The processing circuit is arranged for referring to the at least one table to select a specific network interface to transmit/receive data, and to disable at least one of the unused network interfaces.
According to another embodiment of the present invention, a method for controlling a plurality of network interfaces of an electronic device, comprising: providing at least one table comprising information associated with a plurality of routing costs, wherein the routing costs correspond to at least paths between each of the network interfaces of the electronic device and the other electronic devices; and referring to the at least one table to select a specific network interface to transmit/receive data, and to disable at least one of the unused network interfaces.
According to another embodiment of the present invention, a method for controlling a plurality of network interfaces of an electronic device, wherein the plurality of network interfaces comprises a first network interface and a second network interface, and the method comprises: using the first network interface to transmit data or receive data from another device; after the data is completely transmitted/received, comparing standby powers of the first network interface and the second network interface; and when the standby power of the first network interface is greater than the standby power of the second network interface, disabling the first network interface, and using the second network interface for standby.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the following descriptions and claims to refer to particular system components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . .” The terms “couple” and “couples” are intended to mean either an indirect or a direct electrical connection. Thus, if a first device couples to a second device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
In the embodiment of the present invention, the storage unit 116 stores at least one routing table and a plurality of routing costs, and the routing costs correspond to paths between each of the network interfaces of the electronic device 110 and the other electronic devices 120, 130 and 140, and further correspond to paths between the other electronic devices 120, 130 and 140. In this embodiment, the routing costs are indexes for the power consumption, and the larger the routing cost, the larger the power consumption. When the electronic device 110 is required to transmit data to the other electronic device, the processing circuit 112 may refer to the routing costs and/or the routing table to select a specific network interface and a preferred route to transmit/receive data, and to disable at least one of the unused network interfaces.
In detail, refer to
Please refer to
In addition, the routing costs can be calculated by considering at least a portion of the battery states of the electronic devices 110-140, the transmission powers of the network interfaces 114, signal to noise ratio (SNR) of the network interfaces 114, switch overheads of the network interfaces and the data size. For example, assuming that the data is transmitted from “A” to “B” with network interface “I”, the corresponding routing cost can be calculated by using the following formula:
wherein PTX_A(I) is the transmission power of the network interface “I” of the electronic device “A”, Pswitch_A (I) is a switch overhead of the network interface “I” of the electronic device “A”, battery_state_A is an index of a residual capacity of a battery of the electronic device “A”, PRX_B(I) is the reception power of the network interface “I” of the electronic device “B”, Pswitch_B(I) is a switch overhead of the network interface “I” of the electronic device “B”, battery_state_B is an index of a residual capacity of a battery of the electronic device “B”.
In addition, in this embodiment, the routing costs can be directly obtained from the other electronic devices. For example, the electronic device 120 can calculate the routing cost between the electronic devices 120 and 140, and sends this routing cost to the electronic device 110 for building the routing table.
In the above-mentioned embodiment, each routing cost is symmetric, that is the routing cost corresponding to the transmission from “A” to “B” and the routing cost corresponding to the transmission from “B” to “A” are the same. In other embodiments of the present invention, one or more routing costs may be asymmetric, for example, the routing cost corresponding to the transmission from “A” to “B” may be “9”, while the routing cost corresponding to the transmission from “B” to “A” may be “10”.
In light of above, when the electronic device 110 wants to transmit data to one of the other electronic devices 120-140, the processing circuit 112 may refer to the routing table to find the optimal route (with lowest total power consumption) and an optimal network interface, and uses the selected optimal network interface to transmit data. Meanwhile, the processing circuit 112 also disables the other unused (redundant) network interface (s) to save the standby power consumption of these unused (redundant) network interface(s). For example, if the processing circuit 112 uses the BT to transmit data to the electronic device 120, the Wi-Fi interface can be turned off to disconnect the Wi-Fi link between the electronic devices 110 and 120.
In addition, the routing costs may be updated according to a condition of the electronic device, and the updated routing costs are transmitted to the other electronic devices, wherein the condition may be a battery state, a signal strength and/or other indexes of the electronic device that may change the routing costs. After the routing costs are updated, the electronic device may change the network interface and the route for power saving. For example, please refer to
In
In addition, when the data size or the battery state changes frequently, the routing table may be updated frequently to increase too much update overhead. Therefore, to solve this problem, multiple routing tables may be built and maintained for different specific ranges of data size, or multiple routing tables may be built and maintained for different network interfaces with several battery states or several data size ranges, or the electronic device may transmit the updated routing cost to the other electronic devices only when the amount of change or the value of the updated routing cost reaches a threshold. For example, assuming that the original routing cost is “10”, the electronic device may send the updated routing cost to the other electronic device only when the updated routing cost is less than “5” or greater than “15”. Costs stored in routing table can also be represented as a function of data size, which can be calculated before transmission to avoid update overhead.
In the above-mentioned embodiments, the routing costs and the routing table are provided to determine of the route and the network interface for data transmission. In another embodiment of the present invention, standby costs are further provided for the determination of the network interface in a standby mode. In one embodiment, the standby costs can be calculated by considering at least a portion of the battery states of the electronic devices, the transmission powers of the network interfaces, SNR of the network interfaces, network interface types and data type.
Please refer to
In the embodiment shown in
In another embodiment, referring to
Please refer to
Step 1000: the electronic device is in a standby mode. When the electronic device needs to transmit data, the flow enters Step 1002; and when routing costs of the electronic device change, the flow enters Step 1010.
Step 1002: the electronic device looks up the routing table to select the appropriate network interface for data transmission.
Step 1004: the electronic device enables the selected network interface and disable the unused network interface to save power.
Step 1006: the electronic device uses the selected network interface to transmit data.
Step 1008: after the data transmission, the electronic device refers to the standby costs to enable one of the network interfaces for standby, and disables the unused network interface.
Step 1010: the electronic device exchanges routing cost information with the other electronic device.
Step 1012: the electronic device updates the routing table.
Briefly summarized, in the method for controlling a plurality of network interfaces of the electronic device of the present invention, the routing costs and the standby costs are obtained by considering more factors such as standby power, switch overhead and/or data size, thereby the power management can be performed more efficient. In addition, by disabling the unused network interface and switching to another network interface for standby, the electronic device may save more power.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.