CN109710909B - Content acquisition method, device, terminal and storage medium - Google Patents

Content acquisition method, device, terminal and storage medium Download PDF

Info

Publication number
CN109710909B
CN109710909B CN201811637104.8A CN201811637104A CN109710909B CN 109710909 B CN109710909 B CN 109710909B CN 201811637104 A CN201811637104 A CN 201811637104A CN 109710909 B CN109710909 B CN 109710909B
Authority
CN
China
Prior art keywords
content
user
area
target
editing
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
CN201811637104.8A
Other languages
Chinese (zh)
Other versions
CN109710909A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201811637104.8A priority Critical patent/CN109710909B/en
Publication of CN109710909A publication Critical patent/CN109710909A/en
Application granted granted Critical
Publication of CN109710909B publication Critical patent/CN109710909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a content acquisition method, a content acquisition device, a terminal and a storage medium, and belongs to the technical field of networks. The method comprises the following steps: acquiring first content edited by a first user according to an editing instruction of a target document; receiving second content, wherein the second content is edited by a second user on the target document, and the second user is a user other than the first user; and when the first content and the second content are the edited content of the same region in the target document, merging the first content and the second content to obtain the target content of the region. According to the method and the device, the final content of the region is obtained by combining the contents edited by the plurality of users in the same region, instead of directly covering the content based on the editing time, the contents edited by the plurality of users can be reserved, so that data loss is avoided, and the accuracy of the obtained content is high.

Description

Content acquisition method, device, terminal and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a content acquisition method, an apparatus, a terminal, and a storage medium.
Background
With the development of network technology, people can edit the document table online through the network, namely, the online table. The online form can also provide a function of multi-user online editing, and even can support multiple users to collaboratively edit the same form at the same time, so that the editing efficiency is improved.
In the content acquiring method, when a plurality of users simultaneously edit the same area in one document, based on the time points when the editing operations of the plurality of users are finished, the content edited in the area by the latest editing operation at the time point is used as the content of the area, and the content edited by other users is directly covered by the content edited by the latest editing operation at the time point.
In the content acquisition method, the user who edits the content with the later time does not know that other users also edit the content in the area, and the content with the earlier editing time is directly covered by the content with the later editing time, so that data loss is easily caused, and the accuracy of the content acquisition method is low.
Disclosure of Invention
The embodiment of the invention provides a content acquisition method, a content acquisition device, a terminal and a storage medium, which can solve the problems of easy data loss and low accuracy rate in the related technology. The technical scheme is as follows:
in one aspect, a content obtaining method is provided, and the method includes:
acquiring first content edited by a first user according to an editing instruction of a target document;
receiving second content, wherein the second content is edited by a second user on the target document, and the second user is a user other than the first user;
and when the first content and the second content are the edited content of the same region in the target document, merging the first content and the second content to obtain the target content of the region.
In one aspect, a content acquisition apparatus is provided, the apparatus including:
the acquisition module is used for acquiring first content edited by a first user according to an editing instruction of a target document;
a receiving module, configured to receive second content, where the second content is a content edited by a second user on the target document, and the second user is a user other than the first user;
and the merging module is used for merging the first content and the second content to obtain the target content of the region when the first content and the second content are the edited content of the same region in the target document.
In one aspect, a terminal is provided and includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the operation performed by the content obtaining method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operations performed by the content obtaining method.
According to the embodiment of the invention, when a plurality of users edit the same region of the same document at the same time, the contents edited by the plurality of users can be merged based on the content merging instruction of the users to obtain the final contents of the region, rather than directly covering the contents based on the editing time, the contents edited by the plurality of users can be reserved, so that data loss is avoided, and the accuracy of the obtained contents is high.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an implementation environment of a content obtaining method according to an embodiment of the present invention;
fig. 2 is a flowchart of a content obtaining method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a first target location provided by an embodiment of the present invention;
FIG. 4 is a schematic illustration of a first target location provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a first tag provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a second tag provided by embodiments of the present invention;
FIG. 7 is a schematic illustration of a multiple tag display provided by an embodiment of the present invention;
fig. 8 is a schematic diagram of hiding a first tag or a second tag according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a selection prompt provided by an embodiment of the present invention;
fig. 10 is a schematic diagram of a first content provided by the embodiment of the present invention;
FIG. 11 is a diagram illustrating a second content according to an embodiment of the present invention;
FIG. 12 is a diagram of a target content provided by an embodiment of the invention;
FIG. 13 is a diagram of a target content provided by an embodiment of the invention;
fig. 14 is a flowchart of a content acquisition method according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram of a content acquiring apparatus according to an embodiment of the present invention;
fig. 16 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is an implementation environment of a content obtaining method according to an embodiment of the present invention, and referring to fig. 1, the implementation environment may include a plurality of terminals 101 and a server 102, where the plurality of terminals 101 may perform data interaction with the server 102 based on network connections, respectively.
In the embodiment of the present invention, the users logged in by the multiple terminals 101 may be accessing a document in the server 102 at the same time, each terminal 101 may send, to the server 102, the editing information of the user logged in by the terminal 101 on the document, and the server 102 may process the editing information and send the processed editing information to the terminal 101 where the other user accessing the document is located.
For example, the document may be a table, multiple users may access the table, the server 102 may store the table, multiple terminals 101 where the multiple users are located may access the table in the server 102 through a network connection, and the multiple users may edit the table at the same time. The plurality of terminals 101 may transmit the editing information to the server 102, and the server 102 may process the editing information transmitted by one terminal 101 and transmit the processed editing information to the other terminals 101, thereby synchronizing the data in the table.
The plurality of terminals 101 may access the server 102 through installed clients, or may access the server 102 through a portal site, which is not limited in the embodiment of the present invention.
The content acquiring method is applied to a terminal, which may be one terminal 101 of the plurality of terminals 101, and the following description will take the user currently logged in the terminal as a first user and the users other than the first user as a second user as an example. In the embodiment of the invention, a plurality of users can edit the same document at the same time, wherein for a certain terminal, a first user logged in the terminal accesses one document, and a second user logged in other terminals also accesses the document and edits the region in the document.
When any user accesses the document, the terminal can establish connection with the server. Specifically, the terminal may call a socket.io library to establish a socket channel with the server. The socket channel is used for full duplex communication with the server. The name socket.io of the socket.io library is simply explained below, in which the Chinese name of the socket in the name is socket, and the English name of io is all Input Output, which refers to Input and Output.
In one possible implementation, for a document, the server may store the correspondence of the socket communication handles of all users accessing the document to the document. For example, the server may store the socket communication handles of all users accessing the document in a HashMap object. The HashMap object typically stores data in the form of key-value pairs. Specifically, the HashMap object may use identification information of the document as a key (key), and the identification information is used to uniquely identify the document. For example, the Identification number (ID) of the document may be used as a key. When a user sends edit information to a server, the server may obtain socket communication handles of all users accessing the document according to identification information of the document, so as to process the edit information, and then send the processed edit information to all users through the obtained socket communication handles of all users.
In a possible implementation manner, when a second user accesses the document, a terminal where the second user is located may create a map (map) object, where the map object may also store identification information of the second user and related information of the second user correspondingly, for example, the identification information of the second user is used as a key. Further, the terminal where the second user is located may send, to the server, first editing information through a socket established between the terminal where the second user is located and the server, where the first editing information is used to inform that the second user is accessing the document, and the first editing information may include identification information of the second user. Of course, the first editing information may also include other information of the second user, which is not limited in this embodiment of the present invention. The server may broadcast the first editing information to the terminal where the other user is located, and the terminal where the first user is located may also receive the first editing information broadcast by the server, so that it may be known that the second user is accessing the document.
For example, the second user may be called a collaborator (collarborator) of the first user, the map object may be named collarbormap, the terminal where the second user is located may send collababenteraction to the server through the socket at the same time, where the collababenteraction is first editing information, where the editing information is called collaborative information, the collababenteraction is one of the collaborative information, and the first editing information is used to describe a data structure of identification information of the second user, and for example, the identification information of the second user may be an ID or a nickname of the second user, and the identification information is used to uniquely identify the second user. The server may broadcast the collabnateraction to all users other than the second user who are accessing the document.
In a specific possible embodiment, the second user may further edit in the document, and when the second user performs an editing operation, the terminal where the second user is located may send second editing information to the server, where the second editing information may include identification information of the second user, an area edited by the second user, and an editing state of the second user. Wherein the edit status may include a selected status and an input status. After receiving the second editing information, the server may broadcast the second editing information to the terminal where the other user who is accessing the document is located, where the terminal where the first user is located is one of the terminals, and the first user may know that the second user is editing the document. For example, the second editing information may be named coordAction, which may also be one of the collaboration information.
Further, after the second user finishes editing a certain area in the document, that is, when the second user exits the input state of the area, the terminal where the second user is located may send third editing information to the server, where the third editing information may include the identification information of the second user, the area edited by the second user, and the content edited by the second user. After receiving the third editing information, the server may also broadcast the third editing information to the terminal of the other user who is accessing the document, so that the terminal of the other user may update the data in the document synchronously according to the third editing information. Of course, if the terminal where the second user is located determines that the second user does not input the content when the second user exits the input state to the area, the third editing information may not be sent to the server.
The following describes a specific flow of content acquisition performed by the terminal when the multiple users edit the same area in the same document, with the embodiment shown in fig. 2. Fig. 2 is a flowchart of a content obtaining method according to an embodiment of the present invention, and referring to fig. 2, the content obtaining method may include the following steps:
201. the terminal receives the editing state of the second user.
In the embodiment of the present invention, the first user and the second user may edit the target document, where the target document may be an online shared document, or may be locally stored by a terminal where the first user is located, but based on the sharing software, the terminal where the second user is located may also edit the target document, or of course, may be locally stored by a terminal where the second user is located, but based on the sharing software, the terminal where the first user is located may also edit the target document.
The second user may edit in the target document, and when the second user performs an editing operation, the terminal where the second user is located may send second editing information to the server, where the second editing information may include identification information of the second user, an area edited by the second user, and an editing state of the second user. After receiving the second editing information, the server may broadcast the second editing information to the terminal where the other user who is accessing the target document is located, where the terminal where the first user is located shown in step 201 is one of the terminals, and thus it may be known that the second user is editing the target document. For example, the second editing information may be named coordAction, which may also be one of the collaboration information.
Accordingly, in this step 201, the terminal may receive the second editing information sent by the terminal where the second user is located, so as to receive the editing status of the second user, so as to know whether the second user is selecting a certain area in the target document or inputting content in a certain area.
For example, taking the target document as a table, if the second user clicks a cell in the table, or inputs content into a cell, and the second user is editing the cell, the terminal may receive second editing information through the broadcast process, where the second editing information includes an ID of the second user, coordinates of the cell, and an editing state of the second user. For example, still taking the target document as an example, if a second user clicks a cell, the editing state of the second user is the selected state, and if the second user double-clicks the cell, the content can be input in the cell, and the second user is in the input state.
202. And the terminal acquires the display style of the region edited by the second user on the target document according to the editing state of the second user.
In one possible implementation, while the second user is editing the region in the target document, the terminal may highlight the region to prompt that the region is being edited by the second user. Specifically, the editing state of the second user is different, and the display style of the region may also be different. The terminal may acquire the display style of the region according to the editing state of the second user, so that the following step 203 may be executed based on the acquired display style, so that the first user may intuitively know the editing state of the region by the second user through the display style of the region.
In a specific possible embodiment, different display styles of the region can be realized by different tags. That is, when the editing status of the second user is different, the tags of the areas may also be different. Specifically, when the editing state of the second user is the selected state, the terminal acquires a first tag of the area, where the first tag is used to indicate that the second user is selecting the area. And when the editing state of the second user is an input state, the terminal acquires a second label of the area, wherein the second label is used for indicating that the second user is editing the area.
For example, the content of the first tag may be an ID or a nickname of the second user, and the first user may know that the second user is selecting the area through the first tag. The content of the second tag may include an ID or a nickname of the second user and an editing state, for example, the second tag may be XXX being input, where XXX is the ID or the nickname of the second user, so that the first user may know through the second tag that the second user is inputting content in the area.
In a specific possible embodiment, in the above process, when the terminal receives the first editing information sent by the server, a document partition (div) element may be further created, where the div element is a tag, and the div element may be set to be invisible, that is, set to be hidden. Of course, the div element may also be referred to as a collaboration tag, and the collaboration tag is used to indicate the editing status of the collaborator (second user). The terminal may further use the identification information of the second user as a key, and store the other identity information of the second user and the cooperation tag in a collarbormap in the terminal. Taking the target document as a table, when the second user clicks the cell and the terminal receives the second editing information sent by the server, the terminal may obtain the collaboration tag according to the identification information of the second user, and set the content of the collaboration tag as the identification information of the second user, for example, an ID or a nickname. When the second user double-clicks the cell to input the content, and the terminal receives the second editing information sent by the server, the terminal may obtain the collaboration tag according to the identification information of the second user, and set the content of the collaboration tag as the identification information and the editing state of the second user, for example, XXX is being input.
Of course, if the second user quits the access to the target document, the terminal where the second user is located may send fourth editing information to the server, where the fourth editing information is also one of the collaborative information, and the fourth editing information may include the identification information of the second user. After receiving the fourth editing information, the server may also broadcast the fourth editing information to the terminal where the other user is accessing the target document, and after receiving the fourth editing information, the terminal where the other user is located may also delete the related information of the second user or set the state of the related information to an unavailable state. For example, the fourth editing information may be named collabexistmction, after the terminal where the other user is located receives collabexistmction, the terminal may obtain the collaboration tag corresponding to the second user from the collaboratorMap according to the ID or nickname of the second user, delete or destroy the collaboration tag, and set the storage information corresponding to the second user in the collaboratorMap to undefined (unexplained), which may indicate that the second user has quitted accessing the target document.
203. And the terminal displays the region according to the display style.
After the terminal acquires the display style of the region, the region can be displayed according to the display style. Specifically, the display style may be implemented by a tag, and the terminal may display the region, and display the first tag or the second tag of the region at a first target position of the region. That is, if the tag of the area acquired by the terminal in step 202 is the first tag, the terminal may display the first tag at the first target position of the area, and if the tag of the area acquired by the terminal in step 202 is the second tag, the terminal may display the second tag at the first target position of the area.
The first target position may be a position around the area, for example, as shown in fig. 3, the first target position may be an upper right corner area around the area, and of course, the first target position may also be other areas around the area, for example, a lower right corner area, an upper left corner area, a lower left corner area, an upper right area, a lower right area, a left area, or a right area. Of course, the first target position may also be a certain position in the area, for example, as shown in fig. 4, the first target position may also be an upper right corner area in the area, or may also be another area in the area, and the first target position is not limited in the embodiment of the present invention.
In one possible implementation manner, when displaying the first tag or the second tag, the terminal may calculate the first target position based on the position of the area, so as to display the first tag or the second tag on the first target position.
It should be noted that the first tag or the second tag is used to represent the editing state of the second user on the area in the target document, and for the second user, the second user knows the editing state of the second user, so that the terminal where the second user is located does not need to display the first tag or the second tag, and the terminal (i.e., the terminal where the first user is located) can display the first tag or the second tag in the interface of the first user to prompt the first user. Of course, when the first user edits the area, the terminal where the second user is located may also display the first tag or the second tag used for embodying the first user editing in the interface of the second user.
In a particular possible embodiment, the first target location may be different if the tags of the areas are different. For example, the first target position corresponding to the first tag may be an upper right corner region around the region, and the first target position corresponding to the second tag may be an upper left corner region around the region. Therefore, the first user on the terminal can directly know the editing state of the second user on the area based on the display position of the first label or the second label.
In a possible implementation manner, in this step 203, the terminal may further display a mark box, which includes the area, and is used to indicate that the area is in a state of being edited by the second user. For example, taking the target document as a table, as shown in fig. 5, if the editing status of the second user is a selected status, for example, the second user clicks a cell, the terminal may display a first tag at the upper right corner of the cell, where the content of the first tag is the ID or nickname of the second user, and a mark box may be displayed at the position of the cell for marking that the cell is being edited. As shown in fig. 6, if the editing state of the second user is an input state, for example, the second user double-clicks a cell, and a cursor may be displayed in the cell on the terminal where the second user is located, the terminal may display a second tag in the upper right corner of the cell, where the content of the second tag is "XXX is being input", the XXX is the ID or the nickname of the second user, and a mark box may be displayed at the cell position for marking that the cell is being edited.
It should be noted that the number of the second users may be one or multiple, and when the number of the second users is multiple, the terminal may further display the first label or the second label of each second user. In one possible implementation manner, when the number of the second users is multiple, the first labels or the second labels of the multiple second users are displayed in an overlapping manner according to the time sequence of the second users for editing the area.
It should be noted that the manner of superimposing the first tags or the second tags of the multiple second users may also include multiple manners, and in a possible implementation manner, the multiple first tags or the multiple second tags may be displayed in a superimposed manner from bottom to top in the first target position of the area, or the multiple first tags or the multiple second tags may be displayed in a superimposed manner from top to bottom in the first target position of the area, or the multiple first tags or the multiple second tags may be displayed in a superimposed manner from left to right in the first target position of the area, or the multiple first tags or the multiple second tags may be displayed in a superimposed manner from right to left in the first target position of the area, according to the above time sequence. Of course, the first target position may be directly superimposed on the second target position, and the first label or the second label that is chronologically subsequent may be displayed on the top layer. For example, as shown in fig. 7 (a), the arrangement order of the first labels or the second labels may be from top to bottom or from bottom to top, as shown in fig. 7 (B), the arrangement order of the first labels or the second labels may be from left to right or from right to left, as shown in fig. 7 (C), the first labels or the second labels are directly superimposed at the same position, and the first labels or the second labels in the time sequence are displayed at the top layer.
In another possible implementation manner, for the plurality of first tags or the plurality of second tags, the terminal may also obtain a fourth tag or a fifth tag based on the first tag or the second tag of a second user with the same editing state among the plurality of second users, so that the fourth tag or the fifth tag is displayed in a superimposed manner on the first target position of the area according to the time sequence. For example, the second users having the same editing status may be a group, the second users having the editing status in the selected status may be a first group, the second users having the editing status in the input status may be a second group, the identification information of the plurality of second users in the first group may be integrated into a fourth tag, for example, as shown in (D) of fig. 7, the content of the fourth tag may be AAA, BBB, and CCC, the identification information of the plurality of second users in the second group may be arranged in the editing time sequence, and the editing status may be displayed after the identification information, so as to obtain a fifth tag, for example, the content of the fifth tag may be XXX, YYY, and ZZZ being input.
The above description has described several ways of displaying the plurality of first tags or second tags in an overlapping manner by way of examples, and the plurality of first tags or second tags may also have other ways of displaying in an overlapping manner, for example, displaying the first tags or second tags in a target shape at a first target position in the area, where the target shape may be preset by a related technician, or may be adjusted by a first user according to a habit of using the first user, for example, the target shape may be a pyramid shape.
In a specific possible embodiment, in the case that the number of the second users is multiple, the setting of the terminal display mark frame may further include: when the number of the second users is multiple, the terminal displays a plurality of mark frames. For example, the plurality of mark frames may be displayed from inside to outside according to the time sequence of the second user editing the area, the mark frame corresponding to the second user with the previous time sequence may be inside, and the mark frame corresponding to the second user with the next time sequence may be outside.
In one possible implementation manner, the display style of the mark frame corresponding to different second users is different. Specifically, the color of the mark frame corresponding to different second users may be different. For example, when the number of the second users is 2, the color of the mark frame corresponding to one of the second users may be blue, and the time edited by the second user is earlier, the color of the mark frame corresponding to the other second user may be purple, and the time edited by the second user is later, the terminal may display two mark frames including the blue mark frame and the purple mark frame. Of course, the display style of the mark frame may also be implemented in other manners, for example, the line styles of the mark frames corresponding to different second users are different, for example, the widths are different, the solid-dotted line styles are different, or the straight-line curve styles are different, which is not limited in this embodiment of the present invention.
It should be noted that, in the above steps 201 to 203, when the second user is editing the region in the target document, the terminal may highlight the region. Of course, the terminal may not highlight the area, and when the second user is editing the area in the target document, if the editing instruction of the first user for the area is obtained, the following step 204 is executed, which is not limited by the embodiment of the present invention.
204. The terminal acquires first content edited by a first user according to the editing instruction of the target document.
When the second user is editing the target document, the first user on the terminal can also perform editing operation on the target document, and when the terminal acquires an editing instruction triggered by the editing operation, the first content edited by the first user can be acquired. Specifically, a first user edits a certain area in a target document on the terminal, and when the first user performs an editing end operation on the terminal, the terminal may obtain first content edited by the first user based on an editing end instruction triggered by the obtained editing end operation and based on the editing end instruction. For example, taking the target document as a table, a first user edits a cell in the table, the first user may double-click the cell, and input a first content in the cell, for example, the first content may be "456", and when the first user finishes inputting and exits from an input state, the terminal may obtain the first content.
In one possible implementation manner, when the editing state of the first user is an input state, the terminal may hide the first tag or the second tag. For example, as shown in fig. 6, the terminal may display a second tab in the upper right corner of the area before the first user's edit status is in the input status, and as shown in fig. 8, the terminal may hide the second tab when the first user double-clicks the cell into the input status. Therefore, when the first user is in an input state, the information amount displayed in the current interface can be reduced, and the first user input is prevented from being blocked or influenced.
In another possible design of this implementation, if the first user further wants to view the editing status of the area by the second user, that is, the terminal further wants to display the first tag or the second tag, the cursor may be hovered over a first target location of the area where the first tag or the second tag is located, and when the cursor is hovered over the first target location, the terminal may display the hidden first tag or the hidden second tag.
It should be noted that, the first user and the second user may be editing the same area in the target document, and during the editing of the area by the first user, the second user may also edit the area, for example, the location of the area may be changed, taking the target document as a table, and the area as a certain cell in the table as an example, the second user adds a row or a column before the cell, or deletes a row or a column before the cell or a row or a column where the cell is located, or modifies a height of a row or a width of a column before a row or a column where the cell is located, and then the location of the cell may be changed. The terminal may determine a position change condition of the area based on the editing information of the second user, so as to obtain a changed position of the area, and obtain a first target position of the area based on the changed position, so as to display the first label or the second label at the changed first target position of the area when the first label or the second label needs to be displayed.
For example, the second user may be referred to as a collaborator of the first user, the editing information of the collaborator may be referred to as collaboration information, for example, the collaboration information of the deleted row may be referred to as delRowAction, the collaboration information of the deleted column may be referred to as delColAction, the collaboration information of the added row may be referred to as addRowAction, the collaboration information of the added column may be referred to as addColAction, the collaboration information of the adjusted setting row height may be referred to as setRowHeightAction, and the collaboration information of the adjusted setting column width may be referred to as setColHeightAction. The terminal processes the delete row collaboration information delRowAction and the delete column collaboration information delColAction in a similar manner, the add row collaboration information addRowAction and the add column collaboration information addColoAction in a similar manner, and the set row height collaboration information setRowHeightAction and the set column width collaboration information setColdtWihAction in a similar manner. For example, the above collaboration information may be divided into three categories: delete class, add class, and adjust class.
For the deletion type, that is, for the collaboration information delRowAction of the deleted row and the collaboration information delColAction of the deleted column, the terminal may determine whether the deleted row or column is a row or column where the area is located, and if not, the terminal may obtain the position of the area based on the delRowAction or the delColAction, where the position is a changed position, and obtain the first target position of the area based on the changed position, so that the display position of the first label or the second label may be changed. In case the deleted row or column is the row or column in which the area is located, i.e. the area has been deleted by the second user, the terminal may display a third label on the second target location of the area when the deletion information of the area is received, the third label indicating that the area has been deleted by the second user.
The second target position may be preset by a related technician, or may be adjusted by a user according to a use habit of the user, for example, the second target position may be an upper left corner area around the area, and the second target position may be the same as the first target position, or may be different from the first target position, so that the user may directly know that the area is deleted based on the second target position.
For the add class and the adjust class, the location of the area may be changed, and the terminal may obtain the location of the area after the change based on the cooperation information of the add class or the adjust class, so as to obtain the first target location of the area after the change, so as to change the display location of the first tag or the second tag.
205. And the terminal receives second content, wherein the second content is the content edited by the second user on the target document.
When the first user edits the target document to obtain the first content, if the second user edits the target document at the same time and possibly the second user inputs new content in the area, the terminal may also receive the second content sent by the terminal where the second user is located. The terminal may determine whether the first user and the second user edit the same region in the target document, that is, whether the region edited by the first user is the same as the region edited by the second user, and if the first user and the second user edit the same region at the same time, the edited content in the region conflicts, and the terminal needs to execute the following steps, to determine the target content in the region based on the first content and the second content. The target content is the final content to be displayed in the area after being edited by the second user and the first user simultaneously.
Specifically, the process of receiving the second content by the terminal may be the same as the process of receiving the third editing information, and details of the embodiment of the present invention are not repeated herein.
It should be noted that, for the first content and the second content, the first content and the second content respectively refer to all contents in a certain region in the target document after the first user and the second user finish editing the region. For example, if the area has no content before being edited and the first user inputs "123", when the first user finishes editing, the content in the area is "123", and the terminal may obtain the first content "123"; if the area already has content before being edited, for example, the area already has content "1124" and the first user edits the area, deletes "1" in "1124" and adds content "3", and when the first user finishes editing, the content in the area is "1243", the terminal may acquire the first content "1243". That is, after the first user finishes editing the area, the content submitted to the server is all the content in the area after the editing is finished. The manner of acquiring the second content is the same as the manner of acquiring the first content, and the embodiment of the present invention is not described herein again.
Of course, if the second user does not currently input the content in the area, that is, the terminal does not receive the third editing information sent by the terminal where the second user is located, the terminal may directly use the first content edited by the first user as the target content of the area.
206. And when the first content and the second content are the edited content of the same area in the target document, displaying a selection prompt by the terminal, wherein the selection prompt is used for prompting the selection of a processing mode in content merging and copying, if a content merging instruction is obtained, executing a step 207, and if a copying instruction is obtained, executing a step 208.
When the first content and the second content are edited contents of the same region in the target document, the edited contents of the first user and the second user in the region conflict, the terminal can display a selection prompt to prompt the first user to select to reserve the edited contents of the first user and the second user or to abandon the edited first content as one part of the target content, so that the first content can be copied, and the first content can be directly pasted when the first content is to be edited again later without being edited again.
For example, as shown in fig. 9, the selection prompt may be displayed in the form of a pop-up window, and the terminal may display the selection prompt, which may be used to inform the first user that the area has been edited by the second user and prompt selection of one of two processing manners of content merging and copying.
Specifically, the terminal may display a content merge button and a copy button. When the user displays the selection prompt on the terminal, a selection operation may be performed, where the selection operation may be a touch operation on the content merge button or a touch operation on the copy button, and if the user performs the touch operation on the content merge button, the terminal may obtain a content merge instruction triggered by the touch operation on the content merge button, and the terminal may execute step 207 of merging the first content and the second content to obtain a target content; if the user performs a touch operation on the copy button, the terminal may obtain a copy instruction triggered by the touch operation on the copy button, and the terminal may perform step 208 described below to copy the first content. The target content is the final content to be displayed in the area after being edited by the second user and the first user simultaneously.
In a possible implementation manner, the step 206, the following step 207 or step 208 may be executed by a terminal where a user with a later editing time is located in the first user and the second user, and then the target content of the determined area is broadcasted to other users accessing the target document by way of editing information. In the embodiment of the present invention, only the time edited by the second user is before, and the time edited by the first user is after, for example, described.
207. The terminal merges the first content and the second content based on the content merging instruction of the first user to obtain the target content of the area, and performs step 209 based on the target content.
After the terminal obtains the content merging instruction, the first content and the second content may be merged based on the content merging instruction, and the target content of the area is determined. Wherein the target content includes the first content and the second content.
In a possible implementation manner, the terminal may merge two items of content by using a content splicing manner, and the terminal splices the first content and the second content to obtain the target content of the area. Therefore, the first content and the second content are spliced together to be used as target content, the content edited by the first user and the second user can be reserved, data loss cannot be caused, and the accuracy of the content acquisition process can be ensured. And the region is displayed according to a certain display style in the steps 201 to 203, so that other users can intuitively know that the region is edited.
In a specific possible embodiment, when the terminal splices the first content and the second content, the first content and the second content may be spliced according to the time sequence of editing the first content and the second content, so as to obtain the target content of the area. That is, when the first content and the second content are spliced, the splicing order of the first content and the second content may also be determined based on the time sequence of editing the first content and the second content. For example, the chronological order of the editing may be the chronological order of the end of the editing or the chronological order of the start of the editing, and only the chronological order of the end of the editing will be described here as an example. For example, the content whose chronological order of the end of editing is the first in the target content, and the content whose chronological order of the end of editing is the second in the target content. Of course, it is also possible to provide: the content whose chronological order of the end of editing is prior is in the next order in the target content, and the content whose chronological order of the end of editing is subsequent is in the previous order in the target content. The embodiment of the present invention is not limited thereto.
Specifically, the above splicing process may also be implemented in different splicing manners, and in a possible implementation manner, the terminal may splice the first content and the second content based on the linefeed to obtain the target content of the area. Here, only the case where the content whose chronological order of the end of editing is prior in the target content and the first content whose chronological order of the end of editing is later is taken as an example, the second content is prior to the linefeed and the first content is subsequent to the linefeed.
For example, taking the target document as a table, as shown in fig. 10 and 11, the second user edits in a certain cell, and at the same time, the first user also edits in the cell, before the first user finishes editing, the second user edits the second content to be 123, after that, the first content edited by the first user is 456, when the first user finishes editing, the terminal acquires that the first content is 456, the terminal may display a selection prompt as shown in fig. 9, if the user selects to perform content merging, the terminal may execute the step 207, and the first content and the second content are spliced together by a line feed character to obtain the target content as shown in fig. 12, where the second content is in the first line and the second content is in the second line.
Of course, the above-mentioned splicing process may also be implemented by other splicing manners, for example, splicing is performed by using target characters, such as plus signs and space marks, which are not limited in the embodiment of the present invention.
In a possible implementation manner, during the process of the first user editing the first content, the second user may also delete the original content in the region in the target document, where the original content refers to the content of the region before the first user starts editing the region. Therefore, when the deletion information of the original content in the area is received, the terminal can display a deletion mark on the third target position of the area, wherein the deletion mark is used for indicating that the second user deletes the original content in the area. The third target position may also be preset by a related technician or adjusted according to a usage habit of the user, for example, the comment box is displayed, or a left area or a right area of the area is displayed, which is not limited in the embodiment of the present invention.
It should be noted that, in the above step 206 and step 207, when the first content and the second content are editing contents for the same area in the target document, a process of merging the first content and the second content to obtain the target content of the region, the above description is made by taking as an example that the terminal displays the selection prompt, and the terminal performs the content acquisition based on the content merge instruction of the first user, in one possible implementation, after step 205, when the first content and the second content are editing content of the same area in the target document, the terminal can directly combine the first content and the second content to obtain the target content of the area, and the selection prompt does not need to be displayed, and the selection operation by the user is also not needed, so that the efficiency and the accuracy of content acquisition can be improved, and the complexity of the user operation is reduced.
208. The terminal copies the first content based on the copy instruction of the first user, sets the second content as the target content of the area, and performs step 209 based on the target content.
In step 206, after the terminal displays the selection prompt, the user may also select the processing mode of copying, and if the terminal can obtain a copy instruction, the step 208 may be executed to copy the first content based on the copy instruction, and if the user selects to copy the first content instead of using it as a part of the target content, the terminal may use the second content edited by the second user as the target content of the area.
For example, taking the target document as a table, as shown in fig. 10 and 11, when a second user and a first user edit a cell at the same time, a second content edited by the second user is 123, a first content edited by the first user is 456, and a time when the first user edits the first content is after a time when the second user edits the second content, the terminal may display a selection prompt as shown in fig. 9, and if the user selects to merge the contents, the terminal may perform step 208, copy the first content "456", and take the second content "123" as the target content, as shown in fig. 13, the terminal may perform step 209 described below, and take the target content "123" displayed in the cell.
Further, the first content may be copied in a clipboard. The terminal may also display a copy prompt for prompting that the first content has been successfully copied. For example, the content of the copy hint may be "copied to clipboard".
In a possible implementation manner, before the first user edits the region, the second user may also have already edited the content in the region, and accordingly, before step 204, the terminal may further obtain the original content in the region in the target document, where the original content is the content of the region before the first user starts editing the region. Furthermore, after the terminal acquires the second content, the second content may be compared with the original content to determine whether the second user edits new content in the area in the process of editing by the first user. Thus, in such an implementation, step 205 may be followed by the following three cases.
The first condition is as follows: when the second content is different from the original content, the terminal may execute step 206 to display a selection prompt. If the content merge instruction is obtained, step 207 may be executed, and the process is: and when the second content is different from the original content, executing the step of combining the first content and the second content to obtain the target content of the area when the first content and the second content are the edited content of the same area in the target document.
In this case, if the second content is different from the original content, it indicates that, in the process of editing the area by the first user, the second user also edits the content of the area to obtain a new content, that is, the second content, and the content edited by the first user and the second user conflicts, so that when the terminal obtains the content merging instruction, step 207 may be executed to obtain the target content.
Case two: when the second content is the same as the original content, the terminal may take the first content as the target content of the area. In the second case, the second content is the same as the original content, which means that the second user does not change the original content in the area during the process of the first user editing the area, so that the first user and the second user do not conflict with each other in the editing operation of the area, and therefore the terminal can directly use the first content edited by the first user as the target content of the area.
Case three: and when the second content is the same as the original content and the first content and the second content are edited contents of the same area in the target document, the terminal executes a step of merging the first content and the second content to obtain the target content of the area. In this case three, in the process that the first user edits the area in the target document, the second user may perform multiple editing operations on the area, and the finally determined second content is the same as the original content in the area, that is, the second user wants the content in the area to be maintained as the original content, so that in order to ensure that the edited contents of multiple users are all maintained, the terminal may merge the original content (that is, the second content) and the first content to obtain the target content. Specifically, the merging process is the same as the merging process shown in step 207, and the embodiment of the present invention is not described herein again.
Of course, there is also a possible case that, in the process that the first user edits the area in the target document, the second user may not change the original content in the area, and the terminal may perform the steps in the second case or the third case, and overlay the original content (the second content) or merge the original content (the second content) and the first content, which is not limited in the embodiment of the present invention.
209. The terminal displays the target content in the area.
After acquiring the target content of the area in step 207 or step 208, the terminal may execute step 209 to display the target content in the interface of the first user. Of course, the terminal may also send the target content to the server through the third editing information, and after receiving the third editing information, the server may broadcast the third editing information to the terminal where the first user is located, so that the terminal where the first user is located may also update the content of the target document based on the third editing information, and may also display the target content in an area displayed in an interface thereof.
According to the embodiment of the invention, when a plurality of users edit the same region of the same document at the same time, the contents edited by the plurality of users can be merged based on the content merging instruction of the users to obtain the final contents of the region, rather than directly covering the contents based on the editing time, the contents edited by the plurality of users can be reserved, so that data loss is avoided, and the accuracy of the obtained contents is high.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
A specific flow of the content obtaining method is described below by using a specific example, fig. 14 is a flow chart of the content obtaining method provided in the embodiment of the present invention, and referring to fig. 14, taking a document as a table and an area as a certain cell as an example, a terminal may record a value D1 of a current input box and coordinates of the input box, where the current input box is an area being edited by a first user, and a value D1 of the current input box is original content.
The first user starts inputting in the input box, and in the process of inputting by the first user, the terminal may further determine whether the cooperative row-column operation of the selected cell coordinate is affected, that is, the terminal may determine whether the second user has the operation of adding or deleting the row or column before the cell, or the operation of adjusting the row height or column width of the row or column before the cell, or the operation of deleting the row or column where the cell is located, which may affect the coordinate of the cell, and of course, for the operation of deleting the row or column where the cell is located, the terminal may further display a third label, and the content of the part may refer to the content shown in the step 204. For these operations that affect the coordinates of the cell, the terminal may update the coordinates of the selected cell.
When the first user input is completed, the terminal may determine whether the first user has input data, for example, the data input by the first user may be named as InputValue1, where the InputValue1 is the first content. The terminal can judge whether the InputValue1 is consistent with the D1, if so, the first user does not input data, and therefore the terminal only needs to directly exit the input state, if not, the terminal indicates that the first user inputs data, the terminal obtains the data D2 in the selected cell according to the cell coordinate, the D2 is the second content, the terminal can judge whether the D1 and the D2 are the same, if so, the terminal indicates that the second user does not input new content, the terminal can directly exit the input state, and the content in the selected cell can be determined to be D1. If D1 and D2 are different, it indicates that while the first user inputs content into the selected cell, the second user also inputs content into the selected cell, the terminal may prompt that the data are different, and prompt the user to click only copy text, or click to merge cells, where the merged cell is to merge two items of content D1 and D2 corresponding to the cell, that is, corresponding to step 206 above, and if the user clicks the merged cell, the terminal may stitch the input content InputValue1 to D2, and update the D1 data to the value after stitching, that is, corresponding to step 207 above, while if the user clicks the copy text, the terminal may copy the InputValue1 data and exit the input state, that is, the content in the selected cell may be updated to D2, that is, corresponding to step 208 above.
Fig. 15 is a schematic structural diagram of a content acquiring apparatus according to an embodiment of the present invention, and referring to fig. 15, the apparatus includes:
an obtaining module 1501, configured to obtain, according to an editing instruction for a target document, first content edited by a first user;
a receiving module 1502, configured to receive a second content, where the second content is a content edited by a second user on the target document, and the second user is a user other than the first user;
the merging module 1503 is configured to merge the first content and the second content to obtain the target content of the region when the first content and the second content are editing content of the same region in the target document.
In a possible implementation manner, the merging module 1503 is configured to splice the first content and the second content to obtain the target content of the region.
In one possible implementation manner, the merging module 1503 is configured to splice the first content and the second content based on a linefeed to obtain the target content of the region.
In a possible implementation manner, the merging module 1503 is configured to splice the first content and the second content according to a time sequence of editing the first content and the second content to obtain the target content of the region.
In one possible implementation, the apparatus further includes:
the first display module is used for displaying a selection prompt when the first content and the second content are the editing content of the same area in the target document, wherein the selection prompt is used for prompting the selection of a processing mode in content combination and copying;
the merging module 1503, configured to execute the step of merging the first content and the second content to obtain the target content of the region based on the content merging instruction of the first user;
correspondingly, the device also comprises:
and the copying module is used for copying the first content based on a copying instruction of the first user and taking the second content as the target content of the area when the first content and the second content are the edited content of the same area in the target document.
In a possible implementation manner, the receiving module 1502 is further configured to receive an editing status of the second user;
the obtaining module 1501 is further configured to obtain, according to the editing state of the second user, a display style of the region edited by the second user on the target document;
the device also includes:
and the second display module is used for displaying the region according to the display style.
In a possible implementation manner, the obtaining module 1501 is further configured to obtain a first label of the area when the editing state of the second user is a selected state, where the first label is used to indicate that the second user is selecting the area; or when the editing state of the second user is an input state, acquiring a second label of the area, wherein the second label is used for indicating that the second user is editing the area;
correspondingly, the second display module is used for displaying the area, and displaying the first label or the second label of the area on the first target position of the area.
In a possible implementation manner, the second display module is further configured to, when the number of the second users is multiple, display the first tags or the second tags of the multiple second users in an overlapping manner according to a time sequence in which the second users edit the area.
In one possible implementation, the apparatus further includes:
the third display module is used for displaying a mark frame, the mark frame comprises the area, and the mark frame is used for indicating that the area is in a state of being edited by a second user;
correspondingly, the device also comprises:
and the fourth display module is used for displaying a plurality of mark frames when the number of the second users is multiple, and the display styles of the mark frames corresponding to different second users are different.
In a possible implementation manner, the second display module is further configured to hide the first label or the second label when the editing state of the first user is an input state.
In one possible implementation, the second display module is further configured to display the hidden first label or the hidden second label when the cursor hovers over the first target location.
In one possible implementation, the apparatus further includes:
and the fifth display module is used for displaying a third label on the second target position of the area when the deletion information of the area is received, wherein the third label is used for indicating that the area is deleted by the second user.
In one possible implementation, the apparatus further includes:
and the sixth display module is used for displaying a deletion mark at a third target position of the area when receiving deletion information of the original content in the area, wherein the deletion mark is used for indicating that a second user deletes the original content in the area.
In a possible implementation manner, the obtaining module 1501 is further configured to obtain original content in the area in the target document, where the original content is content of the area before the first user starts editing the area;
correspondingly, the merging module 1503 is further configured to execute the step of merging the first content and the second content to obtain the target content of the region when the second content is different from the original content and the first content and the second content are edited contents of the same region in the target document.
In a possible implementation manner, the obtaining module 1501 is further configured to use the first content as the target content of the area when the second content is the same as the original content and the first content and the second content are editing contents of the same area in the target document.
In a possible implementation manner, the obtaining module 1501 is further configured to execute a step of merging the first content and the second content to obtain the target content of the region when the second content is the same as the original content and the first content and the second content are editing contents of the same region in the target document.
According to the device provided by the embodiment of the invention, when a plurality of users edit the same region of the same document at the same time, the contents edited by the plurality of users can be merged based on the content merging instruction of the users to obtain the final contents of the region, instead of directly covering the contents based on the editing time, the contents edited by the plurality of users can be reserved, so that data loss is avoided, and the accuracy of the obtained contents is high.
It should be noted that: in the content acquiring apparatus provided in the above embodiment, when acquiring a content, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the above described functions. In addition, the content obtaining apparatus and the content obtaining method provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Fig. 16 is a block diagram of a terminal according to an embodiment of the present invention. The terminal 1600 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1600 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
Generally, terminal 1600 includes: a processor 1601, and a memory 1602.
Processor 1601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). Processor 1601 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1601 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1602 may include one or more computer-readable storage media, which may be non-transitory. The memory 1602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1602 is used to store at least one instruction for execution by the processor 1601 to implement a content retrieval method provided by a method embodiment of the present invention, which may include: acquiring first content edited by a first user according to an editing instruction of a target document; receiving second content, wherein the second content is edited by a second user on the target document, and the second user is a user other than the first user; and when the first content and the second content are the edited content of the same area in the target document, merging the first content and the second content to obtain the target content of the area.
In some embodiments, the terminal 1600 may also optionally include: peripheral interface 1603 and at least one peripheral. Processor 1601, memory 1602 and peripheral interface 1603 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 1603 via buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of an input device 1604, a display 1605, and a power supply 1606.
Peripheral interface 1603 can be used to connect at least one I/O (Input/Output) related peripheral to processor 1601 and memory 1602. In some embodiments, processor 1601, memory 1602, and peripheral interface 1603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1601, the memory 1602 and the peripheral device interface 1603 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
An input device 1604 may be used to provide input functionality, the input device 1604 may be connected to the processor 1601 or the memory 1602 through a peripheral interface 1603, for example, the input device 1604 may be a tablet, keyboard, mouse, or touch screen, among others. In this embodiment of the present invention, based on the input device 1604, the user may be provided with an editing function for the target document, so as to obtain the first content edited by the first user. The processor 1601 may obtain the first content, and perform the content merging step based on the received second content to obtain the target content.
The display 1605 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1605 is a touch display, the display 1605 also has the ability to capture touch signals on or over the surface of the display 1605, which can serve as the input device 1604 described above. The touch signal may be input to the processor 1601 as a control signal for processing. At this point, the display 1605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1605 may be one, providing the front panel of the terminal 1600; in other embodiments, the display screens 1605 can be at least two, respectively disposed on different surfaces of the terminal 1600 or in a folded design; in still other embodiments, display 1605 can be a flexible display disposed on a curved surface or a folded surface of terminal 1600. Even further, the display 1605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 1605 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other materials. In the embodiment of the present invention, the display screen 1605 may obtain the display style of the region in the target document from the processor 1601 or the memory 1602 through the peripheral device interface 1603, and display the region, and may also display the target content when obtaining the target content in the region.
A power supply 1606 is used to power various components within terminal 1600. The power source 1606 may be ac, dc, disposable or rechargeable. When the power source 1606 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in fig. 16 is not intended to be limiting of terminal 1600, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be employed.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor to perform the content acquisition method in the above-described embodiments is also provided. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (17)

1. A method for content acquisition, the method comprising:
acquiring first content edited by a first user according to an editing instruction of a target document;
receiving second content, wherein the second content is edited by a second user on the target document, the second user is a user other than the first user, the editing time of the second user is before, and the editing time of the first user is after;
when the first content and the second content are the edited content of the same area in the target document, displaying a selection prompt, wherein the selection prompt is used for prompting the selection of a processing mode in content combination and copying;
if the content merging instruction of the first user is obtained, merging the first content and the second content based on the content merging instruction to obtain the target content of the area;
and if the copying instruction of the first user is acquired, copying the first content based on the copying instruction, and taking the second content as the target content of the area.
2. The method of claim 1, wherein the merging the first content and the second content to obtain the target content of the region comprises:
and splicing the first content and the second content to obtain the target content of the region.
3. The method according to claim 2, wherein the splicing the first content and the second content to obtain the target content of the area comprises:
and splicing the first content and the second content based on the line break to obtain the target content of the region.
4. The method according to claim 2, wherein the splicing the first content and the second content to obtain the target content of the area comprises:
and splicing the first content and the second content according to the time sequence of editing the first content and the second content to obtain the target content of the region.
5. The method of claim 1, further comprising:
receiving an editing state of the second user;
acquiring a display style of the region edited by the target document by the second user according to the editing state of the second user;
and displaying the region according to the display style.
6. The method according to claim 5, wherein the obtaining of the display style of the edited region of the target document by the second user according to the editing state of the second user comprises:
when the editing state of the second user is a selected state, acquiring a first label of the area, wherein the first label is used for indicating that the second user selects the area; or when the editing state of the second user is an input state, acquiring a second label of the area, wherein the second label is used for indicating that the second user is editing the area;
correspondingly, the displaying the region according to the display style comprises:
displaying the area, and displaying the first label or the second label of the area on a first target position of the area.
7. The method of claim 6, wherein said displaying the region, displaying the first label or the second label of the region at a first target location of the region, comprises:
and when the number of the second users is multiple, displaying the first labels or the second labels of the multiple second users in an overlapping manner according to the time sequence of the second users for editing the area.
8. The method of claim 6, further comprising:
and when the editing state of the first user is an input state, hiding the first label or the second label.
9. The method of claim 8, further comprising:
displaying the hidden first label or the hidden second label when the cursor hovers over the first target position.
10. The method of claim 1, further comprising:
when the deletion information of the area is received, displaying a third label on a second target position of the area, wherein the third label is used for indicating that the area is deleted by the second user.
11. The method of claim 1, further comprising:
and when receiving deletion information of the original content in the area, displaying a deletion mark at a third target position of the area, wherein the deletion mark is used for indicating that a second user deletes the original content in the area.
12. The method according to claim 1, wherein before the obtaining the first content edited by the first user according to the editing instruction of the target document, the method further comprises:
acquiring original content in the region in the target document, wherein the original content refers to the content of the region before the first user edits the region;
accordingly, after the receiving the second content, the method further comprises:
and when the second content is different from the original content, executing the step of displaying a selection prompt when the first content and the second content are the edited content of the same area in the target document.
13. The method of claim 12, further comprising:
and when the second content is the same as the original content and the first content and the second content are editing contents of the same region in the target document, taking the first content as the target content of the region.
14. The method of claim 12, further comprising:
and when the second content is the same as the original content and the first content and the second content are edited contents of the same region in the target document, executing a step of merging the first content and the second content to obtain the target content of the region.
15. A content acquisition apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring first content edited by a first user according to an editing instruction of a target document;
a receiving module, configured to receive second content, where the second content is a content edited by a second user on the target document, the second user is a user other than the first user, and the editing time of the second user is before and the editing time of the first user is after;
a first display module, configured to display a selection prompt when the first content and the second content are edited contents of a same region in the target document, where the selection prompt is used to prompt a processing mode to be selected from content merging and copying;
a merging module, configured to merge the first content and the second content based on the content merging instruction to obtain a target content of the area if the content merging instruction of the first user is obtained;
and the copying module is used for copying the first content based on the copying instruction and taking the second content as the target content of the area if the copying instruction of the first user is acquired.
16. A terminal, comprising a processor and a memory, wherein at least one instruction is stored in the memory, and wherein the instruction is loaded and executed by the processor to perform the operations performed by the content acquisition method according to any one of claims 1 to 14.
17. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to perform operations performed by a content acquisition method according to any one of claims 1 to 14.
CN201811637104.8A 2018-12-29 2018-12-29 Content acquisition method, device, terminal and storage medium Active CN109710909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811637104.8A CN109710909B (en) 2018-12-29 2018-12-29 Content acquisition method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811637104.8A CN109710909B (en) 2018-12-29 2018-12-29 Content acquisition method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109710909A CN109710909A (en) 2019-05-03
CN109710909B true CN109710909B (en) 2020-07-07

Family

ID=66259552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811637104.8A Active CN109710909B (en) 2018-12-29 2018-12-29 Content acquisition method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109710909B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110301B (en) * 2019-05-09 2023-08-01 成都终身成长科技有限公司 File editing method, device, system, client, server and storage medium
CN111930367B (en) * 2019-05-13 2024-04-16 阿里巴巴集团控股有限公司 Data processing method, device and equipment
CN110213367B (en) 2019-05-31 2023-11-28 北京字节跳动网络技术有限公司 Interactive information notification method, device, equipment and computer readable storage medium
CN110716901B (en) * 2019-09-25 2023-04-28 苏宁云计算有限公司 Performance test data processing method and device, computer equipment and storage medium
CN110888853A (en) * 2019-11-26 2020-03-17 廊坊新奥燃气有限公司 Data management system and method
CN111831944B (en) * 2020-07-09 2021-09-28 腾讯科技(深圳)有限公司 Multimedia processing method, device, client, server and storage medium
CN111723560B (en) * 2020-07-15 2024-04-19 金蝶软件(中国)有限公司 Dynamic adjustment method, system and related equipment for parallel display area of table
CN111859879B (en) * 2020-07-31 2024-01-30 抖音视界有限公司 Data display method and device based on virtual form and electronic equipment
CN112418791A (en) * 2020-11-17 2021-02-26 北京字跳网络技术有限公司 Document display method and device and electronic equipment
CN114528816B (en) * 2022-01-27 2023-03-17 北京飞书科技有限公司 Collaborative editing information display method and device, electronic equipment and readable medium
CN114818625B (en) * 2022-06-29 2022-11-08 天津联想协同科技有限公司 Method and device for processing document area

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1244874C (en) * 2002-10-12 2006-03-08 鸿富锦精密工业(深圳)有限公司 Multi-point coordinated operation system and method
GB0523703D0 (en) * 2005-11-22 2005-12-28 Ibm Collaborative editing of a document
DE202011110880U1 (en) * 2010-04-12 2017-01-20 Google Inc. Collaborative cursors in a hosted word processor
CN102982214B (en) * 2012-12-06 2015-11-04 北京数码大方科技股份有限公司 The collaborative method for building up of cad model and device
CN103914439B (en) * 2013-01-04 2018-06-12 中国移动通信集团公司 A kind of online file editing method, equipment and system
US10133720B2 (en) * 2013-06-15 2018-11-20 Microsoft Technology Licensing, Llc Showing presence of multiple authors in a spreadsheet
CN106569797B (en) * 2016-10-11 2019-07-05 东软集团股份有限公司 The methods, devices and systems of multi-person synergy drafting process
CN108009243B (en) * 2017-11-30 2021-10-22 云南电网有限责任公司 Multi-user synchronous editing processing system and processing method for same document
CN107943777B (en) * 2017-12-14 2021-07-06 北京久蓉科技有限公司 Collaborative editing and collaborative processing method, device, equipment and storage medium
CN108549623B (en) * 2018-04-12 2022-03-01 北京三快在线科技有限公司 Collaborative document editing control method and device, electronic equipment and storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN109710909B (en) Content acquisition method, device, terminal and storage medium
US11169705B2 (en) Configuration of application execution spaces and sub-spaces for sharing data on a mobile touch screen device
CN112866785B (en) Picture generation method, device, equipment and storage medium
US11853730B2 (en) Mini program data binding method and apparatus, device, and storage medium
US11604580B2 (en) Configuration of application execution spaces and sub-spaces for sharing data on a mobile touch screen device
JP6251214B2 (en) Electronic device, method and program
CN111767563A (en) Method, device, terminal and storage medium for setting authority of online document
CN104216600A (en) Method for providing functions of application programs and touch screen intelligent terminal device
AU2020202901B2 (en) Enriching collaboration using visual comments in a shared review
CN112181576A (en) Form processing method, device, terminal and storage medium
US20150286386A1 (en) Progressive functionality access for content insertion and modification
CN112416485A (en) Information guiding method, device, terminal and storage medium
CN110286971A (en) Processing method and system, medium and calculating equipment
CN111324398A (en) Recent content processing method, device, terminal and storage medium
CN112416486A (en) Information guiding method, device, terminal and storage medium
CN114845171A (en) Video editing method and device and electronic equipment
CN116301861A (en) Page configuration method, electronic device and storage medium
CN114239497A (en) Document processing method, document processing device, electronic equipment and medium
CN114840109A (en) Information display method and device, electronic equipment and readable storage medium
CN114385153A (en) Interface editing method, editing terminal and computer readable storage medium
CN116136732A (en) Interactive answer method and device, medium and terminal
CN115329738A (en) Method and device for creating template and method and device for inserting content into document
CN113568553A (en) Display method and device
CN116909454A (en) Image generation method, device, electronic equipment and storage medium
CN116415547A (en) Document processing method, device, equipment, medium and program product

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