CN109710905B - Document collaborative editing method and device, storage medium and electronic equipment - Google Patents

Document collaborative editing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109710905B
CN109710905B CN201811453593.1A CN201811453593A CN109710905B CN 109710905 B CN109710905 B CN 109710905B CN 201811453593 A CN201811453593 A CN 201811453593A CN 109710905 B CN109710905 B CN 109710905B
Authority
CN
China
Prior art keywords
document
mark
modification information
operation end
modified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811453593.1A
Other languages
Chinese (zh)
Other versions
CN109710905A (en
Inventor
祝美祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feishu Technology Co ltd
Original Assignee
Tianjin ByteDance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin ByteDance Technology Co Ltd filed Critical Tianjin ByteDance Technology Co Ltd
Publication of CN109710905A publication Critical patent/CN109710905A/en
Application granted granted Critical
Publication of CN109710905B publication Critical patent/CN109710905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The disclosure relates to a document collaborative editing method, a device, a storage medium and an electronic device, and the document collaborative editing method comprises the following steps: acquiring a first document, adding a first mark in the first document, transmitting the first document to at least two operation ends to generate a second document, and adding a second mark in the second document; receiving modification information of the first operation end on the second document, and adding a third mark in the modification information; modifying the first document according to the modification information, and modifying the first mark to enable the modified first mark to correspond to the third mark; and sending the modification information to the second operation end to modify the second document, and modifying the second mark so that the modified second mark corresponds to the first mark of the modified first document. By implementing the method and the device, the operation end can be ensured to receive the message sequence according to the generation sequence of the modification information, the loss of the modification information by the operation end is reduced or avoided, and the modification information is ensured to reach the operation end.

Description

Document collaborative editing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of document editing, and more particularly, to a method and apparatus for collaborative editing of a document, a storage medium, and an electronic device.
Background
In collaborative editing applications, a server needs to forward operation information of multiple operation terminals to an operation terminal that cooperates with the server. For real-time performance of the message, a WebSocket equal-length link mode is generally used to realize message pushing. However, due to network jitter, service stability, or limitations of a message channel (such as a message body size), the message transmission channel causes a condition that a server loses or disorder messages in a message issuing process, and at this time, the messages received by an operation end lose or disorder messages, thereby affecting editing results.
Disclosure of Invention
The technical problem to be solved by the present disclosure is to provide a method, an apparatus, a storage medium and an electronic device for collaborative editing of a document, aiming at the technical defects in the prior art.
The technical scheme adopted by the present disclosure for solving the technical problems is as follows: a method for constructing collaborative editing of a document, comprising: the method comprises the following steps:
acquiring a first document, adding a first mark in the first document, transmitting the first document to at least two operation ends to generate a second document, and adding a second mark in the second document;
receiving modification information of a second document of the first operation end by the first operation end, and adding a third mark into the modification information;
Modifying the first document according to the modification information, and modifying the first mark of the first document according to a preset rule, so that the modified first mark of the first document corresponds to the third mark of the modification information;
and sending the modification information to a second operation end, so as to modify the second document of the second operation end according to the modification information, and modifying the second mark of the second document of the second operation end to enable the second mark of the second document to correspond to the first mark of the modified first document.
Preferably, the method further comprises:
sending the first mark of the modified first document to the second operation end according to a preset condition, and confirming whether the second mark of the second document of the second operation end corresponds to the first mark of the modified first document;
and when the first mark corresponds to the second mark of the second document of the second operation end, calculating the difference between the third mark corresponding to the first mark of the modified first document and the third mark corresponding to the second mark of the second document of the second operation end, and acquiring corresponding modification information according to the difference.
Preferably, the adding a first mark in the first document includes:
Adding a first mark corresponding to the attribute in the first document according to the attribute of the first document;
said adding a second mark in said second document comprising:
adding a second mark corresponding to the attribute in the second document;
said adding a third tag to said modification information comprises:
and adding a third mark corresponding to the attribute in the modification information.
Preferably, adding the first mark in the first document includes: adding a first document version number to the first document;
said adding a second mark in said second document comprises: adding a second document version number to the second document;
adding a third tag to the modification information includes: sequentially adding modification information version numbers into the modification information, wherein the modification information version numbers are increased according to the time sequence of the modification information;
the modifying the first mark of the first document according to the preset rule to enable the modified first mark of the first document to correspond to the third mark comprises the following steps:
and modifying the first document version number according to the modification information, so that the modified first document version number of the first document is identical to the modification information version number.
Preferably, the modifying the second mark of the second document at the second operation end, so that the second mark of the second document corresponds to the first mark of the modified first document, includes:
and modifying the second document version number of the second operation end to enable the second document version number to be the same as the first document version number of the modified first document.
Preferably, the step of confirming whether the second mark of the second document of the second operation end corresponds to the first mark of the modified first document; comprising the following steps:
confirming whether the second document version number of the second operation end is the same as the first document version number of the modified first document;
the calculating a difference between a third mark corresponding to the first mark of the modified first document and a third mark corresponding to the second mark of the second document at the second operation end, obtaining corresponding modification information according to the difference to modify the second document at the second operation end, and modifying the second mark of the second document at the second operation end to correspond to the first mark of the modified first document, including:
and calculating a missing version number between the second document version number of the second operation end and the first document version number of the modified first document, acquiring modification information corresponding to the missing version number, sequentially modifying the second document of the second operation end according to the version number sequence, and modifying the second document version number of the second operation end into the first document version number of the modified first document.
Preferably, the sending the modification information to the second operation end includes:
actively transmitting the modification information to the second operation end through a first channel, or
And sending the modification information through a second channel according to the second operation end request.
The present disclosure also constructs a document collaborative editing apparatus, comprising:
an acquisition unit configured to acquire and store a first document;
a first modifying unit for adding a first mark in the first document;
the first execution unit is used for sending the first document to at least two operation ends to generate a second document and adding a second mark in the second document;
the second modification unit is used for receiving modification information of the first operation end on the second document and adding a third mark in the modification information;
a third modification unit, configured to modify the first document according to the modification information and modify the first flag of the first document according to a preset rule, so that the modified first flag of the first document corresponds to the third flag of the modification information;
the second execution unit is used for sending the modification information to a second operation end so as to modify the second document of the second operation end according to the modification information and modify the second mark of the second document of the second operation end so that the second mark of the modified second document corresponds to the first mark of the modified first document.
Optionally, the document collaborative editing apparatus of the present disclosure further includes:
a first sending unit, configured to send a first mark of the modified first document to the second operation end according to a preset condition;
a judging unit, configured to confirm whether a second mark of the second document at the second operation end corresponds to the first mark of the modified first document;
and the calculating unit is used for calculating the difference between the third mark corresponding to the first mark of the modified first document and the third mark corresponding to the second mark of the second document of the second operation end when the output of the judging unit is NO, and acquiring corresponding modification information according to the difference.
Alternatively to this, the method may comprise,
the first modification unit comprises a first adding unit, wherein the first adding unit is used for adding a first mark corresponding to the attribute in the first document according to the attribute of the first document;
the first execution unit comprises a second adding unit which is used for adding a second mark corresponding to the attribute in the second document;
the second modification unit includes a third addition unit for adding a third flag corresponding to the attribute to the modification information.
Alternatively to this, the method may comprise,
the first modification unit comprises a fourth addition unit which is used for adding a first document version number in the first document;
the first execution unit comprises a fifth adding unit which is used for adding a second document version number into the second document;
the second modification unit comprises a sixth addition unit, wherein the sixth addition unit is used for sequentially adding modification information version numbers into the modification information, and the modification information version numbers are increased according to the time sequence of the modification information;
the third modification unit comprises a fourth modification unit which is used for modifying the first document version number according to the modification information so that the modified first document version number of the first document is the same as the modification information version number.
Alternatively to this, the method may comprise,
the second execution unit comprises a fifth modification unit, and the fifth modification unit is used for modifying the second document version number of the second operation end so that the second document version number is the same as the first document version number of the modified first document.
It is possible to make the length of the tube short,
the judging unit comprises a first judging unit which is used for confirming whether the second document version number of the second operating end is the same as the first document version number of the modified first document;
The computing unit comprises a first computing unit, wherein the first computing unit is used for computing a missing version number between the second document version number of the second operating end and the first document version number of the modified first document, and acquiring modification information corresponding to the missing version number;
the second execution unit comprises a sixth modification unit, wherein the sixth modification unit is used for sequentially modifying the second document of the second operation end according to the version number sequence, and modifying the version number of the second document of the second operation end into the first document version number of the modified first document.
Alternatively to this, the method may comprise,
the second execution unit comprises a second sending end, and the second sending end is used for actively sending the modification information to the second operation end through a first channel; or (b)
The second execution unit comprises a third sending end, and the third sending end is used for sending the modification information through a second channel according to the request of the second operation end.
The present disclosure also constructs a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the document collaborative editing method of any of the above.
The present disclosure also constructs an electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement a document collaborative editing method as defined in any one of the preceding claims.
The document collaborative editing method, the device, the storage medium and the electronic equipment have the following beneficial effects: the method can ensure that the operation terminal receives the message sequence according to the generation sequence of the modification information, reduce or avoid the probability that the modification information is lost by the operation terminal, and ensure that the modification information reaches the operation terminal.
Drawings
The disclosure will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a program flow diagram of a document collaborative editing method provided by an embodiment of the present disclosure;
FIG. 2 is a program flow diagram of a document collaborative editing method provided by another embodiment of the present disclosure;
FIG. 3 is a schematic diagram of steps of a document collaborative editing method provided by another embodiment of the present disclosure;
FIG. 4 is a schematic diagram of steps of a document collaborative editing method provided by another embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating the operation of a document collaborative editing method provided by another embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating the operation of a document collaborative editing method provided by another embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
For a clearer understanding of technical features, objects, and effects of the present disclosure, specific embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings.
As shown in fig. 1, in the document collaborative editing method provided in the first embodiment of the present disclosure, the method includes: s1, acquiring a first document, adding a first mark in the first document, sending the first document to at least two operation ends to generate a second document, and adding a second mark in the second document; specifically, the server obtains a first document to be edited, a first mark is added in the document, and then the operation end can be understood as that the client obtains the document from the server, namely a second document corresponding to the operation end, the operation end operates the second document, and meanwhile the operation end adds a second mark in the second document. It may be further understood that, as shown in fig. 4, there may be one or more operation ends, where for collaborative editing, there are at least two operation ends, each operation end may obtain the document from the server, each operation end obtains the first document from the server and then uses the first document as the second document corresponding to the operation end, and each operation end may independently edit and modify the corresponding second document.
S2, receiving modification information of the second document by the first operation end, and adding a third mark into the modification information; specifically, the user modifies the corresponding second document through an operation end, the modification information is sent to the server through the network connection between the operation end and the server, and after receiving the modification information, the server marks the modification information individually, for example, adds a third mark corresponding to the modification information. It will be further understood that, here, there are a plurality of operation terminals for editing and modifying the second document, where the modification information received by the server is from a plurality of different operation terminals, and the server marks the modification information according to the order in which the modification information is received, that is, the rule of the third mark of the modification information has a predetermined relationship with the time when the modification information is received, for example, the rule of the third mark of the modification information is incremented on the identification bit of the second mark.
S3, modifying the first document according to the modification information, and modifying the first mark of the first document according to a preset rule, so that the first mark of the modified first document corresponds to the third mark of the modification information; specifically, after receiving the modification information, the server modifies the corresponding first document, and simultaneously modifies the first mark of the first document, where the modification may be performed according to a certain rule, for example, the first mark may be changed according to an update rule of the third mark of the modification information. When the server receives a plurality of pieces of modification information, the first document is modified in turn according to the time sequence of receiving the modification information, and each time the first document is modified, the first mark of the first document is correspondingly modified, so that the third mark of the modification information corresponds to the first mark of the first document one by one. Further, in the present disclosure, the modification document markup and the modification document are synchronized.
S4, transmitting the modification information to the second operation end, modifying the second document of the second operation end according to the modification information, and modifying the second mark of the second document of the second operation end to enable the second mark of the second document to correspond to the first mark of the modified first document. Specifically, when the operation end modifies the server document, other operation ends, namely the second operation end, can acquire the modification information from the server, wherein the second operation end can receive one or more modification information, when receiving a plurality of modification information, the second operation end sequentially modifies the second document of the second operation end according to the sequence of the third mark of the modification information, in addition, when the second operation end modifies the second document according to the modification information, the second operation end modifies the second mark of the second document at the same time, so that the second mark of the second document is in one-to-one correspondence with the third mark of the modification information, the first mark of the first document is modified after the first document receives the modification information, and the one-to-one correspondence between the modified first mark of the first document and the third mark of the modification information is also maintained, so that the second operation end can ensure that the second mark of the second document is in one-to-one correspondence with the first mark of the first document after the modification information is received by the second operation end, and the second mark of the second document is in one-to the first mark after the modification information is modified by the server, so that the synergy of the whole modification process is formed. It is further understood that when a plurality of pieces of modification information are received, the second mark of the second document is modified each time, and the second mark of the second document after each modification corresponds to the third mark of the modification information one by one. And when the server receives the modification information each time to modify the first document, the first marks of the modified first document are in one-to-one correspondence with the second marks of the modification information.
Further, as shown in fig. 2, in the document collaborative editing method provided in the second embodiment of the present disclosure, the method further includes the following steps:
s3-1, sending a first mark of the modified first document to a second operation end according to preset conditions, and confirming whether a second mark of the second document at the second operation end corresponds to the first mark of the modified first document or not; specifically, before modifying the second document of the second operation end, the second operation end may acquire the first mark of the first document from the server according to a certain rule and correspond to the second mark of the second document, and if the mark correspondence of the two documents can meet the specified correspondence, the current editing may be ended. If the marks of the two documents do not meet the specified corresponding relation, the second document of the operation end and the document on the server are not the same document, or the second document of the operation end is not the document on the server. The predetermined rule here may be that the operation end obtains the first mark of the first document from the server at intervals, or that the server transmits the first mark of the first document to the operation end at regular intervals, and it may be understood that the operation end obtains the first mark from the server when receiving the modification information transmitted by the server, so as to check whether the second mark of the operation end corresponds to the first mark, and check whether the second document of the operation end corresponds to the first document of the server.
S3-2, when the first mark and the second mark of the second document are not corresponding, calculating the difference between the third mark corresponding to the first mark of the modified first document and the third mark corresponding to the second mark of the second document of the second operation end, and acquiring corresponding modification information according to the difference. Specifically, on the basis of the above, when the second document of the operation end and the first document of the server do not correspond to each other, the operation end calculates the missing modification information of the operation end according to the difference between the modification information corresponding to the second document and the modification information corresponding to the first document of the server, that is, the missing modification information of the operation end can be understood, where it can be understood that the first mark of the modified first document corresponds to the third mark of the last modification information received by the operation end, that the second document version of the second document of the operation end corresponds to the third mark of the modification information of the last modification information acquired by the operation end, and when the current first mark does not correspond to the second mark, it indicates that the client terminal may leave the modification information and does not modify the second document according to the modification information, that is, that the missing modification information is calculated, that is, that the third marks of the modification information corresponding to the documents on the operation end and the server are calculated, that the missing modification information can be acquired according to the difference, then step S4 is executed to acquire the corresponding modification information from the server, and the second mark corresponds to the second document to the second modification information. The corresponding modification of the second document, the first document and the modification information is completed, and the whole collaborative editing process is completed.
Further, on the above basis, in step S1, adding a first mark in the first document includes: adding a first mark corresponding to the attribute in the first document according to the attribute of the first document; adding a second mark in a second document, comprising: adding a second mark corresponding to the attribute in a second document; in step S2, adding a third flag to the modification information includes: and adding a third mark corresponding to the attribute in the modification information. In particular, when a document is edited, a plurality of different operations are usually included, such as editing and modifying the document content, modifying the document authority state, modifying the document comment list, and the list of currently viewing and editing operation ends, so that different contents of the document can be corresponding to different attributes according to a specific rule, and each attribute can be respectively subjected to independent flag setting for modification management. Even if different chapters of the content of the document are set to be different mark types, modification management is performed, for example, a corresponding document content mark is added to the first document, when the operation end edits the document content, modification information of the corresponding document content is sent to the server, the server modifies the document content mark, then a third mark of the second document modified by the operation end according to the modification information is also the document content mark, and thus the document content mark in the second document of the synchronous operation end corresponds to the first document content mark. The document authority state of the first document can be marked by a document authority state version independently, and when the document authority state is modified, the document authority state of the second document can also generate a document authority state version corresponding to the modification information, so that the second document corresponds to the document authority state of the first document. Of course, the document properties herein are not limited to the examples above.
Further, as shown in fig. 3, adding a first mark to the first document includes: adding a first document version number to the first document; adding a second mark in a second document includes: adding a second document version number to the second document; adding a third tag to the modification information includes: sequentially adding modification information version numbers into the modification information, wherein the modification information version numbers are increased according to the time sequence of the modification information; in step S3, modifying the first mark of the first document according to a preset rule, so that the modified first mark of the first document corresponds to the third mark, including: and modifying the first document version number according to the modification information, so that the modified first document version number of the first document is identical to the modification information version number. Specifically, version number management may be performed on the first document and the second document, for example, a first document version number is added to the first document, a second document version number is added to the second document, and a modification information version number is added to the modification information at the same time, when the server receives a plurality of modification information, the modification information is numbered according to a time sequence of the received modification information, that is, a corresponding modification information version number is added to the modification information according to a time sequence, where the version numbers are sequentially marked as V3.1 and V3.2 … … according to a time sequence of the received modification information. The server modifies the first document version number according to a preset rule, for example, the first document version number is initially V1.0, and after receiving the modification information, the server modifies the first document and the first document version number according to the order of the modification information, for example, sequentially modifies the modification information into V1.1 and V1.2 … …, where the modification information received may come from different operation ends or from the same operation end. Where V1.1 corresponds to V3.1, V1.2 corresponds to V3.2, and so on, where the same version numbers are understood to be the same numbers, i.e. the correspondence described above. The version number mode is only an example, and other multi-bit numbers or multi-fields can be adopted for the version number to distinguish and correspond. And the corresponding relation between the increment of the version and the version is preferably reflected.
Further, in step S4, modifying the second mark of the second document at the second operation end, so that the second mark of the modified second document corresponds to the first mark of the modified first document, including: and modifying the second document version number of the second operation end to enable the second document version number to be the same as the first document version number of the modified first document. Specifically, when the operation end obtains the modification information to modify, the modification second document version number is the same as the modification information version number, for example, according to the order of the modification information, for example, the modification information V3.1 and V3.2 … …, the modification second document version numbers are V2.1 and V2.2 … … in turn, where V2.1 corresponds to V3.1, and V2.2 corresponds to V3.2, so that according to the corresponding relation between the modification information version number and the first document version number of the modified first document, the corresponding relation between the second document version number and the first document version number can be formed, and synchronization between the operation end second document and the first document of the server is ensured.
Further, as shown in fig. 4, in step S3-1, determining whether the second mark of the second document at the second operation end corresponds to the first mark of the modified first document includes: confirming whether the second document version number of the second operation end is the same as the first document version number; step S3-2 includes: and calculating a missing version number between the second document version number of the second operation end and the first document version number, acquiring modification information corresponding to the missing version number, sequentially modifying the second document of the second operation end according to the version number sequence, and modifying the version number of the second document of the second operation end into the first document version number. Specifically, on the basis of the foregoing, if each piece of modification information of the server is acquired by the operation end, the second document version number of the operation end should correspond to the document version number of the server, V2.1 corresponds to V1.1, V2.2 corresponds to V1.2, and all the second document version numbers and the document version numbers of the server are sequentially corresponding. However, in some cases, the operation end may lose the connection with the server, after the operation end is connected with the server, the operation end obtains the current first document version number of the server, and compares the current first document version number with the second document version number of the server, in some cases, the second document version number of the operation end may be found to be behind the first document version number, for example, the server receives modification information sent by a plurality of different operation ends, namely, V3.1, V3.2, V3.3, V3.4 and V3.5, and modifies the first document, the current document version number of the modified first document is V1.5, but one operation end may, for some reasons, obtain the second document version number of the operation end is V2.2, that is, it may be understood that the modification information version corresponding to the modification information received by the second document is V3.2, and then it may be known that the operation end loses the modification information of V3.3, V3.4 and V3.5, and the operation end may obtain the modification information from the server in turn, and modify the second document to be V1.5.
Further, in step S4, sending the modification information to the second operation end includes: and actively transmitting the modification information to the second operation end through the first channel, or transmitting the modification information through the second channel according to the request of the second operation end. Specifically, as shown in fig. 6, the operation end can access the server through two modes of Http and Websocket. When the operation end sends the modification information to the server, the operation end firstly tries to use the WebSocket mode, and if the WebSocket mode is not available, the modification information is sent through the HTTP server. Because all interfaces are kept consistent, normal data transmission between an operation end and a server can be ensured when any channel in the WebSocket and http modes can work normally. The first channel is a WebSocket mode, the server actively transmits modification information to the operation end through the WebSocket mode, the second channel is an http mode, the operation end regularly discovers message updating of the server through the http mode and actively extracts modification information from the server, namely the operation end actively transmits a request for acquiring the modification information of the server to the server, and the server transmits the modification information to the operation end after receiving the request.
In addition, a document collaborative editing apparatus of the present disclosure includes:
An acquisition unit configured to acquire and store a first document;
a first modifying unit for adding a first mark in the first document;
the first execution unit is used for sending the first document to at least two operation ends to generate a second document and adding a second mark in the second document;
the second modification unit is used for receiving modification information of the first operation end on the second document and adding a third mark in the modification information;
a third modification unit, configured to modify the first document according to the modification information and modify the first mark of the first document according to a preset rule, so that the modified first mark of the first document corresponds to the third mark of the modification information;
the second execution unit is used for sending the modification information to the second operation end so as to modify the second document of the second operation end according to the modification information and modify the second mark of the second document of the second operation end so that the second mark corresponds to the third mark of the modification information.
Further, a document collaborative editing apparatus of the present disclosure further includes:
a third execution unit for sending the first mark of the modified first document to the operation end according to the preset condition,
a judging unit, configured to confirm whether the second mark of the second document at the second operation end corresponds to the first mark of the first document;
A calculating unit for calculating a difference between a third mark corresponding to the first mark of the first document and a third mark corresponding to the second mark of the second document at the second operation end when the determination result of the determining unit is non-correspondence,
and a fourth modification unit, configured to obtain corresponding modification information according to the difference, so as to modify the second document at the second operation end, and modify the second mark of the second document at the second operation end to correspond to the first mark of the first document.
The specific cooperation process between the units of the document collaborative editing apparatus may refer to the above document collaborative editing method, and will not be described herein.
In addition, an electronic device of the present disclosure includes a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program to implement a document collaborative editing method as described in any of the above. Referring now to fig. 7, a schematic diagram of an electronic device 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 7 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 7, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
In addition, a computer storage medium of the present disclosure has a computer program stored thereon, which when executed by a processor implements the document collaborative editing method described in any one of the above.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language 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. In the case of a remote computer, 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 (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Where the name of the unit does not constitute a limitation of the unit itself in some cases, for example, the acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
It is to be understood that the above examples only represent preferred embodiments of the present disclosure, which are described more specifically and in detail, but are not to be construed as limiting the scope of the present disclosure; it should be noted that, for those skilled in the art, the above technical features may be freely combined, and several variations and modifications may be made without departing from the scope of the present disclosure; therefore, all changes and modifications that come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims (9)

1. A document collaborative editing method, comprising the steps of:
acquiring a first document, adding a first mark in the first document, transmitting the first document to at least two operation ends to generate a second document, and adding a second mark in the second document;
Receiving modification information of a second document of the first operation end by the first operation end, and adding a third mark into the modification information;
modifying the first document according to the modification information, and modifying the first mark of the first document according to a preset rule, so that the first mark of the modified first document corresponds to the third mark of the modification information;
transmitting the modification information to a second operation end, so as to modify a second document of the second operation end according to the modification information, and modifying a second mark of the second document of the second operation end to enable the second mark of the second document to correspond to the first mark of the modified first document;
sending the first mark of the modified first document to the second operation end according to a preset condition, and confirming whether the second mark of the second document of the second operation end corresponds to the first mark of the modified first document;
and when the first mark and the second mark do not correspond to each other, calculating the difference between the third mark corresponding to the first mark of the modified first document and the third mark corresponding to the second mark of the second document at the second operation end, acquiring corresponding modification information according to the difference, modifying the second document, and modifying the second mark of the second document to correspond to the first mark of the first document after the modification.
2. The document collaborative editing method according to claim 1, wherein adding a first mark in the first document comprises:
adding a first mark corresponding to the attribute in the first document according to the attribute of the first document;
said adding a second mark in said second document comprising:
adding a second mark corresponding to the attribute in the second document;
said adding a third tag to said modification information comprises:
and adding a third mark corresponding to the attribute in the modification information.
3. The method for collaborative editing of a document according to claim 1, wherein,
said adding a first mark in said first document comprises: adding a first document version number to the first document;
said adding a second mark in said second document comprises: adding a second document version number to the second document;
adding a third tag to the modification information includes: sequentially adding modification information version numbers into the modification information, wherein the modification information version numbers are increased according to the time sequence of the modification information;
the modifying the first mark of the first document according to the preset rule to enable the current first mark of the modified first document to correspond to the third mark comprises the following steps:
And modifying the first document version number according to the modification information, so that the modified first document version number of the first document is identical to the modification information version number.
4. A document collaborative editing method according to claim 3, wherein modifying the second label of the second document at the second operating end so that the second label of the second document corresponds to the first label of the modified first document comprises:
and modifying the second document version number of the second operation end to enable the second document version number to be the same as the first document version number of the modified first document.
5. The document collaborative editing method according to claim 4, wherein the determining whether the second mark of the second document at the second operation end corresponds to the first mark of the modified first document; comprising the following steps:
confirming whether the second document version number of the second operation end is the same as the first document version number of the modified first document;
the calculating a difference between a third mark corresponding to the first mark of the modified first document and a third mark corresponding to the second mark of the second document at the second operation end, obtaining corresponding modification information according to the difference to modify the second document at the second operation end, and modifying the second mark of the second document at the second operation end to correspond to the first mark of the modified first document, including:
And calculating a missing version number between the second document version number of the second operation end and the first document version number of the modified first document, acquiring modification information corresponding to the missing version number, sequentially modifying the second document of the second operation end according to the version number sequence, and modifying the second document version number of the second operation end into the first document version number of the modified first document.
6. The method for collaborative editing of a document according to any one of claims 1-5, wherein the sending the modification information to the second operator includes:
actively transmitting the modification information to the second operation end through a first channel, or
And sending the modification information through a second channel according to the second operation end request.
7. A document collaborative editing apparatus, comprising:
an acquisition unit configured to acquire and store a first document;
a first modifying unit for adding a first mark in the first document;
the first execution unit is used for sending the first document to at least two operation ends to generate a second document and adding a second mark in the second document;
the second modification unit is used for receiving modification information of the first operation end on the second document and adding a third mark in the modification information;
A third modification unit, configured to modify the first document according to the modification information and modify the first flag of the first document according to a preset rule, so that the modified first flag of the first document corresponds to the third flag of the modification information;
the second execution unit is used for sending the modification information to a second operation end, modifying a second document of the second operation end according to the modification information, and modifying a second mark of the second document of the second operation end so that the second mark of the second document of the second operation end corresponds to the first mark of the modified first document;
the third execution unit is used for sending the first mark of the modified first document to the second operation end according to the preset condition;
a judging unit, configured to confirm whether the second mark of the second document at the second operation end corresponds to the first mark of the first document;
a calculating unit, configured to calculate, when the determination result of the determining unit is that the first mark corresponds to the second mark, a difference between the third mark corresponding to the first mark of the first document and the third mark corresponding to the second mark of the second document at the second operation end;
and a fourth modification unit, configured to obtain corresponding modification information according to the difference, so as to modify the second document at the second operation end, and modify the second mark of the second document at the second operation end to correspond to the first mark of the first document.
8. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the document collaborative editing method of any of claims 1-6.
9. An electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the document collaborative editing method of any of claims 1-6.
CN201811453593.1A 2018-09-30 2018-11-30 Document collaborative editing method and device, storage medium and electronic equipment Active CN109710905B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811161173 2018-09-30
CN2018111611736 2018-09-30

Publications (2)

Publication Number Publication Date
CN109710905A CN109710905A (en) 2019-05-03
CN109710905B true CN109710905B (en) 2023-04-28

Family

ID=66253962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811453593.1A Active CN109710905B (en) 2018-09-30 2018-11-30 Document collaborative editing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109710905B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175320B (en) * 2019-05-08 2024-04-30 抖音视界有限公司 Document marking method and device
CN110162761B (en) * 2019-05-24 2023-06-30 北京字节跳动网络技术有限公司 Collaborative editing method, device and equipment for document and storage medium
CN111290755B (en) * 2020-02-04 2023-07-07 北京字节跳动网络技术有限公司 Method, device, electronic equipment and storage medium for presenting data
CN111832256B (en) * 2020-06-30 2024-07-12 深圳市万翼数字技术有限公司 Method and related device for marking information of examination drawing
CN113268959B (en) * 2021-05-25 2024-05-03 北京北大方正电子有限公司 Document processing method and device and electronic equipment
CN113535434A (en) * 2021-07-22 2021-10-22 北京字跳网络技术有限公司 Collaborative editing method and device for data nodes, storage medium and equipment
CN115048914A (en) * 2022-06-02 2022-09-13 佳缘科技股份有限公司 Document modification method and device
CN114841127B (en) * 2022-06-29 2022-09-23 天津联想协同科技有限公司 Layer stacking method and device based on streaming electronic collaboration document
CN119378504B (en) * 2024-12-27 2025-03-21 中南迅智科技有限公司 Online Visual Presentation Document Editing Method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101410803A (en) * 2006-01-24 2009-04-15 思杰系统有限公司 Methods and systems for providing access to a computing environment
CN103020026A (en) * 2012-11-15 2013-04-03 无锡永中软件有限公司 Synergistic file processing system and method
CN105122727A (en) * 2013-01-11 2015-12-02 Db网络公司 Systems and methods for detecting and mitigating threats to a structured data storage system
CN105184469A (en) * 2015-08-26 2015-12-23 百度在线网络技术(北京)有限公司 Method and device for collaborative editing of documents

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101410803A (en) * 2006-01-24 2009-04-15 思杰系统有限公司 Methods and systems for providing access to a computing environment
CN103020026A (en) * 2012-11-15 2013-04-03 无锡永中软件有限公司 Synergistic file processing system and method
CN105122727A (en) * 2013-01-11 2015-12-02 Db网络公司 Systems and methods for detecting and mitigating threats to a structured data storage system
CN105184469A (en) * 2015-08-26 2015-12-23 百度在线网络技术(北京)有限公司 Method and device for collaborative editing of documents

Also Published As

Publication number Publication date
CN109710905A (en) 2019-05-03

Similar Documents

Publication Publication Date Title
CN109710905B (en) Document collaborative editing method and device, storage medium and electronic equipment
US20240291898A1 (en) Screen mirroring device discovery method and apparatus, electronic device, and storage medium
CN109491742B (en) Page table rendering method and device
CN111314433B (en) Message transmission method and device and electronic equipment
CN109492208B (en) Document editing method and device, equipment and storage medium thereof
CN110209315B (en) Method and device for displaying characters in user interface, electronic equipment and storage medium
CN108011949B (en) Method and apparatus for acquiring data
CN110781373A (en) List updating method and device, readable medium and electronic equipment
CN111597107B (en) Information output method and device and electronic equipment
CN110879729B (en) Channel configuration method and device for live broadcast room, readable medium and electronic equipment
CN111290861B (en) Message processing method and device and electronic equipment
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN110162761B (en) Collaborative editing method, device and equipment for document and storage medium
CN115237291B (en) Information processing method, device, equipment and medium
WO2022184037A1 (en) Document processing method, apparatus and device, and medium
CN114253520B (en) Interface code generation method and device
CN113420400B (en) Routing relation establishment method, request processing method, device and equipment
CN111367592B (en) Information processing method and device
CN110083283B (en) Method, device and system for managing information
CN110851097B (en) Control method, device, medium and electronic equipment for consistency of handwriting data
CN115269645A (en) Information query method and device, electronic equipment and computer readable medium
CN113900976A (en) DMA connection establishment method in federal learning
CN111291199B (en) Information query method and device
CN111212296A (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN111787107B (en) Message processing method and device, readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240514

Address after: Room 201-2031, floor 2, building 1, building 2 and building 3, qinchunjiayuan, Xisanqi, Haidian District, Beijing 100096

Patentee after: Beijing Feishu Technology Co.,Ltd.

Country or region after: China

Address before: 300000 Tianjin Binhai New Area Binhai High-tech Zone Binhai Science Park, No. 39, No. 6 High-tech Road, 9-3-401

Patentee before: TIANJIN BYTEDANCE TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 100190, 10th Floor, Building 4, Zijin Digital Park, Haidian District, Beijing, 1004

Patentee after: Beijing Feishu Technology Co.,Ltd.

Country or region after: China

Address before: Room 201-2031, floor 2, building 1, building 2 and building 3, qinchunjiayuan, Xisanqi, Haidian District, Beijing 100096

Patentee before: Beijing Feishu Technology Co.,Ltd.

Country or region before: China