CN109889566A - Suitable for the photograph document handling method and device under weak net environment - Google Patents

Suitable for the photograph document handling method and device under weak net environment Download PDF

Info

Publication number
CN109889566A
CN109889566A CN201811611137.5A CN201811611137A CN109889566A CN 109889566 A CN109889566 A CN 109889566A CN 201811611137 A CN201811611137 A CN 201811611137A CN 109889566 A CN109889566 A CN 109889566A
Authority
CN
China
Prior art keywords
splicing
value
target
file
picture
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201811611137.5A
Other languages
Chinese (zh)
Inventor
叶帅
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qianxin Technology Co Ltd
Original Assignee
Beijing Qianxin Technology Co Ltd
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 Beijing Qianxin Technology Co Ltd filed Critical Beijing Qianxin Technology Co Ltd
Priority to CN201811611137.5A priority Critical patent/CN109889566A/en
Publication of CN109889566A publication Critical patent/CN109889566A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

A kind of photograph document handling method and device suitable under weak net environment provided in an embodiment of the present invention, the described method includes: target MD5 value and the corresponding multiple fragments of reception Target Photo file, multiple fragments are subjected to splicing, obtain splicing picture file, obtain the splicing MD5 value of the splicing picture file, the splicing MD5 value is compared with the target MD5 value, if they are the same, then the Target Photo file is uploaded or is downloaded successfully, to realize in the efficient progress picture upload of weak net environment or downloading.

Description

Suitable for the photograph document handling method and device under weak net environment
Technical field
The present invention relates to technical field of information processing more particularly to a kind of picture file processing sides suitable under weak net environment Method and device.
Background technique
It uploads at present in picture file in downloading process, usually used is the mode for integrally uploading picture.But Under weak net environment, When signal is disconnected, it will cause entire picture and only upload or downloaded a part of data.At this point, when letter It number is again coupled to, need to also upload again or download from starting, causing can not efficient upload or download pictures file.
Summary of the invention
The present invention provides a kind of photograph document handling method and device suitable under weak net environment, for solving above-mentioned ask Topic.
In a first aspect, the embodiment of the present invention provides a kind of photograph document handling method suitable under weak net environment, comprising:
The target MD5 value and corresponding multiple fragments, the fragment for receiving Target Photo file are to the Target Photo Picture in file carries out the data slot that fragment processing obtains;
Multiple fragments are subjected to splicing, obtain splicing picture file;
The splicing MD5 value for obtaining the splicing picture file, the splicing MD5 value and the target MD5 value are compared Compared with if they are the same, then the Target Photo file is uploaded or downloaded successfully.
Second aspect, the embodiment of the present invention provide a kind of picture file processing unit suitable under weak net environment, comprising:
Receiving module, target MD5 value and corresponding multiple fragments, the fragment for receiving Target Photo file are pair Picture in the Target Photo file carries out the data slot that fragment processing obtains;
Splicing module obtains splicing picture file for multiple fragments to be carried out splicing;
Processing module, for obtaining the splicing MD5 value of the splicing picture file, by the splicing MD5 value and the mesh Mark MD5 value is compared, and if they are the same, then the Target Photo file is uploaded or downloaded successfully.
The third aspect, the embodiment of the present invention provides a kind of electronic equipment, including memory, processor and is stored in memory Computer program that is upper and can running on a processor, which is characterized in that the processor is realized as above when executing described program The step of stating method.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, are stored thereon with calculating Machine program, which is characterized in that realize when the computer program is executed by processor such as the step of the above method.
As shown from the above technical solution, a kind of picture file processing suitable under weak net environment provided in an embodiment of the present invention Method and device, target MD5 value and corresponding multiple fragments by reception Target Photo file, multiple fragments are spliced Processing obtains splicing picture file, the splicing MD5 value of the splicing picture file is obtained, by the splicing MD5 value and the mesh Mark MD5 value is compared, and if they are the same, then the Target Photo file is uploaded or downloaded successfully, to realize high in weak net environment The upload of carry out picture or downloading of efficiency.
Detailed description of the invention
Fig. 1 is the process signal for the photograph document handling method being suitable under weak net environment that one embodiment of the invention provides Figure;
Fig. 2 is the structural representation for the picture file processing unit being suitable under weak net environment that one embodiment of the invention provides Figure;
Fig. 3 is the structural schematic diagram for the electronic equipment that one embodiment of the invention provides.
Specific embodiment
With reference to the accompanying drawings and examples, specific embodiments of the present invention will be described in further detail.Implement below Example is not intended to limit the scope of the invention for illustrating the present invention.
Fig. 1 shows a kind of photograph document handling method suitable under weak net environment of one embodiment of the invention offer, packet It includes:
S11, the target MD5 value for receiving Target Photo file and corresponding multiple fragments, the fragment are to the target Picture in picture file carries out the data slot that fragment processing obtains;
S12, multiple fragments are subjected to splicing, obtain splicing picture file;
S13, the splicing MD5 value for obtaining the splicing picture file, by the splicing MD5 value and the target MD5 value into Row compares, and if they are the same, then the Target Photo file is uploaded or downloaded successfully.
For step S11- step S13, it should be noted that in embodiments of the present invention, either uploading pictures are still Download pictures, either client or server-side (are not to continue with last time when generating a new picture file behavior each time Unfinished picture backup), will generate picture file object (pic_bak) mono- picture file of include (may but not It is limited to) an at least picture (picture).For picture, picture is one for belonging to any image file (pic_bak) Object picture.A picture (physically same) on mobile phone, can appear in multiple picture files (pic_bak) object In, and represent different pictures (picture) object.Restore every time, is in fact exactly some picture file restored (pic_bak) all pictures (pictures) object of object.
Under weak net environment, picture file upload or downloading before, need to the picture in the Target Photo file into Row fragment processing obtain data slot (not necessarily physically really tear open, 20KB can be read from full picture every time Data slot come out), an any of them data slot is just called fragment (chunk).Under weak net environment, each fragment Size is in the range of 10KB~100KB.
Under weak net environment, system only supports most 99999999 fragments at present, so the Target Photo file Size is less than 1000GB.
In embodiments of the present invention, when picture file is downloaded, executing subject can be client, and client can receive The target MD5 value of Target Photo file and corresponding multiple fragments.When picture file uploads, executing subject can be service End, server-side can receive Target Photo file target MD5 value and corresponding multiple fragments.
In embodiments of the present invention, multiple fragments are subjected to splicing, obtain splicing picture file, obtains the splicing The splicing MD5 value is compared by the splicing MD5 value of picture file with the target MD5 value, if they are the same, then the target Picture file is uploaded or is downloaded successfully.
In embodiments of the present invention, if the splicing MD5 value and the target MD5 value be not identical, by multiple fragments into Capable splicing again, obtains new splicing picture file.Then the acquisition of MD5 value is carried out to new splicing picture file, then will The splicing MD5 value is compared with the target MD5 value.So circulation, until splicing MD5 value and the target MD5 value phase With until.
A kind of photograph document handling method suitable under weak net environment provided in an embodiment of the present invention, by receiving target figure Multiple fragments are carried out splicing by the target MD5 value of piece file and corresponding multiple fragments, are obtained splicing picture file, are obtained The splicing MD5 value for taking the splicing picture file, the splicing MD5 value is compared with the target MD5 value, if they are the same, Then the Target Photo file is uploaded or download successfully, thus realization the efficient progress picture upload of weak net environment or under It carries.
Fig. 2 shows a kind of picture file processing unit suitable under weak net environment that one embodiment of the invention provides, packets Include receiving module 21, splicing module 22 and processing module 23, in which:
Receiving module 21, target MD5 value and corresponding multiple fragments, the fragment for receiving Target Photo file are The data slot that fragment processing obtains is carried out to the picture in the Target Photo file;
Splicing module 22 obtains splicing picture file for multiple fragments to be carried out splicing;
Processing module 23, for obtain it is described splicing picture file splicing MD5 value, by the splicing MD5 value with it is described Target MD5 value is compared, and if they are the same, then the Target Photo file is uploaded or downloaded successfully.
Since described device of the embodiment of the present invention is identical as the principle of above-described embodiment the method, for more detailed Explain that details are not described herein for content.
It should be noted that can be by hardware processor (hardware processor) come real in the embodiment of the present invention Existing related function module.
A kind of picture file processing unit suitable under weak net environment provided in an embodiment of the present invention, by receiving target figure Multiple fragments are carried out splicing by the target MD5 value of piece file and corresponding multiple fragments, are obtained splicing picture file, are obtained The splicing MD5 value for taking the splicing picture file, the splicing MD5 value is compared with the target MD5 value, if they are the same, Then the Target Photo file is uploaded or download successfully, thus realization the efficient progress picture upload of weak net environment or under It carries.
Fig. 3 illustrates the entity structure schematic diagram of a kind of electronic equipment, as shown in figure 3, the electronic equipment may include: place Manage device (processor) 310, communication interface (Communications Interface) 320,330 He of memory (memory) Communication bus 340, wherein processor 310, communication interface 320, memory 330 complete mutual lead to by communication bus 340 Letter.Processor 310 can call the logical order in memory 330, to execute following method: receiving the mesh of Target Photo file MD5 value and corresponding multiple fragments are marked, multiple fragments are subjected to splicing, splicing picture file is obtained, obtains the splicing The splicing MD5 value is compared by the splicing MD5 value of picture file with the target MD5 value, if they are the same, then the target Picture file is uploaded or is downloaded successfully.
In addition, the logical order in above-mentioned memory 330 can be realized by way of SFU software functional unit and conduct Independent product when selling or using, can store in a non-transient computer readable storage medium.Based on such reason Solution, substantially the part of the part that contributes to existing technology or the technical solution can in other words for technical solution of the present invention To be expressed in the form of software products, which is stored in a storage medium, including some instructions With so that computer equipment (can be personal computer, server or the network equipment an etc.) execution present invention is each The all or part of the steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk Etc. the various media that can store program code.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member It is physically separated with being or may not be, component shown as a unit may or may not be physics list Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of photograph document handling method suitable under weak net environment characterized by comprising
The target MD5 value and corresponding multiple fragments, the fragment for receiving Target Photo file are to the Target Photo file In picture carry out fragment processing obtain data slot;
Multiple fragments are subjected to splicing, obtain splicing picture file;
The splicing MD5 value for obtaining the splicing picture file, the splicing MD5 value is compared with the target MD5 value, if Identical, then the Target Photo file is uploaded or is downloaded successfully.
2. the method according to claim 1, wherein further include:
If the splicing MD5 value and the target MD5 value be not identical, multiple fragments are subjected to splicing again, are obtained new Splicing picture file.
3. the method according to claim 1, wherein under weak net environment, each fragment size 10KB~ In the range of 100KB.
4. according to the method described in claim 3, it is characterized in that, under weak net environment, the size of the Target Photo file Less than 1000GB.
5. a kind of picture file processing unit suitable under weak net environment characterized by comprising
Receiving module, target MD5 value and corresponding multiple fragments, the fragment for receiving Target Photo file are to described Picture in Target Photo file carries out the data slot that fragment processing obtains;
Splicing module obtains splicing picture file for multiple fragments to be carried out splicing;
Processing module, for obtaining the splicing MD5 value of the splicing picture file, by the splicing MD5 value and the target MD5 Value is compared, and if they are the same, then the Target Photo file is uploaded or downloaded successfully.
6. device according to claim 5, which is characterized in that the splicing module is also used to:
If the splicing MD5 value and the target MD5 value be not identical, multiple fragments are subjected to splicing again, are obtained new Splicing picture file.
7. device according to claim 5, which is characterized in that under weak net environment, each fragment size 10KB~ In the range of 100KB.
8. device according to claim 7, which is characterized in that under weak net environment, the size of the Target Photo file Less than 1000GB.
9. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that the processor is realized when executing described program such as any one of Claims 1-4 the method Step.
10. a kind of non-transient computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer It is realized when program is executed by processor such as the step of any one of Claims 1-4 the method.
CN201811611137.5A 2018-12-27 2018-12-27 Suitable for the photograph document handling method and device under weak net environment Pending CN109889566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811611137.5A CN109889566A (en) 2018-12-27 2018-12-27 Suitable for the photograph document handling method and device under weak net environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811611137.5A CN109889566A (en) 2018-12-27 2018-12-27 Suitable for the photograph document handling method and device under weak net environment

Publications (1)

Publication Number Publication Date
CN109889566A true CN109889566A (en) 2019-06-14

Family

ID=66925345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811611137.5A Pending CN109889566A (en) 2018-12-27 2018-12-27 Suitable for the photograph document handling method and device under weak net environment

Country Status (1)

Country Link
CN (1) CN109889566A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049113A1 (en) * 2006-07-13 2008-02-28 Canon Kabushiki Kaisha Image sensing apparatus
CN103457973A (en) * 2012-06-01 2013-12-18 深圳市腾讯计算机系统有限公司 Image uploading method and system, image uploading client terminal and network server
CN105119967A (en) * 2015-07-15 2015-12-02 天脉聚源(北京)教育科技有限公司 Picture segmentation transmission method and device
CN105224257A (en) * 2015-10-16 2016-01-06 浪潮(北京)电子信息产业有限公司 The disposal route of large files and system in a kind of cloud storage system
CN106302582A (en) * 2015-05-15 2017-01-04 深圳楼兰辉煌科技有限公司 File uploading method based on mobile unit, mobile unit, server and system
CN107360254A (en) * 2017-08-22 2017-11-17 北京奇艺世纪科技有限公司 A kind of document down loading method, device, server and terminal
CN107360191A (en) * 2017-08-28 2017-11-17 腾讯科技(深圳)有限公司 A kind of file acquisition method, device and storage device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049113A1 (en) * 2006-07-13 2008-02-28 Canon Kabushiki Kaisha Image sensing apparatus
CN103457973A (en) * 2012-06-01 2013-12-18 深圳市腾讯计算机系统有限公司 Image uploading method and system, image uploading client terminal and network server
CN106302582A (en) * 2015-05-15 2017-01-04 深圳楼兰辉煌科技有限公司 File uploading method based on mobile unit, mobile unit, server and system
CN105119967A (en) * 2015-07-15 2015-12-02 天脉聚源(北京)教育科技有限公司 Picture segmentation transmission method and device
CN105224257A (en) * 2015-10-16 2016-01-06 浪潮(北京)电子信息产业有限公司 The disposal route of large files and system in a kind of cloud storage system
CN107360254A (en) * 2017-08-22 2017-11-17 北京奇艺世纪科技有限公司 A kind of document down loading method, device, server and terminal
CN107360191A (en) * 2017-08-28 2017-11-17 腾讯科技(深圳)有限公司 A kind of file acquisition method, device and storage device

Similar Documents

Publication Publication Date Title
CN105871587A (en) Log uploading method and device
US10146675B1 (en) Automated code upgrade testing utilizing a copy data manager
CN109445827B (en) Game updating method and device, electronic equipment and storage medium
CN110740188B (en) Mirror image file uploading method, device, equipment and computer readable storage medium
CN110377314B (en) System upgrading method, device, equipment and medium for distributed storage system
US9940115B2 (en) Mobile application deployment for distributed computing environments
CN104182294A (en) Method and device for backing up and recovering file
CN104008120B (en) System and method for archives data
CN108415714A (en) The method for upgrading system and device of mobile terminal
CN109408469A (en) Stale data document handling method, device, electronic device and storage medium
US20170163787A1 (en) Method and electronic device for upgrading or downgrading system
CN106227893A (en) A kind of file type acquisition methods and device
CN114185484A (en) Method, device, equipment and medium for clustering document storage
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
US10318385B2 (en) Service recovery using snapshots and interservice messages
US10031764B2 (en) Managing executable files
EP3059692B1 (en) System and method for antivirus checking of objects from a plurality of virtual machines
CN109936609B (en) Terminal chain type upgrading method and device and upgrading management server
CN109522282A (en) Picture management method, device, computer installation and storage medium
CN109889566A (en) Suitable for the photograph document handling method and device under weak net environment
CN108965463B (en) File transmission method, device and system
CN116432773A (en) Model processing method and device, electronic equipment and storage medium
CN105204914A (en) Downloading method and device of application software
EP2680135A1 (en) Methods for updating applications
CN112783514B (en) Method and system for deployment management of web front-end project

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190614