CN103327042B - A kind of by batch picture uploading to the method for network album and a kind of client - Google Patents

A kind of by batch picture uploading to the method for network album and a kind of client Download PDF

Info

Publication number
CN103327042B
CN103327042B CN201210075724.3A CN201210075724A CN103327042B CN 103327042 B CN103327042 B CN 103327042B CN 201210075724 A CN201210075724 A CN 201210075724A CN 103327042 B CN103327042 B CN 103327042B
Authority
CN
China
Prior art keywords
picture
compression
thread
uploading
uploaded
Prior art date
Application number
CN201210075724.3A
Other languages
Chinese (zh)
Other versions
CN103327042A (en
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 CN201210075724.3A priority Critical patent/CN103327042B/en
Publication of CN103327042A publication Critical patent/CN103327042A/en
Application granted granted Critical
Publication of CN103327042B publication Critical patent/CN103327042B/en

Links

Abstract

The invention discloses a kind of by the method for batch picture uploading to network album, comprising: when client receives batch picture uploading instruction, start M simultaneously and compress thread and N number ofly upload thread, M and N is positive integer; Compression thread is treated each width picture uploaded and is carried out compression process respectively, and joins in an image cache pond by the picture after process; Upload thread each width picture joined in image cache pond is uploaded in network album respectively.The present invention discloses a kind of client.Apply method and apparatus of the present invention, the uplink time of picture can be shortened.

Description

A kind of by batch picture uploading to the method for network album and a kind of client

Technical field

The present invention relates to network technology, particularly a kind of by batch picture uploading to the method for network album and a kind of client.

Background technology

Network album refer to a kind of support user by local picture uploading in the server of network side picture preserve scheme.

Along with popularizing of network album, everybody more and more likes the picture (as photo) oneself liked to upload in network album, thus is shared with the good friend etc. of oneself.

Along with the continuous lifting of camera pixel etc., picture volume is increasing, and most of network album provider is in order to save the memory space of server, capital requires that client is by before in picture uploading to server, first picture is compressed, to reduce the volume of picture under the prerequisite keeping certain definition.

And in actual applications, user once can upload several pictures usually, namely carry out batch picture uploading, Fig. 1 is existing by the process schematic of batch picture uploading to network album.As shown in Figure 1, first client is compressed picture A, and uploads in network album by network, afterwards, picture B is compressed, and uploads in network album, in addition by network, picture C is compressed, and uploads in network album by network, the like.

But certain problem can be there is in actual applications in aforesaid way:

For picture A, can find out, for being uploaded in network album, need through two subprocess, one is compression subprocess, one is upload subprocess, as a rule, the time that compression subprocess consumes is roughly 1: 1 with the ratio uploading the time that subprocess consumes, if client performance is bad, the time that compression subprocess consumes even can be greater than the time of uploading subprocess and consuming, that is, although the mode uploaded again after compressing picture can save the memory space of server, but also extend the uplink time of picture.

Summary of the invention

In view of this, main purpose of the present invention is to provide a kind of by the method for batch picture uploading to network album, can shorten the uplink time of picture.

Another object of the present invention is to provide a kind of client, the uplink time of picture can be shortened.

For achieving the above object, technical scheme of the present invention is achieved in that

By the method for batch picture uploading to network album, comprising:

When client receives batch picture uploading instruction, start M simultaneously and compress thread and N number ofly upload thread, described M and N is positive integer;

Described compression thread is treated each width picture uploaded and is carried out compression process respectively, and joins in an image cache pond by the picture after process;

The each width picture joined in described image cache pond uploads in network album by described thread of uploading respectively.

A kind of client, comprising:

Described receiver module, for after receiving the instruction of batch picture uploading, notifies that described processing module performs self function;

Described processing module, for after the notice receiving described receiver module, start M simultaneously and compress thread and N number ofly upload thread, described M and N is positive integer; Wherein, described compression thread is used for carrying out compression process respectively to each width picture to be uploaded, and by process after picture join in an image cache pond, described in upload thread for being uploaded to respectively in network album by each width picture joined in described image cache pond.

Visible, adopt technical scheme of the present invention, when needs carry out batch picture uploading, client can start M compression thread simultaneously and N number ofly upload thread, compress thread and upload thread and carry out parallel processing, namely compress thread treat each width picture uploaded carry out respectively compression process, and the picture after process is joined in image cache pond, simultaneously, upload thread each width picture joined in image cache pond is uploaded in network album respectively, that is, while picture being carried out to compression process, namely processed good picture is being uploaded, while uploading processed good picture, untreated picture is being carried out to compression process again, thus shorten the uplink time of picture widely.

Accompanying drawing explanation

Fig. 1 is existing by the process schematic of batch picture uploading to network album.

Fig. 2 is that the present invention is by the flow chart of batch picture uploading to the embodiment of the method for network album.

Fig. 3 is when the value of M and N is 1, according to mode of the present invention by the process schematic of batch picture uploading to network album.

Fig. 4 is the composition structural representation of client embodiment of the present invention.

Embodiment

For problems of the prior art, propose a kind of by the scheme of batch picture uploading to network album in the present invention, the uplink time of picture can be shortened.

For make technical scheme of the present invention clearly, understand, to develop simultaneously embodiment referring to accompanying drawing, scheme of the present invention be described in further detail.

Fig. 2 is that the present invention is by the flow chart of batch picture uploading to the embodiment of the method for network album.As shown in Figure 2, comprising:

Step 21: when client receives batch picture uploading instruction, start M simultaneously and compress thread and N number ofly upload thread, M and N is positive integer.

When user needs to carry out batch picture uploading, corresponding instruction can be sent to used client, as clicked a certain button on human-computer interaction interface, after client receiving instruction, starting M simultaneously and compress thread and N number ofly upload thread.

M and N is positive integer, and concrete value all can be decided according to the actual requirements, and the value of M with N can be identical, also can be different.

Step 22: compression thread is treated each width picture uploaded and carried out compression process respectively, and joins in an image cache pond by the picture after process; Upload thread each width picture joined in image cache pond is uploaded in network album respectively.

In this step, under the prerequisite keeping certain definition, compression thread is treated each width picture uploaded and is carried out compression process respectively, and is joined in image cache pond by the picture after process.

Mention, most of network album provider, in order to save the memory space of server, all can require that client is by before in picture uploading to server, first compresses picture, to reduce the volume of picture under the prerequisite keeping certain definition before.

Usually, server can issue an index to client, for illustration of the volume requirement of the every width picture after uploading, such as can not more than 0.5M, so, client can according to the volume of each width picture to be uploaded, determine to adopt which kind of compress mode voluntarily, such as Lossless Compression mode, or lossy compression method mode, or the mode that Lossless Compression and lossy compression method combine.

Lossless Compression refers to and adopts certain algorithm to represent the data message of repetition, and picture can reduce completely, can not affect image content, and picture detail also can not be made to have loss; Lossy compression method then has certain change to picture, more monochrome information is remained when preserving picture, and form and aspect and the information of colorimetric purity and the pixel of surrounding are merged, the ratio merged is different, the ratio of compression is also different, because amount of information decreases, therefore compression ratio can be very high, but picture quality also can correspondingly decline.

Compared to Lossless Compression, lossy compression method can reduce picture volume better.

In actual applications, for each width picture to be uploaded, can, respectively by the difference between the picture volume comparing its actual volume and server requirement, determine flexibly to adopt Lossless Compression mode or lossy compression method mode, or both modes of combining.

How to carry out Lossless Compression and lossy compression method is prior art.

The space size in image cache pond also can be decided according to the actual requirements, and is not restricted in the present invention.

In addition, when carrying out compression process to each width picture to be uploaded, usually can follow certain order, specifically follow which kind of order and be not restricted, can be preset by user.

Such as, each width picture to be uploaded to be when user once travels the photo of shooting, so then can carry out compression process by the order after arriving first to each photos according to shooting time.

While compression thread carries out compression process, upload thread and each width picture joined in image cache pond is uploaded in network album respectively.

Usually, upload thread each width picture joined in image cache pond to be uploaded in network album respectively by the order after arriving first according to the joining day.

Further, upload thread after often uploading in a width picture to network album, uploaded picture to be about to and to delete from image cache pond, to save the memory space in image cache pond.

Visible, in embodiment illustrated in fig. 1, when needs carry out batch picture uploading, client can start M compression thread simultaneously and N number ofly upload thread, compress thread and upload thread and carry out parallel processing, namely compress thread treat each width picture uploaded carry out respectively compression process, and the picture after process is joined in image cache pond, simultaneously, upload thread each width picture joined in image cache pond is uploaded in network album respectively, that is, while picture being carried out to compression process, namely processed good picture is being uploaded, while uploading processed good picture, untreated picture is being carried out to compression process again, thus shorten the uplink time of picture widely.

In theory, the value of M and N is larger, more can shorten the uplink time of picture, but the value of M and N is larger, and the load of client is also larger, therefore, needs the value determining M and N according to actual conditions.

Usually, in actual applications, the value of M and N is 1, Fig. 3 and is when the value of M and N is 1, according to mode of the present invention by the process schematic of batch picture uploading to network album.As shown in Figure 3, thread a (compression thread) is respectively to picture A, picture B and picture C etc. carry out compression process, and the picture after process is joined in image cache pond, simultaneously, thread b (uploading thread) is respectively by the picture A after process, picture B, picture C etc. uploads in network album by network, and, in order to save the memory space in image cache pond, thread b is after uploading in network album by picture A, picture A can be deleted from image cache pond, equally, after picture B is uploaded in network album, picture B can be deleted from image cache pond, after picture C is uploaded in network album, picture C can be deleted from image cache pond, the like.

If one or two the value in M and N is not 1, value as M is 2, the value of N is 1, and supposes that 2 compression threads are respectively thread a and thread b, so, can while compression process being carried out to picture A by thread a, carry out compression by thread b to picture B to process, afterwards, by thread a, compression is carried out to picture C and process, carry out compression by thread b to picture D to process simultaneously, the like.

So far, the introduction about the inventive method embodiment is namely completed.

Based on above-mentioned introduction, Fig. 4 is the composition structural representation of client embodiment of the present invention.As shown in Figure 4, comprising:

Receiver module, for after receiving the instruction of batch picture uploading, notification handler module performs self function;

Processing module, for after receiving the notice of receiver module, start M simultaneously and compress thread and N number ofly upload thread, M and N is positive integer; Wherein, compression thread is used for carrying out compression process respectively to each width picture to be uploaded, and is joined in an image cache pond by the picture after process, uploads thread for being uploaded to respectively in network album by each width picture joined in image cache pond.

The specific works flow process of client shown in Fig. 4 is as follows:

After receiver module receives the batch picture uploading instruction of user, notice Executive Module performs self function; After Executive Module receives the notice of receiver module, start M simultaneously and compress thread and N number ofly upload thread; For each width picture to be uploaded, under the prerequisite keeping certain definition, M compression thread carries out compression process to it respectively according to predefined procedure, compress mode can be: the mode that lossy compression method mode, Lossless Compression mode, lossy compression method and Lossless Compression combine, and joins in image cache pond by the picture after every width process; Meanwhile, the each width picture joined in image cache pond was uploaded in network album by the order after arriving first according to the joining day by N number of thread of uploading respectively, and, uploading thread can after often uploading in a width picture to network album, be about to uploaded picture delete from image cache pond, to save the memory space in image cache pond.

The concrete value of M and N all can be decided according to the actual requirements, and usually, the value of M and N is 1.

Client shown in Fig. 4 can refer to PC or mobile terminal etc.

Visible, in embodiment illustrated in fig. 4, when needs carry out batch picture uploading, client can start M compression thread simultaneously and N number ofly upload thread, compress thread and upload thread and carry out parallel processing, namely compress thread treat each width picture uploaded carry out respectively compression process, and the picture after process is joined in image cache pond, simultaneously, upload thread each width picture joined in image cache pond is uploaded in network album respectively, that is, while picture being carried out to compression process, namely processed good picture is being uploaded, while uploading processed good picture, untreated picture is being carried out to compression process again, thus shorten the uplink time of picture widely.

And scheme of the present invention has the scope of application widely, such as, for the network album in the communal space in social networks, when batch picture uploaded wherein by needs, scheme of the present invention can be adopted.

In addition, for user, after adopting scheme of the present invention, only need choose each width picture to be uploaded and send the instruction of batch picture uploading, subsequent treatment all can be completed by client and server automatically, convenient quick again.

Therefore, scheme of the present invention is applicable to universal and promotes very much, has broad application prospects.

The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (8)

1., by the method for batch picture uploading to network album, it is characterized in that, comprising:
When client receives batch picture uploading instruction, start M simultaneously and compress thread and N number ofly upload thread, described M and N is positive integer;
Described compression thread is treated each width picture uploaded and is carried out compression process respectively, and joins in an image cache pond by the picture after process;
The each width picture joined in described image cache pond uploads in network album by described thread of uploading respectively.
2. method according to claim 1, is characterized in that, the method comprises further:
Uploaded picture, after often uploading in a width picture to described network album, is deleted by described thread of uploading from described image cache pond.
3. method according to claim 1 and 2, is characterized in that, the mode of described compression comprises: the mode that lossy compression method mode, Lossless Compression mode and lossy compression method and Lossless Compression combine one of them.
4. method according to claim 1 and 2, is characterized in that, the value of described M and N is 1.
5. a client, is characterized in that, comprising: receiver module and processing module;
Described receiver module, for after receiving the instruction of batch picture uploading, notifies that described processing module performs self function;
Described processing module, for after the notice receiving described receiver module, start M simultaneously and compress thread and N number ofly upload thread, described M and N is positive integer; Wherein, described compression thread is used for carrying out compression process respectively to each width picture to be uploaded, and by process after picture join in an image cache pond, described in upload thread for being uploaded to respectively in network album by each width picture joined in described image cache pond.
6. client according to claim 5, is characterized in that, described in upload thread and be further used for,
After often uploading in a width picture to described network album, uploaded picture is deleted from described image cache pond.
7. the client according to claim 5 or 6, is characterized in that, the mode of described compression comprises: the mode that lossy compression method mode, Lossless Compression mode and lossy compression method and Lossless Compression combine one of them.
8. the client according to claim 5 or 6, is characterized in that, the value of described M and N is 1.
CN201210075724.3A 2012-03-21 2012-03-21 A kind of by batch picture uploading to the method for network album and a kind of client CN103327042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210075724.3A CN103327042B (en) 2012-03-21 2012-03-21 A kind of by batch picture uploading to the method for network album and a kind of client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210075724.3A CN103327042B (en) 2012-03-21 2012-03-21 A kind of by batch picture uploading to the method for network album and a kind of client

Publications (2)

Publication Number Publication Date
CN103327042A CN103327042A (en) 2013-09-25
CN103327042B true CN103327042B (en) 2015-12-16

Family

ID=49195572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210075724.3A CN103327042B (en) 2012-03-21 2012-03-21 A kind of by batch picture uploading to the method for network album and a kind of client

Country Status (1)

Country Link
CN (1) CN103327042B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760408B (en) 2014-12-19 2020-04-28 华为终端有限公司 Picture sharing method and device and terminal equipment
CN106302581A (en) * 2015-05-21 2017-01-04 阿里巴巴集团控股有限公司 The introduction method of batch data and system
CN105162863A (en) * 2015-09-01 2015-12-16 北京皮尔布莱尼软件有限公司 Picture uploading device and method and computing equipment
CN105204740A (en) * 2015-09-23 2015-12-30 惠州Tcl移动通信有限公司 Manual focal length adjusting method and system for mobile terminal
CN105138253A (en) * 2015-09-30 2015-12-09 深圳市创想天空科技股份有限公司 Method and device for batch processing of pictures
CN105426569A (en) * 2015-10-27 2016-03-23 云南电网有限责任公司 Rule-driven automatic generation and update method for distribution network single line diagram
CN105897500A (en) * 2015-12-09 2016-08-24 乐视网信息技术(北京)股份有限公司 Picture processing method and device
CN106126127A (en) * 2016-08-29 2016-11-16 天脉聚源(北京)传媒科技有限公司 A kind of method and device of uploading pictures
CN106326070A (en) * 2016-08-29 2017-01-11 天脉聚源(北京)传媒科技有限公司 Method and device for uploading pictures
CN106998487A (en) * 2017-04-27 2017-08-01 努比亚技术有限公司 image processing method, device and mobile terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098311A (en) * 2006-06-29 2008-01-02 腾讯科技(深圳)有限公司 Picture live transmission method and device in instant communication
CN101808182A (en) * 2010-02-05 2010-08-18 腾讯科技(深圳)有限公司 Method, terminal and system for uploading pictures
CN101860621A (en) * 2010-06-07 2010-10-13 中兴通讯股份有限公司 Mobile terminal file uploading method and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098311A (en) * 2006-06-29 2008-01-02 腾讯科技(深圳)有限公司 Picture live transmission method and device in instant communication
CN101808182A (en) * 2010-02-05 2010-08-18 腾讯科技(深圳)有限公司 Method, terminal and system for uploading pictures
CN101860621A (en) * 2010-06-07 2010-10-13 中兴通讯股份有限公司 Mobile terminal file uploading method and mobile terminal

Also Published As

Publication number Publication date
CN103327042A (en) 2013-09-25

Similar Documents

Publication Publication Date Title
US9836854B2 (en) Systems and methods for lossy compression of image color profiles
JP6120390B2 (en) Predicted characteristics compensated for next-generation video content
JP5687787B2 (en) Moving picture decoding apparatus and method
US10701291B2 (en) On-chip image sensor data compression
AU2012295532B2 (en) Zero-click photo upload
US20140219634A1 (en) Video preview creation based on environment
US20160100101A1 (en) Recommending transformations for photography
KR102118234B1 (en) Mixed mode for frame buffer compression
US10148948B1 (en) Selection of transform size in video coding
US10334275B2 (en) Panoramic view customization
US9679365B2 (en) Processing high dynamic range images
JP6640731B2 (en) Method and apparatus for lossless video coding signaling
US9420282B2 (en) Video coding redundancy reduction
US9210434B2 (en) Screen map and standards-based progressive codec for screen content coding
US9172907B2 (en) Method and apparatus for dynamically adjusting aspect ratio of images during a video call
Lee et al. Fast encoding algorithm based on depth of coding-unit for high efficiency video coding
US9262986B2 (en) Reference frame management for screen content video coding using hash or checksum functions
KR20170126896A (en) Fast video encoding method with block partitioning
Prasantha et al. Image compression using SVD
Psannis et al. Advanced media-based smart big data on intelligent cloud systems
CN103905741A (en) Ultra-high-definition panoramic video real-time generation and multi-channel synchronous play system
US9262670B2 (en) Adaptive region of interest
US20160162151A1 (en) Input method and device thereof, and auxiliary input method and system thereof
Goswami et al. Early coding unit–splitting termination algorithm for high efficiency video coding (HEVC)
Wiseman The still image lossy compression standard-JPEG

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
C14 Grant of patent or utility model
TR01 Transfer of patent right

Effective date of registration: 20200821

Address after: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518044 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.