CN114861108A - Online document editing method and device, electronic equipment and storage medium - Google Patents

Online document editing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114861108A
CN114861108A CN202210475593.1A CN202210475593A CN114861108A CN 114861108 A CN114861108 A CN 114861108A CN 202210475593 A CN202210475593 A CN 202210475593A CN 114861108 A CN114861108 A CN 114861108A
Authority
CN
China
Prior art keywords
document
version
content
information
online
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210475593.1A
Other languages
Chinese (zh)
Inventor
杨城
蒋欣
刘全徳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aeromedia Information Technology Beijing Co ltd
Original Assignee
Aeromedia Information Technology Beijing 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 Aeromedia Information Technology Beijing Co ltd filed Critical Aeromedia Information Technology Beijing Co ltd
Priority to CN202210475593.1A priority Critical patent/CN114861108A/en
Publication of CN114861108A publication Critical patent/CN114861108A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Abstract

The disclosure relates to an online document editing method and apparatus, an electronic device, and a storage medium. The online document editing method comprises the steps of receiving a first version document which is sent by an editing client and updates an online document; under the condition that a second version document of the online document of the preview client is opened, sending update information to the preview client, wherein the update information is used for indicating that the online document is updated; receiving second version information of a second version document sent by a preview client; generating updated content according to the second version information and the first version information of the first version document, wherein the updated content comprises the changed content of the first version document relative to the second version document and the position of the changed content; and sending the updated content to the preview client. By the method, on one hand, the document contents transmitted by the server side and the preview client side are reduced, and the requirement on the network environment is lowered; on the other hand, the preview client only needs to update the place needing to be changed, and the updating efficiency is improved.

Description

Online document editing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet applications, and in particular, to an online document editing method and apparatus, an electronic device, and a storage medium.
Background
Typically, online documents have two categories of users, editors and viewers of the document. Among them, the online document editing scene generally has the following two features: (1) the content of the document is very long, and the edited content at the same time is concentrated in a limited few lines; (2) the editor habitually frequently performs document saving operation, and the document does not have content change in many times.
After an editor saves a document, a viewer usually needs to download all the contents of the whole document when viewing the updated document contents through a viewing tool, which still has a high requirement on the network environment of a document previewer, and if the network state is not good enough, the latest contents may not be previewed in time.
Disclosure of Invention
In view of the above, the present disclosure proposes an online document editing scheme.
According to an aspect of the present disclosure, an online document editing method is provided, which is applied to a server side, and includes: receiving a first version document which is sent by an editing client and updates an online document; under the condition that a second version document of the online document of a preview client side is opened, sending update information to the preview client side, wherein the update information is used for indicating that the online document is updated; receiving second version information of the second version document sent by the preview client; generating updated content according to the second version information and the first version information of the first version document, wherein the updated content comprises the changed content of the first version document relative to the second version document and the position of the changed content; and sending the updated content to the preview client.
In one possible implementation, the method further includes: comparing the first version document with a latest version document stored at a server side to obtain the difference content of the first version document and the latest version document; generating the updated content according to the second version information and the first version information of the first version document, including: and determining the difference content between the online documents corresponding to the second version information and the first version information as the updated content.
In one possible implementation, the method further includes: updating the latest version document to the first version document; deleting documents of versions of the online document other than the latest version document.
In one possible implementation, the method further includes: compressing the updated content to generate compressed information, wherein the compressed information comprises a ciphertext which can be identified by the preview client; the sending the update content to the preview client includes: and sending the compressed information to the preview client.
According to another aspect of the present disclosure, an online document display method is provided, which is applied to a preview client, and includes: displaying a second version document of the online document; receiving update information of the online document sent by a server, wherein the update information is used for indicating that the online document is updated; sending the second version information of the second version document to the server side according to the updating information; receiving updated content sent by the server, wherein the updated content comprises changed content and the position of the changed content; updating the second version document according to the updating content; and displaying the updated second version document.
In one possible implementation, the updated content is compressed information; the updating the second version document according to the updating content includes: and decompressing the compressed information to obtain updated content.
According to another aspect of the present disclosure, there is provided an online document editing apparatus including: the document receiving module is used for receiving a first version document which is sent by the editing client and updates the online document; the update information sending module is used for sending update information to the preview client under the condition that a second version document of the online document of the preview client is opened, wherein the update information is used for indicating that the online document is updated; the version information receiving module is used for receiving second version information of the second version document sent by the preview client; the updated content generating module is used for generating updated content according to the second version information and the first version information of the first version document, wherein the updated content comprises the changed content of the first version document relative to the second version document and the position of the changed content; and the updating content sending module is used for sending the updating content to the preview client.
In one possible implementation, the apparatus further includes: the comparison module is used for comparing the first version document with a latest version document stored at a server end to obtain the difference content of the first version document and the latest version document; the update content generation module includes: and the update content determining submodule is used for determining that the difference content between the online documents corresponding to the second version information and the first version information is the update content.
In one possible implementation, the apparatus further includes: the document updating module is used for updating the latest version document into the first version document; and the version deleting module is used for deleting the documents of other versions of the online document except the document of the latest version.
In one possible implementation, the apparatus further includes: the compression module is used for compressing the updated content to generate compressed information, and the compressed information comprises a ciphertext which can be identified by the preview client; the update content sending module includes: and the compressed information sending submodule is used for sending the compressed information to the preview client.
According to another aspect of the present disclosure, there is provided an online document presentation apparatus, comprising: the document display module is used for displaying a second version document of the online document; the update information receiving module is used for receiving update information of the online document sent by a server, wherein the update information is used for indicating that the online document is updated; the version information sending module is used for sending the second version information of the second version document to the server side according to the updating information; the update content receiving module is used for receiving update content sent by the server side, wherein the update content comprises changed content and the position of the changed content; the document updating module is used for updating the second version document according to the updating content; and the document display module is used for displaying the updated second version document.
In one possible implementation, the updated content is compressed information; the document update module includes: and the decompression module is used for decompressing the compressed information to obtain the updated content.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing the memory-stored instructions.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
In the embodiment of the disclosure, the first version document after updating the online document is not required to be completely transmitted to the preview client, but the updated content including the changed content of the second version document needing to be updated and the position of the changed content is generated on the server side according to the first version document and the second version document of the preview client, and then the updated content is transmitted to the preview client, and the preview client realizes the content synchronization of the second version document and the first version document according to the updated content. The updating process reduces the document contents transmitted by the server and the preview client and reduces the requirement on the network environment on the one hand; on the other hand, the preview client only needs to update the place needing to be changed, and the updating efficiency is improved.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a flow diagram of an online document editing method according to an embodiment of the present disclosure.
FIG. 2 shows a flow diagram of an online document presentation method according to an embodiment of the present disclosure.
Fig. 3 illustrates a network topology diagram of an online document editing method according to an embodiment of the present disclosure.
FIG. 4 shows a block diagram of an online document editing apparatus according to an embodiment of the present disclosure.
FIG. 5 shows a block diagram of an online document presentation apparatus according to an embodiment of the present disclosure.
Fig. 6 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.
Fig. 7 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 illustrates a flowchart of an online document editing method according to an embodiment of the present disclosure, which may be applied to an online document editing apparatus, which may be a processing device such as a server.
In some possible implementations, the online document editing method may be implemented by a processor calling computer readable instructions stored in a memory.
As shown in fig. 1, the online document editing method includes:
in step S11, a first version document sent by the editing client and used for updating the online document is received;
in step S12, in a case where a second version document of the online document of a preview client has been opened, sending update information to the preview client;
in step S13, receiving second version information of the second version document sent by the preview client;
in step S14, generating updated content according to the second version information and the first version information of the first version document;
in step S15, the update content is sent to the preview client.
In a possible implementation manner, the online document is a document edited and viewed online by multiple terminals. Further, the online document may be text, hypertext, data table, image, multimedia, 3D model, etc., and the present disclosure does not specifically limit the specific type of online document. While specific embodiments of the present disclosure have been described herein with respect to online documents such as text for the purpose of better illustrating the present disclosure, it will be appreciated by those skilled in the art that the present disclosure may be practiced with respect to other online documents such as hypertext documents as well.
In one possible implementation, the online document may have one or more preview clients viewing the document content and one or more edit clients editing the document content. The present disclosure does not specifically limit the number of preview clients and edit clients. Further, multiple editing clients may edit and update online documents separately in a non-simultaneous manner. In a possible implementation mode, the authorities of different editing clients can be set, the editing clients with different authorities can only perform operation matched with the authority of the online document, and the editing clients without authorities or with insufficient authorities cannot perform operation crossing the authorities.
In one possible implementation manner, in step S11, an updated first version document sent by the editing client may be obtained. The update form may include active update of a user of the editing client, that is, the user actively saves the current change content, so that the online document is updated. In addition, when the editing client side edits the document, if the system is crashed without being stored in time, the modified content of the online document is damaged, and therefore, the updating form may also include automatic updating of the online document by the editing client side with a fixed time interval. Further, the automatic updating may include automatic saving of the online document after the mouse of the editing client leaves the editing segment, or may include automatic saving of the online document after the page of the online document of the editing client is turned over. The present disclosure does not specifically limit the update form of the acquired first version document.
In one possible implementation, in step S12, in the case that a second version document of the online document of a preview client is already opened, update information is sent to the preview client. Specifically, the update information is used to indicate that the online document of the preview client has an update. Further, when the preview client establishes a connection with the server, the preview client may actively pull the latest version of the online document from the server, and when the preview client opens the pulled online document, the preview client sends information to the server: when the corresponding online document of the editing client, namely the first version document, is updated, please send notification information to the preview client. Specifically, when the server side does not receive the information of the notification information sent by the preview client side to the server side, the server side does not need to send the update information to the preview client side.
In one possible implementation, the editing client and the server interact data by using a web push technology. Specifically, after the online document of the editing client is updated, the server sends the update information to the preview client through a web push technology. In a possible implementation manner, the preview client establishes a long connection with the server, or the preview client initiates a session at regular time by using a polling policy, so as to ensure real-time communication between the server and the preview client. Furthermore, a WebSocket protocol can be adopted to realize the active push of the online document of the server to the preview client when the online document changes. WebSocket realizes two-way communication based on a single TCP connection, and the protocol process is divided into a handshake phase and a data transmission phase. In the handshake phase, the HTTP request sent by the client is parsed into an Update request by the Web server. After the handshake is successful, the data transmission stage is entered, and the two parties carry out information interaction on the established TCP connection. Compared with other Web push technologies, the efficiency and stability of WebSocket transmission are high, and network delay can be reduced.
In a possible implementation manner, the server may update the second version document of the preview client by comparing differences between different versions of the online document stored by the preview client and the online document stored by the editing client. Specifically, the server side can manage different versions of the online document. Therefore, after receiving the update information, the preview client sends the second version information of the online document of the preview client to the server. Further, in step S13, the server receives the second version information of the second version document sent by the preview client, so as to continue the difference comparison between the second version document and the first version document.
In one possible implementation manner, in step S14, updated content may be generated according to the second version information and the first version information of the first version document. In a possible implementation manner, when the second version document of the online document is stored in the server, the online document corresponding to the first version information and the online document corresponding to the second version information may be directly compared to obtain the updated content. In a possible implementation manner, when the specific difference content of each version of the online document is stored in the server, all the difference content between the first version information and the second version information may be used as the update content. Further, the version information includes saving time of the online document, and all difference contents between the saving times corresponding to the first version information and the second version information may be used as the update content. The manner of obtaining the difference content will be described in detail later with reference to possible implementations of the present disclosure, and will not be described herein again.
Since the content of each update of the editing client occupies a small proportion of the whole online document, the updated content in one online document often has only a few lines or words in many cases. Thus, the updated content may be limited to the modified content and the specific location where the modified content is located. In one possible implementation, the location may be a paragraph where the modified content is located, and the modified content may be an update of the paragraph. In a possible implementation manner, the position may be a specific line of a paragraph where the modified content is located, and the modified content may be an update of a specific line of characters of the paragraph. In a possible implementation manner, the position may be a specific line and a specific column of a paragraph where the modified content is located, and the modified content may be an update of a certain/several characters of the specific line of the paragraph. The present disclosure does not specifically limit the update form. In the embodiment, the updated content only comprises the updated content and the specific position where the updated content is located, namely only the changed content, so that when the preview client is updated, the whole online document does not need to be transmitted, and only the updated content needs to be transmitted, thereby greatly reducing the requirement on the network environment.
In a possible implementation manner, in step S15, the obtained updated content is sent to the preview client, so that the preview client fuses the updated content with the existing second version document to obtain the same online document as the editing client.
In the embodiment of the disclosure, the server does not need to transmit all the first version document after updating the online document to the preview client, but generates the updated content including the modified content to be updated of the second version document and the position of the modified content on the server according to the first version document and the second version document of the preview client, and transmits the updated content to the preview client, and the preview client realizes the content synchronization of the online documents of the preview client and the editing client according to the updated content. The updating process reduces the document contents transmitted by the server and the preview client on one hand, and reduces the requirements on the network environment; on the other hand, the preview client only needs to update the place needing to be changed, and the updating efficiency is improved.
When the online document is updated by the editing client, the updated document may not change compared with the last saved document due to the automatic update of the editing client or the change of the original content after the modification by the editing personnel. In one possible implementation, the method further includes: and comparing the first version document with the latest version document stored at a server side to obtain the difference content of the first version document and the latest version document. Continuing the document editing operation under the condition that the difference content is not empty; and terminating the document editing operation under the condition that the difference content is empty. According to the embodiment of the disclosure, the first version document is compared with the latest version document stored at the server, and only the first version document with the obtained different content not being empty is compared to continue the subsequent online document editing operation, so that unnecessary operations are reduced.
Further, the generating the updated content according to the second version information and the first version information of the first version document includes: and determining the difference content between the online documents corresponding to the second version information and the first version information as the updated content. In the embodiment, the difference content between the first version document and the last version document updated by the editing client is stored each time, after the second version information of the online document of the preview client is obtained, the difference content between the first version information and the second version information of the online document of the editing client can be determined as the update content of the preview client, and according to the version information of the online document of the editing client and the preview client, the difference content between adjacent versions of the online document stored by the server is fully utilized to quickly determine the update content, so that the online document of the preview client is updated in real time.
In a possible implementation manner, a cache database may be established in the memory to store the difference content between different versions of the online document, so as to improve the reading speed of the difference content in the online document editing process. Further, Redis may be used as a cache database. The selection of the cache database is not particularly limited by the present disclosure.
When the editing client is updated frequently, the server stores a large number of online documents of different versions and different contents, and the storage space is occupied. In one possible implementation, the method further includes: updating the latest version document to the first version document; deleting documents of versions of the online document other than the latest version document. The embodiment stores the latest version document of the online document and can perform comparison operation with the first version document; the versions except the latest version of the online document are deleted, so that the storage of the online document and the related files thereof at the server side can be effectively reduced. Meanwhile, the online document of any version can be quickly restored through the online document of the latest version and the difference content of each version of the online document.
To further reduce the size of data transmitted between the preview client and the server, in a possible implementation, the method may further include: and compressing the updated content to generate compressed information. Correspondingly, the sending the update content to the preview client includes: and sending the compressed information to the preview client. In this embodiment, the server side sends the compressed update content to the preview client side, which can further reduce the size of the transfer data and reduce the requirement on the network environment. Furthermore, the compressed information may include a ciphertext that can be identified by the preview client, so that information leakage of the online document is avoided, and data security is improved.
Fig. 2 shows a flowchart of an online document presentation method according to an embodiment of the present disclosure, which may be applied to an online document presentation apparatus, which may be a terminal device, a server side or other processing device. One or more of the display devices may be provided, and the present disclosure is not limited thereto. The terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like.
In some possible implementations, the online document presentation method may be implemented by a processor calling computer readable instructions stored in a memory.
As shown in fig. 2, the online document presentation method may include:
step S21, a second version document of the online document is displayed.
Step S22, receiving update information of the online document sent by the server, where the update information is used to indicate that the online document has an update.
Step S23, sending the second version information of the second version document to the server according to the update information.
Step S24, receiving the updated content sent by the server, where the updated content includes the modified content and the location of the modified content.
Step S25, updating the second version document according to the updated content.
And step S26, displaying the updated second version document.
The online document is a document that can be displayed at the preview client, and may specifically be a text, a hypertext, a data table, an image, multimedia, a 3D model, and the like. The online document can be edited by an editing client and displayed on a preview client. After the online document is edited and stored by the editing client, the edited online document can be synchronously viewed at the preview client.
Specifically, the second version document of the online document is displayed at the preview client in response to a user's open request for the second version document. When the online document of the editing client is updated, the preview client may receive the update information of the online document sent by the server. Specifically, the update information is used to indicate that the online document has an update. Further, after the second version document is opened, the preview client may send information to the server: and after the editing client updates the online document, the editing client sends update information to the preview client. And after receiving the information, the server side sends the updating information to the preview client side when receiving the updated first version file of the online document sent by the editing client side. After receiving the update information, the preview client sends the second version information of the opened second version document to the server so that the server can determine the update content of the second version document through the difference between different versions of the online document. In a possible implementation manner, the updated content includes the modified content and the position of the modified content, so that the preview client performs modification at the position of the second version document according to the modified content, that is, performs fusion of the modified content and the second version document, generates an updated second version document, displays the updated second version document, and synchronizes the content of the online documents of the preview client and the editing client.
In the embodiment of the disclosure, the specific position of the opened second version document is updated through the update content sent by the server, and in the process, the updated first version document of the editing client is not required to be completely transmitted to the preview client, but only the specific update content is sent, so that the content synchronization of the online documents of the preview client and the editing client is realized. The updating process reduces the document contents transmitted by the server and the preview client on one hand, and reduces the requirements on the network environment; on the other hand, the preview client only needs to update the place needing to be changed, and the updating efficiency is improved.
In order to further reduce the size of data transmitted between the preview client and the server, in a possible implementation manner, the server compresses the update content and sends the compressed update content to the preview client, where in this case, the updating the second version document according to the update content includes: and decompressing the compressed information to obtain updated content. In this embodiment, the server side sends the compressed update content to the preview client side, which can further reduce the size of the transfer data and reduce the requirement on the network environment. Further, the compressed information may include a ciphertext that can be identified by the preview client, so as to avoid information leakage of the online document, and improve data security.
Application scenario example 1
The embodiment of the disclosure provides an online document editing method, which is applied to editing and checking a multi-terminal online document.
In an application example of the present disclosure, online document editing may include the following processes:
firstly, the server receives a first version document of the updated online document sent by the editing client.
And secondly, under the condition that the second version document of the online document of the preview client is opened, the server side sends update information to the preview client to indicate that the online document of the preview client is updated.
And thirdly, after receiving the updating information, the preview client sends second version information of the second version document to the server.
And fourthly, after receiving the second version information sent by the preview client, the server generates updated content according to the second version information and the first version information of the first version document, wherein the updated content comprises the changed content of the first version document relative to the second version document and the position of the changed content.
And fifthly, the server side sends the updated content to the preview client side.
And sixthly, after the preview client receives the updated content, updating the second version document according to the updated content.
And seventhly, displaying the updated second version document by the preview client.
In the embodiment of the disclosure, the first version document after updating the online document is not required to be completely transmitted to the preview client, but the updated content including the modified content of the second version document needing to be updated and the position of the modified content is generated on the server side according to the first version document and the second version document of the preview client, and then the updated content is transmitted to the preview client, and the preview client realizes the content synchronization of the second version document and the first version document according to the updated content. The updating process reduces the document contents transmitted by the server and the preview client on one hand, and reduces the requirements on the network environment; on the other hand, the preview client only needs to update the place needing to be changed, and the updating efficiency is improved.
Application scenario example 2
In recent years, the online court trial has rapidly progressed, and the efficiency and the quality of the court work in China are improved. The court trial record is an important document with legal efficiency produced by court trial activities. In an online court trial scene, when a judge modifies a record file, the crowd is required to immediately check the latest recorded content of the judge.
The embodiment of the present disclosure provides an online document editing method, and fig. 3 is a network topology diagram of the online document editing method, as shown in fig. 3, this method may implement real-time synchronization of updated court trial notes of a judge client at the party client through interaction of the party client, the judge client and a server, and the online document editing process may be roughly divided into five steps.
Firstly, a server side receives a first version of record which is sent by a judge client side and updates a court trial record. Specifically, the update may be an active save update of the judge, or an automatic save update of the judge client to the record at predetermined time intervals.
And secondly, comparing the first version record with the stored latest version record by the server to obtain the difference content between the two versions, wherein the difference content is used for indicating the difference content and the specific position of the difference.
And thirdly, under the condition that the difference content is not empty and the court trial record of the client side of the party is opened, the server side sends update information to the client side of the party, wherein the update information is used for indicating the client side of the party that the court trial record exists and is updated.
And fourthly, the server receives the second storage time of the court trial record opened at the client of the party.
And fifthly, the server takes all the difference content between the first saving time and the second saving time as the updating content according to the second saving time and the first saving time of the first version record. The updated content is the content needing to be changed in the second version record displayed by the client of the party and the specific position of the changed content. Specifically, the specific position is a modification line of the paragraph to be modified.
And sixthly, compressing the updated content by the server and sending the compressed updated content to the client of the party. After receiving the compressed updated content, the client side of the client firstly decompresses the compressed updated content, and updates the second version record at the position of the second version record, so that the updated content and the second version record are fused.
In the embodiment of the disclosure, the server does not need to transmit all the first version records of the court trial records updated by the judge client to the party client, but generates the updated content including the modified content of the second version records to be updated and the position of the modified content according to the first version records and the second version records of the party client at the server, and transmits the updated content to the party client, and the party client realizes the synchronization of the court trial records of the party client and the light-emitting client according to the updated content. The updating process reduces the content of the records transmitted by the server and the client of the party on one hand, and reduces the requirement on the network environment; on the other hand, the client of the party only needs to update the place needing to be changed, and the updating efficiency is improved.
It should be noted that the online document editing method according to the embodiment of the present disclosure is not limited to the application of the online court trial in the process of editing the notes, and may be applied to any online editing task, which is not limited in the present disclosure.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides an online document editing apparatus, an online document presentation apparatus, an electronic device, a computer-readable storage medium, and a program, which may all be used to implement any one of the online document editing methods provided by the present disclosure, and corresponding technical solutions and descriptions may refer to corresponding records of the method section and are not described again.
Fig. 4 illustrates a block diagram of an online document editing apparatus according to an embodiment of the present disclosure. The online document editing apparatus may be a processing device such as a server.
As shown in fig. 4, the online document editing apparatus 40 may include:
the document receiving module 41 is configured to receive a first version document sent by an editing client and used for updating an online document;
an update information sending module 42, configured to send, to a preview client, update information for indicating that there is an update to the online document, if a second version document of the online document of the preview client is opened;
a version information receiving module 43, configured to receive second version information of the second version document sent by the preview client;
an update content generation module 44, configured to generate update content according to the second version information and the first version information of the first version document, where the update content includes a modified content of the first version document relative to the second version document and a position of the modified content;
and an update content sending module 45, configured to send the update content to the preview client.
In one possible implementation, the apparatus further includes: the comparison module is used for comparing the first version document with a latest version document stored at a server end to obtain the difference content of the first version document and the latest version document; the update content generation module includes: and the update content determining submodule is used for determining that the difference content between the online documents corresponding to the second version information and the first version information is the update content.
In one possible implementation, the apparatus further includes: the document updating module is used for updating the latest version document into the first version document; and the version deleting module is used for deleting the documents of other versions of the online document except the document of the latest version.
In one possible implementation, the apparatus further includes: the compression module is used for compressing the updated content to generate compressed information, and the compressed information comprises a ciphertext which can be identified by the preview client; the update content sending module includes: and the compressed information sending submodule is used for sending the compressed information to the preview client.
FIG. 5 illustrates a block diagram of an online document presentation apparatus according to an embodiment of the present disclosure. The online document showing device can be a terminal device, a server or other processing devices and the like. The terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like.
In some possible implementations, the online document presentation apparatus may be implemented by a processor calling computer readable instructions stored in a memory.
As shown in fig. 5, the online document presentation apparatus 50 includes:
a document display module 51 for displaying a second version document of the online document;
an update information receiving module 52, configured to receive update information of the online document sent by a server, where the update information is used to indicate that the online document has an update;
the version information sending module 53 is configured to send the second version information of the second version document to the server according to the update information;
an update content receiving module 54, configured to receive update content sent by the server, where the update content includes a modified content and a location of the modified content;
a document updating module 55, configured to update the second version document according to the update content;
and the document showing module 56 is used for showing the updated second version document.
In one possible implementation, the updated content is compressed information; the document update module includes: and the decompression module is used for decompressing the compressed information to obtain the updated content.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a volatile or non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing the instructions stored by the memory.
The disclosed embodiments also provide a computer program product comprising computer readable code or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
FIG. 6 is a block diagram illustrating an apparatus 800 for online document editing according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
FIG. 7 is a block diagram illustrating an apparatus 1900 for online document editing according to an example embodiment. For example, the apparatus 1900 may be provided as a server or terminal device. Referring to fig. 7, the device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The device 1900 may also include a power component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input/output (I/O) interface 1958. The device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the apparatus 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). 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.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. An online document editing method, applied to a server side, includes:
receiving a first version document which is sent by an editing client and updates an online document;
under the condition that a second version document of the online document of a preview client side is opened, sending update information to the preview client side, wherein the update information is used for indicating that the online document is updated;
receiving second version information of the second version document sent by the preview client;
generating updated content according to the second version information and the first version information of the first version document, wherein the updated content comprises the changed content of the first version document relative to the second version document and the position of the changed content;
and sending the updated content to the preview client.
2. The method of claim 1, further comprising:
comparing the first version document with a latest version document stored in a server side to obtain the difference content of the first version document and the latest version document;
generating the updated content according to the second version information and the first version information of the first version document, including:
and determining the difference content between the online documents corresponding to the second version information and the first version information as the updated content.
3. The method of claim 2, further comprising:
updating the latest version document to the first version document;
deleting documents of versions of the online document other than the latest version document.
4. The method of claim 1, further comprising:
compressing the updated content to generate compressed information, wherein the compressed information comprises a ciphertext which can be identified by the preview client;
the sending the update content to the preview client includes:
and sending the compressed information to the preview client.
5. An online document display method is applied to a preview client, and comprises the following steps:
displaying a second version document of the online document;
receiving update information of the online document sent by a server, wherein the update information is used for indicating that the online document is updated;
sending the second version information of the second version document to the server side according to the updating information;
receiving updated content sent by the server, wherein the updated content comprises changed content and the position of the changed content;
updating the second version document according to the updating content;
and displaying the updated second version document.
6. The method of claim 5, wherein the updated content is compressed information;
the updating the second version document according to the updating content comprises the following steps:
and decompressing the compressed information to obtain updated content.
7. An online document editing apparatus, comprising:
the document receiving module is used for receiving a first version document which is sent by the editing client and updates the online document;
the update information sending module is used for sending update information to the preview client under the condition that a second version document of the online document of the preview client is opened, wherein the update information is used for indicating that the online document is updated;
the version information receiving module is used for receiving second version information of the second version document sent by the preview client;
the updated content generating module is used for generating updated content according to the second version information and the first version information of the first version document, wherein the updated content comprises the changed content of the first version document relative to the second version document and the position of the changed content;
and the updating content sending module is used for sending the updating content to the preview client.
8. An online document presentation apparatus, comprising:
the document display module is used for displaying a second version document of the online document;
the update information receiving module is used for receiving update information of the online document sent by a server, wherein the update information is used for indicating that the online document is updated;
the version information sending module is used for sending the second version information of the second version document to the server side according to the updating information;
the update content receiving module is used for receiving update content sent by the server side, wherein the update content comprises changed content and the position of the changed content;
the document updating module is used for updating the second version document according to the updating content;
and the document display module is used for displaying the updated second version document.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any one of claims 1 to 6 when executing the memory-stored instructions.
10. A non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 6.
CN202210475593.1A 2022-04-29 2022-04-29 Online document editing method and device, electronic equipment and storage medium Pending CN114861108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210475593.1A CN114861108A (en) 2022-04-29 2022-04-29 Online document editing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210475593.1A CN114861108A (en) 2022-04-29 2022-04-29 Online document editing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114861108A true CN114861108A (en) 2022-08-05

Family

ID=82634748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210475593.1A Pending CN114861108A (en) 2022-04-29 2022-04-29 Online document editing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114861108A (en)

Similar Documents

Publication Publication Date Title
CN107729522B (en) Multimedia resource fragment intercepting method and device
CN107122430B (en) Search result display method and device
CN105100829A (en) Method and device for intercepting video content
CN107820131B (en) Comment information sharing method and device
CN108495168B (en) Bullet screen information display method and device
CN109063101B (en) Video cover generation method and device
CN110737415A (en) Screen sharing method and device, computer equipment and storage medium
EP2950486B1 (en) Method and device for managing instant message
CN108174269B (en) Visual audio playing method and device
CN110750961A (en) File format conversion method and device, computer equipment and storage medium
CN109962958B (en) Document processing method and device
CN109992754B (en) Document processing method and device
CN108521579B (en) Bullet screen information display method and device
CN109756783B (en) Poster generation method and device
CN108574860B (en) Multimedia resource playing method and device
CN110460873B (en) Method and device for generating video on demand
CN106791925B (en) Video generation method and device
CN108965976B (en) Display control method and device for video window
CN114861108A (en) Online document editing method and device, electronic equipment and storage medium
CN110493298B (en) Information synchronization method and device
CN109981729B (en) File processing method and device, electronic equipment and computer readable storage medium
CN105607958B (en) Information input method and device
CN111049732B (en) Push message display method and device, electronic equipment and medium
CN110740360B (en) Multimedia resource playing method and device
CN110891192B (en) Video editing method and device

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