CN115309308A - Method, device, equipment, system and storage medium for commenting online document - Google Patents

Method, device, equipment, system and storage medium for commenting online document Download PDF

Info

Publication number
CN115309308A
CN115309308A CN202210855236.8A CN202210855236A CN115309308A CN 115309308 A CN115309308 A CN 115309308A CN 202210855236 A CN202210855236 A CN 202210855236A CN 115309308 A CN115309308 A CN 115309308A
Authority
CN
China
Prior art keywords
target
comment data
comment
media resource
online document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210855236.8A
Other languages
Chinese (zh)
Inventor
张驰
李硕
袁有财
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210855236.8A priority Critical patent/CN115309308A/en
Publication of CN115309308A publication Critical patent/CN115309308A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a method, a device, equipment, a system and a storage medium for commenting an online document, and relates to the technical field of communication. The method comprises the following steps: displaying a playing interface in a page of the online document, wherein the playing interface is used for playing media resources in the online document; when a target display screen of the media resource is played on the playing interface, generating target comment data in response to the comment generation operation, wherein the target comment data is used for indicating comments on a target area on the target display screen; and synchronizing the target comment data to the second client so that the second client displays the target comment data when playing a target display screen of the media resource in the online document, which is beneficial for a plurality of cooperative objects to communicate the content of the media resource, and further improves the communication and cooperation efficiency of online document cooperative work.

Description

Method, device, equipment, system and storage medium for commenting online document
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, a system, and a storage medium for commenting an online document.
Background
In recent years, demands for cooperative office work have been increased, and online documents have been developed rapidly. The online document comprises elements in various forms, wherein the media resource elements serve as a rich information carrier and play an important role in communication and collaboration.
However, in the online document in the related art, for the content of the media resource element, the multiple collaboration objects cannot communicate with each other, which seriously affects the communication collaboration effect of the online document, and is not beneficial for the collaboration objects to understand the specific meaning of the media resource element, resulting in higher understanding cost of the collaboration objects on the media resource element and lower communication collaboration efficiency.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device, a system, and a storage medium for commenting an online document, which are helpful for improving a communication and collaboration effect of the online document, reducing an understanding cost of a collaboration object, and improving communication and collaboration efficiency.
The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for commenting an online document, for a first client, the method including: displaying a playing interface in a page of the online document, wherein the playing interface is used for playing media resources in the online document; when a target display screen of the media resource is played on the playing interface, generating target comment data in response to comment generation operation, wherein the target comment data is used for indicating comments on a target area on the target display screen; and synchronizing the target comment data to the second client so that the second client can display the target comment data when playing a target display screen of the media resource in the online document.
In one possible implementation, the comment generating operation includes a first generating operation and a second generating operation, and generating the target comment data in response to the comment generating operation includes: displaying a target area on a target display screen in response to a first generation operation; in response to the second generation operation, target comment data for commenting the target area is generated.
In another possible embodiment, the first generating operation includes a first trigger operation and a second trigger operation, and the displaying the target area on the target display screen in response to the first generating operation includes: in response to a first trigger operation on a playing interface, pausing playing of the media resource; and responding to a second trigger operation on the playing interface, and displaying the target area on the target display screen based on the first position information of the first trigger operation and the second position information of the second trigger operation.
In another possible implementation, generating target comment data for commenting a target area includes: obtaining comment information, wherein the comment information is used for indicating comment content of a target area; acquiring relative position information of the target area, wherein the relative position information is used for indicating the relative position relationship between the target area and the playing interface; creating target comment data in comment data of an online document; the target comment data includes the comment information and the relative position information of the target area.
In another possible implementation, the obtaining of the comment information includes: generating a text input box in the target area; and acquiring comment information in response to an input operation on the text input box.
In another possible implementation, the acquiring the relative position information of the target area includes: acquiring third position information of a playing interface on a page and fourth position information of a target area on the page; based on the third position information and the fourth position information, relative position information of the target area is determined.
In another possible implementation manner, the target comment data includes playing time information of the target display picture in the media resource; and/or the target commentary data comprises an identification of a media resource to which the target commentary data belongs.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for commenting an online document, for a second client, the method including: displaying a playing interface in a page of the online document, wherein the playing interface is used for playing media resources in the online document; in the process of playing the media resources on the playing interface, target comment data belonging to the media resources are obtained, and the target comment data are used for indicating comments on a target area on a target display picture of the media resources; and when the target display screen of the media resource is played on the playing interface, displaying the target comment data.
In a possible implementation manner, the obtaining of the target comment data belonging to the media resource includes: acquiring the identifier of the media resource under the condition of detecting the updating of the playing time; traversing comment data of the online document, and acquiring target comment data from the comment data of the online document; and the identification of the media resource to which the target comment data belongs is the same as the identification of the media resource.
In another possible implementation manner, the target comment data includes relative position information of the target area and comment information, the relative position information is used for indicating a relative position relationship between the target area and the play interface, and the comment information is used for indicating comment content to the target area; when the target display screen of the media resource is played on the playing interface, displaying target comment data, including: determining first position information of the target area on the playing interface based on the relative position information; based on the first position information, the target area and the comment information are displayed on the target display screen.
In another possible implementation, determining first position information of the target area on the playing interface based on the relative position information of the target area includes: acquiring second position information of the playing interface on the page;
the first location information is determined based on the second location information and the relative location information of the target area.
In another possible embodiment, displaying the target area and the comment information on the target display screen based on the first position information includes: in the case where the play interface displays the target display screen, the target area is displayed at the position indicated by the first position information, and the comment information is displayed within the target area.
In another possible embodiment, displaying the target area and the comment information on the target display screen based on the first position information includes: creating a block-level element on the page, and inserting the block-level element into the target area indicated by the first position information; the block-level elements include comment information; in a case where the play interface displays the target display screen, the block-level elements are displayed.
In another possible embodiment, the method further comprises: monitoring a broadcast message sent by a server; in the case where comment data belonging to a media resource is included in a broadcast message, target comment data belonging to the media resource is received and stored in comment data of an online document.
In another possible implementation manner, the displaying the target comment data includes playing time information of a target display screen in the media resource, and when the target display screen of the media resource is played on the playing interface, the displaying the target comment data includes: and under the condition that the difference value between the current playing time of the media resource and the playing time information is less than or equal to a first preset threshold value, displaying the target comment data.
In another possible embodiment, the method further comprises: and under the condition that the difference value between the current playing time of the media resource and the playing time information is greater than or equal to a second preset threshold value, stopping displaying the target comment data.
According to a third aspect of the embodiments of the present disclosure, there is provided a review apparatus for an online document, including: the display module is configured to display a playing interface in a page of the online document, and the playing interface is used for playing media resources in the online document; the generating module is configured to execute a comment generating operation when a target display screen of the media resource is played on the playing interface, and generate target comment data, wherein the target comment data are used for indicating a comment of a target area on the target display screen; and the comment module is configured to synchronize the target comment data to the second client so that the second client can display the target comment data when playing a target display screen of the media resource in the online document.
In one possible embodiment, the comment generating operation comprises a first generating operation and a second generating operation, the generating module being specifically configured to perform: displaying a target area on a target display screen in response to a first generation operation; in response to the second generation operation, target comment data for commenting the target area is generated.
In another possible embodiment, the first generating operation includes a first triggering operation and a second triggering operation, and the generating module is specifically configured to perform: in response to a first trigger operation on a playing interface, pausing playing of the media resource; and responding to a second trigger operation on the playing interface, and displaying the target area on the target display screen based on the first position information of the first trigger operation and the second position information of the second trigger operation.
In another possible implementation, the generation module is specifically configured to perform: obtaining comment information, wherein the comment information is used for indicating comment content of a target area; acquiring relative position information of the target area, wherein the relative position information is used for indicating the relative position relation between the target area and the playing interface; creating target comment data in comment data of an online document; the target comment data includes the comment information and the relative position information of the target area.
In another possible implementation, the generation module is specifically configured to perform: generating a text input box in the target area; and acquiring comment information in response to an input operation on the text input box.
In another possible implementation, the generation module is specifically configured to perform: acquiring third position information of a playing interface on a page and fourth position information of a target area on the page; based on the third position information and the fourth position information, relative position information of the target area is determined.
In another possible implementation manner, the target comment data includes playing time information of the target display picture in the media resource; and/or the target commentary data comprises an identification of a media resource to which the target commentary data belongs.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a review apparatus for an online document, including: the display module is configured to display a playing interface in a page of the online document, and the playing interface is used for playing media resources in the online document; the acquisition module is configured to acquire target comment data belonging to the media resources in the process of playing the media resources on the playing interface, wherein the target comment data is used for indicating comments on a target area on a target display picture of the media resources; and the comment module is configured to display the target comment data when the target display screen of the media resource is played on the play interface.
In a possible implementation manner, the target comment data includes an identifier of a media resource to which the target comment data belongs, and the obtaining module is specifically configured to perform: under the condition that the update of the playing time is detected, acquiring the identifier of the media resource; traversing comment data of the online document, and acquiring target comment data from the comment data of the online document; the identification of the media resource to which the target comment data belongs is the same as the identification of the media resource, and the comment type of the target comment data is a media resource type.
In another possible implementation manner, the target comment data includes relative position information of the target area and comment information, the relative position information is used for indicating a relative position relationship between the target area and the play interface, and the comment information is used for indicating comment content on the target area; the review module is specifically configured to perform: determining first position information of the target area on the playing interface based on the relative position information; the target area and the comment information are displayed on the target display screen based on the first position information.
In another possible implementation, the comment module is specifically configured to perform: acquiring second position information of the playing interface on the page; the first location information is determined based on the second location information and the relative location information of the target area.
In another possible implementation, the review module is specifically configured to perform: in the case where the play interface displays the target display screen, the target area is displayed at the position indicated by the first position information, and the comment information is displayed within the target area.
In another possible implementation, the review module is specifically configured to perform: creating block-level elements on the page, and inserting the block-level elements into the target area indicated by the first position information; the block level element comprises comment information; in a case where the play interface displays the target display screen, the block-level elements are displayed.
In another possible implementation, the comment module is further configured to perform: monitoring a broadcast message sent by a server; in the case where target comment data belonging to a media resource is included in a broadcast message, the target comment data belonging to the media resource is received and the comment data belonging to the media resource is stored in comment data of an online document.
In another possible implementation, the target comment data includes playing time information of the target display screen in the media resource, and the comment module is specifically configured to perform: and under the condition that the difference value between the current playing time of the media resource and the playing time information is smaller than or equal to a first preset threshold value, displaying the target comment data.
In another possible implementation, the comment module is further configured to perform: and under the condition that the difference value between the current playing time of the media resource and the playing time information is greater than or equal to a second preset threshold value, stopping displaying the target comment data.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of the first aspect and any of its possible embodiments described above, or to implement the method of the second aspect and any of its possible embodiments described above.
According to a sixth aspect of an embodiment of the present disclosure, there is provided a review system for an online document, including: a first electronic device for performing the method of the first aspect and any possible implementation thereof; a second electronic device for performing the method of the second aspect and any possible implementation thereof.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium for storing computer instructions, which, when executed by a processor of a first electronic device, enable the first electronic device to perform the method of the first aspect and any of its possible implementations, or which, when executed by a processor of a second electronic device, enable the second electronic device to perform the method of the second aspect and any of its possible implementations.
According to an eighth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when run on a first electronic device, cause the first electronic device to perform the method of the above-mentioned first aspect and any of its possible embodiments, or which, when run on a second electronic device, cause the second electronic device to perform the method of the above-mentioned second aspect and any of its possible embodiments.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: by generating target comment data for a target area in a media resource (such as a video, an image or a plug-in) in an online document and synchronizing the target comment data to a second client viewing the online document, namely, the second client cooperating with the first client, the communication and communication of the content of the media resource by a plurality of cooperating objects can be realized, and the communication and cooperation efficiency of the cooperation work of the online document is improved. In addition, the target comment data are used for indicating comments on the target area on the target display picture, so that other collaborative objects can understand the comment object to which the target comment data aim, and the other collaborative objects can be prevented from subjectively understanding the comment object to which the target comment data aim, or searching the comment object to which the target comment data aim in the media resource, so that the understanding cost of the collaborative objects on the target comment data can be reduced, and the collaborative communication efficiency can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an implementation environment shown in accordance with an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method for commenting on an online document in accordance with an exemplary embodiment;
FIG. 3 is a diagram illustrating a generation of target review data in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating another method for commenting on an online document in accordance with an exemplary embodiment;
FIG. 5 is a diagram illustrating a display of targeted review data in accordance with an exemplary embodiment;
FIG. 6 is an interaction diagram illustrating another method of commenting on an online document in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating a review device for an online document in accordance with an illustrative embodiment;
FIG. 8 is a block diagram illustrating another review device for an online document in accordance with an illustrative embodiment;
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
Before describing the comment method of the online document provided by the present disclosure in detail, related elements, application scenarios and implementation environments related to the present disclosure are briefly described.
First, in order to facilitate understanding of the present application, the relevant elements involved in the present application will now be described.
Bidirectional communication (WebSocket): is a Protocol for full duplex communication over a single Transmission Control Protocol (TCP) connection. WebSocket enables data exchange between the client and the server to be simpler, and allows the server to actively push data to the client.
Secondly, the application scenario related to the present disclosure is briefly introduced.
In the online document in the related art, for the content of the media resource element, a plurality of collaboration objects cannot communicate with each other, which seriously affects the communication collaboration effect of the online document and is not beneficial for the collaboration objects to understand the specific meaning of the media element, resulting in higher understanding cost of the collaboration objects on the media resource element and lower communication collaboration efficiency.
In order to solve the above problem, the present disclosure provides a method for commenting an online document, which generates target comment data for a target area in a media resource (such as a video, an image, or a plug-in) in the online document, and synchronizes the target comment data to a second client that views the online document, that is, a second client that cooperates with a first client, so that multiple cooperative objects can communicate and exchange the content of the media resource, and further, the communication and cooperation efficiency of the online document cooperative office is improved. In addition, the target comment data are used for indicating comments on the target area on the target display picture, so that other collaborative objects can understand the comment object targeted by the target comment data, the subjective understanding of the comment object targeted by the target comment data by other collaborative objects is avoided, or the comment object targeted by the target comment data is searched in media resources, the understanding cost of the collaborative objects on the target comment data is reduced, and the collaborative communication efficiency is improved.
Again, the following presents a brief introduction of the implementation environment (implementation architecture) to which the present disclosure relates.
As shown in fig. 1, which illustrates a schematic diagram of one implementation environment in which the present disclosure is applicable. The implementation environment may include a first electronic device 110, a second electronic device 120, and a server 130. The first electronic device 110 and the second electronic device 120 perform data interaction with each other through the server 130. The first electronic device 110 and the second electronic device 120 are respectively connected with the server 130 through communication (wired network or wireless network). In addition, the first electronic device 110 is a device used by the first user account, and the first client is installed on the first electronic device. The second electronic device 120 is a device used by the second user account, and the second electronic device has a second client installed thereon.
In this disclosure, in a process of playing a media resource in an online document, if a first user account needs to comment on the media resource, a first client may execute a method for commenting on the online document shown in the following embodiment, generate target comment data of the media resource, and synchronize the target comment data to a second client, so that the second client may implement display of the target comment data of the media resource by executing another method for commenting on the online document shown in the following embodiment.
It should be noted that the second client may also generate comment data for the media resource, and in addition, the first client may also be configured to display the comment data generated by the second client for the media resource.
In some embodiments, the first electronic device 110 and the second electronic device 120 may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a desktop computer, a portable computer, a vehicle-mounted terminal, a wearable device, and the like, respectively, which is not limited in this disclosure. The server 130 may be a single server, or may be a server cluster composed of a plurality of servers, which is not limited in this disclosure.
In addition, it should be noted that the user information (including, but not limited to, user device information, user personal information, etc.) referred to in the present disclosure is information authorized by the user or sufficiently authorized by each party.
For ease of understanding, the method of reviewing online documents provided by the present disclosure is described in detail below with reference to the accompanying drawings.
FIG. 2 is a flow diagram illustrating a method for commenting on an online document for a first client according to an exemplary embodiment. As shown in fig. 2, the method for commenting an online document includes the steps of:
s201: and displaying a playing interface in the page of the online document, wherein the playing interface is used for playing the media resources in the online document.
Optionally, the media assets include at least one of video assets, plug-in assets, image assets, and the like.
In one embodiment, in response to a third trigger operation, for example, a click operation of the first user on the first client, the first client is started and a page of the online document is displayed. Further, in response to a fourth trigger operation, for example, a click operation of the first user on the media resource, a playing interface is displayed in the page to play the media resource in the online document.
In one embodiment, the first client is a web wide web client and the pages of the online document include web pages.
In another embodiment, the first client is an online document client and the pages of the online document include client pages.
S202: and when the target display screen of the media resource is played on the playing interface, generating target comment data in response to the comment generation operation, wherein the target comment data is used for indicating a comment on a target area on the target display screen.
Optionally, the target area is used for indicating the object to be evaluated in the target display screen. That is, on the target display screen, the content located in the target area is the object to be evaluated.
Optionally, the media resource comprises a plurality of image frames, and the target display screen is any one of the plurality of image frames.
In one embodiment, as shown in fig. 3, the total playing time of the media resource is 35 seconds, and the playing time information of the target display screen in the media resource is 3 seconds, that is, when the media resource is played for the 3 rd second, the target display screen is displayed on the playing interface. In the process of playing the media resource, the first client monitors the dragging selection operation on the playing interface, when the dragging selection operation of the first user on the playing interface is monitored, the playing of the media resource is paused, and when the dragging selection operation of the first user on the playing interface is monitored to be stopped, the target area is displayed on the target display picture, and the target comment data is generated, wherein the target comment data comprises the target area and comment messages (namely 'i am a comment'), and the comment messages can be located in the target area.
In some embodiments, the comment generating operation includes a first generating operation and a second generating operation, S202 includes: s202a-S202b.
S202a: and when the target display screen of the media resource is played on the playing interface, responding to the first generation operation, and displaying the target area on the target display screen.
Optionally, the first generating operation includes a first trigger operation and a second trigger operation, and S202a includes the following first step and second step.
The method comprises the following steps: when the target display screen of the media resource is played on the playing interface, the playing of the media resource is paused in response to a first trigger operation on the playing interface.
In some embodiments, when the playing interface plays a target display screen of a media resource, if a user wants to comment on a target area on the target display screen, the user may perform a first trigger operation on the playing interface, for example, perform a mouse button pressing operation (mousedown) on the playing interface, when the first client monitors the mouse button pressing operation, the playing interface stops playing the media resource, marks that a current drag selection state is real (true), and records a page abscissa (pageX) and a page ordinate (pageY) of the mouse button pressing operation triggered on an online document page as initial positions of the drag selection operation, which are respectively marked as an initial abscissa (startX) and an initial ordinate (startY), where the initial abscissa (startX) and the initial ordinate (startY) are first position information.
Step two: and responding to a second trigger operation on the playing interface, and displaying a target area on a target display picture displayed on the playing interface based on the first position information of the first trigger operation and the second position information of the second trigger operation.
In some embodiments, if the drag selection operation on the play interface covers a target area that the user wants to comment, the user may perform a second trigger operation on the play interface, for example, perform a mouse button lifting operation (mouseup) on the play interface, when monitoring the mouse button lifting operation, the first client marks that the current drag selection state is non-true (false), records a page abscissa (pageX) and a page ordinate (pageY) of the mouse button lifting operation triggered on the online document page as termination positions of the drag selection operation, and respectively records the termination abscissa (endX) and the termination ordinate (endY), where the termination abscissa (endX) and the termination ordinate (endY) are second position information.
In one embodiment, a play interface is displayed on a client page of the online document, the client page including a "comment" button. When a target display picture is displayed on a playing interface, a first user clicks a comment button, a first client pauses playing of media resources, the first user selects a partial region on the target display picture, and the first client determines the partial region on the target display picture as a target region. The comment button is configured for the client page, so that the target area is determined on the target display picture displayed on the play interface, and the operation is simple and convenient.
Optionally, the method for commenting on an online document further includes: and determining the target area based on the first position information and the second position information under the condition that the distance between the initial position and the termination position is greater than or equal to a third preset threshold value.
In one example, it is determined that the distance between the initial position and the terminal position satisfies the following equation:
C 2 =(X1-X2) 2 +(Y1-Y2) 2
wherein, C represents the distance between the initial position and the end position, X1 represents the abscissa of the first page, Y1 represents the ordinate of the first page, X1 represents the abscissa of the second page, and Y1 represents the ordinate of the second page.
In one example, the third preset threshold is 5-15 centimeters. For example 5 cm, 10 cm or 15 cm. Of course, the third preset threshold may also be specifically adjusted according to the size of the playing interface, for example, when the size of the playing interface is smaller than the first threshold, the third preset threshold may be a smaller value, such as 3 centimeters, or when the size of the playing interface is larger than the second threshold, the third preset threshold may be a larger value, such as 20 centimeters, which is not limited in this disclosure.
In one example, a rectangular region formed by the first position information and the second position information is determined as the target region. The initial position and the end position are diagonal points of the rectangular area.
In another example, a circular area formed by taking a middle point on a straight line distance between the initial position and the end position as a center and taking a distance from the center to the initial position or the end position as a radius is taken as a target area. Wherein the initial position and the end position are both on the circumference of the circular area.
In the above embodiment, when the target display screen is displayed on the play interface, the target area on the target display screen is determined through the position information of two trigger operations on the play interface, so that the operation is simple and convenient, and the accuracy of determining the target area is improved.
S202b: in response to the second generation operation, target comment data for commenting the target area is generated.
Optionally, S202b includes the following steps one to three.
The method comprises the following steps: comment information is obtained, and the comment information is used for indicating comment content of the target area.
In one implementation, if the user wants to input comment information about the target area, the user may perform a fifth trigger operation, for example, select a text input option of the online document, the first client generates a text input box in response to the fifth trigger operation, the text input box may be located in the playing interface, and then the user may input comment information about the target area in the text input box, and the client obtains the comment information input by the user in response to the input operation of the text input box.
In another embodiment, the first step includes: generating a text input box in the target area; and acquiring comment information in response to an input operation on the text input box. Wherein the comment information is located in the target area.
In one example, the first client simultaneously generates a text input box in the target area and activates the text input box to be in an inputtable state when the target area is displayed on the play interface. The first user inputs comment information in the text input box, and the first client responds to input operation on the text input box and acquires the comment information.
It should be noted that, in a case where the occupied area of the comment information input by the first user is greater than or equal to the target area, the target area is automatically increased to overlap with the occupied area.
In the embodiment, the text input box is automatically generated in the target area and is used for the first user to input the comment information, so that the comment information located in the target area is obtained, and therefore, the first user does not need to perform other triggering operations to activate the input state, the operation is simple and convenient, the efficiency is high, the relevance between the comment information and the target area is improved, and other collaborative objects can determine the comment object corresponding to the comment information conveniently.
Optionally, the method for commenting on an online document further includes: and under the condition of obtaining the comment information, responding to a sixth trigger operation, and restarting playing the media resource.
In one embodiment, the first user account clicks the enter key after the comment information is input, and the first client restarts playing the media resource in response to the click operation, so that the user can watch the content of the media resource continuously.
Step two: and acquiring relative position information of the target area, wherein the relative position information is used for indicating the relative position relationship between the target area and the playing interface.
Optionally, the relative position information includes at least one of relative height information, relative width information, horizontal relative position information, and vertical relative position information.
Optionally, the second step includes: acquiring third position information of the playing interface on the page and fourth position information of the target area on the page; based on the third position information and the fourth position information, relative position information of the target area is determined.
In one embodiment, the third position information includes a height of the playing interface, a width of the playing interface, a distance from a left side of the playing interface to a left side of the page, and a distance from a top side of the playing interface to a top side of the page. The fourth location information includes a target region height, a target region width, a distance of a left side of the target region from a left side of the page, and a distance of a top side of the target region from a top side of the page.
In one example, based on the playing interface height and the target area height, relative height information of the target area is determined, e.g., relative height = target area height/playing interface height.
In one example, based on the playing interface width and the target area width, relative width information of the target area is determined, e.g., relative width = target area width/playing interface width.
In one example, the horizontal relative position information is determined based on the distance of the left side of the playing interface from the left side of the page and the distance of the left side of the target area from the left side of the page, for example, horizontal relative position = (distance of the left side of the target area from the left side of the page-distance of the left side of the playing interface from the left side of the page)/width of the playing interface.
It is to be noted that when the horizontal relative position is less than or equal to 0, it is determined that the horizontal relative position information is equal to 0. When the horizontal relative position is greater than or equal to 1, it is determined that the horizontal relative position information is equal to 1.
In one example, based on the distance of the top edge of the playing interface from the top edge of the page and the distance of the top edge of the target zone from the top edge of the page, vertical relative position information is determined, e.g., vertical relative position = (distance of the top edge of the target zone from the top edge of the page-distance of the top edge of the playing interface from the top edge of the page)/height of the playing interface.
It is to be noted that, when the vertical relative position is less than or equal to 0, it is determined that the vertical relative position information is equal to 0. When the vertical relative position is greater than or equal to 1, it is determined that the vertical relative position information is equal to 1.
It should be noted that, when the page of the online document is a web page, the third location information and the fourth location information may be obtained through getbackingclientrect provided by the browser. The getBoundingClientRec is a control used by a browser for acquiring the position relation of a certain element on a webpage relative to a window.
In the above embodiment, the relative position information of the target area is determined by playing the third position information of the interface on the page and the fourth position information of the target area on the page, which is helpful for improving the accuracy of the display positions of other cooperative objects in the target area in the online document of other cooperative objects when other cooperative objects display the target area based on the relative position information of the target area.
Step three: in comment data of an online document, target comment data is created. The target comment data comprise the relative position information and comment information of the target area.
By configuring that the target comment data comprise the position information and comment information of the target area, the display positions of the target area and the comment information can be determined according to the relative position information when other collaborative objects display the target comment data, and therefore the accuracy of the object to be reviewed indicated by the target area is improved.
Optionally, the target comment data further includes a type identifier. The type identifier is used for indicating that the target comment data is a comment of the media resource class. By configuring comment types for the target comment data, comments belonging to the media resources are selected according to the comment types in the comment data of the online documents, and the comment data positioning accuracy of the media resources is improved.
In one embodiment, in the original comment implementation of the online document, that is, based on the original manner of adding comments to the online document, comment data with a comment type of a media resource class is created in comment data of the online document, and additional information, for example, at least one of relative position information of a target area, comment information, an identifier of a media resource to which the target comment data belongs, and playing time information of a target display picture in the media resource, is recorded in the comment data.
In the embodiment, the comment data belonging to the media resources are created by creating the target comment data with the comment type being the media resource class, so that the comment data of the media resources are favorably distinguished from comment data of other elements in the online document, other collaborative objects are favorably enabled to accurately pick out the comment data of the media resources from the comment data of the online document for display, and the multiple collaborative objects are favorably enabled to communicate the content of the media resources.
In the above embodiment, the target region is displayed on the target display screen in response to the first generation operation of the user, and then the target comment data is generated in response to the second generation operation of the user, which is helpful for the user to determine whether the region selected by the first generation operation is the target region to be commented on, and is further helpful for improving the accuracy of determining the region to be commented (i.e., the target region).
S203: and synchronizing the target comment data to the second client so that the target comment data can be displayed when the target display screen of the media resource is played in the online document by the second client.
The second client is another client using the online document, that is, the client co-processing the online document with the first client.
In one implementation mode, after generating the target comment data, the first client sends a comment instruction to the server, wherein the comment instruction comprises the target comment data. After receiving the comment instruction, the server stores the target comment data in the comment instruction, and sends the comment instruction to other second clients which are authorized to use to view/modify the online document through WebSocket broadcast messages, so that the target comment data are synchronized with the second client which is cooperated with the first client.
It should be noted that other second clients using the online document may be, for example, a client using the online document, or may be a client using the online document before generating the target comment data, or may be a client that may use the online document after generating the target comment data.
In the embodiment, the target comment data is generated for the target area in the media resource (such as a video, an image or a plug-in) in the online document, and the target comment data is synchronized to the second client which views the online document, that is, the second client which is cooperated with the first client, so that a plurality of cooperative objects can communicate the content of the media resource, and the communication and cooperation efficiency of cooperative work of the online document is improved. In addition, the target comment data are used for indicating comments on the target area on the target display picture, so that other collaborative objects can understand the comment object to which the target comment data aim, and the other collaborative objects can be prevented from subjectively understanding the comment object to which the target comment data aim, or searching the comment object to which the target comment data aim in the media resource, so that the understanding cost of the collaborative objects on the target comment data can be reduced, and the collaborative communication efficiency can be improved.
Optionally, the target comment data includes play time information of the target display screen in the media resource. The playing time information of the target display picture in the media resource is configured in the target comment data, so that the second client can determine the time for the playing interface to display the target display picture, the accuracy of the second client for displaying the target comment data is improved, and the target comment data is prevented from being displayed on a non-target display picture.
Optionally, the target comment data includes an identification of a media resource to which the target comment data pertains. The identification of the media resource to which the target comment data belongs is configured in the target comment data, so that the second client can determine the media resource corresponding to the target comment data, the accuracy of displaying the target comment data by the second client is improved, and the target comment data is prevented from being displayed on the playing interfaces of other media resources.
FIG. 4 is a flowchart illustrating another method for commenting on an online document for a second client, according to an exemplary embodiment. As shown in fig. 4, the method for commenting an online document includes the steps of:
s401: and displaying a playing interface in the page of the online document, wherein the playing interface is used for playing the media resources in the online document.
In one embodiment, in response to a sixth triggering operation, for example, a clicking operation of the second client by the second user, the second client is started, and the page of the online document is displayed. Further, in response to a seventh trigger operation, for example, a click operation of the second user on the media resource, a playing interface is displayed in the page to play the media resource in the online document.
In one embodiment, the second client is a Web client and the pages of the online document comprise Web pages.
In another embodiment, the second client is an online document client and the pages of the online document include client pages.
S402: in the process of playing the media resources on the playing interface, target comment data belonging to the media resources are obtained, and the target comment data are used for indicating comments on a target area on a target display picture of the media resources.
Optionally, the target area is used to indicate an object to be reviewed in the target display screen. That is, on the target display screen, the content located in the target area is the object to be evaluated.
Optionally, the media resource comprises a plurality of image frames, and the target display screen is any one of the plurality of image frames.
Optionally, the target comment data includes an identifier of a media resource to which the target comment data belongs, S402, including:
the method comprises the following steps: and acquiring the identification of the media resource under the condition of detecting the update of the playing time.
In one embodiment, the second client monitors a time update event of the media resource in the online document, for example, the time update event may be an update of a playing time of the media resource, and in a case that the time update event is triggered, that is, the playing time of the media resource is updated, the second client obtains an identifier of the currently playing media resource in response to the triggering operation.
In another embodiment, in a case that the content of the currently displayed picture on the playing interface changes abruptly, for example, the content may change abruptly such that the similarity value of two adjacent image frames is less than or equal to a preset threshold value, and the identifier of the currently played media resource is obtained.
Step two: and traversing the comment data of the online document, and acquiring target comment data from the comment data of the online document. And the identification of the media resource to which the target comment data belongs is the same as the identification of the media resource.
The target comment data comprise a comment type of the target comment data, and the comment type of the target comment data is a media resource type.
Optionally, a plurality of first comment data are included in the comment data of the online document. Each first comment data is configured with a comment type identification.
In an implementation manner, when a first client traverses comment data of an online document, the first comment data is obtained under the condition that an identifier of a media resource to which the first comment data belongs is the same as an identifier of a currently played media resource, and a comment type identifier of the first comment data represents a media resource class, and the first comment data is a target comment number belonging to the media resource.
In the embodiment, the comment data of the online document are traversed to obtain the target comment data, the identifier of the media resource to which the target comment data belongs is the same as the identifier of the currently played media resource, and the comment type of the target comment data is the media resource type, so that the accuracy of the obtained target comment data is improved, and the comment data of the media resource which is not currently played and the comment data of other elements in the online document are prevented from being obtained.
S403: and displaying the target comment data on a target display picture of the media resource played on the playing interface.
Optionally, the target comment data includes play time information of the target display screen in the media resource, and S403 includes: and under the condition that the difference value between the current playing time of the media resource and the playing time information is smaller than or equal to a first preset threshold value, displaying the target comment data.
In one embodiment, in the case that a time update event is triggered, the second client acquires the current playing time of the media asset. In another embodiment, the second client obtains the current playing time of the media resource when the target comment data is obtained.
In the above embodiment, by setting the first preset threshold and displaying the target comment data when the difference between the current playing time of the media resource and the playing time information is less than or equal to the first preset threshold, the target comment data is displayed when the target display picture is displayed on the playing interface, so that the accuracy of the display time of the target comment data is improved, and the target comment data is prevented from being displayed on the non-target display picture.
Optionally, the method for commenting on an online document further includes: and under the condition that the difference value between the current playing time of the media resource and the playing time information is greater than or equal to a second preset threshold value, stopping displaying the target comment data.
In one embodiment, the target comment data is stopped from being displayed, and the target comment data may be hidden from being displayed. In another embodiment, the stopping of displaying the target comment data may be to destroy a block-level element and hide the displayed comment information.
In the above embodiment, by setting the second preset threshold and stopping displaying the target comment data when the difference between the current playing time of the media resource and the playing time information is greater than or equal to the second preset threshold, it is helpful to avoid displaying the target comment data when the non-target display picture is displayed on the playing interface, so that the target comment data is prevented from shielding the content on the non-target display picture.
In one embodiment, as shown in fig. 5, the total playing time of the media resource is 35 seconds, and the playing time information of the target display screen in the media resource is 3 seconds, that is, when the media resource is played for the 3 rd second, the target display screen is displayed on the playing interface. In the process of playing the media resources, the second client side obtains target comment data belonging to the media resources, the target comment data are used for indicating comments on a target area on a target display picture, and the target comment data are displayed on the target display picture displayed on the playing interface.
It should be noted that the gray scale area in fig. 5 is used to characterize the target area, and when actually displayed, the area may be a transparent color, so as to view the object to be evaluated in cooperation with the object. The grayscale region representation is used in this disclosure for the sake of differentiation from fig. 3 only.
In the embodiment, the target comment data of the target media resource is displayed on the playing interface of the online document, so that the multiple collaborative objects can communicate the content of the target media resource, and the communication and collaboration efficiency of online document collaborative office is improved. In addition, the target comment data are used for indicating comments on the target area on the target display picture, so that the cooperative object can understand the comment object to which the target comment data aim, the cooperative object can be prevented from subjectively understanding the comment object to which the target comment data aim, or the comment object to which the target comment data aim is searched in the target media resource, the understanding cost of the cooperative object on the target comment data can be reduced, and the cooperative communication efficiency can be improved.
Optionally, the target comment data includes relative position information of the target area and comment information, the relative position information is used for indicating a relative position relationship between the target area and the play interface, and the comment information is used for indicating comment content on the target area.
Further, S403 includes:
the method comprises the following steps: and determining first position information of the target area on the playing interface based on the relative position information.
Optionally, the relative position information includes at least one of relative height information, relative width information, horizontal relative position information, and vertical relative position information.
Optionally, the first position information includes at least one of a target region height, a target region width, a distance of a target region left edge from a page left side edge, and a distance of a target region top edge from a page top edge.
Optionally, the first step includes: acquiring second position information of the playing interface on the page; the first location information is determined based on the second location information and the relative location information of the target area.
The second position information comprises at least one of the width of the playing interface, the height of the playing interface, the distance from the left side edge of the playing interface to the left side edge of the page and the distance from the top edge of the playing interface to the top edge of the page.
In one example, the target area height in the first position information is determined based on the playback interface height and the relative height information, e.g., target area height = playback interface height × relative height information.
In one example, the target region width in the first location information is determined based on the play interface width and the relative width information, e.g., target region width = play interface width x relative width information.
In one example, the distance of the left side of the target region from the left side of the page in the first position information is determined based on the distance of the left side of the playing interface from the left side of the page and the horizontal relative position information, for example, the distance of the left side of the target region from the left side of the page = the distance of the left side of the playing interface from the left side of the page + the width of the playing interface × the horizontal relative position information.
In one example, the distance of the top edge of the target region from the top edge of the page in the first position information is determined based on the distance of the top edge of the playing interface from the top edge of the page and the vertical relative position information, e.g., the distance of the top edge of the target region from the top edge of the page = the distance of the top edge of the playing interface from the top edge of the page + the height of the playing interface × the vertical relative position information.
In the above embodiment, the first position information of the target area on the playing interface is determined through the second position information of the playing interface on the page and the relative position information of the target area, which is helpful for improving the accuracy of the first position information.
Step two: and displaying the target area and the comment information on the target display screen based on the first position information.
Optionally, the second step includes: in the case where the play interface displays the target display screen, the target area is displayed at the position indicated by the first position information, and the comment information is displayed within the target area.
In the embodiment, the comment information is displayed in the target area, so that the collaborative object can understand the comment information in comparison with the to-be-reviewed object indicated by the target area, the accuracy of the collaborative object in understanding the comment information is improved, and the understanding cost of the collaborative object in understanding the target comment data is reduced.
Optionally, the second step includes: creating block-level elements on the page, and inserting the block-level elements into the target area indicated by the first position information, wherein the block-level elements comprise comment information; in the case where the play interface displays the target display screen, the block-level elements are displayed.
In one embodiment, in the case that the page of the online document includes a web page, a block-level element (div) is newly created on the web page, and it is determined that a content attribute (innerText) of the block-level element includes comment information. Further, the position information of the block-level element is determined to include the first position information. Further, the parent node (i.e., the play interface) of the block-level element is set to the relative position, the block-level element is set to the absolute position, and the block-level element is inserted into the area indicated by the first position information in the parent node.
In the embodiment, the block-level elements are created on the page, so that the target area and the comment information are displayed on the target display picture, the method is simple, convenient and efficient, and the accuracy of the display time of the target comment data is improved.
In the above embodiment, the first position information of the target area on the playing interface is determined by the relative position information, and the target area and the comment information are displayed on the target display screen based on the first position information, which is helpful for improving the accuracy of the display position of the target area.
Optionally, the method for commenting on an online document further includes: monitoring a broadcast message sent by a server in the playing process of the media resource; in the case where target comment data belonging to a media resource is included in a broadcast message, the target comment data belonging to the media resource is received and the comment data belonging to the media resource is stored in comment data of an online document.
In one implementation mode, after the first client generates the target comment data, a comment instruction including the target comment data is sent to the server. And after receiving the comment instruction, the server sends the comment instruction to a second client authorized to use the online document through WebSocket broadcast messages.
In one implementation formula, for a target second client that does not currently use an online document, when the target second client uses the online document next time, for example, when the online document is initialized after the online document is opened, target evaluation data in a broadcast message is received and stored in comment data of the online document, so that the target comment data is displayed when a media resource of the online document is played.
In one example, in the case that comment data of a media resource class is included in the broadcast message, the second client receives the comment data of the media resource class and saves the comment data of the media resource class into comment data of the online document.
In the embodiment, the broadcast message sent by the server is monitored in the playing process of the media resource, and the comment data belonging to the media resource is received, so that the latest comment data of the currently played media resource can be acquired in real time, and the real-time performance and the communication efficiency of the collaborative office are improved.
FIG. 6 is an interaction diagram illustrating a method for commenting on an online document, for a first client, a second client, and a server, according to an example embodiment. As shown in fig. 6, the method for commenting an online document includes the steps of:
s601, the first client displays a playing interface in the page of the online document, and the playing interface is used for playing the media resources in the online document.
In one embodiment, in response to a second trigger operation, for example, a click operation of the first user on the first client, the first client is started and a page of the online document is displayed. Further, in response to a third trigger operation, for example, a click operation of the first user on the media resource, a playing interface is displayed in the page to play the media resource in the online document.
And S602, when the first client plays the target display screen of the media resource on the playing interface, responding to the comment generation operation, and generating target comment data, wherein the target comment data is used for indicating the comment of the target area on the target display screen.
In the process of playing the media resources, the first client monitors the dragging selection operation on the playing interface, when the dragging selection operation of the first user on the playing interface is monitored, the playing of the media resources is suspended, and when the dragging selection operation of the first user on the playing interface is monitored to be stopped, the target area is displayed on the target display picture, and the target comment data are generated.
S603, the first client synchronizes the target comment data to the second client so that the second client displays the target comment data when playing the target display screen of the media resource in the online document.
The first client generates target comment data of the media resources and sends a comment instruction to the server, wherein the comment instruction comprises the target comment data.
Wherein the target comment data is used to indicate a comment to a target area on the target display screen.
In one implementation mode, after generating target comment data, a first client sends a comment instruction to a server, wherein the comment instruction comprises the target comment data, and the target comment data is synchronized with a second client coordinated with the first client.
And S604, the server receives the comment instruction and sends a broadcast message to the second client, wherein the broadcast message comprises the target comment data.
Wherein the comment instruction includes target comment data.
In one implementation mode, the server receives a comment instruction sent by the first client, and the comment instruction comprises target comment data. Further, after receiving the comment instruction, the server stores the target comment data in the comment instruction, and sends the comment instruction to other second clients viewing the online document through WebSocket broadcast messages, so that the second clients display the target comment data.
And S605, the second client displays a playing interface in the page of the online document, and the playing interface is used for playing the media resources in the online document.
In one embodiment, in response to an eighth trigger operation, for example, a click operation of the second user on the second client, the second client is started, and the page of the online document is displayed. Further, in response to a ninth trigger operation, for example, a click operation of the media resource by the second user, a playing interface is displayed in the page to play the media resource in the online document.
And S606, the second client monitors the broadcast message sent by the server and receives the target comment data belonging to the media resource under the condition that the broadcast message comprises the target comment data belonging to the media resource.
Optionally, the target comment data belonging to the media asset is stored into comment data of the online document.
In one implementation mode, under the condition that the broadcast message includes target comment data of a media resource class, the second client receives the target comment data of the media resource class and stores the target comment data of the media resource class into comment data of an online document, wherein the target comment data of the media resource class is the target comment data belonging to the media resource.
S607, in the process of playing the media resources on the playing interface, the target comment data belonging to the media resources are obtained.
Wherein the target comment data is used to indicate a comment to a target area on a target display screen of the media asset.
In one implementation mode, when a first client traverses comment data of an online document, the first comment data is obtained under the condition that an identifier of a media resource to which the first comment data belongs is the same as an identifier of a currently played media resource and a comment type identifier of the first comment data represents a media resource class, and the first comment data is target comment data belonging to the media resource.
And S608, displaying the target comment data on a target display picture of the media resource played on the playing interface.
In one embodiment, in a case where a target display screen is displayed on the playback interface, target comment data is displayed on the target display screen.
In the embodiment, the first client generates the target comment data for the media resource in the online document, and the target comment data is synchronized to the second client cooperating with the first client, and the second client displays the target comment data of the target media resource on the playing interface of the online document, so that the multiple cooperating objects can communicate the content of the media resource, and the communication and cooperation efficiency of the online document cooperation office is improved. In addition, the target comment data are used for indicating comments on the target area on the target display picture, so that other collaborative objects can understand the comment object targeted by the target comment data, the subjective understanding of the comment object targeted by the target comment data by other collaborative objects is avoided, or the comment object targeted by the target comment data is searched in media resources, the understanding cost of the collaborative objects on the target comment data is reduced, and the collaborative communication efficiency is improved.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the disclosure also provides a comment device of the online document. FIG. 7 is a block diagram illustrating a review device for an online document, according to an example embodiment. Referring to fig. 7, the apparatus for commenting on an online document 700 includes a display module 701, a generation module 702, and a commenting module 703.
The display module 701 is configured to execute displaying a playing interface in a page of the online document, where the playing interface is used for playing a media resource in the online document. For example, in conjunction with fig. 2, the display module 701 may be configured to perform S201.
The generating module 702 is configured to execute generating, in response to the comment generating operation, target comment data when the target display screen of the media resource is played by the playing interface, where the target comment data is used to indicate a comment to a target area on the target display screen. For example, in conjunction with fig. 2, the generation module 702 may be used to perform S202.
The comment module 703 is configured to synchronize the target comment data to the second client, so that the second client displays the target comment data when playing the target display screen of the media resource in the online document. For example, in conjunction with fig. 2, the review module 703 may be used to perform S203.
In one possible implementation, the comment generating operation includes a first generating operation and a second generating operation, the generating module being specifically configured to perform: displaying a target area on a target display screen in response to a first generation operation; in response to the second generation operation, target comment data for commenting the target area is generated.
In a possible implementation, the first generating operation includes a first triggering operation and a second triggering operation, and the generating module 702 is specifically configured to perform: in response to a first trigger operation on a playing interface, pausing playing of the media resource; and responding to a second trigger operation on the playing interface, and displaying a target area on the target display screen based on the first position information of the first trigger operation and the second position information of the second trigger operation.
In another possible implementation, the generating module 702 is specifically configured to perform: obtaining comment information, wherein the comment information is used for indicating comment content of a target area; acquiring relative position information of the target area, wherein the relative position information is used for indicating the relative position relationship between the target area and the playing interface; creating target comment data in comment data of an online document; the target comment data includes the comment information and the relative position information of the target area.
In another possible implementation, the generating module 702 is specifically configured to perform: generating a text input box in the target area; and acquiring comment information in response to an input operation on the text input box.
In another possible implementation, the generating module 702 is specifically configured to perform: acquiring third position information of a playing interface on a page and fourth position information of a target area on the page; based on the third position information and the fourth position information, relative position information of the target area is determined.
In another possible implementation manner, the target comment data includes playing time information of the target display picture in the media resource; and/or the target commentary data comprises an identification of a media resource to which the target commentary data belongs.
The embodiment of the disclosure also provides another online document commenting device.
FIG. 8 is a block diagram illustrating another review device for an online document, according to an example embodiment. Referring to fig. 8, the apparatus 800 for commenting on an online document includes a display module 801, an acquisition module 802, and a commenting module 803.
The display module 801 is configured to execute displaying a playing interface in a page of the online document, where the playing interface is used for playing a media resource in the online document. For example, in conjunction with fig. 4, the display module 801 may be used to perform S401.
The obtaining module 802 is configured to, during the process of playing the media resource on the playing interface, obtain target comment data belonging to the media resource, where the target comment data is used to indicate a comment on a target area on a target display screen of the media resource. For example, in conjunction with fig. 4, the obtaining module 802 may be configured to perform S402.
And a comment module 803 configured to display the target comment data when the target display screen of the media resource is played by the play interface. For example, in conjunction with fig. 4, the review module 803 may be used to perform S403.
In a possible implementation manner, the target comment data includes an identifier of a media resource to which the target comment data belongs, and the obtaining module 802 is specifically configured to perform: acquiring the identifier of the media resource under the condition of detecting the updating of the playing time; traversing comment data of the online document, and acquiring target comment data from the comment data of the online document; the identification of the media resource to which the target comment data belongs is the same as the identification of the media resource, and the comment type of the target comment data is a media resource type.
In another possible implementation manner, the target comment data includes relative position information of the target area and comment information, the relative position information is used for indicating a relative position relationship between the target area and the play interface, and the comment information is used for indicating comment content to the target area; the review module 803 is specifically configured to perform: determining first position information of the target area on the playing interface based on the relative position information; the target area and the comment information are displayed on the target display screen based on the first position information.
In another possible implementation, the comment module 803 is specifically configured to perform: acquiring second position information of the playing interface on the page; the first location information is determined based on the second location information and the relative location information of the target area.
In another possible implementation, the comment module 803 is specifically configured to perform: in the case where the play interface displays the target display screen, the target area is displayed at the position indicated by the first position information, and the comment information is displayed within the target area.
In another possible implementation, the comment module 803 is specifically configured to perform: creating block-level elements on the page, and inserting the block-level elements into the target area indicated by the first position information; the block level element comprises comment information; in the case where the play interface displays the target display screen, the block-level elements are displayed.
In another possible implementation, the comment module 803 is further configured to perform: monitoring a broadcast message sent by a server; in the case where comment data belonging to a media resource is included in a broadcast message, target comment data belonging to the media resource is received and stored in comment data of an online document.
In another possible implementation, the target comment data includes play time information of the target display screen in the media resource, and the comment module 803 is specifically configured to perform: and under the condition that the difference value between the current playing time of the media resource and the playing time information is less than or equal to a first preset threshold value, displaying the target comment data.
In another possible implementation, the comment module 803 is further configured to perform: and under the condition that the difference value between the current playing time of the media resource and the playing time information is greater than or equal to a second preset threshold value, stopping displaying the target comment data.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment. As shown in fig. 9, electronic device 900 includes, but is not limited to: a processor 901 and a memory 902.
The memory 902 is configured to store executable instructions of the processor 901. It is understood that the processor 901 is configured to execute instructions to implement the online document commenting method in the above embodiment.
It should be noted that the first electronic device structure shown in fig. 9 does not constitute a limitation of the first electronic device, and the first electronic device may include more or less components than those shown in fig. 9, or combine some components, or arrange different components, as will be understood by those skilled in the art.
The processor 901 is a control center of the first electronic device, connects various parts of the entire first electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the first electronic device. Processor 901 may include one or more processing units; optionally, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 901.
The memory 902 may be used to store software programs as well as various data. The memory 902 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a display module, a generation module, or a comment module) required by at least one functional module, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
In some embodiments, the electronic device may perform the above-described method for commenting on an online document performed by the first electronic device. In actual implementation, the processing functions of the display module 701, the generation module 702, and the comment module 703 may be implemented by the processor 901 shown in fig. 9 calling the program code in the memory 902. For the specific implementation process, reference may be made to the description of the online document review method part shown in the above embodiment, which is not described herein again.
In other embodiments, the electronic device may perform the method for commenting on an online document performed as described above with respect to the second electronic device. In actual implementation, the processing functions of the display module 801, the obtaining module 802, and the comment module 803 may be implemented by the processor 901 shown in fig. 9 calling program codes in the memory 902. For the specific implementation process, reference may be made to the description of the online document review method shown in the foregoing embodiment, and details are not repeated here.
In an exemplary embodiment, the present disclosure also provides a comment system of an online document, including: the electronic device comprises a first electronic device and a second electronic device, wherein the first electronic device is used for executing a comment method of an online document executed by the first electronic device; and the second electronic equipment is used for executing the comment method of the online document executed by the second electronic equipment. Wherein the first electronic device and the second electronic device are communicatively connected.
In an exemplary embodiment, the disclosed embodiment also provides a computer-readable storage medium, such as a memory 902, including instructions executable by a processor 901 of a first electronic device 900 to perform a method for commenting an online document performed by the first electronic device in the above-described embodiment, or a method for commenting an online document performed by a second electronic device in the above-described embodiment.
Alternatively, the computer-readable storage medium may be a non-transitory computer-readable storage medium, which may be, for example, a Read-Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, the disclosed embodiments also provide a computer program product comprising one or more instructions executable by the processor 901 of the first electronic device 900 to complete the description of the online document review method portion shown in the above-described embodiments, or executable by the processor 1001 of the second electronic device 1000 to complete the description of the online document review method portion shown in the above-described embodiments.
It should be noted that when executed by the processor 901 of the first electronic device 900, the instructions in the computer-readable storage medium or one or more instructions in the computer program product implement the processes of the above embodiment of the online document review method, and can achieve the same technical effect as the above online document review method, and in order to avoid repetition, details are not repeated here. The instructions in the computer-readable storage medium or one or more instructions in the computer program product are executed by the processor 1001 of the second electronic device 1000 to implement the processes of the embodiment of the online document review method, and the same technical effects as the online document review method can be achieved, and are not described herein again to avoid repetition.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for commenting an online document, for a first client, the method comprising:
displaying a playing interface in a page of the online document, wherein the playing interface is used for playing media resources in the online document;
when the target display screen of the media resource is played on the playing interface, generating target comment data in response to a comment generation operation, wherein the target comment data is used for indicating a comment of a target area on the target display screen;
and synchronizing the target comment data to a second client so that the target comment data can be displayed when the target display screen of the media resource is played in the online document by the second client.
2. The method of claim 1, wherein the comment generation operation comprises a first generation operation and a second generation operation, and wherein generating target comment data in response to the comment generation operation comprises:
displaying the target area on the target display screen in response to the first generation operation;
generating the target comment data for commenting the target area in response to the second generation operation.
3. A method for commenting an online document, for a second client, the method comprising:
displaying a playing interface in a page of the online document, wherein the playing interface is used for playing media resources in the online document;
in the process of playing the media resource on the playing interface, target comment data belonging to the media resource are obtained, wherein the target comment data are used for indicating comments on a target area on a target display picture of the media resource;
and when the target display screen of the media resource is played on the playing interface, displaying the target comment data.
4. The method of claim 3, wherein the target comment data includes an identification of a media resource to which the target comment data belongs, and wherein the obtaining target comment data belonging to the media resource includes:
acquiring the identifier of the media resource under the condition of detecting the updating of the playing time;
traversing the comment data of the online document, and acquiring the target comment data from the comment data of the online document; and the identification of the media resource to which the target comment data belongs is the same as the identification of the media resource.
5. An apparatus for commenting an online document, comprising:
a display module configured to execute displaying a play interface in a page of the online document, the play interface being used for playing a media resource in the online document;
the generating module is configured to execute generating target comment data in response to a comment generating operation when the target display screen of the media resource is played by the playing interface, wherein the target comment data is used for indicating a comment of a target area on the target display screen;
the comment module is configured to synchronize the target comment data to a second client so that the second client can display the target comment data when playing a target display screen of the media resource in the online document.
6. An apparatus for commenting an online document, comprising:
a display module configured to execute displaying a play interface in a page of the online document, the play interface being used for playing a media resource in the online document;
the acquisition module is configured to acquire target comment data belonging to the media resource in the process of playing the media resource on the playing interface, wherein the target comment data is used for indicating a comment of a target area on a target display picture of the media resource;
a comment module configured to display the target comment data when the target display screen of the media resource is played by the play interface.
7. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of claim 1 or 2, or to implement the method of claim 3 or 4.
8. A system for commenting on an online document, comprising:
a first electronic device for performing the method of claim 1 or 2;
a second electronic device for performing the method of claim 3 or 4.
9. A computer readable storage medium storing computer instructions which, when executed by a processor of a first electronic device, enable the first electronic device to perform the method of claim 1 or 2, or which, when executed by a processor of a second electronic device, enable the second electronic device to perform the method of claim 3 or 4.
10. A computer program product, characterized in that it comprises computer instructions which, when run on a first electronic device, cause the first electronic device to perform the method of claim 1 or 2, or which, when run on a second electronic device, cause the second electronic device to perform the method of claim 3 or 4.
CN202210855236.8A 2022-07-20 2022-07-20 Method, device, equipment, system and storage medium for commenting online document Pending CN115309308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210855236.8A CN115309308A (en) 2022-07-20 2022-07-20 Method, device, equipment, system and storage medium for commenting online document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210855236.8A CN115309308A (en) 2022-07-20 2022-07-20 Method, device, equipment, system and storage medium for commenting online document

Publications (1)

Publication Number Publication Date
CN115309308A true CN115309308A (en) 2022-11-08

Family

ID=83857019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210855236.8A Pending CN115309308A (en) 2022-07-20 2022-07-20 Method, device, equipment, system and storage medium for commenting online document

Country Status (1)

Country Link
CN (1) CN115309308A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743973A (en) * 2016-01-22 2016-07-06 上海科牛信息科技有限公司 Multi-user multi-device real-time synchronous cloud cooperation method and system
CN109635261A (en) * 2018-11-16 2019-04-16 天津字节跳动科技有限公司 Online document content edition method, device, storage medium and electronic equipment
CN109981711A (en) * 2017-12-28 2019-07-05 腾讯科技(深圳)有限公司 Document dynamic play method, apparatus, system and computer readable storage medium
CN110019279A (en) * 2019-04-11 2019-07-16 北京字节跳动网络技术有限公司 Collaboration update method, device, equipment and the storage medium of online document
CN110909521A (en) * 2019-11-14 2020-03-24 北京字节跳动网络技术有限公司 Synchronous processing method and device for online document information and electronic equipment
CN111444670A (en) * 2020-02-28 2020-07-24 通彩视听科技(上海)有限公司 Document annotation method and device, computer equipment and storage medium
CN111597467A (en) * 2020-05-08 2020-08-28 北京字节跳动网络技术有限公司 Display method and device and electronic equipment
CN112114734A (en) * 2020-09-28 2020-12-22 腾讯科技(深圳)有限公司 Online document display method and device, terminal and storage medium
CN113891165A (en) * 2020-07-03 2022-01-04 腾讯科技(深圳)有限公司 Comment processing method, comment processing device, comment processing equipment and computer-readable storage medium
CN114154456A (en) * 2021-12-02 2022-03-08 北京字跳网络技术有限公司 Method, device, equipment and medium for processing information in document

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743973A (en) * 2016-01-22 2016-07-06 上海科牛信息科技有限公司 Multi-user multi-device real-time synchronous cloud cooperation method and system
CN109981711A (en) * 2017-12-28 2019-07-05 腾讯科技(深圳)有限公司 Document dynamic play method, apparatus, system and computer readable storage medium
CN109635261A (en) * 2018-11-16 2019-04-16 天津字节跳动科技有限公司 Online document content edition method, device, storage medium and electronic equipment
CN110019279A (en) * 2019-04-11 2019-07-16 北京字节跳动网络技术有限公司 Collaboration update method, device, equipment and the storage medium of online document
CN110909521A (en) * 2019-11-14 2020-03-24 北京字节跳动网络技术有限公司 Synchronous processing method and device for online document information and electronic equipment
CN111444670A (en) * 2020-02-28 2020-07-24 通彩视听科技(上海)有限公司 Document annotation method and device, computer equipment and storage medium
CN111597467A (en) * 2020-05-08 2020-08-28 北京字节跳动网络技术有限公司 Display method and device and electronic equipment
CN113891165A (en) * 2020-07-03 2022-01-04 腾讯科技(深圳)有限公司 Comment processing method, comment processing device, comment processing equipment and computer-readable storage medium
CN112114734A (en) * 2020-09-28 2020-12-22 腾讯科技(深圳)有限公司 Online document display method and device, terminal and storage medium
CN114154456A (en) * 2021-12-02 2022-03-08 北京字跳网络技术有限公司 Method, device, equipment and medium for processing information in document

Similar Documents

Publication Publication Date Title
US9984408B1 (en) Method, medium, and system for live video cooperative shopping
US11528535B2 (en) Video file playing method and apparatus, and storage medium
US20190116212A1 (en) Contextual and Collaborative Media
CN103744575B (en) A kind of method and apparatus for the input auxiliary area for being used to provide input application
US20210274106A1 (en) Video processing method, apparatus, and device and storage medium
US20190230311A1 (en) Video interface display method and apparatus
CN110333919B (en) Method and equipment for presenting social object information
CN111612639B (en) Synchronous communication method and system applied to insurance scheme
CN111209417A (en) Information display method, server, terminal and storage medium
CN112969097A (en) Content playing method and device, and content commenting method and device
CN112073301A (en) Method, device and computer readable medium for deleting chat group members
US20170017382A1 (en) System and method for interaction between touch points on a graphical display
CN103677519A (en) Method for collecting multimedia resource, terminal and server
CN112989112B (en) Online classroom content acquisition method and device
CN108718423B (en) Working method of two-dimensional code information sharing system between television terminal and mobile terminal
CN112752132A (en) Cartoon picture bullet screen display method and device, medium and electronic equipment
US10452727B2 (en) Method and system for dynamically providing contextually relevant news based on an article displayed on a web page
US20170279749A1 (en) Modular Communications
CN115309308A (en) Method, device, equipment, system and storage medium for commenting online document
WO2022183967A1 (en) Video picture display method and apparatus, and device, medium and program product
US11675492B2 (en) Determining user engagement in content based on scrolling events
WO2024113679A1 (en) Multimedia resource processing method and apparatus, and device
CN113065061B (en) Information display method, device and server
WO2023029924A1 (en) Comment information display method and apparatus, device, storage medium, and program product
US20240184503A1 (en) Overlaying an image of a conference call participant with a shared document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination