CN103677673B - The method and system that a kind of document classification batch uploads - Google Patents
The method and system that a kind of document classification batch uploads Download PDFInfo
- Publication number
- CN103677673B CN103677673B CN201310719335.4A CN201310719335A CN103677673B CN 103677673 B CN103677673 B CN 103677673B CN 201310719335 A CN201310719335 A CN 201310719335A CN 103677673 B CN103677673 B CN 103677673B
- Authority
- CN
- China
- Prior art keywords
- file
- folder
- sub
- upload
- compressed package
- 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.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention is applied to data transfer of computer technical field, there is provided the method and system that a kind of document classification batch uploads, methods described include:Terminal is classified file in file to be uploaded according to file name suffix;Corresponding upload sub-folder is created according to different file types, the folder name for uploading sub-folder includes the folder name and file type of the file to be uploaded;The file is copied in the upload sub-folder for the file type that folder name includes the file;By the upload sub-folder boil down to and its folder name identical compressed package;The compressed package is uploaded to storage server.The present invention, realize and polytype document classification uploaded into different storage servers, reduce due to file type is different and multi-pass operation files in batch upload function is brought cumbersome, reduce misinformation, leakage biography, improve operating efficiency.
Description
Technical field
The invention belongs to data transfer of computer technical field, more particularly to a kind of method that uploads of document classification batch and
System.
Background technology
Present network system and application is required for using files in batch upload function, and in general is achieved in that and will first treated
The files in batch for uploading sub-folder is broken into file bag corresponding to Folder Name, and the file bag accomplished fluently then is passed through into deployment
WEB server on upload function upload under the assigned catalogue of corresponding document storage server.But when the file uploaded
When polytype file, such as text, video file, picture file, audio file type file in folder be present, and need
They are uploaded to corresponding document storage server respectively, as text uploads to text files memory server, depending on
Frequency file uploads to video file storage server, and picture file uploads to picture file storage server, and audio file uploads
To audio files storage server, file to be uploaded must be classified according to the file name suffix of file in this case,
Then corresponding file bag is broken into one by one by classifying, then the upload function in the WEB server for passing through deployment distinguishes file bag
In document storage server assigned catalogue corresponding to uploading to, although this method can realize document classification, batch uploads work(
Can, but it is cumbersome, easily cause misinformation, leakage transmitting file.The above is only used for auxiliary and understands technical scheme,
Do not mean the recognition that the foregoing is prior art.
The content of the invention
The embodiments of the invention provide the method and system that a kind of document classification batch uploads, it is intended to solves existing file point
The problem of cumbersome, to easily cause misinformation, leakage transmitting file be present in class batch method for uploading.
On the one hand, there is provided a kind of method that document classification batch uploads, methods described include:
Terminal is classified file in file to be uploaded according to file name suffix;
The terminal creates corresponding upload sub-folder, the file for uploading sub-folder according to different file types
Folder name includes the folder name and file type of the file to be uploaded;
The terminal copies to the file upload Ziwen of file type of the folder name including the file
In part folder;
The terminal uploads sub-folder boil down to and its folder name identical compressed package by described;
The terminal uploads the compressed package to storage server.
On the other hand, there is provided the system that a kind of document classification batch uploads, terminal, web server and storage server, three
Person is by network connection and communicates, and the terminal includes:
Document classification unit, for according to file name suffix, file in file to be uploaded to be classified;
Folder creation unit, it is described to upload son for creating corresponding upload sub-folder according to different file types
The folder name of file includes the folder name and file type of the file to be uploaded;
File copied cells, include for the file to be copied into folder name described in the file type of the file
Upload in sub-folder;
File compression unit, for uploading sub-folder boil down to and its folder name identical compressed package by described;
Compressed package uploading unit, for uploading the compressed package to storage server.
In the embodiment of the present invention, terminal is classified file in file to be uploaded according to file name suffix;According to not
Corresponding upload sub-folder is created with file type, the folder name for uploading sub-folder includes the file to be uploaded
The folder name and file type of folder;The file is copied to the file type of folder name including the file it is described on
Pass in sub-folder;By the upload sub-folder boil down to and its folder name identical compressed package;Upload the compressed package
To storage server, the present invention, realize and polytype document classification uploaded into different storage servers, reduce due to
File type is different and multi-pass operation files in batch upload function is brought cumbersome, reduces misinformation, leakage passes, and improves work and imitates
Rate.
Brief description of the drawings
Fig. 1 is the implementation process figure for the method that the document classification batch that the embodiment of the present invention one provides uploads;
Fig. 2 is the structured flowchart for the system that the document classification batch that the embodiment of the present invention two provides uploads.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
In embodiments of the present invention, terminal is classified file in file to be uploaded according to file name suffix;According to
Different file types create corresponding upload sub-folder, and the folder name for uploading sub-folder includes the text to be uploaded
The folder name and file type of part folder;The file is copied into folder name is included described in the file type of the file
Upload in sub-folder;By the upload sub-folder boil down to and its folder name identical compressed package;Upload the compression
Wrap to web server.
It is described in detail below in conjunction with realization of the specific embodiment to the present invention:
Embodiment one
Fig. 1 shows the implementation process for the method that the document classification batch that the embodiment of the present invention one provides uploads, and is described in detail such as
Under:
In step S101, terminal is classified file in file to be uploaded according to file name suffix.
In the present embodiment, the file name suffix include but is not limited to rmvb, avi, jpg, gif, doc, ppt, wma,
mp3.Specifically, when the file of multiple file types be present in file to be uploaded, it is the basic class of file that terminal, which calls File classes,
In list () method obtain the filename of file described in the file to be uploaded, then by way of circular recursion
Obtain the file name suffix of the file and classified.The entitled character string forms of file.Wherein, if file name suffix
For rmvb, avi, then this document is video class file, if file name suffix is jpg, gif, this document is picture class file,
If file name suffix is doc, ppt, this document is document class file, if file name suffix is wma, mp3, this document
For audio class file.
In step s 102, the terminal creates corresponding upload sub-folder, the upload according to different file types
The folder name of sub-folder includes the folder name and file type of the file to be uploaded.
In the present embodiment, the file type includes video, picture, document, audio.Specifically, the terminal according to
Different file types call mkdir () method in File classes to create corresponding upload sub-folder, the upload sub-folder
Folder name include the folder name and file type of the file to be uploaded.Create when uploading sub-folder, it is necessary to elder generation
Title according to sub-folder is uploaded judges to upload whether sub-folder has been present, if there is not creating then, in the absence of then
Created by mkdir () method in File classes, if any a file to be uploaded, its folder name is Journey to the West, wherein wrapping
The files such as film, story introduction, stage photo are included, wherein, film is the video file that suffix is rmvb, and story introduction is that suffix is
Doc text, stage photo are the picture files that suffix is jpg, therefore, three can be created according to above-mentioned 3 kinds of file types
Upload sub-folder, respectively Journey to the West _ TEXT, Journey to the West _ VIDEO and Journey to the West _ PICTURE.
In step s 103, the file is copied to file type of the folder name including the file by the terminal
In the upload sub-folder.
In the present embodiment, create after uploading sub-folder, terminal is by the file root in file to be uploaded
Copied to according to different file types in the corresponding upload sub-folder created, text copies to text
Folder, picture file copy to Photo folder, video file copies to video file folder, audio file copies to audio file
Folder.Specifically, film is copied in Journey to the West _ VIDEO, story introduction is copied into Journey to the West _ TEXT, stage photo is copied to
In Journey to the West _ PICTURE.
In step S104, the terminal compresses the upload sub-folder boil down to its folder name identical
Bag.
In the present embodiment, it is any to include war, rar and zip for the form of the compressed package.Specifically, terminal calls life
Packing class into compressed package uploads sub-folder boil down to and the folder name identical pressure for uploading sub-folder by described
Contracting bag.Packing class includes ZipOutputStream classes.
In step S105, the terminal uploads the compressed package to storage server.
As a preferred scheme, after step S105, in addition to the compressed package received by web server, and will
The compressed package is uploaded in the assigned catalogue of the storage server consistent with the title of the compressed package.
Specifically, the compressed package that web server receiving terminal uploads, by compressed package according to compressed package title suffix knot
The information for each document storage server being configured is closed, such as file store path path, the file of document storage server
Storage server address addr, port numbers port, user name username password password, by FTP modes be connected to by
The document storage server of compressed package is uploaded, the file uploading method that has write is called after successful connection by different type
File bag upload to respectively in the assigned catalogue path of corresponding document storage server, the compressed package of title including TEXT uploads
To the assigned catalogue path of text files memory server, the compressed package that title includes PICTURE uploads to picture file storage
The assigned catalogue path of server, compressed package of the title including VIDEO upload to the assigned catalogue of video file storage server
path。
It the present embodiment, can reach according to file type, classify and the upper transmitting file of batch is to different storage servers, reduce
Due to file type is different and multi-pass operation files in batch upload function is brought cumbersome, a step is only needed in web server
Operation all types of files can just be uploaded to respectively in the assigned catalogue of corresponding document storage server, reduce misinformation,
Leakage passes, and improves operating efficiency.
Embodiment two
Fig. 2 shows the concrete structure block diagram for the system that the document classification batch that the embodiment of the present invention two provides uploads, and is
It is easy to illustrate, illustrate only the part related to the embodiment of the present invention.In the present embodiment, this document classification batch uploads
System includes:Terminal 1, web server 2 and storage server 3, three is by network connection and communicates.
Wherein, the terminal 1 includes:
Document classification unit 11, for according to file name suffix, file in file to be uploaded to be classified;
Folder creation unit 12, for creating corresponding upload sub-folder, the upload according to different file types
The folder name of sub-folder includes the folder name and file type of the file to be uploaded;
File copied cells 13, for the file to be copied to the institute of file type of the folder name including the file
State and upload in sub-folder;
File compression unit 14, for the upload sub-folder boil down to be compressed with its folder name identical
Bag;
Compressed package uploading unit 15, for uploading the compressed package to storage server.
The terminal is classified according to file type and the upper transmitting file of batch is to different storage servers, reduce due to text
Part type is different and multi-pass operation files in batch upload function bring it is cumbersome.
Further, the document classification unit 11 is specifically used for calling treats described in list () method acquisition in File classes
The filename of file described in file is uploaded, the file name suffix of the file is then obtained by way of circular recursion simultaneously
Classified.
Further, the folder creation unit 12 is specifically used for being called in File classes according to different file types
Mkdir () method creates corresponding upload sub-folder.
Further, the file compression unit 14 is specifically used for calling the packing class for generating compressed package by the upload
The folder name identical compressed package of sub-folder boil down to and the upload sub-folder.
Further, the web server 2 includes:
Compressed package receiving unit 21, for receiving the compressed package;
Compressed package uploading unit 22, taken for the compressed package to be uploaded into the storage consistent with the title of the compressed package
It is engaged in the assigned catalogue of device.
Only need single stepping that all types of files can just be uploaded to corresponding document storage clothes respectively in web server
It is engaged in the assigned catalogue of device, reduces misinformation, leakage biography, improve operating efficiency.
The system that document classification batch provided in an embodiment of the present invention uploads can be applied to be implemented in foregoing corresponding method
In example one, details will not be repeated here referring to the description of above-described embodiment one.
It is worth noting that, in said system embodiment, included unit is simply drawn according to function logic
Point, but above-mentioned division is not limited to, as long as corresponding function can be realized;In addition, each functional unit is specific
Title is also only to facilitate mutually distinguish, the protection domain being not intended to limit the invention.
In addition, one of ordinary skill in the art will appreciate that realize all or part of step in the various embodiments described above method
It is that by program the hardware of correlation can be instructed to complete, corresponding program can be stored in a computer-readable storage and be situated between
In matter, described storage medium, such as ROM/RAM, disk or CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.
Claims (8)
1. a kind of method that document classification batch uploads, it is characterised in that methods described includes:
Terminal is classified file in file to be uploaded according to file name suffix;
The terminal creates corresponding upload sub-folder, the folder name for uploading sub-folder according to different file types
The folder name and file type of the file to be uploaded are included, wherein, when creating upload sub-folder, according to upload Ziwen
The title of part folder judges whether upload sub-folder has been present, if there is not creating then, in the absence of then creating;
The terminal copies to the file upload sub-folder of file type of the folder name including the file
In;
The terminal uploads sub-folder boil down to and its folder name identical compressed package by described;
The terminal uploads the compressed package to storage server;
The terminal is classified file in file to be uploaded specially according to file name suffix:
List () method in terminal calling File classes obtains the filename of file described in the file to be uploaded, Ran Houtong
The mode for crossing circular recursion obtains the file name suffix of the file and classified.
2. the method as described in claim 1, it is characterised in that the terminal creates corresponding upload according to different file types
Sub-folder is specially:
The terminal calls mkdir () method in File classes to create corresponding upload sub-folder according to different file types.
3. the method as described in claim 1, it is characterised in that the terminal is literary with it by the upload sub-folder boil down to
Part presss from both sides name identical compressed package:
The terminal calls the packing class of generation compressed package to upload sub-folder boil down to and the upload sub-folder by described
Folder name identical compressed package.
4. the method as described in claim 1,2 or 3, it is characterised in that methods described also includes:
The compressed package is received by web server, and the compressed package is uploaded to consistent with the title of the compressed package
In the assigned catalogue of storage server.
5. the system that a kind of document classification batch uploads, it is characterised in that terminal, web server and storage server, San Zhetong
Cross network connection and communicate, the terminal includes:
Document classification unit, for according to file name suffix, file in file to be uploaded to be classified;
Folder creation unit, for creating corresponding upload sub-folder, the upload subfile according to different file types
The folder name of folder includes the folder name and file type of the file to be uploaded, wherein, when creating upload sub-folder,
Title according to sub-folder is uploaded judges to upload whether sub-folder has been present, if there is not creating then, in the absence of then
Create;
File copied cells, for the file to be copied to the upload of file type of the folder name including the file
In sub-folder;
File compression unit, for uploading sub-folder boil down to and its folder name identical compressed package by described;
Compressed package uploading unit, for uploading the compressed package to storage server;
The document classification unit is specifically used for calling list () method in File classes to obtain institute in the file to be uploaded
The filename of file is stated, the file name suffix of the file is then obtained by way of circular recursion and is classified.
6. system as claimed in claim 5, it is characterised in that the folder creation unit is specifically used for according to different files
Type calls mkdir () method in File classes to create corresponding upload sub-folder.
7. system as claimed in claim 5, it is characterised in that the file compression unit is specifically used for calling generation compression
The packing class of bag uploads sub-folder boil down to and the folder name identical compressed package for uploading sub-folder by described.
8. the system as described in claim 5,6 or 7, it is characterised in that the web server includes:
Compressed package receiving unit, for receiving the compressed package;
Compressed package uploading unit, for the compressed package to be uploaded to the storage server consistent with the title of the compressed package
In assigned catalogue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310719335.4A CN103677673B (en) | 2013-12-23 | 2013-12-23 | The method and system that a kind of document classification batch uploads |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310719335.4A CN103677673B (en) | 2013-12-23 | 2013-12-23 | The method and system that a kind of document classification batch uploads |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103677673A CN103677673A (en) | 2014-03-26 |
CN103677673B true CN103677673B (en) | 2017-12-19 |
Family
ID=50315375
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310719335.4A Active CN103677673B (en) | 2013-12-23 | 2013-12-23 | The method and system that a kind of document classification batch uploads |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103677673B (en) |
Families Citing this family (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978319A (en) * | 2014-04-02 | 2015-10-14 | 东华软件股份公司 | Method and equipment used for classified transmission of files |
CN104506450A (en) * | 2014-11-06 | 2015-04-08 | 小米科技有限责任公司 | Media resource feedback method and device |
CN106445951B (en) * | 2015-08-07 | 2022-05-17 | 中兴通讯股份有限公司 | File transmission method and device |
CN106658153B (en) * | 2015-11-02 | 2019-09-20 | 腾讯科技(北京)有限公司 | A kind of data processing method and equipment |
CN105302572A (en) * | 2015-11-19 | 2016-02-03 | 天脉聚源(北京)教育科技有限公司 | Method and device for importing file into software |
CN105701195A (en) * | 2016-01-12 | 2016-06-22 | 深圳市创维电器科技有限公司 | Method and system for implementing automatic sorted storing according to file types |
CN105592162B (en) * | 2016-01-20 | 2019-05-17 | 歌尔股份有限公司 | Method for uploading and system based on polymorphic type file |
CN106991104B (en) * | 2016-01-21 | 2020-03-17 | 泰康保险集团股份有限公司 | Database script deployment device and database script deployment method |
CN106878428A (en) * | 2017-02-23 | 2017-06-20 | 郑州云海信息技术有限公司 | Method and device that a kind of file is uploaded |
CN107276913B (en) * | 2017-05-23 | 2021-06-15 | 努比亚技术有限公司 | Batch file transmission method, terminal and computer readable storage medium |
CN107071073A (en) * | 2017-06-27 | 2017-08-18 | 郑州云海信息技术有限公司 | A kind of document transmission method and device applied to object storage system |
CN107797768A (en) * | 2017-10-11 | 2018-03-13 | 南京东方金信数据服务有限公司 | A kind of method and system for handling big data |
CN107977349A (en) * | 2017-11-23 | 2018-05-01 | 郑州云海信息技术有限公司 | It is a kind of toward the method and system for adding polytype file in Excel in batches |
CN109257407A (en) * | 2018-01-23 | 2019-01-22 | 苏州帮选信息技术有限公司 | The batch method for uploading and system of industrial part data |
CN108733830A (en) * | 2018-05-24 | 2018-11-02 | 北京邦邦共赢网络科技有限公司 | A kind of intelligence file classifying method and device |
CN109240599A (en) * | 2018-07-13 | 2019-01-18 | 安徽信尔联信息科技有限公司 | A kind of big data stocking system is integrated |
CN109714385B (en) * | 2018-11-09 | 2022-05-20 | 平安科技(深圳)有限公司 | Method and device for uploading files, computer equipment and storage medium |
CN109710577B (en) * | 2019-01-11 | 2023-04-07 | 深圳慧聚智能科技有限公司 | Method and system for separately storing photographing and video |
CN109960681A (en) * | 2019-03-25 | 2019-07-02 | 大夏数据服务有限公司 | A kind of induction-arrangement classification storage method of computer data |
CN110278202B (en) * | 2019-06-18 | 2020-07-31 | 南京科源信息技术有限公司 | File uploading system |
CN110399345B (en) * | 2019-07-30 | 2023-04-07 | 浪潮通用软件有限公司 | File uploading and managing method |
CN110928847B (en) * | 2019-10-14 | 2022-10-04 | 佛山科学技术学院 | Batch sampling method and device for files |
CN112749129B (en) * | 2019-10-30 | 2024-03-19 | 大唐移动通信设备有限公司 | File processing method, file processing server, file aggregation server and device |
CN110825702A (en) * | 2019-11-12 | 2020-02-21 | 广发证券股份有限公司 | Investment bank work manuscript management method and system |
CN111949611B (en) * | 2020-07-30 | 2021-10-01 | 广东建采网科技有限公司 | File processing method, system, device and medium |
CN111737248A (en) * | 2020-08-18 | 2020-10-02 | 南京江北新区生物医药公共服务平台有限公司 | Storage filing service system based on multiple high-performance storage devices |
CN112052223A (en) * | 2020-09-17 | 2020-12-08 | 中国银行股份有限公司 | File uploading method and device, computer equipment and readable storage medium |
CN114866539A (en) * | 2022-07-06 | 2022-08-05 | 飞狐信息技术(天津)有限公司 | File uploading method and system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1996283A (en) * | 2005-12-31 | 2007-07-11 | 英保达股份有限公司 | File sorting-save management method and system therefor |
CN101055576A (en) * | 2006-04-14 | 2007-10-17 | 英保达股份有限公司 | System and method for automatically uploading and classifying file |
KR100778764B1 (en) * | 2006-08-02 | 2007-11-27 | 삼성전자주식회사 | Method and apparatus for automatic classification of file in mobile device |
CN102004747A (en) * | 2009-08-31 | 2011-04-06 | 鸿富锦精密工业(深圳)有限公司 | System with file automatic copying function and device and method thereof |
CN103457910B (en) * | 2012-05-29 | 2018-12-28 | 腾讯科技(深圳)有限公司 | A kind of method and terminal of upper transmitting file |
CN102752383A (en) * | 2012-07-02 | 2012-10-24 | 惠州Tcl移动通信有限公司 | File downloading and storing method based on wireless communication equipment and wireless communication equipment |
-
2013
- 2013-12-23 CN CN201310719335.4A patent/CN103677673B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN103677673A (en) | 2014-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103677673B (en) | The method and system that a kind of document classification batch uploads | |
US20130067237A1 (en) | Providing random access to archives with block maps | |
US9705730B1 (en) | Cloud storage using Merkle trees | |
CN103873860B (en) | Document transmission method and device | |
CN102768662B (en) | A kind of method and apparatus Loaded Image | |
CN108052675A (en) | Blog management method, system and computer readable storage medium | |
CN102790760B (en) | Data synchronization method based on directory tree in safe network disc system | |
CN108121783A (en) | A kind of automatic cleaning method, device, computer and storage medium for storing data | |
WO2014015488A1 (en) | Method and apparatus for data storage and query | |
CN102063498B (en) | Link de-duplication processing method and device based on content and feature information | |
WO2014113715A1 (en) | Streaming zip | |
WO2014108040A1 (en) | Method and apparatus for presenting content on electronic device | |
WO2022082891A1 (en) | Big data acquisition method and system, and computer device and storage medium thereof | |
CN109325006A (en) | A kind of method and apparatus for compressing the method and apparatus stored, decompression downloading | |
CN104023070B (en) | file compression method based on cloud storage | |
CN103888513B (en) | Server end multifile method for down loading and system | |
CN103139294B (en) | Based on local resource mapping method and the system of applying virtual | |
CN106372109A (en) | Internet resource file caching method and apparatus | |
CN104111940A (en) | Mobile terminal and file storage method implemented by same | |
CN113079219A (en) | Large file fragment uploading method and system | |
CN102638569B (en) | File distribution synchronizing method and system | |
CN107426331A (en) | A kind of file uploading method and device based on JavaScript | |
CN106802773A (en) | The management method and mobile terminal of a kind of memory space | |
CN111414339A (en) | File processing method, system, device, equipment and medium | |
CN105868195A (en) | Method and device for uploading picture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |