WO2022184007A1 - 页面内容的连接、文档同步、文档处理方法、装置及设备 - Google Patents

页面内容的连接、文档同步、文档处理方法、装置及设备 Download PDF

Info

Publication number
WO2022184007A1
WO2022184007A1 PCT/CN2022/078214 CN2022078214W WO2022184007A1 WO 2022184007 A1 WO2022184007 A1 WO 2022184007A1 CN 2022078214 W CN2022078214 W CN 2022078214W WO 2022184007 A1 WO2022184007 A1 WO 2022184007A1
Authority
WO
WIPO (PCT)
Prior art keywords
document
content block
content
node
block
Prior art date
Application number
PCT/CN2022/078214
Other languages
English (en)
French (fr)
Inventor
何伟鹏
张恒宇
韦宗延
谢广平
陈学家
陈伟
Original Assignee
北京字跳网络技术有限公司
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
Priority claimed from CN202110227813.4A external-priority patent/CN114996230A/zh
Priority claimed from CN202110226979.4A external-priority patent/CN114996216A/zh
Priority claimed from CN202110226980.7A external-priority patent/CN114995720A/zh
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Priority to US18/548,654 priority Critical patent/US20240143555A1/en
Publication of WO2022184007A1 publication Critical patent/WO2022184007A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/93Document management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/134Hyperlinking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/197Version control

Definitions

  • the embodiments of the present disclosure relate to the technical field of information processing and computer document data processing, and in particular, to a method, device, device, and readable medium for connecting page content, a method, device, device, and medium for synchronizing a document, a tree-structure-based method Document processing methods, apparatus, devices and media.
  • a link of another page is usually embedded in one page, so that the other page can be accessed through the link, and the corresponding reference content can be found in the other page, which is inconvenient to view.
  • Documents that are collaboratively processed online may have complex requirements for multiple users to view, edit, or refer to each other's content. How to effectively implement the synchronous update of each document, taking into account the cost of front-end and back-end cooperation, and how to effectively manage multiple users It is the research direction of related technologies to maintain the accuracy and consistency of documents.
  • embodiments of the present disclosure provide a method, apparatus, device, and readable medium for processing page content, which realizes the connection between different page content blocks, simplifies the viewing complexity of page content connection, and improves page content connection. flexibility.
  • an embodiment of the present disclosure provides a method for processing page content, the method comprising:
  • connection identifier of the other party's content block at the associated position of the target content block and one of the connected content blocks, so as to view the other party's content block by using the connection identifier.
  • an embodiment of the present disclosure provides an information processing method, the method comprising:
  • connection relationship In response to the connection operation of connecting the first content block and the second content block, recording the connection attribute information of the first content block and the second content block in the connection attribute information of the first content block and the connection attribute information of the second content block. connection relationship;
  • connection attribute information of the first content block In response to a connected content block output request for a first content block, looking up connection attribute information of the first content block to determine a content block connected to the first content block;
  • an embodiment of the present disclosure provides an apparatus for processing page content, the apparatus comprising:
  • connection response module configured to determine the connection content block of the target content block in response to the connection operation of the target content block in the current page
  • the content connection module is configured to display the connection identifier of the other content block at the associated position of the target content block and one of the connected content blocks, so as to view the other content block by using the connection identifier.
  • an information processing device comprising:
  • a connection relationship recording module configured to record the first content in the connection attribute information of the first content block and the connection attribute information of the second content block in response to a connection operation of connecting the first content block and the second content block the connection relationship between the block and the second content block;
  • a connected content search module configured to, in response to a connected content block output request of the first content block, search for connection attribute information of the first content block to determine a content block connected to the first content block;
  • a connected content output module configured to acquire content data information of a content block connected to the first content block, and output the content data information.
  • an embodiment of the present disclosure further provides a computer device, the device comprising:
  • processors one or more processors
  • memory for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing page content as described in any embodiment of the present disclosure, or, implement the method as described in this disclosure
  • the information processing method described in any of the embodiments is disclosed.
  • an embodiment of the present disclosure provides a readable medium on which a computer program is stored, and when the program is executed by a processor, implements the method for processing page content as described in any embodiment of the present disclosure, or implements An information processing method as described in any embodiment of the present disclosure.
  • the embodiments of the present disclosure provide a method, apparatus, device, and readable medium for processing page content.
  • the page is built by means of content blocks, and the connection content of the target content block is determined in response to the connection operation of the target content block in the current page. block, and then display the connection identifier of the other content block at the associated position of one of the target content block and the connected content block, so as to realize the connection between the target content block and the connected content block, and avoid the link between the page and the original page.
  • the connection is established between the two parties, it is impossible to directly view the required reference content and requires a second jump to view the problem.
  • the connection logo displayed at the associated position of the content block of either party the content block of the other party can be directly viewed without going through the original page. Jump viewing, which simplifies the viewing complexity of viewing part of the content of another page within one page, and improves the flexibility of page content processing.
  • Embodiments of the present disclosure also provide a document synchronization method, apparatus, device, and medium, which realize the synchronization update of each document.
  • an embodiment of the present disclosure provides a method for synchronizing a document, the method comprising:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, the document node and
  • the parent-child relationship between the content block nodes represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence, and the document version identification is used to represent the update of the content block belonging to the document;
  • the updated content is provided to the client for the client to update the content object.
  • an embodiment of the present disclosure further provides a method for synchronizing a document, the method comprising:
  • a content update request is sent to the server to request the server to determine the document content according to the document version identifier of the content update request; wherein the document includes at least one content block, and the tree structure It includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block; the document node records a document version identification sequence, and the document version identification is used to represent Updates of content blocks attributed to the document;
  • the entity content is acquired to the client.
  • an embodiment of the present disclosure further provides a document synchronization device, including:
  • a first monitoring module configured to monitor the update state of the document according to the document version identifier of the document node in the document tree structure; wherein, the document includes at least one content block, and the tree structure includes a document node and a content block node, the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block; the document node records a document version identification sequence, and the document version identification is used to represent the content belonging to the document update of the block;
  • a first determining module configured to determine a client that subscribes to the content object in the room when monitoring the update of the content object in the room; wherein the content object includes a document;
  • the sending module is configured to provide the updated content to the client according to the updated content of the content object in the room, so that the client can update the content object.
  • an embodiment of the present disclosure further provides a document synchronization device, the device comprising:
  • a request sending module configured to send a content update request to the server for the current processing document of the client, so as to request the server to determine the content of the document according to the document version identifier of the content update request;
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block;
  • the document node records a document version identification sequence, the document version identifier is used to characterize updates of content blocks attributed to the document;
  • a version identification obtaining module used for obtaining the document version identification fed back by the server and the content block version identification of the content block belonging to the document;
  • a content acquisition module configured to acquire entity content to the client according to the document version identifier and the content block version identifier.
  • an embodiment of the present disclosure further provides a document synchronization device, including:
  • processors one or more processors
  • memory for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the document synchronization method according to any one of the embodiments of the present disclosure.
  • an embodiment of the present disclosure further provides a medium, where the medium stores a computer program, and when the computer program is executed by a processor, implements the document synchronization method according to any one of the embodiments of the present disclosure.
  • the update state of the document is monitored uniformly through the document version identifier of the document node, and when the update of the content object in the room is monitored, the updated content of the content object in the room is provided to the subscribed content in the room. All clients of the object, so that the client can update the content object.
  • the monitoring pressure on the server is effectively reduced, thereby reducing service costs. Based on the monitoring pressure of the terminal, the synchronous update of online documents is effectively realized.
  • Embodiments of the present disclosure also provide a tree structure-based document processing method, apparatus, device, and medium, so that online collaboratively processed documents meet various operational requirements.
  • an embodiment of the present disclosure provides a document processing method based on a tree structure, including:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node
  • the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the The document node records a sequence of document version identifiers
  • the content block node records a sequence of content block version identifiers
  • the document version identifiers are used to represent updates of content blocks belonging to the document.
  • an embodiment of the present disclosure further provides a document processing apparatus based on a tree structure, including:
  • the first acquisition module is used to acquire document operation events of the current document
  • a first determining module configured to determine the corresponding document node and/or content block node in the tree structure of the current document according to the document operation event
  • an execution module configured to execute the document operation event according to the correspondence between the document version identifier of the document node and the content block version identifier of the content block node;
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node
  • the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the The document node records a sequence of document version identifiers
  • the content block node records a sequence of content block version identifiers
  • the document version identifiers are used to represent updates of content blocks belonging to the document.
  • an embodiment of the present disclosure further provides a document processing device based on a tree structure, including:
  • processors one or more processors
  • memory for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the tree structure-based document processing method according to any one of the embodiments of the present disclosure.
  • an embodiment of the present disclosure further provides a medium, where the medium stores a computer program, and when the computer program is executed by a processor, implements the tree structure-based tree structure according to any one of the embodiments of the present disclosure.
  • Document processing method when the computer program is executed by a processor, implements the tree structure-based tree structure according to any one of the embodiments of the present disclosure.
  • the corresponding relationship between the document version identifier of the document node and the content block version identifier of the content block node can be directly obtained.
  • the document operation event is performed on the content block nodes of all content block version identifiers corresponding to the document version identifier, which realizes the unified operation on the current document and improves the convenience of the user's operation on the current document.
  • FIG. 1A shows a flowchart of a method for processing page content provided by an embodiment of the present disclosure
  • FIG. 1B shows a schematic interface diagram of a page content connection process provided by an embodiment of the present disclosure
  • FIG. 2A shows a flowchart of another method for processing page content provided by an embodiment of the present disclosure
  • FIG. 2B shows a schematic interface diagram of another page content connection process provided by an embodiment of the present disclosure
  • FIG. 3 shows a flowchart illustrating an information processing method provided by an embodiment of the present disclosure
  • FIG. 4 shows a schematic structural diagram of an apparatus for processing page content provided by an embodiment of the present disclosure
  • FIG. 5 shows a schematic structural diagram of an information processing apparatus provided by an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a tree structure of a document provided by an embodiment of the present disclosure.
  • FIG. 7 is a flowchart of a document synchronization method provided by an embodiment of the present disclosure.
  • FIG. 9 is a flowchart of another document synchronization method provided by an embodiment of the present disclosure.
  • FIG. 10 is a schematic flowchart of document synchronization using room update provided by an embodiment of the present disclosure.
  • FIG. 11 is a flowchart of still another document synchronization method provided by an embodiment of the present disclosure.
  • FIG. 12 is a schematic flowchart of a document synchronization utilizing heartbeat provided by an embodiment of the present disclosure
  • FIG. 13 is a schematic flowchart of another implementation of document synchronization using heartbeat provided by an embodiment of the present disclosure
  • Fig. 15 is a kind of schematic flow chart of updating a document using complementation provided by an embodiment of the present disclosure
  • 16 is a structural block diagram of a document synchronization apparatus provided by an embodiment of the present disclosure.
  • 17 is a flowchart of a method for processing documents based on a tree structure provided by an embodiment of the present disclosure
  • FIG. 18 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure
  • FIG. 19 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure.
  • FIG. 20 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure
  • FIG. 21 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure
  • FIG. 22 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure
  • FIG. 23 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure.
  • FIG. 24 is a flowchart of a document processing method based on a tree structure provided by an embodiment of the present disclosure
  • 25 is a schematic diagram of a document tree structure provided by an embodiment of the present disclosure.
  • 26 is a structural block diagram of a document processing apparatus based on a tree structure provided by an embodiment of the present disclosure
  • FIG. 27 is a structural block diagram of a device provided by an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1A shows a flowchart of a method for processing page content provided by an embodiment of the present disclosure, and the embodiment of the present disclosure is applicable to a situation where a certain content in any page needs to be described collaboratively by connecting other content.
  • the connection processing method for page content provided by the embodiment of the present disclosure may be executed by the device for processing page content provided by the embodiment of the present disclosure. in the device.
  • the method for processing page content provided in the embodiment of the present disclosure may include the following steps:
  • the embodiment of the present disclosure adopts the method of defining content blocks to build each page, and the page can be a document page, a webpage page, or an application page, etc., which is not made in this embodiment. limited.
  • content blocks for recording various types of information in the page are set according to the contextual relationship between the various contents in the page.
  • the content block can be each paragraph, table, picture, or work objects in different stages of the same project process, etc., so that content blocks can be used in the page to produce and organize various types of content that meet user needs. page content.
  • connection content block of the target content block is determined based on the content block selection operation performed according to the connection requirement.
  • the connected content block in this embodiment may be other content blocks in the current page except the target content block, or may be content blocks in other pages except the current page. That is, the target content block and the reference content block can be in the same page or in different pages.
  • this embodiment does not limit the attributes, content types, and classification labels of target content blocks and connected content blocks, which may be content block connections under the same attribute or type, or content block connections under different attributes or types. For example, the connection between goals and objectives within the same project process, the connection between goals and tasks (todo), and the connection between paragraphs and tables, etc.
  • connection content block is of the same or different content type as the target content block
  • content type of the content block may include at least one of the following: a text-type content block, a multimedia-type content block, a table-type content block, and a program-type content block.
  • the content blocks of the multimedia type may be pictures, gifs, audio and video, etc. In this case, the richness of the content connection can be improved.
  • S120 Display the connection identifier of the other content block at the associated position of the target content block and one of the connected content blocks, so as to use the connection identifier to view the other content block.
  • a connection identifier may be used between the target content block and the connection content block. establish a corresponding connection.
  • the connection identifier of the connected content block may be displayed at the associated position of the target content block, and the connection identifier of the target content block may be displayed at the associated position of the connected content block.
  • a bidirectional connection can be established between the target content block and the connection content block, that is, either party in the target content block and the connection content block can view the specific content of the other party through the connection
  • the connection identifier displayed at the associated position of the target content block is triggered in the current page, for example, the user drags the mouse to hover over the connection identifier, or the user clicks the connection identifier, etc.
  • the connection identifier will be displayed directly on the current page.
  • the pointed specific content of the connected content block enables the user to directly view the connected connected content block at the associated position of the target content block.
  • the link identifier can ensure that the specific content of the link can be viewed in the current page.
  • both the target content block and the connected content block can view the content of the other party through the connection identifiers at their respective associated positions, which is only unidirectional compared to web page hyperlinks and other methods. The viewing efficiency of this embodiment is higher compared to connection and content viewing.
  • connection identifier of the target content block when the user triggers the connection identifier of the target content block displayed at the associated position of the connected content block on the page where the connected content block is located, the connection identifier of the target content block will also be directly displayed on the page where the connected content block is located.
  • the specific content of the pointed target content block enables the user to directly view the corresponding connected target content block under the connected content block, thereby ensuring quick viewing between the target content block and the connected content block.
  • connection identifier of the other content block displayed at the associated position of one of the target content block and the connected content block may be displayed permanently, or may be triggered by the user. Operation display.
  • the connection identifier is usually hidden, and only when the user clicks on the target content block in the current page, the connection identifier of the connection content block will be displayed at the associated position of the target content block.
  • the connection identification in this embodiment may be implemented by an icon (icon), or may be any triggerable mark, which is not limited in this embodiment.
  • connection direction in the target content block and the connection content block that is, to accurately determine whether the target content block is actively connected to the connection content block, or the connection content block is actively connected to the target content block
  • the target content block and the connection identifiers displayed at the associated positions of the connection content blocks are distinguished, and the connection identifiers are divided into two types: active connection identifiers and passive connection identifiers.
  • displaying the connection identifier of the other content block at the associated position of the target content block and either of the connected content blocks may be specifically: displaying the active link connected to the connected content block at the associated position of the target content block
  • the connection identifier is used to view the connected content block by using the active connection identifier in the current page; the passive connection identifier connected by the target content block is displayed at the associated position of the connected content block, so as to utilize the passive connection in the page where the connected content block is located Identifies the target content block to view.
  • connection identifiers are displayed respectively at the associated positions of the target content block and the connected content block.
  • FIG. 1B the connection direction between the target content block and the connection content block is represented.
  • an active connection identifier is displayed at the associated position of the target content block, indicating that the target content block is actively connected to other content blocks, and the specific content of the corresponding connected content block can be viewed in the current page by triggering the active connection identifier.
  • the passive connection identifier is displayed at the associated position of the connected content block to indicate that the connected content block is referenced by other content blocks, and the corresponding target content block can be viewed by triggering the passive connection identifier on the page where the connected content block is located. specific content.
  • the active connection mark and the passive connection mark in this embodiment can be distinguished by the mark style, such as color, shape, etc., or by the position of the mark in the content block, for example, the active connection mark can be located in the content block. Above the content block, while the passive connection indicator can be below the content block.
  • a page is built by means of content blocks, and in response to the connection operation of the target content block in the current page, the connection content block of the target content block is directly determined, and then the connection content block of the target content block and the connection content block are directly determined.
  • the connection identifier of the other content block is displayed at the associated position of one of the content blocks, so as to realize the connection between the target content block and the connected content block, and avoid the inability to directly view all the content when the connection is established between the page and the original page.
  • the required reference content requires a second jump to view the problem.
  • the content block of the other party can be directly viewed through the connection logo displayed at the associated position of the content block of either party, without the need to jump through the original page to view it, thus simplifying the viewing complexity of viewing part of the content of another page in one page and improving the page Flexibility in content processing.
  • in this embodiment in response to the connection operation of the target content block in the current page, before determining the connection content block of the target content block, further It may include: creating a target content block in the current page, and configuring a corresponding connection control for the target content block, so as to use the connection control to perform a connection operation.
  • each content block that meets the requirements to carry the information of each page will be created in the current page according to user requirements.
  • a corresponding connection control will be set directly for the target content block in the current page, and the connection control can be the alignment button set at the end of the target content block, etc.
  • the user can execute the connection operation of the target content block by triggering the connection control, such as clicking the connection control, to ensure the accurate execution of the connection operation of each content block in the current page.
  • FIG. 2A shows a flowchart of another method for connecting page content provided by an embodiment of the present disclosure.
  • This embodiment is optimized on the basis of each optional solution provided by the foregoing embodiment.
  • any content block created in the page can be connected by other content blocks, and can also be connected with other content blocks.
  • the connection identifier of the other content block is displayed at the associated position of the target content block and one of the connected content blocks, the content block of either side is displayed.
  • connection identifiers displayed at the associated position of the content block may include at least one or both of the following: 1) a passive connection identifier after the content block of either side is connected by other content blocks; 2) an active connection identifier after the content block of either side is connected to other content blocks Connection ID.
  • connection ID the specific determination process of the connected content block of the target content block and the specific processing process of the connection identifier displayed under any content block are mainly introduced in detail.
  • the method in this embodiment may include the following steps:
  • connection search interface when the user connects other content blocks to the target content block in the current page, the corresponding connection operation will be performed through the connection control configured for the target content block.
  • connection control configured for the target content block.
  • connection search interface in response to the connection operation of the target content block in the current page, as shown in FIG. Connection lookup interface.
  • the connection search interface may be set as a pop-up window, or may be set as a search page newly displayed on the upper layer of the current page, which is not limited in this embodiment.
  • connection search interface can search and display each content block related to this connection in the current page or other pages by entering specific connection information, and the user can filter the connection content block of the target content block from each content block, so as to Ensure the convenience of connecting content blocks within the page.
  • this embodiment will display more than one content block in the connection search interface, and the one or more content blocks displayed at this time may be the target content block.
  • the associated content block may also be a content block searched for in response to the input connection keyword after inputting the connection keyword.
  • the selected content block is used as the connected content block of the target content block.
  • more than one content block associated with the display target content block in the connection and search interface may be displayed content blocks that meet preset conditions, such as recently viewed content blocks, etc., or may be all content blocks. , such as switching between individual content blocks via scroll bars, etc.
  • a corresponding search box is set in the connection search interface, so that the user can input the specific information of the content block to be connected to the target content block in the search box, and quickly search for the corresponding connected content block in sequence.
  • the connection information in this embodiment is mainly a keyword that can indicate the content block to be connected to the target content block.
  • FIG. 2B by entering the connection keyword in the search box in the connection search interface, you can Each associated content block that meets the requirements of the connection keyword is found from each content block that has been generated in each page, and is displayed in the connection search interface.
  • the user selects the connected content block of the target content block from each associated content block by viewing the specific content of each displayed associated content block.
  • this embodiment can The connection content block of the target content block is directly determined to ensure the accuracy of the page content connection.
  • connection identifier of the content block of the other party at an associated position of the target content block and the content block of one of the connected content blocks, so as to view the content block of the other party by using the connection identifier.
  • the connection identifier displayed at the associated position of the target content block will have a passive connection identifier referenced by other content blocks. , and the active connection identifier after connecting other content blocks.
  • the preset operation in this embodiment can trigger each content block associated with the target content block to be displayed.
  • the preset operation may be a triggering operation of any connection identifier displayed at the associated position of the target content block, or may be a display mode switching operation, or triggering a preset operation control, or the like.
  • the target content block can be viewed. Associates the connected content blocks.
  • the associated connection may indicate two kinds of connection by the target content block and connection to the target content block.
  • this embodiment in response to the trigger operation of any connection identifier displayed at the associated position of the target content block, this embodiment will set the current page in the preset Each content block connected by the target content block and each content block connected to the target content block are displayed in the area.
  • each content block corresponding to the active connection identifier and the passive connection identifier displayed at the associated position of the target content block, and the display styles of the content blocks corresponding to the active connection identifier and the passive connection identifier may be different.
  • the actively connected and passively connected content blocks of the target content block may be displayed in partitions, or corresponding marks may be set respectively.
  • the preset area may be the sidebars of the current page in the up, down, left, and right directions, or the lower half display area or the upper half display area of the current page. In the sidebar of the current page, each content block of the target content block under different connection types can be displayed correspondingly according to the type of each connection identifier. .
  • the content block corresponding to the triggered reference icon in order to be able to directly view the content block corresponding to the triggered reference icon, when displaying each content block associated with the target content block in a preset area of the current page, it is also possible to analyze the content block corresponding to the triggered reference icon. content block, and then display only the content block corresponding to the triggered reference icon in the sidebar of the current page.
  • the specific method when displaying each content block associated with the target content block in the preset area of the current page, may be: viewing each connection relationship recorded in the connection attribute information of the target content block, Whether each content block associated with the target content block has been deleted is determined according to the deletion identifier corresponding to each connection relationship; the undeleted content block associated with the target content block is displayed in a preset area of the current page.
  • a connected content block may be deleted in the subsequent operation process.
  • the corresponding connection relationship may be recorded in the connection attribute information of the target content block and the connection content block, respectively, and the corresponding connection relationship may be marked with a deletion identifier corresponding to the connection relationship. Whether the connected content block has been deleted.
  • the deletion flag may be recorded in the connection attribute information of each content block, or may be recorded in another data area, which is not limited.
  • the recorded content block is firstly searched from the connection attribute information of the target content block.
  • Each connection relationship and then analyze whether each content block associated with the target content block marked by the deletion flag corresponding to each connection relationship is deleted, and then filter out the content blocks that have not been deleted, and display them in the preset on the current page. area, so as to avoid invalid display of each content block associated and connected to the target content block.
  • the target content block and the target content block in response to the connection operation of the target content block in the current page, after determining the connected content block of the target content block, the target content block and the target content block can be directly connected.
  • the connection relationship between the two is recorded in the connection attribute information of the connected content block, and the connection relationship between the target content block and one of the connected content blocks is set with the deletion flag of the other content block, and recorded in the connection
  • the connection attribute information corresponding to the relationship or other data areas. That is, under the connection relationship between the target content block and any one of the connected content blocks, the deletion flag is used to mark whether the other connected content block is deleted, and the connection is just started between the target content block and the connected content block.
  • the deletion identifier is "not deleted", and in response to the deletion operation of the target content block, the connection attribute information of the target content block The recorded connection relationship is used to find out each content block connected to the target content block, and then update the deletion flag set for the target content block for each of the found content blocks.
  • each content block connected to the target content block is determined according to each connection relationship recorded in the connection attribute information under the target content block, and when the connection is made In each connection relationship recorded in the connection attribute information under each content block, find out the connection relationship with the target content block, and then modify the corresponding deletion flag in the connection relationship to "Deleted" to ensure that The accuracy of content block connections.
  • the present embodiment may also target the connection type of the triggered connection identifier, such as the active connection identifier and the passive connection identifier, in the preset of the current page. Assume that each content block associated with the target content block under the connection category is displayed in the area. For example, the user-triggered connection identifier is an active connection identifier, then the preset area of the current page will display the content blocks that have been connected by the target content block, that is, Each active connection identifies all the corresponding content blocks.
  • the connection type of the triggered connection identifier such as the active connection identifier and the passive connection identifier
  • the preset area of the current page will display all the content blocks that have been connected to the target content block, that is, all the content blocks corresponding to each passive connection identifier; thus, the target content block will be displayed under the The content blocks corresponding to the active connection ID and the passive connection ID are displayed in batches.
  • each connection identifier displayed under the target content block in this embodiment will have a classification label matching the content block category associated with the connection identifier, and at this time, the connection content block and the target content block are displayed at the associated position.
  • the classification labels of the connection identifiers are the same or different.
  • the category label of the connection identification may include at least one of the following: target, task, report, and the project, task and report together form a project process.
  • displaying each content block associated with the target content block in the preset area of the current page may specifically be: in the preset area of the current page, filtering and displaying the target content block according to the classification label of the triggered reference icon Associates the connected content blocks.
  • connection identifier displayed at the associated position of the target content block
  • the user will first analyze the content block category associated with the triggered connection identifier. Then, the classification label of the connection identifier is determined, and then there is no need to display all the content blocks of the associated connection in the preset area of the current page, but each connection identifier of the associated connection of the target content block will be searched for the classification label.
  • Each content block associated with a specific connection identifier is displayed. For example, if the classification label of the connection identifier triggered by the user is the target type, the specific connection identifier belonging to the target type will be found from the connection identifiers displayed under the target content block, and then displayed in the preset area with the target type.
  • a specific connection of a type identifies the individual content block to which it is associated.
  • the user can display the content block in the preset area of the current page. , triggers the displayed content blocks associated with the target content block.
  • the user in response to a triggering operation of any content block displayed in the preset area, it is possible to directly jump from the current page to the page where the content block is located, thereby realizing a quick jump of page content connection.
  • you can directly jump from the current page to the location where the content block is located in the page where the content block is located, so as to quickly display the triggered content. content block.
  • the page is built by means of content blocks, and in response to the connection operation of the target content block in the current page, the connection content block of the target content block is determined, and then the connection content block between the target content block and the connection content block is determined.
  • the connection identifier of the other content block is displayed at the associated position of one of the content blocks, so as to realize the connection between the target content block and the connected content block, and avoid the inability to directly view the required content when the connection is established between the page and the original page. Refer to the connection content and need a second jump to view the problem.
  • connection identifier displayed at the associated position of the content block of either party, without jumping to the original page to view, thereby simplifying the viewing complexity of viewing part of the content of another page within one page.
  • a connection identifier is directly used to establish a connection relationship between two content blocks, so as to ensure that the synchronization change after the page content connection is improved, and the flexibility of the page content connection is improved.
  • FIG. 3 is a flowchart illustrating an information processing method provided by an embodiment of the present disclosure, and the embodiment of the present disclosure may be applicable to a situation where a certain content in any page needs to be described collaboratively by connecting other content.
  • An information processing method provided by an embodiment of the present disclosure may be executed by an information processing apparatus provided by an embodiment of the present disclosure, and the apparatus may be implemented in software and/or hardware, and integrated in a device that executes the method.
  • the method for connecting page content may include the following steps:
  • each content block in the page is allowed to be related to the content.
  • Corresponding connection relationships are established between the existing content blocks with certain content correlation between the blocks, so as to interpret the information of the content block in multiple directions, so as to facilitate the user to understand the content block more easily. Therefore, after entering the current page, if the user needs to connect between the first content block and the second content block, a corresponding connection operation will be performed between the first content block and the second content block. At this time, in order to ensure the accurate operation of the content block connection, there is a need to detect in real time whether the connection relationship between the first content block and the second content block has changed.
  • connection operation in response to the connection between the first content block and the second content block
  • the connection operation will record the connection relationship between the connection attribute information of the first content block and the connection attribute information of the second content block respectively, and pass the connection between the first content block and the second content block.
  • the deletion flag set corresponding to the connection relationship recorded in the connection attribute information indicates whether the content block of the other party is deleted in the subsequent operation process.
  • there is no need to delete each connection relationship related to the deleted content block so as to avoid the phenomenon of a large number of data processing operations when all the stored connection data need to be corrected continuously to delete the connection between different content blocks by means of write diffusion.
  • the data processing pressure when a connection related to the content block needs to be deleted after a certain content block is deleted is greatly reduced, and the error probability is reduced.
  • the deletion flag of the other content block may be correspondingly set in the connection attribute information or other data areas, to determine whether the other party's content block has been deleted. At this time, by judging whether the deletion identifier is "not deleted” or “deleted", the validity of the connection relationship is analyzed, and it can also be known whether the connection of the connected content block has been canceled.
  • first content block and the second content block are document content
  • this embodiment will also update the first content in the document structure.
  • the connection attribute information of the block and the second content block to ensure the consistency between the document structure and the connection of the content block.
  • the first content block and the second content block in this embodiment may belong to the same document or different documents, which is not limited.
  • a display request for the content block connected to the first content block may also be received.
  • a connected content block output request for the first content block will be received, and the output request may be a trigger operation on the connection identifier displayed at the associated position of the first content block, or a preset mode for displaying the connected content block.
  • connection attribute information of the first content block can be searched, and the connection attribute information is recorded with the connection relationship of each content block connected to the first content block, and through each connection Each content block connected to the first content block can be found out, and subsequently it is determined whether each content block connected to the first content block is deleted, so as to ensure the accuracy of the display of the content block.
  • S330 Acquire content data information of a content block connected to the first content block, and output the content data information.
  • the content data information of the content block can be found out.
  • the specific content block indicated by the corresponding deletion flag can be used to determine whether the content block is deleted.
  • the deletion flag set for each connected content block by the first content block may also be acquired, and the The deletion flag determines whether the connected content block is deleted, and then outputs the content data information of the content block when the content block connected to the first content block is not deleted. That is, if the content block connected to the first content block has been deleted, the content data information of the content block is "do not output content", so as to ensure the accuracy of the output display of the content block.
  • the first content block may also be deleted.
  • it is determined according to the connection attribute information of the first content block. connected content block, and update the deletion flag set for the first content block by the content block connected by the first content block. That is, each content block connected to the first content block is found through each connection relationship in the connection attribute information of the first content block, and then each content block connected to the first content block is identified by the first content block.
  • the set deletion flag is modified to "deleted", and the content data information of the first content block is modified to "do not output content", so as to ensure the display accuracy of subsequent connected content blocks.
  • a page is built by means of content blocks, and in response to the connection operation of connecting the first content block and the second content block, the connection attribute information of the first content block and the connection attribute information of the second content block are The connection attribute information records the connection relationship between the first content block and the second content block. Then, in response to the connected content block output request of the first content block, look up the connection attribute information of the first content block to determine the content block connected to the first content block, and obtain the content data information of the content block connected to the first content block , output content data information.
  • FIG. 4 shows a schematic structural diagram of an apparatus for processing page content provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure is applicable to the situation where a certain content in any page needs to be described collaboratively by connecting other content.
  • the apparatus can be implemented by software and/or hardware and integrated in a device for performing the method.
  • the apparatus for processing page content in the embodiment of the present disclosure may specifically include:
  • connection response module 410 is configured to determine the connection content block of the target content block in response to the connection operation of the target content block in the current page;
  • the content connection module 420 is configured to display the connection identifier of the other party's content block at the associated position between the target content block and one of the connected content blocks, so as to view the other party's content block by using the connection identifier.
  • a page is built by means of content blocks, and in response to the connection operation of the target content block in the current page, the connection content block of the target content block is directly determined, and then the connection content block of the target content block and the connection content block are directly determined.
  • the connection identifier of the other content block is displayed at the associated position of one of the content blocks, so as to realize the connection between the target content block and the connected content block, and avoid the inability to directly view the required content when the connection is established between the page and the original page.
  • the reference content requires a second jump to view the problem.
  • the content block of the other party can be viewed directly through the connection logo displayed at the associated position of the content block of either party, without the need to jump through the original page to view it, thereby simplifying the viewing complexity of viewing part of the content of another page in one page and improving the page Flexibility in content processing.
  • the above content connection module 420 can be specifically used for:
  • the passive connection identifier connected by the target content block is displayed at the associated position of the connected content block, so that the target content block can be viewed using the passive connection identifier in the page where the connected content block is located.
  • connection response module 410 can be specifically used for:
  • connection search interface In response to the connection operation of the target content block in the current page, the corresponding connection search interface is displayed;
  • More than one content block is displayed in the connection search interface, and in response to a selection operation on the one or more content blocks, the selected content block is determined as a connected content block of the target content block.
  • connection identifier displayed at the associated position of any one of the above-mentioned target content block and the content block of the connection content block includes at least one or two of the following:
  • connection device for the above-mentioned page content may also include:
  • a page jumping module configured to jump from the current page to the page where the content block is located in response to a trigger operation of any content block displayed in the preset area.
  • page jump module can be specifically used for:
  • connection display module can be specifically used for:
  • deletion identifier corresponding to the connection relationship is recorded in the connection attribute information or other data area of the content block specified by the connection relationship.
  • connection device for the above-mentioned page content may also include:
  • the connection relationship recording module is configured to record the connection relationship between the target content block and the connection attribute information of the connection content block respectively.
  • connection device for the above-mentioned page content may also include:
  • the content block deletion module is configured to, in response to the deletion operation of the target content block, determine the content block connected to the target content block according to the recorded connection relationship in the connection attribute information of the target content block, and update all the content blocks.
  • the determined content block is the deletion flag set for the target content block.
  • the above-mentioned preset area includes the sidebar of the current page, or the lower half display area, or the upper half display area, and the partitions in the preset area display the active connection and passive connection of the target content block. content block, and the content block corresponding to the connection identifier specified by the preset operation is highlighted.
  • each connection identifier displayed at the associated position of the above-mentioned target content block has a classification label associated with the connection identifier; correspondingly, the above-mentioned connection display module can be specifically used for:
  • each content block showing the associated connection of the target content block is filtered according to the classification label of the triggered connection identifier.
  • the above-mentioned current page includes a document.
  • connection device for the above-mentioned page content may also include:
  • a content block creation module configured to create the target content block in the current page, and configure a corresponding connection control for the target content block, so as to use the connection control to perform the connection operation.
  • the above-mentioned connected content blocks are other content blocks in the current page other than the target content block, or content blocks in other pages other than the current page.
  • connection content block and the target content block are the same or different, and the classification label of the connection identifier displayed at the associated position of the connection content block and the target content block is the same or different.
  • the content type of the content block includes at least one of the following:
  • Text-type content blocks multimedia-type content blocks, table-type content blocks, and program-type content blocks;
  • the classification labels include one or more of the following: goals, tasks, reports.
  • the device for processing page content provided by the embodiment of the present disclosure belongs to the same inventive concept as the method for processing page content provided by the above-mentioned embodiment.
  • This example has the same beneficial effects as the above-mentioned embodiment.
  • FIG. 5 shows a schematic structural diagram of an information processing apparatus provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure can be applied to the situation that a certain content in any page needs to be described collaboratively by connecting other content. It is implemented by software and/or hardware, and is integrated in a device that performs the method.
  • the information processing apparatus in the embodiment of the present disclosure may specifically include:
  • the connection relationship recording module 510 is configured to record the first content block in the connection attribute information of the first content block and the connection attribute information of the second content block in response to the connection operation of connecting the first content block and the second content block the connection relationship between the content block and the second content block;
  • a connected content search module 520 configured to, in response to a connected content block output request of the first content block, search for connection attribute information of the first content block to determine a content block connected to the first content block;
  • the connected content output module 530 is configured to acquire content data information of a content block connected to the first content block, and output the content data information.
  • a page is built by means of content blocks, and in response to the connection operation of connecting the first content block and the second content block, the connection attribute information of the first content block and the connection attribute information of the second content block are The connection relationship between the first content block and the second content block is recorded in the connection attribute information, and then in response to the connection content block output request of the first content block, the connection attribute information of the first content block is searched to determine the connection with the first content block.
  • the above-mentioned information processing device may also include:
  • a content block deletion module configured to, in response to a deletion operation of the first content block, determine a content block connected to the first content block according to the connection attribute information of the first content block, and update the first content block
  • the content block connected to the content block is the deletion flag set for the first content block.
  • the above-mentioned information processing device may also include:
  • the document structure updating module is configured to update the connection attribute information of the first content block and the second content block in the document structure.
  • first content block and the second content block belong to the same document or different documents.
  • the information processing apparatus provided by the embodiments of the present disclosure belongs to the same inventive concept as the information processing methods provided in the above-mentioned embodiments.
  • the embodiments of the present disclosure are related to the above-mentioned embodiments.
  • the embodiments have the same beneficial effect.
  • the embodiments of the present disclosure are suitable for processing online documents, and may be performed by a document synchronization apparatus, which may be implemented in hardware and/or software.
  • the apparatus can be configured in an electronic device with storage and computing capabilities, for example, can be integrated in a server, and the server processes the online document, thereby responding to the user's editing operation on the online document through the client. It is suitable for scenarios where the server provides online document editing, viewing and other services for multiple clients.
  • the entity content and tree structure of the document are stored on the server.
  • a document may include various forms of document content, such as various multimedia entity contents such as text, pictures, tables, links, and tables, all of which belong to the document.
  • entity content is independently regarded as a content block (Block), which can be easily referenced by other documents or content blocks in units of content blocks.
  • a content block is a piece of data that can be independently collaborated and recorded.
  • the so-called reference relationship refers to the relationship in which the source content block in the source document is referenced by other destination documents or destination content blocks.
  • the content of the source content block can be copied, with or without markup to show this reference relationship to the user.
  • the definition of the content block can be preset by the online document software, or can be customized by the user.
  • the content block can be distinguished based on the content type, such as text, pictures, tables, etc. Separators distinguish content blocks, such as "carriage return”, “paragraph separator”, “section break”, etc.; the separation boundary of content blocks can also be set by user operations.
  • FIG. 6 is a schematic tree structure diagram of a document provided by an embodiment of the present disclosure. Referring to Fig. 6, a tree structure of a document is simply shown. The document includes two content blocks, one for the root content block and one for other content blocks that are not the root node. The so-called root content block is the basic content generated when the document is created, and a document can have only one root content block.
  • Other content blocks are non-root content blocks that belong to the document, and can be generated together with the root content block based on a template at the time of creation, or can be content blocks that are gradually added by the user after creation.
  • the tree structure includes two types of nodes, namely document nodes and content block nodes.
  • the document node (R node) corresponds to the document and also corresponds to the root content block of the document.
  • the content block node (A node) corresponds to the content block A.
  • the parent-child relationship between the document node and the content block node represents the belonging relationship between the document and the content block. That is, the parent node of the A node is the R node, and the child node of the R node is the A node, and there is a parent-child relationship between the two.
  • the document node records the document version identification sequence, and the content block node records the content block version identification sequence; the document version identification is used to represent the update of each content block belonging to the document.
  • the A node includes a content block version identification sequence, that is, an RV sequence.
  • the content block version identification is also called a version record (Record Version, RV for short), which is used to record each version of the content block that has changed.
  • the content blocks belonging to the document include a root content block, and the document node also records the content block version identification sequence of the root content block. If the R node includes the root content block, it may also include the RV sequence.
  • the document node may not include the RV sequence.
  • the document node also records a document version identification sequence, that is, a TV sequence, and the TV is used to represent the update of the content block belonging to the document. For example, the new RV of each content block node can lead to the new TV.
  • an editing operation identifier (TID, Transaction ID) may be further recorded, and the editing operation represents a transaction operation, and the transaction operation may cause the content of the content block to change or other operations to change the tree structure.
  • the document node and the content block node also record an editing operation identifier sequence, and the editing operation identifier is used to represent the editing operation of updating the content block.
  • TVs can be recorded in one-to-one correspondence with the RVs of each node; or, when an editing operation causes the RVs of multiple content blocks to change, one TV can also record multiple RVs corresponding to one TID.
  • a table with snapshots of the tree structure may be recorded, that is, for each TV, the latest RVs of all content blocks of the document in the TV state are recorded.
  • the tree structure snapshot can also record the newly added RV corresponding to the TV.
  • the embodiment of the present disclosure does not limit the form of the snapshot, for example, the snapshot may be recorded in the form of a table.
  • the nodes of the tree structure not only record the relationship between the content block and the document, as well as the version change, but also record the physical content of the content block.
  • Each content block node can record that each RV is equivalent to the previous RV. Entity changes content.
  • FIG. 7 is a flowchart of a document synchronization method provided by an embodiment of the present disclosure.
  • the method may be performed by a document synchronization apparatus configured in an electronic device.
  • the electronic device may be a terminal device, preferably a server device.
  • the server In the case of online collaborative processing of documents, it is preferable for the server to store the content and tree structure of each document, and to provide update services to each client.
  • the method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node
  • the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block.
  • the document node records a sequence of document version identifiers used to characterize the update of each content block belonging to the document. It should be noted here that the document version identifier sequence is composed of the document version identifiers of the document nodes.
  • the content block version of the content block node is updated.
  • a new content block version ID is added to the ID sequence, and a new document version ID is also added to the document node's document version ID sequence.
  • each content block refers to the process of changing the physical content of each content block.
  • adding, deleting and modifying the physical content in the content block can be referred to as updating the content block.
  • the document version identifier of the document node corresponding to the document is also updated.
  • the corresponding document version identifier is also updated once, that is, a new document version identifier is added to the document version identifier sequence of the document node.
  • the server may monitor the update state of the document according to the document version identifier of the document node, which may include: monitoring the document version identifier sequence of the document node in the tree structure, and when generating a new document version identifier, Make sure the document produces updated content.
  • the server monitors the document version identification sequence of the document node in the tree structure in real time or periodically, determines whether a new document version identification is added to the document version identification sequence, and generates a new document version in the document version identification sequence.
  • the corresponding content block version identification is determined according to the document version identification
  • the updated content block is determined according to the content block version identification
  • the entity content of the updated content block is analyzed and processed to determine the updated content block of the content block.
  • the content block version identifier is used to represent the update information of the content block, such as the number of updates, that is, the number of content block version identifiers included in the content block version identifier sequence, which is the same as the update number of the content block. It can be understood that the process of monitoring the update state of the document refers to the process of monitoring the entity content of each content block in the document. When the entity content of one content block is updated, the document generates updated content.
  • the content object includes a document.
  • the client can send a request to the server according to its own needs to join the room of one or more content objects, which is equivalent to subscribing to the update of the content objects monitored in the room.
  • each room may include one or more content objects, which is not limited.
  • the server listens to the update of the content object in a certain room, it queries all clients that have subscribed to the content object in the room.
  • the document version identifier is used to record the updated content belonging to this document, and may or may not record the updated content of the referenced document or reference content block in this document. If the document version ID is set to not record the updated content of the referenced document and referenced content block, that is, when the referenced document in this document or the entity content of the referenced content block is updated, the document version ID corresponding to this document will not be updated. It can be understood that, when subscribing to a content object, it is necessary to subscribe to the document version identifier of the document and respectively subscribe to the content block version identifier of the referenced content block in the document.
  • the content block nodes that have an attribution relationship with the document node are all in the document; the content blocks referenced in the document are not recorded through the attribution relationship or parent-child relationship in the tree structure, but through the dedicated reference node.
  • a record, the referencing node acts as a child of the referencing document and as a parent of the referenced source document or source content block node.
  • S730 Provide the updated content to the client according to the updated content of the content object in the room, so that the client can update the content object.
  • the server may push the updated content of the content object to the client, so that the client updates the content object.
  • the client can also pull the updated content of the content object in the room from the server to update the locally cached content object.
  • a pull request can be sent to the server through the client, so that the client can actively pull the update content from the server. to update the client's locally cached content object.
  • the update status of the document is monitored uniformly through the document version identifier of the document node.
  • the updated content of the content object in the room is uniformly provided to the subscribed subscribed in the room. All clients of the content object to enable clients to make updates to the content object.
  • the monitoring pressure on the server is effectively reduced, so that the online document is effectively updated on the basis of reducing the monitoring pressure on the server.
  • the update status of the document is monitored through the document version identifier, and when the content object in the room is updated, the updated content is provided to the client that subscribes to the content object.
  • the function of protecting the order is added. And relying on the version mechanism to achieve deduplication and anti-lost.
  • FIG. 8 is a flowchart of another document synchronization method provided by an embodiment of the present disclosure. This embodiment further defines the document synchronization method on the basis of the above-mentioned embodiment.
  • the process of document synchronization is described by taking the content block node recording the content block version identification sequence, and the content object further including the content block as an example.
  • the document synchronization method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block;
  • the document node records a document version identification sequence , the document version identifier is used to characterize the update of the content block attributed to the document.
  • the content object includes a document.
  • the version ID snapshot refers to the current latest document version ID in the document version ID sequence of the document node and the current latest content chunk version ID of the content chunk node corresponding to each content chunk included in the document. corresponding relationship.
  • the document corresponding to the document node 1 contains three content blocks, namely, the content block B1, the content block B2, and the content block B3.
  • the document version identification sequence of document node 1 includes 8 document version identifications, which are 0, 1, 2, 3, 4, 5, 6 and 7 respectively (that is, document version identification 7 represents the latest document version identification).
  • the content block version identifier sequence of the content block node corresponding to the content block B1 includes two content block version identifiers, 0 and 1 respectively (ie, the latest content block version identifier of the content block B1 is 1).
  • the content block version identifier sequence of the content block node corresponding to the content block B2 includes three content block version identifiers, which are 0, 1 and 2 respectively (ie, the latest content block version identifier of the content block B2 is 2).
  • the content block version identifier sequence of the content block node corresponding to the content block B3 includes four content block version identifiers, which are 0, 1, 2 and 3 respectively (the latest content block version identifier of the content block B3 is 3).
  • the document version identifier 7 of the document node 1 establishes a corresponding relationship with the latest content block version identifier 1 of the content block B1, the latest content block version identifier 2 of the content block B2, and the latest content block version identifier 3 of the content block B3, and Take this correspondence as a versioned snapshot.
  • a parent-child relationship is established between the document node and the content block nodes of the content blocks included in the document corresponding to the document node, and a corresponding relationship is established between the content block version identifier of each content block node and the document version identifier. It can also be understood that, according to the document version identifier of the document node and the version identifier snapshot of the tree structure created in advance, the content block version identifier of each content block node corresponding to the document version identifier can be quickly found.
  • the newly added document version identifier refers to the latest document version identifier in the document version identifier sequence of the document node; correspondingly, the newly added content block version identifier of each content block node refers to the The latest content block version ID in the sequence of content chunk version IDs.
  • the version identifier snapshot may be a table for storing the mapping relationship between the document version identifier of the document node and the content block version identifier of the content block node, or other forms, which are not limited in the present disclosure.
  • S840 Determine the updated content of the corresponding content block according to the version identifier of the newly added content block, and provide the updated content to the client, so that the client can update the content object.
  • the newly added content block version identifier is generated in the content block version identifier sequence of the content block node, and the corresponding editing operation identifier is searched according to the newly added content block version identifier, so as to determine the corresponding editing operation according to the editing operation identifier, thereby Determine the updated content of this content block.
  • the server obtains the updated content of the content block, it pushes the updated content to the client, so that the client updates the content object.
  • the server can notify the client to notify the client that the updated content of the content block can be pulled from the server to update the content object cached locally by the client.
  • the content block node records a content block version identifier sequence
  • the document synchronization method further includes: when any content block node belonging to the document node generates a newly added content block version identifier Added document version ID to ID sequence.
  • a document may contain one content block, or may contain multiple content blocks.
  • a document generally contains multiple content blocks, and correspondingly, one document node corresponds to multiple content block nodes.
  • a new content block version identification is added to the content block version identification sequence of the content block node.
  • a new document version identifier is added to the document version identifier sequence, so that the corresponding content block version identifier can be found through the document version identifier, and then the updated content of the content block can be found.
  • the content object further includes a content block
  • the document synchronization method further includes: monitoring the update state of the content block according to the content block version identifier of the content block node in the tree structure.
  • the content block node records a content block version identifier sequence, and the content block version identifier is used to represent the content update of the content block.
  • the content block version identifier is used to record the update times of the content block, that is, when the content of the content block is updated once, a new content block version identifier is added to the content block version identifier sequence.
  • Monitor the content block version identification sequence of each content block node to determine whether a new content block version identification is added to the content block version identification sequence. If a new content block version identification is added to one of the content block version identification sequences, determine the The entity content of the content block is updated.
  • the content block version identification sequence of each content block may be monitored in real time, or the content block version identification sequence of each content block may be monitored periodically.
  • FIG. 9 is a flowchart of yet another method for document synchronization provided by an embodiment of the present disclosure. This embodiment further describes the document synchronization process on the basis of the above-mentioned embodiment. Exemplarily, taking S910-S940 performed before S950 as an example, the document synchronization process will be described, which is not limited thereto. As shown in FIG. 9 , the document synchronization method in this embodiment includes the following steps:
  • the room subscription request refers to a request sent by the client to the server to subscribe to the content objects in the room.
  • the content object includes at least one of: a document and a content block.
  • the client When the client loads the document, the client automatically triggers a room subscription request and sends the room subscription request to the server.
  • the process of loading the document by the client refers to the process of opening the document by the client. It can be understood that after the client loads the document, the client automatically subscribes to the content of the document; it can also be understood that when the user starts to read a document, it is equivalent to joining the room. Correspondingly, the user closes the document, that is, quits the subscription of this room.
  • the room subscription request sent by the client to the server carries the identification information of the loaded document.
  • the server After the server receives the room subscription request sent by the client, it parses the room subscription request to obtain the corresponding identification information; then determine the currently loaded document pointed to by the room subscription request according to the identification information.
  • the document node identifier refers to the identification information of the document node, and is used to distinguish different document nodes. It can be understood that the document node identifier is the unique identifier of each document node, that is, the document node identifiers corresponding to different document nodes are also different.
  • each document corresponds to a document node in the tree structure, and each document node is configured with a corresponding document node identifier.
  • the currently loaded document also corresponds to one of the document nodes in the tree structure, that is, the document node in the tree structure can be determined according to the currently loaded document, and then the document node identifier of the document node is used as the room subscription request to point to. content object.
  • each room may include multiple content objects, and each content object may include: documents and/or content blocks, in other embodiments, each room corresponds to a content object, so as to facilitate Update management of content objects.
  • each document corresponds to a document node identifier. In an embodiment, after the document node corresponding to the currently loaded document is determined, the document node identifier corresponding to the document node is searched, and the client is added to the room corresponding to the document node identifier.
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block;
  • the document node records a document version identification sequence , the document version identifier is used to characterize the update of the content block attributed to the document.
  • S960 When monitoring the update of the content object in the room, determine the client that subscribes to the content object in the room.
  • the content object includes a document.
  • the method further includes: determining that the document node has a content block node of a reference content block with a reference relationship; identifying the content block node with a reference relationship, determining The content object pointed to by the room subscription request.
  • each document generally includes a plurality of content blocks, and accordingly, a document node corresponding to each document may correspond to a plurality of content block nodes.
  • the content block node that references the content block in which the document node has a reference relationship refers to the content block node corresponding to the content block currently referenced by the document node.
  • the content block referenced by each document node is searched as the reference content block, and the content block node of the reference content block in the tree structure is obtained, and the The content block node identifier of the content block node is the content object pointed to by the room subscription request.
  • the content object pointed to by the room subscription request sent by client 1 is the document node identifier of document A, and the Contains the content block node identifier of the content block C.
  • the method further includes: determining that the document node has a content block node of a back-linked content block with a back-reference relationship; The identifier of the content block node, which is determined as the content object pointed to by the room subscription request.
  • the document node has a content block node of a back-linked content block in a back-reference relationship, which refers to the content block node corresponding to the content block of the currently loaded document, that is, other content block nodes refer to the currently loaded content block node.
  • documentation refers to the content block node corresponding to the content block of the currently loaded document, that is, other content block nodes refer to the currently loaded content block node.
  • the currently loaded document may be used as a referenced document, that is, other documents or content blocks in other documents refer to the currently loaded document.
  • the content of the currently loaded document is updated, in order to synchronously update the document or content block associated with the currently loaded document, an association relationship is established between the currently loaded document and the currently loaded document.
  • the content block that refers to the currently loaded document is called a backlink content block with a back-reference relationship.
  • preview information of content block D is displayed in the backlink area of document A.
  • the content block node of the referenced content block in the document node (that is, the content block node of the referenced content block with the reference relationship) is determined, and on the other hand, the content block node of the referenced content block is determined. It is necessary to determine the content block node of the referenced document node (that is, the content block node of the backlink content block with the backreference relationship), and identify the content block node identifier with the reference relationship and the content block node identifier with the backreference relationship. As the content object pointed to by the room subscription request.
  • the client that subscribes to the content object pushes the updated content through the room update operation.
  • the server uses the room service, so that the client in the room that subscribes to the document and content block receives the updated content, so that the client can synchronously update the locally cached document and content block.
  • interested clients join the room of a certain document or content block, which is equivalent to subscribing to the updates of the content block and document.
  • the client When the client loads the document (that is, the user opens the document), the client automatically adds a room, that is, the author of the online operation document is the room push object.
  • a room that is, the author of the online operation document is the room push object.
  • the server can automatically add all documents and content blocks in the document to the corresponding room.
  • developers can also choose to add only the document version identifier.
  • the document version ID and the content block version ID can be subscribed as content objects.
  • the server uses the room as a unit to detect the update operation of the content object in the room.
  • Each room can correspond to a content block or a document.
  • the server can deduplicate to avoid repeatedly sending updated content to the client.
  • FIG. 10 is a schematic flowchart of document synchronization using room update provided by an embodiment of the present disclosure.
  • content block 1 denoted as Record1
  • content block 2 denoted as Record2
  • document 1 Page1
  • two clients subscribing to content block 1 Actor1 and Actor2 respectively
  • three clients subscribing to content block 2 Actor1, Actor2 and Actor3 respectively
  • two clients subscribing to document 1 are Actor1 and Actor4
  • content block 2 belongs to document 1.
  • the room in the server receives the information about the editing event in content block 2.
  • the server queries the room for content block 2 and the room members of document 1 to which content block 2 belongs, and determines to subscribe in the room. If the client (including Actor1, Actor2, Actor3, and Actor4) of content block 2, the server provides the updated content block to the client (ie Actor1, Actor2, Actor3 and Actor4) according to the updated content of content block 2 in the room. , for the four clients to update the content object.
  • the server pushes the updated content to the client Actor1 twice.
  • it can be deduplicated to avoid the problem of repeated push.
  • FIG. 11 is a flowchart of still another method for document synchronization provided by an embodiment of the present disclosure.
  • the embodiment is a process of synchronously updating a document by adopting a heartbeat request when the content object further includes content blocks.
  • S1120 is executed between S1110 and S1130 as an example to describe the document synchronization process, but this is not limited, as long as S1120 is performed before S1150.
  • the document synchronization method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block;
  • the document node records a document version identification sequence , the document version identifier is used to characterize the update of the content block attributed to the document.
  • the content block node records a content block version identifier sequence, and the content block version identifier is used to represent the content update of the content block.
  • the content object includes a document.
  • S1140 Provide the updated content to the client according to the updated content of the content object in the room, so that the client can update the content object.
  • the heartbeat request means that the client sends a detection message to the server to detect the latest version of the request.
  • the client can send heartbeat requests to the server in real time or periodically.
  • the server after receiving the heartbeat request sent by the client, the server detects whether the version of the content object pointed to by the heartbeat request is updated.
  • the content objects include: documents and/or content blocks. It can be understood that whether the target document or target content block corresponding to the heartbeat request is updated is detected according to the document version identifier of the document node and/or the content block version identifier of the content block node in the tree structure of the currently loaded document.
  • the heartbeat mechanism is similar to the room subscription mechanism, which is an update mechanism initiated by the client. When the client loads a document, it will monitor the TV of the document and the RV of the reference content block of the document, and the heartbeat requests for the TV and the RV of the reference content block can be aggregated and sent to the server.
  • target document or target content block If the target document or target content block is updated, provide the updated version identifier to the client.
  • the heartbeat request can carry the latest version of TV
  • the server detects the target document corresponding to the heartbeat request according to the latest document version identifier of the document node in the tree structure of the currently loaded document. Whether the latest version of TV is consistent, that is, whether the document is updated. If they are consistent, the latest status message of the document is fed back. If they are inconsistent, the new version TV and the updated RV that the client needs to update are fed back to the client for the client to pull the incremental update content.
  • the heartbeat request may carry the identifier of the reference content block, and may or may not carry the latest version of the RV.
  • the server directly feeds back the latest version of RV to the client according to the content block version identification sequence of the content block node in the tree structure of the currently loaded document, so that the client can detect whether the target content block is An update has occurred.
  • the client detects that the latest version of RV is consistent with the latest version of RV in the local cache, there is no need to update; if it is inconsistent, the incremental update content of the reference content block is pulled from the server according to the latest version of RV.
  • the technical solution in this embodiment reduces the number of heartbeat requests sent by the client to the server by monitoring the document version identifier, thereby avoiding the technical problem of diffuse reading by the server.
  • FIG. 12 is a schematic flowchart of document synchronization using heartbeat provided by an embodiment of the present disclosure.
  • the heartbeat version of the currently loaded document is passed by the client (referred to as ClientVars) through parameters, and after the server returns the heartbeat version, if the latest content block version identifier and the latest content block version of the changed content block under the currently loaded document are The client determines whether the latest content block version identifier and the latest heartbeat version returned by the server are consistent with those in the local cache. If there is a difference, the client requests (fetch miss) the latest content block version identifier and the latest heartbeat version from the server, so that the client updates the latest heartbeat version cached locally.
  • heartbeats There are two types of heartbeats, one is the heartbeat version of the content block, that is, when the content block generates a new content block version identifier, the server pushes the update to the client; the other is the heartbeat version of the document, where , the heartbeat version of the document can only be updated by heartbeat requests.
  • FIG. 13 is a schematic flowchart of another implementation of document synchronization using heartbeat provided by an embodiment of the present disclosure.
  • the client referred to as Actor
  • the server After receiving the heartbeat request, the server queries the latest content block version identifier corresponding to the content block node and the latest document version identifier corresponding to the document node. Then, the server feeds back the updated content corresponding to the latest content block version identifier and the updated content block corresponding to the latest document version identifier to the client, so that the client updates the locally cached documents and content blocks.
  • FIG. 14 is a flowchart of still another method for document synchronization provided by an embodiment of the present disclosure.
  • the embodiment is a process of synchronously updating a document by using a complementary update request when the content object further includes a content block.
  • the document synchronization method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block;
  • the document node records a document version identification sequence , the document version identifier is used to characterize the update of the content block attributed to the document.
  • the content block node records a content block version identifier sequence, and the content block version identifier is used to represent the content update of the content block.
  • the content object includes a document.
  • the difference compensation update request refers to the difference compensation operation request that the client actively triggers to the server when the client finds that a certain version of the locally cached content object may be missing.
  • the missing manifestations include the following: it is found through the heartbeat request that the version identifier of the content object does not match; or, the version identifier returned by the server after editing the content block does not match the local version identifier.
  • the version identifier of the content object that is missing locally in the client is indicated in the difference supplement update request.
  • the supplementary update request sent by the client 1 to the server indicates that the six versions of the document version identifier 5-document version identifier 10 are required. .
  • S1460 Acquire corresponding update content according to the version identifier of the target document or target content block specified by the update request for complementing the difference, and feed it back to the client.
  • the version identifier of the target document refers to the version identifier of the document that is missing locally on the client; the version identifier of the target content block refers to the version identifier of the content block that is missing locally on the client.
  • the server determines the local missing document version identifier and content block version identifier of the client according to the supplementary update request, and acquires the target document corresponding to the missing document version identifier, or acquires the target content corresponding to the missing content block version identifier block; then obtain the updated content corresponding to the version ID of the target document, or obtain the updated content corresponding to the version ID of the target content block, and feed it back to the client, so that the client can update the content corresponding to the version ID of the missing target document or The updated content corresponding to the version identifier of the missing target content block is cached locally on the client.
  • FIG. 15 is a schematic flowchart of updating a document by complementing according to an embodiment of the present disclosure.
  • the flow management module (FlowSync) in the client receives the content update related information (NEW_CHANGES/ACCEPT_COMMIT/USER_HEARTBEAT()) sent by the server (Server).
  • FlowSync the content update related information
  • the server Server
  • the client detects that the version of the content block or document is incorrect, it collects the records that need to be supplemented, that is, the version information of the content block that needs to be supplemented.
  • the client tries to make up the difference. If there is already an in-transit difference, it does not call the compensation update function.
  • the client initiates a supplementary update request (FETCH_MISS()), and actively triggers the server to pull the updated content of the content block corresponding to the latest content block version ID, or the updated content of the document corresponding to the latest document version ID, so that the client can Make an update to a locally cached document or content block.
  • the server pushes the updated content to the client (NEW_CHANGES()).
  • the client updates the local cache based on the updated content.
  • the client performs local cache cleaning (flush()). It can be understood that the difference compensation update request is triggered by the client. After the comparison, if the client finds that there is a missing version, it automatically sends a compensation update request to the server to realize automatic compensation.
  • the client locally records whether it has sent a supplementary update request to the server, but has not received a response from the server.
  • This embodiment is applicable to the case where the client processes the document.
  • the technical solutions of the embodiments of the present disclosure may be implemented in cooperation with the document synchronization method executed by the server in the foregoing embodiments.
  • the method includes:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node
  • the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the The document node records a sequence of document version identifiers used to characterize updates of content blocks belonging to the document.
  • the document currently being processed by the client is the document loaded by the client to be read or edited.
  • the entity content of the document needs to be obtained from the server. Since the content block of the document may be edited and updated by other clients, content update may also be required during the editing and processing of the document.
  • the content update request sent by the client to the server can be a room addition request or a heartbeat request.
  • the room addition request or the heartbeat request carries the document identifier or the content block identifier, so that the server can respond to the client's update request accordingly.
  • sending a content update request to the server includes at least one of the following:
  • a content update request is sent to the server.
  • the above operations may be:
  • At least one reference content block of the currently processed document is determined, the document version identifier of the currently processed document and the content block identifier of the reference content block are carried in the update request, and sent to the Sent by the server.
  • the client terminal may carry the identification of the document in the content update request. If the document also references content blocks of other documents, the content block identifier of the referenced content block may be further carried in the content update request, and an update is requested together.
  • the content update request of the document identifier and the content block identifier can be sent separately or sent to the server together.
  • the content update request of the document may only include the document identifier, and the server determines the document node based on the document identifier, and then feeds back the latest TV of the document node and the RV of the content block node of the content block to which it belongs.
  • S1520 Obtain the document version identifier fed back by the server and the content block version identifier of the content block belonging to the document.
  • the server After the server determines the document version identifier and the RV of the content block belonging to the document, it feeds back to the client.
  • the server can also reference the RV of the content block.
  • the client can further pull the corresponding physical content from the server according to the TV and RV. If the document is initially loaded, it needs to obtain the full physical content. If it is an incremental update during processing, the server can feed back the latest version of TV and RV, and the client can pull the incremental physical content to the client's local cache accordingly.
  • the client can request the updated content of the document and its belonging content block at one time through the TV of the document node, and the client does not need to monitor the content block separately to initiate a content update request.
  • the occupancy of listening resources in the client is reduced, the number of message interactions between the client and the server is reduced, and the document update efficiency is improved.
  • FIG. 16 is a structural block diagram of a document synchronization apparatus provided by an embodiment of the present disclosure.
  • the device is optionally configured on the server, and the device includes: a first monitoring module 1610 , a first determining module 1620 and a first sending module 1630 .
  • the first monitoring module 1610 is configured to monitor the update status of the document according to the document version identifier of the document node in the tree structure of the document; wherein the document includes at least one content block, and the tree structure includes a document node and a content block node , the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block; the document node records the document version identification sequence, and the document version identification is used to represent the update of the content block belonging to the document;
  • the first determining module 1620 is configured to, when monitoring the update of the content object in the room, determine the client that subscribes to the content object in the room; wherein, the content object includes a document;
  • the first sending module 1630 is configured to provide the updated content to the client according to the updated content of the content object in the room, so that the client can update the content object.
  • the monitoring module is specifically configured to: monitor the document version identifier sequence of the document node in the tree structure, and determine that the document generates updated content when a new document version identifier is generated.
  • the content block node records the content block version identification sequence
  • the document synchronization device further includes:
  • a new module is used for adding a document version identification to the document version identification sequence of the document node when any content block node belonging to the document node generates a newly added content block version identification.
  • the content object further includes a content block
  • the document synchronization apparatus further includes:
  • the second monitoring module is used to monitor the update state of the content block according to the content block version identifier of the content block node in the tree structure; wherein, the content block node records a content block version identifier sequence, and the content block version identifier is used to represent the content The content of the block is updated.
  • the first sending module includes:
  • a search unit configured to search for the newly added content block version identifier of each content block node corresponding to the newly added document version identifier based on the document version identifier of the document node in the tree structure and based on the version identifier snapshot of the tree structure;
  • the sending unit is configured to determine the updated content of the corresponding content block according to the version identifier of the newly added content block, and provide the updated content to the client.
  • the document synchronization device further includes:
  • the first receiving module is used to receive the room subscription request triggered by the client when loading the document, and determine the content object pointed to by the room subscription request;
  • the add module is used to add the client to the room corresponding to the content object.
  • determining the content object pointed to by the room subscription request is specifically used for:
  • the corresponding document node is determined in the tree structure according to the currently loaded document, and the document node identifier of the document node is determined as the content object pointed to by the room subscription request.
  • the method further includes:
  • the method further includes:
  • the document synchronization device further includes:
  • the second receiving module is used for receiving the heartbeat request sent by the client
  • the detection module is used to detect whether the target document or target content block corresponding to the heartbeat request is updated according to the document version identifier of the document node and/or the content block version identifier of the content block node in the tree structure;
  • the second sending module is configured to provide the updated version identifier to the client if the target document or the target content block is updated.
  • the document synchronization device further includes:
  • the third receiving module is used for receiving the difference supplement update request sent by the client
  • the feedback module is used for obtaining the corresponding update content according to the version identifier of the target document or target content block specified by the update request for supplementary difference, and feeding it back to the client.
  • the above document synchronization apparatus can execute the document synchronization method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
  • the apparatus is optionally configured on a client, and the apparatus includes: a request sending module 1701 , a version identification obtaining module 1702 and a content obtaining module 1703 .
  • the request sending module 1701 is configured to send a content update request to the server for the current processing document of the client, so as to request the server to determine the content of the document according to the document version identifier of the content update request; wherein the document includes at least one content block, the tree structure includes a document node and a content block node, the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block; the document node records the document version an identification sequence, the document version identification is used to characterize the update of the content block belonging to the document;
  • a version identification obtaining module 1702 configured to obtain the document version identification fed back by the server and the content block version identification of the content block belonging to the document;
  • the content acquisition module 1703 is configured to acquire entity content to the client according to the document version identifier and the content block version identifier.
  • the request sending module is specifically configured to, for the currently processed document of the client, determine at least one reference content block of the currently processed document, and identify the document version of the currently processed document and the reference content block.
  • the content block identifier is carried in the update request and sent to the server.
  • the request sending module is specifically configured to execute at least one of the following:
  • a content update request is sent to the server.
  • the content update request is a room addition request or a heartbeat request.
  • the embodiments of the present disclosure are suitable for processing online documents, and may be executed by a document processing apparatus based on a tree structure, and the apparatus may be implemented in hardware and/or software.
  • the apparatus can be configured in an electronic device with storage and computing capabilities, for example, can be integrated in a server, and the server processes the online document, thereby responding to the user's editing operation on the online document through the client. It is preferably suitable for the scenario where the server provides online document editing, viewing and other services for multiple clients, and the entity content and tree structure of the document can be stored on the server.
  • the document tree structure reference may be made to the related descriptions of the previous embodiments, for example, the description of FIG. 6 .
  • FIG. 17 is a flowchart of a method for processing documents based on a tree structure according to an embodiment of the present disclosure.
  • the method may be performed by a document processing apparatus configured in an electronic device.
  • the electronic device may be a terminal device, preferably a server device.
  • the method in this embodiment includes the following steps:
  • the current document may be an online editable document displayed on the display interface of the document processing device.
  • the document type of the current document is not limited, for example, it can be a document used to carry multiple content types, such as text, pictures, videos, programs, etc., or it can be a document used to carry tables, wherein Tables can support one or more data types.
  • the online documents include documents that can achieve collaboration, or documents that can implement historical version rollback.
  • the document operation event refers to an event of editing a content block in the current document or an event of updating the document by the server.
  • the document includes at least one content block, which can be understood as a document operation event on the current document, which refers to an event of operating at least one content block in the current document.
  • the document operation event may be generated by the user's operation instruction on the current document, or may be generated by the update instruction of the document or content block obtained by the server.
  • a corresponding document operation event may be generated according to the operation instruction.
  • the implementation manner of the user's operation instruction on the current document may be the user's touch screen operation, the user's mouse operation, or the user's trigger operation generated by a hot key, which is not limited.
  • the document operation event may include one of the following: a version change event; a content block update content push event.
  • the version change event includes the event of rolling back the current document to the old version, or the event of restoring from the old version to the new version;
  • the content block update content push event includes when the physical content of the content block is updated, the server sends the client to the client. Push events that update the content of the entity.
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence
  • the content block node records the content block version identification sequence
  • the document version identification is used to represent the update of the content block belonging to the document.
  • a document node in the tree structure is generally a parent node; a content block node may be a parent node or a child node.
  • the tree structure where the current document is located is determined, and the document node and/or content block node involved in the document operation event is searched in the tree structure.
  • the corresponding node may be determined through the document or content block identifier, name, etc. included in the operation event.
  • S1730 Execute a document operation event according to the correspondence between the document version identifier of the document node and the content block version identifier of the content block node.
  • the document version identifier is used to record the change of the content block in the current document, that is, the document version identifier sequence is used to represent the history of the entire document, and the change history of the content block in the document can be obtained through the document version identifier sequence, so as to facilitate Perform version switching operations such as rollback and recovery of document versions.
  • the document version identifier of the document node and the content block version identifier may be one-to-one or one-to-many, which is not limited.
  • the document version identifier of the document node and the content block version identifier of the document node may be one-to-one, which is relatively simpler to design than the one-to-many case.
  • the document version identifier corresponding to the document node in the current document changes; correspondingly, when the content block in the current document is updated, the content block version corresponding to the content block node in the current document changes Both the ID and the document version ID of the current document in which the content block resides are changed. It can be understood that when the content block in the current document is updated, both the document node and the content block node in the current document are updated; when the current document is updated, the document node in the current document is updated.
  • a correspondence relationship is established between the document version identifier of the document node in the current document and the latest content block version identifier corresponding to each content block node, that is, the document version identifier of the document node and the latest version of each content block node are established.
  • Corresponding relationship so that after receiving the document operation event of the user on the current document, according to the corresponding relationship between the document version identifier of the document node and the content block version identifier corresponding to the latest version of the content block node, the content block in the current document Unified execution of document action events.
  • the technical solution of this embodiment is to obtain the document operation event of the current document; according to the document operation event, determine the corresponding document node and/or content block node in the tree structure of the current document; according to the document version identifier and content block of the document node The corresponding relationship between the content block version identifiers of the node, and the document operation event is executed.
  • by adding the document version identifier of the document node in the current document when the current document executes the document operation event, it can be directly based on the difference between the document version identifier of the document node and the content block version identifier of the content block node.
  • the document operation event is performed on the content block nodes of all the content block version identifiers corresponding to the document version identifier, which realizes the unified operation of the current document and improves the convenience of the user's operation on the current document.
  • FIG. 18 is a flowchart of a method for processing a document based on a tree structure provided by an embodiment of the present disclosure. This embodiment is combined with the above-mentioned first embodiment to further describe the document processing method. It should be noted that, S1840-S1860 may be executed after S1830, or may be executed before S1810, which is not limited. Exemplarily, in this embodiment, S1840-S1860 are executed after S1830 as an example to describe the document processing process. As shown in Figure 18, the method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence
  • the content block node records the content block version identification sequence
  • the document version identification is used to represent the update of the content block belonging to the document.
  • each document includes at least one content block. It can be understood that the document editing event for the current document refers to an editing event performed on at least one content block in the current document.
  • the document editor and the editing time may be recorded as required.
  • the document editor and the editing time are recorded, so that the document editor and the editing time can be recorded to facilitate subsequent backtracking, query, display, etc. of the document. Further processing facilitates document processing diversity.
  • the editing operation in the document editing event includes one of the following: a content update operation of a content block; an operation of adding a content block; and a deletion operation of the content block.
  • the editing operation may be one of the above operations, or may be two or more operations, which is not limited.
  • the content update operation of the content block refers to an operation of modifying the entity content in the content block.
  • the operation of adding a content block refers to the operation of adding the entity content in the content block.
  • the content block deletion operation refers to the operation of deleting the entity content in the content block.
  • the document editing event of the current document includes the event of editing the entity content of at least one content block in the current document, or the event of deleting at least one content block, or the event of adding at least one content block, or Events that adjust the relationship between content blocks.
  • the relationship between the content blocks may include an attribution relationship, or the position of the content blocks in the document, or the order of each content block in the document, and the like.
  • the editing operation identifier is in one-to-one correspondence with the editing operation in the document editing event, that is, an editing operation is performed to generate a corresponding editing operation identifier.
  • the content block version identifier of the corresponding content block node is updated.
  • the number of content blocks in the current document is correspondingly reduced, and correspondingly, the parent-child relationship between the content block node and the document node will also change accordingly.
  • the editing operation is a content update operation of a content block or a content block addition operation
  • the editing operation identifier and the content block version identifier of the content block node in the tree structure are updated according to the editing operation in the document editing event
  • the operation is the deletion operation of the content block
  • the parent-child relationship between the content block node and the document node is updated according to the editing operation in the document editing event.
  • the editing operation identifier and the document version identifier of the document node are also updated.
  • a corresponding relationship is established between the editing operation identification of the document node and the document version identification, and a corresponding relationship is established between the editing operation identification of the content block node and the content block version identification, so as to facilitate the subsequent unified execution of the document on the current document. Action events.
  • the technical solution of this embodiment is based on the above embodiments, by updating the editing operation identifier and the content block version identifier of the content block node in the tree structure according to the editing operation in the document editing event, or updating the content block node and the document node. parent-child relationship.
  • the editing operation the editing operation identification and the document version identification of the document node are updated, and the content block node and the document node in the tree structure are updated according to the editing operation.
  • FIG. 19 is a flowchart of a method for processing a document based on a tree structure provided by an embodiment of the present disclosure.
  • the editing operation includes the content updating operation of the content block
  • the editing operation identifier and the content block version identifier of the content block node in the tree structure are updated according to the editing operation in the document editing event. Further instructions.
  • the method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence
  • the content block node records the content block version identification sequence
  • the document version identification is used to represent the update of the content block belonging to the document.
  • the content updating operation in the content block is an operation of modifying the entity content in the content block.
  • the user's editing operation on the current document is received, and the corresponding content block is determined according to the position of the editing operation.
  • the position where the editing operation is located can be represented by the position of the mouse cursor.
  • S1950 may further specifically include: determining at least two corresponding content blocks according to the editing operation.
  • a new document version identifier corresponds to a new content block version identifier one-to-one; or a new document version identifier corresponds to at least two new content block version identifiers added by an editing operation.
  • the content update operation of the content block causes at least two content blocks in the current document to change.
  • Both the at least two new content block version identifiers correspond to a new document version identifier, that is, the document version identifiers corresponding to the at least two new content block version identifiers are the same.
  • each new content block version identifier may also correspond to a new document version identifier, that is, the new content block version identifier and the new document version identifier are in a one-to-one correspondence.
  • the "Enter key” is added from the middle part of the text, causing the content block A to be transformed into two pieces of text.
  • Content blocks, denoted as content block A1 and content block A2 that is, the addition operation of the "Enter key” causes the two content blocks to change, that is, it is equivalent to deleting the physical content corresponding to content block A2 on content block A1.
  • Block A2 is a newly created content block. Due to the addition operation of the "Enter" key, the two content blocks are changed, that is, two editing operations are performed on the current document, which are the deletion operation of the content block and the new operation of the content block.
  • the editing operation adds a new document version ID, that is, the deletion operation of the content block A1 corresponds to a document version ID, and the new operation of the content block A2 corresponds to a document version ID; it is also possible to add a new document version ID for two editing operations. , that is, the document version identifiers corresponding to the deletion operation of the content block A1 and the addition operation of the content block A2 are the same.
  • the editing operation identifier sequence of the content block node is used to store the editing operation identifier of the content block node. It can be understood that when a content block performs an editing operation, a new editing operation identifier is added to the editing operation identifier sequence of the content block node.
  • the content block version identifier sequence of the content block node is used to store the content block version identifier of the content block node. It can be understood that when a content block performs an editing operation, a new content block version identifier is added to the content block version identifier sequence of the content block node.
  • the sequence of editing operation identifiers of the document nodes is used to store the editing operation identifiers of the document nodes. It can be understood that when the content block in the current document is updated, in addition to updating the editing operation identifier and the content block version identifier of the content block node in the current document, the editing operation identifier and the document version identifier of the document node are also updated. A corresponding relationship is established between the document version identifier of the document node and the content block version identifier of the content block node, that is, the new document version identifier corresponds to the new content block version identifier.
  • FIG. 20 is a flowchart of a method for processing a document based on a tree structure provided by an embodiment of the present disclosure.
  • the editing operation includes the operation of adding a content block
  • further description will be given of updating the editing operation identifier and the document version identifier of the document node according to the editing operation.
  • the method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence
  • the content block node records the content block version identification sequence
  • the document version identification is used to represent the update of the content block belonging to the document.
  • the adding operation to the content block that is, the operation of adding a content block is performed on the current document.
  • a new content block node is added to the tree structure, and a content block version identifier corresponding to the content block node is created, and a new document corresponding to the content block version identifier is created Version ID.
  • a parent-child relationship is established between the content block node corresponding to the content block and the document node corresponding to the document, so as to represent the attribution relationship between the document and the content block.
  • a new content block is added to the current document, and according to the relationship between the content block node corresponding to the new content block and the document node
  • the parent-child relationship is found, and the corresponding document node is found.
  • the editing operation identifier sequence of the document node is used to store the editing operation identifier of the document node; the document version identifier sequence of the document node is used to store the document version identifier of the document node.
  • FIG. 21 is a flowchart of a method for processing a document based on a tree structure provided by an embodiment of the present disclosure.
  • the editing operation includes the content block deletion operation
  • further description will be given of updating the editing operation identifier and the document version identifier of the document node according to the editing operation.
  • the method in this embodiment includes the following steps:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node
  • the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block.
  • the document node records the document version identification sequence
  • the content block node records the content block version identification sequence.
  • Document version identifiers are used to characterize updates to content blocks attributed to the document.
  • the editing operation in the document editing event includes a content block deletion operation, that is, a deletion operation is performed on a certain content block in the current document.
  • a content block deletion operation that is, a deletion operation is performed on a certain content block in the current document.
  • the selected content block is considered to be the content block to be edited.
  • a parent-child relationship is established between the content block node corresponding to the content block and the document node, so as to represent the attribution relationship between the document and the content block.
  • the content block version identifier of the content block node corresponding to the content block and the document node corresponding to the content block node are obtained, and then the parent-child relationship between the content block node and the document node of the content block is deleted, that is, deleting The parent node identifier recorded in the content block node, and the content block node identifier is deleted from the child node identifier of the document node.
  • the editing operation identifier sequence of the document node is used to store the editing operation identifier of the document node; the document version identifier sequence of the document node is used to store the document version identifier of the document node.
  • the entity content of the current document also changes accordingly, which is equivalent to performing an editing operation on the current document, and the editing operation ID and document version ID of the document node also need to be updated.
  • a new edit operation identifier is added to the edit operation identifier sequence of the document node, and a new document version identifier is added to the document version identifier sequence of the document node, thereby implementing the content block deletion operation on the current document online.
  • FIG. 22 is a flowchart of a method for processing a document based on a tree structure provided by an embodiment of the present disclosure. This embodiment is combined with the above-mentioned embodiment, and in the case that the document operation event is a version change event, S1720 and S1730 are further described. As shown in Figure 22, the method in this embodiment includes the following steps:
  • the document operation event includes a version change event.
  • the version change event of the current document can be triggered through a display button in the document or through a keyboard hot key. It can be understood that when the display button corresponding to the version change event is detected, or the keyboard hot key is triggered, it indicates that the version change event of the current document is started.
  • the version rollback event in the version change event refers to an event of rolling back the current version of the current document to the old version.
  • the version restoration event in the version change event refers to the event of restoring from the old version of the document to the new version.
  • older versions of the current document may include one or more versions. It can be understood that, in order to be able to roll back the current document to the corresponding old version accurately, the version rollback event indicates the document version identifier corresponding to the old version to be rolled back.
  • the version rollback event is an operation event performed on the document, that is, when the version rollback event is obtained, the document node corresponding to the current document is obtained in the tree structure of the current document, and the version rollback event indicates The document version identifier.
  • the version identifier snapshot refers to the establishment of a corresponding relationship between the current latest document version identifier in the document version identifier sequence of the document node and the current latest content block version identifier of the content block node corresponding to each content block contained in the document .
  • the document corresponding to the document node 1 contains three content blocks, namely, the content block B1, the content block B2, and the content block B3.
  • the document version identification sequence of the document node 1 contains 8 document version identifications, which are 0, 1, 2, 3, 4, 5, 6 and 7 respectively (that is, the document version identification 7 represents the latest document version identification), the content
  • the content block version identifier sequence of the content block node corresponding to the block B1 includes two content block version identifiers, 0 and 1 respectively (that is, the latest content block version identifier of the content block B1 is 1).
  • the content block version identifier sequence of the content block node corresponding to the content block B2 includes three content block version identifiers, which are 0, 1 and 2 respectively (ie, the latest content block version identifier of the content block B2 is 2).
  • the content block version identification sequence of the content block node corresponding to the content block B3 includes four content block version identifications, which are 0, 1, 2 and 3 respectively (the latest content block version identification of the content block B3 is 3), then the document node 1
  • the document version identifier 7 of the content block B1 establishes a correspondence with the latest content block version identifier 1 of the content block B1, the latest content block version identifier 2 of the content block B2, and the latest content block version identifier 3 of the content block B3, and this correspondence is established. Relationships act as versioned snapshots.
  • the content block version identifier of each content block node is used to represent the physical content of the content block corresponding to the content block node, that is, the physical content of the content block corresponding to different content block version identifiers of the content block node is different.
  • the physical content of the content block corresponding to the content block node can be obtained through the content block version identifier, so that the required rollback of the content block node can be obtained.
  • the entity content that is, it needs to fall back to the entity content corresponding to the content block version identifier.
  • a new edit operation identifier is added to the edit operation sequence of the document node to represent the edit operation performed on the current document. and adding a new content block version identifier to the content block version identifier sequence of the document node, indicating that the content block version in the current document has changed. and adding a new document version identifier to the document version identifier sequence of the document node, indicating that the entity content of the current document has changed.
  • each content block node cancels the content to be rolled back, that is, performs an editing operation on each content block
  • the editing operation identification and content block version identification of each content block also occur. Updating, that is, adding a new editing operation identifier to the editing operation identifier sequence of each content block node, and adding a new content block version identifier to the content block version identifier sequence.
  • FIG. 23 is a flowchart of a method for processing a document based on a tree structure provided by Embodiment 7 of the present disclosure.
  • the document operation event is a content block update content push event
  • S1720 and S1730 are further described.
  • the method in this embodiment includes the following steps:
  • the content block update content push event refers to an event in which the server pushes the updated content of the content block to the client.
  • the content block node to which the entity content is updated and the latest document version identifier of the document node to which the content block node belongs are determined in the tree structure. It should be noted that a parent-child relationship is established between the content block node and the document node, which is used to represent the attribution relationship between the content block and the document. It can be understood that the document node to which the content block node belongs, that is, the parent node of the content block node is the document node.
  • S2330 specifically includes S23301-S23302:
  • the process of executing the content block update content push event on the current document refers to the process of updating the entity content of the content block in the current document.
  • the editing operation version identifier of the document node corresponding to the current document is updated, that is, a corresponding relationship is established between the latest document version identifier and the editing operation version identifier. It can be understood that, according to the correspondence between the latest document version ID and the editing operation version ID, the editing operation version ID corresponding to the latest document version ID is found.
  • the physical content of the content block corresponding to the updated content block version identifier is pushed to the client, so that the client updates the current document according to the physical content of the content block corresponding to the updated content block version identifier.
  • FIG. 24 is a flowchart of a method for processing a document based on a tree structure provided by an embodiment of the present disclosure. This embodiment is combined with the above-mentioned embodiment, and in the case that the document operation event is a document reading event, S1720 and S1730 are further described. As shown in Figure 24, the method in this embodiment includes the following steps:
  • the document operation event is a document read event.
  • the document read event can be an event for initial read when the client opens a document.
  • the client can initiate a document read request to the server to inform which document needs to be read.
  • the server When the server obtains the document read event, it can determine the ID of the document to be read according to the document read event. Further, the tree structure of the document is pulled from the storage space of the document based on the document identification. After pulling into the tree structure, the TV of the document node and the content block node belonging to the document node can be determined, and the RV of the content block node can also be determined. The latest TV of the document node and the latest RV of each content block node are the version identifiers to be pushed. The root content block of the document node may also be used as a special content block, and its latest RV is determined as the to-be-pushed version identifier.
  • the entity content of each content block needs to be pulled from the storage space of the server again. At this point, it can be pulled according to the node identifier of the content block.
  • the incremental update content of each version ID relative to the previous version ID is stored, and the full content corresponding to the latest version ID is also stored.
  • the version identifier of the latest content block node and the corresponding full content are generally obtained by pulling.
  • the version ID obtained by pulling the tree structure for the first time is the same as the version ID obtained when pulling the entity content for the second time.
  • the version ID obtained when pulling the entity content for the second time is the same as the version ID obtained when pulling the entity content for the second time.
  • there is a certain time difference between the two pulling content there is a certain probability that the content block will be updated again within this time difference, so some content blocks will generate new RVs, and document nodes will also generate new TVs.
  • An update occurs during the process of pulling the physical content of the content block.
  • the value of the TV is the sum of the values of all the latest RVs.
  • the consistency of the comparison version identifier can be converted into a comparison between the version identifier of the document to be pushed and the Whether the latest document version IDs of the pulled entity content are equal. If they are equal, the version IDs of the pulled entity content are consistent, otherwise, they are inconsistent. Of course, consistency can also be checked by comparing each content block node RV one by one.
  • the version identifier to be pushed when the version identifier to be pushed does not correspond to the latest version identifier, it indicates that the content of the current document pushed by the server to the client is not the complete document content.
  • the corresponding relationship between the identifiers is adjusted, that is, the content block version identifier of at least one content block corresponding to the latest document version identifier is re-determined as the to-be-pushed content block version identifier, and the re-determined to-be-pushed content block version identifier corresponding to the updated The content is pushed to the client.
  • FIG. 25 is a schematic diagram of a document tree structure provided by an embodiment of the present disclosure.
  • a document R1 is created, and the document R1 includes: a content block C, a document R0, a content block A, and a content block B.
  • the content block C refers to the document R0
  • the document R0 refers to the content block A and the content block B.
  • the content block C is created, and the RV version 0 of the content block C is generated. Due to the change of the content block C, the TV of the document R1 generates a new version 1.
  • the t6 operation also causes the content of the document R1 to change, so the RV of the document R1 generates a new version 1. Due to the change of the content of the document R1, the TV of the document R1 generates a new version again, so the TV of the document R1 generates a new version. 2. That is, one transaction operation t6 produces two TV versions. When the user performs the t7 operation, the version of the content block C is changed, that is, the RV of the content block C generates a new version 1.
  • one document operation event can drive one or more content blocks to change, and correspondingly generate RV changes. And each content block change results in a TV change. Therefore, each TV has a one-to-one correspondence with each document node in the tree structure.
  • the document operation is atomic, that is, the TV in the document can also have a one-to-one correspondence with each TID.
  • FIG. 26 is a structural block diagram of a document processing apparatus based on a tree structure provided by an embodiment of the present disclosure. As shown in FIG. 26 , the document processing apparatus based on the tree structure in this embodiment includes: a first acquisition module 2610 , a first determination module 2620 and an execution module 2630 .
  • the first obtaining module 2610 is used to obtain the document operation event of the current document.
  • the first determining module 2620 is configured to determine the corresponding document node and/or content block node in the tree structure of the current document according to the document operation event.
  • the execution module 2630 is configured to execute the document operation event according to the correspondence between the document version identifier of the document node and the content block version identifier of the content block node.
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence
  • the content block node records the content block version identification sequence
  • the document version identification is used to represent the update of the content block belonging to the document.
  • the content blocks belonging to the document include a root content block
  • the document node also records the content block version identification sequence of the root content block.
  • the document node and the content block node also record an editing operation identifier sequence, and the editing operation identifier is used to represent the editing operation of updating the content block.
  • the document processing device based on the tree structure further includes:
  • the second obtaining module is used to obtain document editing events of the current document.
  • the first update module is used to update the editing operation identifier and the content block version identifier of the content block node in the tree structure according to the editing operation in the document editing event, or update the parent-child relationship between the content block node and the document node;
  • the second update module is configured to update the edit operation identifier and the document version identifier of the document node according to the edit operation.
  • the first updating module includes:
  • a first determining unit configured to determine a corresponding content block according to an editing operation
  • a first adding unit for adding a new editing operation identifier to the editing operation identifier sequence of the content block node of the content block
  • the second adding unit is configured to add a new content block version identifier to the content block version identifier sequence of the content block node.
  • the second update module is specifically used for: adding a new editing operation identifier to the editing operation identifier sequence of the document node, and adding a new document version identifier to the document version identifier sequence of the document node, wherein the new document The version ID corresponds to the new content block version ID.
  • the first determining unit is specifically configured to: determine at least two corresponding content blocks according to the editing operation;
  • a new document version identifier corresponds to a new content block version identifier one-to-one; or a new document version identifier corresponds to at least two new content block version identifiers added by an editing operation.
  • the second update module includes:
  • a second determining unit configured to determine the corresponding document node according to the editing operation
  • the third adding unit is used for adding a new editing operation identification to the editing operation identification sequence of the document node, and adding a new document version identification to the document version identification sequence of the document node;
  • the first update module is specifically used for: adding a new content block node in the tree structure according to the editing operation, and creating a new content block version identifier in the content block node, and establishing the new content block version identifier and the The correspondence between the new document version identifiers.
  • the first update module includes:
  • a third determining unit configured to determine the corresponding content block according to the editing operation
  • the deletion unit is used to delete the parent-child relationship between the content block node and the document node of the content block;
  • the second update module is specifically configured to: according to the editing operation, add a new editing operation identifier to the editing operation identifier sequence of the document node, and add a new document version identifier to the document version identifier sequence of the document node.
  • the first determining module is specifically configured to: determine the corresponding document node in the tree structure of the current document according to the version change event, and determine the corresponding document node in the tree structure of the current document according to the version change event.
  • the execution module includes:
  • a search unit is used to search for the content block version identification of each content block node corresponding to the document version identification based on the version identification snapshot of the tree structure;
  • a fourth determining unit configured to determine the content to be changed of each content block node according to the content block version identifier of each content block node
  • the first execution unit is configured to execute a document change event according to the to-be-changed content of each content block node.
  • the execution module also includes:
  • the fourth adding unit is used to add a new editing operation identifier, content block version identifier and document version to the document node according to the to-be-changed content of the document change event after executing the document change event according to the to-be-changed content of each content block node ID; and a new edit operation ID and content chunk version ID are added to each content block.
  • the first determining module is specifically configured to: determine the corresponding content block node in the tree structure according to the content block update content push event, and The latest document version identifier of the document node to which the content block node belongs;
  • the execution module includes:
  • the 5th determining unit is used for the version identification snapshot based on the tree structure to determine the updated content block version identification corresponding to the latest document version identification;
  • the second execution unit is configured to execute the content block update content push event according to the updated content block version identifier.
  • the fifth determination unit includes:
  • the first determination subunit is used to determine the version identification of the editing operation corresponding to the latest document version identification based on the version identification snapshot of the tree structure;
  • the search subunit is used to search for the corresponding content block version identification according to the editing operation version identification as the updated content block version identification.
  • the first determining module is specifically configured to: determine the corresponding document node and content block in the tree structure according to the document read event nodes, and the to-be-pushed version identifiers of the document nodes and content block nodes;
  • the execution module includes:
  • a pulling unit configured to pull the latest content block version identifier and its entity content corresponding to each of the content block nodes according to the determined content block nodes;
  • a sixth determining unit configured to determine, based on the version identifier snapshot of the tree structure, the consistency of the latest content block version identifier of the pulled content block node with the to-be-pushed version identifier;
  • a third execution unit configured to provide the pulled entity content of the content block node to the client if the consistency requirement is met.
  • the execution module further includes:
  • the fourth execution unit is configured to re-execute the operation of determining the corresponding document nodes and content block nodes in the tree structure and the to-be-pushed version identifiers of the document nodes and content block nodes if the consistency requirement is not met.
  • FIG. 27 is a structural block diagram of a device provided by an embodiment of the present disclosure.
  • Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (eg, mobile terminals such as in-vehicle navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 27 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 1000 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 1001, which may be loaded into random access according to a program stored in a read only memory (ROM) 1002 or from a storage device 1006 Various appropriate operations and processes are executed by the programs in the memory (RAM) 1003 . In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored.
  • the processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004.
  • An input/output (I/O) interface 1005 is also connected to the bus 1004 .
  • the following devices can be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration
  • An output device 1007 such as a computer
  • a storage device 1006 including, for example, a magnetic tape, a hard disk, etc.
  • the communication means 1009 may allow the electronic device 1000 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 27 shows the electronic device 1000 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 1009, or from the storage device 1006, or from the ROM 1002.
  • the processing apparatus 1001 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the device, the device causes the device to: determine the connection of the target content block in response to the connection operation of the target content block in the current page Content block; display the connection identifier of the other party's content block under either the target content block or the connected content block, so as to view the other party's content block by using the connection identifier.
  • the first content block and the second content are recorded in the connection attribute information of the first content block and the connection attribute information of the second content block connection relationship of blocks; in response to a connection content block output request of a first content block, look up the connection attribute information of the first content block to determine the content block connected to the first content block; obtain the content block connected to the first content block The content data information of the content block connected by the block is outputted.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: According to the document version identifier of the document node in the document tree structure, the update state of the document is updated.
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records the document Version identification sequence, the document version identification is used to represent the update of the content block belonging to the document; when monitoring the update of the content object in the room, it is determined that the client subscribed to the content object in the room; wherein, the content object includes the document; according to the room The update content of the content object in the content object is provided to the client so that the client can update the content object.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the document operation event of the current document; according to the document operation event, in the tree of the current document Determine the corresponding document node and/or content block node in the structure; according to the correspondence between the document version identifier of the document node and the content block version identifier of the content block node, execute the document operation event;
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the document node records a document version identification sequence
  • the content block node records the content block version identification sequence
  • the document version identification is used to represent the update of the content block belonging to the document.
  • Computer program code for performing operations of embodiments of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, or a combination thereof. , as well as conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider Internet service provider
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the name of the unit does not constitute a limitation of the unit itself under certain circumstances, for example, the first obtaining unit may also be described as "a unit that obtains at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • a method for processing page content provided according to one or more embodiments of the present disclosure includes:
  • connection identifier of the other party's content block at the associated position of the target content block and one of the connected content blocks, so as to view the other party's content block by using the connection identifier.
  • displaying the connection identifier of the other content block at the associated position of the target content block and one of the connected content blocks includes:
  • the passive connection identifier connected by the target content block is displayed at the associated position of the connected content block, so that the target content block can be viewed using the passive connection identifier in the page where the connected content block is located.
  • determining the connection content block of the target content block includes:
  • connection search interface In response to the connection operation of the target content block in the current page, the corresponding connection search interface is displayed;
  • More than one content block is displayed in the connection search interface, and in response to a selection operation on the one or more content blocks, the selected content block is determined as a connected content block of the target content block.
  • connection identifier displayed at the associated position of the target content block and any one of the connected content blocks includes at least one or both of the following:
  • the method after displaying the connection identifier of the other content block at the associated position of the target content block and one of the connected content blocks, the method further includes:
  • the jumping from the current page to the page where the content block is located includes:
  • the displaying each content block associated with the target content block in a preset area of the current page includes:
  • the deletion identifier corresponding to the connection relationship is recorded in the connection attribute information or other data area of the content block specified by the connection relationship.
  • the method further includes:
  • connection relationship between the target content block and the connection content block is respectively recorded in the connection attribute information of the target content block and the connection content block.
  • the above method further includes:
  • the preset area includes a sidebar of the current page, or a lower half display area, or an upper half display area, and the preset area
  • the content blocks that are actively connected and passively connected to the target content block may be displayed in partitions, and the content blocks corresponding to the connection identifier specified by the preset operation may be highlighted.
  • each connection identifier displayed at the associated position of the target content block has a classification label associated with the connection identifier; correspondingly, the preset on the current page It is assumed that each content block associated and connected to the target content block is displayed in the area, including:
  • each content block associated with the target content block is filtered and displayed according to the classification label of the triggered connection identifier.
  • the current page includes a document.
  • the method before determining the connection content block of the target content block in response to the connection operation of the target content block in the current page, the method further includes:
  • the target content block is created in the current page, and a corresponding connection control is configured for the target content block, so as to use the connection control to perform the connection operation.
  • the connected content block is another content block in the current page than the target content block, or a content block in another page except the current page .
  • the content type of the connected content block and the target content are the same or different.
  • the content type of the content block includes at least one of the following:
  • Text-type content blocks multimedia-type content blocks, table-type content blocks, and program-type content blocks;
  • the classification labels include one or more of the following: goals, tasks, reports.
  • An information processing method provided according to one or more embodiments of the present disclosure includes:
  • connection relationship In response to the connection operation of connecting the first content block and the second content block, recording the connection attribute information of the first content block and the second content block in the connection attribute information of the first content block and the connection attribute information of the second content block. connection relationship;
  • connection attribute information of the first content block In response to a connected content block output request for a first content block, looking up connection attribute information of the first content block to determine a content block connected to the first content block;
  • the above method further includes:
  • Also after recording the connection relationship between the first content block and the second content block in the connection attribute information of the first content block and the connection attribute information of the second content block ,Also includes:
  • connection attribute information of the first content block and the second content block in the document structure is updated.
  • the first content block and the second content block belong to the same document or different documents.
  • a device for connecting page content provided according to one or more embodiments of the present disclosure includes:
  • connection response module configured to determine the connection content block of the target content block in response to the connection operation of the target content block in the current page
  • the content connection module is configured to display the connection identifier of the other content block at the associated position of the target content block and one of the connected content blocks, so as to view the other content block by using the connection identifier.
  • the content connection module is specifically used for:
  • the passive connection identifier connected by the target content block is displayed at the associated position of the connected content block, so that the target content block can be viewed using the passive connection identifier in the page where the connected content block is located.
  • connection response module is specifically configured to:
  • connection search interface In response to the connection operation of the target content block in the current page, the corresponding connection search interface is displayed;
  • More than one content block is displayed in the connection search interface, and in response to a selection operation on the one or more content blocks, the selected content block is determined as a connected content block of the target content block.
  • connection identifier displayed at the associated position between the target content block and any one of the connected content blocks includes at least one or both of the following:
  • the above device further includes:
  • a page jumping module configured to jump from the current page to the page where the content block is located in response to a trigger operation of the content block displayed in the preset area.
  • the page jumping module is specifically configured to:
  • connection display module is specifically used for:
  • the deletion identifier corresponding to the connection relationship is recorded in the connection attribute information or other data area of the content block specified by the connection relationship.
  • the above device further includes:
  • the connection relationship recording module is configured to record the connection relationship between the target content block and the connection attribute information of the connection content block respectively.
  • the above device further includes:
  • the content block deletion module is configured to, in response to the deletion operation of the target content block, determine the content block connected to the target content block according to the recorded connection relationship in the connection attribute information of the target content block, and update all the content blocks.
  • the determined content block is the deletion flag set for the target content block.
  • the preset area includes a sidebar of the current page, or a lower half display area, or an upper half display area, and the preset area includes The partition displays the content blocks actively connected and passively connected to the target content block, and highlights the content block corresponding to the connection identifier specified by the preset operation.
  • each connection identifier displayed at the associated position of the target content block has a classification label associated with the connection identifier; correspondingly, the connection display module, specifically Used for:
  • each content block associated with the target content block is filtered and displayed according to the classification label of the triggered connection identifier.
  • the current page includes a document.
  • the above device further includes:
  • a content block creation module configured to create the target content block in the current page, and configure a corresponding connection control for the target content block, so as to use the connection control to perform the connection operation.
  • the connected content block is another content block in the current page except the target content block, or a content block in another page except the current page .
  • the content type of the connected content block and the target content are the same or different.
  • the content type of the content block includes at least one of the following:
  • Text-type content blocks multimedia-type content blocks, table-type content blocks, and program-type content blocks;
  • the classification labels include one or more of the following: goals, tasks, reports.
  • the apparatus includes:
  • a connection relationship recording module configured to record the first content in the connection attribute information of the first content block and the connection attribute information of the second content block in response to a connection operation of connecting the first content block and the second content block the connection relationship between the block and the second content block;
  • a connected content search module configured to, in response to a connected content block output request of the first content block, search for connection attribute information of the first content block to determine a content block connected to the first content block;
  • a connected content output module configured to acquire content data information of a content block connected to the first content block, and output the content data information.
  • the above device further includes:
  • a content block deletion module configured to, in response to a deletion operation of the first content block, determine a content block connected to the first content block according to the connection attribute information of the first content block, and update the first content block
  • the content block connected to the content block is the deletion flag set for the first content block.
  • the above device further includes:
  • the document structure updating module is configured to update the connection attribute information of the first content block and the second content block in the document structure.
  • the first content block and the second content block belong to the same document or different documents.
  • a computer device provided according to one or more embodiments of the present disclosure the device includes:
  • processors one or more processors
  • memory for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing page content as described in any embodiment of the present disclosure, or, implement the method as described in this disclosure
  • the information processing method described in any of the embodiments is disclosed.
  • a readable medium provided according to one or more embodiments of the present disclosure, on which a computer program is stored, and when the program is executed by a processor, implements the method for processing page content as described in any embodiment of the present disclosure, or , to implement the information processing method described in any embodiment of the present disclosure.
  • a method for synchronizing a document including: monitoring an update state of a document according to a document version identifier of a document node in a tree structure of the document; wherein the document includes at least one A content block, the tree structure includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block; the document node records a document version identification sequence , the document version identifier is used to represent the update of the content block belonging to the document;
  • the updated content is provided to the client, so that the client can update the content object.
  • a document synchronization method is provided.
  • the monitoring of the update status of the document according to the document version identifier of the document node in the document tree structure includes:
  • the sequence of document version identifiers of document nodes in the tree structure of the document is monitored, and when a new document version identifier is generated, it is determined that the document generates updated content.
  • a document synchronization method wherein the content block node records a content block version identification sequence, and the method further includes:
  • the document version identifier is added to the document version identifier sequence of the document node.
  • a document synchronization method wherein the content object further includes a content block, and the method further includes:
  • a method for synchronizing a document is provided.
  • the updated content of a content object in the room is provided to the client, including:
  • the newly added content block version identifier of each content block node corresponding to the newly added document version identifier is searched;
  • the updated content of the corresponding content block is determined, and the updated content is provided to the client.
  • a document synchronization method the method further comprising:
  • the client is added to the room corresponding to the content object.
  • a document synchronization method includes:
  • the corresponding document node is determined in the tree structure according to the currently loaded document, and the document node identifier of the document node is determined as the content object pointed to by the room subscription request.
  • a document synchronization method After determining the corresponding document node in the tree structure according to the currently loaded document, the method further includes:
  • the content block node identifier with the reference relationship is determined as the content object pointed to by the room subscription request.
  • a document synchronization method After determining the corresponding document node in the tree structure according to the currently loaded document, the method further includes:
  • the content block node identifier with the reverse reference relationship is determined as the content object pointed to by the room subscription request.
  • a document synchronization method the method further comprising:
  • the updated version identifier is provided to the client.
  • a document synchronization method the method further comprising:
  • the corresponding update content is acquired and fed back to the client.
  • a document synchronization method comprising:
  • a content update request is sent to the server to request the server to determine the document content according to the document version identifier of the content update request; wherein the document includes at least one content block, and the tree structure It includes a document node and a content block node, and the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block; the document node records a document version identification sequence, and the document version identification is used to represent Updates of content blocks attributed to the document;
  • the entity content is acquired to the client.
  • the content update request is sent to the server for the current processing document of the client, including:
  • At least one reference content block of the currently processed document is determined, the document version identifier of the currently processed document and the content block identifier of the reference content block are carried in the update request, and sent to the Sent by the server.
  • the content update request sent to the server for the current processing document of the client includes at least one of the following:
  • a content update request is sent to the server.
  • the content update request is a room addition request or a heartbeat request.
  • the server can operate the tree structure to maintain the document content.
  • the tree structure can also be preloaded, processed locally on the client, and then notified to the server to update .
  • the content management module, the stream management module, and the stream synchronization module can be configured according to requirements, and perform different functions respectively, so as to complete the document processing process based on the tree structure in the client.
  • the document processing method executed by the document processing client includes:
  • the content management module obtains the document content editing event of the current editing document by the user; wherein, the document content editing event includes editing operation and editing content;
  • the content management module determines the corresponding node in the tree structure of the currently edited document in the local cache according to the editing operation and the editing content, and determines the update content corresponding to the node;
  • the content management module determines the operation identifier and the content version identifier added in the node of the tree structure according to the editing operation and the update content;
  • the content management module generates a document update event, and provides it to the stream management module in the document processing client; wherein, the document update event includes the update content, the added operation identifier and the content version identifier;
  • the stream management module caches the document update event in a local queue
  • the stream synchronization module sends the updated content, the added operation identifier and the content version identifier provided by the stream management module to the server to request to update the tree structure and document content stored in the server;
  • the stream synchronization module receives the update notification transmitted by the server, and transmits it to the stream management module in the document processing client;
  • the stream management module performs conflict processing on the document update event in the local cache according to the update notification transmitted by the server;
  • the stream management module notifies the content management module to update the document content and tree structure of the currently edited document according to the document update event, and delete the cached document update event.
  • the flow management module according to the update notification transmitted by the server, performs conflict processing on the document update event in the local cache, which may include:
  • the stream management module identifies that the update notification transmitted by the server is a feedback notification according to the local document update event, it is determined that there is no conflict;
  • the stream management module identifies that the update notification transmitted by the server is generated by a document update event of another client, it will conflict and match the document update event in the update notification with the locally cached document update event to determine whether there is a conflict.
  • a tree structure-based document processing method, apparatus, device, and medium including:
  • the document includes at least one content block
  • the tree structure includes a document node and a content block node
  • the parent-child relationship between the document node and the content block node represents the attribution relationship between the document and the content block
  • the The document node records a sequence of document version identifiers
  • the content block node records a sequence of content block version identifiers
  • the document version identifiers are used to represent updates of content blocks belonging to the document.
  • a document processing method, apparatus, device and medium based on a tree structure the content blocks belonging to the document include a root content block, and the document node also records There is a sequence of content block version identifiers for the root content block.
  • a tree structure-based document processing method, apparatus, device and medium wherein the document node and the content block node are further recorded with an editing operation identification sequence, the editing The operation identifier is used to characterize the editing operation that updates the content block.
  • a tree structure-based document processing method, apparatus, device and medium are provided, the method further comprising:
  • the editing operation identifier and the document version identifier of the document node are updated.
  • a tree structure-based document processing method, apparatus, device, and medium are provided. If the editing operation includes a content update operation of a content block, according to the document editing event The editing operation, update the editing operation identification and content block version identification of the content block node in the tree structure, including:
  • the editing operation identifier and the document version identifier of the document node are updated, including:
  • a tree structure-based document processing method, apparatus, device, and medium are provided, and the corresponding content block is determined according to the editing operation, including:
  • a new document version identifier corresponds to a new content block version identifier one-to-one; or a new document version identifier corresponds to at least two new content block version identifiers added by an editing operation.
  • a method, apparatus, device, and medium for document processing based on a tree structure are provided. If the editing operation includes an operation of adding a content block, then according to the editing operation, Update the edit operation ID and document version ID of the document node described above, including:
  • update the editing operation identifier and the content block version identifier of the content block node in the tree structure including:
  • a new content block node is added to the tree structure, a new content block version identifier is created in the content block node, and the new content block version identifier and the new document version are established The corresponding relationship of the identification.
  • a tree structure-based document processing method, apparatus, device, and medium are provided. If the editing operation includes a content block deletion operation, according to the editing operation, updating the The parent-child relationship between content block nodes and document nodes, including:
  • the editing operation identifier and the document version identifier of the document node are updated, including:
  • a new editing operation identifier is added to the editing operation identifier sequence of the document node, and a new document version identifier is added to the document version identifier sequence of the document node.
  • a tree structure-based document processing method, apparatus, device, and medium are provided. If the document operation event is a version change event, then according to the document operation event, in all Determine the corresponding document node in the tree structure of the current document, including:
  • version change event determine the corresponding document node in the tree structure of the current document, and the document version identifier pointed to by the version change event;
  • executing the document operation event includes:
  • the document version identification based on the version identification snapshot of the tree structure, the content block version identification of each corresponding content block node is searched;
  • the document change event is executed according to the to-be-changed content of each content block node.
  • a tree structure-based document processing method, apparatus, device, and medium are provided. According to the to-be-changed content of each content block node, after executing the document change event, the method Also includes:
  • the to-be-changed content of the document change event add a new editing operation identifier, a content block version identifier and a document version identifier to the document node; and add a new editing operation identifier and a content block to each of the content blocks Version ID.
  • a tree structure-based document processing method, apparatus, device, and medium are provided. If the document operation event is a content block update content push event, then according to the document operation event , determine the corresponding content block node in the tree structure of the current document, including:
  • the content block update content push event determine the corresponding content block node in the tree structure, and the latest document version identifier of the document node to which the content block node belongs;
  • executing the document operation event includes:
  • the content block update content push event is executed according to the updated content block version identifier.
  • Update content block version IDs including:
  • the corresponding content block version identification is searched as the updated content block version identification.
  • a tree structure-based document processing method, apparatus, device, and medium are provided. If the document operation event is a document reading event, then according to the document operation event, in The corresponding content block nodes are determined in the tree structure of the current document, including:
  • the document reading event determine the corresponding document node and content block node in the tree structure, and the to-be-pushed version identifiers of the document node and the content block node;
  • executing the document operation event includes:
  • the pulled entity content of the content block node is provided to the client.
  • a document processing method, apparatus, device and medium based on a tree structure the method further comprising: if the consistency requirement is not met, re-executing in the tree structure An operation of determining corresponding document nodes and content block nodes, as well as to-be-pushed version identifiers of the document nodes and content block nodes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

一种页面内容的处理方法、装置、设备和可读介质。包括:响应于当前页面内目标内容块的连接操作,确定目标内容块的连接内容块(S110);在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用连接标识查看另一方内容块(S120)。实现目标内容块与连接内容块之间的连接,避免在当前页面与原页面之间建立连接时造成的无法直接查看所需要的参考的内容而需要二次跳转查看的问题。另外,还包括一种文档同步方法、装置、设备和介质以及一种基于树结构的文档处理方法、装置、设备和介质。

Description

页面内容的连接、文档同步、文档处理方法、装置及设备
本公开要求于2021年03月01日提交中国国家知识产权局、申请号为202110226980.7、发明名称为“一种页面内容的处理方法、装置、设备和可读介质”的中国专利申请、2021年03月01日提交中国国家知识产权局、申请号为202110227813.4、发明名称为“文档同步方法、装置、设备和介质”的中国专利申请以及2021年03月01日提交中国国家知识产权局、申请号为202110226979.4、发明名称为“一种基于树结构的文档处理方法、装置、设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及信息处理以及计算机文档数据处理技术领域,尤其涉及一种页面内容的连接方法、装置、设备和可读介质、一种文档同步方法、装置、设备和介质、一种基于树结构的文档处理方法、装置、设备和介质。
背景技术
在生成某一页面时,由于该页面内的某一内容或许会与其他页面的内容之间存在一定的逻辑关系,因此需要利用该其他页面的内容来对该内容进行扩展描述,以增强页面内容之间的关联性,保证页面对于用户的可读性。
目前,通常是在一个页面中嵌入另一个页面的链接,以通过该链接访问该另一个页面,在该另一个页面内查找对应的参考内容,存在查看不便等问题。
另外,目前人们已经大量使用计算机软件进行文档处理,且随着协同办公需求的增加,使得文档在线协同处理的技术逐步发展起来。
在线协同处理的文档,可能会存在多个用户需要查看、编辑、或相互引用内容的复杂需求,如何有效实现各个文档的同步更新,且兼顾前端和后端的配合实现成本、如何有效管理多个用户的各种操作,保持文档的准确性和一致性,是相关技术的研究方向。
发明内容
有鉴于此,本公开实施例提供了一种页面内容的处理方法、装置、设备和可读介质,实现不同页面内容块之间的连接,简化页面内容连接的查看复杂性,提高页面内容连接的灵活性。
第一方面,本公开实施例提供了一种页面内容的处理方法,该方法包括:
响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
第二方面,本公开实施例提供了一种信息处理方法,该方法包括:
响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
第三方面,本公开实施例提供了一种页面内容的处理装置,该装置包括:
连接响应模块,用于响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
内容连接模块,用于在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
第四方面,本公开实施例提供了一种信息处理装置,该装置包括:
连接关系记录模块,用于响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
连接内容查找模块,用于响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
连接内容输出模块,用于获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
第五方面,本公开实施例还提供了一种计算机设备,该设备包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开任意实施例中所述的页面内容的处理方法,或者,实现如本公开任意实施例中所述的信息处理方法。
第六方面,本公开实施例提供了一种可读介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开任意实施例中所述的页面内容的处理方法,或者,实现如本公开任意实施例中所述的信息处理方法。
本公开实施例提供的一种页面内容的处理方法、装置、设备和可读介质,通过内容块的方式来搭建页面,响应于当前页面内目标内容块的连接操作,确定目标内容块的连接内容块,然后在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,从而实现目标内容块与连接内容块之间的连接,避免在页面与原页面之间建立连接时造成的无法直接查看所需要的参考内容而需要二次跳转查看的问题,通过任一方内容块的关联位置处展示的连接标识能够直接查看另一方内容块,无需通过原页面跳转查看,从而简化了在一个页面内查看另一个页面的部分内容的查看复杂性,提高页面内容处理的灵活性。
本公开实施例还提供一种文档同步方法、装置、设备和介质,实现了各个文档的同步更新。
第七方面,本公开实施例提供了一种文档同步方法,所述方法包括:
根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述文档版本标识用于表征归属于所述文档的内容块的更新;
在监听到房间的内容对象更新时,确定在所述房间中订阅了内容对象的客户端;其中,所述内容对象包括文档;
根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,以供所述客户端对所述内容对象进行更新。
第八方面,本公开实施例还提供了一种文档同步方法,所述方法包括:
针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新;
获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识;
根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
第九方面,本公开实施例还提供了一种文档同步装置,包括:
第一监听模块,用于根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新;
第一确定模块,用于在监听到房间的内容对象更新时,确定在所述房间中订阅了内容对象的客户端;其中,所述内容对象包括文档;
发送模块,用于根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,以供所述客户端对所述内容对象进行更新。
第十方面,本公开实施例还提供了一种文档同步装置,所述装置包括:
请求发送模块,用于针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述文档版本标识用于表征归属于所述文档的内容块的更新;
版本标识获取模块,用于获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识;
内容获取模块,用于根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
第十一方面,本公开实施例还提供了一种文档同步设备,包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开实施例中任一项所述的文档同步方法。
第十二方面,本公开实施例还提供了一种介质,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现如本公开实施例中任一项所述的文档同步方法。
本公开实施例的技术方案,通过文档节点的文档版本标识对文档的更新状态进行统一监听,在监听到房间的内容对象更新时,将房间中内容对象的更新内容,提供给房间中订阅了内容对象的所有客户端,以使客户端对内容对象进行更新,相较于通过内容块版本标识对文档中的多个内容块分别进行监听,有效降低了服务端的监听压力,从而实现了在降低服务端的监听压力的基础上,有效实现了在线文档的同步更新。
本公开实施例还提供一种基于树结构的文档处理方法、装置、设备和介质,以使在线协同处理的文档满足多种可操作需求。
第十三方面,本公开实施例提供了一种基于树结构的文档处理方法,包括:
获取当前文档的文档操作事件;
根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点和/或内容块节点;
根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件;
其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述内容块节点记录有内容块版本标识序列;所述文档版本标识用于表征归属于所述文档的内容块的更新。
第十四方面,本公开实施例还提供了一种基于树结构的文档处理装置,包括:
第一获取模块,用于获取当前文档的文档操作事件;
第一确定模块,用于根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点和/或内容块节点;
执行模块,用于根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件;
其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述内容块节点记录有内容块版本标识序列;所述文档版本标识用于表征归属于所述文档的内容块的更新。
第十五方面,本公开实施例还提供了一种基于树结构的文档处理设备,包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开实施例中任一项所述的基于树结构的文档处理方法。
第十六方面,本公开实施例还提供了一种介质,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现如本公开实施例中任一项所述的基于树结构的文档处理方法。
本公开实施例通过在当前文档中增加文档节点的文档版本标识,在当前文档执行文档操作事件时,可直接根据文档节点的文档版本标识和内容块节点的内容块版本标识之间的对应关系,对与文档版本标识相对应的所有内容块版本标识的内容块节点执行文档操作事件,实现了对当前文档的统一操作,提升了用户对当前文档的操作便捷性。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1A示出了本公开实施例提供的一种页面内容的处理方法的流程图;
图1B示出了本公开实施例提供的一种页面内容连接过程的界面示意图;
图2A示出了本公开实施例提供的另一种页面内容的处理方法的流程图;
图2B示出了本公开实施例提供的另一种页面内容连接过程的界面示意图;
图3示出了示出了本公开实施例提供的一种信息处理方法的流程图;
图4示出了本公开实施例提供的一种页面内容的处理装置的结构示意图;
图5示出了本公开实施例提供的一种信息处理装置的结构示意图;
图6是本公开实施例提供的一种文档的树结构示意图;
图7是本公开实施例提供的一种文档同步方法的流程图;
图8是本公开实施例提供的另一种文档同步方法的流程图;
图9是本公开实施例提供的又一种文档同步方法的流程图;
图10是本公开实施例提供的一种利用房间更新实现文档同步的流程示意图;
图11是本公开实施例提供的再一种文档同步方法的流程图;
图12是本公开实施例提供的一种利用心跳实现文档同步的流程示意图;
图13是本公开实施例提供的另一种利用心跳实现文档同步的流程示意图;
图14是本公开实施例提供的再一种文档同步方法的流程图;
图15是本公开实施例提供的一种利用补差更新文档的流程示意图;
图16是本公开实施例提供的一种文档同步装置的结构框图;
图17为本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图18是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图19是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图20是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图21是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图22是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图23是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图24是本公开实施例提供的一种基于树结构的文档处理方法的流程图;
图25是本公开实施例提供的一种文档树结构的示意图;
图26是本公开实施例使提供的一种基于树结构的文档处理装置的结构框图;
图27是本公开实施例使提供的一种设备的结构框图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开实施例的保护范围。
应当理解,本公开实施例的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开实施例的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开实施例中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开实施例中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多方之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
图1A示出了本公开实施例提供的一种页面内容的处理方法的流程图,本公开实施例可适用于任一页面内某一内容需要通过连接其他内容来进行协作描述的情况下。本公开实施例提供的一种页面内容的连接处理方法可以由本公开实施例提供的页面内容的处理装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的设备中。
具体的,如图1A所示,本公开实施例中提供的页面内容的处理方法可以包括如下步骤:
S110,响应于当前页面内目标内容块的连接操作,确定目标内容块的连接内容块。
具体的,为了保证页面内容的操作便捷性,本公开实施例采用定义内容块(block)的方式来搭建各个页面,该页面可以为文档页面、网页页面或者应用页面等,本实施例对此不作限定。同时,会按照页面中各个内容之间的上下文联系,来设定页面内用于记录各类信息的内容块。此时该内容块可以为文档的每一段落、表格、图片或者同一项目流程内不同阶段下 的工作对象等,以在页面内可以采用内容块(block)的方式来生产和组织各类符合用户需求的页面内容。
本实施例中,为了支持对页面内的某一内容块能够采用其他已有内容进行多方位描述,来提高该内容块的可读性,可以允许在页面内的某些内容块以及与该内容块之间存在一定内容关联性的各个已有内容块之间建立对应的连接关系,来多方位解释该内容块的信息,从而便于用户更加容易理解该内容块。因此,在进入当前页面后,如果用户需要对某一内容块进行已有内容块的连接,那么会将该内容块作为存在内容连接需求的目标内容块。然后在当前页面内对该目标内容块执行对应的连接操作,以从已有的各个内容块中为该目标内容块选出被连接的内容块。此时响应于该目标内容块的连接操作,会基于按照连接需求所执行的内容块选择操作,确定出该目标内容块的连接内容块。
需要说明的是,本实施例中的连接内容块可以为当前页面内除目标内容块之外的其他内容块,也可以为除当前页面之外的其他页面内的内容块。也就是目标内容块和引用内容块可以处于同一页面内,也可以处于不同页面内。同时,本实施例对于目标内容块和连接内容块的属性和内容类型、分类标签可以不作限定,可以为相同属性或类型下的内容块连接,也可以是不同属性或类型下的内容块连接。例如同一项目流程内目标和目标之间的连接,目标和任务(todo)之间的连接,以及段落和表格之间的连接等。也就是,连接内容块为与目标内容块的内容类型相同或不同,内容块的内容类型可以包括以下至少一项:文字类型的内容块、多媒体类型的内容块、表格类型的内容块、程序类型的内容块。该多媒体类型的内容块可以为图片、gif图、音视频等,此时可以提高内容连接的丰富性。
S120,在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用连接标识查看另一方内容块。
可选的,在确定出目标内容块的连接内容块后,为了便于在目标内容块处能够快速查看该连接内容块,在一些实施例中,可以采用连接标识在目标内容块与连接内容块之间建立对应的连接。示例性地,此时可以在目标内容块的关联位置处展示该连接内容块的连接标识,并在连接内容块的 关联位置处展示该目标内容块的连接标识。示例性地,此时可以在目标内容块与连接内容块之间建立双向连接,也就是在目标内容块与连接内容块中的任一方都能够通过连接标识来查看对方的具体内容,以便用户在当前页面内触发该目标内容块的关联位置处展示的连接标识时,例如用户拖动鼠标在该连接标识上悬停,或者用户点击该连接标识等,会直接在当前页面内展示出该连接标识所指向的该连接内容块的具体内容,使得用户能够在目标内容块的关联位置处直接查看所连接的连接内容块。该连接标识能够保证在当前页面内即可查看所连接的具体内容,相比于仅展示所参考的原文整体的链接或其部分内容,再跳转到所参考内容所在的页面内查找具体参考的内容,能够支持直接查看到所需要参考的内容而不需要二次查找,从而提高了在一个页面内查看另一页面的部分内容的查看效率。另外,在一实施例中,目标内容块和连接内容块之间都可以通过在各自关联位置处的连接标识实现查看另一方的内容,相比于网页超链接等方式中仅能实现单向的连接和内容查看相比,该实施例的查看效率更高。而且,用户在连接内容块所处的页面内触发该连接内容块关联位置处展示的该目标内容块的连接标识时,也会在该连接内容块所处的页面内直接展示出该连接标识所指向的目标内容块的具体内容,使得用户也能够在连接内容块下直接查看对应被连接的目标内容块,从而保证目标内容块和连接内容块之间的快捷查看。
需要说明的是,本实施例中在目标内容块和连接内容块中的其中一方内容块的关联位置处所展示的另一方内容块的连接标识可以为常驻展示,也可以为被用户触发后的操作展示。例如通常情况下隐藏该连接标识,只有用户在点击当前页面内的目标内容块时,才会在该目标内容块的关联位置处显示出连接内容块的连接标识。同时,本实施例中的连接标识可以通过图标(icon)来实现,也可以为任一种可触发的记号,本实施例对此不作限定。
进一步的,为了准确区分目标内容块和连接内容块中的连接方向,也就是准确判断是目标内容块主动连接该连接内容块,还是连接内容块主动连接目标内容块,在一些实施例中,可以对目标内容块和连接内容块的关 联位置处展示的连接标识进行区分,将连接标识分为主动连接标识和被动连接标识两种。此时在目标内容块和连接内容块中的任一方内容块的关联位置处展示另一方内容块的连接标识,可以具体为:在目标内容块的关联位置处展示已连接该连接内容块的主动连接标识,以在当前页面内利用主动连接标识查看该连接内容块;在连接内容块的关联位置处展示被目标内容块连接的被动连接标识,以在连接内容块的所处页面内利用被动连接标识查看该目标内容块。
在一些实施例中,在目标内容块连接该连接内容块后,会在目标内容块和连接内容块的关联位置处分别展示不同类型的连接标识。如图1B所示,来表示目标内容块和连接内容块之间的连接方向。此时在目标内容块的关联位置处展示主动连接标识,表示目标内容块主动连接其他内容块,并在当前页面内可以通过触发该主动连接标识来查看对应的连接内容块的具体内容。而在连接内容块的关联位置处展示被动连接标识,来表示该连接内容块被其他内容块引用,并在连接内容块的所处页面内可以通过触发该被动连接标识来查看对应的目标内容块的具体内容。
需要说明的是,本实施例中的主动连接标识和被动连接标识可以通过标识样式来区分,例如颜色、形状等,也可以通过标识在内容块的所处位置来区分,例如主动连接标识可以处于内容块上方,而被动连接标识可以处于内容块下方。
本公开实施例提供的技术方案,通过内容块的方式来搭建页面,响应于当前页面内目标内容块的连接操作,直接确定目标内容块的连接内容块,然后在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,从而实现目标内容块与连接内容块之间的连接,避免在页面与原页面之间建立连接时造成的无法直接查看所所需要的参考内容而需要二次跳转查看的问题。通过任一方内容块的关联位置处展示的连接标识能够直接查看另一方内容块,无需通过原页面跳转查看,从而简化了在一个页面内查看另一页面的部分内容的查看复杂性,提高页面内容处理的灵活性。
在上述方案的基础上,为了确保用户在当前页面内准确执行目标内容 块的连接操作,本实施例在响应于当前页面内目标内容块的连接操作,确定目标内容块的连接内容块之前,还可以包括:在当前页面内创建目标内容块,并为目标内容块配置对应的连接控件,以利用连接控件执行连接操作。
在一些实施例中,在采用内容块(block)的方式搭建当前页面时,会按照用户需求在当前页面内创建符合要求承载各个页面信息的各个内容块。此时在创建出目标内容块后,会直接在当前页面内为该目标内容块设置对应的连接控件,该连接控件可以为目标内容块尾部设置的对齐按钮等。此时用户通过触发该连接控件,例如点击该连接控件等,则可以执行该目标内容块的连接操作,保证当前页面内各个内容块连接操作的准确执行。
图2A示出了本公开实施例提供的另一种页面内容的连接方法的流程图,本实施例在上述实施例提供的各个可选方案的基础上进行优化。具体的,对于页面内创建的任一内容块而言,均可以被其他内容块连接,也可以连接其他内容块。此时为了快速区分任一内容块的具体连接情况,本实施例中在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识时,任一方内容块的关联位置处展示的连接标识至少可以包括以下一项或者两项:1)该任一方内容块被其他内容块连接后的被动连接标识;2)该任一方内容块连接其他内容块后的主动连接标识。在本实施中主要对于目标内容块的连接内容块的具体确定过程以及任一内容块下所展示的连接标识的具体处理过程进行详细的介绍。
可选的,如图2A所示,本实施例中的方法可以包括如下步骤:
S210,响应于当前页面内目标内容块的连接操作,展示对应的连接查找界面。
可选的,用户在当前页面内为目标内容块连接其他内容块时,会通过该目标内容块配置的连接控件执行对应的连接操作。此时为了保证连接内容块的筛选便捷性,本实施例响应于当前页面内目标内容块的连接操作,如图2B所示,会直接在当前页面内该目标内容块的界面位置处展示对应的连接查找界面。该连接查找界面可以设置为弹窗,也可以设置为在当前页面的上层新显示的搜索页面,本实施例对此不作限定。此时该连接查找界 面能够通过输入具体的连接信息来搜索显示当前页面或者其他页面内与本次连接相关的各个内容块,由用户从各个内容块中筛选该目标内容块的连接内容块,从而保证页面内连接内容块的便捷性。
S220,在连接查找界面内展示一个以上的内容块,响应于对一个以上的内容块的选择操作,将选中的内容块确定为目标内容块的连接内容块。
可选的,为了快速从连接查找界面内筛选出连接内容块,本实施例会在该连接查找界面内展示一个以上的内容块,此时所展示的一个以上的内容块可以为该目标内容块的关联内容块,也可以是通过输入连接关键字后,响应于所输入的连接关键字所搜索出的内容块。此时,通过对该连接查找界面内所展示的一个以上的内容块执行对应的选择操作,进而响应于对一个以上的内容块的选择操作,能够确定出从所展示的一个以上的内容块中选中的内容块,并将所选中内容块作为目标内容块的连接内容块。
需要说明的是,本实施例中连接查找界面内展示目标内容块关联的一个以上的内容块,可以是展示满足预设条件的内容块,例如最近查看的内容块等,也可以是所有内容块,例如通过滚动条等切换各个内容块。
示例性的,本实施例在该连接查找界面内设置有对应的搜索框,使得用户能够在该搜索框内输入目标内容块需要连接的内容块的具体信息,依次快速查找对应的连接内容块。此时本实施例中的连接信息主要为能够表示该目标内容块需要连接的内容块的关键字,如图2B所示,通过在连接查找界面内的搜索框内输入该连接关键字,可以在各个页面内已生成的各个内容块中查找出符合该连接关键字要求的各个关联内容块,并展示在该连接查找界面内。用户通过查看所展示的各个关联内容块的具体内容,从各个关联内容块中选中该目标内容块的连接内容块,此时按照用户在各个关联内容块中所执行的选中操作,本实施例能够直接确定出该目标内容块的连接内容块,保证页面内容连接的准确性。
S230,在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用连接标识查看另一方内容块。
S240,响应于预设操作,在当前页面的预设区域内展示目标内容块关联的各内容块。
可选的,如果当前页面内目标内容块会连接其他内容块,也会被其他内容块连接,那么该目标内容块的关联位置处所展示的连接标识会存在被其他内容块引用后的被动连接标识,和连接其他内容块后的主动连接标识两种。此时如图2B所示,本实施例中的预设操作能够触发目标内容块关联的各内容块进行展示。该预设操作可以为目标内容块的关联位置处所展示的任一连接标识的触发操作,也可以为显示模式切换操作、或者触发预设的操作控件等。此时,对于触发目标内容块的关联位置处所展示的任一连接标识,例如点击该连接标识,或者鼠标悬停在该连接标识的位置等,来触发预设操作时,能够查看该目标内容块关联连接的各个内容块。此时关联连接可以表示被目标内容块连接和连接该目标内容块两种,此时响应于目标内容块的关联位置处所展示的任一连接标识的触发操作,本实施例会在当前页面的预设区域内展示被该目标内容块连接的各个内容块,以及连接该目标内容块的各个内容块。也就是该目标内容块的关联位置处展示的主动连接标识和被动连接标识对应的各个内容块,而主动连接标识和被动连接标识对应的内容块的显示样式可以不同。例如该目标内容块主动连接和被动连接的内容块可以分区展示,也可以分别设置对应的标记。此时该预设区域可以为当前页面上下左右各个方向的侧边栏,或者当前页面的下半部显示区域或上半部显示区域。在当前页面的侧边栏可以按照各个连接标识的类型,对应展示出目标内容块在不同连接类型下的各内容块,例如在预设区域内分区展示目标内容块主动连接和被动连接的内容块。也可以高亮显示内容块展示时所执行的预设操作指定的连接标识对应的内容块,例如将被目标内容块连接的各内容块和连接该目标内容块的各内容块在侧边栏内分区展示。同时可以直接高亮显示出用户所触发的连接标识对应的内容块,以使用户能够直观查看当前触发的内容块。
在一些实施例中,为了能够直接查看被触发的引用图标对应的内容块,在当前页面的预设区域内展示目标内容块关联引用的各内容块时,还可以分析所触发的引用图标对应的内容块,然后在当前页面的侧边栏中只显示该被触发的引用图标对应的内容块。
作为本实施例的一种可选方式,在当前页面的预设区域内展示目标内 容块关联连接的各内容块时,具体可以为:查看目标内容块的连接属性信息内记录的各连接关系,以按照各连接关系对应的删除标识确定目标内容块关联的各内容块是否已被删除;在当前页面的预设区域内展示目标内容块关联的未被删除的内容块。
由于在目标内容块和连接内容块之间建立连接关系后,所连接的某一内容块在后续操作过程中可能会被删除,此时为了避免采用写扩散的方式来删除不同内容块之间的连接而需要不断修正已存储的全部连接数据时造成的数据处理压力。本实施例在目标内容块和连接内容块之间建立连接时,可以分别在目标内容块和连接内容块的连接属性信息内记录对应的连接关系,通过该连接关系对应的删除标识,来标记所连接的内容块是否已被删除。此时该删除标识可以记载在各个内容块的连接属性信息中,也可以记载在其他数据区域内,对此不作限定。因此本实施例在当前页面的预设区域内展示目标内容块关联连接的各内容块时,为了保证连接内容块的展示准确性,首先会从目标内容块的连接属性信息内查找出已记录的各个连接关系,然后分析每一连接关系对应的删除标识所标记的该目标内容块所关联连接的各个内容块是否被删除,进而筛选出未被删除的内容块,并展示在当前页面的预设区域内,从而避免目标内容块关联连接的各内容块的无效展示。
进一步的,为了保证所连接的内容块是否被删除的准确性,本实施例在响应于当前页面内目标内容块的连接操作,确定目标内容块的连接内容块之后,可以直接在目标内容块和连接内容块的连接属性信息内分别记录两者之间的连接关系,并对目标内容块和连接内容块中的其中一方内容块的连接关系设置另一方内容块的删除标识,并记载于该连接关系对应的连接属性信息或者其他数据区域内。也就是在目标内容块和连接内容块中任一方内容块的连接关系下通过该删除标识来标记所连接的另一方内容块是否被删除,在目标内容块和连接内容块之间刚开始建立连接时,该目标内容块和连接内容块中任一方内容块的连接关系下的删除标识均为“未删除”,后续响应于目标内容块的删除操作,可以按照目标内容块的连接属性信息内已记录的连接关系,查找出与该目标内容块连接的各个内容块,进 而更新所查找出的各个内容块为目标内容块设置的删除标识。例如,如果在后续操作过程中检测到目标内容块被用户删除,则根据该目标内容块下的连接属性信息内所记录的各个连接关系,确定该目标内容块连接的各个内容块,并在连接的各个内容块下的连接属性信息内记录的各个连接关系中,查找出与该目标内容块之间的连接关系,进而将该连接关系中对应设置的删除标识修改为“已删除”,以确保内容块连接的准确性。
进一步的,为了实现预设区域内目标内容块关联连接的内容块的区别展示,本实施例也可以针对所触发的连接标识的连接类别,例如主动连接标识和被动连接标识,在当前页面的预设区域内展示目标内容块在该连接类别下关联的各个内容块,例如用户触发的连接标识为主动连接标识,那么在当前页面的预设区域内会展示已经被该目标内容块连接的,即各个主动连接标识对应的全部内容块。而如果用户触发的连接标识为被动连接标识,那么在当前页面的预设区域内会展示已经连接该目标内容块的,即各个被动连接标识对应的全部内容块;从而将该目标内容块下展示的主动连接标识和被动连接标识对应的内容块进行分批展示。
需要说明的是,本实施例中的目标内容块下展示的每一连接标识会具有与该连接标识关联的内容块类别匹配的分类标签,此时连接内容块与目标内容块的关联位置处展示的连接标识的分类标签相同或不同。例如在整个项目工作流程下,该连接标识的分类标签可以包括以下至少一项:目标、任务、报告,该项目、任务和报告共同组成一个项目流程。此时,在当前页面的预设区域内展示目标内容块关联连接的各内容块,具体可以为:在当前页面的预设区域内,按照所触发的引用图标的分类标签,过滤展示目标内容块关联连接的各内容块。也就是说,用户在触发目标内容块的关联位置处所展示的任一连接标识后,首先会分析所触发的该连接标识关联的内容块类别。然后确定出该连接标识的分类标签,进而在当前页面的预设区域内无需展示全部关联连接的各内容块,而会在该目标内容块关联连接的各个连接标识中,查找出属于该分类标签下特定连接标识所关联的各个内容块来展示。例如如果用户触发的连接标识的分类标签为目标类型,那么会从该目标内容块下所展示的各个连接标识中查找出属于该目标类型的 特定连接标识,然后在预设区域内展示与该目标类型的特定连接标识所关联的各个内容块。
S250,响应于预设区域内所展示的内容块的触发操作,从当前页面跳转至该内容块的所处页面。
可选的,在当前页面的预设区域内展示目标内容块关联连接的各内容块后,为了详细查看目标内容块关联连接的各内容块的具体内容,用户可以在当前页面的预设区域内,触发所展示的该目标内容块关联连接的各个内容块。此时响应于预设区域内所展示的任一内容块的触发操作,可以直接从当前页面跳转至该内容块的所处页面,从而实现页面内容连接的快速跳转。示例性的,在从当前页面跳转至该内容块的所处页面时,可以直接从当前页面跳转至该内容块的所处页面中该内容块所在位置处,以便于快速展示所触发的内容块。
本公开实施例提供的技术方案,通过内容块的方式来搭建页面,响应于当前页面内目标内容块的连接操作,确定目标内容块的连接内容块,然后在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,从而实现目标内容块与连接内容块之间的连接,避免在页面与原页面之间建立连接时造成的无法直接查看所需要的参考连接内容而需要二次跳转查看的问题。通过任一方内容块的关联位置处展示的连接标识能够直接查看另一方内容块,无需通过原页面跳转查看,从而简化了在一个页面内查看另一页面的部分内容的查看复杂性。同时直接采用连接标识在两个内容块之间建立连接关系,保证提高页面内容连接后的同步更改,提高页面内容连接的灵活性。
图3示出了示出了本公开实施例提供的一种信息处理方法的流程图,本公开实施例可适用于任一页面内某一内容需要通过连接其他内容来进行协作描述的情况下。本公开实施例提供的一种信息处理方法可以由本公开实施例提供的信息处理装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的设备中。
具体的,如图3所示,本公开实施例中提供的页面内容的连接方法可以包括如下步骤:
S310、响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系。
本实施例中,为了支持对页面内的某一内容块能够采用其他已有内容进行多方位描述,来提高该内容块的可读性,会允许在页面内的每一内容块以及与该内容块之间存在一定内容关联性的各个已有内容块之间建立对应的连接关系,来多方位解释该内容块的信息,从而便于用户更加容易理解该内容块。因此,在进入当前页面后,如果用户需要在第一内容块和第二内容块之间进行连接,那么会在第一内容块和第二内容块之间执行对应的连接操作。此时为了保证内容块连接的准确操作,存在实时检测第一内容块和第二内容块之间的连接关系是否发生变更的需求,因此响应于将第一内容块和第二内容块进行连接的连接操作,会在第一内容块的连接属性信息和第二内容块的连接属性信息中分别记录两者之间的连接关系,并通过第一内容块和第二内容块中任一方内容块下的连接属性信息中所记录的连接关系对应设置的删除标识来标记另一方内容块是否在后续操作过程中被删除。此时无需删除被删除内容块相关的各个连接关系,从而避免采用写扩散的方式来删除不同内容块之间的连接而需要不断修正已存储的全部连接数据时存在大量数据处理操作的现象,在保证内容块连接准确性的基础上,极大降低了删除某一内容块后而需要删除该内容块相关的连接时的数据处理压力、减少出错概率。
需要说明的是,本实施例中第一内容块和第二内容块中的其中一方内容块对应的连接关系下,可以在连接属性信息或者其它数据区域内对应设置另一方内容块的删除标识,以判断另一方内容块是否被删除。此时通过判断该删除标识为“未删除”还是“已删除”,来分析该连接关系的有效性,也能够获知所连接的内容块是否已经取消连接。
此时,若第一内容块和第二内容块为文档内容,那么为了保证第一内容块和第二内容块进行连接后的连接属性准确性,本实施例还会更新文档结构中第一内容块和第二内容块的连接属性信息,以保证文档结构与内容块连接之间的一致性。需要说明的是,本实施例中的第一内容块和第二内 容块可以属于同一文档或者不同文档,对此不作限定。
S320,响应于第一内容块的连接内容块输出请求,查找第一内容块的连接属性信息以确定与第一内容块连接的内容块。
可选的,在第一内容块和第二内容块下的连接属性信息内分别记录两者之间的连接关系之后,还可能接收到用于对于第一内容块所连接的内容块的展示请求。此时会接收到第一内容块的连接内容块输出请求,该输出请求可以为对第一内容块的关联位置处展示的连接标识的触发操作,或者用于展示连接内容块的预设模式的开启操作而产生的输出请求。进而响应于第一内容块的连接内容块输出请求,可以查找该第一内容块的连接属性信息,该连接属性信息内记录有与第一内容块连接的各个内容块的连接关系,通过各个连接关系即可查找出与第一内容块连接的各内容块,后续继续判断与第一内容块连接的各内容块是否被删除,来保证内容块展示的准确性。
S330,获取与第一内容块连接的内容块的内容数据信息,输出内容数据信息。
可选的,在确定出与第一内容块连接的各个内容块后,在每一内容块对应的连接属性信息或者其他数据区域内,可以查找出该内容块的内容数据信息,该内容数据信息可以为对应的删除标识所指示的具体内容块,以此判断该内容块是否被删除。此时作为本实施例的一种可选方案,在获取与第一内容块连接的内容块的内容数据信息时,也可以获取第一内容块为所连接的各个内容块设置的删除标识,通过该删除标识判断所连接的内容块是否被删除,进而在与第一内容块连接的内容块未被删除时,输出该内容块的内容数据信息。也就是若与第一内容块连接的内容块已被删除,那么该内容块的内容数据信息为“不输出内容”,以确保内容块输出展示的准确性。
此外,在内容块的后续操作过程中,可能还会对第一内容块进行删除,此时响应于第一内容块的删除操作,根据第一内容块的连接属性信息,确定与第一内容块连接的内容块,并更新第一内容块连接的内容块为所述第一内容块设置的删除标识。也就是,通过第一内容块的连接属性信息内的 各个连接关系查找出与第一内容块连接的各内容块,然后将与第一内容块连接的每一内容块为该第一内容块所设置的删除标识修改为“已删除”,并将第一内容块的内容数据信息修改为“不输出内容”,以确保后续连接内容块的展示准确性。
本公开实施例提供的技术方案,通过内容块的方式来搭建页面,响应于第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录第一内容块和第二内容块的连接关系。然后响应于第一内容块的连接内容块输出请求,查找第一内容块的连接属性信息以确定与第一内容块连接的内容块,并获取与第一内容块连接的内容块的内容数据信息,输出内容数据信息。从而实现目标内容块与连接内容块之间的连接关系的准确检测和连接内容块的准确输出,避免采用写扩散的方式来删除不同内容块之间的连接而需要不断修正已存储的全部连接数据时存在大量数据处理操作的现象,在保证内容块连接准确性的基础上,极大降低了删除某一内容块后而需要删除该内容块相关的连接时的数据处理压力。
图4示出了本公开实施例提供的一种页面内容的处理装置的结构示意图,本公开实施例可适用于任一页面内某一内容需要通过连接其他内容来进行协作描述的情况下,该装置可以通过软件和/或硬件来实现,并集成在执行本方法的设备中。如图4所示,本公开实施例中的页面内容的处理装置,具体可以包括:
连接响应模块410,用于响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
内容连接模块420,用于在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
本公开实施例提供的技术方案,通过内容块的方式来搭建页面,响应于当前页面内目标内容块的连接操作,直接确定目标内容块的连接内容块,然后在目标内容块和连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,从而实现目标内容块与连接内容块之间的连接, 避免在页面与原页面之间建立连接时造成的无法直接查看所需要的参考内容而需要二次跳转查看的问题。通过任一方内容块的关联位置处展示的连接标识能够直接查看另一方内容块,无需通过原页面跳转查看,从而简化了在一个页面内查看另一个页面的部分内容的查看复杂性,提高页面内容处理的灵活性。
进一步的,上述内容连接模块420,可以具体用于:
在所述目标内容块的关联位置处展示已连接所述连接内容块的主动连接标识,以在当前页面内利用所述主动连接标识查看所述连接内容块;
在所述连接内容块的关联位置处展示被所述目标内容块连接的被动连接标识,以在所述连接内容块的所处页面内利用所述被动连接标识查看所述目标内容块。
进一步的,上述连接响应模块410,可以具体用于:
响应于当前页面内目标内容块的连接操作,展示对应的连接查找界面;
在所述连接查找界面内展示一个以上的内容块,响应于对所述一个以上的内容块的选择操作,将选中的内容块确定为所述目标内容块的连接内容块。
进一步的,上述目标内容块和连接内容块中的任一方内容块的关联位置处展示的连接标识至少包括以下一项或两项:
该任一方内容块被其他内容块连接后的被动连接标识;
该任一方内容块连接其他内容块后的主动连接标识。
进一步的,上述页面内容的连接装置,还可以包括:
连接展示模块,用于响应于预设操作,在当前页面的预设区域内展示所述目标内容块关联的各内容块;
页面跳转模块,用于响应于所述预设区域内所展示的任一内容块的触发操作,从当前页面跳转至该内容块的所处页面。
进一步的,上述页面跳转模块,可以具体用于:
从当前页面跳转至该内容块的所处页面中该内容块所在位置处。
进一步的,上述连接展示模块,可以具体用于:
查看所述目标内容块的连接属性信息内记录的各连接关系,以按照各 连接关系对应的删除标识确定所述目标内容块关联的各内容块是否已被删除;
在当前页面的预设区域内展示所述目标内容块关联的未被删除的内容块。
进一步的,所述连接关系对应设置的删除标识记载在该连接关系指定的内容块的连接属性信息或者其他数据区域内。
进一步的,上述页面内容的连接装置,还可以包括:
连接关系记录模块,用于在所述目标内容块和所述连接内容块的连接属性信息内分别记录两者之间的连接关系。
进一步的,上述页面内容的连接装置,还可以包括:
内容块删除模块,用于响应于所述目标内容块的删除操作,按照所述目标内容块的连接属性信息内已记录的连接关系,确定与所述目标内容块连接的内容块,并更新所确定的内容块为所述目标内容块设置的删除标识。
进一步的,上述预设区域包括所述当前页面的侧边栏,或下半部显示区域,或上半部显示区域,所述预设区域内分区展示所述目标内容块主动连接和被动连接的内容块,且高亮显示所述预设操作指定的连接标识对应的内容块。
进一步的,上述目标内容块的关联位置处展示的每一连接标识具有与该连接标识关联的分类标签;相应的,上述连接展示模块,可以具体用于:
在当前页面的预设区域内,按照所触发的连接标识的分类标签,过滤展示所述目标内容块关联连接的各内容块。
进一步的,上述当前页面包括文档。
进一步的,上述页面内容的连接装置,还可以包括:
内容块创建模块,用于在当前页面内创建所述目标内容块,并为所述目标内容块配置对应的连接控件,以利用所述连接控件执行所述连接操作。
进一步的,上述连接内容块为当前页面内除所述目标内容块之外的其他内容块,或者除当前页面之外的其他页面内的内容块。
进一步的,所述连接内容块与所述目标内容块的内容类型相同或不同,所述连接内容块与所述目标内容块的关联位置处展示的连接标识的分类标 签相同或不同。
进一步的,所述内容块的内容类型包括以下至少一项:
文字类型的内容块、多媒体类型的内容块、表格类型的内容块、程序类型的内容块;
所述分类标签包括以下一项或多项:目标、任务、报告。
本公开实施例提供的页面内容的处理装置,与上述实施例提供的页面内容的处理方法属于同一发明构思,未在本公开实施例中详尽描述的技术细节可参见上述实施例,并且本公开实施例与上述实施例具有相同的有益效果。
图5示出了本公开实施例提供的一种信息处理装置的结构示意图,本公开实施例可适用于任一页面内某一内容需要通过连接其他内容来进行协作描述的情况下,该装置可以通过软件和/或硬件来实现,并集成在执行本方法的设备中。如图5所示,本公开实施例中的信息处理装置,具体可以包括:
连接关系记录模块510,用于响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
连接内容查找模块520,用于响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
连接内容输出模块530,用于获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
本公开实施例提供的技术方案,通过内容块的方式来搭建页面,响应于第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录第一内容块和第二内容块的连接关系,然后响应于第一内容块的连接内容块输出请求,查找第一内容块的连接属性信息以确定与第一内容块连接的内容块,并获取与第一内容块连接的内容块的内容数据信息,输出内容数据信息,从而实现目标内容块与连接内容块之间的连接关系的准确检测和连接内容块的准确输出,避免 采用写扩散的方式来删除不同内容块之间的连接而需要不断修正已存储的全部连接数据时存在大量数据处理操作的现象,在保证内容块连接准确性的基础上,极大降低了删除某一内容块后而需要删除该内容块相关的连接时的数据处理压力。
进一步的,上述信息处理装置,还可以包括:
内容块删除模块,用于响应于所述第一内容块的删除操作,根据所述第一内容块的连接属性信息,确定与所述第一内容块连接的内容块,并更新所述第一内容块连接的内容块为所述第一内容块设置的删除标识。
进一步的,上述信息处理装置,还可以包括:
文档结构更新模块,用于更新文档结构中所述第一内容块和所述第二内容块的连接属性信息。
进一步的,所述第一内容块和所述第二内容块属于同一文档或者不同文档。
本公开实施例提供的信息处理装置,与上述实施例中提供的信息处理方法属于同一发明构思,未在本公开实施例中详尽描述的技术细节可参见上述实施例,并且本公开实施例与上述实施例具有相同的有益效果。
本公开实施例适用于对在线文档的处理,可以由文档同步装置来执行,该装置可以采用硬件和/或软件的方式实现。该装置可配置于具有存储和计算能力的电子设备中,例如,可集成于服务端中,由服务端对在线文档进行处理,由此来响应用户通过客户端对在线文档的编辑操作。适用于由服务端为多个客户端提供在线文档编辑、查阅等服务的场景,文档的实体内容和树结构存储于服务端。
为了清楚介绍本公开实施例的技术方案,首先介绍本公开实施例所适用的文档的树结构。对于文档(Page),其可包括各种形式的文档内容,例如文字、图片、表格、链接和表格等各种多媒体实体内容,这些实体内容均归属于该文档。为了方便某些实体内容在多个地方被引用,因此将实体内容独立为内容块(Block),能够以内容块为单位方便地被其他文档或内容块引用。内容块是一份具有独立可协同、可记录能力的数据。所谓引用关系,是指源文档中的源内容块被其他目的文档或目的内容块所引用的关 系,在目的文档或目的内容块中,可以复制源内容块的内容,同时可选的有或没有标记来向用户展示此引用关系。内容块的定义可以由在线文档软件预先设置,也可以由用户自定义设置,例如,可基于内容类型,区分内容块,如文字、图片、表格等为不同类型的内容;还可以基于预设的分隔符区分内容块,如“回车符”、“段落分隔符”、“分节符”等;还可以由用户操作设置内容块的分隔边界。
每个文档对应有树结构,服务端通过树结构、或树结构的等同物来对文档进行管理。多个文档的树结构可通过引用等关联关系而结合在一起。图6是本公开实施例提供的一种文档的树结构示意图。参考图6所示,简单示出了一个文档的树结构。该文档包括两个内容块,一个为根内容块,另一个为非根节点的其他内容块。所谓根内容块,是文档创建时产生的基础内容,一篇文档可以只有一个根内容块。其他内容块是归属于文档的非根内容块,可以在创建时,基于模板与根内容块一起产生,也可以是创建后由用户逐步添加的内容块。如图6所示,树结构包括两类节点,即文档节点和内容块节点。文档节点(R节点)对应于文档,同时也对应于文档的根内容块。内容块节点(A节点)对应于内容块A。
在树结构中,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系。即,A节点的父节点为R节点,R节点的子节点为A节点,两者之间存在父子关系。
文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的每个内容块的更新。具体如图6所示,A节点包括内容块版本标识序列,即RV序列,内容块版本标识也称为版本记录(Record Version,简称RV),用于记录内容块内容发生变化的各个版本。归属于文档的内容块中包括一个根内容块,文档节点还记录有根内容块的内容块版本标识序列。如果R节点包括根内容块,因此也可以包括RV序列,当然,如果文档节点不包括根内容块,而将基础内容块也作为一个内容块子节点,则文档节点可以不包括RV序列。如图6所示,文档节点还记录有文档版本标识序列,即TV序列,TV用于表征归属于该文档的内容块的更新。例如,每个内容块节点的新增RV,均可以导 致新增TV。
在树结构中,还可以进一步记录编辑操作标识(TID,Transaction ID),编辑操作代表一次事务操作,该事务操作可导致内容块的内容变化或其他树结构发生变化的操作。如图6所示,可选的,文档节点和内容块节点还记录有编辑操作标识序列,编辑操作标识用于表征更新内容块的编辑操作。TV可以与每个节点的RV一一对应记录;或者,当一个编辑操作导致多个内容块的RV发生变化时,也可以是一个TV记录一个TID对应的多个RV。
在树结构中,可以记录有树结构快照的表格,即对于每个TV,记录该TV状态下,该文档所有内容块的最新RV。树结构快照还可以记录该TV所对应的新增RV。本公开实施例对快照的形式不做限制,例如可以通过表格的形式记录快照。
树结构的节点除了记录内容块和文档之间的关系,以及版本变化外,还对应记录内容块的实体内容,每个内容块节点可对应记录每个RV相当于前一个RV,该内容块的实体变化内容。
图7是本公开实施例提供的一种文档同步方法的流程图。该方法可以由配置于电子设备中的文档同步装置来执行。该电子设备可以为终端设备,优选可以是服务端设备。对于在线协同处理文档的情况,优选由服务端进行各个文档的内容和树结构存储,并向各客户端提供更新服务。如图7所示,本实施例中的方法包括如下步骤:
S710、根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系。文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的每个内容块的更新。在此需要说明的是,文档版本标识序列由文档节点的文档版本标识组成,在文档中的其中一个内容块发生更新时,即相当于文档产生一次更新内容时,在内容块节点的内容块版本标识序列中添加一个新的内容块版本标识,同时也在该文档节点的文档版本标识序列中添加一个新的文档版本标识。
每个内容块的更新过程,指的是对每个内容块的实体内容发生变化的过程。示例性地,对内容块中的实体内容进行增加、删除和修改,均可称为内容块的更新。需要说明的是,在文档中内容块的实体内容发生更新时,该文档所对应文档节点的文档版本标识也会更新。可以理解为,在对内容块更新一次,相应的文档版本标识也会更新一次,即在文档节点的文档版本标识序列中添加一个新的文档版本标识。
在实施例中,服务端可以根据文档节点的文档版本标识,对文档的更新状态进行监听的过程,可以包括:监听树结构中文档节点的文档版本标识序列,在产生新的文档版本标识时,确定文档产生更新内容。
在实际操作过程中,服务端实时或周期性地监听树结构中文档节点的文档版本标识序列,确定文档版本标识序列中是否添加新的文档版本标识,在文档版本标识序列中产生新的文档版本标识时,根据文档版本标识确定对应的内容块版本标识,并按照内容块版本标识确定发生更新的内容块,并对更新的内容块的实体内容进行分析处理,以确定内容块的更新内容块。其中,内容块版本标识用于表征内容块的更新信息,例如更新次数,即内容块版本标识序列中包含内容块版本标识的数量,与该内容块的更新次数相同。可以理解为,对文档的更新状态的监听过程,指的是对文档中每个内容块的实体内容进行监听的过程,在其中一个内容块的实体内容发生更新时,该文档产生更新内容。
S720、在监听到房间的内容对象更新时,确定在房间中订阅了内容对象的客户端。
其中,内容对象包括文档。在此需要说明的是,客户端可以根据自身需求向服务端发送请求,以加入到一个或多个内容对象的房间,即相当于订阅了该房间所监听内容对象的更新。其中,每个房间中可以包括一个或多个内容对象,对此并不进行限定。在实际操作过程中,在服务端监听到某个房间中的内容对象发生更新时,查询在该房间中订阅了内容对象的所有客户端。
在此需要说明的是,文档版本标识用于记录归属于本文档中的更新内容,可以记录或不记录本文档中的引用文档或引用内容块的更新内容。若 设定为文档版本标识不记录引用文档和引用内容块的更新内容,即在本文档中的引用文档或引用内容块的实体内容发生更新时,本文档所对应的文档版本标识不进行更新。可以理解为,在订阅内容对象时,需要订阅文档的文档版本标识以及分别订阅文档中引用内容块的内容块版本标识。其中,与文档节点存在归属关系的内容块节点,都是在文档中的;文档中被引用的内容块,并非通过树结构中的归属关系或父子关系进行记录,而是通过专用的引用节点进行记录,引用节点作为引用文档的子节点,且作为被引用源文档或源内容块节点的父节点。
S730、根据房间中内容对象的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
在此需要说明的是,在服务端确定房间中订阅了内容对象的所有客户端之后,服务端可以将内容对象的更新内容推送至客户端,以使客户端对内容对象进行更新。当然,客户端也可以向服务端拉取房间中内容对象的更新内容,以对本地缓存的内容对象进行更新。在此需要说明的是,在服务端向客户端推送的更新内容的大小达到一定预设值,可以通过客户端向服务端发送拉取请求,以使客户端主动向服务端拉取更新内容,以对客户端本地缓存的内容对象进行更新。
本实施例公开的技术方案,通过文档节点的文档版本标识对文档的更新状态进行统一监听,在监听到房间的内容对象更新时,将房间中内容对象的更新内容,统一提供给房间中订阅了内容对象的所有客户端,以使客户端对内容对象进行更新。相较于通过内容块版本标识对文档中的多个内容块分别进行监听,有效降低了服务端的监听压力,从而实现了在降低服务端的监听压力的基础上,有效实现了在线文档的同步更新。同时,通过文档版本标识对文档的更新状态进行监听,并在房间的内容对象更新时,向订阅了内容对象的客户端提供更新内容,相比于传统的订阅机制,增加了保护顺序的功能,并且依靠版本机制实现了去重防丢。
图8是本公开实施例提供的另一种文档同步方法的流程图。本实施例是在上述实施例的基础上,对文档同步方法作进一步的限定。本实施例中以内容块节点记录有内容块版本标识序列,以及内容对象还包括内容块为 例,对文档同步的过程进行说明。如图8所示,本实施例中的文档同步方法包括如下步骤:
S810、根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的内容块的更新。
S820、在监听到房间的内容对象更新时,确定在房间中订阅了内容对象的客户端。
其中,内容对象包括文档。
S830、根据树结构中文档节点的文档版本标识,基于树结构的版本标识快照,查找新增的文档版本标识所对应的每个内容块节点的新增内容块版本标识。
其中,版本标识快照,指的是文档节点的文档版本标识序列中当前最新的文档版本标识,与文档中所包含的每个内容块所对应内容块节点当前最新的内容块版本标识之间所建立的对应关系。示例性地,假设文档节点1所对应的文档中包含3个内容块,分别为内容块B1、内容块B2和内容块B3。其中,文档节点1的文档版本标识序列中包含8个文档版本标识,分别为0、1、2、3、4、5、6和7(即文档版本标识7表示最新的文档版本标识)。内容块B1所对应内容块节点的内容块版本标识序列中包含两个内容块版本标识,分别为0和1(即内容块B1最新的内容块版本标识为1)。内容块B2所对应内容块节点的内容块版本标识序列中包含三个内容块版本标识,分别为0、1和2(即内容块B2最新的内容块版本标识为2)。内容块B3所对应内容块节点的内容块版本标识序列中包含四个内容块版本标识,分别为0、1、2和3(内容块B3最新的内容块版本标识为3)。则文档节点1的文档版本标识7分别与内容块B1最新的内容块版本标识1、内容块B2最新的内容块版本标识2以及内容块B3最新的内容块版本标识3之间建立对应关系,并将这种对应关系作为版本标识快照。
需要说明的是,文档节点与文档节点所对应文档中所包含的内容块的内容块节点之间建立父子关系,每个内容块节点的内容块版本标识均与文档版本标识之间建立对应关系。也可以理解为,根据文档节点的文档版本标识和预先创建的树结构的版本标识快照,可以快速地查找到该文档版本标识对应的每个内容块节点的内容块版本标识。其中,新增的文档版本标识指的是文档节点的文档版本标识序列中最新的文档版本标识;相应的,每个内容块节点的新增内容块版本标识,指的是每个内容块节点的内容块版本标识序列中最新的内容块版本标识。
可以理解为,在文档中的其中一个内容块发生更新时,该内容块所对应内容块节点的内容块版本标识发生更新,相应的,内容块所在文档对应的文档节点的文档版本标识也发生更新,则在新增的文档版本标识和新增的内容块版本标识之间建立对应关系,并存储于版本标识快照中。需要说明的是,版本标识快照可以为一张表,用于存储文档节点的文档版本标识与内容块节点的内容块版本标识之间的映射关系,也可以为其他形式,本公开不做限定。
S840、根据新增内容块版本标识,确定对应内容块的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
在实施例中,在内容块节点的内容块版本标识序列中产生新增内容块版本标识,根据新增内容块版本标识查找对应的编辑操作标识,以根据编辑操作标识确定对应的编辑操作,从而确定该内容块的更新内容。在服务端获取到内容块的更新内容之后,将更新内容推送至客户端,以使客户端对内容对象进行更新。当然,在更新内容的大小达到一定阈值时,服务端可以通知客户端,以通知客户端可以向服务端拉取内容块的更新内容,以对客户端本地缓存的内容对象进行更新。
在一实施例中,内容块节点记录有内容块版本标识序列,文档同步方法还包括:在归属于文档节点的任一内容块节点产生新增的内容块版本标识时,在文档节点的文档版本标识序列中新增文档版本标识。
在实施例中,在一个文档中可以包含一个内容块,也可以包含多个内容块。在实际操作过程中,一个文档中一般包含多个内容块,相应的,一 个文档节点对应多个内容块节点。在文档节点所对应的其中一个内容块节点的实体内容发生更新时,该内容块节点的内容块版本标识序列中添加一个新的内容块版本标识,同时,在内容块节点所对应的文档节点的文档版本标识序列中添加一个新的文档版本标识,以可以通过文档版本标识查找到对应的内容块版本标识,进而可以查找到该内容块的更新内容。
在一实施例中,内容对象还包括内容块,则文档同步方法还包括:根据树结构中内容块节点的内容块版本标识,对内容块的更新状态进行监听。
其中,内容块节点记录有内容块版本标识序列,内容块版本标识用于表征内容块的内容更新。在实施例中,内容块版本标识用于记录内容块的更新次数,即在内容块的内容发生一次更新时,在内容块版本标识序列中增加一个新的内容块版本标识。对每个内容块节点的内容块版本标识序列进行监听,确定内容块版本标识序列中是否添加新的内容块版本标识,若其中一个内容块版本标识序列中增加新的内容块版本标识,确定该内容块的实体内容发生更新。在实际操作过程中,可以实时地对每个内容块的内容块版本标识序列进行监听,也可以周期性地对每个内容块的内容块版本标识序列进行监听。
图9是本公开实施例提供的又一种文档同步方法的流程图。本实施例是在上述实施例的基础上,对文档同步过程作进一步的说明。示例性地,以S910-S940在S950之前执行为例,对文档同步过程进行说明,对此并不进行限定。如图9所示,本实施例中的文档同步方法包括如下步骤:
S910、接收客户端在加载文档时触发的房间订阅请求。
其中,房间订阅请求指的是客户端向服务端发送的订阅房间中内容对象的请求。在实施例中,内容对象包括下述至少一个:文档和内容块。在客户端加载文档时,客户端自动触发房间订阅请求,并将该房间订阅请求发送至服务端。其中,客户端加载文档的过程,指的是客户端打开文档的过程。可以理解为,客户端加载文档之后,客户端自动对该文档的内容进行加房订阅;也可以理解为,用户开始看某个文档,就相当于加入了房间。相应的,用户关闭文档,即退出了此房间的订阅。
S920、确定房间订阅请求指向的当前加载文档。
在此需要说明的是,在客户端向服务端发送的房间订阅请求中携带加载文档的标识信息,在服务端接收到客户端发送的房间订阅请求之后,对房间订阅请求进行解析,以得到对应的标识信息;然后根据标识信息确定该房间订阅请求所指向的当前加载文档。
S930、根据当前加载文档在树结构中确定对应的文档节点,将文档节点的文档节点标识,确定为房间订阅请求指向的内容对象。
需要说明的是,文档节点标识指的是文档节点的标识信息,用于对不同的文档节点进行区分。可以理解为,文档节点标识是每个文档节点的唯一标识,即不同的文档节点所对应的文档节点标识也是不同的。在实施例中,每个文档与树结构中的一个文档节点相对应,并且每个文档节点均配置有对应的文档节点标识。相应的,当前加载文档也与树结构中的其中一个文档节点相对应,即根据当前加载文档即可确定其在树结构中的文档节点,然后,将文档节点的文档节点标识作为房间订阅请求指向的内容对象。
S940、将客户端添加至内容对象对应的房间中。
其中,在一些实施例中,每个房间中可以包括多个内容对象,每个内容对象可以包括:文档和/或内容块,在另一些实施例中,每个房间对应一个内容对象,以方便对内容对象的更新管理。其中,每个文档均对应一个文档节点标识。在实施例中,在确定当前加载文档所对应的文档节点之后,查找该文档节点对应的文档节点标识,将客户端添加至该文档节点标识对应的房间中。
S950、根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的内容块的更新。
S960、在监听到房间的内容对象更新时,确定在房间中订阅了内容对象的客户端。
其中,内容对象包括文档。
S970、根据房间中内容对象的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
在一实施例中,根据当前加载文档在树结构中确定对应的文档节点之后,还包括:确定文档节点具有引用关系的引用内容块的内容块节点;将具有引用关系的内容块节点标识,确定为房间订阅请求指向的内容对象。
在实际操作过程中,每个文档中一般都包括多个内容块,相应的,每个文档所对应文档节点可以对应多个内容块节点。其中,文档节点具有引用关系的引用内容块的内容块节点,指的是文档节点当前所引用的内容块对应的内容块节点。在实施例中,在确定当前加载文档在树结构中的文档节点之后,查找每个文档节点所引用的内容块,作为引用内容块,并获取引用内容块在树结构中的内容块节点,将该内容块节点的内容块节点标识作为房间订阅请求指向的内容对象。
示例性地,假设客户端1加载(即打开)文档A,文档A中引用了文档B的内容块C,则客户端1发送的房间订阅请求指向的内容对象为文档A的文档节点标识,还包括内容块C的内容块节点标识。
在一实施例中,根据当前加载文档在树结构中确定对应的文档节点之后,还包括:确定文档节点具有反向引用关系的反向链接内容块的内容块节点;将具有反向引用关系的内容块节点标识,确定为房间订阅请求指向的内容对象。
在实施例中,文档节点具有反向引用关系的反向链接内容块的内容块节点,指的是引用了当前加载文档的内容块所对应的内容块节点,即其它内容块节点引用了当前加载文档。在实际操作过程中,当前加载文档可以作为被引用文档,即其它文档或其它文档中的内容块引用当前加载文档。在当前加载文档的内容被更新时,为了能够将与当前加载文档关联的文档或内容块进行同步更新,在当前加载文档和与当前加载文档之间建立关联关系。其中,引用当前加载文档的内容块被称为具有反向引用关系的反向链接内容块。示例性地,假设文档A被内容块D引用,则内容块D的预览信息展示在文档A的反向链接区域中。
相应的,在确定当前加载文档在树结构中的文档节点之后,一方面确 定文档节点中所引用内容块的内容块节点(即具有引用关系的引用内容块的内容块节点),另一方面还需要确定引用文档节点的内容块节点(即具有反向引用关系的反向链接内容块的内容块节点),并将具有引用关系的内容块节点标识和具有反向引用关系的内容块节点标识均作为房间订阅请求指向的内容对象。
在一实施例中,以通过房间更新操作,对订阅了内容对象的客户端推送更新内容进行说明。可以理解为,服务端通过房间服务,使得房间中订阅了文档和内容块的客户端接收到更新内容,以使客户端对本地缓存的文档和内容块进行同步更新。
首先,感兴趣的客户端加入至某个文档或内容块的房间,即相当于订阅了内容块和文档的更新。
在客户端加载文档(即用户打开文档)时,客户端自动加房,即在线操作文档的作者,是房间推送对象。在用户开始看某个文档时,就相当于加入了房间。同样地,在用户关闭文档,即退出了此房间的订阅。
服务端可以自动为文档中的所有文档和内容块添加至对应的房间中。当然,开发者也可以选择,只添加文档版本标识。
用户可以根据文档版本标识和内容块版本标识进行加房,使得订阅逻辑有变化。当然,可以将文档版本标识和内容块版本标识作为内容对象进行订阅。
然后,服务端以房间为单位,检测房间中内容对象的更新操作。
每个房间可以对应一个内容块,也可以对应一个文档。
如果对应一个内容块,则在产生新的内容块版本标识时,向房间中的客户端推送该内容块版本标识所对应的更新内容。
如果对应一个文档,则在产生新的文档版本标识时,向房间中的客户端推送该文档版本标识所对应的更新内容。
在同时订阅了内容块和文档中,服务端可以去重,以避免向客户端重复发送更新内容。
图10是本公开实施例提供的一种利用房间更新实现文档同步的流程示意图。如图10所示,在房间中有三个内容对象,分别为内容块1(记为 Record1)、内容块2(记为Record2)和文档1(Page1)。其中,订阅内容块1的客户端有两个(分别为Actor1和Actor2),订阅内容块2的客户端有三个(分别为Actor1、Actor2和Actor3),订阅文档1的客户端有两个(分别为Actor1和Actor4),并且,内容块2归属于文档1。在内容块2发生编辑事件,服务端中的房间接收到内容块2发生编辑事件的信息,服务端从房间中查询内容块2和内容块2归属的文档1的房间成员,确定在房间中订阅了内容块2的客户端(包括:Actor1、Actor2、Actor3和Actor4),则服务端根据房间中内容块2的更新内容,将更新内容块提供给客户端(即Actor1、Actor2、Actor3和Actor4),以供这四个客户端对内容对象进行更新。
需要说明的是,由于客户端Actor1同时订阅了内容块2和内容块2归属的文档1,则服务端向客户端Actor1推送了两次更新内容。当然,在实际操作过程中,可以对其进行去重,以避免重复推送的问题。
在一实施例中,图11是本公开实施例提供的再一种文档同步方法的流程图。实施例是在内容对象还包括内容块的情况下,采用心跳请求对文档进行同步更新的过程。本实施例中以S1120在S1110和S1130之间执行为例,对文档同步过程进行说明,但对此并不进行限定,只需S1120在S1150之前即可。如图6所示,本实施例中的文档同步方法包括如下步骤:
S1110、根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的内容块的更新。
S1120、根据树结构中内容块节点的内容块版本标识,对内容块的更新状态进行监听。
其中,内容块节点记录有内容块版本标识序列,内容块版本标识用于表征内容块的内容更新。
S1130、在监听到房间的内容对象更新时,确定在房间中订阅了内容对 象的客户端。
其中,内容对象包括文档。
S1140、根据房间中内容对象的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
S1150、接收客户端发送的心跳请求。
其中,心跳请求指的是客户端向服务端发送检测消息,以检测最新版本的请求。在实际操作过程中,客户端可以实时或周期性地向服务端发送心跳请求。
S1160、根据树结构中文档节点的文档版本标识和/或内容块节点的内容块版本标识,检测心跳请求所对应的目标文档或目标内容块是否发生更新。
在实施例中,在服务端接收到客户端发送的心跳请求之后,检测心跳请求所指向的内容对象的版本是否发生更新。其中,内容对象包括:文档和/或,内容块。可以理解为,根据当前加载文档在树结构中文档节点的文档版本标识和/或内容块节点的内容块版本标识,检测心跳请求所对应的目标文档或目标内容块是否发生更新。心跳机制与房间订阅机制类似,是由客户端主动发起的更新机制。当客户端加载文档时,会监听该文档的TV以及该文档的引用内容块的RV,将对TV和引用内容块RV的心跳请求可聚合在一起,向服务端发送。
S1170、如果目标文档或目标内容块发生更新,则向客户端提供更新的版本标识。
一个实施例中,对于监听TV的心跳请求,该心跳请求中可携带最新版本的TV,则服务端根据当前加载文档在树结构中文档节点的最新文档版本标识,检测心跳请求所对应的目标文档的最新版本TV是否一致,即文档是否发生更新。若一致,则反馈文档最新的状态消息,若不一致,则将客户端需要更新的新版本TV和更新的RV反馈给客户端,供客户端拉取增量更新内容。对于监听引用内容块RV的心跳请求,该心跳请求中可携带引用内容块的标识,可以携带或不携带RV的最新版本。对于不携带RV最新版本的情况的,服务端根据当前加载文档在树结构中内容块节点的内容 块版本标识序列,将最新版本的RV直接反馈给客户端,以供客户端检测目标内容块是否发生更新。当客户端检测到最新版本RV与本地缓存的最新版本RV一致时,则无需更新;若不一致,则根据最新版本RV从服务端拉取引用内容块的增量更新内容。
本实施例中的技术方案,通过监听文档版本标识,减少了客户端向服务端发送的心跳请求数量,从而避免了服务端扩散读取的技术问题。
图12是本公开实施例提供的一种利用心跳实现文档同步的流程示意图。如图12所示,通过参数传递客户端(记为ClientVars)当前加载文档的心跳版本,然后服务端返回该心跳版本之后,若当前加载文档下出现变更的内容块的最新内容块版本标识以及最新的心跳版本,客户端确定服务端返回的最新内容块版本标识以及最新的心跳版本,与本地缓存的是否一致。若有差异,则客户端向服务端请求(fetch miss)最新内容块版本标识以及最新的心跳版本,以使客户端更新本地缓存的最新的心跳版本。
其中,心跳存在两种类型,其一,是内容块的心跳版本,即在内容块产生新的内容块版本标识时,服务端向客户端进行推送更新;其二,是文档的心跳版本,其中,文档的心跳版本只能通过心跳请求进行更新。
图13是本公开实施例提供的另一种利用心跳实现文档同步的流程示意图。如图13所示,客户端(记为Actor)向服务端发送心跳请求,服务端接收到心跳请求之后,查询内容块节点对应的最新内容块版本标识,以及文档节点对应的最新文档版本标识。然后服务端将最新内容块版本标识对应的更新内容和最新文档版本标识对应的更新内容块反馈至客户端,以使客户端对本地缓存的文档和内容块进行更新。
在一实施例中,图14是本公开实施例提供的再一种文档同步方法的流程图。实施例是在内容对象还包括内容块的情况下,采用补差更新请求对文档进行同步更新的过程。如图14所示,本实施例中的文档同步方法包括如下步骤:
S1410、根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节 点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的内容块的更新。
S1420、根据树结构中内容块节点的内容块版本标识,对内容块的更新状态进行监听。
其中,内容块节点记录有内容块版本标识序列,内容块版本标识用于表征内容块的内容更新。
S1430、在监听到房间的内容对象更新时,确定在房间中订阅了内容对象的客户端。
其中,内容对象包括文档。
S1440、根据房间中内容对象的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
S1450、接收客户端发送的补差更新请求。
其中,补差更新请求,指的是客户端发现本地缓存的内容对象可能缺失某个版本,而向服务端主动触发的补差操作请求。缺失的表现形式包括如下:通过心跳请求发现内容对象的版本标识不相符;或者,在编辑内容块之后服务端返回的版本标识和本地的版本标识不相符。可以理解为,补差更新请求中指示了客户端本地缺失的内容对象的版本标识。示例性地,假设客户端1本地缺失文档版本标识5-文档版本标识10,则客户端1向服务端发送的补差更新请求中指明需要文档版本标识5-文档版本标识10这六个版本的操作。
S1460、根据补差更新请求所指定的目标文档或目标内容块的版本标识,获取对应的更新内容,并反馈给客户端。
其中,目标文档的版本标识指的是客户端本地缺失的文档版本标识;目标内容块的版本标识指的是客户端本地缺失的内容块版本标识。在实施例中,服务端根据补差更新请求确定客户端本地缺失的文档版本标识和内容块版本标识,并获取缺失的文档版本标识对应的目标文档,或者获取缺失的内容块版本标识对应的目标内容块;然后获取目标文档的版本标识对应的更新内容,或者获取目标内容块的版本标识对应的更新内容,并反馈 至客户端,以使客户端将所缺失目标文档的版本标识对应的更新内容或所缺失目标内容块的版本标识对应的更新内容缓存至客户端本地。
图15是本公开实施例提供的一种利用补差更新文档的流程示意图。如图15所示,1,客户端中的流管理模块(FlowSync),接收服务端(Server)发送的内容更新相关信息(NEW_CHANGES/ACCEPT_COMMIT/USER_HEARTBEAT())。1.1,客户端在检测到内容块或文档的版本有误时,收集需要补差的记录,即需要补差的内容块版本信息。1.2,客户端尝试进行补差,如果已经有在途的补差,则不调用补差更新函数。1.3,客户端发起补差更新请求(FETCH_MISS()),主动触发向服务端拉取最新内容块版本标识所对应内容块的更新内容,或者最新文档版本标识所对应文档的更新内容,以使客户端对本地缓存的文档或内容块进行更新。1.3.1,服务端将更新内容推送给客户端(NEW_CHANGES())。1.4,客户端基于更新内容进行本地缓存更新。1.5,客户端进行本地缓存清洗(flush())。可以理解为,补差更新请求由客户端触发,客户端在对比之后,若发现有版本缺失,自动向服务端发送补差更新请求,以实现自动补差。当然,为了避免重复向服务端发送补差更新请求,客户端本地记录是否已经向服务端发送了补差更新请求,但未收到服务端的响应的情况。
本实施例适用于客户端,对文档进行处理的情况。本公开实施例的技术方案可以与前述实施例服务端执行的文档同步方法相互配合实施。该方法包括:
S1510、针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容。
其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新。
在本实施例中,客户端当前处理文档是客户端加载需要阅读或编辑的文档。在客户端初始加载该文档时,需要从服务端获取文档的实体内容。 由于文档的内容块可能被其他客户端编辑更新,所以在编辑处理该文档的过程中,也有可能需要进行内容更新。客户端向服务端发送的内容更新请求,可以是加房请求或心跳请求。参考前述实施例的技术方案,加房请求或心跳请求中携带有文档标识或内容块标识,以供服务端据此响应客户端的更新请求。
即,在本实施例的技术方案中,针对客户端的当前处理文档,向服务端发送内容更新请求包括下述至少一种:
在所述客户端加载所述当前处理文档时,向所述服务端发送内容更新请求;
在所述客户端编辑所述当前处理文档的过程中,向所述服务端发送内容更新请求。
具体的,上述操作可以是:
针对客户端的当前处理文档,确定所述当前处理文档的至少一个引用内容块,将所述当前处理文档的文档版本标识和引用内容块的内容块标识,携带在所述更新请求中,向所述服务端发送。
当客户端的当前处理文档仅包括归属于该文档的内容块时,客户端可以将该文档的标识携带在内容更新请求中。若该文档还引用了其他文档的内容块,则可以进一步将引用内容块的内容块标识携带在内容更新请求中,一起请求更新。当然,文档标识和内容块标识的内容更新请求可以单独发,或一起发送给服务端。
在一种可能的实施方式中,文档的内容更新请求可以仅包括文档标识,由服务端基于文档标识确定文档节点,进而反馈文档节点的最新TV和所归属内容块的内容块节点的RV。
S1520、获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识。
服务端确定了文档版本标识和归属于文档的内容块的RV后,反馈给客户端。当然,服务端还可以一并引用内容块的RV。
S1530、根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
获取到TV和RV之后,客户端可以根据TV和RV,从服务端进一步拉取对一个的实体内容。若是初始加载文档,则需要获取全量实体内容,若是在处理过程中的增量更新,则服务端可以反馈最新版本的TV和RV,客户端据此拉取增量实体内容到客户端的本地缓存。
本公开实施例的技术方案,客户端能够通过文档节点的TV,一次性请求该文档及其归属内容块的更新内容,而客户端无需分别监听内容块来发起内容更新请求。由此,减少了客户端中监听资源的占用,以及减少了客户端和服务端之间的消息交互次数,提高了文档更新效率。
图16是本公开实施例提供的一种文档同步装置的结构框图。如图16所示,本实施例中的文档同步装置,该装置可选的是配置于服务端,该装置包括:第一监听模块1610、第一确定模块1620和第一发送模块1630。
其中,第一监听模块1610,用于根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的内容块的更新;
第一确定模块1620,用于在监听到房间的内容对象更新时,确定在房间中订阅了内容对象的客户端;其中,内容对象包括文档;
第一发送模块1630,用于根据房间中内容对象的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
在上述实施例的基础上,监听模块,具体用于:监听树结构中文档节点的文档版本标识序列,在产生新的文档版本标识时,确定文档产生更新内容。
在上述实施例的基础上,内容块节点记录有内容块版本标识序列,文档同步装置还包括:
新增模块,用于在归属于文档节点的任一内容块节点产生新增的内容块版本标识时,在文档节点的文档版本标识序列中新增文档版本标识。
在上述实施例的基础上,内容对象还包括内容块,文档同步装置还包括:
第二监听模块,用于根据树结构中内容块节点的内容块版本标识,对内容块的更新状态进行监听;其中,内容块节点记录有内容块版本标识序列,内容块版本标识用于表征内容块的内容更新。
在上述实施例的基础上,第一发送模块,包括:
查找单元,用于根据树结构中文档节点的文档版本标识,基于树结构的版本标识快照,查找新增的文档版本标识所对应的每个内容块节点的新增内容块版本标识;
发送单元,用于根据新增内容块版本标识,确定对应内容块的更新内容,将更新内容提供给客户端。
在上述实施例的基础上,文档同步装置,还包括:
第一接收模块,用于接收客户端在加载文档时触发的房间订阅请求,并确定房间订阅请求指向的内容对象;
添加模块,用于将客户端添加至内容对象对应的房间中。
在上述实施例的基础上,确定房间订阅请求指向的内容对象,具体用于:
确定房间订阅请求指向的当前加载文档;
根据当前加载文档在树结构中确定对应的文档节点,将文档节点的文档节点标识,确定为房间订阅请求指向的内容对象。
在上述实施例的基础上,根据当前加载文档在树结构中确定对应的文档节点之后,还包括:
确定文档节点具有引用关系的引用内容块的内容块节点;
将具有引用关系的内容块节点标识,确定为房间订阅请求指向的内容对象。
在上述实施例的基础上,根据当前加载文档在树结构中确定对应的文档节点之后,还包括:
确定文档节点具有反向引用关系的反向链接内容块的内容块节点;
将具有反向引用关系的内容块节点标识,确定为房间订阅请求指向的内容对象。
在上述实施例的基础上,文档同步装置,还包括:
第二接收模块,用于接收客户端发送的心跳请求;
检测模块,用于根据树结构中文档节点的文档版本标识和/或内容块节点的内容块版本标识,检测心跳请求所对应的目标文档或目标内容块是否发生更新;
第二发送模块,用于如果目标文档或目标内容块发生更新,则向客户端提供更新的版本标识。
在上述实施例的基础上,文档同步装置,还包括:
第三接收模块,用于接收客户端发送的补差更新请求;
反馈模块,用于根据补差更新请求所指定的目标文档或目标内容块的版本标识,获取对应的更新内容,并反馈给客户端。
上述文档同步装置可执行本公开任意实施例所提供的文档同步方法,具备执行方法相应的功能模块和有益效果。
本实施例中的文档同步装置,该装置可选的是配置于客户端,该装置包括:请求发送模块1701、版本标识获取模块1702和内容获取模块1703。
其中,请求发送模块1701,用于针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新;
版本标识获取模块1702,用于获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识;
内容获取模块1703,用于根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
上述实施例中,可选的是,请求发送模块具体用于针对客户端的当前处理文档,确定所述当前处理文档的至少一个引用内容块,将所述当前处理文档的文档版本标识和引用内容块的内容块标识,携带在所述更新请求中,向所述服务端发送。
上述实施例中,可选的是,请求发送模块具体用于执行下述至少一种:
在所述客户端加载所述当前处理文档时,向所述服务端发送内容更新请求;
在所述客户端编辑所述当前处理文档的过程中,向所述服务端发送内容更新请求。
上述实施例中,可选的是,所述内容更新请求为加房请求或心跳请求。
本公开实施例的技术方案,可以用于执行本公开实施例的文档同步方法,具备相应的功能和有益效果。
本公开实施例适用于对在线文档的处理,可以由基于树结构的文档处理装置来执行,该装置可以采用硬件和/或软件的方式实现。该装置可配置于具有存储和计算能力的电子设备中,例如,可集成于服务端中,由服务端对在线文档进行处理,由此来响应用户通过客户端对在线文档的编辑操作。优选适用于由服务端为多个客户端提供在线文档编辑、查阅等服务的场景,文档的实体内容和树结构可以存储于服务端。关于文档树结构的介绍,可以参见之前的实施例的相关说明,例如对图6的说明。
图17为本公开实施例提供的一种基于树结构的文档处理方法的流程图。该方法可以由配置于电子设备中的文档处理装置来执行。该电子设备可以终端设备,优选可以是服务端设备。如图17所示,本实施例中的方法包括如下步骤:
S1710、获取当前文档的文档操作事件。
其中,当前文档可以为文档处理设备的显示界面上所展示的在线可编辑文档。在实际操作过程中,对当前文档的文档类型不作限定,例如可以是用于承载多种内容类型的文档,例如承载文字、图片、视频、程序等,或者可以是用于承载表格的文档,其中表格可以支持一种或多种数据类型。其中的在线文档包括可以实现协同的文档、或能够实现历史版本回退的文档。
其中,文档操作事件指的是对当前文档中的内容块进行编辑的事件或者服务端对文档进行更新的事件。在实施例中,文档中至少包括一个内容块,可以理解为,对当前文档的文档操作事件,指的是对当前文档中至少 一个内容块进行操作的事件。
在实际操作过程中,文档操作事件,可以通过用户对当前文档的操作指令而生成,也可以是服务端获取到的文档或内容块更新指示而产生。示例性地,可以在接收到用户对当前文档中内容块的操作指令时,按照该操作指令生成对应的文档操作事件。其中,用户对当前文档的操作指令的实现方式,可以为用户的触屏操作,也可以是用户的鼠标操作,也可以是用户通过热键产生的触发操作,对此并不进行限定。示例性地,文档操作事件可以包括下述之一:版本变更事件;内容块更新内容推送事件。其中,版本变更事件包括将当前文档回退至旧版本的事件、或者由旧版本恢复至新版本的事件;内容块更新内容推送事件包括在内容块的实体内容发生更新时,服务端向客户端推送更新实体内容的事件。
S1720、根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的内容块的更新。
在实施例中,在文档中内容块发生一次更新时,相应的产生一个新的文档版本标识,可以理解为,文档版本标识与文档中内容块的一次更新是一一对应关系。需要说明的是,对当前文档的文档操作事件,指的是对当前文档中内容块的更新事件。在实施例中,树结构中的文档节点一般为父节点;内容块节点可以为父节点,也可以为子节点。
在实施例中,在获取到当前文档的文档操作事件之后,确定当前文档所在的树结构,并在该树结构中查找文档操作事件涉及到的文档节点和/或内容块节点。可以通过操作事件中包括的文档或内容块标识、名称等确定对应的节点。
S1730、根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。
其中,文档版本标识用于记录当前文档中内容块发生了变化,即文档 版本标识序列用于表征整个文档的历史记录,可以通过文档版本标识序列,获取到文档中内容块的变化历史,以便于对文档的版本进行回退、恢复等版本切换操作。在此需要说明的是,文档节点的文档版本标识和内容块版本标识之间可以是一对一的,也可以是一对多的,对此并不进行限定。当然,文档节点的文档版本标识和文档节点的内容块版本标识可以是一对一的,相对比一对多的情况设计更简单。
在实施例中,在当前文档发生更新时,当前文档中文档节点对应的文档版本标识发生变化;相应的,在当前文档中的内容块发生更新时,当前文档中内容块节点对应的内容块版本标识和内容块所在的当前文档的文档版本标识都发生变化。可以理解为,在当前文档中的内容块发生更新时,当前文档中的文档节点和内容块节点均发生更新;在当前文档发生更新时,当前文档中的文档节点发生更新。
当然,当前文档中文档节点的文档版本标识与每个内容块节点所对应最新的内容块版本标识之间建立对应关系,即文档节点的文档版本标识与每个内容块节点的最新版本之间建立对应关系,以便于在接收到用户对当前文档的文档操作事件之后,根据文档节点的文档版本标识与内容块节点最新版本对应的内容块版本标识之间的对应关系,对当前文档中的内容块统一执行文档操作事件。
本实施例的技术方案,通过获取当前文档的文档操作事件;根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点;根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。本实施例的技术方案,通过在当前文档中增加文档节点的文档版本标识,在当前文档执行文档操作事件时,可直接根据文档节点的文档版本标识和内容块节点的内容块版本标识之间的对应关系,对与文档版本标识相对应的所有内容块版本标识的内容块节点执行文档操作事件,实现了对当前文档的统一操作,提升了用户对当前文档的操作便捷性。
图18是本公开实施例提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例一结合,对文档处理方法作进一步的说明。需 要说明的是,S1840-S1860可以在S1830之后执行,也可以在S1810之前执行,对此并不进行限定。示例性地,本实施例以S1840-S1860在S1830之后执行为例,对文档处理过程进行说明。如图18所示,本实施例中的方法包括如下步骤:
S1810、获取当前文档的文档操作事件。
S1820、根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点。
S1830、根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的内容块的更新。
S1840、获取对当前文档的文档编辑事件。
在实施例中,每个文档中均至少包括一个内容块。可以理解为,对当前文档的文档编辑事件,指的是对当前文档中的至少一个内容块所执行的编辑事件。
在此需要说明的是,对于当前文档的文档编辑事件,可以根据需要对文档编辑者和编辑时间进行记录。示例性地,在用户对当前文档的内容块执行编辑操作时,将文档编辑者和编辑时间记录下来,以通过对文档编辑者和编辑时间的记录,便于后续对文档进行回溯、查询、展示等进一步处理,为文档处理多样性提供便利。
S1850、根据文档编辑事件中的编辑操作,更新树结构中内容块节点的编辑操作标识和内容块版本标识,或更新内容块节点与文档节点的父子关系。
在实施例中,文档编辑事件中的编辑操作包括下述之一:内容块的内容更新操作;内容块新增操作;内容块删除操作。当然,编辑操作可以为上述其中一种操作,也可以为两种或多种操作,对此并不进行限定。其中,内容块的内容更新操作,指的是对内容块中的实体内容进行修改的操作。 内容块新增操作,指的是对内容块中的实体内容进行增加的操作。内容块删除操作,指的是对内容块中的实体内容进行删除的操作。可以理解为,对当前文档的文档编辑事件,包括对当前文档中至少一个内容块的实体内容进行编辑操作的事件、或者删除至少一个内容块的事件、或者新增至少一个内容块的事件、或者调整内容块之间关系的事件。内容块之间的关系可以包括归属关系,或者是内容块在文档中的位置,或各内容块在文档中的顺序等。
其中,编辑操作标识,与文档编辑事件中的编辑操作是一一对应的,即执行一次编辑操作,生成对应的编辑操作标识。当然,为了便于对内容块的不同版本进行区分,在当前文档中的内容块执行文档编辑事件之后,对所对应的内容块节点的内容块版本标识进行更新。在实际操作过程中,在当前文档执行内容块删除操作的情况下,当前文档中内容块的数量相应减少,相应的,内容块节点与文档节点之间的父子关系也会随之发生变化。可以理解为,在编辑操作为内容块的内容更新操作或内容块新增操作时,根据文档编辑事件中的编辑操作,更新树结构中内容块节点的编辑操作标识和内容块版本标识;在编辑操作为内容块的删除操作时,根据文档编辑事件中的编辑操作,更新内容块节点与文档节点的父子关系。
S1860、根据编辑操作,对文档节点的编辑操作标识和文档版本标识进行更新。
示例性地,在对当前文档中的内容块进行更新时,除了对内容块节点的编辑操作标识和内容块版本标识进行更新,也对文档节点的编辑操作标识和文档版本标识进行更新。示例性地,在文档节点的编辑操作标识和文档版本标识之间建立对应关系,以及在内容块节点的编辑操作标识和内容块版本标识之间建立对应关系,以便于后续统一对当前文档执行文档操作事件。
本实施例的技术方案,在上述实施例的基础上,通过根据文档编辑事件中的编辑操作,更新树结构中内容块节点的编辑操作标识和内容块版本标识,或更新内容块节点与文档节点的父子关系。根据编辑操作,对文档节点的编辑操作标识和文档版本标识进行更新,实现了根据编辑操作对树 结构中内容块节点和文档节点的更新。
图19是本公开实施例提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例结合,在编辑操作包括内容块的内容更新操作的情况下,对根据文档编辑事件中的编辑操作,更新树结构中内容块节点的编辑操作标识和内容块版本标识作进一步的说明。如图19所示,本实施例中的方法包括如下步骤:
S1910、获取当前文档的文档操作事件。
S1920、根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点。
S1930、根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的内容块的更新。
S1940、获取对当前文档的文档编辑事件。
S1950、根据编辑操作确定对应的内容块。
其中,在文档编辑事件中的编辑操作包括内容块的内容更新操作的情况下,对内容块中的内容更新操作,即对内容块中的实体内容进行修改的操作。在实际操作过程中,接收用户对当前文档的编辑操作,根据编辑操作所处的位置确定对应的内容块。示例性地,编辑操作所处的位置可以通过鼠标光标位置进行体现。
在一实施例中,S1950还可以具体包括:根据编辑操作确定对应的至少两个内容块。相应的,新的文档版本标识与新的内容块版本标识一一相对应;或一个新的文档版本标识与一个编辑操作导致添加的至少两个新的内容块版本标识相对应。在实施例中,在对当前文档执行内容块的内容更新操作时,存在该内容块的内容更新操作导致当前文档中的至少两个内容块发生变化,此时,可以将一个编辑操作导致添加的至少两个新的内容块版本标识均与一个新的文档版本标识对应,即至少两个新的内容块版本标 识所对应的文档版本标识是相同的。当然,也可以每个新的内容块版本标识分别与一个新的文档版本标识相对应,即新的内容块版本标识与新的文档版本标识是一一对应的。示例性地,假设当前文档中的内容块A执行内容块的内容更新操作,且内容块A为一段文字,从该段文字的中间部分增加“回车键”,导致内容块A变换为两个内容块,记为内容块A1和内容块A2,即“回车键”的增加操作导致两个内容块发生变化,即相当于对内容块A1执行删除内容块A2所对应的实体内容,而内容块A2为新建的内容块。由于“回车键”的增加操作导致两个内容块发生变化,即对当前文档执行两次编辑操作,分别为内容块的删除操作和内容块的新增操作,此时,可分别对两次编辑操作添加一个新的文档版本标识,即内容块A1的删除操作对应一个文档版本标识,以及内容块A2的新增操作对应一个文档版本标识;也可以两次编辑操作添加一个新的文档版本标识,即内容块A1的删除操作和内容块A2的新增操作对应的文档版本标识是相同的。
S1960、向内容块的内容块节点的编辑操作标识序列中添加新的编辑操作标识。
其中,内容块节点的编辑操作标识序列用于存储内容块节点的编辑操作标识。可以理解为,在内容块执行一次编辑操作时,在内容块节点的编辑操作标识序列中添加一个新的编辑操作标识。
S1970、向内容块节点的内容块版本标识序列中添加新的内容块版本标识。
其中,内容块节点的内容块版本标识序列用于存储内容块节点的内容块版本标识。可以理解为,在内容块执行一次编辑操作时,在内容块节点的内容块版本标识序列中添加一个新的内容块版本标识。
S1980、向文档节点的编辑操作标识序列中添加新的编辑操作标识,并向文档节点的文档版本标识序列中添加新的文档版本标识,其中,新的文档版本标识与新的内容块版本标识相对应。
在实施例中,文档节点的编辑操作标识序列用于存储文档节点的编辑操作标识。可以理解为,在当前文档中的内容块发生更新时,除了对当前文档中内容块节点的编辑操作标识和内容块版本标识进行更新,也对文档 节点的编辑操作标识和文档版本标识进行更新,并在文档节点的文档版本标识与内容块节点的内容块版本标识之间建立对应关系,即新的文档版本标识与新的内容块版本标识相对应。
可以理解为,在对当前文档执行内容块的内容更新操作时,即在内容块发生变化时,先对该内容块的编辑操作标识和内容块版本标识进行更新;然后根据内容块节点与文档节点之间的对应关系,查找到对应的文档节点,以更新该文档节点的文档版本标识,从而实现了在线协同执行当前文档的内容块更新操作。
图20是本公开实施例提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例结合,在编辑操作包括内容块新增操作的情况下,对根据编辑操作,对文档节点的编辑操作标识和文档版本标识进行更新作进一步的说明。如图20所示,本实施例中的方法包括如下步骤:
S2010、获取当前文档的文档操作事件。
S2020、根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点。
S2030、根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的内容块的更新。
S2040、获取对当前文档的文档编辑事件。
S2050、根据编辑操作,在树结构中添加新的内容块节点,并在内容块节点中创建新的内容块版本标识,建立新的内容块版本标识与的新的文档版本标识的对应关系。
其中,在文档编辑事件中的编辑操作包括内容块新增操作的情况下,对内容块新增操作,即对当前文档执行增加内容块的操作。在接收到用户对当前文档的内容块新增操作时,则树结构中添加新的内容块节点,并创建该内容块节点对应的内容块版本标识,以及该内容块版本标识对应的新 的文档版本标识。
S2060、根据编辑操作确定对应的文档节点。
需要说明的是,内容块所对应内容块节点与文档所对应文档节点之间建立有父子关系,以用于表征文档和内容块之间的归属关系。在实施例中,在接收到用户对当前文档中执行的内容块新增操作之后,在该当前文档中添加一个新的内容块,并根据新的内容块所对应内容块节点和文档节点之间的父子关系,查找到对应的文档节点。
S2070、向文档节点的编辑操作标识序列中添加新的编辑操作标识,并向文档节点的文档版本标识序列中添加新的文档版本标识。
在实施例中,文档节点的编辑操作标识序列用于存储文档节点的编辑操作标识;文档节点的文档版本标识序列用于存储文档节点的文档版本标识。可以理解为,在执行内容块新增操作之后,当前文档的实体内容也发生变化,即相当于对当前文档执行编辑操作,则向文档节点添加新的编辑操作标识,以及对当前文档所对应的文档节点添加新的文档版本标识,从而实现了在线对当前文档执行内容块新增操作。
图21是本公开实施例提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例结合,在编辑操作包括内容块删除操作的情况下,对根据编辑操作,对文档节点的编辑操作标识和文档版本标识进行更新作进一步的说明。如图21所示,本实施例中的方法包括如下步骤:
S2110、获取当前文档的文档操作事件。
S2120、根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点。
S2130、根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系。文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列。文档版本标识用于表征归属于文档的内容块的更新。
S2140、获取对当前文档的文档编辑事件。
S2150、根据编辑操作确定对应的内容块。
其中,文档编辑事件中的编辑操作包括内容块删除操作,即对当前文档中的某个内容块执行删除操作。在实际操作过程中,在检测到内容块的选中操作,则认为该选中的内容块为即将执行编辑操作的内容块。
S2160、删除内容块的内容块节点与文档节点之间的父子关系。
在此需要说明的是,内容块所对应内容块节点与文档节点之间建立父子关系,以用于表征文档和内容块之间的归属关系。在实施例中,获取内容块所对应内容块节点的内容块版本标识,以及该内容块节点所对应的文档节点,然后删除该内容块的内容块节点与文档节点之间的父子关系,即删除内容块节点中记录的父节点标识,以及从文档节点的子节点标识中删除该内容块节点标识。
S2170、根据编辑操作,向文档节点的编辑操作标识序列中添加新的编辑操作标识,并向文档节点的文档版本标识序列中添加新的文档版本标识。
在实施例中,文档节点的编辑操作标识序列用于存储文档节点的编辑操作标识;文档节点的文档版本标识序列用于存储文档节点的文档版本标识。可以理解为,在执行内容块删除操作之后,当前文档的实体内容也相应发生变化,即相当于对当前文档执行编辑操作,则文档节点的编辑操作标识和文档版本标识也需要进行更新,即在文档节点的编辑操作标识序列中添加一个新的编辑操作标识,以及在文档节点的文档版本标识序列中添加一个新的文档版本标识,从而实现了在线对当前文档执行内容块删除操作。
图22是本公开实施例提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例结合,在文档操作事件为版本变更事件的情况下,对S1720和S1730作进一步的说明。如图22所示,本实施例中的方法包括如下步骤:
S2210、获取当前文档的文档操作事件。
其中,文档操作事件包括版本变更事件。在实施例中,可以通过文档中的显示按钮,也可以通过键盘热键,触发当前文档的版本变更事件。可以理解为,在检测到版本变更事件所对应的显示按钮,或者键盘热键被触 发时,表明启动当前文档的版本变更事件。
S2220、根据版本变更事件,在当前文档的树结构中确定对应的文档节点,以及版本变更事件所指向的文档版本标识。
其中,版本变更事件中的版本回退事件指的是将当前文档的当前版本回滚到旧版本的事件。或者,版本变更事件中的版本恢复事件,是指从文档的旧版本恢复至新版本的事件。当然,当前文档的旧版本可以包括一个或多个版本。可以理解为,为了能够准确地将当前文档回滚到对应的旧版本,通过版本回退事件指示所要回滚到旧版本所对应的文档版本标识。需要说明的是,版本回退事件是对文档执行的操作事件,即在获取到版本回退事件时,在当前文档的树结构中获取当前文档所对应的文档节点,以及版本回退事件所指示的文档版本标识。
S2230、根据文档版本标识,基于树结构的版本标识快照,查找对应的每个内容块节点的内容块版本标识。
其中,版本标识快照,指的是文档节点的文档版本标识序列中当前最新的文档版本标识与文档中所包含的每个内容块所对应内容块节点当前最新的内容块版本标识之间建立对应关系。示例性地,假设文档节点1所对应的文档中包含3个内容块,分别为内容块B1、内容块B2和内容块B3。其中,文档节点1的文档版本标识序列中包含8个文档版本标识,分别为0、1、2、3、4、5、6和7(即文档版本标识7表示最新的文档版本标识),内容块B1所对应内容块节点的内容块版本标识序列中包含两个内容块版本标识,分别为0和1(即内容块B1最新的内容块版本标识为1)。内容块B2所对应内容块节点的内容块版本标识序列中包含三个内容块版本标识,分别为0、1和2(即内容块B2最新的内容块版本标识为2)。内容块B3所对应内容块节点的内容块版本标识序列中包含四个内容块版本标识,分别为0、1、2和3(内容块B3最新的内容块版本标识为3),则文档节点1的文档版本标识7分别与内容块B1最新的内容块版本标识1、内容块B2最新的内容块版本标识2以及内容块B3最新的内容块版本标识3之间建立对应关系,并将这种对应关系作为版本标识快照。
需要说明的是,文档节点与所包含的每个内容块的内容块节点之间建 立父子关系,即根据文档节点的文档版本标识和预先创建的版本标识快照,查找到该文档版本标识对应的每个内容块节点的内容块版本标识。
S2240、根据每个内容块节点的内容块版本标识,确定各内容块节点的待变更内容。
其中,每个内容块节点的内容块版本标识,用于表征该内容块节点所对应内容块的实体内容,即内容块节点的不同内容块版本标识所对应的内容块的实体内容是不同的。在实施例中,在确定每个内容块节点的内容块版本标识之后,通过内容块版本标识即可得到该内容块节点所对应内容块的实体内容,从而可得到该内容块节点所需要回退的实体内容,即需要回退到所述内容块版本标识对应的实体内容。
S2250、根据各内容块节点的待变更内容,执行文档变更事件。
在实施例中,以版本回退事件为例,按照每个内容块节点的待回退内容,对每个内容块节点所对应内容块的实体内容进行回退,以回滚到内容块版本标识所对应的实体内容,从而根据文档版本标识和内容块版本标识之间的对应关系,实现了对每个内容块节点所对应内容块的实体内容进行统一回退的操作,提升了用户的使用体验和操作便捷性。
S2260、根据文档变更事件的待变更内容,向文档节点中添加新的编辑操作标识、内容块版本标识和文档版本标识;且向各内容块中添加新的编辑操作标识和内容块版本标识。
在实施例中,以文档回退事件为例,对当前文档执行文档回退事件之后,在文档节点的编辑操作序列中添加新的编辑操作标识,表征对当前文档所执行的编辑操作。以及在文档节点的内容块版本标识序列中添加一个新的内容块版本标识,表征当前文档中的内容块版本发生变化。以及在文档节点的文档版本标识序列中添加一个新的文档版本标识,表征当前文档的实体内容发生变化。当然,在每个内容块节点所对应内容块的实体内容撤销待回退内容,即对每个内容块执行编辑操作,则相应的,每个内容块的编辑操作标识和内容块版本标识也发生更新,即在每个内容块节点的编辑操作标识序列中添加新的编辑操作标识,以及内容块版本标识序列中添加新的内容块版本标识。
图23是本公开实施例七提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例结合,在文档操作事件为内容块更新内容推送事件的情况下,对S1720和S1730作进一步的说明。如图23所示,本实施例中的方法包括如下步骤:
S2310、获取当前文档的文档操作事件。
S2320、根据内容块更新内容推送事件,在树结构中确定对应的内容块节点,以及内容块节点所归属的文档节点的最新文档版本标识。
其中,内容块更新内容推送事件,指的是服务端将内容块的更新内容推送至客户端的事件。在实施例中,在内容块中的实体内容发生更新时,在树结构中确定实体内容发生更新的内容块节点,以及该内容块节点所归属的文档节点的最新文档版本标识。需要说明的是,内容块节点与文档节点之间建立父子关系,用于表征内容块与文档之间的归属关系。可以理解为,内容块节点所归属的文档节点,即该内容块节点的父节点为文档节点。
S2330、基于树结构的版本标识快照,确定最新文档版本标识所对应的已更新内容块版本标识。
在实施例中,S2330具体包括S23301-S23302:
S23301、基于树结构的版本标识快照,确定最新文档版本标识所对应的编辑操作版本标识。
在实施例中,对当前文档执行内容块更新内容推送事件的过程,指的是对当前文档中内容块的实体内容进行更新的过程。相应的,当前文档所对应文档节点的编辑操作版本标识发生更新,即在最新文档版本标识和编辑操作版本标识之间建立对应关系。可以理解为,根据最新文档版本标识和编辑操作版本标识之间的对应关系,查找到最新文档版本标识对应的编辑操作版本标识。
S23302、根据编辑操作版本标识,查找对应的内容块版本标识,作为已更新内容块版本标识。
需要说明的是,编辑操作版本标识和内容块版本标识之间建立一一对应关系。在确定编辑操作版本标识之后,根据两者之间的对应关系查找对应的内容块版本标识,作为已更新内容块版本标识。
S2340、根据已更新内容块版本标识,执行内容块更新内容推送事件。
在实施例中,将已更新内容块版本标识所对应内容块的实体内容推送至客户端,以使客户端按照以更新内容块版本标识所对应内容块的实体内容对当前文档进行更新。
图24是本公开实施例提供的一种基于树结构的文档处理方法的流程图。本实施例与上述实施例结合,在文档操作事件为文档读取事件的情况下,对S1720和S1730作进一步的说明。如图24所示,本实施例中的方法包括如下步骤:
S2410、获取当前文档的文档操作事件。该文档操作事件为文档读取事件。
文档读取事件可以为客户端打开文档时进行初始化读取的事件。此时,客户端可以向服务端发起文档读取请求,以告知需要读取哪个文档。
S2420、根据文档读取事件,在树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识。
当服务端获取到文档读取事件时,可根据文档读取事件确定待读取的文档标识。进而,基于文档标识从该文档的存储空间中拉取该文档的树结构。拉取到树结构之后,可确定文档节点的TV以及归属于该文档节点的内容块节点,还能确定内容块节点的RV。文档节点的最新TV和各内容块节点的最新RV就是待推送版本标识。其中,文档节点的根内容块也可以作为一个特殊的内容块,确定其最新的RV作为待推送版本标识。
S2430、根据确定的所述内容块节点,拉取各所述内容块节点对应的最新内容块版本标识及其实体内容。
当确定每个内容块的待推送版本标识之后,需要再一次从服务端的存储空间中,将各个内容块的实体内容拉取获得。此时,可以根据内容块的节点标识进行拉取。在存储空间中,存储有每个版本标识相对于前一版本标识的增量更新内容,也存储有最新版本标识所对应的全量内容。基于内容块节点标识拉取实体内容时,一般拉取得到的是最新内容块节点版本标识及对应全量内容。
S2440、基于树结构的版本标识快照,确定拉取的内容块节点的最新内 容块版本标识,与所述待推送版本标识的一致性。
通常来说,第一次拉取树结构所获得的版本标识,与第二次拉取实体内容时的版本标识是一致的。但是由于两次拉取内容有一定时间差,所以也有一定概率会出现,内容块在这个时间差内被再次更新,由此某些内容块产生了新的RV,文档节点也差生了新的TV。则此时,第二次拉取到的最新内容块版本标识与待推送版本标识可能会出现不一致的情况。
举例来说,确定待推送版本标识为:TV=10,内容块A的RV=3,内容块B的RV=2,内容块C的RV=5。在拉取内容块实体内容的过程中发生了更新,内容块A的RV=3,内容块B的RV=3,内容块C的RV=5,新增内容块D的RV=0,且此时文档的TV=12。由此,拉取实体内容的最新版本标识与待推送版本标识不一致。当TV与每个内容块节点的每个RV一一对应时,TV的数值为所有最新RV的数值之和,因此,比对版本标识的一致性,可以转换为比对待推送的文档版本标识与拉取实体内容的最新文档版本标识是否相等。若相等,则拉取实体内容的版本标识一致,否则为不一致。当然,也可以通过逐一对比各个内容块节点RV的方式来检验一致性。
S2450、如果满足一致性要求,则将拉取的所述内容块节点的实体内容提供给所述客户端。
S2460、如果不满足一致性要求,则重新执行在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识的操作。
在两次拉取过程中发生更新的概率并不高,因此可通过重新确定待推送版本来纠正错误。
在实施例中,在待推送版本标识未对应于最新版本标识时,表明服务端向客户端推送的当前文档的内容并非完整文档内容,此时,可对最新文档版本标识和待推送内容块版本标识之间的对应关系进行调整,即重新确定最新文档版本标识对应的至少一个内容块的内容块版本标识,作为待推送内容块版本标识,并将重新确定的待推送内容块版本标识对应的更新内容向客户端推送。
图25是本公开实施例提供的一种文档树结构的示意图。如图25所示, 创建一个文档R1,在文档R1中包括:内容块C、文档R0、内容块A和内容块B。其中,内容块C引用了文档R0,文档R0引用了内容块A和内容块B。示例性地,在用户执行t6操作时,创建了内容块C,产生了内容块C的RV版本0,由于内容块C的变化,使得文档R1的TV产生新版本1。同时,t6操作也导致了文档R1的内容发生变化,因此文档R1的RV产生了新的版本1,由于文档R1的内容变化,文档R1的TV再次产生新版本,从而文档R1的TV产生新版本2。即,一次事务操作t6,产生了两个TV版本。当用户执行t7操作时,导致内容块C的版本发生变化,即内容块C的RV产生了新的版本1。
需要说明的是,一次文档操作事件,可带动一个或多个内容块发生变化,相应产生RV的变化。而每个内容块的变化都会导致一次TV变化。因此,每个TV是与每种树结构中的文档节点是一一对应的。或者,由于文档操作为原子性的,即文档中的TV也可以与每个TID进行一一对应。
图26是本公开实施例使提供的一种基于树结构的文档处理装置的结构框图。如图26所示,本实施例中的基于树结构的文档处理装置包括:第一获取模块2610、第一确定模块2620和执行模块2630。
其中,第一获取模块2610,用于获取当前文档的文档操作事件。
第一确定模块2620,用于根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点。
执行模块2630,用于根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行文档操作事件。
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的内容块的更新。
在上述实施例的基础上,归属于文档的内容块中包括一个根内容块,文档节点还记录有根内容块的内容块版本标识序列。
在上述实施例的基础上,文档节点和内容块节点还记录有编辑操作标识序列,编辑操作标识用于表征更新内容块的编辑操作。
在上述实施例的基础上,基于树结构的文档处理装置,还包括:
第二获取模块,用于获取对当前文档的文档编辑事件。
第一更新模块,用于根据文档编辑事件中的编辑操作,更新树结构中内容块节点的编辑操作标识和内容块版本标识,或更新内容块节点与文档节点的父子关系;
第二更新模块,用于根据编辑操作,对文档节点的编辑操作标识和文档版本标识进行更新。
在上述实施例的基础上,如果编辑操作包括内容块的内容更新操作,则第一更新模块包括:
第一确定单元,用于根据编辑操作确定对应的内容块;
第一添加单元,用于向内容块的内容块节点的编辑操作标识序列中添加新的编辑操作标识;
第二添加单元,用于向内容块节点的内容块版本标识序列中添加新的内容块版本标识。
相应的,第二更新模块,具体用于:向文档节点的编辑操作标识序列中添加新的编辑操作标识,并向文档节点的文档版本标识序列中添加新的文档版本标识,其中,新的文档版本标识与新的内容块版本标识相对应。
在上述实施例的基础上,第一确定单元,具体用于:根据编辑操作确定对应的至少两个内容块;
相应的,新的文档版本标识与新的内容块版本标识一一相对应;或一个新的文档版本标识与一个编辑操作导致添加的至少两个新的内容块版本标识相对应。
在上述实施例的基础上,如果编辑操作包括内容块新增操作,则第二更新模块包括:
第二确定单元,用于根据编辑操作确定对应的文档节点;
第三添加单元,用于向文档节点的编辑操作标识序列中添加新的编辑操作标识,并向文档节点的文档版本标识序列中添加新的文档版本标识;
相应的,第一更新模块,具体用于:根据编辑操作,在树结构中添加新的内容块节点,并在内容块节点中创建新的内容块版本标识,建立新的 内容块版本标识与的新的文档版本标识的对应关系。
在上述实施例的基础上,如果编辑操作包括内容块删除操作,则第一更新模块,包括:
第三确定单元,用于根据编辑操作确定对应的内容块;
删除单元,用于删除内容块的内容块节点与文档节点之间的父子关系;
相应的,第二更新模块,具体用于:根据编辑操作,向文档节点的编辑操作标识序列中添加新的编辑操作标识,并向文档节点的文档版本标识序列中添加新的文档版本标识。
在上述实施例的基础上,如果文档操作事件为版本变更事件,则第一确定模块,具体用于:根据版本变更事件,在当前文档的树结构中确定对应的文档节点,以及版本变更事件所指向的文档版本标识;
相应的,执行模块,包括:
查找单元,用于根据文档版本标识,基于树结构的版本标识快照,查找对应的每个内容块节点的内容块版本标识;
第四确定单元,用于根据每个内容块节点的内容块版本标识,确定各内容块节点的待变更内容;
第一执行单元,用于根据各内容块节点的待变更内容,执行文档变更事件。
在上述实施例的基础上,执行模块,还包括:
第四添加单元,用于根据各内容块节点的待变更内容,执行文档变更事件之后,根据文档变更事件的待变更内容,向文档节点中添加新的编辑操作标识、内容块版本标识和文档版本标识;且向各内容块中添加新的编辑操作标识和内容块版本标识。
在上述实施例的基础上,如果文档操作事件为内容块更新内容推送事件,则第一确定模块,具体用于:根据内容块更新内容推送事件,在树结构中确定对应的内容块节点,以及内容块节点所归属的文档节点的最新文档版本标识;
相应的,执行模块,包括:
第五确定单元,用于基于树结构的版本标识快照,确定最新文档版本 标识所对应的已更新内容块版本标识;
第二执行单元,用于根据已更新内容块版本标识,执行内容块更新内容推送事件。
在上述实施例的基础上,第五确定单元,包括:
第一确定子单元,用于基于树结构的版本标识快照,确定最新文档版本标识所对应的编辑操作版本标识;
查找子单元,用于根据编辑操作版本标识,查找对应的内容块版本标识,作为已更新内容块版本标识。
在上述实施例的基础上,如果文档操作事件为文档读取事件,则第一确定模块,具体用于:根据所述文档读取事件,在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识;
相应的,执行模块,包括:
拉取单元,用于根据确定的所述内容块节点,拉取各所述内容块节点对应的最新内容块版本标识及其实体内容;
第六确定单元,用于基于树结构的版本标识快照,确定拉取的所述内容块节点的最新内容块版本标识,与所述待推送版本标识的一致性;
第三执行单元,用于如果满足一致性要求,则将拉取的所述内容块节点的实体内容提供给所述客户端。
在上述实施例的基础上,所述执行模块还包括:
第四执行单元,用于如果不满足一致性要求,重新执行在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识的操作。
图27是本公开实施例使提供的一种设备的结构框图。下面参考图27,其示出了适于用来实现本公开实施例的电子设备(例如图27中的终端设备或服务器)1000的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。 图27示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图27所示,电子设备1000可以包括处理装置(例如中央处理器、图形处理器等)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储装置1006加载到随机访问存储器(RAM)1003中的程序而执行各种适当的动作和处理。在RAM 1003中,还存储有电子设备1000操作所需的各种程序和数据。处理装置1001、ROM 1002以及RAM 1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。
通常,以下装置可以连接至I/O接口1005:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1006;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1007;包括例如磁带、硬盘等的存储装置1006;以及通信装置1009。通信装置1009可以允许电子设备1000与其他设备进行无线或有线通信以交换数据。虽然图27示出了具有各种装置的电子设备1000,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1009从网络上被下载和安装,或者从存储装置1006被安装,或者从ROM 1002被安装。在该计算机程序被处理装置1001执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器 (CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该设备执行时,使得该设备:响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;在所述目标内容块和所述连接内容块中的任一方内容块下展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。或者,响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,文档版本标识用于表征归属于文档的内容块的更新;在监听到房间的内容对象更新时,确定在房间中订阅了内容对象的客户端;其中,内容对象包括文档;根据房间中内容对象的更新内容,将更新内容提供给客户端,以供客户端对内容对象进行更新。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取当前文档的文档操作事件;根据文档操作事件,在当前文档的树结构中确定对应的文档节点和/或内容块节点;根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件;
其中,文档包括至少一个内容块,树结构中包括文档节点和内容块节点,文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;文档节点记录有文档版本标识序列,内容块节点记录有内容块版本标识序列;文档版本标识用于表征归属于文档的内容块的更新。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开实施例的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法 和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开实施例的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例提供的一种页面内容的处理方法,该 方法包括:
响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
根据本公开的一个或多个实施例,上述方法中,所述在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,包括:
在所述目标内容块的关联位置处展示已连接所述连接内容块的主动连接标识,以在当前页面内利用所述主动连接标识查看所述连接内容块;
在所述连接内容块的关联位置处展示被所述目标内容块连接的被动连接标识,以在所述连接内容块的所处页面内利用所述被动连接标识查看所述目标内容块。
根据本公开的一个或多个实施例,上述方法中,所述响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块,包括:
响应于当前页面内目标内容块的连接操作,展示对应的连接查找界面;
在所述连接查找界面内展示一个以上的内容块,响应于对所述一个以上的内容块的选择操作,将选中的内容块确定为所述目标内容块的连接内容块。
根据本公开的一个或多个实施例,上述方法中,所述目标内容块和所述连接内容块中的任一方内容块的关联位置处展示的连接标识至少包括以下一项或者两项:
该任一方内容块被其他内容块连接后的被动连接标识;
该任一方内容块连接其他内容块后的主动连接标识。
根据本公开的一个或多个实施例,上述方法中,在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识之后,还包括:
响应于预设操作,在当前页面的预设区域内展示所述目标内容块关联的各内容块;
响应于所述预设区域内所展示的内容块的触发操作,从当前页面跳转至该内容块的所处页面。
根据本公开的一个或多个实施例,上述方法中,所述从当前页面跳转至该内容块的所处页面,包括:
从当前页面跳转至该内容块的所处页面中该内容块所在位置处。
根据本公开的一个或多个实施例,上述方法中,所述在当前页面的预设区域内展示所述目标内容块关联的各内容块,包括:
查看所述目标内容块的连接属性信息内记录的各连接关系,以按照各连接关系对应的设置的删除标识确定所述目标内容块关联的各内容块是否已被删除;
在当前页面的预设区域内展示所述目标内容块关联的未被删除的内容块。
根据本公开的一个或多个实施例,上述方法中,所述连接关系对应设置的删除标识记载在该连接关系指定的内容块的连接属性信息或者其他数据区域内。
根据本公开的一个或多个实施例,上述方法中,在响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块之后,还包括:
在所述目标内容块和所述连接内容块的连接属性信息内分别记录两者之间的连接关系。
根据本公开的一个或多个实施例,上述方法中,还包括:
响应于所述目标内容块的删除操作,按照所述目标内容块的连接属性信息内已记录的连接关系,确定与所述目标内容块连接的内容块,并更新所确定的内容块为所述目标内容块设置的删除标识。
根据本公开的一个或多个实施例,上述方法中,所述预设区域包括所述当前页面的侧边栏,或下半部显示区域,或上半部显示区域,所述预设区域内可以分区展示所述目标内容块主动连接和被动连接的内容块,可以高亮显示所述预设操作指定的连接标识对应的内容块。
根据本公开的一个或多个实施例,上述方法中,所述目标内容块的关联位置处展示的每一连接标识具有与该连接标识关联的分类标签;相应的, 所述在当前页面的预设区域内展示所述目标内容块关联连接的各内容块,包括:
在当前页面的预设区域内,按照所触发的连接标识的分类标签,过滤展示所述目标内容块关联的各内容块。
根据本公开的一个或多个实施例,上述方法中,所述当前页面包括文档。
根据本公开的一个或多个实施例,上述方法中,在响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块之前,还包括:
在当前页面内创建所述目标内容块,并为所述目标内容块配置对应的连接控件,以利用所述连接控件执行所述连接操作。
根据本公开的一个或多个实施例,上述方法中,所述连接内容块为当前页面内除所述目标内容块之外的其他内容块,或者除当前页面之外的其他页面内的内容块。
根据本公开的一个或多个实施例,上述方法中,所述连接内容块与所述目标内容块的内容类型相同或不同,所述连接内容块与所述目标内容块的关联位置处展示的连接标识的分类标签相同或不同。
根据本公开的一个或多个实施例,上述方法中,所述内容块的内容类型包括以下至少一项:
文字类型的内容块、多媒体类型的内容块、表格类型的内容块、程序类型的内容块;
所述分类标签包括以下一项或多项:目标、任务、报告。
根据本公开的一个或多个实施例提供的一种信息处理方法,该方法包括:
响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容 数据信息。
根据本公开的一个或多个实施例,上述方法中,还包括:
响应于所述第一内容块的删除操作,根据所述第一内容块的连接属性信息,确定与所述第一内容块连接的内容块,并更新所述第一内容块连接的内容块为所述第一内容块设置的删除标识。
根据本公开的一个或多个实施例,上述方法中,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系之后,还包括:
更新文档结构中所述第一内容块和所述第二内容块的连接属性信息。
根据本公开的一个或多个实施例,上述方法中,所述第一内容块和所述第二内容块属于同一文档或者不同文档。根据本公开的一个或多个实施例提供的一种页面内容的连接装置,该装置包括:
连接响应模块,用于响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
内容连接模块,用于在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
根据本公开的一个或多个实施例,上述装置中,所述内容连接模块,具体用于:
在所述目标内容块的关联位置处展示已连接所述连接内容块的主动连接标识,以在当前页面内利用所述主动连接标识查看所述连接内容块;
在所述连接内容块的关联位置处展示被所述目标内容块连接的被动连接标识,以在所述连接内容块的所处页面内利用所述被动连接标识查看所述目标内容块。
根据本公开的一个或多个实施例,上述装置中,所述连接响应模块,具体用于:
响应于当前页面内目标内容块的连接操作,展示对应的连接查找界面;
在所述连接查找界面内展示一个以上的内容块,响应于对所述一个以上的内容块的选择操作,将选中的内容块确定为所述目标内容块的连接内 容块。
根据本公开的一个或多个实施例,上述装置中,所述目标内容块和连接内容块中的任一方内容块的关联位置处展示的连接标识至少包括以下一项或两项:
该任一方内容块被其他内容块连接后的被动连接标识;
该任一方内容块连接其他内容块后的主动连接标识。
根据本公开的一个或多个实施例,上述装置中,还包括:
连接展示模块,用于响应于预设操作,在当前页面的预设区域内展示所述目标内容块关联的各内容块;
页面跳转模块,用于响应于所述预设区域内所展示的内容块的触发操作,从当前页面跳转至该内容块的所处页面。
根据本公开的一个或多个实施例,上述装置中,所述页面跳转模块,具体用于:
从当前页面跳转至该内容块的所处页面中该内容块所在位置处。
根据本公开的一个或多个实施例,上述装置中,所述连接展示模块,具体用于:
查看所述目标内容块的连接属性信息内记录的各连接关系,以按照各连接关系对应的删除标识确定所述目标内容块关联的各内容块是否已被删除;
在当前页面的预设区域内展示所述目标内容块关联的未被删除的内容块。
根据本公开的一个或多个实施例,上述装置中,所述连接关系对应设置的删除标识记载在该连接关系指定的内容块的连接属性信息或者其他数据区域内。
根据本公开的一个或多个实施例,上述装置中,还包括:
连接关系记录模块,用于在所述目标内容块和所述连接内容块的连接属性信息内分别记录两者之间的连接关系。
根据本公开的一个或多个实施例,上述装置中,还包括:
内容块删除模块,用于响应于所述目标内容块的删除操作,按照所述 目标内容块的连接属性信息内已记录的连接关系,确定与所述目标内容块连接的内容块,并更新所确定的内容块为所述目标内容块设置的删除标识。根据本公开的一个或多个实施例,上述装置中,所述预设区域包括所述当前页面的侧边栏,或下半部显示区域、或上半部显示区域,所述预设区域内分区展示所述目标内容块主动连接和被动连接的内容块,且高亮显示所述预设操作指定的连接标识对应的内容块。
根据本公开的一个或多个实施例,上述装置中,所述目标内容块的关联位置处展示的每一连接标识具有与该连接标识关联的分类标签;相应的,所述连接展示模块,具体用于:
在当前页面的预设区域内,按照所触发的连接标识的分类标签,过滤展示所述目标内容块关联的各内容块。
根据本公开的一个或多个实施例,上述装置中,所述当前页面包括文档。
根据本公开的一个或多个实施例,上述装置中,还包括:
内容块创建模块,用于在当前页面内创建所述目标内容块,并为所述目标内容块配置对应的连接控件,以利用所述连接控件执行所述连接操作。
根据本公开的一个或多个实施例,上述装置中,所述连接内容块为当前页面内除所述目标内容块之外的其他内容块,或者除当前页面之外的其他页面内的内容块。
根据本公开的一个或多个实施例,上述装置中,所述连接内容块与所述目标内容块的内容类型相同或不同,所述连接内容块与所述目标内容块的关联位置处展示的连接标识的分类标签相同或不同。
根据本公开的一个或多个实施例,上述装置中,所述内容块的内容类型包括以下至少一项:
文字类型的内容块、多媒体类型的内容块、表格类型的内容块、程序类型的内容块;
所述分类标签包括以下一项或多项:目标、任务、报告。
根据本公开的一个或多个实施例提供的一种信息处理装置,该装置包括:
连接关系记录模块,用于响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
连接内容查找模块,用于响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
连接内容输出模块,用于获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
根据本公开的一个或多个实施例,上述装置中,还包括:
内容块删除模块,用于响应于所述第一内容块的删除操作,根据所述第一内容块的连接属性信息,确定与所述第一内容块连接的内容块,并更新所述第一内容块连接的内容块为所述第一内容块设置的删除标识。
根据本公开的一个或多个实施例,上述装置中,还包括:
文档结构更新模块,用于更新文档结构中所述第一内容块和所述第二内容块的连接属性信息。
根据本公开的一个或多个实施例,上述装置中,所述第一内容块和所述第二内容块属于同一文档或者不同文档。根据本公开的一个或多个实施例提供的一种计算机设备,该设备包括:
一个或多个处理器;
存储器,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开任意实施例中所述的页面内容的处理方法,或者,实现如本公开任意实施例中所述的信息处理方法。
根据本公开的一个或多个实施例提供的一种可读介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开任意实施例中所述的页面内容的处理方法,或者,实现如本公开任意实施例中所述的信息处理方法。
根据本公开的一个或多个实施例,提供了一种文档同步方法,包括:根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和 内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述文档版本标识用于表征归属于所述文档的内容块的更新;
在监听到房间的内容对象更新时,确定在所述房间中订阅了内容对象的客户端;其中,所述内容对象包括文档;
根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,以供所述客户端对所述内容对象进行更新。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听,包括:
监听文档的树结构中文档节点的文档版本标识序列,在产生新的文档版本标识时,确定所述文档产生更新内容。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述内容块节点记录有内容块版本标识序列,所述方法还包括:
在归属于所述文档节点的任一所述内容块节点产生新增的内容块版本标识时,在所述文档节点的文档版本标识序列中新增文档版本标识。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述内容对象还包括内容块,则所述方法还包括:
根据所述树结构中内容块节点的内容块版本标识,对内容块的更新状态进行监听;其中,所述内容块节点记录有内容块版本标识序列,所述内容块版本标识用于表征内容块的内容更新。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,包括:
根据所述树结构中文档节点的文档版本标识,基于树结构的版本标识快照,查找新增的文档版本标识所对应的每个内容块节点的新增内容块版本标识;
根据所述新增内容块版本标识,确定对应内容块的更新内容,将所述更新内容提供给所述客户端。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述方法还包括:
接收客户端在加载文档时触发的房间订阅请求,并确定所述房间订阅请求指向的内容对象;
将所述客户端添加至内容对象对应的房间中。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述确定所述房间订阅请求指向的内容对象,包括:
确定所述房间订阅请求指向的当前加载文档;
根据当前加载文档在所述树结构中确定对应的文档节点,将所述文档节点的文档节点标识,确定为所述房间订阅请求指向的内容对象。
根据本公开的一个或多个实施例,提供了一种文档同步方法,根据当前加载文档在所述树结构中确定对应的文档节点之后,所述方法还包括:
确定所述文档节点具有引用关系的引用内容块的内容块节点;
将具有引用关系的内容块节点标识,确定为所述房间订阅请求指向的内容对象。
根据本公开的一个或多个实施例,提供了一种文档同步方法,根据当前加载文档在所述树结构中确定对应的文档节点之后,所述方法还包括:
确定所述文档节点具有反向引用关系的反向链接内容块的内容块节点;
将具有反向引用关系的内容块节点标识,确定为所述房间订阅请求指向的内容对象。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述方法还包括:
接收客户端发送的心跳请求;
根据所述树结构中文档节点的文档版本标识和/或内容块节点的内容块版本标识,检测所述心跳请求所对应的目标文档或目标内容块是否发生更新;
如果所述目标文档或目标内容块发生更新,则向所述客户端提供更新的版本标识。
根据本公开的一个或多个实施例,提供了一种文档同步方法,所述方法还包括:
接收客户端发送的补差更新请求;
根据所述补差更新请求所指定的目标文档或目标内容块的版本标识,获取对应的更新内容,并反馈给所述客户端。
根据本公开的一个或多个实施例,提供了一种文档同步方法,包括:
针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新;
获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识;
根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
上述方法中,所述针对客户端的当前处理文档,向服务端发送内容更新请求,包括:
针对客户端的当前处理文档,确定所述当前处理文档的至少一个引用内容块,将所述当前处理文档的文档版本标识和引用内容块的内容块标识,携带在所述更新请求中,向所述服务端发送。
上述方法中,所述针对客户端的当前处理文档,向服务端发送内容更新请求,包括下述至少一种:
在所述客户端加载所述当前处理文档时,向所述服务端发送内容更新请求;
在所述客户端编辑所述当前处理文档的过程中,向所述服务端发送内容更新请求。
上述方法中,所述内容更新请求为加房请求或心跳请求。
基于树结构的文档处理方法可以由服务端操作树结构来维护文档内容,可选的是,对于文档处理客户端,也可以预加载树结构,在客户端本 地进行处理,而后通知服务端进行更新。在客户端中,可以按照需求配置内容管理模块、流管理模块和流同步模块等,分别执行不同的功能,以完成客户端中基于树结构的文档处理过程。具体的,文档处理客户端所执行的文档处理方法包括:
内容管理模块获取用户对当前编辑文档的文档内容编辑事件;其中,所述文档内容编辑事件包括编辑操作和编辑内容;
内容管理模块根据所述编辑操作和编辑内容,在本地缓存的所述当前编辑文档的树结构中确定对应的节点,并确定节点对应的更新内容;
内容管理模块根据所述编辑操作和更新内容,确定在树结构的节点中增加的操作标识和内容版本标识;
内容管理模块产生文档更新事件,并提供给所述文档处理客户端中的流管理模块;其中,所述文档更新事件中包括所述更新内容、所述增加的操作标识和内容版本标识;
流管理模块将所述文档更新事件缓存在本地队列中;
流同步模块,将所述流管理模块提供的所述更新内容、所述增加的操作标识和内容版本标识发送至服务端,以请求更新所述服务端中存储的树结构和文档内容;
流同步模块接收所述服务端传输的更新通知,并传输给所述文档处理客户端中的流管理模块;
流管理模块根据所述服务端传输的更新通知,对本地缓存的所述文档更新事件进行冲突处理;
如果不存在冲突,则所述流管理模块通知所述内容管理模块,根据所述文档更新事件对当前编辑文档的文档内容和树结构进行更新,并删除缓存的文档更新事件。
上述方案中,所述流管理模块根据所述服务端传输的更新通知,对本地缓存的所述文档更新事件进行冲突处理可以包括:
如果所述流管理模块识别所述服务端传输的更新通知为根据本地文档更新事件的反馈通知,则确定不存在冲突;
如果所述流管理模块识别所述服务端传输的更新通知为其他客户端的 文档更新事件产生的,则将所述更新通知中的文档更新事件,与本地缓存的文档更新事件进行冲突匹配,以确定是否存在冲突。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,包括:
获取当前文档的文档操作事件;
根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点和/或内容块节点;
根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件;
其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述内容块节点记录有内容块版本标识序列;所述文档版本标识用于表征归属于所述文档的内容块的更新。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,归属于所述文档的内容块中包括一个根内容块,所述文档节点还记录有根内容块的内容块版本标识序列。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,所述文档节点和所述内容块节点还记录有编辑操作标识序列,所述编辑操作标识用于表征更新内容块的编辑操作。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,所述方法还包括:
获取对所述当前文档的文档编辑事件;
根据所述文档编辑事件中的编辑操作,更新所述树结构中内容块节点的编辑操作标识和内容块版本标识,或更新所述内容块节点与文档节点的父子关系;
根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理 方法、装置、设备和介质,如果所述编辑操作包括内容块的内容更新操作,则根据所述文档编辑事件中的编辑操作,更新所述树结构中内容块节点的编辑操作标识和内容块版本标识,包括:
根据所述编辑操作确定对应的内容块;
向所述内容块的内容块节点的编辑操作标识序列中添加新的编辑操作标识;
向所述内容块节点的内容块版本标识序列中添加新的内容块版本标识;
相应的,根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新,包括:
向所述文档节点的编辑操作标识序列中添加新的编辑操作标识,并向所述文档节点的文档版本标识序列中添加新的文档版本标识,其中,新的文档版本标识与新的内容块版本标识相对应。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,根据所述编辑操作确定对应的内容块,包括:
根据所述编辑操作确定对应的至少两个内容块;
相应的,新的文档版本标识与新的内容块版本标识一一相对应;或一个新的文档版本标识与一个编辑操作导致添加的至少两个新的内容块版本标识相对应。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,如果所述编辑操作包括内容块新增操作,则根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新,包括:
根据所述编辑操作确定对应的文档节点;
向所述文档节点的编辑操作标识序列中添加新的编辑操作标识,并向所述文档节点的文档版本标识序列中添加新的文档版本标识;
相应的,根据所述文档编辑事件中的编辑操作,更新所述树结构中内容块节点的编辑操作标识和内容块版本标识,包括:
根据所述编辑操作,在所述树结构中添加新的内容块节点,并在所述 内容块节点中创建新的内容块版本标识,建立新的内容块版本标识与所述的新的文档版本标识的对应关系。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,如果所述编辑操作包括内容块删除操作,则根据所述编辑操作,更新所述内容块节点与文档节点的父子关系,包括:
根据所述编辑操作确定对应的内容块;
删除所述内容块的内容块节点与文档节点之间的父子关系;
相应的,根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新,包括:
根据所述编辑操作,向所述文档节点的编辑操作标识序列中添加新的编辑操作标识,并向所述文档节点的文档版本标识序列中添加新的文档版本标识。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,如果所述文档操作事件为版本变更事件,则根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点,包括:
根据所述版本变更事件,在所述当前文档的树结构中确定对应的文档节点,以及所述版本变更事件所指向的文档版本标识;
相应的,根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件,包括:
根据所述文档版本标识,基于树结构的版本标识快照,查找对应的每个内容块节点的内容块版本标识;
根据每个内容块节点的内容块版本标识,确定各内容块节点的待变更内容;
根据各内容块节点的待变更内容,执行所述文档变更事件。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,根据各内容块节点的待变更内容,执行所述文档变更事件之后,所述方法还包括:
根据所述文档变更事件的待变更内容,向所述文档节点中添加新的编 辑操作标识、内容块版本标识和文档版本标识;且向各所述内容块中添加新的编辑操作标识和内容块版本标识。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,如果所述文档操作事件为内容块更新内容推送事件,则根据所述文档操作事件,在所述当前文档的树结构中确定对应的内容块节点,包括:
根据所述内容块更新内容推送事件,在所述树结构中确定对应的内容块节点,以及所述内容块节点所归属的文档节点的最新文档版本标识;
相应的,根据文档节点的文本版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件,包括:
基于所述树结构的版本标识快照,确定所述最新文档版本标识所对应的已更新内容块版本标识;
根据所述已更新内容块版本标识,执行所述内容块更新内容推送事件。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,基于所述树结构的版本标识快照,确定所述最新文档版本标识所对应的已更新内容块版本标识,包括:
基于所述树结构的版本标识快照,确定所述最新文档版本标识所对应的编辑操作版本标识;
根据所述编辑操作版本标识,查找对应的内容块版本标识,作为已更新内容块版本标识。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,如果所述文档操作事件为文档读取事件,则根据所述文档操作事件,在所述当前文档的树结构中确定对应的内容块节点,包括:
根据所述文档读取事件,在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识;
相应的,根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件包括:
根据确定的所述内容块节点,拉取各所述内容块节点对应的最新内容 块版本标识及其实体内容;
基于所述树结构的版本标识快照,确定拉取的所述内容块节点的最新内容块版本标识,与所述待推送版本标识的一致性;
如果满足一致性要求,则将拉取的所述内容块节点的实体内容提供给所述客户端。
根据本公开的一个或多个实施例,提供了一种基于树结构的文档处理方法、装置、设备和介质,所述方法还包括:如果不满足一致性要求,重新执行在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识的操作。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开实施例中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (61)

  1. 一种页面内容的处理方法,其特征在于,包括:
    响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
    在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
  2. 根据权利要求1所述的方法,其特征在于,所述在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,包括:
    在所述目标内容块的关联位置处展示已连接所述连接内容块的主动连接标识,以在当前页面内利用所述主动连接标识查看所述连接内容块;
    在所述连接内容块的关联位置处展示被所述目标内容块连接的被动连接标识,以在所述连接内容块的所处页面内利用所述被动连接标识查看所述目标内容块。
  3. 根据权利要求1所述的方法,其特征在于,所述响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块,包括:
    响应于当前页面内目标内容块的连接操作,展示对应的连接查找界面;
    在所述连接查找界面内展示一个以上的内容块,响应于对所述一个以上的内容块的选择操作,将选中的内容块确定为所述目标内容块的连接内容块。
  4. 根据权利要求1所述的方法,其特征在于,所述目标内容块和所述连接内容块中的任一方内容块的关联位置处展示的连接标识至少包括以下一项或两项:
    该任一方内容块被其他内容块连接后的被动连接标识;
    该任一方内容块连接其他内容块后的主动连接标识。
  5. 根据权利要求1所述的方法,其特征在于,在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识之后,还包括:
    响应于预设操作,在当前页面的预设区域内展示所述目标内容块关联 的各内容块;
    响应于所述预设区域内所展示的内容块的触发操作,从当前页面跳转至该内容块的所处页面。
  6. 根据权利要求5所述的方法,其特征在于,所述从当前页面跳转至该内容块的所处页面,包括:
    从当前页面跳转至该内容块的所处页面中该内容块所在位置处。
  7. 根据权利要求5所述的方法,其特征在于,所述在当前页面的预设区域内展示所述目标内容块关联的各内容块,包括:
    查看所述目标内容块的连接属性信息内记录的各连接关系,以按照各连接关系对应设置的删除标识确定所述目标内容块关联的各内容块是否已被删除;
    在当前页面的预设区域内展示所述目标内容块关联的未被删除的内容块。
  8. 根据权利要求7所述的方法,其特征在于,所述连接关系对应设置的删除标识记载在该连接关系指定的内容块的连接属性信息或者其他数据区域内。
  9. 根据权利要求1所述的方法,其特征在于,在响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块之后,还包括:
    在所述目标内容块和所述连接内容块的连接属性信息内分别记录两者之间的连接关系。
  10. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    响应于所述目标内容块的删除操作,按照所述目标内容块的连接属性信息内已记录的连接关系,确定与所述目标内容块连接的内容块,并更新所确定的内容块为所述目标内容块设置的删除标识。
  11. 根据权利要求5所述的方法,其特征在于,所述预设区域包括所述当前页面的侧边栏,或下半部显示区域、或上半部显示区域,
    或者,所述预设区域内分区展示所述目标内容块主动连接和被动连接的内容块,或者高亮显示所述预设操作指定的连接标识对应的内容块。
  12. 根据权利要求5所述的方法,其特征在于,所述目标内容块的关 联位置处展示的每一连接标识具有与该连接标识关联的分类标签;相应的,所述在当前页面的预设区域内展示所述目标内容块关联连接的各内容块,包括:
    在当前页面的预设区域内,按照所触发的连接标识的分类标签,过滤展示所述目标内容块关联的各内容块。
  13. 根据权利要求1所述的方法,其特征在于,所述当前页面包括文档。
  14. 根据权利要求1-13任一项所述的方法,其特征在于,在响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块之前,还包括:
    在当前页面内创建所述目标内容块,并为所述目标内容块配置对应的连接控件,以利用所述连接控件执行所述连接操作。
  15. 根据权利要求1-13任一项所述的方法,其特征在于,所述连接内容块为当前页面内除所述目标内容块之外的其他内容块,或者除当前页面之外的其他页面内的内容块。
  16. 根据权利要求1-13任一项所述的方法,其特征在于,所述连接内容块与所述目标内容块的内容类型相同或不同,或者所述连接内容块与所述目标内容块的关联位置处展示的连接标识的分类标签相同或不同。
  17. 根据权利要求16所述的方法,其特征在于,包括:所述内容块的内容类型包括以下至少一项:
    文字类型的内容块、多媒体类型的内容块、表格类型的内容块、程序类型的内容块;
    所述分类标签包括以下一项或多项:目标、任务、报告。
  18. 一种信息处理方法,其特征在于,包括:
    响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
    响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
    获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
  19. 根据权利要求18所述的方法,其特征在于,所述方法还包括:
    响应于所述第一内容块的删除操作,根据所述第一内容块的连接属性信息,确定与所述第一内容块连接的内容块,并更新所述第一内容块连接的内容块为所述第一内容块设置的删除标识。
  20. 根据权利要求18所述的方法,其特征在于,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系之后,还包括:
    更新文档结构中所述第一内容块和所述第二内容块的连接属性信息。
  21. 根据权利要求20所述的方法,其特征在于,所述第一内容块和所述第二内容块属于同一文档或者不同文档。
  22. 一种页面内容的处理装置,其特征在于,包括:
    连接响应模块,用于响应于当前页面内目标内容块的连接操作,确定所述目标内容块的连接内容块;
    内容连接模块,用于在所述目标内容块和所述连接内容块中的其中一方内容块的关联位置处展示另一方内容块的连接标识,以利用所述连接标识查看另一方内容块。
  23. 一种信息处理装置,其特征在于,包括:
    连接关系记录模块,用于响应于将第一内容块和第二内容块进行连接的连接操作,在第一内容块的连接属性信息和第二内容块的连接属性信息中记录所述第一内容块和第二内容块的连接关系;
    连接内容查找模块,用于响应于第一内容块的连接内容块输出请求,查找所述第一内容块的连接属性信息以确定与所述第一内容块连接的内容块;
    连接内容输出模块,用于获取与所述第一内容块连接的内容块的内容数据信息,输出所述内容数据信息。
  24. 一种计算机设备,其特征在于,包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-17中任一所述的页面内容的处理方法,或者,实现如权利要求18-21中任一所述的信息处理方法。
  25. 一种可读介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-17中任一所述的页面内容的处理方法,或者,实现如权利要求18-21中任一所述的信息处理方法。
  26. 一种文档同步方法,其特征在于,所述方法包括:
    根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述文档版本标识用于表征归属于所述文档的内容块的更新;
    在监听到房间的内容对象更新时,确定在所述房间中订阅了内容对象的客户端;其中,所述内容对象包括文档;
    根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,以供所述客户端对所述内容对象进行更新。
  27. 根据权利要求26所述的方法,其特征在于,所述根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听,包括:
    监听文档的树结构中文档节点的文档版本标识序列,在产生新的文档版本标识时,确定所述文档产生更新内容。
  28. 根据权利要求26所述的方法,其特征在于,所述内容块节点记录有内容块版本标识序列,所述方法还包括:
    在归属于所述文档节点的任一所述内容块节点产生新增的内容块版本标识时,在所述文档节点的文档版本标识序列中新增文档版本标识。
  29. 根据权利要求26所述的方法,其特征在于,所述内容对象还包括内容块,则所述方法还包括:
    根据所述树结构中内容块节点的内容块版本标识,对内容块的更新状态进行监听;其中,所述内容块节点记录有内容块版本标识序列,所述内 容块版本标识用于表征内容块的内容更新。
  30. 根据权利要求26所述的方法,其特征在于,所述根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,包括:
    根据所述树结构中文档节点的文档版本标识,基于树结构的版本标识快照,查找新增的文档版本标识所对应的每个内容块节点的新增内容块版本标识;
    根据所述新增内容块版本标识,确定对应内容块的更新内容,将所述更新内容提供给所述客户端。
  31. 根据权利要求26或29所述的方法,其特征在于,所述方法还包括:
    接收客户端在加载文档时触发的房间订阅请求,并确定所述房间订阅请求指向的内容对象;
    将所述客户端添加至内容对象对应的房间中。
  32. 根据权利要求31所述的方法,其特征在于,所述确定所述房间订阅请求指向的内容对象,包括:
    确定所述房间订阅请求指向的当前加载文档;
    根据当前加载文档在所述树结构中确定对应的文档节点,将所述文档节点的文档节点标识,确定为所述房间订阅请求指向的内容对象。
  33. 根据权利要求32所述的方法,其特征在于,根据当前加载文档在所述树结构中确定对应的文档节点之后,所述方法还包括:
    确定所述文档节点具有引用关系的引用内容块的内容块节点;
    将具有引用关系的内容块节点标识,确定为所述房间订阅请求指向的内容对象。
  34. 根据权利要求32所述的方法,其特征在于,根据当前加载文档在所述树结构中确定对应的文档节点之后,所述方法还包括:
    确定所述文档节点具有反向引用关系的反向链接内容块的内容块节点;
    将具有反向引用关系的内容块节点标识,确定为所述房间订阅请求指向的内容对象。
  35. 根据权利要求29所述的方法,其特征在于,所述方法还包括:
    接收客户端发送的心跳请求;
    根据所述树结构中文档节点的文档版本标识和/或内容块节点的内容块版本标识,检测所述心跳请求所对应的目标文档或目标内容块是否发生更新;
    如果所述目标文档或目标内容块发生更新,则向所述客户端提供更新的版本标识。
  36. 根据权利要求29所述的方法,其特征在于,所述方法还包括:
    接收客户端发送的补差更新请求;
    根据所述补差更新请求所指定的目标文档或目标内容块的版本标识,获取对应的更新内容,并反馈给所述客户端。
  37. 一种文档同步方法,其特征在于,所述方法包括:
    针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新;
    获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识;
    根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
  38. 根据权利要求37所述的方法,其特征在于,所述针对客户端的当前处理文档,向服务端发送内容更新请求,包括:
    针对客户端的当前处理文档,确定所述当前处理文档的至少一个引用内容块,将所述当前处理文档的文档版本标识和引用内容块的内容块标识,携带在所述更新请求中,向所述服务端发送。
  39. 根据权利要求37所述的方法,其特征在于,所述针对客户端的当前处理文档,向服务端发送内容更新请求,包括下述至少一种:
    在所述客户端加载所述当前处理文档时,向所述服务端发送内容更新 请求;
    在所述客户端编辑所述当前处理文档的过程中,向所述服务端发送内容更新请求。
  40. 根据权利要求37-39任一项所述的方法,其特征在于,所述内容更新请求为加房请求或心跳请求。
  41. 一种文档同步装置,其特征在于,包括:
    第一监听模块,用于根据文档的树结构中文档节点的文档版本标识,对文档的更新状态进行监听;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述文档版本标识用于表征归属于所述文档的内容块的更新;
    第一确定模块,用于在监听到房间的内容对象更新时,确定在所述房间中订阅了内容对象的客户端;其中,所述内容对象包括文档;
    发送模块,用于根据所述房间中内容对象的更新内容,将所述更新内容提供给所述客户端,以供所述客户端对所述内容对象进行更新。
  42. 一种文档同步装置,其特征在于,所述装置包括:
    请求发送模块,用于针对客户端的当前处理文档,向服务端发送内容更新请求,以请求所述服务端根据所述内容更新请求的文档版本标识确定文档内容;其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,文档版本标识用于表征归属于所述文档的内容块的更新;
    版本标识获取模块,用于获取所述服务端反馈的文档版本标识和归属于文档的内容块的内容块版本标识;
    内容获取模块,用于根据所述文档版本标识和内容块版本标识,获取实体内容至客户端中。
  43. 一种文档同步设备,其特征在于,包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求26-36任一项所述的文档同步方法或如权利要求37-40任一项所述的文档同步方法。
  44. 一种计算机存储介质,其特征在于,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求26-36任一项所述的文档同步方法或如权利要求37-40任一项所述的文档同步方法。
  45. 一种基于树结构的文档处理方法,其特征在于,包括:
    获取当前文档的文档操作事件;
    根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点和/或内容块节点;
    根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件;
    其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述内容块节点记录有内容块版本标识序列;所述文档版本标识用于表征归属于所述文档的内容块的更新。
  46. 根据权利要求45所述的方法,其特征在于:
    归属于所述文档的内容块中包括根内容块,所述文档节点还记录有根内容块的内容块版本标识序列。
  47. 根据权利要求46所述的方法,其特征在于:
    所述文档节点和所述内容块节点还记录有编辑操作标识序列,所述编辑操作标识用于表征更新内容块的编辑操作。
  48. 根据权利要求47所述的方法,其特征在于,所述方法还包括:
    获取对所述当前文档的文档编辑事件;
    根据所述文档编辑事件中的编辑操作,更新所述树结构中内容块节点的编辑操作标识和内容块版本标识,或更新所述内容块节点与文档节点的父子关系;
    根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识 进行更新。
  49. 根据权利要求48所述的方法,其特征在于,如果所述编辑操作包括内容块的内容更新操作,则根据所述文档编辑事件中的编辑操作,更新所述树结构中内容块节点的编辑操作标识和内容块版本标识,包括:
    根据所述编辑操作确定对应的内容块;
    向所述内容块的内容块节点的编辑操作标识序列中添加新的编辑操作标识;
    向所述内容块节点的内容块版本标识序列中添加新的内容块版本标识;
    相应的,根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新,包括:
    向所述文档节点的编辑操作标识序列中添加新的编辑操作标识,并向所述文档节点的文档版本标识序列中添加新的文档版本标识,其中,新的文档版本标识与新的内容块版本标识相对应。
  50. 根据权利要求49所述的方法,其特征在于,根据所述编辑操作确定对应的内容块,包括:
    根据所述编辑操作确定对应的至少两个内容块;
    相应的,新的文档版本标识与新的内容块版本标识一一相对应;或一个新的文档版本标识与一个编辑操作导致添加的至少两个新的内容块版本标识相对应。
  51. 根据权利要求48所述的方法,其特征在于,如果所述编辑操作包括内容块新增操作,则根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新,包括:
    根据所述编辑操作确定对应的文档节点;
    向所述文档节点的编辑操作标识序列中添加新的编辑操作标识,并向所述文档节点的文档版本标识序列中添加新的文档版本标识;
    相应的,根据所述文档编辑事件中的编辑操作,更新所述树结构中内容块节点的编辑操作标识和内容块版本标识,包括:
    根据所述编辑操作,在所述树结构中添加新的内容块节点,并在所述 内容块节点中创建新的内容块版本标识,建立新的内容块版本标识与所述的新的文档版本标识的对应关系。
  52. 根据权利要求48所述的方法,其特征在于,如果所述编辑操作包括内容块删除操作,则根据所述编辑操作,更新所述内容块节点与文档节点的父子关系,包括:
    根据所述编辑操作确定对应的内容块;
    删除所述内容块的内容块节点与文档节点之间的父子关系;
    相应的,根据所述编辑操作,对所述文档节点的编辑操作标识和文档版本标识进行更新,包括:
    根据所述编辑操作,向所述文档节点的编辑操作标识序列中添加新的编辑操作标识,并向所述文档节点的文档版本标识序列中添加新的文档版本标识。
  53. 根据权利要求45所述的方法,其特征在于,如果所述文档操作事件为版本变更事件,则根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点,包括:
    根据所述版本变更事件,在所述当前文档的树结构中确定对应的文档节点,以及所述版本变更事件所指向的文档版本标识;
    相应的,根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件,包括:
    根据所述文档版本标识,基于树结构的版本标识快照,查找对应的每个内容块节点的内容块版本标识;
    根据每个内容块节点的内容块版本标识,确定各内容块节点的待变更内容;
    根据各内容块节点的待变更内容,执行所述文档变更事件。
  54. 根据权利要求53所述的方法,其特征在于,根据各内容块节点的待变更内容,执行所述文档变更事件之后,所述方法还包括:
    根据所述文档变更事件的待变更内容,向所述文档节点中添加新的编辑操作标识、内容块版本标识和文档版本标识;且向各所述内容块中添加新的编辑操作标识和内容块版本标识。
  55. 根据权利要求45所述的方法,其特征在于,如果所述文档操作事件为内容块更新内容推送事件,则根据所述文档操作事件,在所述当前文档的树结构中确定对应的内容块节点,包括:
    根据所述内容块更新内容推送事件,在所述树结构中确定对应的内容块节点,以及所述内容块节点所归属的文档节点的最新文档版本标识;
    相应的,根据文档节点的文本版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件,包括:
    基于所述树结构的版本标识快照,确定所述最新文档版本标识所对应的已更新内容块版本标识;
    根据所述已更新内容块版本标识,执行所述内容块更新内容推送事件。
  56. 根据权利要求55所述的方法,其特征在于,基于所述树结构的版本标识快照,确定所述最新文档版本标识所对应的已更新内容块版本标识,包括:
    基于所述树结构的版本标识快照,确定所述最新文档版本标识所对应的编辑操作版本标识;
    根据所述编辑操作版本标识,查找对应的内容块版本标识,作为已更新内容块版本标识。
  57. 根据权利要求45所述的方法,其特征在于,如果所述文档操作事件为文档读取事件,则根据所述文档操作事件,在所述当前文档的树结构中确定对应的内容块节点,包括:
    根据所述文档读取事件,在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识;
    相应的,根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件,包括:
    根据确定的所述内容块节点,拉取各所述内容块节点对应的最新内容块版本标识及其实体内容;
    基于所述树结构的版本标识快照,确定拉取的所述内容块节点的最新内容块版本标识,与所述待推送版本标识的一致性;
    如果满足一致性要求,则将拉取的所述内容块节点的实体内容提供给 所述客户端。
  58. 根据权利要求57所述的方法,其特征在于,所述方法还包括:
    如果不满足一致性要求,重新执行在所述树结构中确定对应的文档节点和内容块节点,以及所述文档节点和内容块节点的待推送版本标识的操作。
  59. 一种基于树结构的文档处理装置,其特征在于,包括:
    第一获取模块,用于获取当前文档的文档操作事件;
    第一确定模块,用于根据所述文档操作事件,在所述当前文档的树结构中确定对应的文档节点和/或内容块节点;
    执行模块,用于根据文档节点的文档版本标识以及内容块节点的内容块版本标识之间的对应关系,执行所述文档操作事件;
    其中,所述文档包括至少一个内容块,所述树结构中包括文档节点和内容块节点,所述文档节点和内容块节点之间的父子关系表征文档和内容块之间的归属关系;所述文档节点记录有文档版本标识序列,所述内容块节点记录有内容块版本标识序列;所述文档版本标识用于表征归属于所述文档的内容块的更新。
  60. 一种基于树结构的文档处理设备,其特征在于,包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求45-58任一项所述的基于树结构的文档处理方法。
  61. 一种计算机存储介质,其特征在于,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求45-58任一项所述的基于树结构的文档处理方法。
PCT/CN2022/078214 2021-03-01 2022-02-28 页面内容的连接、文档同步、文档处理方法、装置及设备 WO2022184007A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/548,654 US20240143555A1 (en) 2021-03-01 2022-02-28 Page content connection method, apparatus and device, document synchronization method, apparatus and device, and document processing method, apparatus and device

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN202110227813.4A CN114996230A (zh) 2021-03-01 2021-03-01 文档同步方法、装置、设备和介质
CN202110227813.4 2021-03-01
CN202110226979.4A CN114996216A (zh) 2021-03-01 2021-03-01 一种基于树结构的文档处理方法、装置、设备和介质
CN202110226980.7A CN114995720A (zh) 2021-03-01 2021-03-01 一种页面内容的处理方法、装置、设备和可读介质
CN202110226979.4 2021-03-01
CN202110226980.7 2021-03-01

Publications (1)

Publication Number Publication Date
WO2022184007A1 true WO2022184007A1 (zh) 2022-09-09

Family

ID=83154705

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/078214 WO2022184007A1 (zh) 2021-03-01 2022-02-28 页面内容的连接、文档同步、文档处理方法、装置及设备

Country Status (2)

Country Link
US (1) US20240143555A1 (zh)
WO (1) WO2022184007A1 (zh)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005045588A2 (en) * 2003-10-23 2005-05-19 Microsoft Corporation System and method for navigating content in an item
US20060136513A1 (en) * 2004-12-21 2006-06-22 Nextpage, Inc. Managing the status of documents in a distributed storage system
US20080104141A1 (en) * 2006-10-30 2008-05-01 Mcmahon Douglas James Copy-on-write versioning of documents
US20100318892A1 (en) * 2009-06-15 2010-12-16 Microsoft Corporation Identifying changes for online documents
CN102222079A (zh) * 2010-04-07 2011-10-19 佳能株式会社 图像处理设备及图像处理方法
CN102810115A (zh) * 2012-06-19 2012-12-05 公安部交通管理科学研究所 一种多层分布式文档管理体系的实现方法
CN104036027A (zh) * 2014-06-27 2014-09-10 吴涛军 一种电子文档的位置之间建立连接和传输信息的方法及系统
US20140279843A1 (en) * 2013-03-14 2014-09-18 Workshare, Ltd. Method and System for Document Retrieval with Selective Document Comparison
US20160110313A1 (en) * 2014-03-14 2016-04-21 Citta LLC System and method of content creation, versioning and publishing
CN105637462A (zh) * 2013-10-09 2016-06-01 互动解决方案公司 便携式终端设备、幻灯片信息管理系统及便携式终端的控制方法
US20170060829A1 (en) * 2015-09-01 2017-03-02 Branchfire, Inc. Method and system for annotation and connection of electronic documents

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005045588A2 (en) * 2003-10-23 2005-05-19 Microsoft Corporation System and method for navigating content in an item
US20060136513A1 (en) * 2004-12-21 2006-06-22 Nextpage, Inc. Managing the status of documents in a distributed storage system
US20080104141A1 (en) * 2006-10-30 2008-05-01 Mcmahon Douglas James Copy-on-write versioning of documents
US20100318892A1 (en) * 2009-06-15 2010-12-16 Microsoft Corporation Identifying changes for online documents
CN102222079A (zh) * 2010-04-07 2011-10-19 佳能株式会社 图像处理设备及图像处理方法
CN102810115A (zh) * 2012-06-19 2012-12-05 公安部交通管理科学研究所 一种多层分布式文档管理体系的实现方法
US20140279843A1 (en) * 2013-03-14 2014-09-18 Workshare, Ltd. Method and System for Document Retrieval with Selective Document Comparison
CN105637462A (zh) * 2013-10-09 2016-06-01 互动解决方案公司 便携式终端设备、幻灯片信息管理系统及便携式终端的控制方法
US20160110313A1 (en) * 2014-03-14 2016-04-21 Citta LLC System and method of content creation, versioning and publishing
CN104036027A (zh) * 2014-06-27 2014-09-10 吴涛军 一种电子文档的位置之间建立连接和传输信息的方法及系统
US20170060829A1 (en) * 2015-09-01 2017-03-02 Branchfire, Inc. Method and system for annotation and connection of electronic documents

Also Published As

Publication number Publication date
US20240143555A1 (en) 2024-05-02

Similar Documents

Publication Publication Date Title
US11520766B2 (en) Event context enrichment
AU2022201538B2 (en) Control transfer of shared content
KR102128139B1 (ko) 플레이스홀더에 의한 파일 관리 기법
US8230336B2 (en) Efficient discovery, display, and autocompletion of links to wiki resources
TWI352904B (en) Method and computer readable medium for controllin
US8868666B1 (en) Methods, devices and systems for content discovery, aggregation and presentment over a network
US20050223027A1 (en) Methods and systems for structuring event data in a database for location and retrieval
CN117873980A (zh) 用于向用户通知对文件的改变的系统和方法
US11790623B1 (en) Manipulation of virtual object position within a plane of an extended reality environment
WO2022127838A1 (zh) 文档处理方法、装置和电子设备
US20240152690A1 (en) Document processing method and apparatus, and device and medium
US10353865B2 (en) On-device indexing of hosted content items
US11847145B2 (en) Aliased data retrieval for key-value stores
EP3997589A1 (en) Delta graph traversing system
WO2022183977A1 (zh) 文档更新方法、装置、设备和介质
WO2022148485A1 (zh) 信息展示方法、装置和电子设备
CN111221851A (zh) 一种基于Lucene的海量数据查询、存储的方法和装置
US20170262538A1 (en) Method of and system for grouping object in a storage device
US20140280010A1 (en) Shared media crawler database method and system
WO2013087020A1 (zh) 用户生成内容的处理方法和装置
CN112559913B (zh) 一种数据处理方法、装置、计算设备及可读存储介质
WO2022184007A1 (zh) 页面内容的连接、文档同步、文档处理方法、装置及设备
WO2023241583A1 (zh) 用于页面交互的方法、装置、设备和存储介质
CN111414331A (zh) 在线协同知识库的文档导入方法、装置、存储介质及设备
WO2022151835A1 (zh) 一种样例报文处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22762472

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18548654

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22762472

Country of ref document: EP

Kind code of ref document: A1