CN110188298B - Comment display method and data acquisition method - Google Patents

Comment display method and data acquisition method Download PDF

Info

Publication number
CN110188298B
CN110188298B CN201910444962.9A CN201910444962A CN110188298B CN 110188298 B CN110188298 B CN 110188298B CN 201910444962 A CN201910444962 A CN 201910444962A CN 110188298 B CN110188298 B CN 110188298B
Authority
CN
China
Prior art keywords
comment
target
comments
identifier
article
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910444962.9A
Other languages
Chinese (zh)
Other versions
CN110188298A (en
Inventor
张嵩昊
徐本俊
张敏
徐路
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Origin Quantum Computing Technology Co Ltd
Original Assignee
Origin Quantum Computing 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 Origin Quantum Computing Technology Co Ltd filed Critical Origin Quantum Computing Technology Co Ltd
Priority to CN201910444962.9A priority Critical patent/CN110188298B/en
Publication of CN110188298A publication Critical patent/CN110188298A/en
Application granted granted Critical
Publication of CN110188298B publication Critical patent/CN110188298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a comment displaying method and a data obtaining method, wherein the comment displaying method comprises the following steps: receiving a target trigger operation aiming at a target hidden comment in a comment area; the comment area displays part or all of first-level comments related to a target article and part of quote comments of each comment in the part or all of the first-level comments, the target article is an article replied by the target first-level comment, and the target hidden comment is a quote comment of the target first-level comment; and responding to the target triggering operation, and displaying the target hidden comment in a multi-level comment mode. By applying the technical scheme provided by the embodiment of the invention, the rendering efficiency of the front-end interface can be improved, and a user can conveniently browse the post comments.

Description

Comment display method and data acquisition method
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a comment displaying method and a data acquiring method.
Background
With the continuous evolution of internet technology, the daily life and work requirements of people are continuously enriched, various platforms such as forums, microblogs and various information websites with social attributes are developed vigorously, users are introduced in large quantities, interaction is frequent, and published news, posts or microblogs often have huge numbers of comments. How to show comments and thus provide better services becomes a concern for many platforms.
In the existing platform, when the rendering of a comment area in a front-end interface is performed, comments and all comments quoted by each comment are generally displayed in a certain sequence under the theme content, the visual effect is disordered, and when the number of the comments is too large, the rendering efficiency is low due to too much content to be rendered at one time.
Disclosure of Invention
The invention aims to provide a comment displaying method and a data obtaining method, which are used for overcoming the defects in the prior art, improving the rendering efficiency of a front-end interface and facilitating the browsing of comments by a user.
In order to achieve the purpose, the invention discloses a comment displaying method and a data obtaining method, and the specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention discloses a comment displaying method, where the method includes:
receiving a target trigger operation aiming at a target hidden comment in a comment area; the comment area displays part or all of first-level comments related to a target article and part of quote comments of each comment in the part or all of the first-level comments, the target article is an article replied by the target first-level comment, and the target hidden comment is a quote comment of the target first-level comment;
and responding to the target triggering operation, and displaying the target hidden comment in a multi-level comment mode.
Optionally, the step of presenting the target hidden comment includes:
for different types of said target trigger operations,
displaying part or all of the target hidden comments; or the like, or, alternatively,
and displaying the comments made by the specific users in the target hidden comments.
Optionally, the method further comprises:
receiving a specific trigger operation aiming at a target user;
and displaying the comments published by the target user for the target article in response to the specific trigger operation.
Optionally, the partial reference comment of each comment in the partial or all of the primary comments is presented based on the following manner:
and for each comment in the partial or all primary comments, displaying a preset number of comments which are issued earliest and/or are issued latest in the quoted comments of the comment according to the publication time sequence, wherein other quoted comments which are not displayed in the comment are represented by a specific symbol.
Optionally, the partial reference comment of each comment in the partial or all of the primary comments is presented based on the following manner:
and for each comment in the partial or all primary comments, showing the partial reference comment of the comment and the total number of the comment reference comments.
Optionally, the partial reference comment of each comment in the partial or all of the primary comments is presented based on the following manner:
and for each comment in the partial or all primary comments, displaying the partial reference comment of the comment in a display mode of a secondary comment or a multi-level comment.
In a second aspect, an embodiment of the present invention discloses a data acquisition method, where the method includes:
receiving a first acquisition parameter; the first acquisition parameter comprises a target parent comment identifier, and the target parent comment identifier is a reference identifier of a corresponding comment identifier;
obtaining target comment attribute information marked by the target parent comment identification from a target database; the target database stores comment attribute information marked by comment identifications and parent comment identifications of each comment identification in advance;
and returning the target comment attribute information.
Optionally, before the step of receiving the first acquisition parameter, the method further includes:
receiving a target article identifier;
determining a target comment identifier marked by the target article identifier and a parent comment identifier marked by the target comment from the target database; the target database is stored with a corresponding relation between comment identifications and article identifications in advance;
respectively obtaining part identification in the determined parent comment identification and comment attribute information of the target comment identification from a target database;
and returning the obtained comment attribute information.
Optionally, the method further comprises:
returning the determined parent comment identification.
Optionally, the first acquisition parameter further includes a target parameter; the target parameter is used for representing the target comment attribute information of a part or all of the identification marks in the target parent comment identification.
Optionally, the first acquisition parameter further includes a first user identifier;
the step of obtaining the target comment attribute information marked by the target parent comment identification from the target database includes:
obtaining target comment attribute information of the associated identification mark from the target database; wherein the association identifier is: and the comment identifier marked by the first user identifier is in the target parent comment identifier.
Optionally, the method further comprises:
receiving a second acquisition parameter; the second acquisition parameter comprises the article identifier and a second user identifier;
and obtaining and returning specific comment attribute information marked by the second user identification and the article identification together from the target database.
Optionally, the method further comprises:
and returning a specific father comment identifier corresponding to the specific comment attribute information and the comment attribute information marked by part of identifiers in the specific father comment identifier.
Optionally, a parent comment identification of a comment identification is characterized by the content of a specified field in the target database; the specified field is used for sequentially storing the parent comment identifiers referenced by the comment identifiers according to the reference sequence.
Compared with the prior art, by applying the technical scheme provided by the embodiment of the invention, the comments directly replied to the target article and the comment replied to a certain comment of the target article are displayed as first-level comments, so that the personal comments of the user are highlighted, and the quoted comments are displayed in a multi-level comment mode, so that the user can know the reason of each comment more easily; the front-end interface does not need to load all comments quoted by each comment, and the comments quoted by a certain comment are loaded only when the user triggers, so that the content loading of the interface at one time is reduced, the interface rendering efficiency is improved, and the user experience is better.
In addition, in the prior art, due to design such as paging loading, when citation comments are too many, several pages or even tens of pages can be continuously displayed for citation of one comment, and a disordered visual effect is easily caused for a user.
Drawings
FIG. 1 is a flow chart of a comment presentation method provided by an embodiment of the present invention;
FIG. 2 is a diagram illustrating an exemplary effect of a comment presentation method provided by an embodiment of the present invention;
FIG. 3 is another exemplary effect diagram of a comment presentation method provided by an embodiment of the present invention;
fig. 4 is a flowchart of a data acquisition method according to an embodiment of the present invention.
Detailed Description
The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
In order to improve the interface rendering efficiency and facilitate the user to browse comments, the embodiment of the invention provides a comment display method and a data acquisition method.
First, a comment displaying method provided by an embodiment of the present invention is described below.
It should be noted that the comment displaying method provided in the embodiment of the present invention can be applied to an application platform with a comment function, such as a forum, an information network, or mobile phone software, according to actual needs, and is not limited herein.
As shown in fig. 1, a comment displaying method provided by an embodiment of the present invention may include the following steps:
s101, receiving target trigger operation aiming at the target hidden comment in the comment area.
The comment area displays part or all of the first-level comments related to the target article and part of quote comments of each comment in the part or all of the first-level comments, the target article is an article replied by the target first-level comment, and the target hidden comment is a quote comment of the target first-level comment.
Specifically, in one implementation, the partial quote comments for each comment in some or all of the primary comments may be presented based on:
and aiming at each comment in part or all of the primary comments, a preset number of comments which are issued earliest and/or are issued latest in the quoted comments of the comment are displayed according to the publication time sequence, and other quoted comments which are not displayed in the comment are represented by a specific symbol.
In another implementation, the partial reference comment of each comment in some or all of the primary comments may be presented based on:
for each comment in some or all of the primary comments, a partial reference comment for the comment and the total number of reference comments for the comment are presented.
In yet another implementation, the partial reference comment for each comment in some or all of the primary comments may be presented based on:
and for each comment in part or all of the primary comments, displaying the partial reference comment of the comment in a display mode of the secondary comment or the multi-level comment.
In practical applications, the target article may be a topic post in a forum, or may be a piece of information in an information website, or other contents with a comment module. In order to better interact with the user, the first-level comments of the target article can be displayed in the comment area according to the publication time sequence.
Specifically, when a user performs an operation of opening an article, the server may obtain an ID (Identity) of the article, query all primary comments related to the article from a preset database according to the article ID, return part or all of the primary comments according to specific requirements, return the ID of a quoted comment of each primary comment to a front-end interface to be rendered in a certain format (e.g., a number group format, a character string format, etc.), and store data in the front-end interface, so as to perform a subsequent related interaction operation. Wherein, the front-end interface is an application interface directly facing to the user; the process of exposing code written by the back-end to the front-end interface is called rendering.
It can be understood that the preset database stores attribute information of the current article in advance, which may include information such as an article ID, an article topic, comment-related information, author-related information, and release time; and the comment-related information may include information such as a comment ID, an article ID, a comment author ID, a replied-to user ID, a reference comment ID, and the like. In order to facilitate subsequent rendering of the reference comments, the ID of each reference comment can be used in a reference sequence, stored in a designated field of a corresponding data table in a preset database at intervals, and then rendered in the front-end interface in sequence.
For example, the ID of the reference comment of the comment a is 1,2,3,4, where a refers to 4, 4 refers to 3, 3 refers to 2,2 refers to 1, the field in the comment attribute information data table storing the ID of the reference comment is p _ IDs, and p _ IDs can be defined as varchar type, it can be understood that varchar is used to represent character data, and a variable-length character string can be stored, so that the ID of the reference comment can be used and stored in p _ IDs in a "spaced manner", and the specific storage content can be: "1, 2,3, 4" or "4, 3,2, 1". It should be noted that, the reference sequence among the reference comments corresponds to the publication time sequence, and the referenced comments are necessarily published first, so the IDs of the reference comments can also be stored according to the publication time sequence.
In the prior art, in some social websites, such as microblogs, a reply of a user to a certain primary comment can only be displayed under the comment, and the user often cannot directly see the comment list. In fact, users usually pay more attention to the interaction between themselves and article authors or other users, and therefore, in order to focus on the comments of the users themselves and highlight the personal comments of the users, in the technical scheme provided by the embodiment of the present invention, both the comment directly replied to the target article and the comment replied to a certain comment of the target article are displayed as first-level comments. As shown in fig. 2, the 4 th-floor comment returned by the user U80219 to the 2 th floor is also displayed as a first-level comment, so that the comment of the user U80219 is clear at a glance.
In specific implementation, considering the rendering efficiency of the front-end interface, when the front-end interface is rendered for the first time, a certain number of comments, such as 10 comments, of the target article can be displayed at most in the comment area. Specifically, when the number of comments of the target article is not less than 10, only 10 of the latest comments can be rendered for the first time; when the number of the comments of the target article is less than 10, for example, 5 comments can be displayed in a whole.
It can be understood that when reference relations exist among the comments, in order to enable a user to better understand the reason of the comment, the first-level comment and the corresponding reference comment can be simultaneously displayed in the comment area when the front-end interface is rendered for the first time. Specifically, the server may query the first-level comment of the article and the corresponding partial citation comment (for example, the first two) at the same time and return the first-level comment, and after the user clicks the review details, query all comments corresponding to the first-level comment.
It should be noted that the reference comment includes a direct reference comment and an indirect reference comment, as shown in fig. 2, the 4 th floor is the direct reference comment of the 5 th floor, and the 4 th floor is the direct reference comment of the 2 th floor is the indirect reference comment of the 5 th floor. In consideration of the interface rendering efficiency and the interface visual effect, only partial reference comments, as shown in fig. 2, only the direct reference comment of floor 5 may be shown. In practical application, the user usually also cares more about the directly cited comments, so that the manner of only showing the part of the first-level comments to quote the comments is more in line with the use habits of the user.
More specifically, the citation comments may be presented in a chronological order, wherein a preset number of comments which are presented earliest and/or are presented latest are presented, and other citation comments which are not presented are characterized by specific symbols, for example, 10 citation comments are presented, so that only 1 citation comment which is presented earliest and 1 citation comment which is presented latest (i.e., is presented latest) can be presented, and the remaining 8 citations are characterized by ellipses, so that a user can clearly know the source and the latest state of the content discussed by the current-level comment. The specific symbol may be the above-mentioned ellipsis (…), or may be a symbol indicating that contents are omitted, which is well known to the user, such as a wavy line (—).
When partial citation comments are presented, the total number of the citation comments of the current-level comment can be presented at the same time, as shown in fig. 2; or the part of the quoted comments of the comments are displayed in a secondary comment or multi-level comment display mode, and particularly, when only the directly quoted comments of the comments are displayed, the comments can be directly displayed in the secondary comment mode; when the direct reference comment and the indirect reference comment of the comment are simultaneously displayed, the reference relation among the comments can be clearly displayed in a multi-level comment mode.
It is emphasized that hidden comments refer to quoted comments that are not exposed at the interface. The user can trigger the operation aiming at the hidden comment in the comment area according to the requirement, and the server can make a corresponding response after receiving the trigger operation so as to display the hidden comment on the interface.
And S102, responding to the target trigger operation, and displaying the target hidden comment in a multi-level comment mode.
Specifically, when a target triggering operation occurs on the front-end interface, the ID of the target hidden comment can be used as a parameter to be sent to the server, the server queries specific comment information according to the ID and returns the comment information, the front-end interface determines the reference relationship among the ID of the target hidden comment according to the stored information of the ID of the hidden comment, the returned data are sequentially rendered, and finally the target hidden comment is displayed in a multi-level comment mode.
Assume that the front-end interface has a first-level comment C5 and its direct reference comment C4 (second-level comment) exposed therein. And storing the corresponding hidden comment ID as an array P [2] according to the sequence that C4 refers to C3 and C3 refers to C1, wherein P [0] ═ C1 and P [1] ═ C3, after triggering operation is performed on the hidden comment ID, C1 and C3 serve as parameters to be sent to the server, the server inquires corresponding comment information and returns the comment information to the front-end interface, and then, based on the element sequence in the array P [2], rendering is performed on the comment information identified by C3 and C1 as a third-level comment and a fourth-level comment respectively. It can be seen that typically the top-level comment is the most basic citation comment, i.e., the comment that was first posted in the citation comment. Wherein, C1, C3, C4 and C5 are all comment identifiers.
It should be noted that when the displayed hidden comment is no longer valuable to the user, the displayed hidden comment can be hidden so as to keep the interface concise and clear. How to hide is the prior art, and is not described herein again.
As can be understood by those skilled in the art, the elements shown in the front-end interface can be regarded as a node object, and in the prior art, multiple levels of comments are often layered through differences in the display. Specifically, container objects of each level of comments are generally additionally introduced, and different presentation attributes are then assigned to different container objects, but the additional container objects inevitably cause a reduction in interface rendering efficiency.
In order to avoid the above problem, as shown in fig. 2, in the case that the interface renders and displays the first-level comment and the directly referenced comment of the first-level comment for the first time, only the directly referenced comment may be highlighted, and when the hidden comment is displayed, the reference sequence or relationship among the hidden comments is represented by a specific character, so that the reference relationship among the comments is displayed more intuitively and simply.
The specific characters can be numbers, the most basic reference comments can be defined as 1 layer, and then the reference comments are sequentially increased according to the reference relation; the character string may also be a "floor number + number", etc., and is not limited herein. Referring to fig. 2 and 3, when the user clicks "view all" of building 5 in fig. 2, the interface rendering result is as shown in fig. 3, building 4 of the second-level comment is highlighted, building 2 of the third-level comment is displayed at the right end, "1" of building 1 of the fourth-level comment is displayed at the right end, and the reference relationship among the comments is clearly shown, that is, building 5 directly references building 4, building 4 directly references building 2, and building 2 directly references building 1.
Specifically, the step of presenting the target hidden comment may include:
the operation is triggered for different types of targets,
displaying part or all of the comments in the target hidden comment; or the like, or, alternatively,
and displaying the comments made by the specific user in the target hidden comments.
In practical application, hidden comments can be displayed completely by triggering once, as shown in fig. 3; however, when there are many quoted comments, the user may not need to view all the hidden comments, and may trigger to display only part of the hidden comments at a time, for example, 50 hidden comments may be displayed, and may trigger to display only 3 items with the latest posting time at a time. Therefore, on the premise of meeting the requirements of users, the interface rendering efficiency is not reduced due to one-time loading of too much data.
In another application scenario, only comments posted by a specific user in the hidden comments can be displayed, specifically, when a certain user is clicked in a comment area or a certain user is searched, only comments posted by a specific user in the hidden comments can be displayed, more specifically, an ID of a current-level comment and an ID of a specific user can be sent to a server as parameters, and the server queries corresponding data by using the two parameters as indexes and returns the data; or the comment quoting area under the current comment is partially refreshed, and all comments of the specific user quoted by the current comment are displayed.
By applying the technical scheme provided by the embodiment of the invention shown in FIG. 1, target triggering operation aiming at target hidden comments is received in a comment area; the comment area displays part or all of the first-level comments related to the target article and part of quote comments of each comment in the part or all of the first-level comments, the target article is an article replied by the target first-level comment, and the target hidden comment is a quote comment of the target first-level comment; then, in response to the target triggering operation, the target hidden comment is presented in a multi-level comment mode.
Compared with the prior art, by applying the technical scheme provided by the embodiment of the invention shown in FIG. 1, the comments directly replied to the target article and the comments replied to a certain comment of the target article are displayed as first-level comments, so that the personal comments of the user are highlighted, and the quoted comments are displayed in a multi-level comment mode, so that the user can know the reason of each comment more easily; the front-end interface does not need to load all comments quoted by each comment, and the comments quoted by a certain comment are loaded only when the user triggers, so that the content loading of the interface at one time is reduced, the interface rendering efficiency is improved, and the user experience is better. In addition, in the prior art, due to design such as paging loading, when citation comments are too many, several pages or even tens of pages can be continuously displayed for citation of one comment, and a disordered visual effect is easily caused for a user.
Further, when a user focuses on a certain user (the user himself or another user) and wants to highlight the comment of the user in the comment area, the comment of the user for the target article can be displayed in a targeted manner, so that a better service is provided for the user. Correspondingly, on the basis of the embodiment shown in fig. 1, the comment displaying method provided by the embodiment of the present invention may further include:
receiving a specific trigger operation aiming at a target user;
and in response to a specific trigger operation, displaying comments published by the target user for the target article.
More specifically, when a specific triggering operation of the front-end interface is triggered, the ID of the current article and the ID of the target user may be sent to the server as parameters, and the server queries corresponding data by using the two parameters as indexes and returns the data.
It should be noted that the above-mentioned "target trigger operation" and "specific trigger operation" are all interface trigger operations, and the "target" and "specific" are merely for distinguishing and do not have a limited function, and the interface trigger operation may be an operation such as a single click, a double click, a long press, an input, or a click button, and is not limited herein. It can be understood by those skilled in the art that the interface display or the interaction function (e.g., detection and response of a trigger operation) can be implemented based on a script language or a framework with a rendering function, such as JavaScript, jQuery, Python, and the like, and the application of these languages or frameworks is the prior art, and will not be described herein again.
In order to improve the interface rendering efficiency, the embodiment of the invention also provides a data acquisition method, and it can be understood that the method is applied to a server, and particularly can be applied to websites (such as forums, microblogs and the like) or client software with a comment function.
As shown in fig. 4, a data obtaining method provided in an embodiment of the present invention may include the following steps:
s401, receiving a first acquisition parameter.
It is to be understood that, prior to the step of receiving the first acquisition parameter, the method may further comprise:
receiving a target article identifier;
determining a target comment identifier marked by a target article identifier and a parent comment identifier marked by the target comment from a target database; the target database is pre-stored with the corresponding relation between the comment identification and the article identification;
comment attribute information of a part of the determined parent comment identification and the target comment identification is respectively obtained from a target database;
and returning the obtained comment attribute information.
Further, the method may further include:
returning the determined parent comment identification.
It can be understood that before performing corresponding operations on the comments of the target article, the user needs to open the target article first and render the front-end interface for the first time.
In practical application, a website or client software has a corresponding database for storing various data information including user information, article information, and the like, and different types of data are stored in a sub-table manner, that is, stored in a plurality of data tables respectively, considering the data processing capability of the database.
For example, for article information, article attribute information may be specifically stored in a table, where the article attribute information may include article identifiers, article topics, comment numbers, author-related information, release time, and the like; then, storing the specific comment attribute information in another associated table, where the comment attribute information may include: comment identification, article identification, comment author identification, identification of replied users, quote comment identification and other information. Specifically, a field may be specified in the table of comment attribute information to store an identifier of a reference comment of each comment, that is, a corresponding parent comment identifier; more specifically, to facilitate reading of data, the parent comment identifiers referenced by the comment identifiers may be stored sequentially in the reference order.
In the prior art, in some social websites, such as microblogs, a reply of a user to a certain primary comment is only displayed or hidden under the comment. In fact, users usually pay more attention to the interaction between themselves and article authors or other users, so in order to focus on the comments of the users themselves and highlight the personal comments of the users, in the first rendering process, after receiving comment attribute data returned by the server, the front-end interface can display the comments directly replied to the target article and the comments replied to a certain comment of the target article as first-level comments.
In order to better interact with the user and help the user to know the reason of the comment, the first-level comments of the target article can be displayed in the comment area according to the publication time sequence, and meanwhile, the partial quoted comments of the first-level comments can be displayed.
Specifically, for an article, when a front-end interface is rendered for the first time, an article identifier is sent to a server, the server receives the article identifier, and article attribute information and comment attribute information are returned according to the article identifier, so that a relevant comment is displayed on the front-end interface.
More specifically, for the comment attribute information, the server may use the article identifier as an index, query in a table of a corresponding database in which the comment attribute information is stored, determine the identifier of the relevant comment of the current article and the identifier of the cited comment of each comment, then, according to the requirement, obtain attribute data of the relevant comment of part or all of the current article and the identifier of the cited comment of each comment, then query the comment attribute data corresponding to the determined comment identifier, and return to the front-end interface for display. Further, the quote comment identifier (i.e. the parent comment identifier) of each comment in the first rendering may be returned together and stored in the front-end interface for use when a subsequent user wants to view the hidden quote comment or perform other operations.
It should be noted that the reference comments include direct reference comments and indirect reference comments, as shown in fig. 2, the 4 th floor is the direct reference comment of the 5 th floor, and the 2 nd floor is the indirect reference comment of the 5 th floor. In consideration of the interface rendering efficiency and the interface visual effect, only partial reference comments, as shown in fig. 2, only the direct reference comment of floor 5 may be shown. In practical application, the user usually also cares more about the directly cited comments, so that the manner of only showing the part of the first-level comments to quote the comments is more in line with the use habits of the user. Therefore, the server side can only return the attribute information of the directly-referenced comment of each comment when rendering is carried out for the first time.
After an article page is opened, namely after the first rendering is finished, when a user wants to check a quote comment hidden in a comment, corresponding operation is triggered on a front-end interface, after the operation is triggered, a first acquisition parameter including a quote comment identifier to be checked (namely a target father comment identifier) is sent to a server, and the server performs subsequent data acquisition operation according to the parameter.
The target parent comment identifier is a quote identifier of the corresponding comment identifier, and specifically, the target parent comment identifier is a quote comment of the corresponding comment. It should be noted that the target parent comment identifier, the parent comment identifier, and the comment identifier are all identifiers of the same type, that is, the identifiers of the comments of the current article, "parent", "target", and the like are only used to indicate the reference relationship between the two identifiers, and do not have the function of defining the identifier type, and are not described in detail later.
S402, obtaining the target comment attribute information marked by the target parent comment identification from the target database.
As can be seen from the description of S401, the comment attribute information of the comment identification flag and the parent comment identification of the comment identification are stored in advance in the target database, and are not described here any more.
Specifically, in a first implementation manner, the first acquisition parameter may further include a target parameter; the target parameter is used for expressing the attribute information of the target comment of a part or all of the identification marks in the inquired target parent comment identification;
in a second implementation manner, the first acquisition parameter may further include a first user identifier;
the step of obtaining the target comment attribute information marked by the target parent comment identification from the target database may include:
obtaining target comment attribute information of the associated identification mark from a target database; wherein the association identifier is: and the comment identification marked by the first user identification in the target parent comment identification.
In practical application, when there are many citation comments, a user may not need to view all hidden comments, and in this application scenario, only comment attribute information of a part of the citation comments may be returned at a time, and it can be understood that a part of comments with the latest citation relationship, that is, a part of comments with the latest publication time in the citation comments, is usually returned. Specifically, the preset number of citation comments can be directly defined as acquisition, the first acquisition parameter may also include a target parameter, and the server determines to specifically acquire comment attribute information of part or all of the citation comments according to the target parameter. The target parameter may be a specific number, for example, 2, and after receiving the parameter, the server may query comment attribute information of 2 identification tags having the closest reference relationship from a parent comment identifier of the current comment. Therefore, on the premise of meeting the requirements of users, the interface rendering efficiency is not reduced due to one-time loading of too much data.
In another application scenario, only comments posted by a specific user in the quoted comments of the current comments can be displayed, specifically, when a certain user is clicked or searched in the quoted comment area, the server receives a first acquisition parameter with a first user identifier, then finds out an associated identifier in the quoted comment identifier (namely, a target parent comment identifier) corresponding to the current comment by using the first user identifier and the identifier of the current comment as indexes, and then returns comment attribute information marked by the associated identifier to the front-end interface.
And S403, returning the attribute information of the target comment.
It should be noted that the server returns the obtained comment attribute information to the front-end interface, and the front-end interface is displayed in a multi-level comment manner, which is specifically shown in S102 in the embodiment shown in fig. 1 and is not described here again.
In practical application, when a user focuses on a certain user (the user or another user) and wants to highlight the comment of the user in the comment area, the comment of the user for the target article can be displayed in a targeted manner, so that a better service is provided for the user. Specifically, the user triggers a corresponding operation on the front-end interface, the server receives the seal identifier and the second user identifier, and then the comments, which are issued by the user corresponding to the second user identifier and are specific to the current article, are found by using the seal identifier and the second user identifier as indexes. Correspondingly, on the basis of the embodiment shown in fig. 4, the data acquisition method provided in the embodiment of the present invention may further include the following steps:
receiving a second acquisition parameter; the second acquisition parameter comprises an article identifier and a second user identifier;
and obtaining and returning specific comment attribute information marked by the second user identification and the article identification from the target database.
On the basis, in order to enable the user to better understand the causal consequence of each comment of the interested user, the partial quote comment of each comment and the partial quote comment identification of each comment can be returned at the same time for further review in the following process. Accordingly, the method may further comprise:
and returning a specific father comment identifier corresponding to the specific comment attribute information and comment attribute information marked by part of identifiers in the specific father comment identifier.
It will be appreciated that the "particular parent comment identifier" is a referring comment identifier for the comment posted by the second user identifier corresponding to the user.
Compared with the prior art, by applying the technical scheme provided by the embodiment of the invention shown in FIG. 4, the comments directly replied to the target article and the comments replied to a certain comment of the target article are displayed as first-level comments, so that the personal comments of the user are highlighted, and the quoted comments are displayed in a multi-level comment mode, so that the user can know the reason of each comment more easily; the front-end interface does not need to load all comments quoted by each comment, and the comments quoted by a certain comment are loaded only when the user triggers, so that the content loading of the interface at one time is reduced, the interface rendering efficiency is improved, and the user experience is better. In addition, in the prior art, due to design such as paging loading, when citation comments are too many, several pages or even tens of pages can be continuously displayed for citation of one comment, and a disordered visual effect is easily caused for a user.
It is emphasized that, in this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In addition, the structure, characteristics and operation of the present invention are described in detail in the embodiments shown in the drawings, and the above description is only a preferred embodiment of the present invention, but the present invention is not limited by the scope of the drawings, and all equivalent embodiments modified according to the idea of the present invention or modified as equivalent are within the protection scope of the present invention without departing from the spirit of the present invention covered by the description and the drawings.

Claims (14)

1. A comment presentation method, characterized in that the method comprises:
receiving a target trigger operation aiming at a target hidden comment in a comment area; the comment area displays part or all of first-level comments related to a target article and part of quote comments of each comment in the part or all of the first-level comments, the target article is an article replied by the target first-level comment, and the target hidden comment is a quote comment of the target first-level comment;
responding to the target triggering operation, displaying the target hidden comment in a multi-level comment mode, and displaying the comment directly replying the target article and the comment replying a certain comment of the target article as first-level comments;
when the target hidden comments are displayed, the reference sequence or the relation among the target hidden comments is represented by specific characters.
2. The comment presenting method according to claim 1, wherein the step of presenting the target hidden comment includes:
for different types of said target trigger operations,
displaying part or all of the target hidden comments;
or the like, or, alternatively,
and displaying the comments made by the specific users in the target hidden comments.
3. The comment presentation method of claim 2, further comprising:
receiving a specific trigger operation aiming at a target user;
and displaying the comments published by the target user for the target article in response to the specific trigger operation.
4. The comment presenting method according to claim 1, wherein the partial reference comment of each comment in the partial or all of the primary comments is presented based on:
and for each comment in the partial or all primary comments, displaying a preset number of comments which are issued earliest and/or are issued latest in the quoted comments of the comment according to the publication time sequence, wherein other quoted comments which are not displayed in the comment are represented by a specific symbol.
5. The comment presenting method according to claim 1, wherein the partial reference comment of each comment in the partial or all of the primary comments is presented based on:
and for each comment in the partial or all primary comments, showing the partial reference comment of the comment and the total number of the comment reference comments.
6. The comment presenting method according to claim 1, wherein the partial reference comment of each comment in the partial or all of the primary comments is presented based on:
and for each comment in the partial or all primary comments, displaying the partial reference comment of the comment in a display mode of a secondary comment or a multi-level comment.
7. A method for data acquisition, the method comprising:
receiving a first acquisition parameter; the first acquisition parameter comprises a target parent comment identifier, and the target parent comment identifier is a reference identifier of a corresponding comment identifier;
obtaining target comment attribute information marked by the target parent comment identification from a target database; the target database stores comment attribute information marked by comment identifications and parent comment identifications of each comment identification in advance;
returning the attribute information of the target comment, and displaying the comment directly replied to the target article and the comment replied to a certain comment of the target article as first-level comments;
when the target hidden comments are displayed, the reference sequence or the relation among the target hidden comments is represented by specific characters.
8. The data acquisition method as claimed in claim 7, wherein prior to the step of receiving first acquisition parameters, the method further comprises:
receiving a target article identifier;
determining a target comment identifier marked by the target article identifier and a parent comment identifier marked by the target comment from the target database; the target database is stored with a corresponding relation between comment identifications and article identifications in advance;
respectively obtaining part identification in the determined parent comment identification and comment attribute information of the target comment identification from a target database;
and returning the obtained comment attribute information.
9. The data acquisition method of claim 8, further comprising:
returning the determined parent comment identification.
10. The data acquisition method according to claim 9, wherein the first acquisition parameter further comprises a target parameter; the target parameter is used for representing the target comment attribute information of a part or all of the identification marks in the target parent comment identification.
11. The data acquisition method as claimed in claim 9, wherein the first acquisition parameter further comprises a first user identification;
the step of obtaining the target comment attribute information marked by the target parent comment identification from the target database includes:
obtaining target comment attribute information of the associated identification mark from the target database; wherein the association identifier is: and the comment identifier marked by the first user identifier is in the target parent comment identifier.
12. The data acquisition method of claim 8, further comprising:
receiving a second acquisition parameter; the second acquisition parameter comprises the article identifier and a second user identifier;
and obtaining and returning specific comment attribute information marked by the second user identification and the article identification together from the target database.
13. The data acquisition method of claim 12, further comprising:
and returning a specific father comment identifier corresponding to the specific comment attribute information and the comment attribute information marked by part of identifiers in the specific father comment identifier.
14. The data acquisition method according to any one of claims 7 to 13, wherein a parent comment identifier of a comment identifier is characterized by the content of a specified field in the target database; the specified field is used for sequentially storing the parent comment identifiers referenced by the comment identifiers according to the reference sequence.
CN201910444962.9A 2019-05-27 2019-05-27 Comment display method and data acquisition method Active CN110188298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910444962.9A CN110188298B (en) 2019-05-27 2019-05-27 Comment display method and data acquisition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910444962.9A CN110188298B (en) 2019-05-27 2019-05-27 Comment display method and data acquisition method

Publications (2)

Publication Number Publication Date
CN110188298A CN110188298A (en) 2019-08-30
CN110188298B true CN110188298B (en) 2022-03-18

Family

ID=67717862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910444962.9A Active CN110188298B (en) 2019-05-27 2019-05-27 Comment display method and data acquisition method

Country Status (1)

Country Link
CN (1) CN110188298B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414543B (en) * 2020-03-25 2023-03-21 抖音视界有限公司 Method, device, electronic equipment and medium for generating comment information sequence
CN111597467A (en) * 2020-05-08 2020-08-28 北京字节跳动网络技术有限公司 Display method and device and electronic equipment
CN113891165B (en) * 2020-07-03 2024-05-17 腾讯科技(深圳)有限公司 Comment processing method, comment processing device, comment processing equipment and computer-readable storage medium
CN112131501B (en) * 2020-10-15 2021-12-07 北京字节跳动网络技术有限公司 Comment display method and terminal equipment
CN113157165A (en) * 2021-05-12 2021-07-23 北京字跳网络技术有限公司 Information display method and device, electronic equipment and program product
CN114338591B (en) * 2022-03-14 2022-07-12 北京搜狐新媒体信息技术有限公司 Online interaction method and device, electronic equipment and computer storage medium
CN116016965A (en) * 2022-12-13 2023-04-25 维沃移动通信有限公司 Bullet screen display method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045899A (en) * 2015-08-03 2015-11-11 北京金山安全软件有限公司 Comment content providing method and device and terminal equipment
CN106407371A (en) * 2016-09-09 2017-02-15 广州神马移动信息科技有限公司 User comment data displaying method and system, server and client
CN107180032A (en) * 2016-03-09 2017-09-19 广州市动景计算机科技有限公司 Comment on content display method and system
CN109725803A (en) * 2018-12-20 2019-05-07 网易(杭州)网络有限公司 Comment information processing method and processing device, storage medium, electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5133911B2 (en) * 2009-01-19 2013-01-30 株式会社セルシス Comment display method, program, and apparatus
US8380732B2 (en) * 2010-04-13 2013-02-19 ReFrame-It, Inc Systematic process for creating large numbers of relevant, contextual marginal comments based on existing discussions of quotations and links
US9519525B2 (en) * 2013-11-14 2016-12-13 Dropbox, Inc. File-level commenting
CN104572883B (en) * 2014-12-22 2019-01-25 东软集团股份有限公司 The implementation method and device of clue between quickly revert and comment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045899A (en) * 2015-08-03 2015-11-11 北京金山安全软件有限公司 Comment content providing method and device and terminal equipment
CN107180032A (en) * 2016-03-09 2017-09-19 广州市动景计算机科技有限公司 Comment on content display method and system
CN106407371A (en) * 2016-09-09 2017-02-15 广州神马移动信息科技有限公司 User comment data displaying method and system, server and client
CN109725803A (en) * 2018-12-20 2019-05-07 网易(杭州)网络有限公司 Comment information processing method and processing device, storage medium, electronic equipment

Also Published As

Publication number Publication date
CN110188298A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN110188298B (en) Comment display method and data acquisition method
US10891348B1 (en) Identifying relevant messages in a conversation graph
JP6427159B2 (en) Interacting with spreadsheets using text messages
US9800679B2 (en) Defining a social network model implied by communications data
CN102385615B (en) Information collection and presentation
US9449050B1 (en) Identifying relevant messages in a conversation graph
CN109873745B (en) Communication control method, communication control device and storage medium
US9418117B1 (en) Displaying relevant messages of a conversation graph
US20140074843A1 (en) Systems and methods for dynamic analysis, sorting and active display of semantic-driven reports of communication repositories
US20140068465A1 (en) Method and system for displaying micro-blog message, micro-blog terminal, and server, and storage medium
US20150195224A1 (en) Method and system for classifying man vs. machine generated e-mail
US9002725B1 (en) System and method for targeting information based on message content
TW200842608A (en) System and method for related information search and presentation from user interface content
US20110246277A1 (en) Multi-factor promotional offer suggestion
US20150278180A1 (en) System and method for annotating webpages
AU2020285704A1 (en) System and method for the generation and interactive editing of living documents
CN114730419A (en) Composing social media messages referencing multiple messages
Smith et al. The ties that bind: Network overlap among independent congregations
Sams et al. The presence of hyperlinks on social network sites: A case study of Cyworld in Korea
KR101610847B1 (en) Server and method providing product recommending service using social network service
US20150363803A1 (en) Business introduction interface
US8589492B2 (en) Electronic message object drop feature
CN104461224B (en) Information processing method and electronic equipment
CN110866170A (en) Importance evaluation method, search method and system for Tor darknet service based on site quality
Alduaij An exploratory study of m-commerce key benefits and barriers among actual users, intentional users and non-intentional users

Legal Events

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