Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real
Applying mode, the present invention is further described in detail.It should be noted that in the absence of conflict, the implementation of the application
Feature in example and embodiment can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, still, the present invention may be used also
To be implemented using other than the one described here other modes, therefore, protection scope of the present invention is not by described below
Specific embodiment limitation.
Fig. 1 shows the schematic flow diagram of the file on-line processing method of embodiment according to the present invention.
As shown in Figure 1, the file on-line processing method of embodiment according to the present invention, comprising: step 102, server root
File destination and target template are determined according to the selection instruction for carrying out self terminal, are parsed the file destination and are obtained the file information, and will
The file information and the target template are transmitted to the terminal;Step 104, the terminal is online according to the file information
The file destination is obtained, and online processing is carried out to the file destination according to the target template, so that the target is literary
The format of part and the target template matches, and opens treated file destination online.
In the technical scheme, when terminal in server file carry out online processing when, server can simultaneously by
The template that user chooses is sent to terminal, so that terminal adjusts file according to the template received before opening file
It is whole, to allow users to directly edit file adjusted, without adjusting the format of file too much, so as to as early as possible
It completes to improve user to the efficiency of file online editing to the editor of file.
In the above-mentioned technical solutions, it is preferable that the process that online processing is carried out to the file destination includes: the terminal
It parses the file destination and obtains at least one target component, and parse the target template with the determination target template and include
At least one of each standard parameter in standard parameter and at least one of described standard parameter in the target template
Reference format information, according to the reference format information to each target component at least one of described target component described
Format information in file destination carries out on-line tuning, so that the format information of target component adjusted and the standard parameter
Format information match.
In the technical scheme, specifically the standard parameter that target template is included can be obtained by parsing target template,
For example include: title-is placed in the middle ,-No. five words of preamble, text-regular script, then can adjust file destination according to these standard parameters
In relevant parameter, if the available title of parsing file destination, preamble and three, text, by the title tune of file destination
It is whole be it is placed in the middle, preamble is adjusted to No. five words, text is adjusted to regular script, thus user terminal open file destination before just
The adjustment to destination file format is completed according to target template.
In the above-mentioned technical solutions, it is preferable that further include: step 106, the terminal is according to the operational order pair received
Described treated that file destination is operated, and when receiving on-line normalization instruction, according to the target template to operation
File destination afterwards is verified, with judge the file destination after the operation and the target template format whether phase
Match, if matching, by the file destination on-line normalization after the operation to the server;If mismatching, display reminding letter
Breath.
In the technical scheme, before by file destination on-line normalization to server, terminal is according to target template to behaviour
File destination after work is verified, so that the file of upload is all revised as unified format by user, consequently facilitating server into
Row storage and management.
In the above-mentioned technical solutions, it is preferable that before opening treated the file destination, the terminal is according to institute
That states showing in target template information adjusts the target component shows form.
It in the technical scheme, can also be according to target template in addition to the format according to target template adjustment file destination
Adjustment file destination shows form, for example adds header, footer or watermark etc. for file destination.
In the above-mentioned technical solutions, it is preferable that the step 104 further include: the server obtains the note of the terminal
Volume table information, and inquired in the registry information and the parameter preset according to the parameter preset information in the server
The identification information that information matches determines destination application address according to the identification information inquired in the terminal, with
Make the terminal by the destination application opens online described in treated file destination.
In the technical scheme, server can make terminal pass through mesh by the identification information in endpoint to register table information
Mark application program opens file destination online, and specifically, Hidden field can be arranged in server first, then according to parsing target text
Part obtains the essential information parameter of the file information generation, and dynamic specifies the url of Hidden field when terminal edits file destination
Address.The example of Hidden field is as follows:
<iframe id=″iframe″name=″iframe″style=″display:none;″></iframe>;
When terminal edits file, specify the url of Hidden field as follows:
Document.getElementById("iframe").src=″WordExe://″+Param;
And key assignments can be added in endpoint to register table in advance, receive parameter for server Transfer Parameters and terminal.
It is as follows that key assignments is added in registration table:
Windows Registry Editor Version5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe]
@=“WordExe”
″URL Protocol″=″C:\\Program Files(x86)\\Microsoft Office\\Office12\\
WINWORD.EXE″
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell\Open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell\Open\command]
@=″\″C:\\ProgramFiles(x86)\\Microsoft Office\\Office12\\
WINWORD.EXE\″/n/\″%1/\″″
To which server can determine the destination application address in terminal according to the key assignments in registration table, and make terminal
Start destination application and open file destination, terminal is allowed to carry out online processing to file by different browsers,
Start the destination application in terminal without integrated activex control, improves terminal to the compatibility of file online editing
Property.
Fig. 2 shows the schematic block diagrams of the server of embodiment according to the present invention.
As shown in Fig. 2, the server 200 of embodiment according to the present invention includes: resolution unit 202, come from for basis
The selection instruction of terminal determines file destination and target template, parses the file destination and obtains the file information;Transmission unit
204, for the file information and the target template to be transmitted to the terminal, so that the terminal is believed according to the file
Breath obtains the file destination online, and carries out online processing to the file destination according to the target template.
In the technical scheme, when terminal carries out online processing to the file in server 200, server 200 can be with
Template that user is chosen is sent to terminal simultaneously, so that terminal is before opening file, according to the template received to file
It is adjusted, thus allow users to directly edit file adjusted, without adjusting the format of file too much, with
Just the editor to file is completed as early as possible, improves user to the efficiency of file online editing.
In the above-mentioned technical solutions, it is preferable that further include: acquiring unit 206, the registration table for obtaining the terminal are believed
Breath, and inquired in the registry information according to the parameter preset information in the server 200 and believed with the parameter preset
The matched identification information of manner of breathing determines destination application address according to the identification information inquired in the terminal, so that
The terminal by the destination application opens online described in treated file destination.
In the technical scheme, server 200 can make terminal logical by the identification information in endpoint to register table information
It crosses destination application and opens file destination online, specifically, Hidden field can be arranged in server 200 first, then according to solution
Analysis file destination obtains the essential information parameter of the file information generation, and dynamic is specified when terminal edits file destination hides
The address url in domain.The example of Hidden field is as follows:
<iframe id=″iframe″name=″iframe″style=″display:none;″></iframe>;
When terminal edits file, specify the url of Hidden field as follows:
Document.getElementById("iframe").src=″WordExe://″+Param;
And key assignments can be added in endpoint to register table in advance, receive ginseng for 200 Transfer Parameters of server and terminal
Number.It is as follows that key assignments is added in registration table:
Windows Registry Editor Version5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe]
@=“WordExe”
″URL Protocol″=″C:\\Program Files(x86)\\Microsoft Office\\Office12\\
WINWORD.EXE″
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell\Open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell\Open\command]
@=″\″C:\\ProgramFiles(x86)\\Microsoft Office\\Office12\\
WINWORD.EXE\″/n/\″%1/\″″
To which server 200 can determine the destination application address in terminal according to the key assignments in registration table, and make
Terminal starts destination application and opens file destination, and terminal locates file by different browsers online
Reason starts the destination application in terminal without integrated activex control, improves terminal to the simultaneous of file online editing
Capacitive.
Fig. 3 shows the schematic block diagram of the terminal of embodiment according to the present invention.
As shown in figure 3, the terminal 300 of embodiment according to the present invention includes: acquiring unit 302, for according to from clothes
The file information of business device obtains the file destination in server online;Processing unit 304 is used for according to the target template to institute
It states file destination and carries out online processing, so that the format of the file destination and the target template matches, and open online
Treated file destination.
In the technical scheme, when terminal 300 carries out online processing to the file in server, server can be simultaneously
The template that user is chosen is sent to terminal so that terminal 300 is before opening file, according to the template received to file into
Row adjustment, thus allow users to directly edit file adjusted, without adjusting the format of file too much, so as to
The editor to file is completed as early as possible, improves user to the efficiency of file online editing.
In the above-mentioned technical solutions, it is preferable that the processing unit 304 includes: resolution unit 3042, described for parsing
File destination obtains at least one target component, and parses the target template includes with the determination target template at least one
Reference format of each standard parameter in the target template in item standard parameter and at least one described standard parameter
Information;Matching unit 3044, for according to the reference format information to each target at least one of described target component
Format information of the parameter in the file destination carries out on-line tuning, so that the format information of target component adjusted and institute
The format information for stating standard parameter matches.
In the technical scheme, specifically the standard parameter that target template is included can be obtained by parsing target template,
For example include: title-is placed in the middle ,-No. five words of preamble, text-regular script, then can adjust file destination according to these standard parameters
In relevant parameter, if the available title of parsing file destination, preamble and three, text, by the title tune of file destination
It is whole be it is placed in the middle, preamble is adjusted to No. five words, text is adjusted to regular script, thus user terminal open file destination before just
The adjustment to destination file format is completed according to target template.
In the above-mentioned technical solutions, it is preferable that further include: operating unit 306, for being opened online in the processing unit
Before treated the file destination, according to the operational order received, treated that file destination is operated to described;
Authentication unit 308, for being carried out to the file destination after operation according to the target template when receiving on-line normalization instruction
Verifying, will be described if matching to judge whether the file destination after the operation and the format of the target template match
File destination on-line normalization after operation is to the server;If mismatching, display reminding information.
In the technical scheme, before by file destination on-line normalization to server, terminal 300 is according to target template pair
File destination after operation is verified, so that the file of upload is all revised as unified format by user, consequently facilitating server
Carry out storage and management.
In the above-mentioned technical solutions, it is preferable that further include: adjustment unit 310, for according to the exhibition in the target template
What existing information adjusted the target component shows form.
It in the technical scheme, can also be according to target template in addition to the format according to target template adjustment file destination
Adjustment file destination shows form, for example adds header, footer or watermark etc. for file destination.
The invention also provides a kind of file Online Processing Systems, including server described in any of the above embodiments 200, and
Terminal 300 described in any of the above embodiments.
Fig. 4 shows the schematic flow diagram of the online editing file of embodiment according to the present invention.
As shown in figure 4, such as file destination is Word document, then server 200 can be arranged by parameterized approach
The essential information of Word document.The essential information of Word document is as follows:
<?xml version=″1.0″encoding=″UTF-8″?>
<Doc>
<url>http://172.19.41.63:8080/cipgedit/doc/submit.do?param=</url>
<userName>sa</userName>
<passWord>Founder123</passWord>
<isFtp>true</isFtp>
<ftpUserName>attach</ftpUserName>
<ftpPassWord>Founder123</ftpPassWord>
<ftpPath>ftp://172.19.41.63:21/attach/1.docx</ftpPath>
<docName>a kind of method and apparatus of online editing Word document</docName>
<docContent></docContent>
</Doc>
Hidden field can be arranged in server 200 first, needed for then obtaining the file information generation according to parsing Word document
Essential information parameter, when terminal edits Word document dynamic specify Hidden field the address url.The example of Hidden field is such as
Under:
<iframe id=″iframe″name=″iframe″style=″display:none;″></iframe>;
When terminal edits file, specify the url of Hidden field as follows:
Document.getElementById("iframe").src=″WordExe://″+Param;
And key assignments can be added in 300 registration table of terminal in advance, for 200 Transfer Parameters of server and terminal 300
Receive parameter.It is as follows that key assignments is added in registration table:
Windows Registry Editor Version5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe]
@=“WordExe”
″URL Protocol″=″C:\\Program Files(x86)\\Microsoft Office\\Office12\\
WINWORD.EXE″
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell\Open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WordExe\shell\Open\command]
@=″\″C:\\ProgramFiles(x86)\\Microsoft Office\\Office12\\
WINWORD.EXE\″/n/\″%1/\″″
Then terminal 300 is based on the customized Office application program of VSTO, specific function needed for adding operation flow, shape
At Word document editing device (both destination applications).Word document editing device receives parameter and simultaneously parses, with byte stream or
The mode of Ftp obtains the content of the Word document of editor online, thus terminal 300 can by different browsers to file into
Row online processing starts the destination application in terminal without integrated activex control, improves terminal 300 to file
The compatibility of online editing.
Fig. 5 A to Fig. 5 D shows the schematic diagram of the on-line tuning file format of embodiment according to the present invention.
As shown in Figure 5A, server 200 can specify required Word mould according to document classification for the Word document of creation
Plate, or be selected as according to user and choose the corresponding template of document associations, it may include basic pattern and format information in template.
For example Word template may include following file: book.docm, bookAttributes.xml, book.xml,
book.xsd.Wherein (as shown in Figure 5 B):
Book.docm is needed for defining basic document comprising which parameter, such as Document Title, the letter such as text, figure, table
Breath;
Which kind of pattern bookAttributes.xml for including in document, such as title, positive title, figure caption, caption, table
Topic, table note etc.;
Book.xml is used to describe institutional framework and the displaying side of the workspace Ribbon 502 in Word document editing device
Formula;
Whether book.xsd is legal for verifying book.xml file.
It, can be before opening document, according to the template from server 200 when 300 online editing Word document of terminal
Document is adjusted, such as the format of title, text in adjustment document, so that user is opened by terminal 300
When Word document, no longer need to carry out a large amount of Format adjusting manually.
Specifically, terminal 300 can be selected by the operation of the workspace Ribbon 502 in setting Word document editing device
Format adjusting is carried out, as shown in Figure 5 C, the workspace Ribbon 502, which can be integrated in, to be started in option, as shown in Figure 5 D,
It is also possible to an individual working region, occupies the entire toolbar of Word document editing device.
After terminal 300 completes documents editing, before submitting document, whether Word document can be verified based on template
Whether the position for lacking specified parameter or parameter is correct.If document include platform specify parameter, by url to
Server 200 sends the byte stream of Word document content or the address Ftp of Word document, if document is specified not comprising platform
Parameter, then prompt modify.
Server 200 receive Word document editing device send request and response, read Word document byte stream or
The path Ftp saves storage.
Word document editing device judges whether Word document saves success according to the response of server 200.It is successful then close
Word document is closed, failure then issues system prompt information.
The technical scheme of the present invention has been explained in detail above with reference to the attached drawings, it is contemplated that in the related technology, online processing file
When, very good solution method is never had for the normalization of document format, when the different file of user's online editing, is needed
Duplicate adjustment is carried out to the format of each file, is extremely wasted time.According to the technique and scheme of the present invention, can exist to user
The file of line editor carries out unified format analysis processing, so that the file that user opens on the subscriber terminal belongs to unified format,
It is largely adjusted without user, improves user to the efficiency of file online editing.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.