CN104219270A - Method for uploading multiple images from client to server rapidly and efficiently - Google Patents

Method for uploading multiple images from client to server rapidly and efficiently Download PDF

Info

Publication number
CN104219270A
CN104219270A CN201310220473.8A CN201310220473A CN104219270A CN 104219270 A CN104219270 A CN 104219270A CN 201310220473 A CN201310220473 A CN 201310220473A CN 104219270 A CN104219270 A CN 104219270A
Authority
CN
China
Prior art keywords
thread
picture
server
pictures
client
Prior art date
Application number
CN201310220473.8A
Other languages
Chinese (zh)
Inventor
沈利辉
Original Assignee
北京齐尔布莱特科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京齐尔布莱特科技有限公司 filed Critical 北京齐尔布莱特科技有限公司
Priority to CN201310220473.8A priority Critical patent/CN104219270A/en
Publication of CN104219270A publication Critical patent/CN104219270A/en

Links

Abstract

The invention provides a method for uploading multiple images from a client to a server rapidly and efficiently. The method includes arranging an image uploading button on a html page of a server web site; defining transparent flash elements, and allowing the flash elements to overlap with the uploading button completely; when images are uploaded to the server as required, allowing the client to access to the html page of the server web site; when the image uploading button is clicked, namely clicking the flash elements, by means of the flash elements, after compressing the multiple selected images, uploading the images to the server in batches in a multi-threading manner. By the aid of the method, multiple images can be uploaded to the server from the client rapidly and efficiently.

Description

The method that plurality of pictures rapidly and efficiently uploads onto the server from client

Technical field

The invention belongs to technical field of information processing, be specifically related to a kind of method that plurality of pictures rapidly and efficiently uploads onto the server from client.

Background technology

Along with scientific and technological development, from strength to strength, the photo files producing also increases the camera function of the terminals such as digital camera, mobile phone thereupon.At present, conventionally adopt web technologies, photo files is uploaded onto the server from terminal, this kind uploaded mode and mainly had the following disadvantages: (1), because photo files is conventionally larger, can take more bandwidth, has the slow problem of uploading rate; (2) can only realize uploading of single photo files, have that photo upload efficiency is low, the problem of user's complex operation.

Summary of the invention

For prior art exist defect, the invention provides a kind of method that plurality of pictures rapidly and efficiently uploads onto the server from client, can by plurality of pictures rapidly and efficiently from client upload to server.

The technical solution used in the present invention is as follows:

The invention provides a kind of method that plurality of pictures rapidly and efficiently uploads onto the server from client, comprise the following steps:

S1, the html page setup uploading pictures button of server site;

S2, defines transparent flash element, makes described flash element and described uploading pictures button completely overlapping;

S3, when needs are during to described server uploading pictures, the html page of server site described in described client-access, when described uploading pictures button is clicked, essence is that described flash element is clicked, by described flash element, by after selecteed plurality of pictures compression, multithreading is uploaded to described server in batches.

Preferably, by described flash element, by after selecteed plurality of pictures compression, batch multithreading is uploaded to described server and is specially:

By selecteed plurality of pictures called after picture 1, picture 2 ... picture n, described flash element creates thread 1, the thread 2 corresponding with each pictures difference ... thread n, then distributes to picture i by thread i, 1≤i≤n, and i is natural number;

Described thread i carries out following operation to described picture i: described thread i judges whether the form of described picture i meets the requirements, if undesirable, stops the processing to picture i, and described thread i changes idle thread into; If met the requirements, described thread i compresses described picture i, and the picture i then compression being obtained uploads to described server, and described thread i changes idle thread subsequently into;

Described flash element monitoring thread 1, thread 2 ... the state of thread n, obtaining some threads once monitoring is idle thread, nullifies this thread.

Preferably, described thread i judges whether the form of described picture i meets the requirements and is specially:

Described thread i judges whether the form of described picture i is the one in bmp form, gif form, jpg form, jpeg form or png form, if so, meets the requirements; If not, undesirable.

Preferably, described thread i compresses described picture i and is specially:

Described thread i compresses width and the pixel of described picture i.

Preferably, after S3, also comprise:

S4, after plurality of pictures has been uploaded, described server returns to picture storing path to described client.

Beneficial effect of the present invention is as follows:

The method that plurality of pictures provided by the invention rapidly and efficiently uploads onto the server from client, because transparent flash element overlaps on uploading pictures button, in the time that user clicks uploading pictures button, essence is to click transparent flash element, thereby realizes the object of uploading plurality of pictures by flash element.This kind of mode reduced the design of flash element, can efficiently the html page be presented to developer, saved the development time.In addition, picture adopt multithreading compress the mode of uploading, can by plurality of pictures rapidly and efficiently from client upload to server.

Brief description of the drawings

Fig. 1 is the method flow schematic diagram that plurality of pictures provided by the invention rapidly and efficiently uploads onto the server from client.

Embodiment

Below in conjunction with accompanying drawing, the present invention is described in detail:

As shown in Figure 1, the invention provides a kind of method that plurality of pictures rapidly and efficiently uploads onto the server from client, comprise the following steps:

S1, the html page setup uploading pictures button of server site;

Wherein, html (Hypertext Markup Language) is HTML, is a kind of markup language for describing web document.

S2, defines transparent flash element, makes described flash element and described uploading pictures button completely overlapping;

S3, when needs are during to described server uploading pictures, the html page of server site described in described client-access, when described uploading pictures button is clicked, essence is that described flash element is clicked, by described flash element, by after selecteed plurality of pictures compression, multithreading is uploaded to described server in batches.

Upload and specifically comprise following three steps in batches:

(1) by selecteed plurality of pictures called after picture 1, picture 2 ... picture n, described flash element creates thread 1, the thread 2 corresponding with each pictures difference ... thread n, then distributes to picture i by thread i, 1≤i≤n, and i is natural number;

(2) described thread i carries out following operation to described picture i: described thread i judges whether the form of described picture i meets the requirements, if undesirable, stops the processing to picture i, and described thread i changes idle thread into; If met the requirements, described thread i compresses described picture i, and the picture i then compression being obtained uploads to described server, and described thread i changes idle thread subsequently into;

Wherein, satisfactory picture format includes but not limited to bmp form, gif form, jpg form, jpeg form or png form; Thread i compressed picture i is specially: width and the pixel of thread i compressed picture i.For example, for a 10M picture, by picture pixel boil down to 1024*768, and then picture pixel is compressed into quality is 80 picture, and picture is the most only less than 1M left and right.

To after picture compression, upload onto the server, can save user's bandwidth, improve the speed of picture uploading, also alleviated transmission and the storage pressure of server.

In addition, for the undesirable picture of form, interrupt the processing of photo current, return to the information of picture uploading failure etc. to client.

(3) described flash element monitoring thread 1, thread 2 ... the state of thread n, obtaining some threads once monitoring is idle thread, nullifies this thread.

After S3, also comprise:

S4, after plurality of pictures has been uploaded, described server returns to picture storing path to described client.

Adopt above-mentioned multi-threading uploading pictures, on the one hand, in the time of a thread uploading pictures failure, can not affect other thread uploading pictures; And multiple thread parallel processing, can upload onto the server plurality of pictures fast, thereby improve user's experience.

In sum, the method that plurality of pictures provided by the invention rapidly and efficiently uploads onto the server from client, because transparent flash element overlaps on uploading pictures button, in the time that user clicks uploading pictures button, essence is to click transparent flash element, thereby realizes the object of uploading plurality of pictures by flash element.This kind of mode reduced the design of flash element, can efficiently the html page be presented to developer, saved the development time.In addition, picture adopt multithreading compress the mode of uploading, can by plurality of pictures rapidly and efficiently from client upload to server.

The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.

Claims (5)

1. the method that plurality of pictures rapidly and efficiently uploads onto the server from client, is characterized in that, comprises the following steps:
S1, the html page setup uploading pictures button of server site;
S2, defines transparent flash element, makes described flash element and described uploading pictures button completely overlapping;
S3, when needs are during to described server uploading pictures, the html page of server site described in described client-access, when described uploading pictures button is clicked, essence is that described flash element is clicked, by described flash element, by after selecteed plurality of pictures compression, multithreading is uploaded to described server in batches.
2. the method that plurality of pictures according to claim 1 rapidly and efficiently uploads onto the server from client, is characterized in that, by described flash element, by after selecteed plurality of pictures compression, batch multithreading is uploaded to described server and is specially:
By selecteed plurality of pictures called after picture 1, picture 2 ... picture n, described flash element creates thread 1, the thread 2 corresponding with each pictures difference ... thread n, then distributes to picture i by thread i, 1≤i≤n, and i is natural number;
Described thread i carries out following operation to described picture i: described thread i judges whether the form of described picture i meets the requirements, if undesirable, stops the processing to picture i, and described thread i changes idle thread into; If met the requirements, described thread i compresses described picture i, and the picture i then compression being obtained uploads to described server, and described thread i changes idle thread subsequently into;
Described flash element monitoring thread 1, thread 2 ... the state of thread n, obtaining some threads once monitoring is idle thread, nullifies this thread.
3. the method that plurality of pictures according to claim 2 rapidly and efficiently uploads onto the server from client, is characterized in that, described thread i judges whether the form of described picture i meets the requirements and is specially:
Described thread i judges whether the form of described picture i is the one in bmp form, gif form, jpg form, jpeg form or png form, if so, meets the requirements; If not, undesirable.
4. the method that plurality of pictures according to claim 2 rapidly and efficiently uploads onto the server from client, is characterized in that, described thread i compresses described picture i and is specially:
Described thread i compresses width and the pixel of described picture i.
5. the method that plurality of pictures according to claim 1 rapidly and efficiently uploads onto the server from client, is characterized in that, after S3, also comprises:
S4, after plurality of pictures has been uploaded, described server returns to picture storing path to described client.
CN201310220473.8A 2013-06-05 2013-06-05 Method for uploading multiple images from client to server rapidly and efficiently CN104219270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310220473.8A CN104219270A (en) 2013-06-05 2013-06-05 Method for uploading multiple images from client to server rapidly and efficiently

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310220473.8A CN104219270A (en) 2013-06-05 2013-06-05 Method for uploading multiple images from client to server rapidly and efficiently
HK15104011.0A HK1203710A1 (en) 2013-06-05 2015-04-24 Method for quickly and efficiently uploading multiple pictures from a client to a server

Publications (1)

Publication Number Publication Date
CN104219270A true CN104219270A (en) 2014-12-17

Family

ID=52100400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310220473.8A CN104219270A (en) 2013-06-05 2013-06-05 Method for uploading multiple images from client to server rapidly and efficiently

Country Status (2)

Country Link
CN (1) CN104219270A (en)
HK (1) HK1203710A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407153A (en) * 2015-11-03 2016-03-16 广州视睿电子科技有限公司 Document uploading method and system and client side
WO2017088701A1 (en) * 2015-11-27 2017-06-01 阿里巴巴集团控股有限公司 Mass picture management method and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656751A (en) * 2008-08-18 2010-02-24 北京数码大方科技有限公司 Method and system for accelerating file uploading and downloading
CN101808182A (en) * 2010-02-05 2010-08-18 腾讯科技(深圳)有限公司 Method, terminal and system for uploading pictures
CN102103607A (en) * 2009-12-18 2011-06-22 北京闻言科技有限公司 No-refresh picture bulk-uploading and automatic picture information acquisition technique

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656751A (en) * 2008-08-18 2010-02-24 北京数码大方科技有限公司 Method and system for accelerating file uploading and downloading
CN102103607A (en) * 2009-12-18 2011-06-22 北京闻言科技有限公司 No-refresh picture bulk-uploading and automatic picture information acquisition technique
CN101808182A (en) * 2010-02-05 2010-08-18 腾讯科技(深圳)有限公司 Method, terminal and system for uploading pictures

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407153A (en) * 2015-11-03 2016-03-16 广州视睿电子科技有限公司 Document uploading method and system and client side
CN105407153B (en) * 2015-11-03 2019-07-16 广州视睿电子科技有限公司 A kind of document method for uploading, system and client
WO2017088701A1 (en) * 2015-11-27 2017-06-01 阿里巴巴集团控股有限公司 Mass picture management method and apparatus
CN106815223A (en) * 2015-11-27 2017-06-09 阿里巴巴集团控股有限公司 A kind of mass picture management method and device

Also Published As

Publication number Publication date
HK1203710A1 (en) 2015-10-30

Similar Documents

Publication Publication Date Title
US9451173B2 (en) Electronic device and control method of the same
EP3606067A1 (en) Video encoding method, video decoding method, computer device and storage medium
WO2017118345A1 (en) Method and device for pushing electronic book
WO2017181777A1 (en) Panoramic live video streaming method, device, system, and video source control apparatus
EP2972936B1 (en) System and method of web-based keyboard, video and mouse (kvm) redirection and application of the same
US20160191798A1 (en) Panoramic view customization
US20190373048A1 (en) Information processing method, apparatus, terminal, and server
US9058662B2 (en) Systems and methods for non-destructive editing of digital images
US8064733B2 (en) Variable resolution images
US10701291B2 (en) On-chip image sensor data compression
US8549395B2 (en) Method and system for transforming an integrated webpage
US10645400B2 (en) Method and system for optimized delta encoding
US9154709B2 (en) Recommending transformations for photography
EP2118847B1 (en) Method for processing a digital image
US10015393B2 (en) Imaging control device, image processing device, imaging controlling method, and image processing method
WO2014210514A1 (en) Image delivery architecture
KR100900342B1 (en) Panoramic Image processing method
CN103412753A (en) Image deletion method and device
CN103392179A (en) Method and device for acquiring page resources, browser and mobile terminal
CN101594261B (en) Forgery website monitoring method and system thereof
CN102164167B (en) Method and system for remote-control classified transmission
US20120062766A1 (en) Apparatus and method for managing image data
US20140211065A1 (en) Method and system for creating a context based camera collage
US8825749B2 (en) Method of tracking offline user interaction in a rendered document on a mobile device
CA2883224C (en) Information transmission method, apparatus, and system, terminal, and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1203710

Country of ref document: HK

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141217