CN106649716A - Multithread-based online file format conversion method and system - Google Patents

Multithread-based online file format conversion method and system Download PDF

Info

Publication number
CN106649716A
CN106649716A CN201611191592.5A CN201611191592A CN106649716A CN 106649716 A CN106649716 A CN 106649716A CN 201611191592 A CN201611191592 A CN 201611191592A CN 106649716 A CN106649716 A CN 106649716A
Authority
CN
China
Prior art keywords
file
thread
request
conversion
format
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
CN201611191592.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 Zhiyuan Internet Software Ltd By Share Ltd
Original Assignee
Beijing Zhiyuan Internet Software Ltd By Share 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 Zhiyuan Internet Software Ltd By Share Ltd filed Critical Beijing Zhiyuan Internet Software Ltd By Share Ltd
Priority to CN201611191592.5A priority Critical patent/CN106649716A/en
Publication of CN106649716A publication Critical patent/CN106649716A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Abstract

The invention provides a multithread-based online file format conversion method and system. The method comprises the following steps of: receiving a request for requesting to carry out format conversion on an appointed file; calling a thread in a pre-established thread pool according to the request; calling a conversion component by utilizing the thread; carrying out format conversion on the appointed file by utilizing the thread and the conversion component so as to obtain a converted file; and taking the converted file as a response of the request so that the users can online preview the converted file. Through importing a thread pool technology, format conversion can be respectively carried out on a plurality of files by adoption of a plurality of independent threads, and the condition of queuing to wait for the threads is not needed, so that the time of online loading the files can be shortened, the online previewing time is saved and the processing is improved; and meanwhile, the concurrent conditions during the online file previewing can be solved by utilizing the method, and the users can online preview a plurality of files at the same time, so that the user experience can be improved.

Description

A kind of file format on-line conversion method and system based on multithreading
Technical field
The present invention relates to the technical field of file format conversion, and in particular to a kind of file format based on multithreading is online Conversion method and system.
Background technology
Cybertimes file is constantly assembled to center, the information known by file, and file is first had to the side for presenting directly perceived Formula shows to user, and traditional Office files, pdf document etc. generally require specific Office instruments or PDF readers, logical Cross to download the file into and locally could open reading, be unfavorable for intuitively, quickly representing file effect.With the development of cloud, Many cloud disks, the product of library class are occurred in that on the market, and these products mostly provide the online preview function of file.To file When carrying out online preview, it usually needs the file for treating preview is converted into destination file format, at present, to online preview file The treatment effeciency of form conversion, will be run into a large amount of concurrent when the multiple files of multiple users online preview simultaneously than relatively low Situation, so, will increase the time of on-line loaded file, and then increase preview time, it is even more serious in the case of, may Periods of network disruption is caused, so how to carry out con current control, is the popular problem of prior art.
The content of the invention
For drawbacks described above of the prior art, the invention provides a kind of file format on-line conversion based on multithreading Method and system, can control concurrent situation during online preview file, meanwhile, treatment effeciency can be improved, saves online pre- The time look at.
In a first aspect, a kind of file format on-line conversion method based on multithreading that the present invention is provided, including:
Receive the request for entering row format conversion for request to specified file;
One thread is transferred from the thread pool for pre-building according to the request;
Using the thread dispatching transition components;
Enter row format conversion, the text after being changed to the specified file using the thread and the transition components Part;
Using the file after the conversion as the response of the request, text of the user after changing described in line preview is allow Part.
Optionally, receive for, before asking the step of entering the request of row format conversion to specified file, also wrapping described Include:
The thread pool with initial capacity is created, the thread pool includes multiple can independently carrying out file format conversion Thread.
Optionally, it is described according to it is described request a thread is transferred from the thread pool for pre-building the step of before, Also include:
Search whether to be directed to the thread that the specified file enters row format conversion in the thread run in thread pool;
If having, the thread operation is waited to complete, response of the file after the thread is changed as the request.
Optionally, to the specified file enter row format conversion using the thread and the transition components described, obtain After the step of file after must changing, also include:
Judge whether other requests also for the specified file;
If no, the file after the conversion is stored in caching;
If having, the specified file is processed according to described other requests;The file using after the conversion is used as institute The response of request is stated, including:Using the file processed according to described other requests as the request response.
Optionally, the caching includes:Server buffer and/or front end player caching.
Optionally, it is described according to it is described request a thread is transferred from the thread pool for pre-building the step of before, Also include:
The file after changing to the specified file is searched whether in the buffer;
If having, the file after the conversion is called from the caching as the response of the request.
Optionally, it is described to receive the request for entering row format conversion for request to specified file, including:
The multiple identicals for entering row format conversion to specified file for request for receiving multiple client initiation simultaneously please Ask.
Second aspect, a kind of file format on-line conversion system based on multithreading that the present invention is provided, including:
Request receiving module, for receiving the request for entering row format conversion for request to specified file;
Thread transfers module, for a thread is transferred from the thread pool for pre-building according to the request;
Transition components calling module, for using the thread dispatching transition components;
Format converting module, turns for entering row format to the specified file using the thread and the transition components Change, the file after being changed;
Respond module, allows the online preview of user for using the file after the conversion as the response of the request File after the conversion.
Optionally, the file format on-line conversion system based on multithreading, also includes:
Thread pool creation module, for create with initial capacity thread pool, the thread pool include it is multiple can be only The vertical thread for carrying out file format conversion.
Optionally, the file format on-line conversion system based on multithreading, also includes:
Thread searching modul, for searching whether that being directed to the specified file enters in the thread that runs in thread pool The thread of row format conversion;
If having, the thread operation is waited to complete, response of the file after the thread is changed as the request.
Optionally, the file format on-line conversion system based on multithreading, also includes:
Other request judge modules, for judging whether other requests also for the specified file;
If no, the file after the conversion is stored in caching;
If having, the specified file is processed according to described other requests;The file using after the conversion is used as institute The response of request is stated, including:Using the file processed according to described other requests as the request response.
Optionally, the caching includes:Server buffer and/or front end player caching.
Optionally, the file format on-line conversion system based on multithreading, also includes:
Cache lookup module, for searching whether the file after changing to the specified file in the buffer;
If having, the file after the conversion is called from the caching as the response of the request.
Optionally, the request receiving module, including:
Multiple same request receiving units, for receiving multiple client while that what is initiated enters to specified file for request Multiple identical requests of row format conversion.
From above technical scheme, the invention provides a kind of file format on-line conversion method based on multithreading, Including:Receive the request for entering row format conversion for request to specified file;According to the request from the thread pool for pre-building In transfer a thread;Using the thread dispatching file transition components;Using the thread and the transition components to described Specified file enters row format conversion, the file after being changed;Using the file after the conversion as the response of the request, make User can be in the file after changing described in line preview.
The file format on-line conversion method of this multithreading, by the technology for introducing thread pool, first, from the thread A thread is transferred in pond, then using the thread dispatching transition components, finally using the thread and the transition components Enter row format conversion to the specified file, thus multiple files can be carried out respectively using independent multiple threads simultaneously Form is changed, and can adopt the multiple files of multiple thread process, it is possible to achieve while multiple files are entered with the mistake of row format conversion Journey, it is not necessary to the thread such as queuing, can reduce the time of on-line loaded file, and then the time of the online preview of saving, at raising Reason efficiency;Meanwhile, profit can also respond the request of multiple file format conversions in this way simultaneously, can solve the problem that online preview Concurrent situation during file, it is possible to use family is while the multiple files of online preview, it is possible to increase Consumer's Experience.
A kind of file format on-line conversion system based on multithreading that the present invention is provided, with the above-mentioned text based on multithreading Part form on-line conversion method for identical inventive concept, with identical beneficial effect.
Description of the drawings
In order to be illustrated more clearly that the specific embodiment of the invention or technical scheme of the prior art, below will be to concrete Needed for embodiment or description of the prior art, accompanying drawing to be used is briefly described.In all of the figs, similar element Or part is typically identified by similar reference.In accompanying drawing, each element or part might not be drawn according to actual ratio.
Fig. 1 shows a kind of file format on-line conversion method based on multithreading that first embodiment of the invention is provided Flow chart;
Fig. 2 shows a kind of file format on-line conversion system based on multithreading that second embodiment of the invention is provided Schematic diagram.
Specific embodiment
The embodiment of technical solution of the present invention is described in detail below in conjunction with accompanying drawing.Following examples are only used for Technical scheme is clearly illustrated, therefore is intended only as example, and the protection of the present invention can not be limited with this Scope.
It should be noted that unless otherwise stated, the technical term or scientific terminology that the present invention is used should be this The ordinary meaning understood by bright one of ordinary skill in the art.
In order to make it easy to understand, the overall inventive concept at this to the present invention is illustrated:
The file format on-line conversion method and system based on multithreading that the present invention is provided, may be installed server, intelligence On the carriers such as energy terminal.A kind of file format on-line conversion method and system based on multithreading that the present invention is provided, on the whole An identical inventive concept is belonged to, the first step receives the request for entering row format conversion for request to specified file;Second Step, transfers a thread from the thread pool for pre-building according to the request;3rd step, is turned using the thread dispatching file Change component;4th step, enters row format conversion using the thread and the transition components, after being changed to the specified file File;5th step, using the file after the conversion as the response of the request, allows to change described in the online preview of user File afterwards.The file format on-line conversion method and system based on multithreading that the present invention is provided, by introducing thread pool skill Art, calls file transition components using the thread pool thread, using the thread and the transition components to specified file Enter row format conversion, finally, allow file of the user in line preview after form conversion.There are multiple independences in thread pool Thread, thus can simultaneously using independent thread multiple files are entered respectively row format conversion, it is not necessary to queue up etc. line Journey, can reduce the time of on-line loaded file, and then improve treatment effeciency, reduce online preview time, meanwhile, by using This method, can control concurrent situation during online preview file, and then protect network environment.
The invention provides a kind of file format on-line conversion method and system based on multithreading.It is right below in conjunction with the accompanying drawings Embodiments of the invention are illustrated.
Fig. 1 shows a kind of file format on-line conversion method based on multithreading that first embodiment of the invention is provided Flow chart.As shown in figure 1, a kind of file format on-line conversion method based on multithreading that first embodiment of the invention is provided Comprise the following steps:
Step S101:Receive the request for entering row format conversion for request to specified file.
In this step, the request is that user intelligent terminal in the online preview file of intelligent terminal sends.When with Family is performed after the operation of line preview specified file in intelligent terminal, and the intelligent terminal will send one to the specified text Part enters the request of row format conversion, the specified file can be converted into object format, the target lattice according to the request Formula can be that acquiescence, or user oneself select, and the object format refers to specified file described in the online preview of user When, the form of the file seen online.The object format includes:The forms such as HTML, SWF.
Wherein, the specified file can be that user uploads file on the net, or file present on network. For example, the specified file can be file in cloud disk, the file in library, the mail in mailbox, the file in reader Deng any one in file.The content of the specified file can be the group of one or more in text, picture, video etc. Close.The form of the specified file can be any one in the forms such as doc, xls, ppt, pdf, gif, rmvb.Therefore, originally Invention can apply to different file formats, applied range.The present invention supports the form of various different previewing files, energy High-quality web page files are enough translated the file into into, Consumer's Experience can be improved.
When being changed using the present invention, before this step, also include:The thread pool with initial capacity is created, The thread pool includes multiple threads that can independently carry out file format conversion.It is whole in the server using the present invention or intelligence Need to create thread pool on end, when the server or intelligent terminal start, create thread pool, the thread pool is configured with just Beginning capacity, it is ensured that the form conversion of multiple files.The quantity of the thread pool is not limited, and can be 100,1000,2000 etc., Can be created according to the needs of the server or intelligent terminal.The more files that can be processed simultaneously of thread are more, But, the requirement to server or intelligent terminal is higher.
It is described to receive the request for entering row format conversion for request to specified file, including:Receive a client to initiate For request specified file is entered row format conversion one request, receive multiple client initiate user's request to specify File enters multiple identical requests of row format conversion, receives multiple client while that what is initiated enters to specified file for request What multiple identical requests of row format conversion, one client of reception were initiated enters row format to multiple specified files for request Conversion multiple requests, receive multiple client initiate for request multiple specified files are entered row format conversion it is multiple please Ask.This is all within the scope of the present invention.
Step S102:One thread is transferred from the thread pool for pre-building according to the request.
Before this step, when receiving for asking to enter specified file the request of row format conversion, identification is needed The information of the specified file.The information of the specified file, including the information such as the unprocessed form of the specified file, title, The unprocessed form refers to the form of the specified file for also not entering row format conversion.The head of the specified file can be passed through Information and/or suffix name are recognizing the specified file.After the information for recognizing the specified file, according to the specified file Information, search whether to be directed in the thread run in thread pool the thread that the specified file enters row format conversion, If having, the thread operation is waited to complete, response of the file after the thread is changed as the request;If no, Then need from the thread pool for pre-building to transfer a thread to enter the specified file row format conversion.By identification, May determine that whether two specified files are same specified files, after being, call the basis of thread.
In this step, the request is referred to for asking specified file to enter the request of row format conversion, being one What individual client is initiated, or multiple client was initiated.Can be a client once initiate to it is described specify File enters the request of row format conversion, can client repeatedly initiate row format entered to the specified file change The request of multiple identicals, can the multiple different time of multiple client initiate row format entered to the specified file change Multiple identical requests, can be multiple clients while that what is initiated enters the multiple identical of row format conversion to the specified file Request, it can be seen that above-mentioned several situations be all same specified file is entered row format conversion.By to the specified text The identification of part, it can be determined that whether the specified file gone out in multiple requests is same specified file.
When the request for entering row format conversion to same specified file is received, then adjust from the thread pool for pre-building Take a thread and enter row format conversion.In this manner it is possible to avoid repetition from entering row format conversion to same file, it is possible to reduce money The waste in source.Certainly, when the request for entering row format conversion to specified file is received, it is also possible to the specified file is not entered Row identification, can call multiple threads from the thread pool to process and enter the multiple of row format conversion to same specified file Identical is asked, and this is also within the scope of the present invention.
When receive multiple client and meanwhile initiate for request specified file is entered row format conversion it is multiple identical Request when, it is only necessary to random that a thread is transferred from the thread pool for pre-building according to one of request, other requests The thread operation is waited to complete, response of the file after the thread is changed as the request.
When receive multiple client different time initiation for request specified file is entered row format conversion it is multiple When identical is asked, then transfer a thread to process the request of earliest initiation from the thread pool for pre-building, other Request waits the thread operation to complete, response of the file after the thread is changed as the request.
Multiple specified files are entered with row format for request turn when receive that a client or multiple client initiate During the multiple different request changed, need according to the number of the plurality of specified file to transfer corresponding multiple threads.For example, When one or more users file different to five initiates the request of form conversion, needs transfer five lines from thread pool Journey, to enter row format conversion to five different files respectively.The plurality of request can be simultaneously emitted by, it is also possible to It is that different time sends, all within the scope of the present invention.The plurality of request is simultaneously emitted by, it is meant that, while Receive the plurality of request.Multiple specified files are entered with the multiple different of row format conversion for request when receiving simultaneously During request, then multiple threads are transferred at random, row format conversion is entered respectively using independent thread to each file.Work as different time Receive when multiple specified files being entered with the multiple different request of row format conversion for request, then according to the suitable of the request Sequence transfers thread at random from thread pool.
By adopting Thread Pool Technology, it is possible to achieve while multiple files are entered with the process of row format conversion, it is not necessary to arrange The threads such as team, can reduce the time of on-line loaded file, save the time of online preview, and then improve treatment effeciency;Meanwhile, Can solve the problem that concurrent situation during online preview file, it is possible to use family is while the multiple files of online preview.
Step S103:Using the thread dispatching transition components.
Before this step, need to be identified the unprocessed form of specified file, with information before to specified file The method being identified is identical, recognizes the original of the specified file by the header and/or suffix name of the specified file Beginning form.Then, according to the unprocessed form and object format of the specified file selecting transition components.The object format can Be user oneself select, or server or intelligent terminal acquiescence.The transition components can be by the original The file of beginning form is converted into the component of the file of object format.For example, PDFCreator components, OpenOffice components etc..
Step S104:Enter row format conversion to the specified file using the thread and the transition components, turned File after changing.
In this step, the thread enters row format conversion using the transition components to the specified file, and obtains File after conversion.After this step, can also include:Judge whether other requests also for the specified file; If no, the file after the conversion is stored in caching;If having, the specified text is processed according to described other requests Part, using the file processed according to described other requests as the request response.Described other requests include:The conversion Previewing file effect afterwards is bad, needs to change again;User also needs to translate the file into into other forms;User only needs to pre- Certain part look in file etc..When not to other requests of specified file, the file storage after the conversion is arrived into slow In depositing, and discharge process.
Wherein, the caching includes:Server buffer and/or front end player caching, user can be selected as needed The file after conversion is downloaded, meanwhile, user can also download the specified file before conversion, all within the scope of the present invention. As such, it is possible to meet the demand of user as far as possible, it is possible to increase Consumer's Experience.
After conversion, the file after conversion can also store the caching for using the server or intelligent terminal of the present invention In.The server or intelligent terminal can also store the specified file before conversion.Before step S102, can also include: The file after changing to the specified file is searched whether in the buffer;If having, institute is called from the caching The file after conversion is stated as the response of the request.To specified file enter request that row format change for request receiving When, by recognizing the specified file, then, after in the caching searching whether to change the specified file File, if not having, according to it is described request a thread is transferred from the thread pool for pre-building, then perform step below Suddenly;If having, the file after the conversion is directly called from the caching as the response of the request.Turning through form After changing, the partial information of file header is constant, can be searched whether by File header information to the specified file File after being changed.By this method, can avoid conversion being repeated several times to same file, it is to avoid the wave of resource Take, being capable of save resources and time.
It is described search whether in the buffer to change the specified file after file and described in thread pool Search whether to be directed to the thread that the specified file enters row format conversion in the thread of middle operation, can carry out simultaneously, Can independently carry out, be independent of each other, it is also possible to combine to judge whether the step of performing below, this is all in the guarantor of the present invention In the range of shield.For example, the thread for entering row format conversion to specified file is not found in thread, is not looked in the buffer yet The file after corresponding conversion is found, at this moment, it is possible to a thread is transferred from the thread pool for pre-building, after then performing The step of face.
Step S105:Using the file after the conversion as the response of the request, allow described in the online preview of user File after conversion.
In this step, the file after the conversion is sent to into corresponding user, allows user's direct-on-line preview File after the conversion.
Can intuitively, efficiently represent the content of file by this method, make user directly just can online preview text Part, it is to avoid user downloads file, then recycles software to open file, can be with time-consuming and resource;Meanwhile, facilitate user to select Selecting property underground published article part, it is to avoid download useless file, is conducive to lifting work efficiency, can improve user's stickiness.
In above-mentioned first embodiment, there is provided a kind of file format on-line conversion method based on multithreading, therewith Corresponding, the present invention also provides a kind of file format on-line conversion system based on multithreading.Fig. 2 is refer to, which is this A kind of schematic diagram of file format on-line conversion system based on multithreading that bright second embodiment is provided.Due to system embodiment Embodiment of the method is substantially similar to, so describing fairly simple, related part is illustrated referring to the part of embodiment of the method. System embodiment described below is only schematic.
A kind of file format on-line conversion system based on multithreading that second embodiment of the invention is provided, including:
Request receiving module 101, for receiving the request for entering row format conversion for request to specified file;
Thread transfers module 102, for a thread is transferred from the thread pool for pre-building according to the request;
Transition components calling module 103, for using the thread dispatching transition components;
Format converting module 104, for entering row format to the specified file using the thread and the transition components Conversion, the file after being changed;
Respond module 105, allows user pre- online for using the file after the conversion as the response of the request The file look at after the conversion.
In one embodiment that the present invention is provided, the file format on-line conversion system based on multithreading is also wrapped Include:
Thread pool creation module, for create with initial capacity thread pool, the thread pool include it is multiple can be only The vertical thread for carrying out file format conversion.
In one embodiment that the present invention is provided, the file format on-line conversion system based on multithreading is also wrapped Include:
Thread searching modul, for searching whether that being directed to the specified file enters in the thread that runs in thread pool The thread of row format conversion;
If having, the thread operation is waited to complete, response of the file after the thread is changed as the request.
In one embodiment that the present invention is provided, the file format on-line conversion system based on multithreading is also wrapped Include:
Other request judge modules, for judging whether other requests also for the specified file;
If no, the file after the conversion is stored in caching;
If having, the specified file is processed according to described other requests;The file using after the conversion is used as institute The response of request is stated, including:Using the file processed according to described other requests as the request response.
In one embodiment that the present invention is provided, the caching includes:Server buffer and/or front end player are slow Deposit.
In one embodiment that the present invention is provided, the file format on-line conversion system based on multithreading is also wrapped Include:
Cache lookup module, for searching whether the file after changing to the specified file in the buffer;
If having, the file after the conversion is called from the caching as the response of the request.
In one embodiment that the present invention is provided, the request receiving module 101, including:
Multiple same request receiving units, for receiving multiple client while that what is initiated enters to specified file for request Multiple identical requests of row format conversion.
A kind of file format on-line conversion system based on multithreading and the above-mentioned text based on multithreading that the present invention is provided , for identical inventive concept, with identical beneficial effect, here is omitted for part form on-line conversion method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " such as ", or " some show The description of example " etc. means that the specific features, structure, material or the feature that describe with reference to the embodiment or example are contained in the present invention At least one embodiment or example in.In this manual, the schematic representation of above-mentioned term is not required to be directed to Identical embodiment or example.And, the specific features of description, structure, material or feature can be in any one or more realities Combined in applying example or example in an appropriate manner.Additionally, in the case of not conflicting, those skilled in the art can be by The feature of different embodiments or example and different embodiments or example described in this specification is combined and combines.Need Illustrate, the flow chart and block diagram in accompanying drawing of the present invention show the system of multiple embodiments of the invention, method and The architectural framework in the cards of computer program, function and operation.At this point, each side in flow chart or block diagram Frame can represent a part for module, program segment or a code, and a part for the module, program segment or code includes one Or multiple executable instructions for realizing the logic function of regulation.It should also be noted that in some are as the realization replaced, it is square The function of being marked in frame can also occur with the order different from being marked in accompanying drawing.For example, two continuous square frame reality On can perform substantially in parallel, they can also be performed sometimes in the opposite order, and this is depending on involved function.Also to It is noted that the combination of block diagram and/or each square frame and block diagram and/or the square frame in flow chart in flow chart, Ke Yiyong Perform the function of regulation or the special hardware based system of action to realize, or can be referred to computer with specialized hardware The combination of order is realizing.
Those skilled in the art can be understood that, for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be described here.
In several embodiments provided by the present invention, it should be understood that disclosed system, apparatus and method, can be with Realize by another way.Device embodiment described above is only schematically, for example division of the unit, It is only a kind of division of logic function, there can be other dividing mode when actually realizing, and for example, multiple units or component can To combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or beg for By coupling each other direct-coupling or communication connection can be by the indirect of some communication interfaces, device or unit Coupling is communicated to connect, and can be electrical, mechanical or other forms.
The unit as separating component explanation can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can local to be located at one, or can also be distributed to multiple On NE.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.
If the function is realized using in the form of SFU software functional unit and as independent production marketing or when using, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer machine (can be individual People's computer, server, or net machine etc.) perform all or part of step of each embodiment methods described of the invention. And aforesaid storage medium includes:USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above only to illustrate technical scheme, rather than a limitation;To the greatest extent Pipe has been described in detail to the present invention with reference to foregoing embodiments, it will be understood by those within the art that:Its according to So the technical scheme described in foregoing embodiments can be modified, or which part or all technical characteristic are entered Row equivalent;And these modifications or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technology The scope of scheme, which all should be covered in the middle of the scope of the claim and description of the present invention.

Claims (10)

1. a kind of file format on-line conversion method based on multithreading, it is characterised in that include:
Receive the request for entering row format conversion for request to specified file;
One thread is transferred from the thread pool for pre-building according to the request;
Using the thread dispatching transition components;
Enter row format conversion, the file after being changed to the specified file using the thread and the transition components;
Using the file after the conversion as the response of the request, file of the user after changing described in line preview is allow.
2. the file format on-line conversion method based on multithreading according to claim 1, it is characterised in that connect described Before receiving the step of entering the request of row format conversion to specified file for request, also include:
The thread pool with initial capacity is created, the thread pool includes multiple lines that can independently carry out file format conversion Journey.
3. the file format on-line conversion method based on multithreading according to claim 1, it is characterised in that at described Before a step of thread is transferred from the thread pool for pre-building according to the request, also include:
Search whether to be directed to the thread that the specified file enters row format conversion in the thread run in thread pool;
If having, the thread operation is waited to complete, response of the file after the thread is changed as the request.
4. the file format on-line conversion method based on multithreading according to claim 1, it is characterised in that in the profit The step of entering row format conversion, file after being changed to the specified file with the thread and the transition components it Afterwards, also include:
Judge whether other requests also for the specified file;
If no, the file after the conversion is stored in caching;
If having, the specified file is processed according to described other requests;The file using after the conversion is asked as described The response asked, including:Using the file processed according to described other requests as the request response.
5. the file format on-line conversion method based on multithreading according to claim 4, it is characterised in that the caching Including:Server buffer and/or front end player caching.
6. the file format on-line conversion method based on multithreading according to claim 1, it is characterised in that at described Before a step of thread is transferred from the thread pool for pre-building according to the request, also include:
The file after changing to the specified file is searched whether in the buffer;
If having, the file after the conversion is called from the caching as the response of the request.
7. the file format on-line conversion method based on multithreading according to claim 1, it is characterised in that the reception Enter the request of row format conversion to specified file for request, including:
Receive the multiple identical requests for entering row format conversion for request to specified file that multiple client is initiated simultaneously.
8. a kind of file format on-line conversion system based on multithreading, it is characterised in that include:
Request receiving module, for receiving the request for entering row format conversion for request to specified file;
Thread transfers module, for a thread is transferred from the thread pool for pre-building according to the request;
Transition components calling module, for using the thread dispatching transition components;
Format converting module, for entering row format conversion to the specified file using the thread and the transition components, obtains File after must changing;
Respond module, allows described in the online preview of user as the response of the request for using the file after the conversion File after conversion.
9. the file format on-line conversion system based on multithreading according to claim 8, it is characterised in that described to be based on The file format on-line conversion system of multithreading, also includes:
Thread pool creation module, for creating the thread pool with initial capacity, the thread pool includes multiple independently to enter The thread of row file format conversion.
10. the file format on-line conversion system based on multithreading according to claim 8, it is characterised in that the base In the file format on-line conversion system of multithreading, also include:
Thread searching modul, for searching whether that being directed to the specified file carries out lattice in the thread that runs in thread pool The thread of formula conversion;
If having, the thread operation is waited to complete, response of the file after the thread is changed as the request.
CN201611191592.5A 2016-12-21 2016-12-21 Multithread-based online file format conversion method and system Pending CN106649716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611191592.5A CN106649716A (en) 2016-12-21 2016-12-21 Multithread-based online file format conversion method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611191592.5A CN106649716A (en) 2016-12-21 2016-12-21 Multithread-based online file format conversion method and system

Publications (1)

Publication Number Publication Date
CN106649716A true CN106649716A (en) 2017-05-10

Family

ID=58834528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611191592.5A Pending CN106649716A (en) 2016-12-21 2016-12-21 Multithread-based online file format conversion method and system

Country Status (1)

Country Link
CN (1) CN106649716A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119452A (en) * 2018-01-31 2019-08-13 贵州白山云科技股份有限公司 A kind of page multi-medium data deriving method and device
CN110278265A (en) * 2019-06-20 2019-09-24 宜春宜联科技有限公司 Processing method, device, storage medium and the electronic equipment of the upper transmitting file of user
CN116861847A (en) * 2023-06-21 2023-10-10 三峡高科信息技术有限责任公司 Online Office file previewing method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239426A (en) * 2014-08-25 2014-12-24 武汉天喻信息产业股份有限公司 System and method for realizing cross-platform document reading
CN104881409A (en) * 2014-02-27 2015-09-02 北京方捷软件有限公司 Document loading method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881409A (en) * 2014-02-27 2015-09-02 北京方捷软件有限公司 Document loading method and device
CN104239426A (en) * 2014-08-25 2014-12-24 武汉天喻信息产业股份有限公司 System and method for realizing cross-platform document reading

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119452A (en) * 2018-01-31 2019-08-13 贵州白山云科技股份有限公司 A kind of page multi-medium data deriving method and device
CN110278265A (en) * 2019-06-20 2019-09-24 宜春宜联科技有限公司 Processing method, device, storage medium and the electronic equipment of the upper transmitting file of user
CN116861847A (en) * 2023-06-21 2023-10-10 三峡高科信息技术有限责任公司 Online Office file previewing method and system
CN116861847B (en) * 2023-06-21 2024-02-13 三峡高科信息技术有限责任公司 Online Office file previewing method and system

Similar Documents

Publication Publication Date Title
US11762697B2 (en) Method and apparatus for scheduling resource for deep learning framework
CN104424199B (en) searching method and device
CN109032521B (en) Storage volume creation method, device, server and storage medium
CN107679931A (en) Method, apparatus, storage medium and the terminal of order asynchronous process
CN106503791A (en) System and method for the deployment of effective neutral net
CN107370667A (en) Multi-threading parallel process method and apparatus, computer-readable recording medium and storage control
CN111860835A (en) Neural network model training method and device
US20190356717A1 (en) Multimedia file processing
CN108629029B (en) Data processing method and device applied to data warehouse
CN109766200A (en) A kind of message queue processing method, device, equipment and storage medium
CN109033001A (en) Method and apparatus for distributing GPU
CN109918184A (en) Picture processing system, method and relevant apparatus and equipment
CN109040298A (en) Data processing method and device based on edge calculations technology
CN106649716A (en) Multithread-based online file format conversion method and system
CN110020046B (en) Data capturing method and device
CN107197359A (en) Video file caching method and device
CN107113337A (en) The network address translation
CN107911406A (en) Network task flow shifting method, equipment and storage medium
CN109977822A (en) Data supply method, model training method, device, system, equipment and medium
CN101741866A (en) On-line storage system and method
CN109327321A (en) Network model business executes method, apparatus, SDN controller and readable storage medium storing program for executing
CN107291826A (en) File search processing method and processing device
CN109902182A (en) Knowledge data processing method, device, equipment and storage medium
CN106776504A (en) A kind of document format on-line conversion method and system
CN102487401A (en) File download method and apparatus thereof

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

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication