1. Technical Field
Embodiments of the present disclosure relate generally to cloud storage technologies, and particularly to a cloud storage system and a data storage and sharing method based on the system.
2. Description of Related Art
Cloud storage services are used for storing various types of data. In many cloud storage solutions, one or more servers may act as a data center for storing a large amount of data from various client devices. Since a large amount of data is for storing in the data center, servers with high performance and a large storage space are desired, which is costly. Further, when a number of client devices simultaneously access the data from the servers, the data transmission rate may be unacceptably low.
The disclosure, including the accompanying drawings, is illustrated by way of example and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one”.
Referring to
Each of the first storage network 201 and the second storage network 202 may be divided into multiple storage sections. Each of the storage sections is configured for storing different types of data (e.g., text, photos, and videos). For example, the first storage network 201 includes a first storage section 2011 and a second storage section 2012. The second storage network 202 includes a third storage section 2021 and a forth storage section 2022. The first storage section 2011 and the third storage section 2021 may be configured for storing texts, while the second storage section 2012 and the forth storage section 2022 may be configured for storing photos and videos.
The obtaining unit 110 obtains attribute information of reference data to be shared (hereinafter “sharing data”) that is provided by any of the client devices, and stores the obtained attribute information into the server 10 of the web server group 20. The sharing data refers to data stored in one or more of the client devices, and can be accessed/shared by any other client device through the network 200. The attribute information may include a data name, a data size, and a version of the sharing data, and location information indicating where the sharing data is stored, such as an IP address and/or a MAC address of one or more of client devices that contain the sharing data. In the embodiment, the obtaining unit 110 may store the attribute information of the sharing data in any server 10 of a storage section of the web server group 20 according to a type of the sharing data. For example, as shown in
Any client device presented in the network 200 can send a request message to the intermediate device 11 for requesting to access the sharing data. In one embodiment, the client device which requests the sharing data is defined as a first client device. The other client devices that contain the desired or target sharing data are defined as second devices.
The request unit 111 searches the web server group 20 for the second client devices that contain the target sharing data, when the request message requesting to access the target sharing data is received from the first client device. In the embodiment, the request unit 111 first determines which of the first storage network 201 and the second storage network 202 is configured for storing the attribute information of the target sharing data according to a type of the first client device, such as whether a user of the first client device is a public or a private user. Then, the request unit 111 determines a storage section of the first storage network 201 or the second storage network 202 that is used to store the attribute information of the target sharing data according to a type of the target sharing data. Additionally, the request unit 111 searches the determined storage section for the second client devices that contain the target sharing data.
The connection unit 112 establishes one or more peer to peer connections between the first client device and one or more of the second client devices that contain the target sharing data through the network 200, and downloads the target sharing data from the one or more second client devices to the first client device. In one embodiment, if a connection between the first client device and N (N>1) second client devices is established, the connection unit 112 divides a task of downloading the target sharing data into N sub-tasks, and allocates each of the sub-tasks to a second client device, so as to improve a speed of downloading the target sharing data.
The information update unit 113 updates attribute information of the target sharing data stored in the web server group 20 with device information of the first client device, after the target sharing data is downloaded to the first client device. Thus, other client devices can share the target sharing data now held in the first client device. In the embodiment, the information update unit 113 updates the attribute information of the target sharing data by adding the device information of the first client device to the location information of the target sharing data.
The data synchronization unit 114 records popular sharing data that is downloaded more than a predetermined number of times (e.g., ten times) within a predetermined time period (e.g., one day), and synchronizes the popular sharing data from one or more client devices that contain the popular sharing data to the intermediate device 11. Then, the data synchronization unit 114 defines the intermediate device 11 as a new client device and updates attribute information of the popular sharing data stored in the web server group 20 with device information of the intermediate device 11. Thus, even if the client devices that contain the popular sharing data are not presented in the network 200, other client devices can access the popular sharing data through the intermediate device 11. Additionally, the data synchronization unit 114 regularly clears the popular sharing data that have been synchronized to the intermediate device 11 for a preset time period at regular intervals, such as every one or two weeks, so that the intermediate device 11 always has enough storage space to store other popular sharing data.
In step S01, the obtaining unit 110 obtains attribute information of sharing data provided by any of the client devices, and stores the obtained attribute information into the server 10 of the web server group 20. The sharing data refers to data stored in one or more of the client devices, and can be accessed/shared by other client devices through the network 200. The attribute information may include a data name, a data size, and a version of the sharing data, and location information indicating where the sharing data is stored, such as an IP address and/or a MAC address of one or more of client devices that contain the sharing data.
In step S02, a first client device sends a request message to the intermediate device 11 for requesting access to the target sharing data.
In step S03, the request unit 111 searches the web server group 20 for second client devices that contain the target sharing data.
In step S04, the connection unit 112 establishes one or more peer to peer connections between the first client device and one or more of the second client devices that contain the target sharing data through the network 200, and downloads the target sharing data from the one or more of the second client devices to the first client device.
In step S05, the information update unit 113 updates attribute information of the target sharing data stored in the web server group 20 according to device information of the additional first client device which now holds the target sharing data.
In step S06, the data synchronization unit 114 records popular sharing data that is downloaded more than a predetermined number of times within a predetermined time period, synchronizes the popular sharing data from one or more client devices that contain the popular sharing data to the intermediate device 11. Then, the data synchronization unit 114 defines the intermediate device 11 as a new client device and updates attribute information of the popular sharing data according to device information of the intermediate device 11.
In step S07, the data synchronization unit 114 clears the popular sharing data that have been synchronized to the intermediate device 11 for a preset time period at regular intervals.
Although certain embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201210248636.9 | Jul 2012 | CN | national |