Document display method, device, electronic device and storage medium
By downloading the target document data in the online classroom and updating the document page when receiving editing instructions, the traffic loss and buffering problems are solved, and the teaching effect is improved.
Patent Information
- Application Number
- CN202010690937.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2040-07-17
AI Technical Summary
In online classrooms, the existing technology leads to large traffic loss and multiple buffering problems, affecting the teaching effect.
By downloading the target document data and displaying the document page, the document page is updated when receiving editing instructions from the sharing device, reducing traffic loss and avoiding buffering, and real-time network transmission is used to restore the screen without distortion.
It achieves reducing traffic loss, avoiding multiple buffering, and improving the clarity and teaching effect of document display.
Smart Images

Figure CN111723558B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a document display method, device, electronic equipment and storage medium. Background Art
[0002] With the development of Internet technology, a network architecture that can achieve direct communication between people, people and machines, people and things, and even things and things, ubiquitous network, has gradually formed and is widely used in various fields such as education. The concept of online classroom has been proposed, and various online classroom applications for transmitting the content taught by teachers to students through the network have gradually appeared.
[0003] When teachers teach online, they can collect video streams through the camera of the terminal device, and then transmit them over the network to achieve live teaching. However, this method will cause a large loss of traffic and is prone to multiple buffering. Summary of the invention
[0004] The present application provides a document display method, device, electronic device and storage medium, which can reduce traffic loss and avoid multiple buffering.
[0005] This application provides a document display method, including:
[0006] Downloading document data corresponding to the target document and displaying a document page corresponding to the document data;
[0007] During the live broadcast of the target document, when an editing instruction of the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the target document by the sharing device.
[0008] Accordingly, the present application also provides a document display device, comprising:
[0009] A download module, used to download document data corresponding to a target document and display a document page corresponding to the document data;
[0010] The display module is used to update the document page based on the editing instruction when receiving the editing instruction of the target document from the sharing device during the process of live broadcasting of the target document by the sharing device, so as to display the editing result of the target document by the sharing device.
[0011] Optionally, in some embodiments of the present application, the display module includes:
[0012] The parsing submodule is used to parse the editing instruction for the target document when receiving the editing instruction for the target document from the sharing device through the signaling transmission channel during the process of the sharing device broadcasting the target document live;
[0013] The display submodule is used to update the document page based on the parsing result to display the editing result of the sharing device on the target document.
[0014] Optionally, in some embodiments of the present application, the display submodule includes:
[0015] An extraction unit, used to extract the editing type and operation information of the editing instruction from the parsing result;
[0016] A display unit is used to update the document page based on the editing type and operation information to display the editing result of the sharing device on the target document.
[0017] Optionally, in some embodiments of the present application, the display unit includes:
[0018] A detection unit, used to detect whether the editing type is a page switching type;
[0019] A first determining unit, configured to determine, when the editing type is a page switching type, a touch point corresponding to an editing instruction of the sharing device for the target document according to the operation information;
[0020] A first display unit, configured to update the document page based on the touch point to display the editing result of the sharing device on the target document;
[0021] A second determining unit, configured to determine, when the editing type is not a page switching type, a set of editing points corresponding to the editing instruction of the sharing device for the target document according to the operation information;
[0022] The second display unit is used to update the document page based on the editing point set to display the editing result of the sharing device on the target document.
[0023] Optionally, in some embodiments of the present application, the first display unit is specifically used for:
[0024] Determine the area in the document page corresponding to the touch point to obtain a touch area;
[0025] Calling a page switching control corresponding to the touch area;
[0026] The document page is updated based on the called page switching control to display the editing result of the sharing device on the target document.
[0027] Optionally, in some embodiments of the present application, the second display unit includes:
[0028] A construction subunit, configured to construct an editing track corresponding to the editing instruction of the sharing device for the target document based on the editing point set;
[0029] The display subunit is used to display the editing track in the document page to display the editing result of the sharing device on the target document.
[0030] Optionally, in some embodiments of the present application, the display subunit is specifically used for:
[0031] Obtain the position information of each edit point in the edit point set in the sharing device interface to obtain the first position information of each edit point
[0032] Based on the size of the current device, the size of the sharing device, and the first position information of each editing point, determining the position information of each editing point in the document editing page, and obtaining the second position information of each editing point;
[0033] Based on the second position information of each editing point and the editing point set, an editing track corresponding to the editing instruction of the sharing device for the target document is constructed.
[0034] Optionally, in some embodiments of the present application, the parsing module is specifically used to:
[0035] When receiving an editing instruction for the target document from the sharing device through the signaling transmission channel during the live broadcast of the target document, extracting a timestamp and an instruction identifier of the editing instruction;
[0036] The editing instruction is parsed based on the timestamp and the instruction identifier of the editing instruction.
[0037] Optionally, in some embodiments of the present application, the download module is specifically used to:
[0038] Downloading the document data corresponding to the target document from the server through the data transmission channel;
[0039] When the downloading is completed, the transmission of the document data between the data transmission channel is cut off, and the document page corresponding to the target document is displayed according to the downloaded document data.
[0040] Optionally, in some embodiments of the present application, a detection module is further included, and the detection module is specifically used to:
[0041] Check the data integrity of the downloaded document data;
[0042] When the detection result indicates that the downloaded document data is missing, the transmission of the document data between the data transmission channel is resumed.
[0043] The present application first downloads the document data corresponding to the target document, and displays the document page corresponding to the document data. During the live broadcast of the target document, when the editing instruction of the sharing device for the target document is received, the document page is updated based on the editing instruction to display the editing result of the sharing device for the target document. Therefore, the scheme can improve and reduce traffic loss, and multiple buffering will not occur. In addition, because the sharing device will compress the target document before uploading it to the server, when the document is displayed using real-time network transmission, the picture quality will be distorted due to image compression transmission, and the clarity will be reduced. In the scheme of the present application, by receiving the editing instruction of the sharing device for the target document, and then updating the document page based on the received instruction, the picture in the sharing device can be restored without distortion, thereby improving the display effect of the document display. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1a It is a scenario diagram of the document display method provided by this application;
[0046] Figure 1b It is a flowchart of the document display method provided by this application;
[0047] Figure 1c It is a schematic diagram of updating a document page in the document display method provided by this application;
[0048] Figure 1d is another schematic diagram of updating a document page in the document display method provided by the present application;
[0049] Figure 2a is another flow chart of the document display method provided by the present application;
[0050] Figure 2b is a flow chart of the document display system provided by this application;
[0051] Figure 2c is another scenario schematic diagram of the document display method provided by this application;
[0052] Figure 3a It is a structural schematic diagram of the document display device provided by this application;
[0053] Figure 3b It is a structural schematic diagram of the document display device provided by this application;
[0054] Figure 4 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0056] The present application provides a document display method, device, electronic device and storage medium.
[0057] The document display device can be specifically integrated in a server, which can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0058] For example, see Figure 1aThe present application provides a document display system, which includes a sharing device 10, a shared device 20 and a server 30. The document display device is integrated on the shared device 20. When user A shares a target document to user B of the shared device 20 through the sharing device 10, the shared device 20 can download the document data corresponding to the target document from the server 30 through a data transmission channel. That is, when the sharing device 10 is broadcasting the target document live, the shared device 20 can download the document data corresponding to the target document from the server 30 through the data transmission channel. When the shared device 20 detects that the download is completed, it cuts off the transmission of the document data between the data transmission channel and The document page corresponding to the target document is displayed based on the downloaded document data. If user A triggers an editing operation on the target document through the sharing device 10, the sharing device 10 can generate corresponding editing instructions based on the editing operation triggered by user A on the target document, and upload the generated editing instructions to the server 30, so that the server 30 sends the generated editing instructions to the shared device 20 through the signaling transmission channel. That is, when the shared device 20 receives the editing instructions for the target document from the sharing device 10 through the signaling transmission channel, it parses the editing instructions. Finally, the shared device 20 updates the document page based on the parsing result to display the editing result of the sharing device on the target document.
[0059] The document display method provided by the present application downloads the document data corresponding to the target document from the server, and when the download completion is detected, the transmission of the document data between the data transmission channel is cut off, thereby reducing the traffic loss and preventing multiple buffering. At the same time, the connection with the signaling transmission channel is maintained to ensure that the editing results of the sharing device for the target document can be displayed during the live broadcast of the target document.
[0060] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.
[0061] A document display method includes: downloading document data corresponding to a target document and displaying a document page corresponding to the document data; during a process of a sharing device broadcasting a target document live, when an editing instruction for the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the sharing device for the target document.
[0062] See also Figure 1b , Figure 1b A flowchart of the document display method provided in this application. The specific process of the document display method can be as follows:
[0063] 101. Download document data corresponding to a target document, and display a document page corresponding to the document data.
[0064] For example, specifically, a wired or wireless communication method can be used to directly or indirectly connect to the server through a data transmission channel. It should be noted that in the present application, the data transmission channel can only transmit document data corresponding to the target document. The present application does not limit the number and type of data transmission channels. The number of data transmission channels can be determined based on the number of communication channels that can be supported between the server, for example, it can include any number of WiFi channels, third generation mobile communication technology (the 3rd Generation mobile communication technology, 3G) channels, 4G channels, fifth generation mobile communication technology (the 5th Generation mobile communication technology, 5G) channels, Bluetooth channels and wired channels.
[0065] For example, after the sharing device uploads the document data of the target document to the server, or when the server already stores the document data of the target document, the document data corresponding to the target document can be downloaded from the server through the data transmission channel. In order to increase the transmission rate, the sharing device can compress the target document. Therefore, during the download process, the document data can be decompressed and verified. When the download is completed, the transmission of the document data between the data transmission channel is cut off, and the document page corresponding to the target document is displayed based on the downloaded document data. It should be noted that in the live broadcast scenario, the document data can be downloaded during the live broadcast or downloaded in advance (i.e. before the live broadcast). For example, students download the courseware (document data) uploaded by the teacher before taking online classes.
[0066] When the download is completed, the document page corresponding to the target document can be displayed based on the downloaded document data. At this time, the transmission of the document data between the data transmission channel is cut off, that is, the optional step of "downloading the document data corresponding to the target document and displaying the document page corresponding to the document data" can specifically include: downloading the document data corresponding to the target document from the server through the data transmission channel, and when the download is detected to be complete, cutting off the transmission of the document data between the data transmission channel, and displaying the document page corresponding to the target document based on the downloaded document data.
[0067] In addition, for some scenarios, when the transmission of document data between the data transmission channel is cut off, the transmission between the audio data channel can be maintained, so that the audio stream data can be obtained in real time to ensure sound transmission. For example, in the scenario of live teaching, when it is detected that the document data download is completed, the transmission of document data between the data transmission channel can be cut off. At this time, the transmission with the audio data channel is retained to obtain the voice of the user corresponding to the sharing device in real time, thereby ensuring the teaching quality of live teaching.
[0068] It should be noted that after the document data is downloaded, due to the compatibility of different devices or abnormal loading of the target document, the downloaded document data may be incomplete. When the downloaded document data is incomplete, a downgrade operation may be performed, that is, the communication with the data transmission channel is restored. In other words, in some embodiments, the following may be specifically included:
[0069] (11) Checking the data integrity of the downloaded document data;
[0070] (12) When the detection result indicates that the downloaded document data is missing, the transmission of the document data between the data transmission channel is resumed.
[0071] 102. During the process of the sharing device broadcasting the target document live, when an editing instruction for the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the sharing device for the target document.
[0072] The editing instruction can be parsed, and the document page can be updated based on the parsing result to display the editing result of the target document by the sharing device. That is, optionally, in some embodiments, the step of "in the process of the sharing device broadcasting the target document live, when the sharing device receives the editing instruction for the target document, the document page is updated based on the editing instruction to display the editing result of the target document by the sharing device" can specifically include: in the process of the sharing device broadcasting the target document live, when the sharing device receives the editing instruction for the target document through the signaling transmission channel, the editing instruction is parsed, and the document page is updated based on the parsing result to display the editing result of the target document by the sharing device.
[0073] For example, in a teaching scenario, the sharing device can collect the editing operations performed by the teaching user on the target document. Then, the sharing device creates a signaling transmission channel with the server, and then transmits the editing operations to the server through the signaling transmission channel. All editing operations of the teaching user are converted into editing instructions, where the types of editing instructions may include: open, close, turn pages, open brush and stylus coordinates, etc. Each editing instruction will be accompanied by a timestamp and a serial number for sorting verification and packet loss verification. The step "When the sharing device receives the editing instructions for the target document through the signaling transmission channel during the live broadcast of the target document, the editing instructions are parsed" may specifically include:
[0074] (21) When an editing instruction for the target document is received from the sharing device through the signaling transmission channel during the live broadcast of the target document, the timestamp and instruction identifier of the editing instruction are extracted;
[0075] (22) Parse the editing instruction based on the timestamp and instruction identifier of the editing instruction.
[0076] Among them, the timestamp and instruction identifier of the editing instruction are used for the correction of audio and video synchronization, as well as the pulling, timeout retransmission and packet loss re-pulling of the editing instruction. It is ensured that the sharing device can synchronously display each editing operation of the target document. For example, when receiving editing instructions A and editing instructions B, the timestamp of editing instruction A is 20:00, the instruction identifier of editing instruction A is 3012, and the timestamp of editing instruction B is 20:02, and the instruction identifier of editing instruction B is 3015. It can be seen that there are two editing instructions between editing instruction A and editing instruction B, and their corresponding identifiers are 3013 and 3014 respectively. At this time, it is necessary to pull the editing instructions from the server again so that the identifiers of the pulled editing instructions are continuous, so as to display the editing results of the sharing device for the target document.
[0077] Further, parameters corresponding to the editing operation, such as the editing type and operation information, may be extracted from the parsing result, and then the document page may be updated based on the extracted parameters to display the editing result of the target document by the sharing device. That is, optionally, in some embodiments, the step of "updating the document page based on the parsing result to display the editing result of the target document by the sharing device" may specifically include:
[0078] (31) extracting the editing type and operation information of the editing instruction from the parsing result;
[0079] (32) The document page is updated based on the editing type and operation information to display the editing results of the shared device on the target document.
[0080] Among them, the editing operation may include opening, closing, turning pages, opening a brush and marking, etc. It can be understood that in the present application, the editing operation can be divided into two categories, one is the page switching type, such as opening, closing and turning pages, and the other is not the page switching type, such as opening a brush and marking, etc. Further, according to whether the editing type is a page switching type, the document page can be updated to display the editing result of the sharing device for the target document, that is, optionally, in some embodiments, the step of "updating the document page based on the editing type and operation information to display the editing result of the sharing device for the target document" can specifically include:
[0081] (41) Detect whether the editing type is a page switching type;
[0082] (42) When the editing type is a page switching type, determining the touch point corresponding to the editing operation of the sharing device on the target document according to the operation information, and updating the document page based on the touch point to display the editing result of the sharing device on the target document;
[0083] (43) When the editing type is not a page switching type, the editing point set corresponding to the editing operation of the sharing device on the target document is determined according to the operation information, and the document page is updated based on the editing point set to display the editing result of the sharing device on the target document.
[0084] When the editing type is a page switching type, the area of the touch point in the document page can be determined, and then the corresponding space is called based on the determined area to update the document page. That is, optionally, in some embodiments, the step of "updating the document page based on the touch point to display the editing result of the sharing device for the target document" can specifically include:
[0085] (51) Determine the area in the document page corresponding to the touch point to obtain the touch area;
[0086] (52) calling the page switching control corresponding to the touch area;
[0087] (53) Based on the called page switching control, the document page is updated to display the editing results of the shared device on the target document.
[0088] For example, see Figure 1c , the area of touch point a in the document page is area L (i.e., the touch area), and the page switching control corresponding to area L is the page-down control b. At this time, the current page of the target document can be switched to the next page or the previous page of the current page according to the page-down control, that is, the document page is updated based on the called page switching control.
[0089] When the editing type is not a page switching type, the editing operation triggered by the sharing device on the target document can be determined according to the editing point set, such as marking a certain position of the target document, or calling a corresponding control to edit the document page. That is, optionally, in some embodiments, the step of "updating the document page based on the editing point set to display the editing result of the sharing device on the target document" can specifically include:
[0090] (61) Based on the set of edit points, construct an edit track corresponding to the edit operation of the sharing device on the target document;
[0091] (62) Display the editing track in the document page to show the editing results of the shared device on the target document.
[0092] For example, in a teaching scenario, a user who shares a device (hereinafter referred to as a sharing user) marks a text in a target document, such as Figure 1d As shown, if the sharing user marks "X+3Y=8", the editing track of the sharing user for the target document can be constructed based on the editing point set, and then the editing track is displayed in the document page of the local device to show the editing result of the sharing device for the target document; for example, in some embodiments, if the sharing user calls a page editing control, such as a brush control, then the editing result of the sharing device for the target document can be displayed in the document page based on the timestamp of the editing point.
[0093] It should be noted that, since the shared device and the current device may have different sizes, the position of each editing point in the document page may be determined according to the size of the current device and the size of the shared device. That is, optionally, in some embodiments, the step of "constructing an editing track corresponding to the editing operation of the shared device on the target document based on the edit point set" may specifically include:
[0094] (71) Obtaining position information of each edit point in the edit point set in the sharing device interface to obtain first position information of each edit point;
[0095] (72) determining the position information of each editing point in the document page based on the size of the current device, the size of the shared device, and the first position information of each editing point, and obtaining the second position information of each editing point;
[0096] (73) Based on the second position information of each editing point and the editing point set, an editing track corresponding to the editing operation of the sharing device on the target document is constructed.
[0097] Specifically, the ratio between the size of the current device and the size of the shared device can be calculated to obtain the proportion information between the size of the current device and the size of the shared device. Then, based on the first position information of each editing point and the calculated proportion information, the editing track corresponding to the editing operation of the shared device on the target document is constructed.
[0098] The present application first downloads the document data corresponding to the target document, and displays the document page corresponding to the document data. During the process of the target document being broadcast live by the sharing device, when the editing instruction for the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the target document by the sharing device. The document display method provided by the present application can improve and reduce traffic loss, and multiple buffering will not occur. In addition, since the sharing device will compress the target document before uploading it to the server, when real-time network transmission is used for document display, the picture quality will be distorted due to image compression transmission, and the clarity will be reduced. In the scheme of the present application, by receiving the editing instruction for the target document from the sharing device, and then updating the document page based on the received instruction, the picture in the sharing device can be restored without distortion, thereby improving the display effect of the document display.
[0099] The method described in the embodiment will be further described in detail below with examples.
[0100] In this embodiment, the document display device is specifically integrated into a terminal as an example for description.
[0101] See also Figure 2a , a document display method, the specific process can be as follows:
[0102] 201. During the process of broadcasting a target document live on a sharing device, the terminal downloads document data corresponding to the target document from the server through a data transmission channel.
[0103] For example, specifically, the terminal can use wired or wireless communication to directly or indirectly connect to the server through a data transmission channel. It should be noted that in the present application, the data transmission channel can only transmit document data corresponding to the target document. The present application does not limit the number and type of data transmission channels. The number of data transmission channels can be determined according to the number of communication channels that can be supported between the server, for example, it can include any number of WiFi channels, third generation mobile communication technology (The 3rd Generation mobile communication technology, 3G) channels, fourth generation mobile communication technology (The 4th Generation mobile communication technology, 4G) channels, fifth generation mobile communication technology (The 5th Generation mobile communication technology, 5G) channels, Bluetooth channels and wired channels.
[0104] After the sharing device uploads the document data of the target document to the server, or the server already stores the document data of the target document, the terminal can download the document data corresponding to the target document from the server through the data transmission channel. In order to increase the transmission rate, the sharing device can compress the target document. Therefore, during the download process, the terminal can decompress and verify the document data.
[0105] 202. When the terminal detects that the download is complete, it cuts off the transmission of the document data between the data transmission channel and displays a document page corresponding to the target document according to the downloaded document data.
[0106] For example, in the scenario of live teaching, when the terminal detects that the document data download is complete, it can cut off the transmission of the document data between the data transmission channel. At this time, the terminal retains the transmission between the audio data channel to obtain the voice of the user corresponding to the sharing device in real time, thereby ensuring the teaching quality of the live teaching. In addition, after the terminal completes the download of the document data, the downloaded document data may be incomplete due to the adaptability of different devices or abnormal loading of the target document. When the downloaded document data is incomplete, the terminal can perform a downgrade operation. For example, the terminal detects the data integrity of the downloaded document data. When the detection result indicates that the downloaded document data is missing, the terminal resumes the transmission of the document data between the data transmission channel.
[0107] 203. When the terminal receives an editing instruction for the target document from the sharing device through the signaling transmission channel, the terminal parses the editing instruction.
[0108] For example, specifically, in a teaching scenario, the sharing device can collect the editing operations performed by the teaching user on the target document. Subsequently, the sharing device creates a signaling transmission channel with the server, and then transmits the editing operations to the server through the signaling transmission channel. All editing operations of the teaching user will be converted into editing instructions. When the terminal receives the editing instructions for the target document from the sharing device through the signaling transmission channel, it extracts the timestamp and instruction identifier of the editing instructions. Finally, the terminal parses the editing instructions based on the timestamp and instruction identifier of the editing instructions.
[0109] 204. The terminal updates the document page based on the parsing result to display the editing result of the sharing device on the target document.
[0110] For example, the terminal may extract parameters corresponding to the editing operation, such as the editing type and operation information, from the parsing result, and then update the document page based on the extracted parameters to display the editing result of the sharing device for the target document.
[0111] In the present application, editing operations can be divided into two categories, one is the page switching type, such as page switching operations such as opening, closing and turning pages, and the other is not the page switching type, such as opening a brush and marking, etc. Furthermore, it can be based on whether the editing type is a page switching type, that is, the terminal can detect whether the editing type is a page switching type. When the editing type is a page switching type, the terminal determines the touch point corresponding to the editing operation of the sharing device on the target document according to the operation information, and updates the document page based on the touch point to display the editing result of the sharing device on the target document; when the editing type is not a page switching type, the terminal determines the editing point set corresponding to the editing operation of the sharing device on the target document according to the operation information, and updates the document page based on the editing point set to display the editing result of the sharing device on the target document.
[0112] In order to further understand the document display scheme of this application, the following is an example of a live lecture scenario. Figure 2b As shown in the figure, it is a flowchart of the document display system, in which the document display system includes the teacher side (i.e., sharing device), the student side (i.e., shared device) and the server. The teacher side provides operations such as portable document format (PDF) import, document presentation, document selection, brush selection, page turning and undo, and also includes three teaching modes: camera mode, screen sharing mode and pdf mode. When the teacher (i.e., the user of the sharing device) selects the pdf mode, it will display instructions to guide the teacher to import the pdf. The pdf mode consists of three layers of views. From top to bottom, they are the brush layout, pdf layout and screen recording layout. Figure 2cWhen the teacher opens the PDF mode to teach, the video stream will be pushed, the PDF file screen opened by the teacher in the embedded PDF layout will be obtained, and the teacher's annotation operation screen on the brush layout will be obtained. The two layers of screens will be spliced, the screen will be captured, transcoded and pushed, and the video stream will be pushed and live broadcasted.
[0113] At the same time, the teacher will upload the PDF file, encrypt it, and store it on the server. The teacher's operating instructions (page turning, opening, closing, brushing, and undoing, etc.) will also be recorded and uploaded at the same time. When the teacher's PDF file is uploaded successfully, or when the student (i.e., the user of the shared device) enters the classroom and the server already has the teacher's PDF file, the server will notify the student to download the PDF file and bring the downloaded uniform resource locator. The student will download, decompress, and verify the file. When the download is complete, the student opens the PDF layout to load and display the PDF file. At this time, the video stream data transmission on the student side is cut off, and only the audio stream data transmission is maintained to ensure sound transmission. In this way, the teacher and student ends complete the document screen synchronization without relying on the video stream.
[0114] In order to achieve the real-time effect of live class, when the student opens the teacher's document, it is also necessary to synchronize the teacher's various operations in real time. The teacher will record the teacher's various operations as a data set. The data types include: open, close, turn page, open brush, stylus coordinates and brush path. Each data will be accompanied by a timestamp and sequence number for sorting verification and packet loss verification.
[0115] The teacher packaged these data for real-time upload and transmission, and the server sent them down after transfer, sending these data packets through the transmission protocol. After receiving these data packets, the student side unpacked and parsed them, obtained the real-time instructions from the teacher side, and then synchronized the real-time operation on the student side's PDF layout. At the same time, the data set that records the teacher's stylus coordinates and brush path is used for brush operation. There is a layer of brush layout on the upper layer of the student's live screen. Through canvas drawing, the relative coordinate conversion of the teacher's brush is synchronized, and the drawing is performed to present the same brush effect. Since the uploading and sending of the teacher's documents, the downloading and decompression of the student side, and the rendering of the PDF layout require a certain amount of time, when the student enters the PDF live broadcast, the live broadcast transmission of the video stream is first performed. At this time, the clarity of the picture is low and the network bandwidth traffic consumption is large. When the student's PDF is loaded and the data packet is parsed, the PDF layout is covered on the original video stream screen, and the video stream data transmission is stopped at the same time, and the live broadcast mode is switched.
[0116] When the student end encounters problems such as device adaptation or abnormal PDF file loading, downgrade operations will be performed, such as closing PDF layout, turning on video streaming, and watching live video streaming.
[0117] During the process of live broadcasting of the target document by the sharing device, the terminal of the present application downloads the document data corresponding to the target document from the server through the data transmission channel. When the terminal detects that the downloading is complete, the terminal cuts off the transmission of the document data between the data transmission channel and displays the document page corresponding to the target document based on the downloaded document data. When the terminal receives the editing instruction for the target document from the sharing device through the signaling transmission channel, the terminal parses the editing instruction. Finally, the terminal updates the document page based on the parsing result to display the editing result of the target document by the sharing device. After the terminal provided by the present application downloads the document data corresponding to the target document from the server, when the downloading is complete, the terminal cuts off the transmission of the document data between the data transmission channel, thereby reducing traffic loss and preventing multiple buffering. At the same time, the terminal maintains the connection with the signaling transmission channel to ensure that the editing result of the target document by the sharing device can be displayed during the live broadcasting of the target document.
[0118] In order to better implement the document display method of the present application, the present application also provides a document display device based on the above (hereinafter referred to as the display device). The meanings of the terms are the same as those in the above document display method, and the specific implementation details can refer to the description in the method embodiment.
[0119] See also Figure 3a , Figure 3a This is a schematic diagram of the structure of the document display device provided by the present application, wherein the distribution device may include a download module 301 and a display module 302, which may be specifically as follows:
[0120] The download module 301 is used to download document data corresponding to the target document and display the document page corresponding to the document data.
[0121] For example, specifically, the download module 301 can use wired or wireless communication to directly or indirectly connect to the server through a data transmission channel. It should be noted that in the present application, the data transmission channel can only transmit document data corresponding to the target document. The present application does not limit the number and type of data transmission channels. The number of data transmission channels can be determined based on the number of communication channels that can be supported between the server. For example, it can include any number of WiFi channels, third generation mobile communication technology (the 3rd Generation mobile communication technology, 3G) channels, 4G channels, fifth generation mobile communication technology (the 5th Generation mobile communication technology, 5G) channels, Bluetooth channels and wired channels. It should be noted that, in the live broadcast scenario, document data can be downloaded during the live broadcast process or downloaded in advance (i.e., before the live broadcast). For example, students download the courseware (document data) uploaded by the teacher before taking an online class. When the download is complete, the document page corresponding to the target document can be displayed based on the downloaded document data. At this time, the transmission of the document data between the data transmission channel is cut off. That is, optionally, the download module 301 can be specifically used to: download the document data corresponding to the target document from the server through the data transmission channel. When the download is detected to be complete, the transmission of the document data between the data transmission channel is cut off, and the document page corresponding to the target document is displayed based on the downloaded document data.
[0122] In addition, for some scenarios, when the transmission of document data between the data transmission channel is cut off, the transmission between the audio data channel can be maintained, so that the audio stream data can be obtained in real time to ensure the sound transmission. When the document data is downloaded, due to the adaptability of different devices or abnormal loading of the target document, the downloaded document data may be incomplete. When the downloaded document data is incomplete, a downgrade operation can be performed, that is, optionally, in some embodiments, refer to Figure 3b The display device may further include a detection module 303, which may be specifically used to: detect the data integrity of the downloaded document data, and when the detection result indicates that the downloaded document data is missing, restore the transmission of the document data between the data transmission channel.
[0123] The display module 302 is used to update the document page based on the editing instruction when receiving the editing instruction of the target document from the sharing device during the process of live broadcasting of the target document by the sharing device, so as to display the editing result of the target document by the sharing device.
[0124] The editing instruction may be parsed, and the document page may be updated based on the parsing result to display the editing result of the target document by the sharing device. That is, optionally, the display module 302 may specifically include:
[0125] The parsing submodule is used to parse the editing instruction for the target document when the editing instruction for the target document is received from the sharing device through the signaling transmission channel during the process of the sharing device broadcasting the target document live;
[0126] The display submodule is used to update the document page based on the parsing result to display the editing result of the sharing device on the target document.
[0127] Optionally, in some embodiments, the display submodule may specifically include:
[0128] An extraction unit, used for extracting the editing type and operation information of the editing instruction from the parsing result;
[0129] The display unit is used to update the document page based on the editing type and operation information to display the editing result of the sharing device on the target document.
[0130] Optionally, in some embodiments, the display unit may specifically include:
[0131] A detection unit, used to detect whether the editing type is a page switching type;
[0132] A first determining unit, configured to determine, when the editing type is a page switching type, a touch point corresponding to the editing operation of the sharing device on the target document according to the operation information;
[0133] A first display unit, used to update the document page based on the touch point to display the editing result of the sharing device on the target document;
[0134] A second determining unit, configured to determine, when the editing type is not a page switching type, a set of editing points corresponding to the editing instruction of the sharing device for the target document according to the operation information;
[0135] The second display unit is used to update the document page based on the edit point set to display the editing result of the sharing device on the target document.
[0136] Optionally, in some embodiments, the first display unit can be specifically used to: determine the area in the document page corresponding to the touch point, obtain the touch area, call the page switching control corresponding to the touch area, and update the document page based on the called page switching control to display the editing results of the sharing device for the target document.
[0137] Optionally, in some embodiments, the second display unit may specifically include:
[0138] A construction subunit, used to construct an editing track corresponding to the editing instruction of the sharing device for the target document based on the editing point set;
[0139] The display subunit is used to display the editing track in the document page to show the editing result of the shared device on the target document.
[0140] Optionally, in some embodiments, the display sub-unit can be specifically used to: obtain the position information of each editing point in the editing point set in the sharing device interface, obtain the first position information of each editing point, determine the position information of each editing point in the document editing page based on the size of the current device, the size of the sharing device and the first position information of each editing point, obtain the second position information of each editing point, and construct an editing track corresponding to the editing instructions of the sharing device for the target document based on the second position information of each editing point and the editing point set.
[0141] The download module 301 of the present application downloads the document data corresponding to the target document, and displays the document page corresponding to the document data. During the process of live streaming the target document on the sharing device, when the display module 302 receives the editing instruction for the target document from the sharing device, the document page is updated based on the editing instruction to display the editing result of the target document by the sharing device. The document display device provided by the present application can improve and reduce traffic loss, and multiple buffering will not occur. In addition, since the sharing device will compress the target document before uploading it to the server, when real-time network transmission is used for document display, the picture quality will be distorted due to image compression transmission, and the clarity will be reduced. In the scheme of the present application, by receiving the editing instruction for the target document from the sharing device, and then updating the document page based on the received instruction, the picture in the sharing device can be restored without distortion, thereby improving the display effect of the document display.
[0142] In addition, the present application also provides an electronic device, such as Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in this application, specifically:
[0143] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0144] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data, thereby performing overall detection of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0145] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0146] The electronic device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0147] The electronic device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0148] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0149] Download the document data corresponding to the target document and display the document page corresponding to the document data. During the process of the target document being broadcast live by the sharing device, when an editing instruction for the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the sharing device for the target document.
[0150] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0151] The present application first downloads the document data corresponding to the target document, and displays the document page corresponding to the document data. During the process of the target document being broadcast live by the sharing device, when the editing instruction for the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the target document by the sharing device. The document display method provided by the present application can improve and reduce traffic loss, and multiple buffering will not occur. In addition, since the sharing device will compress the target document before uploading it to the server, when real-time network transmission is used for document display, the picture quality will be distorted due to image compression transmission, and the clarity will be reduced. In the scheme of the present application, by receiving the editing instruction for the target document from the sharing device, and then updating the document page based on the received instruction, the picture in the sharing device can be restored without distortion, thereby improving the display effect of the document display.
[0152] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0153] To this end, the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any document display method provided in the present application. For example, the instructions can execute the following steps:
[0154] Download the document data corresponding to the target document and display the document page corresponding to the document data. During the process of the target document being broadcast live by the sharing device, when an editing instruction for the target document is received from the sharing device, the document page is updated based on the editing instruction to display the editing result of the sharing device for the target document.
[0155] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0156] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0157] Since the instructions stored in the storage medium can execute the steps in any document display method provided in the present application, the beneficial effects that can be achieved by any document display method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0158] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0159] The document display method, device, electronic device and storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A document display method, characterized in that: include: When entering the target teaching mode, downloading the document data corresponding to the target document, and displaying the document page corresponding to the document data; In the process of live broadcasting the target document by the sharing device, when an editing instruction for the target document is received by the sharing device through the signaling transmission channel, a timestamp and an instruction identifier of the editing instruction are extracted; the editing instruction includes a first editing instruction and a second editing instruction; the instruction identifier represents the arrangement of the editing instruction in the plurality of editing instructions; The target teaching mode includes a first view layer, a second view layer and a third view layer, wherein the first view layer is a view layer of a brush layout, the second view layer is located below the first view layer, the second view layer is a view layer of a PDF layout, the third view layer is located below the second view layer, and the third view layer is a view layer of a screen recording layout; the target teaching mode is used to perform live transmission of a video stream before the download of the document data corresponding to the target document is completed, or when a file loading exception occurs during the display of a document page corresponding to the document data, and to perform video streaming according to the screen of the first view layer and the screen of the second view layer when the download of the document data corresponding to the target document is completed; Parsing the editing instruction based on the timestamp and instruction identifier of the editing instruction; The parsing of the editing instruction based on the timestamp and instruction identifier of the editing instruction includes: determining whether the first editing instruction and the second editing instruction are arranged consecutively in the execution order according to the first timestamp and the first instruction identifier of the first editing instruction and the second timestamp and the second instruction identifier of the second editing instruction; If the first editing instruction and the second editing instruction are not arranged consecutively according to the execution sequence, re-pulling the missing editing instruction between the first editing instruction and the second editing instruction; Obtaining a parsing result according to the first editing instruction, the second editing instruction and the lost editing instruction; Extracting the editing type and operation information of the editing instruction from the parsing result; Detecting whether the editing type is a page switching type; When the editing type is a page switching type, the touch point corresponding to the editing instruction of the sharing device for the target document is determined according to the operation information, and the document page is updated based on the touch point to display the editing result of the sharing device for the target document; When the editing type is not a page switching type, the editing point set corresponding to the editing instructions of the sharing device for the target document is determined according to the operation information, and the document page is updated based on the editing point set to display the editing results of the sharing device for the target document.
2. The method according to claim 1, characterized in that The updating of the document page based on the touch point to display the editing result of the sharing device on the target document includes: Determine the area in the document page corresponding to the touch point to obtain a touch area; Calling a page switching control corresponding to the touch area; The document page is updated based on the called page switching control to display the editing result of the sharing device on the target document.
3. The method according to claim 1, characterized in that The updating of the document page based on the editing point set to display the editing result of the sharing device on the target document includes: Based on the set of edit points, construct an edit track corresponding to the edit instruction of the sharing device for the target document; The editing track is displayed in the document page to show the editing result of the sharing device on the target document.
4. The method according to claim 3, characterized in that The step of constructing an editing track corresponding to the editing instruction of the target document by the sharing device based on the editing point set includes: Acquire the position information of each edit point in the edit point set in the sharing device interface to obtain the first position information of each edit point; Based on the size of the current device, the size of the sharing device, and the first position information of each editing point, determining the position information of each editing point in the document page, and obtaining the second position information of each editing point; Based on the second position information of each editing point and the editing point set, an editing track corresponding to the editing instruction of the sharing device for the target document is constructed.
5. The method according to any one of claims 1 to 4, characterized in that: The downloading of document data corresponding to the target document and displaying of a document page corresponding to the document data include: Download document data corresponding to the target document from the server through the data transmission channel; When the downloading is completed, the transmission of the document data between the data transmission channel is cut off, and the document page corresponding to the target document is displayed according to the downloaded document data.
6. The method according to claim 5, characterized in that Also includes: Check the data integrity of the downloaded document data; When the detection result indicates that the downloaded document data is missing, the transmission of the document data between the data transmission channel is resumed.
7. A document display device, characterized in that: include: A download module, used to download document data corresponding to a target document and display a document page corresponding to the document data when entering a target teaching mode; A display module, used for extracting a timestamp and a command identifier of an editing command for a target document from a sharing device when the editing command for the target document is received from the sharing device through a signaling transmission channel during the live broadcast of the target document by the sharing device; Based on the timestamp and instruction identifier of the editing instruction, the editing instruction is parsed; based on the parsing result, the document page is updated to display the editing result of the sharing device for the target document; wherein the editing instruction includes a first editing instruction and a second editing instruction; the instruction identifier represents the arrangement of the editing instruction in multiple editing instructions; the target teaching mode includes a first view layer, a second view layer and a third view layer, the first view layer is a view layer of a brush layout, the second view layer is located below the first view layer, the second view layer is a view layer of a pdf layout, the third view layer is located below the second view layer, and the third view layer is a view layer of a screen recording layout; the target teaching mode is used to display the target document page corresponding to the document data before the download is completed, or in the process of displaying the document data. When a file loading exception occurs during the process, live transmission of the video stream is performed, and when the document data corresponding to the target document is downloaded, video streaming is performed according to the screen of the first view layer and the screen of the second view layer; the parsing of the editing instruction based on the timestamp and instruction identifier of the editing instruction includes: determining whether the first editing instruction and the second editing instruction are arranged continuously in the execution sequence according to the first timestamp and the first instruction identifier of the first editing instruction and the second timestamp and the second instruction identifier of the second editing instruction; if the first editing instruction and the second editing instruction are not arranged continuously in the execution sequence, re-pulling the missing editing instruction between the first editing instruction and the second editing instruction; obtaining the parsing result according to the first editing instruction, the second editing instruction and the missing editing instruction; The updating of the document page based on the parsing result to display the editing result of the target document by the sharing device includes: extracting the editing type and operation information of the editing instruction from the parsing result; detecting whether the editing type is a page switching type; when the editing type is a page switching type, determining the touch point corresponding to the editing instruction of the sharing device for the target document according to the operation information, and updating the document page based on the touch point to display the editing result of the sharing device for the target document; when the editing type is not a page switching type, determining the editing point set corresponding to the editing instruction of the sharing device for the target document according to the operation information, and updating the document page based on the editing point set to display the editing result of the sharing device for the target document.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the document display method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the steps of the document display method according to any one of claims 1 to 6 are implemented.