CN102915332A - File conversion control method and file conversion control system - Google Patents
File conversion control method and file conversion control system Download PDFInfo
- Publication number
- CN102915332A CN102915332A CN2012103375221A CN201210337522A CN102915332A CN 102915332 A CN102915332 A CN 102915332A CN 2012103375221 A CN2012103375221 A CN 2012103375221A CN 201210337522 A CN201210337522 A CN 201210337522A CN 102915332 A CN102915332 A CN 102915332A
- Authority
- CN
- China
- Prior art keywords
- document
- converted
- server
- conversion
- time
- 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
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a file conversion control method and a file conversion control system. The method comprises the following steps: a client uploads a file to be converted to a server and sends a file conversion request to the server; the server analyzes the file conversion request and processes the file to be converted according to the conversion information carried in the file conversion request; the server confirms the number of parts that the file to be converted is partitioned and the pages of each part according to the number of CPUs (central processing unit) of the server, the utilization rate and the total page number of the file to be converted, calculates and compares the time for converting the file to be converted after the partitioning and the time for directly converting the file to be converted, and if the time for converting the file to be converted after the partitioning is less than the time for directly converting the file to be converted, the server partitions and then subsequently converts the file to be converted.
Description
Technical field
The invention belongs to the instant messaging field, relate in particular to a kind of document switching control method and system.
Background technology
Growing along with informationized society, the various office softwares such as MS office, WPS have become requisite application tool, and people often will will change between all kinds of documents based on the needs of some displayings or Internet Transmission etc.At present method commonly used is directly will to change behind the document segmentation, but actual when changing after execution is cut apart, the preparation of conversion process working environment and the process of cutting apart document all can take part-time.In some cases, be not the most efficient method to changing again behind the document segmentation.Therefore, the efficient disposal route of how to confirm, the time that document is changed drops to minimum, becomes the present problem that needs solution.
Summary of the invention
The invention provides a kind of document switching control method and system to address the above problem.
The invention provides a kind of document switching control method, may further comprise the steps.Client is uploaded onto the server document to be converted, and sends document conversion request to described server.The described document conversion of described server parses is asked, and processes described document to be converted according to the transitional information that described document conversion request is carried.Described server is determined the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of self CPU number, utilization factor and document to be converted, calculate and relatively cut apart time and the direct time of changing described document to be converted of the described document to be converted of rear conversion, if cut apart the time of the described document to be converted of rear conversion less than the time of directly changing described document to be converted, described server is cut apart the described document to be converted of rear conversion.
The invention provides a kind of document switching control system, comprise client and server, described client connects described server.Described client is used for document to be converted is uploaded onto the server, and sends document conversion request to described server.Described server comprises storage end, end for process and end of convert, and described storage end connects described end for process, and described end for process connects described end of convert.Described storage end is used for receiving and storing the document to be converted of described client upload.Described end for process is used for resolving described document conversion request, and processes described document to be converted according to the transitional information that described document conversion request is carried.Described end of convert, be used for determining the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of server CPU number, utilization factor and document to be converted, calculate and relatively cut apart time and the direct time of changing described document to be converted of the described document to be converted of rear conversion, if cut apart the time of the described document to be converted of rear conversion less than the time of directly changing described document to be converted, cut apart the described document to be converted of rear conversion.
Compared to prior art, according to document switching control method provided by the invention and system, client is uploaded onto the server document to be converted and is sent document conversion request, and the conversion of server parses document is asked and processed document to be converted according to the transitional information that carries in the request.According to transitional information different document is done respective handling, reach the resources balance utilization.Server is determined the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of self CPU number, utilization factor and document to be converted, calculating is also relatively cut apart the rear conversion document time to be converted and the direct conversion document time to be converted, if cut apart the rear conversion document time to be converted less than directly changing the document to be converted time, server is cut apart rear conversion document to be converted.So, by relatively and select the holding time of different switching mode, further improved the efficient of document conversion.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Figure 1 shows that the process flow diagram of the document switching control method that preferred embodiment according to the present invention provides;
Figure 2 shows that the decomposition process figure of the document switching control method that preferred embodiment according to the present invention provides;
Figure 3 shows that the synoptic diagram of the document switching control system that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter also describe in conjunction with the embodiments the present invention in detail with reference to accompanying drawing.Need to prove that in the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Figure 1 shows that the process flow diagram of the document switching control method that preferred embodiment according to the present invention provides.Figure 2 shows that the decomposition process figure of the document switching control method that preferred embodiment according to the present invention provides.
As shown in Figure 1, the process flow diagram of the document switching control method that provides of preferred embodiment of the present invention comprises step 101 ~ 103.
Step 101: client is uploaded onto the server document to be converted, and sends document conversion request to described server.
Step 102: the described document conversion of described server parses is asked, and processes described document to be converted according to the transitional information that described document conversion request is carried.
Step 103: described server is determined the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of self CPU number, utilization factor and document to be converted, calculate and relatively cut apart time and the direct time of changing described document to be converted of the described document to be converted of rear conversion, if cut apart the time of the described document to be converted of rear conversion less than the time of directly changing described document to be converted, described server is cut apart the described document to be converted of rear conversion.
The flow process of the document switching control method that preferred embodiment of the present invention provides is described below in conjunction with Fig. 2.
Step 101a: the storage termination of server is received the document to be converted of client upload, and stores in this locality with shared model.
Particularly, the storage end that described client is uploaded onto the server document to be converted, and to server transmission document conversion request.
Step 101b: the end for process of server receives and resolves the document conversion request that client sends.
Particularly, the document conversion request that described user end to server sends can directly be received and be resolved by the end for process in the server, is transmitted to end for process after also can being received by the storage termination, and end for process is resolved again.
Step 102a: after the end for process of server is resolved described document conversion request, the processing sequence of the document to be converted that is ranked, and with the end of convert of ranking results announcement server.
Particularly, the transitional information that carries of document conversion request comprises title and the document priority to be converted of document to be converted.After the end for process of server is resolved described document conversion request, notify end of convert according to the processing sequence of the described document to be converted of described document priority arrangement to be converted and with ranking results, the document priority processing to be converted of higher priority wherein, the document to be converted of equal priority is by receiving sequential processes.
Step 102b: described end of convert is accessed corresponding to be converted document to the storage end in the mode of share directory according to described ranking results.
Particularly, after described end of convert receives the ranking results of end for process transmission, access corresponding to be converted document to the storage end in the mode of share directory according to described ranking results, and obtain form and the total page number of described document to be converted.Wherein, the form of described document to be converted comprises word, excel and ppt form, and different switching program alignment processing documents in various formats.Converse routine wps.exe processes the word document, and converse routine wpp.exe processes the ppt document, and converse routine et.exe processes the excel document.
Step 103a: the end of convert of server is determined the umber of document segmentation to be converted and the number of pages of every part of correspondence according to self CPU number, utilization factor and document total page number to be converted, calculates time of also relatively cutting apart rear conversion document to be converted and direct time of conversion document to be converted.
Particularly, the end of convert of described server comprises a plurality of CPU, comprises the corresponding conversion program of changing documents in various formats among each CPU.When described end of convert is accessed document to be converted to the storage end, obtain self each cpu busy percentage.Described end of convert determines that the method for the umber of document segmentation to be converted is, obtain the CPU number that utilization factor is lower than a certain preset value, then the umber of document segmentation to be converted is the CPU number that described utilization factor is lower than preset value, wherein said preset value can be determined according to practical application, this present invention is not construed as limiting.Describedly cut apart number of pages that rear single part of document comprises and determine that divided by the merchant of the CPU number that is lower than described preset value wherein said merchant rounds, and is the number of pages that single part of document after cutting apart should distribute according to document total page number to be converted; Remainder is undivided document number of pages, and is added in the arbitrary part of single part of document of having cut apart.
In present embodiment, after the end of convert computed segmentation time of the described document to be converted of conversion and directly the mode of the time of the described document to be converted of conversion be that the time of cutting apart the described document to be converted of rear conversion comprises the time T 1 that starts the conversion environment, split the time T 2 of document and change the time T 3 of original single document.If be N part with document segmentation to be converted then, cut apart the time T m=T1*N+T2*N+T3/N of the described document to be converted of rear conversion.Directly the time of the described document to be converted of conversion comprises the time T 1 that starts the conversion environment and the time T 3 of changing original single document, then directly changes the time T n=T1+T3 of described document to be converted.Wherein, the time T 3 of the original single document of described conversion determines that according to the total page number of document to be converted even be Tp the switching time of single page document, and the total page number of document to be converted is P, then T3=Tp*P.If end of convert is relatively cut apart the time of rear conversion document to be converted less than the time of directly changing document to be converted, then execution in step 103b; If end of convert is relatively cut apart the time of rear conversion document to be converted more than or equal to the time of directly changing document to be converted, then execution in step 103c.
Step 103b: if end of convert is relatively cut apart the time of rear conversion document to be converted less than the time of directly changing document to be converted, end of convert is cut apart the described document to be converted of rear conversion.
Particularly, the described mode of cutting apart the described document to be converted of rear conversion is, document to be converted after end of convert will be cut apart is respectively allocated among the CPU that utilization factor is lower than preset value, and in described CPU, start the concurrent execution convert task of different threads, all finish convert task and preserve after the conversion behind the document when different threads, described server is sent completely notice to client.In this, when the end of convert of server is cut apart rear conversion or directly changed described document to be converted, at first convert described document to be converted to PDF, again PDF is converted to picture or swf form.Client obtains complete picture or swf file to the storage end of server after finish notice.
Step 103c: if end of convert is relatively cut apart the time of rear conversion document to be converted more than or equal to the time of directly changing document to be converted, end of convert is directly changed described document to be converted.
Particularly, the described end of convert directly mode of the described document to be converted of conversion is, end of convert is searched the minimum CPU of self utilization factor, the corresponding converse routine that starts among the described CPU is directly changed described document, and after converting, preserve switched document at the storage end, after preservation was finished, the storage end was sent completely notice to client.
For example, be 10ms if start the time T 1 of conversion environment, the time T 2 that splits document is 5ms, the time T p of conversion single page document is 0.5ms.The a certain moment, the storage end of user end to server is uploaded word document A to be converted and ppt document B, wherein document A has 57 pages and priority for high, document B has during 120 pages and priority is, then the end for process of server is arranged two document orders for processing first again treatments B of A, and notify end of convert with ranking results, end of convert is processed first document A according to ranking results.If end of convert has 3 CPU to be respectively CPU1, CPU2 and CPU3, and when accessing described document A, each cpu busy percentage is respectively: CPU1 is that 70%, CPU2 is that 40%, CPU3 is 7%.In this, preset value is 70%, and then utilization factor is lower than 70% two of CPU2 and CPU3, and then end of convert is divided into 2 parts (first part is the 1-28 page or leaf, and second part is the 29-57 page or leaf) with document A.The time T 1*2+T2*2+T3/2=10*2+5*2+ (0.5*57) of conversion document A/2=44.25ms after the end of convert computed segmentation, directly change the time T 1+T3=10+0.5*57=38.5ms of document A, the former is greater than the latter, then described end of convert selects the minimum CPU3 of utilization factor directly to change described document A, end of convert finishes the conversion of document A and after the storage end was preserved, the storage end was sent completely notice to client.
In above-described embodiment, end of convert is finished dealing with behind the document A, next processed in sequence document B.If during described end of convert access document B, each cpu busy percentage is respectively: CPU1 is that 9%, CPU2 is that 7%, CPU3 is 72%.At this moment, utilization factor is lower than 70% two of CPU1 and CPU2, and then end of convert is divided into 2 parts with document B, and first part is the 1-60 page or leaf, and second part is the 61-120 page or leaf.The time of conversion document B is 10*2+5*2+ (0.5*120)/2=60ms after the end of convert computed segmentation, directly the time of conversion document B is 10+0.5*120=70ms, the former is less than the latter, then described end of convert is cut apart rear conversion document B, be 2 wpp.exe converse routines of corresponding startup, a converse routine is positioned among the CPU1 cuts apart document for first part of conversion, and another converse routine is positioned among the CPU2 cuts apart document for second part of conversion.After described 2 wpp.exe converse routines were all finished the document conversion and are stored in the storage end, the storage end was sent completely notice to client.
Figure 3 shows that the synoptic diagram of the document switching control system that preferred embodiment according to the present invention provides.As shown in Figure 3, the document switching control system that preferred embodiment of the present invention provides comprises client 10 and server 20, and described client 10 connects described server 20.Described client 10 is used for document to be converted is uploaded onto the server 20, and sends document conversion request to described server 20.Described server 20 comprises storage end 201, end for process 202 and end of convert 203, and described storage end 201 connects described end for process 202, and described end for process 202 connects described end of convert 203.Described storage end 201 is used for receiving and storing the document to be converted that described client 10 is uploaded.Described end for process 202 is used for resolving described document conversion request, and processes described document to be converted according to the transitional information that described document conversion request is carried.Described end of convert 203, be used for determining the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of CPU number, utilization factor and the document to be converted of server 20, calculate and relatively cut apart time and the direct time of changing described document to be converted of the described document to be converted of rear conversion, if cut apart the time of the described document to be converted of rear conversion less than the time of directly changing described document to be converted, cut apart the described document to be converted of rear conversion.Operating process about said system is described with above-mentioned method, so repeat no more in this.
In sum, preferred embodiment provides according to the present invention document switching control method and system, client is uploaded onto the server document to be converted and is sent document conversion request, and the conversion of server parses document is asked and processed document to be converted according to the transitional information that carries in the request.According to transitional information different document is done respective handling, reach the resources balance utilization.Server is determined the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of self CPU number, utilization factor and document to be converted, calculating is also relatively cut apart the rear conversion document time to be converted and the direct conversion document time to be converted, if cut apart the rear conversion document time to be converted less than directly changing the document to be converted time, server is cut apart rear conversion document to be converted.So, by relatively and select the holding time of different switching mode, greatly improved the efficient of document conversion.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (7)
1. a document switching control method is characterized in that, may further comprise the steps:
Client is uploaded onto the server document to be converted, and sends document conversion request to described server;
The described document conversion of described server parses is asked, and processes described document to be converted according to the transitional information that described document conversion request is carried;
Described server is determined the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of self CPU number, utilization factor and document to be converted, calculate and relatively cut apart time and the direct time of changing described document to be converted of the described document to be converted of rear conversion, if cut apart the time of the described document to be converted of rear conversion less than the time of directly changing described document to be converted, described server is cut apart the described document to be converted of rear conversion.
2. method according to claim 1 is characterized in that, if described server is relatively cut apart the time of the described document to be converted of rear conversion more than or equal to the time of directly changing described document to be converted, described server is directly changed described document to be converted.
3. method according to claim 1 and 2 is characterized in that, when described server is cut apart rear conversion or directly changed described document to be converted, at first converts described document to be converted to PDF, PDF is converted to picture or swf form again.
4. method according to claim 1, it is characterized in that, the mode that server is cut apart the described document to be converted of rear conversion is, start the concurrent execution convert task of different threads, and behind the document, described server was sent completely notice to client after described different threads was all finished convert task and preserved conversion.
5. method according to claim 1 is characterized in that, the transitional information that described document conversion request is carried comprises title and the document priority to be converted of document to be converted.
6. method according to claim 1 is characterized in that, described document to be converted comprises the document of word, excel or ppt file layout.
7. a document switching control system is characterized in that, comprises client and server, and described client connects described server,
Described client is used for document to be converted is uploaded onto the server, and sends document conversion request to described server;
Described server comprises storage end, end for process and end of convert, and described storage end connects described end for process, and described end for process connects described end of convert,
Described storage end is used for receiving and storing the document to be converted of described client upload;
Described end for process is used for resolving described document conversion request, and processes described document to be converted according to the transitional information that described document conversion request is carried;
Described end of convert, be used for determining the umber of document segmentation to be converted and the number of pages of every part of correspondence according to the total page number of server CPU number, utilization factor and document to be converted, calculate and relatively cut apart time and the direct time of changing described document to be converted of the described document to be converted of rear conversion, if cut apart the time of the described document to be converted of rear conversion less than the time of directly changing described document to be converted, cut apart the described document to be converted of rear conversion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012103375221A CN102915332A (en) | 2012-09-13 | 2012-09-13 | File conversion control method and file conversion control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012103375221A CN102915332A (en) | 2012-09-13 | 2012-09-13 | File conversion control method and file conversion control system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102915332A true CN102915332A (en) | 2013-02-06 |
Family
ID=47613699
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012103375221A Pending CN102915332A (en) | 2012-09-13 | 2012-09-13 | File conversion control method and file conversion control system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102915332A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107123329A (en) * | 2017-06-09 | 2017-09-01 | 浙江新盛蓝科技有限公司 | A kind of webpage operation import system implementation method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102364457A (en) * | 2011-11-02 | 2012-02-29 | 苏州阔地网络科技有限公司 | Document transformation method and system |
-
2012
- 2012-09-13 CN CN2012103375221A patent/CN102915332A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102364457A (en) * | 2011-11-02 | 2012-02-29 | 苏州阔地网络科技有限公司 | Document transformation method and system |
Non-Patent Citations (1)
Title |
---|
邬延辉等: "分布异构工作站上的任务调度算法", 《小型微型计算机***》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107123329A (en) * | 2017-06-09 | 2017-09-01 | 浙江新盛蓝科技有限公司 | A kind of webpage operation import system implementation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101582064B (en) | Method and system for processing enormous data | |
US20170329643A1 (en) | Distributed node intra-group task scheduling method and system | |
US20070150498A1 (en) | Social network for distributed content management | |
US8117194B2 (en) | Method and system for performing multilingual document searches | |
CN102880596A (en) | Method and system for converting document format | |
CN102739770A (en) | Method and system for scheduling resource based on cloud computing | |
US10871990B2 (en) | Effective synchronous communication of screen information shared among information processing apparatuses | |
JP4774131B2 (en) | Method, apparatus, and software for translating a natural language request to change a subscription set for a publish / subscribe topic string | |
CN102364457A (en) | Document transformation method and system | |
CN109819015A (en) | Information-pushing method, device, equipment and storage medium based on user's portrait | |
CN104994171A (en) | Distributed storage method and system | |
CN102081626B (en) | Data inquiring method and data inquiring server | |
CN108200112A (en) | Distributed storage method and system | |
CN102779183B (en) | Data inquiry method, equipment and system | |
CN105653697A (en) | Recommended word retrieval method and system | |
CN106168963A (en) | Real-time streaming data processing method and device and server | |
CN103257901A (en) | Distribution method of computing tasks, cloud computing platform, terminal and system | |
CN103970612A (en) | Load balancing method and device based on pre-division of virtual machine | |
CN110287444B (en) | Website detection method and device and storage medium | |
CN110943876B (en) | URL state detection method, device, equipment and system | |
EP3193264B1 (en) | Method and apparatus for processing big data | |
CN111400301A (en) | Data query method, device and equipment | |
CN105989010B (en) | Web page data generation method, Web server and Web application system | |
CN107844536B (en) | Method, device and system for selecting application program | |
CN102915332A (en) | File conversion control method and file conversion control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20130206 |