CN113486635A - Document editing method and device, electronic equipment and computer readable medium - Google Patents

Document editing method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113486635A
CN113486635A CN202110837383.8A CN202110837383A CN113486635A CN 113486635 A CN113486635 A CN 113486635A CN 202110837383 A CN202110837383 A CN 202110837383A CN 113486635 A CN113486635 A CN 113486635A
Authority
CN
China
Prior art keywords
document
directory
tree
user
edited
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110837383.8A
Other languages
Chinese (zh)
Inventor
于雅洁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110837383.8A priority Critical patent/CN113486635A/en
Publication of CN113486635A publication Critical patent/CN113486635A/en
Pending legal-status Critical Current

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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Abstract

The application discloses a document editing method, a document editing device, electronic equipment and a computer readable medium, and relates to the technical field of computers, wherein the method comprises the following steps: calling the historical document to further generate a corresponding directory tree; responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type; and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document. Therefore, the historical document can be used for being consulted by a user, and can also provide a function of quoting and editing, and the historical document is correspondingly quoted and edited according to the operation of the user on the catalog or the chapter of the historical document, so that the document editing efficiency and the document editing accuracy are improved.

Description

Document editing method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for editing a document, an electronic device, and a computer-readable medium.
Background
At present, in work, if a report writer takes the research results of all members of a team as the writing basis or takes historical reports as the basis to edit the report documents, the work efficiency is low because the data is too much and inconvenient to be quoted.
In the process of implementing the present application, the inventor finds that at least the following problems exist in the prior art:
when the history report is referred to for document editing, the work efficiency is low due to the inconvenience of multiple references of the data.
Disclosure of Invention
In view of this, embodiments of the present application provide a document editing method, an apparatus, an electronic device, and a computer-readable medium, which can solve the problem of low work efficiency caused by inconvenience of multiple references of data when a history report is referred to for creation in the prior art.
To achieve the above object, according to an aspect of an embodiment of the present application, there is provided a document editing method including:
calling the historical document to further generate a corresponding directory tree;
responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type;
and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document.
Optionally, generating a corresponding directory tree includes:
analyzing the historical document to obtain a corresponding directory;
calling an open source tool, and analyzing the historical document into a hypertext markup language document;
splitting the hypertext markup language document based on the directory, and determining a subdocument corresponding to the directory;
and generating a corresponding directory tree according to the directory and the subdocuments.
Optionally, obtaining a corresponding directory includes:
and analyzing the historical document, acquiring corresponding sub-document positioning data, and generating a json-format directory based on the sub-document positioning data.
Optionally, determining the subdocuments corresponding to the directory includes:
and positioning the hypertext markup language sub-documents corresponding to the directory in the hypertext markup language document according to the sub-document positioning data in the directory.
Optionally, generating a corresponding directory tree from the directory and the sub-document includes:
and constructing a directory tree by taking the directory as a root node and taking each subdocument corresponding to the directory as a child node corresponding to the root node.
Optionally, editing the document to be edited includes:
in response to the fact that the operation type is determined to be clicking operation, displaying a rendered document corresponding to the tree node clicked by the user;
and in response to the fact that the rendered document is matched with the document to be edited, embedding the tree node clicked by the user into the target position of the document to be edited so as to edit the document to be edited.
Optionally, editing the document to be edited includes:
and in response to the fact that the operation type is determined to be the dragging operation, embedding the tree node dragged by the user into the target position of the document to be edited so as to edit the document to be edited.
In addition, the present application also provides a document editing apparatus, including:
the directory tree generation unit is configured to call the historical documents and further generate corresponding directory trees;
an operation type determination unit configured to determine a corresponding operation type in response to an operation of a user on a tree node in the directory tree;
and the editing unit is configured to call the webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate the target document.
Optionally, the directory tree generation unit is further configured to:
analyzing the historical document to obtain a corresponding directory;
calling an open source tool, and analyzing the historical document into a hypertext markup language document;
splitting the hypertext markup language document based on the directory, and determining a subdocument corresponding to the directory;
and generating a corresponding directory tree according to the directory and the subdocuments.
Optionally, the directory tree generation unit is further configured to:
and analyzing the historical document, acquiring corresponding sub-document positioning data, and generating a json-format directory based on the sub-document positioning data.
Optionally, the directory tree generation unit is further configured to:
and positioning the hypertext markup language sub-documents corresponding to the directory in the hypertext markup language document according to the sub-document positioning data in the directory.
Optionally, the directory tree generation unit is further configured to:
and constructing a directory tree by taking the directory as a root node and taking each subdocument corresponding to the directory as a child node corresponding to the root node.
Optionally, the editing unit is further configured to:
in response to the fact that the operation type is determined to be clicking operation, displaying a rendered document corresponding to the tree node clicked by the user;
and in response to the fact that the rendered document is matched with the document to be edited, embedding the tree node clicked by the user into the target position of the document to be edited so as to edit the document to be edited.
Optionally, the editing unit is further configured to:
and in response to the fact that the operation type is determined to be the dragging operation, embedding the tree node dragged by the user into the target position of the document to be edited so as to edit the document to be edited.
In addition, the present application also provides a document editing electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement the document editing method as described above.
In addition, the present application also provides a computer readable medium, on which a computer program is stored, which when executed by a processor implements the document editing method as described above.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of calling a historical document to further generate a corresponding directory tree; responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type; and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document. Therefore, the history document can be used for being consulted by a user, and can also provide a function of quoting and editing, and the history document to be edited is correspondingly quoted and edited according to the operation of the user on the directory or the chapter of the history document (such as clicking or dragging operation on each node in the tree node of the directory tree), so that the document editing efficiency and accuracy are improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a further understanding of the application and are not to be construed as limiting the application. Wherein:
fig. 1 is a schematic diagram of a main flow of a document editing method according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of a main flow of a document editing method according to a second embodiment of the present application;
FIG. 3 is a diagram illustrating an application scenario of a document editing method according to a third embodiment of the present application;
FIG. 4 is a schematic diagram of the main elements of a document editing apparatus according to an embodiment of the present application;
FIG. 5 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
fig. 6 is a schematic structural diagram of a computer system suitable for implementing the terminal device or the server according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a document editing method according to a first embodiment of the present application, as shown in fig. 1, the document editing method includes:
step S101, calling the historical document, and further generating a corresponding directory tree.
In this embodiment, an execution subject (for example, a server) of the document editing method may call a history document. The history document may be a history report, a history paper, or a history journal, and the specific content and form of the history document are not limited in the present application.
After the execution subject calls the historical document, a directory tree corresponding to the historical document can be generated according to the historical document. The directory tree may be composed of directory nodes and corresponding chapter nodes under the directory nodes, where the directory nodes may be root nodes in the directory tree, and the corresponding chapter nodes under the directory nodes may be child nodes of the corresponding root nodes in the directory tree, and the directory tree is composed of the root nodes and the child nodes.
In this embodiment, generating the corresponding directory tree includes:
and analyzing the historical document to obtain a corresponding directory.
In this embodiment, when a current document to be edited is edited, the acquired history document may be preprocessed to acquire a directory corresponding to the history document.
Specifically, obtaining the corresponding directory includes: and analyzing the historical document, acquiring corresponding sub-document positioning data, and generating a json-format directory based on the sub-document positioning data. The corresponding subdocuments of the historic document can be sections of the historic document. The subdocument positioning data may be positioning data of each section of the history document. After the execution main body obtains the sub-document positioning data (that is, the positioning data of each section corresponding to the history document) corresponding to the history document, the execution main body may convert the directory of the history document into a json format in order to facilitate rendering by a front-end browser. Specifically, the execution main body may associate the positioning data of each section corresponding to the history document with the directory, nest the positioning data of each section corresponding to the history document in the directory data, associate the directory with the positioning data of each section corresponding to the history document, and generate the directory in the json format. The generated json format directory can be composed of historical document names, chapter numbers, chapter hierarchies, relative ordering of the chapter numbers and the chapter hierarchies (which can be used as a basis for inquiring each historical document in a plug-in area of an editor), positioning data of each chapter in an associated hypertext markup language (html) form, and the like.
And calling an open source tool to analyze the historical document into a hypertext markup language document.
To facilitate reading and editing by the browser, the execution body may convert the contents of each chapter of the history document into html format. In particular, the execution agent may utilize an open source tool to process the historic documents into full text html.
The hypertext markup language document is split based on the directory, and the sub-documents corresponding to the directory are determined.
Specifically, determining the subdocuments corresponding to the directory includes: according to the positioning data of the subdocuments in the directory (namely the positioning data of each section in the directory), the corresponding subdocuments of the hypertext markup language in the hypertext markup language document (namely, the corresponding sections in the hypertext markup language form of the directory are positioned).
Specifically, positioning data of each section in an associated hypertext markup language (html) form is nested in the directory, and the execution main body can split the full-text html obtained by the positioning data of each section nested in the directory, so as to extract a section html fragment in the full-text html.
And generating a corresponding directory tree according to the directory and the subdocuments.
Specifically, generating a corresponding directory tree according to the directory and the sub-document includes: and constructing a directory tree by taking the directory as a root node and taking each subdocument corresponding to the directory as a child node corresponding to the root node.
For example, in generating a directory tree, an execution principal may use an open source tool to complete the conversion of word to full html for a history document. Then, the catalog and chapters of the historical document can be obtained, the catalog is sequentially coded in a title hierarchy, for example, the first-level titles 1, 2 and 3 are stored, and the first section 1.1 under the first-level titles are stored in a sequential manner. And then splitting the complete html into a chapter fragment html. And after a mapping relation is established between the directory and the corresponding chapter section html, the mapping relation is stored, and a directory tree is further generated.
Step S102, responding to the operation of the user on the tree node in the directory tree, and determining the corresponding operation type.
When the execution main body detects an operation (the operation can be a click operation or a drag operation) of a user on a tree node (which can be a directory node, a chapter node and the like) in a directory tree corresponding to a certain historical document (namely a target historical document) in the historical documents displayed in the plug-in area of the editor, the corresponding operation type is determined. The operation types may include a click operation and a drag operation. The clicking operation can correspond to a preview effect, and the dragging operation can correspondingly add html corresponding to the tree node to the document being edited.
And step S103, calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document.
The user selects a target historic document (for example, historic document 2) from the historic documents (historic document 1, historic document 2, … and historic document n) displayed in the plug-in area of the editor, the execution main body responds to the selection operation of the user, and accordingly, the user is judged to be possible to preview the content corresponding to each node in the directory tree corresponding to the selected target historic document (namely, the directory and each section corresponding to the target historic document). The execution body may then present the parsed catalog and sections of the selected historic document in a preview. And then when the execution main body detects the dragging operation of the user on the nodes in the displayed directory tree, the full-text html or chapter html fragments corresponding to the detected user-dragged nodes can be obtained and embedded into the html page being edited, so that the effect of collaborative editing is achieved. And fusing the html page being edited with the full-text html or chapter html fragment dragged into the html page, and generating the finally required target document. The target document may be a report or a paper, and the specific content and form of the target document are not limited in this application.
The embodiment generates a corresponding directory tree by calling the historical document; responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type; and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document. Therefore, the history document can be used for being consulted by a user, and can also provide a function of quoting and editing, and the history document to be edited is correspondingly quoted and edited according to the operation of the user on the directory or the chapter of the history document (such as clicking or dragging operation on each node in the tree node of the directory tree), so that the document editing efficiency and accuracy are improved.
Fig. 2 is a schematic main flow diagram of a document editing method according to a second embodiment of the present application, and as shown in fig. 2, the document editing method includes:
step S201, a history document is called, and a corresponding directory tree is generated.
Step S202, responding to the operation of the user on the tree node in the directory tree, and determining the corresponding operation type.
Step S203, calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user, and generating a target document.
The principle of step S201 to step S203 is similar to that of step S101 to step S103, and is not described here again.
Specifically, step S203 can also be realized by step S2031 to step S2033:
the web page editor may specifically include a toolbar area, a current edited document information area, a current edited document outline area, an editing area, and a plug-in area.
Specifically, the toolbar area: the tool bar similar to word contains character appearance, document operation buttons and the like. Current editing document information area: the method is used for displaying the document properties of the current edited document name, the author and the like. Currently editing the outline area of the document: for editing the current document outline synopsis. Editing area: and a current document text editing area. A plug-in area: the method comprises the steps of containing multi-type draggable contents, displaying historical documents below an area of a retrieval area in a plug-in area in a page-able mode, enabling each historical document to be capable of expanding a directory structure, and providing a preview button for a user to click to preview.
Step S2031, in response to the determination that the operation type is the click operation, displaying the rendered document corresponding to the tree node clicked by the user.
When detecting that the operation type of the user on the directory tree of the historical document is click operation, namely clicking a tree node in the directory tree, the execution main body can display the rendered document corresponding to the tree node clicked by the user. The rendered document may be, for example, a preview display document generated by the front-end browser based on a json-format directory or html-format chapter or html-format full-text of the historic document corresponding to the tree node clicked by the user. The execution body can pop up a rendered document corresponding to the tree node clicked by the user in a popup mode.
Step S2032, in response to the determination that the rendered document is matched with the document to be edited, embedding the tree node clicked by the user into the target position of the document to be edited so as to edit the document to be edited.
When the execution body receives feedback of the user on the presented rendered document, for example, it is detected that the user clicks a confirmation button control, and the user clicks the confirmation button control to indicate that the user considers that the rendered document is matched with the document to be edited and wants to refer to the rendered document to edit the document to be edited. The executing agent may drag and embed the tree node clicked by the user to the target position of the document to be edited, so as to edit the document to be edited. Specifically, the target position may be a position of the document to be edited for placing the externally referenced content.
Step S2033, in response to the determination that the operation type is the dragging operation, embedding the tree node dragged by the user into the target position of the document to be edited so as to edit the document to be edited.
When the dragging operation of the user on the node in the directory tree of the historical document is directly monitored by the execution subject, the tree node can be directly dragged to the target position of the document to be edited without previewing so as to edit the document to be edited.
The history document of the embodiment can be used for being referred by a user, and can also provide a function of reference editing, and the history document to be edited is correspondingly referred to according to the operation of the user on the directory or the chapter of the history document (for example, the clicking or dragging operation on each node in the tree nodes of the directory tree), so that the document editing efficiency and accuracy are improved. Through a document analysis mode, on the premise of realizing collaborative editing, the cost of collaborative editing is reduced, and the working efficiency is improved. The collaborative editing can be that each person of a plurality of persons is responsible for writing a part of documents, then one person unifies versions, and the specific operation mode can be that each person only changes the same file for many times, after submitting, the file can be browsed to the plug-in area by the collaborators, and the collaborative requirements can be realized by establishing a new document and dragging the segment to the editing area.
Fig. 3 is a schematic view of an application scenario of a document editing method according to a third embodiment of the present application. The document editing method can be applied to a scene of document editing based on a historical document. As shown in FIG. 3, server 302 invokes historic document 301, which in turn generates a corresponding directory tree 304. The server 302 determines a corresponding operation type (e.g., preview operation or drag operation) in response to a user operation on the tree node D, A, B, C in the directory tree 304. The server 302 calls the web page editor 303 to edit the document to be edited 305 according to the operation type (e.g., whether the operation is a preview operation or a drag operation) and the tree node (e.g., any one or more of D, A, B, C, where the tree node D may be a directory and the tree node A, B, C may be a chapter corresponding to the directory) operated by the user, so as to generate the target document 306. The collaborative editing can be that each person of a plurality of persons is responsible for writing a part of documents, then one person unifies versions, and the specific operation mode can be that each person only changes the same file for many times, after submitting, the file can be browsed to the plug-in area by the collaborators, and the collaborative requirements can be realized by establishing a new document and dragging the segment to the editing area. Through a document analysis mode, on the premise of realizing collaborative editing, the cost of collaborative editing is reduced, and the working efficiency is improved.
Fig. 4 is a schematic diagram of main blocks of a document editing apparatus according to an embodiment of the present application. As shown in fig. 4, the document editing apparatus includes a directory tree generation unit 401, an operation type determination unit 402, and an editing unit 403.
A directory tree generation unit 401 configured to call the history document and generate a corresponding directory tree;
an operation type determining unit 402 configured to determine a corresponding operation type in response to an operation of a user on a tree node in the directory tree;
and an editing unit 403 configured to invoke the web page editor to edit the document to be edited according to the operation type and the tree node operated by the user, so as to generate a target document.
In some embodiments, the directory tree generation unit 401 is further configured to: analyzing the historical document to obtain a corresponding directory; calling an open source tool, and analyzing the historical document into a hypertext markup language document; splitting the hypertext markup language document based on the directory, and determining a subdocument corresponding to the directory; and generating a corresponding directory tree according to the directory and the subdocuments.
In some embodiments, the directory tree generation unit 401 is further configured to: and analyzing the historical document, acquiring corresponding sub-document positioning data, and generating a json-format directory based on the sub-document positioning data.
In some embodiments, the directory tree generation unit 401 is further configured to:
and positioning the hypertext markup language sub-documents corresponding to the directory in the hypertext markup language document according to the sub-document positioning data in the directory.
In some embodiments, the directory tree generation unit 401 is further configured to: and constructing a directory tree by taking the directory as a root node and taking each subdocument corresponding to the directory as a child node corresponding to the root node.
In some embodiments, the editing unit 403 is further configured to: in response to the fact that the operation type is determined to be clicking operation, displaying a rendered document corresponding to the tree node clicked by the user; and in response to the fact that the rendered document is matched with the document to be edited, embedding the tree node clicked by the user into the target position of the document to be edited so as to edit the document to be edited.
In some embodiments, the editing unit 403 is further configured to: and in response to the fact that the operation type is determined to be the dragging operation, embedding the tree node dragged by the user into the target position of the document to be edited so as to edit the document to be edited.
It should be noted that, in the document editing method and the document editing apparatus of the present application, the implementation contents have corresponding relationships, and therefore, the description of the duplicated contents is omitted.
Fig. 5 illustrates an exemplary system architecture 500 to which the document editing method or the document editing apparatus of the embodiments of the present application may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices that are document editing processing screens and support web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a backend management server (for example only) that processes history documents invoked by users using the terminal devices 501, 502, 503. The background management server can call the historical document to generate a corresponding directory tree; responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type; and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document. Therefore, the history document can be used for being consulted by a user, and can also provide a function of quoting and editing, and the history document to be edited is correspondingly quoted and edited according to the operation of the user on the directory or the chapter of the history document (such as clicking or dragging operation on each node in the tree node of the directory tree), so that the document editing efficiency and accuracy are improved.
It should be noted that the document editing method provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the document editing apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a terminal device of an embodiment of the present application. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the computer system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a signal processing section such as a Cathode Ray Tube (CRT), a liquid crystal credit authorization inquiry processor (LCD), and the like, and a speaker and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to embodiments disclosed herein, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a directory tree generation unit, an operation type determination unit, and an editing unit. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to invoke a history document to generate a corresponding directory tree; responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type; and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document.
According to the technical scheme of the embodiment of the application, the historical document can be used for being consulted by a user, a quote editing function can be provided, the corresponding quote historical document is edited according to the operation of the user on the directory or the chapter of the historical document (such as clicking or dragging operation on each node in the tree node of the directory tree), and therefore the document editing efficiency and accuracy are improved.
The above-described embodiments should not be construed as limiting the scope of the present application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method of document editing, comprising:
calling the historical document to further generate a corresponding directory tree;
responding to the operation of a user on tree nodes in the directory tree, and determining a corresponding operation type;
and calling a webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user to generate a target document.
2. The method of claim 1, wherein generating the corresponding directory tree comprises:
analyzing the historical document to obtain a corresponding directory;
calling an open source tool, and analyzing the historical document into a hypertext markup language document;
splitting the hypertext markup language document based on the directory, and determining a sub-document corresponding to the directory;
and generating a corresponding directory tree according to the directory and the sub-documents.
3. The method of claim 2, wherein obtaining the corresponding directory comprises:
and analyzing the historical document, acquiring corresponding subdocument positioning data, and generating a json-format directory based on the subdocument positioning data.
4. The method of claim 3, wherein determining the subdocuments corresponding to the directory comprises:
and positioning the hypertext markup language subdocuments corresponding to the directory in the hypertext markup language document according to the subdocument positioning data in the directory.
5. The method of claim 2, wherein the generating a corresponding directory tree from the directory and the sub-documents comprises:
and constructing a directory tree by taking the directory as a root node and taking each sub-document corresponding to the directory as a child node corresponding to the root node.
6. The method according to claim 1, wherein editing the document to be edited comprises:
in response to the fact that the operation type is determined to be clicking operation, displaying a rendered document corresponding to the tree node clicked by the user;
and in response to the fact that the rendered document is matched with the document to be edited, embedding the tree node clicked by the user into the target position of the document to be edited so as to edit the document to be edited.
7. The method according to claim 1, wherein editing the document to be edited comprises:
and in response to the fact that the operation type is determined to be the dragging operation, embedding the tree node dragged by the user into the target position of the document to be edited so as to edit the document to be edited.
8. A document editing apparatus, comprising:
the directory tree generation unit is configured to call the historical documents and further generate corresponding directory trees;
an operation type determination unit configured to determine a corresponding operation type in response to an operation of a user on a tree node in the directory tree;
and the editing unit is configured to call the webpage editor to edit the document to be edited according to the operation type and the tree node operated by the user so as to generate a target document.
9. The apparatus of claim 8, wherein the directory tree generation unit is further configured to:
analyzing the historical document to obtain a corresponding directory;
calling an open source tool, and analyzing the historical document into a hypertext markup language document;
splitting the hypertext markup language document based on the directory, and determining a sub-document corresponding to the directory;
and generating a corresponding directory tree according to the directory and the sub-documents.
10. The method of claim 9, wherein the directory tree generation unit is further configured to:
and analyzing the historical document, acquiring corresponding subdocument positioning data, and generating a json-format directory based on the subdocument positioning data.
11. An electronic device for document editing, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110837383.8A 2021-07-23 2021-07-23 Document editing method and device, electronic equipment and computer readable medium Pending CN113486635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110837383.8A CN113486635A (en) 2021-07-23 2021-07-23 Document editing method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110837383.8A CN113486635A (en) 2021-07-23 2021-07-23 Document editing method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN113486635A true CN113486635A (en) 2021-10-08

Family

ID=77943330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110837383.8A Pending CN113486635A (en) 2021-07-23 2021-07-23 Document editing method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113486635A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500562A (en) * 2021-12-24 2022-05-13 天翼云科技有限公司 Collaborative editing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195899A1 (en) * 2013-01-04 2014-07-10 International Business Machines Corporation Collaborative presentation of extracted information
CN109471838A (en) * 2018-10-19 2019-03-15 天津字节跳动科技有限公司 The operating method of Catalog Documents, device, electronic equipment, readable storage medium storing program for executing
CN110377884A (en) * 2019-06-13 2019-10-25 北京百度网讯科技有限公司 Document analytic method, device, computer equipment and storage medium
CN110442553A (en) * 2019-07-05 2019-11-12 平安国际智慧城市科技股份有限公司 File management method, device, computer equipment and storage medium
CN112100989A (en) * 2020-09-18 2020-12-18 深圳市大富网络技术有限公司 Document editing method, document editing system, and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195899A1 (en) * 2013-01-04 2014-07-10 International Business Machines Corporation Collaborative presentation of extracted information
CN109471838A (en) * 2018-10-19 2019-03-15 天津字节跳动科技有限公司 The operating method of Catalog Documents, device, electronic equipment, readable storage medium storing program for executing
CN110377884A (en) * 2019-06-13 2019-10-25 北京百度网讯科技有限公司 Document analytic method, device, computer equipment and storage medium
CN110442553A (en) * 2019-07-05 2019-11-12 平安国际智慧城市科技股份有限公司 File management method, device, computer equipment and storage medium
CN112100989A (en) * 2020-09-18 2020-12-18 深圳市大富网络技术有限公司 Document editing method, document editing system, and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500562A (en) * 2021-12-24 2022-05-13 天翼云科技有限公司 Collaborative editing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN107832045B (en) Method and apparatus for cross programming language interface conversion
US11694215B2 (en) Systems and methods for managing web content
US10467315B2 (en) Codeless sharing of spreadsheet objects
CN106682219B (en) Associated document acquisition method and device
CN107491488B (en) Page data acquisition method and device
CN111428177A (en) Method and system for WEB content generation
US8495485B2 (en) System, method, and apparatus for location identification of content
CN112286513A (en) Visual design method and device based on component metadata
US20060224397A1 (en) Methods, systems, and computer program products for saving form submissions
CN109829121B (en) Method and device for reporting click behavior data
KR102040999B1 (en) Linking web extension and content contextually
US20210081464A1 (en) Crawlability of single page applications
EP3357017A1 (en) Conversation and version control for objects in communications
CA3061623A1 (en) File sending in instant messaging applications
EP3274939A1 (en) Providing interactive preview of content within communication
CN113378579A (en) Method, system and electronic equipment for voice input of structured data
CN113486635A (en) Document editing method and device, electronic equipment and computer readable medium
US9990343B2 (en) System and method for in-browser editing
CN111782820A (en) Knowledge graph creating method and device, readable storage medium and electronic equipment
CN112800354B (en) Policy issuing and intelligent pushing method, system, equipment and medium
CN110874302A (en) Method and device for determining buried point configuration information
CN111176982A (en) Test interface generation method and device
JP2007115241A (en) SYSTEM, METHOD AND COMPUTER PROGRAM FOR TRANSFORMING SELECTED SECTION OF NETWORK, e.g. WEB DOCUMENT ACCESSED FROM NETWORK SITE, e.g. WEB SITE INTO E-MAIL MESSAGE
CN112905929A (en) Method, device, equipment and computer readable medium for saving webpage content
CN112800741A (en) Task execution method, electronic device and storage medium

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