CN112417827B - Method, device, electronic equipment and storage medium for on-line document editing and displaying - Google Patents

Method, device, electronic equipment and storage medium for on-line document editing and displaying Download PDF

Info

Publication number
CN112417827B
CN112417827B CN202011415093.6A CN202011415093A CN112417827B CN 112417827 B CN112417827 B CN 112417827B CN 202011415093 A CN202011415093 A CN 202011415093A CN 112417827 B CN112417827 B CN 112417827B
Authority
CN
China
Prior art keywords
data
middle layer
document
application
rendering
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
CN202011415093.6A
Other languages
Chinese (zh)
Other versions
CN112417827A (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.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN202011415093.6A priority Critical patent/CN112417827B/en
Publication of CN112417827A publication Critical patent/CN112417827A/en
Application granted granted Critical
Publication of CN112417827B publication Critical patent/CN112417827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/101Collaborative creation, e.g. joint development of products or services
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Strategic Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Economics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Document Processing Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method, a device, electronic equipment and a storage medium for on-line document editing and displaying, wherein the method comprises the following steps: acquiring document data from a server and initializing a document state, and judging whether a data unit is acquired or not; if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer; the data middle layer changes, a monitoring service is triggered, and the application is notified of updating; all data units of the data middle layer are acquired by application and are polled and judged whether the data units change or not; rendering all changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application; the actual document nodes are updated into the document view.

Description

Method, device, electronic equipment and storage medium for on-line document editing and displaying
Technical Field
The invention relates to the technical field of online document data processing, in particular to a method, a device, electronic equipment and a storage medium for realizing online document editing and displaying based on enterprise micro-letters.
Background
The enterprise WeChat is an enterprise communication and office tool created by the Tech WeChat team, has communication experience consistent with WeChat, rich OA application and the capability of connecting WeChat ecology, and can help the enterprise to connect inside, connect ecological partners and connect consumers. Professional collaboration, security management, person-to-service. At present, enterprise WeChat covers more than 50 industries of retail, education, finance, manufacturing industry, internet, medical treatment and the like, and intelligent solutions are continuously output to each industry. The enterprise WeChat is characterized by being safer in attention, being convenient to configure in application, and greatly ensuring the safety and convenience. Because the enterprise WeChat can only pay attention to members in the enterprise address book, the enterprise information security is ensured, and meanwhile, a plurality of third party office applications can be configured for one enterprise WeChat. And the transmission times are not limited, so that the information propagation is maximized. On the other hand, for small and medium-sized enterprises, the enterprise WeChat is opened, and third party applications such as meetings, reports, communities, care, voting, annual meeting and the like in the WeChat are included, so that communication and coordination among staff are enhanced, and the capabilities of various aspects such as enterprise culture construction, notice notification and knowledge management are improved. The novel breakthrough of enterprise WeChat in enterprise scene application is achieved by opening a mobile office new era, so that staff can work without boundaries. Paperless office is realized through the mobile terminal carried by staff, so that the office efficiency is improved, the administrative management cost is reduced in a humanized manner, and the workflow becomes more efficient.
The online document is a document which can be displayed, edited and cooperated by multiple persons in an enterprise WeChat, namely, a word document function is simulated in an enterprise WeChat webpage, and the online document is a product supporting cooperation, so that a user can edit the document on the webpage in real time, and the product often provides the capability of cooperatively positioning and displaying so as to mark the operating position of a cooperator and reduce conflict in the cooperation process.
With the wider and wider application of enterprise WeChat, the migration of traditional online documents into enterprise WeChat applications is an urgent need. In the traditional online document, after user operation is completed in an editing mode, the document node is directly modified and a document view is updated by the dot operation according to the user operation; in the display mode, the application directly utilizes the Dom operation to add all the document node data acquired by the server to the current document view. Such conventional online documents have the following disadvantages:
1. directly operating the Dom to edit the document is detrimental to achieving some complex functions.
2. All document nodes are stored in the server side and are integral, rather than small reusable units, and expansion is not facilitated.
3. During display, all nodes are directly inserted into the document, so that personalized display according to different requirements is not facilitated.
4. Support for collaborative editing is not friendly or even supportive.
Disclosure of Invention
Aiming at the technical problem of the traditional online document, the invention provides a method, a device, electronic equipment and a storage medium for realizing online document editing and displaying based on enterprise micro-letter.
In a first aspect, an embodiment of the present application provides a method for implementing online document editing and displaying based on enterprise micro-letter, including:
initializing: acquiring document data from a server and initializing a document state, and judging whether a data unit is acquired or not;
updating the data middle layer: if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer;
an application updating step; the data middle layer changes, a monitoring service is triggered, and an application is notified to update;
judging: the application acquires all the data units of the data middle layer and polls and judges whether the data units change or not;
rendering: rendering all changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application;
view updating step: updating the true document nodes into the document view.
The method for realizing online document editing and displaying based on enterprise micro-letter, wherein the initializing step further comprises the following steps:
and if the data unit is acquired, rendering the data unit into the real document node according to the rendering logic.
The method for realizing online document editing and displaying based on enterprise micro-letter comprises the following steps:
if the operation executed by the user is a new operation, the data middle layer creates a new data unit;
if the operation performed by the user is not the new operation, searching for the old data unit and updating according to the user operation.
The method for realizing online document editing and displaying based on enterprise micro-letter comprises the following steps:
if the data units are changed, all the changed data units in the data middle layer are rendered into the real document nodes according to the rendering logic;
if no data unit changes, the operation of the round is finished, and the next round of user operation is continued to be waited.
In a second aspect, an embodiment of the present application provides an apparatus for implementing online document editing and displaying based on enterprise micro-letter, including:
an initialization module: acquiring document data from a server and initializing a document state, and judging whether a data unit is acquired or not;
and a data middle layer updating module: if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer;
an application updating module; the data middle layer changes, a monitoring service is triggered, and an application is notified to update;
and a judging module: the application acquires all the data units of the data middle layer and polls and judges whether the data units change or not;
and a rendering module: rendering all changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application;
view update module: updating the true document nodes into the document view.
The device for realizing online document editing and displaying based on enterprise micro-letter, wherein the initialization module further comprises:
and if the data unit is acquired, rendering the data unit into the real document node according to the rendering logic.
The device for realizing online document editing and displaying based on enterprise micro-letter, wherein the data middle layer updating module comprises:
if the operation executed by the user is a new operation, the data middle layer creates a new data unit;
if the operation performed by the user is not the new operation, searching for the old data unit and updating according to the user operation.
The device for realizing online document editing and displaying based on enterprise micro-letter comprises:
if the data units are changed, all the changed data units in the data middle layer are rendered into the real document nodes according to the rendering logic;
if no data unit changes, the operation of the round is finished, and the next round of user operation is continued to be waited.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for online document editing presentation according to the first aspect described above when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of online document editing presentation as described in the first aspect above.
Compared with the prior art, the invention has the advantages and positive effects that:
1. the invention adds a data middle layer on the basis of the traditional online document logic to isolate user operation and bottom-layer Dom operation. Based on the data middle layer, the complex document fragments can be split into small data units which form the basis of complex functions such as collaborative editing, expansion, personalized display and the like. The user operation can modify the data units in the data middle layer, the application inside automatically completes the Dom operation according to the data units, the document view is rendered, complex operations such as collaborative editing can be realized, meanwhile, the performance cost caused by direct Dom operation can be optimized, and the application fluency is improved.
2. In different demand scenes, converting the data units into document nodes through different rendering logics and displaying the document nodes into a document view, so that personalized display is realized according to different demands.
Drawings
FIG. 1 is a schematic diagram of steps of a method for implementing online document editing and displaying based on enterprise micro-letter provided by the invention;
FIG. 2 is a flowchart of a method for implementing online document editing and displaying based on enterprise micro-letter according to an embodiment of the present invention;
FIG. 3 is a frame diagram of an apparatus for implementing online document editing and displaying based on enterprise micro-letter provided by the invention;
fig. 4 is a frame diagram of a computer device according to an embodiment of the present application.
Wherein, the reference numerals are as follows:
11. initializing a module; 12. a data middle layer updating module; 13. an application updating module; 14. a judging module; 15. a rendering module; 16. a view update module; 81. a processor; 82. a memory; 83. a communication interface; 80. a bus.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described and illustrated below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden on the person of ordinary skill in the art based on the embodiments provided herein, are intended to be within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the embodiments described herein can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar terms herein do not denote a limitation of quantity, but rather denote the singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein refers to two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The present invention will be described in detail below with reference to the embodiments shown in the drawings, but it should be understood that the embodiments are not limited to the present invention, and functional, method, or structural equivalents and alternatives according to the embodiments are within the scope of protection of the present invention by those skilled in the art.
Before explaining the various embodiments of the invention in detail, the core inventive concepts of the invention are summarized and described in detail by the following examples.
A data middle layer is added on the basis of traditional online document logic, and user operation and bottom-layer Dom operation are isolated. The user operation modifies the data units in the data middle layer, and the application automatically completes the Dom operation according to the data units and renders the document view.
Online document: the method can display, edit and cooperate documents in the enterprise WeChat, namely simulate word document functions in the enterprise WeChat webpage.
And (3) tag: referring to the most basic units in a document, e.g., an a-tag represents a hyperlink in a document.
Element (b): all tags in a document are elements.
And (3) node: all content in a document is a node, including tags, attributes, text, etc.
Doms: the document object model, a standard API for processing HTML and XML files, provides an access model for the entire document.
Dom operation: nodes in the document are manipulated such as found, created, deleted, replaced, inserted, copied, moved, etc.
Rendering: certain structured data is converted into nodes and added to the document view by the Dom operation.
Embodiment one:
referring to fig. 1, fig. 1 is a schematic diagram illustrating steps of a method for implementing online document editing and displaying based on enterprise micro-letter provided by the present invention. As shown in fig. 1, this embodiment discloses a specific implementation manner of a method for implementing online document editing and displaying based on enterprise micro-letter (hereinafter referred to as "method").
Specifically, the method disclosed in this embodiment mainly includes the following steps:
step S1: and acquiring document data from the server and initializing the document state, and judging whether a data unit is acquired.
In particular, an abstract layer of data intermediate layer is optimized between user operations and Dom operations, the data intermediate layer being composed of a plurality of data units for recording user operations. The document object model (Document Object Model, DOM for short) is a standard API for processing HTML and XML files. The DOM provides an access model for the entire document, with the document as a tree structure, with each node of the tree representing an HTML tag or text item within the tag. The DOM tree structure accurately describes the interrelationship between tags in an HTML document. The process of converting an HTML or XML document into a DOM tree is called parsing (parser). After the HTML document is parsed, the HTML document is converted into a DOM tree, so that the processing of the HTML document can be realized through the operation on the DOM tree. The DOM model not only describes the structure of the document, but also defines the behavior of node objects, and the nodes and the contents of the DOM tree can be conveniently accessed, modified, added and deleted by utilizing the method and the attribute of the objects, and the DOM nodes are divided into three main categories: element node, attribute node, text node.
Doms provide a structured representation of a document and define a way to access the structure from a program to change the structure, style and content of the document. The DOM parses a document into a set of structures that are composed of nodes and objects (objects that contain attributes and methods). Briefly, it will link web pages to script or programming languages.
A web page is a document. This document may be displayed in a browser window or as HTML source code. But in both cases the same document. The Document Object Model (DOM) provides another way to represent, store, and operate on the same document. The DOM is a complete object-oriented representation of a web page that can be modified using a scripting language such as JavaScript.
The Dom operation is an operation on a node in a document, such as find, create, delete, replace, insert, copy, move, etc.
Specifically, if the data unit is acquired, the data unit is rendered into a real document node according to rendering logic customized by application.
If the data unit is not acquired, executing step S2: and if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer.
Specifically, if the operation performed by the user is a new operation, the data middle layer creates a new data unit; if the operation performed by the user is not the new operation, searching for the old data unit and updating the old data unit according to the user operation.
Then step S3 is performed: and the data middle layer changes, the monitoring service is triggered, and the application is notified to update.
Specifically, during the running process of the online document, the application monitors the change of the data units in the data middle layer, when the user performs editing operation, the application modifies the corresponding data units in the data middle layer according to the operation of the user, and meanwhile, due to the monitoring, the data middle layer notifies the application to perform view update after the data units change.
Then step S4 is performed: the application acquires all the data units of the data middle layer and polls and judges whether the data units change or not.
Specifically, if there is a change in the data unit, step S5 is performed: rendering all changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application; if no data unit changes, the operation of the round is finished, and the next round of user operation is continued to be waited.
The rendering refers to converting certain structured data into nodes and adding the nodes into a document view through a Dom operation, and the rendering logic can customize different rendering logics according to user needs so as to realize personalized display.
Then step S6 is performed: and updating all the true document nodes into the document view.
So far, the user operation response flow of the round is ended, and the application continues to wait for the next round of user operation.
Next, please refer to fig. 2. Fig. 2 is a flow chart of an embodiment of a method for implementing online document editing and displaying based on enterprise micro-letter provided by the invention, and in combination with fig. 2, the application flow of the method is specifically described as follows:
1. and acquiring document data from the server and initializing the document state, judging whether a data unit is acquired at the moment, if so, executing the rendering node in the step 5, otherwise, waiting for user operation.
2. And the user executes the operation and calls the service provided by the data middle layer to update the data middle layer. If the operation is newly added, the data middle layer creates a new data unit, otherwise, the old data unit is searched and updated according to the user operation.
3. The data middle layer changes, and the monitoring service is triggered to inform the application of update.
4. And the application acquires all the data units of the data middle layer, polls and judges whether the data units are changed, if so, calls the rendering logic to render the corresponding node, otherwise, the round of operation is finished, and the next round of user operation is continued to be waited.
5. And rendering all the changed data units in the data middle layer into real document nodes according to the customized rendering logic.
6. And updating the newly generated document nodes into the document view to finish the view updating operation.
7. So far, the user operation response flow of the round is ended, and the application continues to wait for the next round of user operation.
During the running of the online document, the application monitors the change of the data units in the middle layer of data. When the user performs editing operation, the application modifies the corresponding data unit in the data middle layer according to the operation of the user, and meanwhile, due to the monitoring, the data middle layer notifies the application to perform view update after the data unit changes. In the process of updating the view, the application firstly judges whether the data unit of the data middle layer changes, and if so, the application calls the rendering logic to update the change to the document view. Thus, through the abstract data middle layer, user operation and Dom operation in the online document editing and showing process are isolated. Complex operations such as collaborative editing, personalized display and the like can be realized based on the data units of the operation data middle layer, meanwhile, the performance cost caused by direct Dom operation can be optimized, and the application fluency is improved.
Embodiment two:
in combination with the method for implementing online document editing and displaying based on enterprise micro-letter disclosed in the first embodiment, this embodiment discloses a specific implementation example of a device (hereinafter referred to as "device") for implementing online document editing and displaying based on enterprise micro-letter.
Referring to fig. 3, the apparatus includes:
initialization module 11: acquiring document data from a server and initializing a document state, and judging whether a data unit is acquired or not;
data middle layer update module 12: if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer;
an application update module 13; the data middle layer changes, a monitoring service is triggered, and an application is notified to update;
the judgment module 14: the application acquires all the data units of the data middle layer and polls and judges whether the data units change or not;
rendering module 15: rendering all changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application;
view update module 16: updating the true document nodes into the document view.
Specifically, in the initialization module 11, if the data unit is acquired, the data unit is rendered into the actual document node according to the rendering logic.
Specifically, in the data middle layer update module 12, if the operation performed by the user is a new operation, the data middle layer creates a new data unit; if the operation performed by the user is not the new operation, searching for the old data unit and updating according to the user operation.
Specifically, during the running process of the online document in the application update module 13, the application monitors the change of the data units in the data middle layer, when the user performs editing operation, the application modifies the corresponding data units in the data middle layer according to the user operation, and at the same time, due to the monitoring, the data middle layer notifies the application to perform view update after the data units change.
Specifically, in the judging module 14, if there is a change in the data unit, all the changed data units in the data middle layer are rendered into the actual document node according to the rendering logic; if no data unit changes, the operation of the round is finished, and the next round of user operation is continued to be waited.
Specifically, in the rendering module 15, rendering refers to converting some structured data into nodes and adding the nodes into a document view through a Dom operation, and the rendering logic may customize different rendering logic according to the needs of the user to implement personalized presentation.
Specifically, the view update module 16 invokes rendering logic to complete the view update operation, and the current round of user operation response flow ends, and the application continues to wait for the next round of user operation.
The technical scheme of the present embodiment, which is disclosed in the embodiment, is that the device for implementing online document editing and displaying based on enterprise micro-letter and the technical scheme of the rest same parts in the method for implementing online document editing and displaying based on enterprise micro-letter are disclosed in the embodiment, and are not described in detail herein.
Embodiment III:
referring to FIG. 4, this embodiment discloses a specific implementation of a computer device. The computer device may include a processor 81 and a memory 82 storing computer program instructions.
In particular, the processor 81 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 82 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 82 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, solid state Drive (Solid State Drive, SSD), flash memory, optical Disk, magneto-optical Disk, tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 82 may include removable or non-removable (or fixed) media, where appropriate. The memory 82 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 82 is a Non-Volatile (Non-Volatile) memory. In a particular embodiment, the Memory 82 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (Electrically Alterable Read-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be Static Random-Access Memory (SRAM) or dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory FPMDRAM), extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory EDODRAM), synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory SDRAM), or the like, as appropriate.
Memory 82 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 81.
The processor 81 reads and executes the computer program instructions stored in the memory 82 to implement the method of online document editing presentation of any of the above embodiments.
In some of these embodiments, the computer device may also include a communication interface 83 and a bus 80. As shown in fig. 4, the processor 81, the memory 82, and the communication interface 83 are connected to each other through the bus 80 and perform communication with each other.
The communication interface 83 is used to implement communications between various modules, devices, units, and/or units in embodiments of the present application. Communication port 83 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 80 includes hardware, software, or both, coupling components of the computer device to each other. Bus 80 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 80 may include a graphics acceleration interface (Accelerated Graphics Port), abbreviated AGP, or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (Micro Channel Architecture, abbreviated MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, abbreviated PCI) Bus, a PCI-Express (PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, abbreviated SATA) Bus, a video electronics standards association local (Video Electronics Standards Association Local Bus, abbreviated VLB) Bus, or other suitable Bus, or a combination of two or more of the foregoing. Bus 80 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
In addition, in conjunction with the method for online document editing and displaying in the above embodiments, embodiments of the present application may be implemented by providing a computer readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method of online document editing presentation in any of the above embodiments.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
In summary, the method has the beneficial effects that the data middle layer is added on the basis of the traditional online document logic, so that the user operation and the bottom-layer Dom operation are isolated. Based on the data middle layer, the complex document fragments can be split into small data units which form the basis of complex functions such as collaborative editing, expansion, personalized display and the like. The user operation can modify the data units in the data middle layer, the application interior automatically completes the Dom operation according to the data units, the document view is rendered, complex operations such as collaborative editing, personalized display and the like can be realized, meanwhile, the performance cost caused by direct Dom operation can be optimized, and the application smoothness is improved.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (6)

1. A method for online document editing and displaying, which is characterized by comprising the following steps based on an enterprise WeChat platform:
initializing: acquiring document data from a server and initializing a document state, and judging whether a data unit is acquired or not;
updating the data middle layer: if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer;
an application updating step; the data middle layer changes, a monitoring service is triggered, and an application is notified to update;
judging: the application acquires all the data units of the data middle layer and polls to judge whether the data units change, if no data units change, the round of operation is ended, and the next round of user operation is continued to be waited;
rendering: if the data units are changed, rendering all the changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application;
view updating step: updating the true document nodes into a document view;
wherein the initializing step further comprises: and if the data unit is acquired, rendering the data unit into the real document node according to the rendering logic.
2. The method for online document editing presentation of claim 1, wherein the data middle layer updating step comprises:
if the operation executed by the user is a new operation, the data middle layer creates a new data unit;
if the operation performed by the user is not the new operation, searching for the old data unit and updating according to the user operation.
3. An apparatus for online document editing and displaying, which is based on an enterprise WeChat platform, and comprises:
an initialization module: acquiring document data from a server and initializing a document state, and judging whether a data unit is acquired or not;
and a data middle layer updating module: if the data unit is not acquired, the user executes the operation and invokes the service provided by the data middle layer to update the data middle layer;
an application updating module; the data middle layer changes, a monitoring service is triggered, and an application is notified to update;
and a judging module: the application acquires all the data units of the data middle layer and polls to judge whether the data units change, if no data units change, the round of operation is ended, and the next round of user operation is continued to be waited;
and a rendering module: if the data units are changed, rendering all the changed data units in the data middle layer into real document nodes according to the rendering logic customized by the application;
view update module: updating the true document nodes into a document view;
wherein, the initialization module further comprises: and if the data unit is acquired, rendering the data unit into the real document node according to the rendering logic.
4. The apparatus for online document editing presentation of claim 3, wherein the data middle layer update module comprises:
if the operation executed by the user is a new operation, the data middle layer creates a new data unit;
if the operation performed by the user is not the new operation, searching for the old data unit and updating according to the user operation.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of online document editing presentation of any of claims 1 to 2 when the computer program is executed.
6. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of online document editing presentation as claimed in any of claims 1 to 2.
CN202011415093.6A 2020-12-07 2020-12-07 Method, device, electronic equipment and storage medium for on-line document editing and displaying Active CN112417827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011415093.6A CN112417827B (en) 2020-12-07 2020-12-07 Method, device, electronic equipment and storage medium for on-line document editing and displaying

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011415093.6A CN112417827B (en) 2020-12-07 2020-12-07 Method, device, electronic equipment and storage medium for on-line document editing and displaying

Publications (2)

Publication Number Publication Date
CN112417827A CN112417827A (en) 2021-02-26
CN112417827B true CN112417827B (en) 2024-03-01

Family

ID=74776322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011415093.6A Active CN112417827B (en) 2020-12-07 2020-12-07 Method, device, electronic equipment and storage medium for on-line document editing and displaying

Country Status (1)

Country Link
CN (1) CN112417827B (en)

Families Citing this family (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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408783A (en) * 2018-09-06 2019-03-01 广州城市信息研究所有限公司 Electronic document online editing method and system
CN110196971A (en) * 2019-04-23 2019-09-03 平安科技(深圳)有限公司 Online document edit methods, device, terminal device and storage medium
CN110728112A (en) * 2019-10-10 2020-01-24 腾讯科技(深圳)有限公司 Webpage document editing method, device, terminal and storage medium
CN110837349A (en) * 2019-11-08 2020-02-25 大连海事大学 Shared printer platform based on WeChat applet

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7499909B2 (en) * 2006-07-03 2009-03-03 Oracle International Corporation Techniques of using a relational caching framework for efficiently handling XML queries in the mid-tier data caching
US20150199307A1 (en) * 2012-08-08 2015-07-16 Google Inc. Pluggable Architecture For Optimizing Versioned Rendering of Collaborative Documents

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408783A (en) * 2018-09-06 2019-03-01 广州城市信息研究所有限公司 Electronic document online editing method and system
CN110196971A (en) * 2019-04-23 2019-09-03 平安科技(深圳)有限公司 Online document edit methods, device, terminal device and storage medium
CN110728112A (en) * 2019-10-10 2020-01-24 腾讯科技(深圳)有限公司 Webpage document editing method, device, terminal and storage medium
CN110837349A (en) * 2019-11-08 2020-02-25 大连海事大学 Shared printer platform based on WeChat applet

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
企业微信在移动化办公中的适用性研究;易佳;;数字技术与应用(第03期);全文 *

Also Published As

Publication number Publication date
CN112417827A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN104932889B (en) Page visualized generation method and device
CN104714982B (en) A kind of loading method and system of webpage
CN101122921B (en) Method forming tree-shaped display structure based on ajax and html
US9152619B2 (en) System and method for constructing markup language templates and input data structure specifications
US20070016593A1 (en) Methods and systems for providing semantic primitives
TWI661349B (en) Method and system for generating conversational user interface
US8495485B2 (en) System, method, and apparatus for location identification of content
CN112100550A (en) Page construction method and device
US20120072831A1 (en) Method for creating a multi-lingual web page
GB2423387A (en) Application-Generic Sequence Diagram Generator Driven by a Non-Proprietary Language
CN111611518A (en) Automatic visual display page publishing method and system based on Html5
CN114138372B (en) Front-end component loading method and device
US11334644B2 (en) Methods and systems for three-way merges of object representations
CN113110829B (en) Multi-UI component library data processing method and device
CN113010471A (en) File conversion method, file conversion device, storage medium and electronic equipment
CN112417827B (en) Method, device, electronic equipment and storage medium for on-line document editing and displaying
US20050149862A1 (en) System and method for context sensitive content management
US8862976B1 (en) Methods and systems for diagnosing document formatting errors
CN116048517B (en) API (application program interface) generating method, system and device based on B/S (browser/Server) architecture application system
US8082496B1 (en) Producing a set of operations from an output description
CN117111909A (en) Code automatic generation method, system, computer equipment and storage medium
CN116578795A (en) Webpage generation method and device, storage medium and electronic equipment
CN115169292A (en) Document processing method and device, electronic equipment and computer readable storage medium
CN114968917A (en) Method and device for rapidly importing file data
CN114968235A (en) Page form generation method and device, computer equipment 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
GR01 Patent grant
GR01 Patent grant