Abstract:
A method provides fast data transmission between electronic devices, and avoids network congestion. A number of electronic devices in a network are divided into a client group including client devices and a server group including service devices. A control device for each client device is appointed from among the service devices according to a connection quality between the client device and the service device, and a route path between every two service devices is determined according to a connection quality between every two service devices. A route table of each service device is created according to the route path between every two service devices, and requested data is transmitted from a target device to a request device according to the route path.

Description:
BACKGROUND 
       [0001]    1. Technical Field 
         [0002]    Embodiments of the present disclosure relate to a method for transmitting data between electronic devices. 
         [0003]    2. Description of Related Art 
         [0004]    In a video conference between a plurality of networked electronic devices, video data transmitted between the electronic devices may be delayed or lost due to network congestion. Generally, two connection methods between the electronic devices in the video conference are used. In the first method, the electronic devices are connected in a point-to-point (P2P) architecture. And in the second method, the electronic devices are connected in a slave/master architecture (one electronic device is selected to be a master device). In the first method, network congestion may occur when a lot of electronic devices are connected to the network. In the second method, the master device cannot process the data transmission requests within an acceptable time when a lot of slave devices request the video data simultaneously. Therefore, a more efficient method for transmitting data between electronic devices is desired. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0005]      FIG. 1  is a flowchart of a method for transmitting data between electronic devices. 
           [0006]      FIG. 2  is an schematic diagram of a plurality of electronic devices in a specified network. 
           [0007]      FIG. 3  is an schematic diagram of dividing between the electronic devices in a specified network into a client group and a server group. 
           [0008]      FIG. 4  is an schematic diagram of determining route paths of each service device in the server group. 
           [0009]      FIG. 5  is an schematic diagram of route tables of the service devices. 
       
    
    
     DETAILED DESCRIPTION 
       [0010]    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 storage medium. 
         [0011]      FIG. 1  is a flowchart of a method for transmitting data between electronic devices. Depending on the embodiment, additional steps may be added, others removed, and the ordering of the steps may be changed. In this embodiment, the transmitted data may be video data transmitted between the electronic devices in a specified network utilized for a video conference. The specified network may be an intranet, the Internet or other suitable communication network, such as a general packet radio service (GPRS) network. In other embodiments, the transmitted data may be information of virtual machines installed in the electronic device. 
         [0012]    In step S 11 , when one electronic device in the specified network sends out a conference connection request, the electronic device obtains an efficiency index (or called performance index) of each electronic device in the specified network. The efficiency index includes, but is not limited to, a central processing unit (CPU) speed index (hereinafter referred to as “CPU index”), a memory capacity index (hereinafter referred to as “memory index”), and a network bandwidth index. Different items of hardware have different weights in the efficiency index. For example, the efficiency index of the CPU of a type of “INTEL®-i7” is given a score of  700 , the efficiency index of the CPU of a type of “INTEL®-i5” is  500 , and the efficiency index of the CPU of a type of “INTEL®-i3” is  300 . The efficiency index of the memory of a type of double data rate (DDR) 16 GB is  80 , the efficiency index of the memory of a type of DDR 8 GB is  40 , and the efficiency index of the memory of a type of DDR 4 GB is  20 . The efficiency index of the network bandwidth of a 100 MB/second type is  200 , the efficiency index of the network bandwidth of a 50 MB/second type is  100 , and efficiency index of the network bandwidth of a 20 MB/second type is  40 . In one embodiment, the efficiency index of the electronic device is obtained by calculating a sum of the efficiency indexes of the specified types of hardware (e.g., the CPU and the network bandwidth) of the electronic device. 
         [0013]    As shown in  FIG. 2 , when the electronic device “A 1 ” sends out a conference connection request and the other electronic devices (e.g., “A 2 ˜A 6 ”, “B 1 ˜B 3 ”) of the conference parties accept the conference connection request, the efficiency indexes of the other electronic devices are sent to the electronic device “A 1 ”. 
         [0014]    In the embodiment, the electronic device includes a display device, an input device, a storage device, and at least one processor. The electronic device may be a computer, a smart phone or a personal digital assistant (PDA). The display device may display video data in the video conference, and the input device may be a mouse or a keyboard used for input. The storage device may be a non-volatile computer storage chip that can be electrically erased and reprogrammed, such as a hard disk or a flash memory card. 
         [0015]    In step S 12 , the electronic device “A 1 ” divides the electronic devices in the specified network into a client group as client devices and a server group as service devices, according to the efficiency index of each electronic device in the specified network. An address (e.g., an IP address) of each electronic device is recorded, and a grouped result is sent to each electronic device in the specified network. For example, as shown in  FIG. 2 , the electronic devices “A 1 ˜A 6 ” which have lower efficiency index (e.g., less than a preset value 1000) are grouped in the client group (hereinafter referred to as client devices “A 1 ˜A 6 ”), and the electronic devices “B 1 ˜B 3 ” which have higher efficiency index (e.g., greater than or equal to  1000 ) are grouped in the server group (hereinafter referred to as service devices “B 1 ˜B 3 ”). In this embodiment, the service devices “B 1 ˜B 3 ” are used as routing devices to transmit video data from a request device (e.g., the client device “A 1 ”) to a target device (e.g., the client device “A 2 ”). For example, as shown in  FIG. 3 , the video data transmitted from the client device “A 1 ” to the client device “A 2 ” is first transmitted to the service device “B 1 ”, then the video data is transmitted from the service device “B 1 ” to the client device “A 2 .” 
         [0016]    In another embodiment, the client group and the server group may be determined according to other methods. For example, handheld devices may be grouped together in the client group, and the desktop computers are grouped together in the server group. The client group and the server group may be determined according to a type of operating system installed in each electronic device. For example, the electronic devices with a LINUX® operating system or a UNIX® operating system may be grouped together in the server group, and the non-LINUX® and non-UNIX® electronic devices may be grouped together in the client group. 
         [0017]    In step S 13 , each client device (e.g., A 1 ˜A 6 ) in the client group connects to each service device (e.g., B 1 ˜B 3 ) in the server group, and one of the service devices in the server group is determined and appointed as a control device for each client device according to a connection quality between the client device and each of the service devices. A feedback time delay of a connection (hereinafter referred to as “connection feedback time”) between the client device and each of the service devices is taken as the indication of connection quality. A short connection feedback time represents a good connection quality. In this embodiment, the control device of the client device is the service device having the shortest connection feedback time. For example, as shown in  FIG. 3 , the service device “B 1 ” thus controls the client device “A 1 ” and “A 2 ”, and the service device “B 2 ” thus controls the client device “A 3 ”, “A 4 ”, and “A 5 ”, and the service device “B 3 ” thus controls the client device “A 6 ”. 
         [0018]    In another embodiment, the connection quality may be determined using other methods. For example, the connection quality may be indicated according to a physical distance between the client device and the service device, where a short physical distance represents a good connection quality. That is, the control device of the client device is the service device having the shortest physical distance. 
         [0019]    In step S 14 , the service devices are connected to each other, to determine a route path (or called routing path) between every two service devices according to a connection quality between the every two service devices, and create a route table (or called routing path) for each service device according to the route path between every two service devices. The connection quality may be determined according to a connection feedback time between every two service devices. A short connection feedback time represents a good connection quality. In this embodiment, a route path between every two service devices is a routing connection having a shortest connection feedback time. 
         [0020]    For example, referring to  FIG. 4 , if the connection feedback time of a routing connection of B 2 -&gt;B 4  (B 2  is directly connected to B 4 ) is greater than the connection feedback time of a routing connection of B 2 -&gt;B 1 -&gt;B 4  (B 2  is connected to B 4  through “B 1 ”), and the connection feedback time of a routing connection of B 2 -&gt;B 3 -&gt;B 4  (B 2  is connected to B 4  through “B 3 ”) is greater than the connection feedback time of the routing connection of B 2 -&gt;B 1 -&gt;B 4 . That is, the routing connection of B 2 -&gt;B 1 -&gt;B 4  has the shorter connection feedback time, thus the route path between the service devices “B 2 ” and “B 4 ” is determined as “B 2 -&gt;B 1 -&gt;B 4 ”. When the video data needs to be transmitted from “B 2 ” to “B 4 ”, the video data is firstly transmitted to “B 1 ”, and further transmitted from “B 1 ” to “B 4 ”. When the video data needs to be transmitted from “B 4 ” to “B 2 ”, the video data is also firstly transmitted to “B 1 ”, and further transmitted from “B 1 ” to “B 2 ”. A route table of each service device (referring to  FIG. 5 ) is created based on the route path between every two service devices of  FIG. 4 . For example, as shown in  FIG. 5 , “R 1 ” represents the route table of the service device “B 1 ”, “R 2 ” represents the route table of the service device “B 2 ”, “R 3 ” represents the route table of the service device “B 3 ”, and “R 4 ” represents the route table of the service device “B 4 .” 
         [0021]    As shown in  FIG. 5 , a route table of a service device records a plurality of routing devices between the service device and a plurality of target devices. The target devices are the client devices or the service devices which send out the video data to a request device (or called requesting device). The routing devices are the service devices in the server group. For example, as shown in  FIG. 4 , if the client device “A 1 ” sends a data acquiring request to the client device “A 2 ”, and the client device “A 2 ” is the target device, the service device “B 1 ” is the routing device. 
         [0022]    In another embodiment, the route path between every two service devices may be determined using other methods. For example, the route path between two every service devices is created by connecting every two service devices in the server group using a point-to point (P2P) method. In another embodiment, the route path between every two service devices may be determined according to the efficiency index of each service device in the server group. The service device having a higher efficiency index is determined as the routing device in the route path. For example, if the efficiency index of the service device “B 4 ” is less than the efficiency index of the service device “B 1 ”, the video data transmitted to the service device “B 4 ” is firstly transmitted to the service device “B 1 .” 
         [0023]    In step S 15 , when a data acquiring request is sent from a request device (e.g. the client device “A 3 ”) to a target device (e.g., the client device “A 7 ”), the target device transmits requested data (e.g., video data) to the request device according to the route paths in the route tables. For example, the request device is the electronic device which wants to acquire the video data, and the target device is the electronic device which sends out the video data. 
         [0024]    If the request device is the client device in the client group, the target device first determines a control device of the request device from the service devices of the server group, and the target device transmits the requested data (e.g., current video data of the target device) to the request device according to the route paths in the route table of the determined control device. If the request device is the service device in the server group, the target device transmits the requested data to the request device according to the route paths in the route table of the request device. 
         [0025]    For example, referring to  FIG. 4 , when the request device “A 3 ” sends an image acquiring request to the target device “A 7 ”, a control device of the request device “A 3 ” is determined as being the service device “B 2 ”. Looking up the route table “R 2 ” of the service device “B 2 ,” as shown in  FIG. 5 , the data transmitted from the target device 
         [0026]    “A 7 ” is passed to the routing device “B 1 ” (i.e., the service device “B 1 ”). Furthermore, the route table “R 1 ” of the routing device “B 1 ” shows that the data transmitted by the target device “A 7 ” is further passed to the routing device “B 4 ” (i.e., the service device “B 4 ”). Because the routing device “B 4 ” is the control device of the target device “A 7 ”, the recursion process is ended. Thus, a transmission path of the requested data from the target device “A 7 ” to the request device “A 3 ” is as follows: A 7 -&gt;B 4 -&gt;B 1 -&gt;B 2 -&gt;A 3 . 
         [0027]    In  FIG. 5  of this embodiment, the target devices of each route table merely include the client devices in the client group. In other embodiments, the service devices in the server group may be added to the target devices of each route table using the same method. 
         [0028]    It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely 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 and protected by the following claims.