CN109408783B - Electronic document online editing method and system - Google Patents

Electronic document online editing method and system Download PDF

Info

Publication number
CN109408783B
CN109408783B CN201811037053.5A CN201811037053A CN109408783B CN 109408783 B CN109408783 B CN 109408783B CN 201811037053 A CN201811037053 A CN 201811037053A CN 109408783 B CN109408783 B CN 109408783B
Authority
CN
China
Prior art keywords
document
online editing
electronic document
standard
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811037053.5A
Other languages
Chinese (zh)
Other versions
CN109408783A (en
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.)
Guangzhou China Dci Co ltd
Original Assignee
Guangzhou China Dci Co 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 Guangzhou China Dci Co ltd filed Critical Guangzhou China Dci Co ltd
Priority to CN201811037053.5A priority Critical patent/CN109408783B/en
Publication of CN109408783A publication Critical patent/CN109408783A/en
Application granted granted Critical
Publication of CN109408783B publication Critical patent/CN109408783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses an electronic document online editing system, wherein the electronic document comprises text character data and multimedia data, and the electronic document online editing system comprises an online editing server and an online editing client. The online editing client comprises: a document importer module, a parse first standard data object module, an online editor module, a generate second standard data object module, and a transfer second standard data object module; the online editing server includes: the method includes the steps of a document type identification program module, a first standard data object program module generation, a first standard data object program module transmission, a second standard data object program module parsing, a document content modification program module, a document version setting program module, and a document storage program module. The invention achieves the technical effect of displaying and editing the electronic document in the mode of obtaining the electronic document in the internet browser.

Description

Electronic document online editing method and system
Technical Field
The present invention relates to a digital computing device or a data processing method particularly suited for a specific function, text editing processing (G06F 17/24) of natural language data, and more particularly to an electronic document online editing method and system.
Background
The online editing is an online browsing and editing component for conducting documents based on a browser. At present, the file is uploaded to a server and analyzed through the background. And generating unified standard data according to different file types, and analyzing the data object types through the front end.
Patent document CN107688560a discloses an online design editor font-to-SVG system, which comprises a client, a text font-to-SVG server and an interactive communication system, wherein when a user edits fonts, the server converts inputted characters into standard SVG according to selected font parameters as required, and the standard SVG is returned to a browser or a mobile APP, wherein the generated SVG has only a few KB, and the maximum of tens KB, and the network transmission is very fast, so that the fastest speed can be achieved without loading huge font files by the user browser or the mobile APP, the minimum bandwidth occupation is achieved, and the unified font display effect is obtained in real time.
Patent documents CN102982119B, CN105701081a, CN102096661a, CN103914439B, CN102141985B, CN107506344A, CN102033864B, CN107734074A, CN107391478a disclose different technical schemes for online editing.
However, the prior art of online editing has the following problems:
1. The support degree for the online document file is not enough such as: CAD, PDF, picture, TXT, etc.
2. The functions of browsing, editing, printing and the like of the online document are not fully supported.
3. The on-line edited document cannot be compared in version.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide an electronic document online editing system which can display and edit electronic documents in a visible and instant manner in an internet browser.
The second purpose of the invention is to provide an electronic document online editing system which can compare the versions of the online edited documents.
It is still another object of the present invention to provide an electronic document online editing system capable of displaying pictures of any format in an internet browser.
Therefore, the present invention proposes an electronic document online editing system, wherein the electronic document includes text character data and multimedia data, and the electronic document online editing system includes an online editing server and an online editing client, wherein the electronic document is parsed in the online editing server, unified standard data objects are generated according to different file types of the electronic document, and the standard data objects are parsed in the online editing client, so that the electronic document can be displayed and edited in a manner of what you see is what you get in a web page of an internet browser of the online editing client, and the electronic document online editing system is characterized in that:
The online editing client comprises: a document importer module, a parse first standard data object module, an online editor module, a generate second standard data object module, and a transfer second standard data object module;
the online editing server includes: a document type identification program module, a first standard data object program module generation, a first standard data object program module transmission, a second standard data object program module parsing, a document content modification program module, a document version setting program module, and a document storage program module;
the electronic document online editing system online edits the electronic document as follows:
the document importing program module uploads the electronic document to the online editing server;
the document type recognition program module analyzes the electronic document and recognizes the type of the electronic document;
the program module for generating the first standard data object converts the document element object in the electronic document into a corresponding JSON data object, namely the first standard data object, according to the type of the electronic document, and stores the JSON data object in a JSON data exchange format;
The first standard data object transmission program module transmits the first standard data object from the online editing server to the online editing client through a WebSocket network communication protocol;
the first standard data object analyzing program module analyzes the first standard data object in the JSON data exchange format, generates a standard webpage document and displays the standard webpage document in the Internet browser;
the online editing program module edits the standard webpage document in the internet browser;
the program module for generating the second standard data object converts the webpage elements in the edited standard webpage document into the second standard data object and stores the second standard data object in a JSON data exchange format;
the second standard data object transmission program module transmits the second standard data object from the online editing client to the online editing server through a WebSocket network communication protocol;
the second standard data object analyzing program module analyzes the second standard data object of the JSON data exchange format according to the type of the electronic document, converts the JSON data object of the second standard data object into a corresponding document element object and generates an edited second document object;
The document content modifying program module modifies the electronic document according to the edited second document object;
the document version setting program module sets a document version number for the modified electronic document;
the document storage program module stores the new version of the electronic document.
According to other aspects of the invention, it may further comprise one or more of the following technical features. The new solutions thus constituted are part of the present invention as long as such a combination of technical features is practicable.
Compared with the prior art, the invention has the beneficial effects that:
● Displaying and editing the electronic document in a manner of what you see is what you get in an internet browser;
● Comparing versions of the online edited document;
● Displaying pictures in any format in an internet browser;
drawings
The features, advantages, and characteristics of the present invention will be better understood from the following description of the embodiments with reference to the drawings, in which:
fig. 1: a schematic diagram of a preferred embodiment of the electronic document online editing system of the present invention;
fig. 2: FIG. 1 is a schematic diagram of a key technology of an online editing system for electronic documents;
Fig. 3: FIG. 1 is a functional schematic diagram of an electronic document online editing system;
fig. 4: FIG. 1 is a schematic illustration of source code section of an EXCEL document data conversion program module of an online editing server of an electronic document online editing system;
fig. 5: FIG. 1 is a schematic illustration of source code section of a Word document data conversion program module of an online editing server of an electronic document online editing system;
fig. 6: FIG. 1 is a schematic diagram of an online display of Sheet1 of an EXCEL document of the electronic document online editing system;
fig. 7: FIG. 6 is another schematic diagram of an online display of Sheet1 of an EXCEL document of the electronic document online editing system, in which a portion of the source code of a web page is displayed;
fig. 8: FIG. 6 is another schematic illustration of an online display of Sheet1 of an EXCEL document of the electronic document online editing system, wherein the JSON data object of Sheet1 is displayed in parsed form;
fig. 9: FIG. 6 is another schematic illustration of an online display of Sheet1 of an EXCEL document of the electronic document online editing system, wherein the JSON data objects of Sheet1 are displayed in source format;
fig. 10: FIG. 4 is a flow chart of an EXCEL form object conversion subroutine module GetShell of the EXCEL document data conversion subroutine module;
Fig. 11: FIG. 4 is a flow chart of an EXCEL picture object conversion subroutine module GetAllPictureeinfos of the EXCEL document data conversion subroutine module;
fig. 12: the Word paragraph object conversion subroutine module getparagraph of the Word document data conversion subroutine module shown in fig. 5.
Fig. 13: the EXCEL document data conversion program module shown in fig. 4 is a schematic diagram of the principle of cell online editing.
Detailed Description
The present invention will be further described with reference to the drawings and detailed description hereinafter, wherein it should be noted that any combination of the embodiments or technical features described in the following description may be used to form new embodiments, provided that the technical content of the combination has no logical contradiction or error.
In this context, a program module refers to a set of software program code and hardware executing the code, in other words, a physical entity of the program module is a set of hardware capable of executing the program code, such as a CPU, a memory, a hard disk, etc., while a digital information body of the program module refers to executable program code, that is, the program module includes a physical entity and a digital information body.
Herein, the standard data object refers to a data object conforming to an internationally or nationally related technical standard, for example, the first standard data object and the second standard data object herein refer to a text data object conforming to JSON data exchange format.
A standard web document refers to a document conforming to the international standard specification of HTML, including HTML 5.
The web page standard object refers to an element object specified in the HTML international standard.
Inventive concept
As shown in fig. 1, the design scheme of the electronic document online editing system of the present invention is divided into an online editing Server and an online editing client App.
FIG. 2 shows that the component hierarchy of the electronic document online editing system of the present invention employs a two-layer structure model, a logical layer and a presentation layer.
The presentation layer, the client component part of the application, is responsible for interacting with the browser. The system comprises functional modules with functions of creating, opening, editing, watermarking, converting, printing and the like. Newly creating a file in the background through a front-end sending request and converting the file into specific Json format data, and then generating a dot object of a browser for the Json object by using a component analysis module to render. The opening and editing are that the user selects the file to be operated locally, then the file is uploaded to the server in an uploading mode to conduct file analysis to generate Json data, the Json data is returned, and then the Json data is rendered at the front end.
The logic layer mainly comprises a file analysis engine, file conversion, file management and the like, and is a core part of the system, and the system generates various Json data by logically organizing the rules.
Fig. 3 shows a functional structure of components of the electronic document online editing system of the present invention.
Newly-built Word, excel, wps, ET and other document files, the document files are generated through the background, and the online editing operation of the files is displayed and supported at the front end.
The file is opened by selecting a local file or a network file to perform data processing on the file, and the data is analyzed through a component to generate a Dom to be displayed in a page.
File editing can only operate on documentation, such as Microsoft Office documents.
The file conversion can be converted into a PDF file by uploading Word, excel, wps, pictures and other format files, and then the file is opened or downloaded by the page.
Personal documents may be privately owned and text documents or pictures may be inserted into the document to watermark the opened document.
Key technology
The invention uses two key technologies, webSocket communication protocol and JSON data exchange format specification.
The WebSocket communication protocol is a new network protocol based on TCP. It implements full-duplex (full-duplex) communication of the browser with the online editing server-allowing the online editing server to actively send information to the online editing client.
JSON (JavaScript Object Notation, JS object profile) is a lightweight data exchange format. It stores and presents data in a text format that is completely independent of the programming language, based on a subset of ECMAScript (js specification formulated by the european computer institute). The compact and clear hierarchical structure makes JSON an ideal data exchange language. Is easy to read and write by people, is easy to analyze and generate by machines, and effectively improves the network transmission efficiency.
Based on the above inventive concept, according to a preferred embodiment of the electronic document online editing system of the present invention, the electronic document includes text character data and multimedia data, which is also called a rich document. The electronic document online editing system comprises an online editing server and an online editing client, wherein the online editing server analyzes the electronic document, generates uniform standard data objects according to different file types of the electronic document, and analyzes the standard data objects in the online editing client, so that the electronic document can be displayed and edited in a visible and instant mode in a webpage of an Internet browser of the online editing client. In the prior art, the online editing system mostly adopts the classical server-client technical architecture, but the technical details of data transmission, data exchange formats and the like are different.
The present inventors have based on advances in technology, used a lightweight data exchange format JSON for the exchange of data between clients and servers. And the browser is used for full duplex communication with the server, namely a communication protocol WebSocket which allows the server to actively send information to the client, and the rich document is edited on line in a generalized and standardized mode.
The online editing client comprises: the method includes the steps of a document importer module, parsing a first standard data object module, an online editor module, generating a second standard data object module, and transmitting the second standard data object module. It is understood that the online editing client refers to a client computer and an online editing client App capable of performing operations thereon, such as JavaScript-based HTML pages. The first standard data object and the second standard data object are defined below. The online editing client program App comprises the program modules, so that the program modules are all executed on the client computer and occupy the hardware resources of the client computer.
The online editing server includes: the method includes the steps of a document type identification program module, a first standard data object program module generation, a first standard data object program module transmission, a second standard data object program module parsing, a document content modification program module, a document version setting program module, and a document storage program module. It is understood that the online editing Server refers to a service computer and an online editing service program Server capable of performing operations thereon, such as a program written in c# or Java language.
Referring to fig. 1 and 2, the electronic document online editing system online edits the electronic document as follows:
the document importer module uploads the electronic document to the online editing server. It is understood that the file import or upload mode may be selected from FTP file transfer, shared folder, HTTP, P2P, etc.
And the document type recognition program module analyzes the electronic document and recognizes the type of the electronic document. It will be appreciated that the document type is preferably identified by a file extension, for example in a Windows system, by means of a registry and file extension, the document type can be accurately identified.
Preferably, the document type identification realizes the document type identification through the combination of the file suffix name and the file header identification, firstly the file identification service reads the file suffix name and analyzes the file through a file analysis mode corresponding to the suffix, if the analysis fails, the suffix is not matched with the type, the file type is identified through a mode of identifying the file header in the file stream, the first eight bytes of file headers are taken, and different file headers represent a certain type of file or a certain file.
For example:
file type: the corresponding header file is a first eight-bit 16-ary string.
.doc/.xls:D0CF11E0A1B11AE1
.docx/.xlsx:504B030414000600
.pdf:255044462D312E37
The file type source code is obtained through the file header as follows:
Figure BDA0001791143100000091
file type enumeration class:
Figure BDA0001791143100000092
the program module for generating the first standard data object converts the document element object in the electronic document into a corresponding JSON data object according to the type of the electronic document, namely the first standard data object, and stores the JSON data object in a JSON data exchange format. It will be appreciated that electronic documents, such as Microsoft Office documents, are standard documents with object models, where each element in the document is an instantiation of a class object, and thus such documents are very easy to perform element object transformations. The JSON data exchange format is a readable text format. FIG. 7 shows the JSON data object corresponding to a portion of the subelements of Excel Sheet 1. FIG. 8 illustrates a JSON data object formatted for display. Fig. 9 also shows the original JSON data object and the formatted JSON data object.
Document element objects in an electronic document include: the document content and the content style, after the document is analyzed, the JSON object which can be identified by the front end is obtained and used for network transmission data source, the front end webpage is organized by HTML element tags, and the metadata source for constructing the HTML elements is the data of the JSON object, for example: the type of the tag, text may be a tag such as < p > < span > < a >, the style of the tag (size, color, indentation, etc.), and the display content of the tag.
And the first standard data object transmission program module transmits the first standard data object from the online editing server to the online editing client through a WebSocket network communication protocol. It will be appreciated that data transfer between the server and the client may be accomplished by invoking a read or write program module in the WebSocket API. The WebSocket communication connection is exemplified as follows:
creating a server WebSocket object, waiting for client access
$master=WebSocket("localhost",10000);
Firstly, creating Websocket, then monitoring a corresponding port by a server, and waiting for a client to access the port
function WebSocket($address,$port){
$master=socket_create(AF_INET,SOCK_STREAM,SOL_TCP)or die("socket_create()failed");
socket_set_option($master,SOL_SOCKET,SO_REUSEADDR,1)or die("socket_option()failed");
socket_bind($master,$address,$port)or die("socket_bind()failed");
socket_listen($master,20)or die("socket_listen()failed");
echo"Server Started:".date('Y-m-d H:i:s')."\n";
echo"Master socket:".$master."\n";
echo"Listening on:".$address."port".$port."\n\n";
return$master;
}
Reading data from WebSocket
$buffer=socket_read($socket,2048);
After receiving the first connection request of the client, generating handshake information and replying
$return_str=dohandshake($buffer);
socket_write($socket,$return_str,strlen($return_str));
After being connected, the data of the client can be received and analyzed
$buffer=socket_read($socket,2048);
$data_str=decode($buffer);
After receiving the user data, directly replying to the client
socket_write($socket,$return_str,strlen($return_str));
Break away of connection
socket_close($socket);
The server sets WebSocket monitoring:
Figure BDA0001791143100000111
the front end is connected with a WebSocket:
Figure BDA0001791143100000112
/>
Figure BDA0001791143100000121
and the first standard data analyzing program module analyzes the first standard data object in the JSON data exchange format, generates a standard webpage document and displays the standard webpage document in the Internet browser. For example, an Excel form Sheet in a JSON object corresponds to a Table element object of an HTML web page, and a paragraph layout object in Word in a JSON object corresponds to a P element object of an HTML web page.
The on-line editing program module edits the standard webpage document in the internet browser.
It can be understood that, regarding the browser to implement HTML document editing, a user-modification attribute can be set for HTML tag editing, and an IE browser can set-ms-user-modification: read-write-plasmid-only; the contentditable attribute is the content of whether or not the new attribute in HTML5 specifies an editable element.
Referring to FIG. 13, in the browser, there is a double click event at each cell of the EXCEL document, a mouse double click can trigger a hidden editable text box, such as the < input > input box shown in FIG. 13. Similarly, in a browser, in a WORD document, a double click on a paragraph in the WORD document may appear as an editable text box for editing the text of the paragraph.
The program module for generating the second standard data object converts the webpage element object in the edited standard webpage document into a corresponding JSON data object, which is called a second standard data object. It will be appreciated that the generation of the second standard data object program module performs the inverse operation of the parsing the first standard data program module, for example, converting the Table web page element object into a Json data object of the corresponding Excel Sheet.
And the second standard data object transmission program module transmits the second standard data object from the online editing client to the online editing server through a WebSocket network communication protocol. As described above, communication between the client and the server is achieved by calling the WebSocket API.
And the second standard data object analyzing program module analyzes the second standard data object of the JSON data exchange format according to the type of the electronic document, converts the JSON data object of the second standard data object into a corresponding document element object and generates an edited second document object. It will be appreciated that the parse second standard data object program module will, for example, convert JSON data objects of Table element objects of HTML documents to Sheet element objects of Excel documents.
The modify document content program module modifies the electronic document according to the edited second document object. That is, the base electronic document is modified accordingly on the server against the second document object edited at the client. For example, the base electronic document Sheet1 of fig. 6 becomes an edited second document object after online editing by the client, and then, the edited content part is duplicated on the server to replace the base electronic document Sheet1 on the server.
The set document version program module sets a document version number for the modified electronic document. It will be appreciated that, for example, an Excel or Word document, the built-in version number attribute of the document may be set directly, or the version number user attribute may be edited online custom.
The document storage program module stores the new version of the electronic document. It will be appreciated that the new version of the electronic document may be stored on a server or on a client computer via FTP file transfer protocol.
The electronic document online editing system achieves the technical effects of displaying and editing the electronic document and setting version numbers in a mode of obtaining the electronic document in a visible mode in an internet browser.
Optionally, each online editing can convert, transmit, edit, modify and save partial documents as required, so that the response speed of the program can be improved, and the good experience of online editing is enhanced. Rather than uploading or downloading the entire electronic document at one time, the operating speed will be significantly affected in the case of too large electronic documents.
Preferably, referring to fig. 1, the online editing client further includes a text rendering program module, wherein the text rendering program module renders and enhances display attributes of web page elements in the standard web page document according to a predetermined web page element style template, so that contents of the electronic document can be displayed in a manner of what you see is what you get in a web page of the internet browser. The predetermined web page element style template is, for example, a cascading style sheet CCS in an HTML web page:
Figure BDA0001791143100000141
Preferably, the online editing server further comprises a graphic object conversion module for converting various types of graphic objects into browsable picture objects on a web page, the graphic object conversion module comprising the operations of:
operation 901: obtaining graphic container information;
operation 902: judging whether the graphic container is empty or not;
operation 903: if the graphics container is empty, go to operation 909;
operation 904: if the graphic container is not empty, circularly reading the graphic object on the graphic container;
operation 905: judging whether the graphic object is a picture object or not;
operation 906: if the graphical object is not a picture object, then go to operation 909;
operation 907: if the graphic object is a picture object, acquiring data and position information of the picture;
operation 908: generating a webpage standard picture object, and turning to operation S904 to start reading the next graph;
operation 909: ending the operation.
It is understood that the graphics container may be a WORD document, a graphics set Shapes in an EXCEL document, a PDF document, a CAD document, or the like. Such a module may ensure that various types of graphic files are displayed on a web page, but cannot be edited.
Preferably, the online editing server and the online editing client are the same computer; or the online editing server and the online editing client are respectively different computers. It can be appreciated that for local test or application scenarios, one computer can run an online editing client program and an online editing server program, facilitating debugging and use. For internet business applications, the online editing client may be a plurality of computers on which the online editing client program is installed, and the online editing server may also be a plurality of clustered computer servers on which the online editing server program is installed.
Preferably, referring to fig. 1, the type of the electronic document is a Microsoft Office document, wherein the Microsoft Office document includes a WORD document and an EXCEL document. It will be appreciated that Microsoft Office documents are widely used Document formats, have excellent Document element object structures, such as Document objects, paragraph objects, table objects, etc., and are very suitable for fast generating corresponding JSON objects and for interconversion with web page element objects, such as Body, P, table. Of course, for PDF documents, photo documents, online editing may use a software product company to provide online editing plug-ins, or to convert to non-editable photo frames for viewing and display.
Optionally, the document importer module uploads the electronic document to the online editing server via FTP file transfer protocol. The file is transferred between the Server and the client computer by HTTP communication protocol, SQL Server, etc.
Preferably, referring to fig. 4 and 5, the online editing server further includes a Word document data conversion program module and/or an EXCEL document data conversion program module, wherein the Word document data conversion program module includes a Word paragraph object conversion subroutine module getparagagrams, and the EXCEL document data conversion program module includes an EXCEL form object conversion subroutine module GetSheet and an EXCEL picture object conversion subroutine module getallpictureinfo. It will be appreciated that the Word document data conversion program module further includes conversion sub-program modules of other Word element objects, such as GetMerge, getColor, getStyleIndex, getParStyleIndex, etc., and the EXCEL document data conversion program module further includes GetRow, getStyle, getFont, getColor, getColorIndex, getFontColor, etc.
Preferably, referring to fig. 12, the Word paragraph object conversion subroutine module getpara graph converts a Word paragraph object into a web page standard paragraph object in the following operation manner:
Operation S701: reading Word paragraph objects;
operation S702: judging whether the Word paragraph object is a Word directory object or not;
operation S703: if the Word paragraph object is a Word directory object, acquiring a FieldText and a style, and turning to operation S711;
operation S704: if the Word paragraph object is not a Word directory object, judging whether the Word paragraph object is a Word table object or not;
operation S705: if the Word paragraph object is a Word table object, reading the information of the rows and columns of the Word table object and the text style thereof, and turning to operation S711;
operation S706: if the Word paragraph object is not a Word table object, judging whether the Word paragraph object is a Word picture object or not;
operation S707: if the Word paragraph object is a Word picture object, judging whether the Word picture object is a picture type or not;
operation S708: if the Word picture object is not a picture type, redrawing the picture, and proceeding to operation S709;
operation S709: if the Word picture object is a picture type, generating a picture, and turning to operation S711;
operation S710: if the Word paragraph object is not a Word picture object, reading paragraph text and a style;
Operation S711: a web page standard paragraph object is generated.
The above-described transformation operation of Word paragraph objects is merely an example, and all Word element objects correspond to such a similar operation, and will not be described in detail herein.
Referring to fig. 10, preferably, the Excel form object conversion subroutine module GetSheet converts the Excel form object into a web page standard form object in the following operation manner:
reading an Excel form object;
reading Excel cell merging information;
reading Excel cell data and patterns;
reading position information and data of an Excel picture;
generating a webpage standard form object;
as shown in fig. 11, preferably, the Excel picture object conversion subroutine module getallpictureinfo converts the Excel picture object into a web page standard picture object in the following operation manner:
operation 901: obtaining canvas information;
operation 902: judging whether the canvas is empty or not;
operation 903: if the canvas is empty, go to operation 909;
operation 904: if the canvas is not empty, circularly reading the graphic objects on the canvas;
operation 905: judging whether the graphic object is a picture object or not;
operation 906: if the graphical object is not a picture object, then go to operation 909;
Operation 907: if the graphic object is a picture object, acquiring data and position information of the picture;
operation 908: generating a webpage standard picture object, and turning to operation S904 to start reading the next graph;
operation 909: and ending the operation of the Excel picture object conversion subroutine module.
The graphics conversion program can realize online display and browsing of all graphics types.
The source code of the Excel picture object conversion subroutine module getallpictureinfo is exemplified as follows:
Figure BDA0001791143100000181
Figure BDA0001791143100000191
and based on the above inventive concept and the electronic document online editing system, the inventors propose the following electronic document online editing method.
According to a first preferred embodiment of the online editing method of an electronic document, the electronic document includes text character data and multimedia data, and the electronic document is parsed in an online editing server, unified standard data objects are generated according to different file types of the electronic document, and the standard data objects are parsed in an online editing client, so that the electronic document can be displayed and edited in a visible and instant manner in a web page of an internet browser of the online editing client, and the online editing method is characterized in that: the method comprises the following steps:
A document importing step S1: uploading the electronic document to the online editing server;
type recognition step S2: analyzing the electronic document in the online editing server, and identifying the type of the electronic document;
generating a first standard data object step S3: in the online editing server, according to the type of the electronic document, converting a document element object in the electronic document into a corresponding JSON data object, namely a first standard data object, and storing the first standard data object in a JSON data exchange format;
the step S4 of transmitting the first standard data object: transmitting the first standard data object from the online editing server to the online editing client through a WebSocket network communication protocol;
the step S5 of analyzing the first standard data object: analyzing a first standard data object in the JSON data exchange format at the online editing client to generate a standard webpage document, and displaying the standard webpage document in the Internet browser;
on-line editing step S6: editing the standard webpage document in the internet browser at the online editing client;
generating a second standard data object step S7: converting the webpage elements in the edited standard webpage document into a second standard data object at the online editing client, and storing the second standard data object in a JSON data exchange format;
The step S8 of transmitting the second standard data object: transmitting the second standard data object from the online editing client to the online editing server through a WebSocket network communication protocol;
the second standard data object analyzing step S9: in the online editing server, according to the type of the electronic document, analyzing a second standard data object in the JSON data exchange format, converting the JSON data object of the second standard data object into a corresponding document element object, and generating an edited second document object;
a document content modification step S10: modifying the electronic document in the online editing server according to the edited second document object;
setting a document version step S11: setting a document version number for the modified electronic document in the online editing server;
document storage step S12: and storing the electronic document of the new version.
Preferably, between the parsing step S5 and the online editing step S6, the method further comprises the steps of:
text rendering step S21: and rendering and enhancing the display attribute of the webpage element in the standard webpage document according to a preset webpage element style template at the online editing client, so that the content of the electronic document can be displayed in a visible and instant mode in the webpage of the Internet browser.
Preferably, the electronic document online editing method further includes a graphic object converting step for converting various types of graphic objects into web page standard picture objects, the graphic object converting step including the sub-steps of:
substep 901: obtaining graphic container information;
substep 902: judging whether the graphic container is empty or not;
substep 903: if the graphics container is empty, go to substep 909;
substep 904: if the graphic container is not empty, circularly reading the graphic object on the graphic container;
substep 905: judging whether the graphic object is a picture object or not;
substep 906: if the graphical object is not a picture object, then go to sub-step 909;
substep 907: if the graphic object is a picture object, acquiring data and position information of the picture;
substep 908: generating a webpage standard picture object, and turning to the substep S904 to start reading the next graph;
substep 909: ending the operation.
It is understood that the graphics container may be a WORD document, a graphics set Shapes in an EXCEL document, a PDF document, a CAD document, or the like.
The foregoing has described in detail preferred or specific embodiments of the invention. It should be understood that numerous modifications and variations will be apparent to those skilled in the art in light of the inventive concepts herein without requiring undue effort. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the design concept created by the present invention by the person skilled in the art shall be within the scope of the present invention and/or the protection scope defined by the claims.

Claims (10)

1. The electronic document online editing system comprises an online editing server and an online editing client, wherein the online editing server analyzes the electronic document, generates uniform standard data objects according to different file types of the electronic document, and analyzes the standard data objects in the online editing client so as to display and edit the electronic document in a visible and instant mode in a webpage of an internet browser of the online editing client, and is characterized in that:
the online editing client comprises: a document importer module, a parse first standard data object module, an online editor module, a generate second standard data object module, and a transfer second standard data object module;
the online editing server includes: a document type identification program module, a first standard data object program module generation, a first standard data object program module transmission, a second standard data object program module parsing, a document content modification program module, a document version setting program module, and a document storage program module;
The electronic document online editing system online edits the electronic document as follows:
the document importing program module uploads the electronic document to the online editing server;
the document type recognition program module analyzes the electronic document and recognizes the type of the electronic document;
the program module for generating the first standard data object converts the document element object in the electronic document into a corresponding JSON data object, namely the first standard data object, according to the type of the electronic document, and stores the JSON data object in a JSON data exchange format;
the first standard data object transmission program module transmits the first standard data object from the online editing server to the online editing client through a WebSocket network communication protocol;
the first standard data object analyzing program module analyzes the first standard data object in the JSON data exchange format, generates a standard webpage document and displays the standard webpage document in the Internet browser;
the online editing program module edits the standard webpage document in the internet browser;
the program module for generating the second standard data object converts the webpage element object in the edited standard webpage document into a corresponding JSON data object, which is called a second standard data object;
The second standard data object transmission program module transmits the second standard data object from the online editing client to the online editing server through a WebSocket network communication protocol;
the second standard data object analyzing program module analyzes the second standard data object of the JSON data exchange format according to the type of the electronic document, converts the JSON data object of the second standard data object into a corresponding document element object and generates an edited second document object;
the document content modifying program module modifies the electronic document according to the edited second document object;
the document version setting program module sets a document version number for the modified electronic document;
the document storage program module stores a new version of electronic document;
the online editing server further comprises a graphic object conversion module for converting various types of graphic objects into browsable picture objects on a web page, wherein the graphic object conversion module comprises the following operations:
operation 901: obtaining graphic container information;
operation 902: judging whether the graphic container is empty or not;
operation 903: if the graphics container is empty, go to operation 909;
Operation 904: if the graphic container is not empty, circularly reading the graphic object on the graphic container;
operation 905: judging whether the graphic object is a picture object or not;
operation 906: if the graphical object is not a picture object, then go to operation 909;
operation 907: if the graphic object is a picture object, acquiring data and position information of the picture;
operation 908: generating a webpage standard picture object, and turning to operation S904 to start reading the next graph;
operation 909: ending the operation.
2. The electronic document online editing system according to claim 1, wherein: the online editing client also comprises a text rendering program module, wherein the text rendering program module renders and enhances the display attribute of the webpage element in the standard webpage document according to a preset webpage element style template, so that the content of the electronic document can be displayed in a mode of being seen and obtained in the webpage of the Internet browser.
3. The electronic document online editing system according to claim 1, wherein: the online editing server and the online editing client are the same computer; or the online editing server and the online editing client are respectively different computers.
4. The electronic document online editing system according to claim 1, wherein: the type of the electronic document is a Microsoft Office document, wherein the Microsoft Office document comprises a WORD document and an EXCEL document.
5. The electronic document online editing system according to claim 1, wherein: and the document importing program module uploads the electronic document to the online editing server through an FTP file transfer protocol.
6. The electronic document online editing system according to claim 4, wherein: the online editing server further comprises a Word document data conversion program module and/or an EXCEL document data conversion program module, wherein the Word document data conversion program module comprises a Word paragraph object conversion subprogram module GetParagagraphs, and the EXCEL document data conversion program module comprises an EXCEL form object conversion subprogram module GetSheeet and an EXCEL picture object conversion subprogram module GetAllPictureeinfos.
7. The electronic document online editing system of claim 6, wherein: the Word paragraph object conversion subroutine module getParagagraphs converts the Word paragraph object into a web page standard paragraph object according to the following operation mode:
Operation S701: reading Word paragraph objects;
operation S702: judging whether the Word paragraph object is a Word directory object or not;
operation S703: if the Word paragraph object is a Word directory object, acquiring a FieldText and a style, and turning to operation S711;
operation S704: if the Word paragraph object is not a Word directory object, judging whether the Word paragraph object is a Word table object or not;
operation S705: if the Word paragraph object is a Word table object, reading the information of the rows and columns of the Word table object and the text style thereof, and turning to operation S711;
operation S706: if the Word paragraph object is not a Word table object, judging whether the Word paragraph object is a Word picture object or not;
operation S707: if the Word paragraph object is a Word picture object, judging whether the Word picture object is a picture type or not;
operation S708: if the Word picture object is not a picture type, redrawing the picture, and proceeding to operation S709;
operation S709: if the Word picture object is a picture type, generating a picture, and turning to operation S711;
operation S710: if the Word paragraph object is not a Word picture object, reading paragraph text and a style;
Operation S711: a web page standard paragraph object is generated.
8. The electronic document online editing system of claim 6, wherein: the Excel form object conversion subroutine module GetSheet converts the Excel form object into a web page standard form object according to the following operation mode:
reading an Excel form object;
reading Excel cell merging information;
reading Excel cell data and patterns;
reading position information and data of an Excel picture;
a web page standard form object is generated.
9. The electronic document online editing system of claim 6, wherein: the Excel picture object conversion subroutine module getallpictureinfo converts the Excel picture object into a web page standard picture object according to the following operation mode:
operation 901: obtaining canvas information;
operation 902: judging whether the canvas is empty or not;
operation 903: if the canvas is empty, go to operation 909;
operation 904: if the canvas is not empty, circularly reading the graphic objects on the canvas;
operation 905: judging whether the graphic object is a picture object or not;
operation 906: if the graphical object is not a picture object, then go to operation 909;
Operation 907: if the graphic object is a picture object, acquiring data and position information of the picture;
operation 908: generating a webpage standard picture object, and turning to operation S904 to start reading the next graph;
operation 909: and ending the operation of the Excel picture object conversion subroutine module.
10. The electronic document online editing method, wherein the electronic document comprises text character data and multimedia data, and the electronic document is parsed in an online editing server, a unified standard data object is generated according to different file types of the electronic document, and the standard data object is parsed in an online editing client, so that the electronic document can be displayed and edited in a manner of being obtained by a user in a webpage of an internet browser of the online editing client, and the method is characterized in that: the method comprises the following steps:
a document importing step S1: uploading the electronic document to the online editing server;
type recognition step S2: analyzing the electronic document in the online editing server, and identifying the type of the electronic document;
generating a first standard data object step S3: in the online editing server, according to the type of the electronic document, converting a document element object in the electronic document into a corresponding JSON data object, namely a first standard data object, and storing the first standard data object in a JSON data exchange format;
The step S4 of transmitting the first standard data object: transmitting the first standard data object from the online editing server to the online editing client through a WebSocket network communication protocol;
the step S5 of analyzing the first standard data object: analyzing a first standard data object in the JSON data exchange format at the online editing client to generate a standard webpage document, and displaying the standard webpage document in the Internet browser;
on-line editing step S6: editing the standard webpage document in the internet browser at the online editing client;
generating a second standard data object step S7: converting a webpage element object in the edited standard webpage document into a corresponding JSON data object, namely a second standard data object, at the online editing client;
the step S8 of transmitting the second standard data object: transmitting the second standard data object from the online editing client to the online editing server through a WebSocket network communication protocol;
the second standard data object analyzing step S9: in the online editing server, according to the type of the electronic document, analyzing a second standard data object in the JSON data exchange format, converting the JSON data object of the second standard data object into a corresponding document element object, and generating an edited second document object;
A document content modification step S10: modifying the electronic document in the online editing server according to the edited second document object;
setting a document version step S11: setting a document version number for the modified electronic document in the online editing server;
document storage step S12: storing the electronic document of the new edition;
the electronic document online editing method further comprises a graphic object conversion step for converting various types of graphic objects into web page standard picture objects, wherein the graphic object conversion step comprises the following substeps:
substep 901: obtaining graphic container information;
substep 902: judging whether the graphic container is empty or not;
substep 903: if the graphics container is empty, go to substep 909;
substep 904: if the graphic container is not empty, circularly reading the graphic object on the graphic container;
substep 905: judging whether the graphic object is a picture object or not;
substep 906: if the graphical object is not a picture object, then go to sub-step 909;
substep 907: if the graphic object is a picture object, acquiring data and position information of the picture;
Substep 908: generating a webpage standard picture object, and turning to the substep S904 to start reading the next graph;
substep 909: ending the operation.
CN201811037053.5A 2018-09-06 2018-09-06 Electronic document online editing method and system Active CN109408783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811037053.5A CN109408783B (en) 2018-09-06 2018-09-06 Electronic document online editing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811037053.5A CN109408783B (en) 2018-09-06 2018-09-06 Electronic document online editing method and system

Publications (2)

Publication Number Publication Date
CN109408783A CN109408783A (en) 2019-03-01
CN109408783B true CN109408783B (en) 2023-05-30

Family

ID=65463918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811037053.5A Active CN109408783B (en) 2018-09-06 2018-09-06 Electronic document online editing method and system

Country Status (1)

Country Link
CN (1) CN109408783B (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915705B (en) * 2019-05-07 2023-07-28 百度在线网络技术(北京)有限公司 Picture visual editing method, device, equipment and medium
CN110187916B (en) * 2019-05-31 2022-09-02 四川长虹电器股份有限公司 Method for generating Word document based on data configuration
CN110532532A (en) * 2019-06-28 2019-12-03 杭州师范大学 PDF static document interactive form edit methods and device based on browser
CN112416329A (en) * 2019-08-23 2021-02-26 上海幻电信息科技有限公司 Data editing method and device and storage medium
CN110516223A (en) * 2019-09-03 2019-11-29 上海挚极信息科技有限公司 A kind of on-line checking Test Data Collecting Template Information system and its operating method
CN112579589B (en) * 2019-09-27 2024-02-27 钉钉控股(开曼)有限公司 Information importing method and device
CN110705209A (en) * 2019-09-29 2020-01-17 武汉海昌信息技术有限公司 Method and system for on-line amending manuscript
CN111191414B (en) * 2019-11-11 2021-02-02 苏州亿歌网络科技有限公司 Page watermark generation method, identification method, device, equipment and storage medium
CN112783957A (en) * 2019-11-11 2021-05-11 上海遴睿教育科技有限公司 Method and system for importing word document format for English reading
CN111178025A (en) * 2019-11-28 2020-05-19 中广核工程有限公司 Editing method and device of nuclear power plant operation guide rules, computer equipment and storage medium
CN111652465A (en) * 2020-04-22 2020-09-11 杭州传化智能制造科技有限公司 Method, device and system for scheduling processing, computer equipment and storage medium
CN111428451B (en) * 2020-06-09 2020-09-08 平安国际智慧城市科技股份有限公司 Text online editing method and device, electronic equipment and storage medium
CN111753499B (en) * 2020-07-07 2021-02-05 江苏中威科技软件***有限公司 Method for merging and displaying electronic form and OFD format file and generating directory
CN114579224A (en) * 2020-12-02 2022-06-03 永中软件股份有限公司 Method for acquiring browser closing event, computing device and computer readable medium
CN112417827B (en) * 2020-12-07 2024-03-01 北京明略软件***有限公司 Method, device, electronic equipment and storage medium for on-line document editing and displaying
CN112558957B (en) * 2020-12-08 2024-02-13 中国联合网络通信集团有限公司 Method and device for generating webpage form, electronic equipment and readable storage medium
CN112528203A (en) * 2020-12-18 2021-03-19 平安国际智慧城市科技股份有限公司 Webpage-based online document making method and system
CN113742624A (en) * 2021-09-03 2021-12-03 北京市律典通科技有限公司 Online plug-in-free browsing and editing processing method and device for Word document
CN113723064B (en) * 2021-11-01 2022-02-08 冠群信息技术(南京)有限公司 Stream type document online editing method
CN114023415A (en) * 2021-11-08 2022-02-08 深圳航天智慧城市***技术研究院有限公司 Dynamic document template generation method and system based on online editable customization
CN117252159A (en) * 2023-08-03 2023-12-19 吉贝克信息技术(北京)有限公司 Online XBRL editor supporting multi-person collaboration of undoing and redoing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516865A (en) * 2014-12-29 2015-04-15 北京大学 On-line demonstration document editing method for associated desktop demonstration subdocuments based on Web
CN105938470A (en) * 2015-03-02 2016-09-14 佳能株式会社 Information processing system, server apparatus, control method
CN106560805A (en) * 2015-10-01 2017-04-12 曹蕾 Page layout method of WYSIWYG document editor based on HTML standard

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4382326B2 (en) * 2002-05-24 2009-12-09 ケープレックス・インク Method and apparatus for re-editing and re-distributing web documents
US7340673B2 (en) * 2002-08-29 2008-03-04 Vistaprint Technologies Limited System and method for browser document editing
US7627592B2 (en) * 2004-12-16 2009-12-01 Microsoft Corporation Systems and methods for converting a formatted document to a web page
US20060143562A1 (en) * 2004-12-29 2006-06-29 Andreas Seurig Self-describing editors for browser-based WYSIWYG XML/HTML editors
US20090235161A1 (en) * 2008-03-15 2009-09-17 Microsoft Corporation Lossless Web-Based Editor For Complex Documents
US8745488B1 (en) * 2010-06-30 2014-06-03 Patrick Wong System and a method for web-based editing of documents online with an editing interface and concurrent display to webpages and print documents
US20120101980A1 (en) * 2010-10-26 2012-04-26 Microsoft Corporation Synchronizing online document edits
US20160021181A1 (en) * 2013-07-23 2016-01-21 George Ianakiev Data fusion and exchange hub - architecture, system and method
AU2017210597B2 (en) * 2016-08-04 2019-02-07 Lulu Software Holdings System and method for the online editing of pdf documents
CN107734074B (en) * 2017-11-29 2020-06-12 常州中价之星软件技术有限公司 Method for realizing online reading and editing document

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104516865A (en) * 2014-12-29 2015-04-15 北京大学 On-line demonstration document editing method for associated desktop demonstration subdocuments based on Web
CN105938470A (en) * 2015-03-02 2016-09-14 佳能株式会社 Information processing system, server apparatus, control method
CN106560805A (en) * 2015-10-01 2017-04-12 曹蕾 Page layout method of WYSIWYG document editor based on HTML standard

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
卢坚,孙煜华,冯坚,黄宜华,张福炎.WWW DOC***中HTML文档的可视化编辑与浏览技术的实现.计算机辅助设计与图形学学报.1999,(第06期),第559-562页. *
王文 ; 陈志伟 ; 王树锋 ; .基于中间件的文档在线编辑管理技术的实现.中国制造业信息化.2012,(第23期),第89-91、95页. *

Also Published As

Publication number Publication date
CN109408783A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109408783B (en) Electronic document online editing method and system
US10067931B2 (en) Analysis of documents using rules
CN1801149B (en) Systems and methods for converting a formatted document to a web page
JP4344693B2 (en) System and method for browser document editing
US7146564B2 (en) Extensible stylesheet designs using meta-tag and/or associated meta-tag information
US8484552B2 (en) Extensible stylesheet designs using meta-tag information
US7653876B2 (en) Reversible document format
JP5520856B2 (en) System and method for content delivery over a wireless communication medium to a portable computing device
US20060107206A1 (en) Form related data reduction
KR20040077530A (en) Method and system for enhancing paste functionality of a computer software application
WO2009000141A1 (en) Representation method, system and device of layout file logical structure information
US20040205541A1 (en) Web browser with annotation capability
US11418622B2 (en) System and methods for web-based software application translation
US20180260389A1 (en) Electronic document segmentation and relation discovery between elements for natural language processing
JPWO2006051975A1 (en) Document processing device
CN105589959A (en) Form processing method and form processing system
CN113158101A (en) Visual page rendering method, device, equipment and storage medium
CN112433995A (en) File format conversion method, system, computer equipment and storage medium
CN112596688A (en) Web end custom printing method based on TinyMCE rich text
US11449665B2 (en) Methods and apparatus for supporting the display and editing of OOXML document content using a web browser
Maurer et al. Transclusions in an html-based environment
CN116050370A (en) Template data processing method, system and related equipment
CN115309476A (en) Browser-based ofd file display and editing method
US10402482B2 (en) Content management system
US9946698B2 (en) Inserting text and graphics using hand markup

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
GR01 Patent grant
GR01 Patent grant