CN109086330A - A kind of document handling method, device, equipment and storage medium - Google Patents
A kind of document handling method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN109086330A CN109086330A CN201810717895.9A CN201810717895A CN109086330A CN 109086330 A CN109086330 A CN 109086330A CN 201810717895 A CN201810717895 A CN 201810717895A CN 109086330 A CN109086330 A CN 109086330A
- Authority
- CN
- China
- Prior art keywords
- file
- data file
- process task
- type
- data
- 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
Links
Abstract
The embodiment of the invention discloses a kind of document handling method, device, equipment and storage medium, wherein this method, comprising: obtain at least one data file, and determine the type of the data file;Establish file process task corresponding with the type of the data file;The file process task is executed parallel;Wherein, the data file of the file process task execution corresponding types.The embodiment of the present invention is improved efficiency with improving the speed of file process.
Description
Technical field
The present embodiments relate to file processing technology field more particularly to a kind of document handling method, device, equipment and
Storage medium.
Background technique
File process may include the compression to file, the renaming to file, the storage etc. to file.Wherein, to text
The compression of part refers to save storage resource or save network bandwidth, under the premise of not losing useful information, reduces number
According to amount to reduce memory space, its transmission, storage and processing efficiency are improved, or group again is carried out to data according to certain algorithm
It knits, reduces a kind of technical method in the redundancy of data and the space of storage.
But in the prior art, when compressing to multiple data files, the data flow arranged by one executes more
The compression duty of a data file, this processing mode speed is slower, and efficiency is lower.
Summary of the invention
The present invention provides a kind of document handling method, device, equipment and storage medium, and the speed of file process can be improved
Degree, improves efficiency.
In a first aspect, a kind of document handling method of the embodiment of the present invention, comprising:
At least two data files are obtained, and determine the type of the data file;
Establish file process task corresponding with the type of the data file;
The file process task is executed parallel;Wherein, the data file of the file process task execution corresponding types.
Second aspect, the embodiment of the invention also provides a kind of document handling apparatus, comprising:
File type determining module for obtaining at least one data file, and determines the type of the data file;
Module is established, for establishing file process task corresponding with the type of the data file;
Execution module, for executing the file process task parallel;Wherein, the file process task execution corresponds to class
The data file of type.
The third aspect, the embodiment of the invention also provides a kind of equipment, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes a kind of document handling method provided in an embodiment of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, the program realize document handling method provided in an embodiment of the present invention when being executed by processor.
Technical solution provided in an embodiment of the present invention establishes file process task by the type according to data file, and
Row executes file process task, and by executing file process task parallel data processing file, the place of data file can be improved
Speed is managed, is improved efficiency.
Detailed description of the invention
Fig. 1 a is a kind of document handling method flow chart provided in an embodiment of the present invention;
Fig. 1 b is a kind of document handling method flow chart that the prior art provides;
Fig. 1 c is a kind of document handling method flow chart provided in an embodiment of the present invention;
Fig. 2 is a kind of document handling method flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of document handling apparatus structural block diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of device structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Fig. 1 a is a kind of document handling method flow chart provided in an embodiment of the present invention, and the method is by document handling apparatus
It executes, described device is executed by software and/or hardware, and described device can be only fitted in tool of compression, the compression work
Tool can be only fitted in the equipment such as server, terminal, and the method can be applied in the feelings for carrying out compression processing to data file
Condition.
Method provided in an embodiment of the present invention can be applied in following scene: developer can by code or
Other data are written in different data files, and since the volume of data file is larger, these data files are uploaded to net
When in network, need these data files carrying out compression processing, then uploaded.It is each since the type of data file is different
Kind data file needs to be implemented different file process tasks when carrying out compression processing, but in the prior art, executing text
It when part handles task, needs to be screened from data file, screen for the corresponding data file of file process task, thus
Compression processing is carried out to the data, and each file process task is serial process, processing speed is slower, and efficiency is lower.This
The method that inventive embodiments provide can establish corresponding file process task according to the type of data file, execute these parallel
Task can be improved the speed of data documents disposal, improve efficiency to carry out compression processing to data file parallel.
It, can be with it should be noted that method provided in an embodiment of the present invention is not restrictively applied in above-mentioned scene
It is applied in the scene of alternative document processing.It is compressed for example, it is also possible to apply to the data file in storage equipment
In scene, it can also apply in the scene that the multiple data files chosen to user are compressed.
As shown in Figure 1a, technical solution provided in an embodiment of the present invention includes:
S110: at least one data file is obtained, and determines the type of the data file.
In embodiments of the present invention, data file can be code file or picture file, be also possible to other data
File.The code that can recorde program in data file, also can recorde other information.The type of data file can be
The forms such as word, pdf, picture.
In embodiments of the present invention, an allocation list can be added, wherein the allocation list can be used for storing data file
Store path.Wherein, when needing to be handled data file, the store path of data file can be documented in configuration
In table, when not needing to be handled some data file, can by the store path of the data file from allocation list into
Row is deleted.
Correspondingly, optional, described at least one data file of acquisition, may include: that institute is obtained from the allocation list
The store path of data file is stated, and obtains data file under the store path.Wherein, developer can modify configuration
Table is to change the data file of acquisition, can be from matching when developer needs to increase or deletes the data file obtained
Set the store path that data file is modified in table.For example, the store path of tri- data files of A, B and C is described in allocation list,
Tri- data files of A, B and C are then obtained under respective path.If developer also adds a data file D, need by
Data file D carries out compression processing, and developer can add the store path of data file D from allocation list, then compress work
Tool can obtain data file D under corresponding store path.Developer can also delete depositing for data file A from allocation list
Path is stored up, then tool of compression only obtains data file B and data text under the store path of data file B and data file C
Part C.As a result, by can be arranged the store path of each data file is unified in an allocation list, can be convenient increase or
Person deletes data file.
In embodiments of the present invention, in the type for determining data file, can be judged according to the suffix name of data file
The type of data file, for example, can determine that the type of data file is word if the entitled doc of the suffix of data file.
S120: file process task corresponding with the type of the data file is established.
In embodiments of the present invention, execute establish corresponding with the type of data file file process task it
Before, it can also include: the corresponding relationship of the type Yu the file process task of establishing data file.Wherein, data file
Type is different, carries out compression processing to data file and executes different tasks.Wherein, file process task can be less processing
Task, img processing task, js handle at least one of task and view processing task.Wherein, each file process task is held
The data file of row corresponding types.For example, corresponding with less processing task is word document, then it is by word that less, which handles task,
File carries out compression processing.
In embodiments of the present invention, when obtaining data file, according to pair of data file class and file process task
It should be related to foundation file process task corresponding with the data file class of acquisition.Wherein, it will be corresponded to by file process task
The data file of type is handled.Specifically, carrying out processing to data file may include the volume-diminished to data file,
The title of data file is renamed etc..
S130: the file process task is executed parallel;Wherein, the data of the file process task execution corresponding types
File.
In embodiments of the present invention, optionally, execute parallel the file process task include: by the data file by
Compression processing is carried out parallel according to type.Wherein, compression processing may include compressing to data file, carry out to data file
Renaming etc..Each file process task can compress the data file of corresponding types.
This embodiment of the present invention is illustrated, for example, obtain data file class include word, pdf and
Picture then establishes 3 file process tasks, is respectively used to processing word document, pdf file and picture.Wherein, to this three
, can be with parallelly compressed above-mentioned three kinds of data files by executing three file process tasks when kind data file compression processing, it can
To improve the speed of file process, the processing speed of file is improved.
Method provided in an embodiment of the present invention can be applied in tool of compression.Tool of compression can be only fitted to server,
Or in the equipment such as terminal.Wherein, tool of compression can carry out compression processing to data file, optionally, can be to code text
Part carries out compression processing.Wherein, compression processing may include compressing to the volume of data file, carry out weight to data file
Name etc..In the prior art, the tool of compression of building, all functional modes are executed in a document flow, and code is read
Reading and maintenance are relatively difficult, and this building flow layout is simultaneously unreasonable, and function is poor, and building speed is slower, average to construct
Time is 2min or so.Such as shown in Figure 1 b, the tool of compression of building is when handling multiple data files, serially to corresponding
Data file carries out less processing, img processing, js processing and then the other process flows of execution.
The whole data flow serially executed is improved to according to number by the embodiment of the present invention by using the tool of compression of building
Multitask is executed parallel according to file type.For example, as illustrated in figure 1 c, when handling data file using the tool of compression of building,
Corresponding file process task is established according to the type of data file, thus to the processing of data file in parallel, then carry out its elsewhere
Process (for example, cdn handles task) is managed, the building time of tool of compression can be greatly reduced, by average 2 minutes original structures
The building time that the time is reduced to average 19 seconds is built, averagely shortens 6 times of building time quantums, to can mention using the tool of compression
The speed of high file process improves file activity.And the method provided through the embodiment of the present invention can plan compression
The code structure of tool, more tool of compression are easy maintenance and expansion, can optimize the compiled code of tool of compression, improve compression work
The building efficiency of tool.
Fig. 2 is a kind of document handling method flow chart provided in an embodiment of the present invention, as shown in Fig. 2, the embodiment of the present invention
The technical solution of offer includes:
S210: at least one data file is obtained, and determines the type of the data file.
S220: file process task corresponding with the type of the data file is established.
S230: the file process task is executed parallel;Wherein, the data of the file process task execution corresponding types
File.
S240: when obtaining data file again, the data that judges whether to have built up and obtain again are literary
The corresponding file process task of part type.
If so, S250 is executed, if it is not, executing S260.
S250: the file process task is executed.
S260: new file process task corresponding with the type of the data file obtained again is established, and is executed
The new file process task.
In embodiments of the present invention, when again obtain data file when, judge whether to have built up in tool of compression with
The corresponding file process task of data file class handles task processing by this document if so, executing file process task
The data file.If it is not, establishing new file process task corresponding with the data file, executes the new file process and appoint
Business.
For example, if having been set up less processing task and js processing task in tool of compression, wherein less handles task
Can handle word document, js processing task can handle pdf file, if the data file obtained again is word document,
Less processing task is then executed, thus the word document that processing obtains again.If the data file obtained again is picture,
Then without establishing processing task corresponding with picture in tool of compression, then new file process task corresponding with picture is established, is held
The new file process task of row, to handle the picture by new file process task.
By above-mentioned method, can when obtaining data file again, can make the file process task established into
Row flexible combination facilitates extension to handle data file.
Fig. 3 is a kind of structural block diagram of document handling apparatus provided in an embodiment of the present invention, as shown in figure 3, the present invention is real
The document handling apparatus for applying example offer includes: file type determining module 310, establishes module 320 and execution module 330.
Wherein, file type determining module 310 for obtaining at least one data file, and determines the data file
Type;
Module 320 is established, for establishing file process task corresponding with the type of the data file;
Execution module 330, for executing the file process task parallel;Wherein, the file process task execution pair
Answer the data file of type.
Optionally, described device further include: allocation list adding module 340, for adding for storing the data file
The allocation list of store path.
Optionally, described at least one data file of acquisition, comprising: the data file is obtained from the allocation list
Store path, and data file is obtained under the store path.
Optionally, described device further includes that relationship establishes module 350, for establish data file type and the file
The corresponding relationship of processing task.
Optionally, the data file includes code file or picture file.
Optionally, execution module 330, for the data file to be carried out compression processing according to type parallel.
Optionally, execution module 330 are also used to when obtaining data file again, if having built up and obtaining again
The corresponding file process task of the data file class taken, executes the file process task;
Otherwise, new file process task corresponding with the type of the data file obtained again is established, and is executed
The new file process task.
Method provided by any embodiment of the invention can be performed in the said goods, has the corresponding functional module of execution method
And beneficial effect.
Fig. 4 is a kind of device structure schematic diagram provided in an embodiment of the present invention, as shown in figure 4, the equipment includes:
One or more processors 410, in Fig. 4 by taking a processor 410 as an example;
Memory 420;
The equipment can also include: input unit 430 and output device 440.
Processor 410, memory 420, input unit 430 and output device 440 in the equipment can pass through bus
Or other modes connect, in Fig. 4 for being connected by bus.
Memory 420 be used as a kind of non-transient computer readable storage medium, can be used for storing software program, computer can
Execute program and module, as the corresponding program instruction/module of one of embodiment of the present invention document handling method (for example,
Attached file type determining module 310 shown in Fig. 3 establishes module 320 and execution module 330).Processor 410 is deposited by operation
Software program, instruction and module in memory 420 are stored up, thereby executing the various function application and number of computer equipment
According to processing, that is, realize a kind of document handling method of above method embodiment, it may be assumed that
At least two data files are obtained, and determine the type of the data file;
Establish file process task corresponding with the type of the data file;
The file process task is executed parallel;Wherein, the data file of the file process task execution corresponding types.
Memory 420 may include storing program area and storage data area, wherein storing program area can store operation system
Application program required for system, at least one function;Storage data area can be stored to be created according to using for computer equipment
Data etc..In addition, memory 420 may include high-speed random access memory, it can also include non-transitory memory, such as
At least one disk memory, flush memory device or other non-transitory solid-state memories.In some embodiments, it stores
Optional device 420 includes the memory remotely located relative to processor 410, these remote memories can be by being connected to the network extremely
Terminal device.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and its group
It closes.
Input unit 430 can be used for receiving the number or character information of input, and generate the user with computer equipment
Setting and the related key signals input of function control.Output device 440 may include that display screen etc. shows equipment.
The embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer program, the program
A kind of such as document handling method provided in an embodiment of the present invention is realized when being executed by processor:
At least two data files are obtained, and determine the type of the data file;
Establish file process task corresponding with the type of the data file;
The file process task is executed parallel;Wherein, the data file of the file process task execution corresponding types.
It can be using any combination of one or more computer-readable media.Computer-readable medium can be calculating
Machine readable signal medium or computer readable storage medium.Computer readable storage medium for example can be --- but it is unlimited
In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates
The more specific example (non exhaustive list) of machine readable storage medium storing program for executing includes: electrical connection with one or more conducting wires, just
Taking formula computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In this document, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but
It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be
Any computer-readable medium other than computer readable storage medium, which can send, propagate or
Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In --- wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of document handling method characterized by comprising
At least one data file is obtained, and determines the type of the data file;
Establish file process task corresponding with the type of the data file;
The file process task is executed parallel;Wherein, the data file of the file process task execution corresponding types.
2. the method according to claim 1, wherein further include:
Add the allocation list for storing the data file store path.
3. according to the method described in claim 2, it is characterized in that, described at least one data file of acquisition, comprising:
The store path of the data file is obtained from the allocation list, and obtains data file under the store path.
4. the method according to claim 1, wherein further include:
Establish the type of data file and the corresponding relationship of the file process task.
5. the method according to claim 1, wherein include: the data file including code file or figure
Piece file.
6. the method according to claim 1, wherein described execute the file process task parallel, comprising:
The data file is subjected to compression processing according to type parallel.
7. the method according to claim 1, wherein further including;
When obtaining data file again, if having built up file corresponding with the data file class obtained again
Processing task executes the file process task;
Otherwise, new file process task corresponding with the type of the data file obtained again is established, and described in execution
New file process task.
8. a kind of document handling apparatus characterized by comprising
File type determining module for obtaining at least one data file, and determines the type of the data file;
Module is established, for establishing file process task corresponding with the type of the data file;
Execution module, for executing the file process task parallel;Wherein, the file process task execution corresponding types
Data file.
9. a kind of equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Existing document handling method as claimed in claim 1.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
Document handling method as claimed in claim 1 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810717895.9A CN109086330A (en) | 2018-07-03 | 2018-07-03 | A kind of document handling method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810717895.9A CN109086330A (en) | 2018-07-03 | 2018-07-03 | A kind of document handling method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109086330A true CN109086330A (en) | 2018-12-25 |
Family
ID=64837230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810717895.9A Pending CN109086330A (en) | 2018-07-03 | 2018-07-03 | A kind of document handling method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109086330A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751397A (en) * | 2008-12-04 | 2010-06-23 | 中国移动通信集团安徽有限公司 | Method and device for importing files into database |
CN107204998A (en) * | 2016-03-16 | 2017-09-26 | 华为技术有限公司 | The method and apparatus of processing data |
CN107797854A (en) * | 2017-06-26 | 2018-03-13 | 平安科技(深圳)有限公司 | Transaction file processing method, device, storage medium and computer equipment |
CN107977442A (en) * | 2017-12-08 | 2018-05-01 | 北京希嘉创智教育科技有限公司 | Journal file compresses and decompression method, electronic equipment and readable storage medium storing program for executing |
-
2018
- 2018-07-03 CN CN201810717895.9A patent/CN109086330A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751397A (en) * | 2008-12-04 | 2010-06-23 | 中国移动通信集团安徽有限公司 | Method and device for importing files into database |
CN107204998A (en) * | 2016-03-16 | 2017-09-26 | 华为技术有限公司 | The method and apparatus of processing data |
CN107797854A (en) * | 2017-06-26 | 2018-03-13 | 平安科技(深圳)有限公司 | Transaction file processing method, device, storage medium and computer equipment |
CN107977442A (en) * | 2017-12-08 | 2018-05-01 | 北京希嘉创智教育科技有限公司 | Journal file compresses and decompression method, electronic equipment and readable storage medium storing program for executing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108196915A (en) | Code process method, equipment and storage medium based on application container engine | |
CN111177617A (en) | Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment | |
CN108989362A (en) | A kind for the treatment of method and apparatus of static resource | |
JP2021103506A (en) | Method and device for generating information | |
CN109992406A (en) | The method and client that picture requesting method, response picture are requested | |
CN111242776A (en) | Accounting method and device based on block chain, storage medium and electronic equipment | |
CN112199567A (en) | Distributed data acquisition method, system, server and storage medium | |
CN113760453A (en) | Container mirror image distribution system and container mirror image pushing, pulling and deleting method | |
CN111680799A (en) | Method and apparatus for processing model parameters | |
CN108280228A (en) | A kind of processing method and relevant device of webpage | |
CN104408178A (en) | Device and method for WEB control loading | |
CN110826706B (en) | Data processing method and device for neural network | |
JP2023544904A (en) | Distributed resource-aware training for machine learning pipelines | |
CN111278085B (en) | Method and device for acquiring target network | |
CN111475392B (en) | Method, device, electronic equipment and computer readable medium for generating prediction information | |
CN104717286B (en) | Data processing method, terminal, server and system | |
CN109086330A (en) | A kind of document handling method, device, equipment and storage medium | |
CN110505289A (en) | Document down loading method and device, computer-readable medium, wireless telecom equipment | |
CN112149392A (en) | Rich text editing method and device | |
CN111190731A (en) | Cluster task scheduling system based on weight | |
CN108008984A (en) | A kind of resource file downloading updating method and device | |
US11265536B2 (en) | Method to extend the range of rice parameter for residual coding in transform skip mode | |
CN110175769B (en) | Asset value evaluation method, device and system based on micro-service architecture | |
CN110309403B (en) | Method and device for capturing data | |
CN107291771A (en) | The Access Optimization method and webpage rich client system of webpage rich client system |
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: 20181225 |