Document sharing method and device
By receiving sharing instructions and transmitting location information at the user terminal, the resource consumption problem of synchronous document viewing in remote discussions is solved, and efficient multi-user document synchronous display is achieved.
Patent Information
- Application Number
- CN201910661573.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-22
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-07-22
AI Technical Summary
In scenarios where multiple users discuss document content in remote locations, the existing technology requires the use of video recording and live broadcast to achieve synchronous viewing of documents, resulting in excessive consumption of memory and network resources and making it difficult to be widely used.
By receiving the user's sharing instructions, it obtains and transmits the user's location information in the document, generates a sharing request, and the server sends the location information to other terminals so that they can locate the document and realize synchronous display of multiple users.
It reduces the usage of memory and network resources and improves the efficiency of multiple users viewing documents simultaneously.
Smart Images

Figure CN112256654B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network application technology, and in particular to a document sharing method and device. Background Art
[0002] In some scenarios, multiple users need to view the same document at the same time. For example, in a scenario where multiple users discuss document content remotely, the current speaking user will explain a certain part of the document. At this time, all users participating in the discussion need to view the same location of the document at the same time.
[0003] Currently, in scenarios where multiple users discuss document content remotely, they usually need to use other communication software to have the current speaking user record and live stream the interface of the document he or she is explaining, and other users receive the live stream of the first user, thereby enabling multiple users to view the same location of the document at the same time.
[0004] However, the above method consumes a lot of memory and network resources and is difficult to be widely used. Summary of the invention
[0005] The purpose of the embodiment of the present invention is to provide a document sharing method and device to achieve synchronous display of documents to multiple users. The specific technical solution is as follows:
[0006] An embodiment of the present invention provides a document sharing method, which is applied to a first terminal, and the method includes:
[0007] Receiving a sharing instruction for a target document sent by a first user;
[0008] According to the sharing instruction, acquiring location information of the first user, where the location information is used to indicate a location of the first user in the target document;
[0009] generating a sharing request for the target document, wherein the sharing request carries the location information;
[0010] The sharing request is sent to a server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0011] Optionally, acquiring the location information of the first user according to the sharing instruction includes:
[0012] According to the sharing instruction, acquiring cursor information of the first user;
[0013] Based on the cursor information, determine the location information of the first user, wherein the location information includes one or more of the following: the page number where the first user is located, the position of the first user's cursor in the target document, the position of the first user's cursor on the first terminal screen, and the cell where the first user is located.
[0014] Optionally, when the cursor information of the first user is not obtained, the method further includes:
[0015] The content currently displayed by the first terminal is identified to obtain a content identifier of the currently displayed content as the location information of the first user.
[0016] Optionally, after sending the sharing request to the server, the method further includes:
[0017] Monitoring the location of the first user in the target document;
[0018] If the position of the first user in the target document changes, the updated position information of the first user is obtained, and the updated position information is sent to the server, so that the server sends the updated position information to the second terminal, and the second terminal locates the target document according to the updated position information.
[0019] Optionally, after sending the sharing request to the server, the method further includes:
[0020] Receiving a sharing end instruction for the target document sent by the first user;
[0021] Generate a sharing end request for the target document according to the sharing end instruction;
[0022] The sharing end request is sent to a server, so that the server sends the sharing end request to the second terminal, and the second terminal ends displaying the target document.
[0023] Optionally, sending the sharing request to a server so that the server sends the location information to a second terminal, and the second terminal locates the target document according to the location information, includes:
[0024] The sharing request and the target document are sent to a server, so that the server sends the target document and the location information to a second terminal, and the second terminal locates the target document according to the location information.
[0025] An embodiment of the present invention further provides a document sharing device, which is applied to a first terminal, and the device includes:
[0026] A receiving module, configured to receive a sharing instruction for a target document sent by a first user;
[0027] an acquisition module, used for acquiring the location information of the first user according to the sharing instruction, wherein the location information is used for indicating the location of the first user in the target document;
[0028] A generating module, configured to generate a sharing request for the target document, wherein the sharing request carries the location information;
[0029] The sending module is used to send the sharing request to the server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0030] Optionally, the acquisition module is specifically used to:
[0031] According to the sharing instruction, acquiring cursor information of the first user;
[0032] Based on the cursor information, determine the location information of the first user, wherein the location information includes one or more of the following: the page number where the first user is located, the position of the first user's cursor in the target document, the position of the first user's cursor on the first terminal screen, and the cell where the first user is located.
[0033] Optionally, the acquisition module is further used to:
[0034] In the case where the cursor information of the first user is not obtained, the content currently displayed by the first terminal is identified to obtain a content identifier of the currently displayed content as the location information of the first user.
[0035] Optionally, the device further comprises:
[0036] A monitoring module is used to monitor the position of the first user in the target document; if the position of the first user in the target document changes, the updated position information of the first user is obtained, and the updated position information is sent to the server, so that the server sends the updated position information to the second terminal, and the second terminal locates the target document according to the updated position information.
[0037] Optionally, the receiving module is further used to receive a sharing end instruction for the target document sent by the first user;
[0038] The generating module is further configured to generate a sharing end request for the target document according to the sharing end instruction;
[0039] The sending module is further configured to send the sharing end request to the server, so that the server sends the sharing end request to the second terminal, and the second terminal ends displaying the target document.
[0040] Optionally, the sending module is further used to:
[0041] The sharing request and the target document are sent to a server, so that the server sends the target document and the location information to a second terminal, and the second terminal locates the target document according to the location information.
[0042] An embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0043] Memory, used to store computer programs;
[0044] The processor is used to implement any of the above-mentioned document sharing methods when executing the program stored in the memory.
[0045] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned document sharing methods is implemented.
[0046] The document sharing method and device provided by the embodiment of the present invention first receives a sharing instruction for a target document sent by a first user, then obtains the location information of the first user according to the sharing instruction, and the location information is used to indicate the location of the first user in the target document, and then generates a sharing request for the target document, and the sharing request carries the location information, and sends the sharing request to the server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information. In this way, it is possible to display documents to multiple users simultaneously, reducing the occupation of memory and network resources. Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A flowchart of a document sharing method provided by an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of the structure of a document sharing device provided by an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] At present, in the scenario where multiple users discuss document content remotely, they usually need to use other communication software, and the user who is currently speaking records and broadcasts the interface of the document he is explaining, and other users receive the live video of the first user, so that multiple users can view the same location of the document at the same time. However, the above method consumes a lot of memory and network resources, and is difficult to be widely used.
[0053] In order to solve the above technical problem, the present invention provides a document sharing method, which can be applied to a first terminal, wherein the first terminal can be a computer, a mobile terminal, a client, etc., without specific limitation.
[0054] The document sharing method provided by the embodiment of the present invention is generally described below. The document sharing method includes:
[0055] Receiving a sharing instruction for a target document sent by a first user;
[0056] According to the sharing instruction, obtaining the location information of the first user, where the location information is used to indicate the location of the first user in the target document;
[0057] Generate a sharing request for the target document, where the sharing request carries location information;
[0058] The sharing request is sent to the server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0059] As can be seen from the above, the document sharing method provided in the embodiment of the present invention can send the current position of the first user in the target document according to the location information in the sharing request, thereby realizing the synchronous display of documents to multiple users and reducing the occupation of memory and network resources.
[0060] The document sharing method provided by the embodiment of the present invention is described in detail below through specific embodiments.
[0061] like Figure 1 FIG. 1 is a flow chart of a first document sharing method provided by an embodiment of the present invention, comprising the following steps:
[0062] S101: receiving a sharing instruction for a target document sent by a first user.
[0063] When the first user needs to share the target document, a sharing instruction for the target document may be sent. For example, the first user may click a document sharing button to send the sharing instruction for the target document.
[0064] S102: Acquire location information of the first user according to the sharing instruction, where the location information is used to indicate the location of the first user in the target document.
[0065] In one implementation, the server may obtain the cursor information of the first user, and then determine the position information of the first user according to the cursor information. The position information of the first user may include one or more of the following: the page number of the first user, the position of the cursor of the first user in the target document, the position of the cursor of the first user on the first terminal screen, the cell of the first user, etc. The position of the cursor may be determined according to the text and object information before and after the cursor.
[0066] It can be understood that in some cases, the first user does not select the target document, that is, there is no cursor information of the first user in the target document.
[0067] Then, in one implementation, when the cursor information of the first user is not obtained, the server can identify the current display content of the first terminal corresponding to the first user, and obtain the content identifier of the current display content as the location information. For example, the content identifier can be a picture number, paragraph number, etc. in the target document. In this way, when the first user locates, the target document can share the current location of the first user according to the picture number, paragraph number, etc.
[0068] Alternatively, in another implementation, without obtaining the cursor information of the first user, the server may directly obtain the current display content of the first terminal corresponding to the first user, match the content in the target document, and locate the target document according to the similarity.
[0069] S103: Generate a sharing request for the target document, where the sharing request carries location information.
[0070] After obtaining the location information, the first terminal may generate a sharing request for the target document, and the sharing request may carry the location information. That is, according to the sharing request, the location of the first user in the target document may be determined.
[0071] S104: Sending a sharing request to the server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0072] After receiving the sharing request sent by the first terminal, the server may directly send the location information carried in the sharing request to the second terminal.
[0073] Alternatively, the server may also determine whether the current sharing conditions are met after receiving the sharing request sent by the first terminal. For example, based on the current network connection status between the second terminal, the first terminal and the server, sharing between the second terminal and the first terminal is allowed only when the network connection speed is higher than a preset speed. Alternatively, an inquiry message may be sent to the second terminal first, and only after the second terminal replies with an instruction to confirm sharing, the location information carried in the sharing request is sent to the second terminal to achieve sharing between the second terminal and the first terminal.
[0074] After receiving the location information, the second terminal can locate the target document according to the location information, that is, jump the page of the target document currently displayed on the second terminal to the same page as the page of the target document currently displayed on the first terminal.
[0075] For example, the second terminal can open the target document in advance through communication with the first terminal. In this way, the server only needs to send the location information to the second terminal, and the second terminal can locate the target document according to the location information.
[0076] Alternatively, in another implementation, if the second terminal cannot communicate with the first terminal, or the second terminal does not store the target document locally, then the first terminal can send the target document to the server at the same time as sending the sharing request to the server, and the server can send the target document and location information to the second terminal, so that the second terminal can locate the target document according to the location information. In this way, the target documents opened by the first terminal and the second terminal can be the same, further improving the synchronization rate of sharing.
[0077] It is understandable that the position of the first user in the target document may change. Thus, in one implementation, after sending the sharing request to the server, the first terminal may monitor the position of the first user in the target document. If the position of the first user in the target document changes, the first user's updated position information is obtained and sent to the server, so that the server sends the updated position information to the second terminal, and the second terminal locates the target document according to the updated position information. This further enables multiple users to display documents synchronously.
[0078] In one implementation, after sending the sharing request to the server, the first terminal may also receive a sharing end instruction for the target document sent by the first user, and generate a sharing end request for the target document according to the sharing end instruction. Then, the first terminal may send the sharing end request to the server, so that the server sends the sharing end request to the second terminal, and the second terminal ends displaying the target document.
[0079] As can be seen from the above, the document sharing method provided in the embodiment of the present invention can send the current position of the first user in the target document according to the location information in the sharing request, thereby realizing the synchronous display of documents to multiple users and reducing the occupation of memory and network resources.
[0080] like Figure 2 As shown, an embodiment of the present invention further provides a document sharing device, which is applied to a first terminal, and the device includes:
[0081] The receiving module 210 is used to receive a sharing instruction for a target document sent by a first user;
[0082] An acquisition module 220, configured to acquire location information of the first user according to the sharing instruction, where the location information is used to indicate the location of the first user in the target document;
[0083] A generating module 230, configured to generate a sharing request for a target document, wherein the sharing request carries location information;
[0084] The sending module 240 is used to send the sharing request to the server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0085] In one implementation, the acquisition module 220 is specifically configured to:
[0086] According to the sharing instruction, obtaining cursor information of the first user;
[0087] Determine the location information of the first user based on the cursor information, wherein the location information includes one or more of the following: the page number where the first user is located, the location of the first user's cursor in the target document, the location of the first user's cursor on the first terminal screen, and the cell where the first user is located.
[0088] In one implementation, the acquisition module 220 is further configured to:
[0089] In the case where the cursor information of the first user is not obtained, the content currently displayed by the first terminal is identified to obtain a content identifier of the currently displayed content as the position information of the first user.
[0090] In one implementation, the device further includes:
[0091] A monitoring module (not shown in the figure) is used to monitor the position of the first user in the target document; if the position of the first user in the target document changes, the updated position information of the first user is obtained, and the updated position information is sent to the server, so that the server sends the updated position information to the second terminal, and the second terminal locates the target document according to the updated position information.
[0092] In one implementation, the receiving module 210 is further configured to receive a sharing end instruction for the target document sent by the first user;
[0093] The generating module 230 is further used to generate a sharing end request for the target document according to the sharing end instruction;
[0094] The sending module 240 is further configured to send a sharing end request to the server, so that the server sends the sharing end request to the second terminal, and the second terminal ends displaying the target document.
[0095] In one implementation, the sending module 240 is further configured to:
[0096] The sharing request and the target document are sent to the server, so that the server sends the target document and the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0097] As can be seen from the above, the document sharing device provided in the embodiment of the present invention can send the current position of the first user in the target document according to the position information in the sharing request, thereby realizing the synchronous display of documents to multiple users and reducing the occupation of memory and network resources.
[0098] The embodiment of the present invention further provides an electronic device, such as Figure 3 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.
[0099] Memory 303, used for storing computer programs;
[0100] The processor 301 is used to execute the program stored in the memory 303 to implement the following steps:
[0101] Receiving a sharing instruction for a target document sent by a first user;
[0102] According to the sharing instruction, obtaining the location information of the first user, where the location information is used to indicate the location of the first user in the target document;
[0103] Generate a sharing request for the target document, where the sharing request carries location information;
[0104] The sharing request is sent to the server, so that the server sends the location information to the second terminal, and the second terminal locates the target document according to the location information.
[0105] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0106] The communication interface is used for communication between the above electronic device and other devices.
[0107] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0108] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0109] As can be seen from the above, the electronic device provided by the embodiment of the present invention can send the current position of the first user in the target document according to the location information in the sharing request, thereby realizing the synchronous display of documents to multiple users and reducing the occupation of memory and network resources.
[0110] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the document sharing method described in any one of the above embodiments.
[0111] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes the document sharing method described in any one of the above embodiments.
[0112] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital terminal line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0113] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0114] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, electronic device embodiment and storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A document sharing method, It is characterized in that Applied to a first terminal, the method includes: Receiving a sharing instruction for a target document sent by a first user; According to the sharing instruction, acquiring location information of the first user, where the location information is used to indicate a location of the first user in the target document; generating a sharing request for the target document, wherein the sharing request carries the location information; Sending the sharing request to a server, so that the server sends the location information to the second terminal, and the second terminal jumps the current display page of the target document pre-opened on the second terminal to the same as the current display page of the target document on the first terminal according to the location information; After sending the sharing request to the server, the method further includes: Monitoring the location of the first user in the target document; If the position of the first user in the target document changes, the updated position information of the first user is obtained, and the updated position information is sent to the server, so that the server sends the updated position information to the second terminal, and the second terminal locates the target document according to the updated position information.
2. The method according to claim 1, It is characterized in that The acquiring the location information of the first user according to the sharing instruction includes: According to the sharing instruction, acquiring cursor information of the first user; Based on the cursor information, determine the location information of the first user, wherein the location information includes one or more of the following: the page number where the first user is located, the position of the first user's cursor in the target document, the position of the first user's cursor on the first terminal screen, and the cell where the first user is located.
3. The method according to claim 2, It is characterized in that In the case where the cursor information of the first user is not obtained, the method further includes: The content currently displayed by the first terminal is identified to obtain a content identifier of the currently displayed content as the location information of the first user.
4. The method according to claim 1, It is characterized in that After sending the sharing request to the server, the method further includes: Receiving a sharing end instruction for the target document sent by the first user; Generate a sharing end request for the target document according to the sharing end instruction; The sharing end request is sent to a server, so that the server sends the sharing end request to the second terminal, and the second terminal ends displaying the target document.
5. A document sharing device, It is characterized in that Applied to a first terminal, the device includes: A receiving module, configured to receive a sharing instruction for a target document sent by a first user; an acquisition module, used for acquiring the location information of the first user according to the sharing instruction, wherein the location information is used for indicating the location of the first user in the target document; A generating module, configured to generate a sharing request for the target document, wherein the sharing request carries the location information; a sending module, configured to send the sharing request to a server, so that the server sends the location information to a second terminal, and enables the second terminal to jump a current display page of the target document pre-opened on the second terminal to be consistent with the current display page of the target document on the first terminal according to the location information; The device also includes: A monitoring module is used to monitor the position of the first user in the target document; if the position of the first user in the target document changes, the updated position information of the first user is obtained, and the updated position information is sent to the server, so that the server sends the updated position information to the second terminal, and the second terminal locates the target document according to the updated position information.
6. The device according to claim 5, It is characterized in that The acquisition module is specifically used for: According to the sharing instruction, acquiring cursor information of the first user; Based on the cursor information, determine the location information of the first user, wherein the location information includes one or more of the following: the page number where the first user is located, the position of the first user's cursor in the target document, the position of the first user's cursor on the first terminal screen, and the cell where the first user is located.
7. The device according to claim 6, It is characterized in that The acquisition module is further used for: In the case where the cursor information of the first user is not obtained, the content currently displayed by the first terminal is identified to obtain a content identifier of the currently displayed content as the location information of the first user.
8. The device according to claim 5, It is characterized in that The receiving module is further configured to receive a sharing end instruction for the target document sent by the first user; The generating module is further configured to generate a sharing end request for the target document according to the sharing end instruction; The sending module is further configured to send the sharing end request to the server, so that the server sends the sharing end request to the second terminal, and the second terminal ends displaying the target document.
9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 4 when executing a program stored in a memory.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.
