Document sharing method and device, equipment and medium
By obtaining and processing information on the alignment position and explanation position of the document, adjusting the display method of the document on the shared end, solving the problem of incomplete display of documents caused by screen size differences, and improving the experience of document sharing in online meetings.
Patent Information
- Application Number
- CN202411856057.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
AI Technical Summary
In online meetings, when the screen size difference between the main sharer and the shared person is large, the shared person may not be able to see the content of the lower half of the document told by the main sharer, resulting in poor experience of browsing shared documents.
By obtaining the document alignment position and current explanation position sent by the main sharing end, if it is determined that the current explanation area is outside the document window of the shared end, the position change information is determined based on the current explanation position, and the target document is displayed based on the document alignment position and position change information, so that the current explanation area is updated and displayed in the document window of the shared end.
Ensure that no matter the size of the document window on the shared side, the content being told by the main sharer can be seen synchronously by the sharer, effectively improving the experience of participants browsing shared documents.
Smart Images

Figure CN119807152A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a document sharing method, device, equipment and medium. Background Art
[0002] In online meetings, by sharing documents, different participants can discuss the same document content. In related technologies, the location of the document viewed by the sharer will also be synchronized to the shared person, so that all participants can watch the content being discussed at the same frequency. However, when the screen size of the sharer is much larger than the screen size of the shared person, the main sharer can see the lower half of the content on the large screen, which may be beyond the display range on the shared person's small screen. As a result, when the main sharer is describing the visible document area, the shared person may not be able to see it on the small screen, resulting in a poor experience for participants to browse the shared document, which needs to be improved. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a document sharing method, device, equipment and medium.
[0004] The present disclosure provides a document sharing method, the method comprising:
[0005] In response to the document sharing operation, obtaining the document alignment position and the current explanation position of the target document being shared sent by the main sharing end;
[0006] If it is determined according to the document alignment position and the current explanation position that the current explanation area is outside the document window of the shared end, determining position change information according to the current explanation position;
[0007] The target document is displayed based on the document alignment position and the position change information, so that the current explanation area is updated and displayed within the document window of the shared end.
[0008] The present disclosure also provides a document sharing device, the device comprising:
[0009] An acquisition module, used for acquiring, in response to a document sharing operation, a document alignment position and a current explanation position of a target document being shared, sent by a main sharing end;
[0010] an information module, for determining position change information according to the current explanation position if it is determined according to the document alignment position and the current explanation position that the current explanation area is outside the document window of the shared end;
[0011] The display module is used to display the target document based on the document alignment position and the position change information, so that the current explanation area is updated and displayed in the document window of the shared end.
[0012] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the document sharing method provided in the embodiment of the present disclosure.
[0013] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the document sharing method provided by the embodiment of the present disclosure.
[0014] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: the document sharing solution provided by the embodiments of the present disclosure, in response to a document sharing operation, obtains the document alignment position and the current explanation position of the target document being shared sent by the main sharing end; if it is determined that the current explanation area is outside the document window of the shared end according to the document alignment position and the current explanation position, the position change information is determined according to the current explanation position; the target document is displayed based on the document alignment position and the position change information, so that the current explanation area is updated and displayed within the document window of the shared end. By adopting the above technical scheme, the shared end can obtain the document alignment position and the current explanation position when the main sharing end is sharing the target document, and judge whether the current explanation area is outside the document window based on the document alignment position and the current explanation position. If so, the position change information is determined according to the current explanation position, and the target document is displayed according to the document alignment position and the position change information so that the current explanation area is displayed within the document window. On the basis of ensuring the excellent display effect of the shared end based on the document sharing mode, the content of the target document displayed in the document window of the shared end is updated through the current explanation position of the main sharing end, ensuring that no matter what the size of the document window of the shared end is, the content being explained triggered by the main sharer can be seen synchronously by the shared person, thereby effectively improving the experience of participants browsing the shared documents. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0016] Figure 1 A flowchart of a document sharing method provided by an embodiment of the present disclosure;
[0017] Figure 2 A flowchart of another document sharing method provided by an embodiment of the present disclosure;
[0018] Figure 3 A schematic diagram of a document window of a main sharing terminal provided in an embodiment of the present disclosure;
[0019] Figure 4 A schematic diagram of a document window of a shared terminal provided in an embodiment of the present disclosure;
[0020] Figure 5 A schematic diagram of another document window of a shared terminal provided in an embodiment of the present disclosure;
[0021] Figure 6 A schematic diagram of a document window of another shared terminal provided in an embodiment of the present disclosure;
[0022] Figure 7 A schematic diagram of a document window of another shared terminal provided in an embodiment of the present disclosure;
[0023] Figure 8 A schematic diagram of another document window of a main sharing terminal provided in an embodiment of the present disclosure;
[0024] Fig. 9 A schematic diagram of a shared end text before the position is changed provided by an embodiment of the present disclosure;
[0025] Fig.10 A schematic diagram of a shared end text position change provided by an embodiment of the present disclosure;
[0026] Fig.11 A schematic diagram of a shared end nested element position change provided by an embodiment of the present disclosure;
[0027] Fig.12 A schematic diagram of another shared end nested element position change provided by an embodiment of the present disclosure;
[0028] Fig.13 A schematic diagram of a document window of a shared terminal provided in another embodiment of the present disclosure;
[0029] Fig.14 A schematic diagram of the structure of a document sharing device provided by an embodiment of the present disclosure;
[0030] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] In traditional video conferences, screen sharing is generally used to share the presenter's documents. However, when there is a large size difference between the presenter's screen and the viewer's screen, the viewer often has to scale the video to display the content. For example, if the presenter is sharing the desktop on the computer, and the person being shared is using a mobile phone to view it, the viewing experience is very poor. The person being shared has only two options: 1) either watch all the shared content at once, but have to endure a large compression ratio, and may not even be able to see the words on the desktop clearly on the mobile phone; 2) either choose to display the other party's video in 1:1, but it is impossible to watch the entire content at once. In the case of not being able to see the entire content, the user can choose to manually drag the screen to see the part they want to watch or center the current explanation position of the main sharer to ensure that the nearby area can be seen by everyone. However, this synchronization solution for the current explanation position also has disadvantages. Because the screen of the main sharer is large, the range that can be displayed for a line of text is also larger. On a small screen, even if the current explanation position is centered, it may not be possible to fully display a line of text, and the user still cannot clearly understand the content.
[0038] In the related art, by sharing a document, all participants will open the same document. The position of the document viewed by the main sharer will also be synchronized to the shared person, so that all participants can watch the content being presented at the same frequency. However, when there is a large size difference between the screens of the main sharer and the shared person, when the main sharer is talking about the content at the top or bottom of the document on the large screen, the shared person on the small screen cannot see it, resulting in a poor experience for participants to browse the shared document.
[0039] In order to solve the problem in the related art that the person being shared cannot see the content narrated by the main sharer in document sharing, the embodiments of the present disclosure provide a document sharing method, which is introduced below in conjunction with specific embodiments.
[0040] Figure 1 The present invention provides a flowchart of a document sharing method provided by an embodiment of the present invention. The method can be executed by a document sharing device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0041] Step 101: In response to a document sharing operation, obtain a document alignment position and a current explanation position of a target document being shared, which are sent by a main sharing end.
[0042] Document sharing can be a method of enabling multiple users to simultaneously browse the same content by sharing documents. For example, in a conference scenario, if a user actively shares a document (for example, the target document referred to in step 101) in a real-time conference interface, then the document can be presented in the real-time conference interface of at least some of the other participants participating in the real-time multimedia conference. The document sharing operation can be that the shared end receives a sharing request from the main sharing end, and the main sharing end can initiate a sharing request to the shared end in response to the operation of the main sharing user triggering the sharing of the target document. For example, in a conference scenario, the main sharing user triggers the sharing of the target document by gesture control operations such as clicking, double-clicking, and long pressing a preset document sharing control in the conference interface, and the shared end receives the sharing request sent by the main sharing end.
[0043] The main sharing terminal may be a client that actively initiates document sharing, and the corresponding user is the main sharing user. In the embodiment of the present disclosure, the main sharing terminal may be a terminal with a larger document window, for example, the main sharing terminal may be a computer terminal. The shared terminal may be a client that passively shares documents, and the number of shared terminals may be one or more. In the embodiment of the present disclosure, the shared terminal may be a terminal with a smaller document window, and the size of the document window of the shared terminal is smaller than the size of the document window of the main sharing terminal, for example, the shared terminal may be a mobile phone terminal, a tablet terminal, etc.; the corresponding user of the shared terminal is the shared user, for example, at least some of the participants in an online meeting other than the main sharing user may be the shared user. The target document may be a document shared and browsed by the main sharing terminal and the shared terminal. The document sharing method of the embodiment of the present disclosure may be executed by a target application in the shared terminal, and both the main sharing terminal and the shared terminal are provided with the above-mentioned target application so that the main sharing user and the shared user communicate through the target application.
[0044] The document alignment position can be the reference position for synchronizing or aligning the content viewed by the main sharing terminal and the shared terminal. The document alignment methods may include top alignment and centerline alignment. For top alignment, the document alignment position is the position of the first character of the first line displayed in the document window of the main sharing terminal in the target document. By using this document alignment position, the starting position of the target document currently seen by the main sharing terminal and the shared terminal, that is, the first character of the first line, can be made the same; for centerline alignment, the document alignment position is the position of the first character or middle character of the text line where the centerline is displayed in the document window of the main sharing terminal in the target document. By using this document alignment position, the first character or middle character of the text line where the centerline of the target document currently seen by the main sharing terminal and the shared terminal can be made the same.
[0045] The current explanation position may be the position where the main sharing user is explaining or browsing, as indicated by the mouse of the main sharing end, other devices or other means. The current explanation position refers to the relative position in the target document. For example, when the current explanation position is the mouse position, it may be the screen position of the mouse relative to the position of the target document. The main sharing end may determine the position of the mouse on its screen by listening to mouse movement events, and determine the relative position of the mouse in the target document based on the screen position of the mouse and the position of the target document on the screen.
[0046] Specifically, the main sharing end can send a sharing request to the shared end in response to the document sharing trigger operation of the target document by the main sharing user. The sharing request includes the document identification, document alignment position and current explanation position of the target document. Upon receiving the sharing request, the shared end can determine that it has received the document sharing operation, and can obtain the document identification, document alignment position and current explanation position of the target document, obtain the document address according to the document identification of the target document, and obtain the document file, so as to prepare for the subsequent display of the target document.
[0047] In some embodiments, the current explanation position is within the document window of the main sharing terminal and the current explanation area includes the content of the target document. The document window of the main sharing terminal can be a window for the main sharing terminal to display documents in the document sharing scenario, for example, in the conference scenario, the document window can be a real-time conference interface. The current explanation area can be a preset area where the current explanation position is located in the target document. The size of the preset area is small, and the size of the preset area is set according to the actual situation. For example, the current explanation area can be a 1px square area. After detecting the current explanation position, the main sharing terminal can determine whether the current explanation position is within the document window. If not, it means that the current explanation position indicated by the main sharing user is outside the document window, for example, the mouse is moved outside the document window, and the current explanation position will not be sent to the shared terminal. If it is determined that the current solution position is within the document window, it can be determined whether the current explanation area of the current explanation position is a blank area. If so, it means that the current explanation area does not include content, and the current explanation position is not sent to the shared terminal. If the current explanation area is not a blank area, it means that it includes content, and the current explanation position can be sent to the shared terminal. The main sharing end sends the current explanation position to the shared end only when it determines that the current explanation position of the shared user indicated by the mouse is within the document window and the current explanation area includes content. Otherwise, the current explanation position is not sent to avoid unnecessary display logic by the shared end.
[0048] Step 102: If it is determined according to the document alignment position and the current explanation position that the current explanation area is outside the document window of the shared end, position change information is determined according to the current explanation position.
[0049] The current explanation area may be a preset area where the current explanation position in the target document is located. The size of the preset area is relatively small, and the size of the preset area is set according to the actual situation. For example, the current explanation area may be a 1px square area. The document window of the shared end may be a window for displaying documents on the shared end in a document sharing scenario. For example, in a conference scenario, the document window may be a real-time conference interface. In the disclosed embodiment, the size of the document window of the shared end is smaller than the size of the document window of the main sharing end. For example, the main sharing end is a computer, and the shared end is a mobile phone. The computer screen is much larger than the mobile phone screen, and thus the size of the document window of the main sharing end is much larger than the size of the document window of the shared end.
[0050] The position change information may be that the shared end needs to make additional position changes to the target document according to the current explanation position on the basis of document alignment according to the document alignment position to ensure that the current explanation area can be displayed, such as how much distance is updated in which direction. The position change information may include the position change distance and the position change direction, that is, the additional position change distance and position change direction for displaying the current explanation area. The initial state of the position change distance is zero, and the position change direction may include four directions, horizontal and vertical. In the disclosed embodiment, the position change or update display of the target document may be achieved by scrolling, sliding, jumping, etc. of the target document, which is determined according to the actual situation.
[0051] In some embodiments, determining that the current explanation area is outside the document window of the shared end based on the document alignment position and the current explanation position may include: determining the current displayed content of the target document in the document window based on the document alignment position and the size of the document window; extracting the content of the current explanation area in the target document based on the current explanation position; if the current displayed content does not include the content of the current explanation area, determining that the current explanation area is outside the document window.
[0052] Among them, the current display content can be the content displayed when the target document is displayed in the document window of the shared end according to the document alignment position. When the sizes of the document windows of different shared ends are different, the corresponding current display content is different. After obtaining the document alignment position and the current explanation position, the shared end can judge whether the current explanation area is outside its own document window according to the document alignment position and the current explanation position. The specific judgment process can firstly layout the target document according to the size of the document window according to the document alignment position to determine the current display content. For example, when the alignment mode is top alignment, the document alignment position is the position of the first line and the first text displayed in the document window of the shared end in the target document, and the target document is laid out and displayed according to the size of the document window starting from the document alignment position to be the current display content; then extract the content of the current explanation area of the current explanation position in the target document, and judge whether the current display content includes the content of the current explanation area. If so, it is determined that the current explanation area is within the document window, and the position change information does not need to be determined; if the current display content does not include the content of the current explanation area, or only includes part of the content of the current explanation area, it is determined that the current explanation area is outside the document window, and the position change information needs to be determined.
[0053] When the shared end determines that the current explanation area is within the document window, the target document can be displayed according to the document alignment position, and the current display content can be displayed in the document window. When the shared end determines that the current explanation area is outside the document window, the position change information required to display the current explanation area within the document window can be determined according to the current explanation position. Specifically, it can be determined according to the nesting relationship and position change direction of one or more document elements corresponding to the current explanation area.
[0054] For example, Figure 2 A flowchart of another document sharing method provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, in a feasible implementation manner, determining the position change information according to the current teaching position may include:
[0055] Step 201: If the current explanation area corresponds to only one document element, position change information is determined according to the current explanation position and the position change direction of the document element.
[0056] Document elements can be the units that make up a document. The target document can include multiple document elements. For example, the target document can include text, tables, code blocks, graphics, etc. The position change directions of different document elements can be different. For example, the position change direction of the text is vertical, and the position change direction of the table can be vertical or horizontal.
[0057] Specifically, when the shared end determines the position change information based on the current explanation position, it can first determine the document element corresponding to the current explanation area in the target document. If it only corresponds to one document element, for example, it can only correspond to the main text or a table, then only the position of the document element needs to be changed. It can be determined based on the current explanation position and the position change direction of the document element how much position change distance to update in which direction so that the current explanation area can be displayed within the document window, thereby determining the position change information.
[0058] In some embodiments, determining the position change information based on the current explanation position and the position change direction of the document element may include: if the position change direction of the document element is vertical and the current explanation position is below the document window, determining the vertical distance between the current explanation position and the bottom preset position of the document window as the position change distance, and determining the position change direction as upward; if the position change direction of the document element is vertical and the current explanation position is above the document window, determining the vertical distance between the current explanation position and the top preset position of the document window as the position change distance, and determining the position change direction as downward.
[0059] The bottom preset position may be a display position set for the current explanation area when it is displayed in the document window through upward update. The bottom preset position is set according to the distance requirement between the bottom border of the document window. When there is no distance requirement, the bottom preset position can be set at the bottom border. The top preset position may be a display position set for the current explanation area when it is displayed in the document window through downward update. The top preset position is set according to the distance requirement between the top border of the document window. When there is no distance requirement, the top preset position can be set at the top border. Optionally, the first distance between the bottom preset position and the bottom border of the document window and the second distance between the top preset position and the top border of the document window are less than the first margin. The first margin may be a maximum value of the distance from the top border or the bottom border of the document window set for the current explanation area. For example, the first margin may be 100px, 2 lines or 20% of the screen height, etc. By setting the bottom preset position and the top preset position, the content near the current explanation area can also be displayed.
[0060] Specifically, when the shared end determines the position change information, if the document element corresponding to the current explanation area is the main text or other document element with a vertical update direction, the relative position of the current explanation position in the document window can be determined first, which can be determined based on the relative position of the current explanation position and the document alignment position. If the current explanation position is below the document alignment position, it means that the current explanation position is below the document window and needs to be changed upward to display the current explanation area. The position change direction of the current explanation area can be determined as upward, and the vertical distance traveled when the current explanation position is updated upward to the bottom preset position of the document window is determined as the position change distance; if the current explanation position is above the document alignment position, it means that the current explanation position is above the document window and needs to be changed downward to display the current explanation area. The position change direction of the current explanation area can be determined as downward, and the vertical distance traveled when the current explanation position is updated downward to the top preset position of the document window is determined as the position change distance.
[0061] For example, Figure 3 A schematic diagram of a document window of a main sharing terminal provided in an embodiment of the present disclosure, such as Figure 3 As shown in the figure, the document window of the main sharing end is shown when the current explanation area corresponds to the main text, and the circular area in the document window is the location of the current explanation position, for example, the location of the mouse, and the rectangular area extended by the circular area is the current explanation area.
[0062] For example, Figure 4 A schematic diagram of a document window of a shared terminal provided by an embodiment of the present disclosure, such as Figure 4 As shown in the figure, a document window 400 of a shared terminal is shown, and the document window 400 includes a target document 401 displayed according to the document alignment position. Figure 4 The content of the current explanation area 402 is not in the current display content of the target document 401 in the document window 400, the current explanation area 402 is outside the document window 400, and the current explanation area 402 is below the document window 400. It needs to be moved upward to be displayed in the document window 400. After the position change, see Figure 5 .
[0063] For example, Figure 5 A schematic diagram of another document window of a shared terminal provided by an embodiment of the present disclosure, such as Figure 5 As shown, compared to Figure 4, the target document 501 in the figure updates the position change distance in the figure upward so that the current explanation area 502 changes its position to be displayed within the document window 500 of the shared end, and the shared user can see the current explanation area 502. The current explanation area 502 is located at the bottom preset position 100px away from the bottom boundary of the document window 500. The position change distance in the figure is Figure 4 The vertical distance between the current explanation position where the current explanation area 402 is located and the bottom preset position.
[0064] For example, Figure 6 A schematic diagram of another document window of a shared terminal provided in an embodiment of the present disclosure is shown as follows: Figure 6 As shown in the figure, a document window 600 of a shared terminal is shown, and the document window 600 includes a target document 601 displayed according to the document alignment position. Figure 6 The content of the current explanation area 602 is not in the current display content of the target document 601 in the document window 600, the current explanation area 602 is outside the document window 600, and the current explanation area 602 is above the document window 600 and needs to be moved downward to be displayed in the document window 600. After the update, see Figure 7 .
[0065] For example, Figure 7 A schematic diagram of another document window of a shared terminal provided by an embodiment of the present disclosure is shown as follows: Figure 7 As shown, compared to Figure 6 , the target document 701 in the figure updates the position change distance in the figure downward so that the current explanation area 702 is changed to be displayed within the document window 700 of the shared end, and the shared user can see the current explanation area 702. The current explanation area 702 is located at the top preset position 100px away from the top border of the document window 700. The position change distance in the figure is Figure 6 The vertical distance between the current explanation position where the current explanation area 602 is located and the top preset position.
[0066] Understandably, Figure 4-Figure 7 The schematic diagram in which the current explanation area corresponds to a document element as the main text and the position change direction is vertical is taken as an example, which is only an example and not a limitation.
[0067] In other embodiments, determining the position change information based on the current explanation position and the position change direction of the document element may include: if the position change direction of the document element is horizontal and the current explanation position is on the left side of the document window, determining the horizontal distance between the current explanation position and the preset position on the left side of the document window as the position change distance, and determining the position change direction to the right; if the position change direction of the document element is horizontal and the current explanation position is on the right side of the document window, determining the horizontal distance between the current explanation position and the preset position on the right side of the document window as the position change distance, and determining the position change direction to the left.
[0068] Among them, the left preset position can be a display position set for the current explanation area when it is displayed in the document window by updating to the right, and the left preset position is set according to the distance requirement between the left border of the document window. When there is no distance requirement, the left preset position can be set at the left border. The right preset position can be a display position set for the current explanation area when it is displayed in the document window by updating to the left, and the right preset position is set according to the distance requirement between the right border of the document window. When there is no distance requirement, the right preset position can be set at the right border. Optionally, the third distance between the left preset position and the left border of the document window and the fourth distance between the right preset position and the right border of the document window are less than the second margin. The second margin can be a maximum value of the distance from the left border or the right border of the document window set for the current explanation area, for example, the second margin can be 100px, 2 lines or 20% of the screen height, etc. The first margin and the second margin can be the same or different. By setting the left preset position and the right preset position, the content near the current explanation area can also be displayed.
[0069] Specifically, when the shared end determines the position change information, if the document element corresponding to the current explanation area is a table or other document element whose position change direction is horizontal, it can first determine the relative position of the current explanation position in the document window. Specifically, if the current explanation position is on the left side of the document window and needs to be changed to the right to display the current explanation area, the position change direction of the current explanation area can be determined to be right, and the horizontal distance traveled when the current explanation position is updated to the right to the preset position on the left side of the document window is determined as the position change distance; if the current explanation position is on the right side of the document window and needs to be changed to the left to display the current explanation area, the position change direction of the current explanation area can be determined to be left, and the horizontal distance traveled when the current explanation position is updated to the left to the preset position on the right side of the document window is determined as the position change distance.
[0070] In the above scheme, when the document element is an element with horizontal position change, the specific logic of the horizontal position change is similar to the above vertical position change, the only difference is that the position change direction is horizontal and the position change distance is determined by horizontal distance determination.
[0071] Step 202: If the current explanation area corresponds to at least two document elements having a nested relationship, position change information relative to the at least two document elements is determined according to the current explanation position.
[0072] Among them, the nested relationship can be that one element includes another element. The elements of the embodiment of the present disclosure refer to document elements. Two document elements have a nested relationship, which can be that one document element includes another document element. For example, the text includes a table, and the text and the table have a nested relationship.
[0073] Specifically, when the shared end determines the position change information according to the current explanation position, if it is determined that the current explanation area corresponds to at least two document elements in the target document and there is a nested relationship between at least two document elements, for example, the current explanation area corresponds to the main text, table and code block, the main text includes the table, the table includes the code block, and they are nested layer by layer; at this time, the position of at least two document elements needs to be changed, and each document element can be determined from the top layer to the bottom layer in turn according to the current explanation position and the position change direction of the document element to determine in which direction and by how much distance the position change can make the current explanation area displayed in the document window, thereby determining the position change information.
[0074] In some embodiments, determining position change information relative to at least two document elements based on the current explanation position may include: for the main text of the at least two document elements, determining a first position change distance and a first position change direction relative to the main text based on the vertical relative position of the current explanation position and the document window; for the nested elements in the at least two document elements, determining a second position change distance and a second position change direction relative to the nested elements based on the horizontal relative position of the current explanation position and the document window and the horizontal relative position of the nested elements and the document window.
[0075] When the current explanation area corresponds to at least two document elements, the position change information may include the position change distance and position change direction relative to the current explanation area of each document element. For the top-level text of at least two document elements, it is called the first position change distance and the first position change direction; for the nested elements below the top-level of at least two document elements, it is called the second position change distance and the second position change direction. A nested element refers to an element contained in at least two elements, and the position change direction of the nested element is horizontal.
[0076] Specifically, for the main text of at least two document elements, the shared end can determine the first position change distance and the first position change direction when displaying the current explanation area within the document window in accordance with the above-mentioned single vertical document element method, since the position change direction of the main text is vertical. Please refer to the above-mentioned embodiment for details, which will not be repeated here; for the nested elements of at least two document elements, if the number of nested elements is one and the current explanation area is within the document window, the nested element does not need to change its position, and there is no need to determine the corresponding second position change distance and second position change direction. If the current explanation area is outside the document window, the horizontal relative position of the current explanation position and the document window can be determined, and the second position change distance and second position change direction relative to the nested element can be determined based on the horizontal relative position of the current explanation position and the document window, specifically in accordance with the above-mentioned single horizontal document element method. The second position change distance and the second position change direction of the current explanation area driven by the nested element when the current explanation area is displayed in the document window are determined in a file element manner. The specific process is as follows: if the current explanation position is on the left side of the document window, the nested element needs to be changed to the right to display the current explanation area. The second position change direction of the current explanation area can be determined to be right, and the horizontal distance traveled when the current explanation position is updated to the left preset position of the document window is determined as the second position change distance; if the current explanation position is on the right side of the document window, the nested element needs to be changed to the left to display the current explanation area. The second position change direction of the current explanation area can be determined to be left, and the horizontal distance traveled when the current explanation position is changed to the left to the right preset position of the document window is determined as the second position change distance of the current explanation area.
[0077] It is understandable that when at least two document elements include a main text and at least one nested element, the position change information of the main text and the nested element are saved independently and take effect at the same time without affecting each other.
[0078] In some embodiments, when the number of nested elements is at least two, determining a second position change distance and a second position change direction relative to the nested element based on the horizontal relative position of the current explanation position and the document window and the horizontal relative position of the nested element and the document window may include: sorting at least two nested elements in order from the top layer to the bottom layer according to the nesting relationship, and extracting each nested element as an element to be processed according to the sorting result; for the element to be processed, determining the position change distance and the position change direction relative to the element to be processed based on the horizontal relative position of the next nested element of the element to be processed and the document window; until the element to be processed is the last nested element, determining the position change distance and the position change direction relative to the last nested element based on the horizontal relative position of the current explanation position and the document window.
[0079] The element to be processed may be a nested element currently being processed when there are at least two nested elements, and the corresponding position change distance and position change direction are determined for the element to be processed.
[0080] When the shared end determines that at least two document elements include at least two nested elements, that is, there are multiple layers of nesting, it can iteratively process in order from the top layer to the bottom layer according to the nesting relationship until the position change distance and position change direction relative to the current explanation area of each nested element are determined, and the position change distance and position change direction relative to at least two nested elements are combined to determine as the second position change distance and the second position change direction. The specific processing process is as follows: sort at least two nested elements in order from the top layer to the bottom layer according to the nested relationship, extract each nested element as the element to be processed, take the nested element before the last nested element as the element to be processed, and for each element to be processed, take the next nested element as the current explanation area, determine the horizontal relative position of the next nested element and the document window, if the next nested element is outside the document window, determine the position change distance and position change direction of the current explanation area driven by the element to be processed when the next nested element is displayed in the document window in accordance with the above-mentioned single horizontal document element method, the specific process is not repeated here; and for the last nested element, the last nested element includes the current explanation area. If the current explanation area is outside the document window, the position change distance and position change direction relative to the current explanation area of the last nested element can be determined in accordance with the above-mentioned method of only having one nested element, the specific process is not repeated here.
[0081] In the above scheme, if the current explanation area for a nested element is within the document window, the current explanation area can be displayed when the nested element is displayed in the document window, without the need for additional position changes, and without the need to determine the position change distance and position change direction.
[0082] For example, Figure 8 A schematic diagram of another document window of a main sharing terminal provided in an embodiment of the present disclosure, such as Figure 8 As shown in the figure, the document window of the main sharing end corresponding to the current explanation area and three document elements with nested relationship is shown, and the circular area in the document window is the current explanation position, and the rectangular area extended by the circular area is the current explanation area. The three document elements corresponding to the current explanation area include text, table and code block as shown in the figure.
[0083] For example, Fig. 9 A schematic diagram of a shared end text before the position is changed provided by an embodiment of the present disclosure, such as Fig. 9As shown in the figure, a document window 900 of the shared end before the position of the text is changed is shown, and the document window 900 includes a target document 901 displayed according to the document alignment position. Fig. 9 In the example, the current explanation area 902 is outside the document window 900, and the current explanation area 902 is below the document window 900. The text needs to be moved upward to be displayed in the document window 900. After the position change, see Fig.10 .
[0084] For example, Fig.10 A schematic diagram of a shared end text position change provided by an embodiment of the present disclosure, such as Fig.10 As shown, compared to Fig. 9 In the figure, the text of the target document 1001 is updated upward by the first position change distance in the figure so that the current explanation area 1002 is updated vertically to within the document window 1000 of the shared end. The current explanation area 1002 is located at the bottom preset position 100px away from the bottom boundary of the document window 1000. The first position change distance in the figure is Fig. 9 The vertical distance between the current explanation position where the current explanation area 902 is located and the bottom preset position. Fig.10 When the text of the target document 1001 is updated upward, the nested elements included in the text are also updated vertically, but the nested elements have not been updated horizontally. Fig.10 The nested element 1004 is located outside the window area of the document window 1000 and is located on the right side. The nested element 1003 needs to be moved to the left. Fig.11 .
[0085] For example, Fig.11 A schematic diagram of a shared end nested element position change provided by an embodiment of the present disclosure, such as Fig.11 As shown, compared to Fig.10 In the figure, the nested element 1103 in the lower layer of the text in the target document 1101 is updated to the left by the position change distance corresponding to the nested element 1103 in the second position change distance, so that the nested element 1104 in the next layer of the nested element 1103 is horizontally updated to the document window 1100 of the shared end. The position change distance and position change direction of the nested element 1103 are determined to determine the nested element 1104 in the next layer as the current explanation area. Fig.11 When the nested element 1103 changes position to the left, the nested element 1104 included in the nested element 1103 also changes position, but the Fig.11After the position of the nested element 1103 is changed, the current explanation area 1102 is located outside the document window 1100 and on the right side. The nested element 1004 needs to be changed to the left. Fig.12 .
[0086] Fig.12 Another schematic diagram of a shared end nested element position change provided by an embodiment of the present disclosure is as follows: Fig.12 As shown, compared to Fig.11 In the figure, the nested element 1204 in the target document 1201 is updated to the left by the position change distance corresponding to the nested element 1204 in the second position change distance, as shown in the figure, when the position of the nested element 1204 changes, the current explanation area 1202 follows the position change so that the horizontal position of the current explanation area 1202 changes to within the document window 1200 of the shared end. Figure 10-12 The position of the main text and the two nested elements are changed, so that the current explanation area is moved to the document window of the shared end so that the shared users can see it.
[0087] It is understandable that the above Figure 8-Figure 12 The current explanation area in the example is shown to be larger. In the disclosed embodiment, the size of the current explanation area is relatively small, for example, the content of the current explanation area corresponds to only one word, and the position of the current explanation area can be represented by the current explanation position; and when the size of the current explanation area is relatively large, for example, the content of the current explanation area corresponds to a text segment, in the above embodiment, the relative position of the current explanation position and the document window is replaced by the relative position of the external content in the current explanation area and the document window for calculation, and the external content refers to the content in the current explanation area that is outside the document window.
[0088] Step 103: Display the target document based on the document alignment position and position change information, so that the current explanation area is updated and displayed in the document window of the shared end.
[0089] In the disclosed embodiment, after the shared end determines the position change information, since this is the first display of the target document based on the sharing request of the main sharing end, it can determine the alignment position change distance of the target document when it is displayed according to the document alignment position in the document window of the shared end; update the alignment position change distance of the target document and update it according to the position change direction and position change distance in the position change information, so as to display the current explanation area within the document window of the shared end.
[0090] Among them, the alignment position change distance can be the position change distance when the document alignment position is updated to the corresponding position of the document window after the target document is laid out according to the document window of the shared end. For example, assuming that the document alignment position is the first line and the first text displayed in the document window of the main sharing end is at the position of the target document, and the alignment method is top alignment, then the alignment position change distance is the distance when the target document is updated to the content of the document alignment position and the first text of the first line is displayed in the document window; assuming that the document alignment position is the first text or the middle text of the text line where the center line is displayed in the document window of the main sharing end is at the position of the target document, and the alignment method is centerline alignment, then the alignment position change distance is the distance when the target document is updated to display the content of the document alignment position at the first text or the middle text of the text line where the center line is located in the document window.
[0091] When the shared end displays the target document, it first updates the target document by the alignment position change distance according to the document alignment position, that is, changes the position of the target document by the alignment position change distance, such as scrolling upward by the alignment position change distance, and then changes the position according to the position change direction and position change distance in the position change information. The current explanation area follows the above position change, and when the position change stops, the document window of the shared end includes the current explanation area. From the perspective of the shared user, it is displayed in place at one time, and what is directly seen is the target document with the current explanation area.
[0092] Optionally, when the shared end determines that the current explanation area is within the document window, the target document can be directly displayed according to the document alignment position, that is, the position of the target document is changed according to the alignment position change distance, and the current explanation area is displayed in the document window.
[0093] The document sharing solution provided by the embodiment of the present disclosure obtains the document alignment position and the current explanation position of the target document being shared sent by the main sharing end in response to the document sharing operation; if it is determined that the current explanation area is outside the document window of the shared end according to the document alignment position and the current explanation position, the position change information is determined according to the current explanation position; the target document is displayed based on the document alignment position and the position change information, so that the current explanation area is updated and displayed within the document window of the shared end. By adopting the above technical scheme, the shared end can obtain the document alignment position and the current explanation position when the main sharing end is sharing the target document, and judge whether the current explanation area is outside the document window based on the document alignment position and the current explanation position. If so, the position change information is determined according to the current explanation position, and the target document is displayed according to the document alignment position and the position change information so that the current explanation area is displayed within the document window. On the basis of ensuring the excellent display effect of the shared end based on the document sharing mode, the content of the target document displayed in the document window of the shared end is updated through the current explanation position of the main sharing end, ensuring that no matter what the size of the document window of the shared end is, the content being explained triggered by the main sharer can be seen synchronously by the shared person, thereby effectively improving the experience of participants browsing the shared documents.
[0094] In some embodiments, the current explanation area corresponds to only one document element, and the document sharing method may further include: in response to detecting that the explanation position of the target document changes under the operation of the main sharing end, obtaining an updated explanation position and an updated document alignment position; if the position change direction of the document element is vertical and the updated explanation position is located above the document window, determining whether the updated explanation area is displayed within the document window when the target document is displayed according to the updated document alignment position; if so, determining that the position change distance is zero, and displaying the target document according to the updated document alignment position; otherwise, determining the vertical distance between the updated explanation position and the top preset position of the document window as the position change distance and determining that the position change direction is downward, and displaying the target document according to the updated document alignment position, and displaying the target document downward according to the position change distance, so as to display the updated explanation area at the top preset position of the document window.
[0095] The change of the explanation position of the target document under the operation of the main sharing terminal may be caused by the main sharing terminal responding to the main sharing user controlling the mouse or other device to trigger the explanation position change, such as the mouse movement operation of the main sharing user, moving the mouse from the middle of the document window to the top; or the explanation position change caused by the mouse scrolling operation of the main sharing user through the mouse wheel. Updating the explanation position may be the new explanation position sent by the main sharing terminal when the explanation position changes under the operation of the main sharing user. Updating the document alignment position may be the new document alignment position sent by the main sharing terminal when the explanation position changes under the operation of the main sharing user.
[0096] Specifically, after the main sharing end shares the target document with the shared end, if it detects a change in the explanation position, it can send the updated document alignment position and the updated current explanation position to the shared end; the shared end receives the updated explanation position, if the position change direction of the document element corresponding to the updated explanation area is vertical, such as the main text, and the updated explanation position is located above the document window, that is, it moves from the current explanation position to the top of the document window, it can first determine whether the updated explanation area is within the document window when the target document is displayed according to the updated document alignment position. Specifically, the current display content of the target document in the document window can be determined according to the updated document alignment position and the size of the document window. If the currently displayed content includes the content of the updated explanation area, it means that the updated current explanation area can be displayed in the document window Within, the update alignment position change distance at this time is determined according to the update document alignment position, and the target document is updated upward by the alignment position change distance, that is, the target document is changed upward according to the alignment position change distance, so that the current explanation area can be displayed in the document window according to the original alignment logic; otherwise, it means that the update explanation area is displayed outside the document window. At this time, the document element needs to be changed downward, and the position change direction is downward. The vertical distance between the update explanation position and the top preset position of the document window is determined as the position change distance of the update explanation area. After that, the target document is first displayed according to the update document alignment position, and then the target document is updated and displayed downward according to the position change distance of the update explanation area. After the update stops, the update explanation area is displayed at the top preset position of the document window.
[0097] Fig.13 A schematic diagram of a document window of a shared terminal is provided in another embodiment of the present disclosure, such as Fig.13 As shown in the figure, a document window 1300 showing a target document 1301 according to the updated document alignment position is shown. Assuming that the relative Figure 6 For the current explanation area 602, if the target document is displayed according to the updated document alignment position of the top alignment, the updated explanation area 1302 is displayed in the document window 1300. At this time, no additional position change is required, that is, there is no need to determine the position change distance and position change direction of the updated explanation area.
[0098] In the above scheme, when the main sharing end keeps changing the explanation position, for example, when the mouse keeps changing, for document elements such as the main text whose position change direction is vertical, if the explanation area can be displayed according to the existing logic of document alignment, no additional position change is required. Otherwise, additional position change is performed. By adopting the logic of not making additional position changes unless necessary, the problem of rapid change of the explanation position, which causes the need to quickly switch back and forth of documents on the small screen, is effectively avoided. On the basis of ensuring that the content being narrated triggered by the main sharer can be seen synchronously by the sharers, the impact of rapid switching back and forth on the user experience is avoided.
[0099] In some embodiments, the target document is limited to being updated once according to the location change information at a preset interval. The preset time can be the interval time that must exist between two updates of the location change information of the target document. The preset time can be set according to the actual situation. For example, the preset time can be 500ms. After obtaining the location change information, the shared end can first determine whether there is an update within the historical preset time. If so, the location change information is ignored; otherwise, it is updated according to the location change information. By limiting the time interval for the location change or update of the target document, it is prevented that the current explanation location changes too drastically due to frequent changes, thereby ensuring the user's viewing experience of the document.
[0100] Fig.14 This is a schematic diagram of the structure of a document sharing device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Fig.14 As shown, the device comprises:
[0101] The acquisition module 1401 is used to acquire the document alignment position and the current explanation position of the target document being shared sent by the main sharing end in response to the document sharing operation;
[0102] The information module 1402 is used to determine the position change information according to the current explanation position if it is determined according to the document alignment position and the current explanation position that the current explanation area is outside the document window of the shared end;
[0103] The display module 1403 is used to display the target document based on the document alignment position and the position change information, so that the current explanation area is updated and displayed in the document window of the shared end.
[0104] Optionally, the information module 1402 includes a judgment unit, and the judgment unit is used to:
[0105] Determine the current display content of the target document in the document window based on the document alignment position and the size of the document window;
[0106] Extracting the content of the current explanation area in the target document according to the current explanation position;
[0107] If the currently displayed content does not include the content of the current explanation area, it is determined that the current explanation area is outside the document window.
[0108] Optionally, the position change information includes a position change distance and a position change direction, and the information module 1402 includes a determination unit, which includes:
[0109] A first subunit is configured to determine the position change information according to the current explanation position and the position change direction of the document element if the current explanation area corresponds to only one document element;
[0110] The second subunit is configured to determine the position change information relative to the at least two document elements according to the current explanation position if the current explanation area corresponds to at least two document elements having a nested relationship.
[0111] Optionally, the first subunit is used for:
[0112] If the position change direction of the document element is vertical and the current explanation position is below the document window, the vertical distance between the current explanation position and the bottom preset position of the document window is determined as the position change distance, and the position change direction is determined as upward;
[0113] If the position change direction of the document element is vertical and the current explanation position is above the document window, the vertical distance between the current explanation position and the top preset position of the document window is determined as the position change distance, and the position change direction is determined as downward.
[0114] Optionally, a first distance between the bottom preset position and the bottom border of the document window and a second distance between the top preset position and the top border of the document window are smaller than the first margin.
[0115] Optionally, the device further includes an updating module, configured to:
[0116] In response to detecting that the explanation position of the target document changes under the operation of the main sharing end, acquiring an updated explanation position and an updated document alignment position;
[0117] If the position change direction of the document element is vertical and the updated explanation position is located above the document window, determining whether the updated explanation area is displayed within the document window when the target document is displayed according to the updated document alignment position;
[0118] If so, determining that the position change distance is zero, and displaying the target document according to the updated document alignment position;
[0119] Otherwise, the vertical distance between the updated explanation position and the top preset position of the document window is determined as the position change distance and the position change direction is determined to be downward, and the target document is displayed according to the updated document alignment position, and the target document is displayed downward according to the position change distance, so that the updated explanation area is displayed at the top preset position of the document window.
[0120] Optionally, the first subunit is used for:
[0121] If the position change direction of the document element is horizontal and the current explanation position is on the left side of the document window, the horizontal distance between the current explanation position and the preset position on the left side of the document window is determined as the position change distance, and the position change direction is determined to be rightward;
[0122] If the position change direction of the document element is horizontal and the current explanation position is on the right side of the document window, the horizontal distance between the current explanation position and the preset position on the right side of the document window is determined as the position change distance, and the position change direction is determined to be leftward.
[0123] Optionally, a third distance between the left preset position and the left border of the document window and a fourth distance between the right preset position and the right border of the document window are smaller than the second margin.
[0124] Optionally, the second subunit includes:
[0125] A text subunit, for determining, for the texts in the at least two document elements, a first position change distance and a first position change direction relative to the texts based on the longitudinal relative position of the current explanation position and the document window;
[0126] The nesting subunit is used to determine, for a nested element in the at least two document elements, a second position change distance and a second position change direction relative to the nested element based on the horizontal relative position between the current explanation position and the document window and the horizontal relative position between the nested element and the document window.
[0127] Optionally, when the number of the nested elements is at least two, the nested sub-unit is used to:
[0128] Sort at least two nested elements in order from the top layer to the bottom layer according to the nesting relationship, and extract each nested element as an element to be processed according to the sorting result;
[0129] For the element to be processed, based on the horizontal relative position between the next nested element of the element to be processed and the document window, determining a position change distance and a position change direction relative to the element to be processed;
[0130] When the element to be processed is the last nested element, the position change distance and position change direction relative to the last nested element are determined based on the horizontal relative position between the current explanation position and the document window.
[0131] Optionally, the display module 1403 is used to:
[0132] Determine a change distance of an alignment position of the target document when the document window of the shared end is displayed according to the document alignment position;
[0133] The target document is updated with the alignment position change distance and is updated according to the position change direction and the position change distance in the position change information, so as to display the current explanation area in the document window of the shared end.
[0134] Optionally, the current explanation position is within the document window of the main sharing terminal and the current explanation area includes the content of the target document.
[0135] Optionally, the target document restriction is updated once according to the location change information at a preset time interval.
[0136] The document sharing device provided in the embodiments of the present disclosure can execute the document sharing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0137] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which implements the document sharing method provided by any embodiment of the present disclosure when executed by a processor.
[0138] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
[0139] The following specific reference Fig.15 , which shows a schematic diagram of the structure of an electronic device 1500 suitable for implementing the embodiment of the present disclosure. The electronic device 1500 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.15The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0140] like Fig.15 As shown, the electronic device 1500 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1502 or a program loaded from a storage device 1508 into a random access memory (RAM) 1503. In the RAM 1503, various programs and data required for the operation of the electronic device 1500 are also stored. The processing device 1501, the ROM 1502, and the RAM 1503 are connected to each other via a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.
[0141] Typically, the following devices may be connected to the I / O interface 1505: an input device 1506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1509. The communication device 1509 may allow the electronic device 1500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.15 The electronic device 1500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0142] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1509, or installed from a storage device 1508, or installed from a ROM 1502. When the computer program is executed by the processing device 1501, the above-mentioned functions defined in the document sharing method of the embodiment of the present disclosure are executed.
[0143] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0144] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0145] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0146] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to a document sharing operation, obtains the document alignment position and the current explanation position of the target document being shared sent by the main sharing end; if the current explanation area is determined to be outside the document window of the shared end according to the document alignment position and the current explanation position, determines the position change information according to the current explanation position; and displays the target document based on the document alignment position and the position change information, so that the current explanation area is updated and displayed within the document window of the shared end.
[0147] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0148] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0149] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0150] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0151] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0152] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0153] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0154] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0155] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A document sharing method, characterized in that: include: In response to the document sharing operation, obtaining the document alignment position and the current explanation position of the target document being shared sent by the main sharing end; If it is determined according to the document alignment position and the current explanation position that the current explanation area is outside the document window of the shared end, determining position change information according to the current explanation position; The target document is displayed based on the document alignment position and the position change information, so that the current explanation area is updated and displayed within the document window of the shared end.
2. The method according to claim 1, characterized in that Determining that the current explanation area is outside the document window of the shared end according to the document alignment position and the current explanation position includes: Determine the current display content of the target document in the document window based on the document alignment position and the size of the document window; Extracting the content of the current explanation area in the target document according to the current explanation position; If the currently displayed content does not include the content of the current explanation area, it is determined that the current explanation area is outside the document window.
3. The method according to claim 1, characterized in that The position change information includes a position change distance and a position change direction. The position change information is determined according to the current teaching position, including: If the current explanation area corresponds to only one document element, determining the position change information according to the current explanation position and the position change direction of the document element; If the current explanation area corresponds to at least two document elements having a nested relationship, the position change information relative to the at least two document elements is determined according to the current explanation position.
4. The method according to claim 3, characterized in that Determining the position change information according to the current explanation position and the position change direction of the document element includes: If the position change direction of the document element is vertical and the current explanation position is below the document window, the vertical distance between the current explanation position and the bottom preset position of the document window is determined as the position change distance, and the position change direction is determined as upward; If the position change direction of the document element is vertical and the current explanation position is above the document window, the vertical distance between the current explanation position and the top preset position of the document window is determined as the position change distance, and the position change direction is determined as downward.
5. The method according to claim 4, characterized in that A first distance between the bottom preset position and the bottom border of the document window and a second distance between the top preset position and the top border of the document window are smaller than the first margin.
6. The method according to claim 4, characterized in that The method further comprises: In response to detecting that the explanation position of the target document changes under the operation of the main sharing end, acquiring an updated explanation position and an updated document alignment position; If the position change direction of the document element is vertical and the updated explanation position is located above the document window, determining whether the updated explanation area is displayed within the document window when the target document is displayed according to the updated document alignment position; If so, determining that the position change distance is zero, and displaying the target document according to the updated document alignment position; Otherwise, the vertical distance between the updated explanation position and the top preset position of the document window is determined as the position change distance and the position change direction is determined to be downward, and the target document is displayed according to the updated document alignment position, and the target document is displayed downward according to the position change distance, so that the updated explanation area is displayed at the top preset position of the document window.
7. The method according to claim 3, characterized in that Determining the position change information according to the current explanation position and the position change direction of the document element includes: If the position change direction of the document element is horizontal and the current explanation position is on the left side of the document window, the horizontal distance between the current explanation position and the preset position on the left side of the document window is determined as the position change distance, and the position change direction is determined to be rightward; If the position change direction of the document element is horizontal and the current explanation position is on the right side of the document window, the horizontal distance between the current explanation position and the preset position on the right side of the document window is determined as the position change distance, and the position change direction is determined to be leftward.
8. The method according to claim 7, characterized in that: A third distance between the left preset position and the left border of the document window and a fourth distance between the right preset position and the right border of the document window are smaller than the second margin.
9. The method according to claim 3, characterized in that: Determining the position change information relative to the at least two document elements according to the current explanation position includes: For the main texts in the at least two document elements, determining a first position change distance and a first position change direction relative to the main texts based on the longitudinal relative position between the current explanation position and the document window; For the nested elements in the at least two document elements, based on the horizontal relative position between the current explanation position and the document window and the horizontal relative position between the nested element and the document window, a second position change distance and a second position change direction relative to the nested element are determined.
10. The method according to claim 9, characterized in that When the number of the nested elements is at least two, determining a second position change distance and a second position change direction relative to the nested element based on the horizontal relative position between the current presentation position and the document window and the horizontal relative position between the nested element and the document window, including: Sort at least two nested elements in order from the top layer to the bottom layer according to the nesting relationship, and extract each nested element as an element to be processed according to the sorting result; For the element to be processed, based on the horizontal relative position between the next nested element of the element to be processed and the document window, determining a position change distance and a position change direction relative to the element to be processed; When the element to be processed is the last nested element, the position change distance and position change direction relative to the last nested element are determined based on the horizontal relative position between the current explanation position and the document window.
11. The method according to claim 1, characterized in that The target document is displayed based on the document alignment position and the position change information, so that the current explanation area is updated and displayed in the document window of the shared end, including: Determine a change distance of an alignment position of the target document when the document window of the shared end is displayed according to the document alignment position; The target document is updated with the alignment position change distance and is updated according to the position change direction and the position change distance in the position change information, so as to display the current explanation area in the document window of the shared end.
12. The method according to claim 1, characterized in that The current explanation position is within the document window of the main sharing terminal and the current explanation area includes the content of the target document.
13. The method according to claim 1, characterized in that The target document restriction is updated once according to the location change information at every preset time interval.
14. A document sharing device, characterized in that: include: An acquisition module, used for acquiring, in response to a document sharing operation, a document alignment position and a current explanation position of a target document being shared, sent by a main sharing end; an information module, for determining position change information according to the current explanation position if it is determined according to the document alignment position and the current explanation position that the current explanation area is outside the document window of the shared end; The display module is used to display the target document based on the document alignment position and the position change information, so that the current explanation area is updated and displayed in the document window of the shared end.
15. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the document sharing method described in any one of claims 1-13 above.
16. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the document sharing method described in any one of claims 1 to 13.