Baidu online storage: Analysis of High-Speed Second transmission of 4G large files, advantages and disadvantages

Source: Internet
Author: User

A while ago, Baidu online storage provided a free GB space application. At that time, I was curious, and I often reported an error due to the use of Bt on my mobile disk, I would like to take this opportunity to upload files to Baidu for temporary storage, free up space to sort out the mobile hard disk, and I also created an account. 100 GB, plus the original 5 GB, a total of GB to hand, just today there is time, we are ready to copy the mobile hard disk data. After opening the Baidu cloud-network disk, the following figure is displayed:

Note: The image is from the Internet and cannot be operated because the speed control is used locally.

After downloading and installing the plug-in, it is an Internet Explorer plug-in. Let's try it as follows:

The first three files start with file comparison ..., then, the upload was successful immediately, and it was a second. I thought that at this speed, uploading all the files was basically a matter of minutes. As a result, when uploading the fourth file, it started to upload to me slowly, and the speed was stable at around 60 kb. Sweat! At this speed, we need to upload all the files. Is that the Year of the Monkey, the month of the monkey? This is also a matter of seconds. After a while, I finally realized what it was about to pass through in seconds. The plug-in I downloaded is nothing more than a hash tool, and then compares my local files with existing files on the server. If so, use the Server File directly-this is the second transfer! If you do not have any files, upload them slowly.

Well, according to the concept of second-based data transfer, we can easily implement the second-based data transfer function. It's just a file hash. Now we are still uploading this file to design a simple second-pass architecture.

Principles:

To achieve second-level data transfer, the core task is to establish a file comparison function between the server and the client. This comparison can be achieved through MD5.AlgorithmOr other hash algorithms. The procedure is as follows:

1. Ask the user to download the client. This can be a browser plug-in or a client software-Baidu here is the IE Plug-in;

2. At the beginning of file upload, hash the local file to obtain the file fingerprint;

3. Upload the file fingerprint data to the server;

4. The server compares the file fingerprint with the existing file fingerprint and returns the comparison result to the client;

5. The client obtains the comparison result;

6. if the comparison is successful, it indicates that the server already has the same file, then the file name and fingerprint and the file identifier are directly uploaded to the server, and after the Server accepts the file, only the file name is stored in the customer's name, and the file is mapped to the path of the original file, and the second message is returned for success;

7. If the comparison fails, it will become irrelevant to normal upload. Honestly, the file is uploaded to the server in 1-bit and 1-bit through HTTP.

Okay, this is the second transfer of Xuan Hu's file. As to why the 4 GB limit is required, this person initially believes that fingerprint computing also consumes resources. If the file is too large, it will occupy a relatively large amount of resources during fingerprint computing, it may have some impact. For more information about the truth, see.

Advantages:

1. for the server: This method compares files on the server and then maps files. For large storage, because only one file entity exists on the server, the storage consumption of the system will be greatly reduced. Especially when the number of files reaches a massive volume, and many duplicate files exist (when multiple users save each file), the effect is better.

2. for transmission bandwidth: for users, due to the massive volume of files on the server, if they transmit files that already exist, they can greatly reduce the bandwidth usage.

Disadvantage:

To achieve second-to-second data transfer and optimal results, the core is to require the server to store a large number of files and delete all files in a timely manner. In order to achieve second-to-second data transfer, the server, files must be saved on the server, but cannot be deleted. If the number of files not mapped is large, it will inevitably increase the storage cost.

Hidden Danger:

It may take a second to deliver convenience to the customer, which makes us feel good. However, it is not difficult to find the hidden danger from the second transmission principle. Because files must be retained on the server, if the files you transmit to the server contain privacy, your privacy will always exist on the server once the upload is complete, this makes it hard to ensure that your privacy will not be disclosed in the future. If you want to use such services, we need to carefully analyze the risks. Make necessary decisions. -- At least, after I saw this function, I immediately decided to upload some of my movie files and other files that do not involve privacy to the server, but involve privacy, or other files that are slightly sensitive, I will use other methods to handle them.

No software can protect privacy and security. for their own benefit, they can only intercept customer privacy to the maximum extent possible. To protect these sensitive information, you can only rely on yourself!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.