CN117112774A - Comment ordering method, electronic device and storage medium - Google Patents

Comment ordering method, electronic device and storage medium Download PDF

Info

Publication number
CN117112774A
CN117112774A CN202211710384.7A CN202211710384A CN117112774A CN 117112774 A CN117112774 A CN 117112774A CN 202211710384 A CN202211710384 A CN 202211710384A CN 117112774 A CN117112774 A CN 117112774A
Authority
CN
China
Prior art keywords
comment
target
parameter value
content
time length
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
CN202211710384.7A
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.)
Fuzhou Changxin Information Technology Co ltd
Original Assignee
Fuzhou Changxin 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 Fuzhou Changxin Information Technology Co ltd filed Critical Fuzhou Changxin Information Technology Co ltd
Priority to CN202211710384.7A priority Critical patent/CN117112774A/en
Publication of CN117112774A publication Critical patent/CN117112774A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/338Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • 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/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results

Abstract

The application relates to the technical field of computers, and provides a comment ordering method, which comprises the following steps: under the condition that the target content meets comment updating conditions, for each item of target comment of the target content, determining whether the published time length of the target comment reaches a preset first attenuation time length or not; when the preset first attenuation duration is reached, recalculating the heat value of the target comment based on the comment content parameter value, the comment parameter value and the published duration corresponding to the target comment; the method comprises the steps of sorting each item of target comments based on the hotness value of each item of target comment to obtain a comment display sequence corresponding to target content, so that the problem that the comment sorting result is unreasonable can be solved, and the hotness value of the target content with the published time reaching the preset first attenuation time is attenuated according to the published time, so that the exposure of a newly sent comment can be improved, and the rationality of the sorting comment result can be improved. In addition, an electronic device and a storage medium are also provided.

Description

Comment ordering method, electronic device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a comment sorting method, an electronic device, and a storage medium.
Background
In the process of displaying and operating digital contents such as electronic books, operators mostly set interactive sections such as an evaluation area, a forum, a voting area and the like for communication and interaction between readers and authors. The occurrence of the interactive edition can not only improve the heat and user attention of the topic content, but also increase the exposure of the topic content; and can also be used as one of the content reserves of the content operators and the data sources for the analysis and selection of the subsequent content materials. So more and more content operators wager more and more attention into comments of the interaction area.
In the related art, the comment display rule of the interaction area includes: the heat value is calculated based on the cumulative value of the replies and praise of the comments, the more the heat value is replied and praise, the higher the order of presentation is.
Based on the above, in the related art, when the popularity value of the comment is calculated based on reply and praise, the newly posted comment is often only arranged at the back due to low popularity value, and proper exposure cannot be obtained, so that the comment ordering result is unreasonable.
Disclosure of Invention
In order to help to solve the problem that high-quality comments cannot be displayed in front, the application provides a comment sorting method, electronic equipment and a storage medium.
In a first aspect, the present application provides a comment sorting method, which adopts the following technical scheme:
a method for ordering comments for a server, the method comprising:
under the condition that the target content meets comment updating conditions, for each target comment of the target content, determining whether the published time length of the target comment reaches a preset first attenuation time length or not;
when the published time length of the target comment reaches the preset first attenuation time length, recalculating a heat value of the target comment based on a comment content parameter value, a comment parameter value and the published time length corresponding to the target comment, wherein the heat value is inversely related to the published time length;
and ordering each target comment based on the heat value of each target comment to obtain a comment display sequence corresponding to the target content.
By adopting the technical scheme, the problem that the comment ordering result is unreasonable can be solved, and because the heat value of the comment with the published time length reaching the preset first attenuation time length is inversely related to the published time length, the heat value of the target comment with the published time length reaching the preset first attenuation time length is attenuated according to the published time length, so that the relationship between the published time length and other parameters can be balanced, the increase of the exposure of the newly sent comment can be facilitated, and the rationality of the ordering comment result can be improved.
Optionally, the comment updating condition includes receiving an added comment of the target content, where the target comment includes the added comment; and under the condition that the newly added comments are received, sorting each target comment based on the heat value of each target comment, and before obtaining a display sequence, further comprising:
determining the reviewer information of the newly added comments;
determining a reviewer parameter value corresponding to the newly added comment based on the reviewer information of the newly added comment;
determining comment content parameter values corresponding to the new comments based on the new comments;
and initializing a heat value corresponding to the new comment based on the comment parameter and the comment content parameter corresponding to the new comment.
By adopting the technical scheme, the comment update condition comprises that the newly added comment of the target comment is received, and at the moment, the comment display sequence corresponding to the target content can be updated in time under the condition that the newly added comment is received, so that the comment display sequence can be updated in time.
Optionally, when the published time length of the target comment reaches the preset first decay time length, recalculating the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment, including:
When the published time length of the target comment reaches the preset first attenuation time length, recalculating the heat value of the target comment based on the comment content parameter value, the commentator parameter value, the interaction parameter value and the published time length corresponding to the target comment; the interaction parameters are predetermined based on interaction conditions corresponding to the target comments.
By adopting the technical scheme, the heat value of the target comment is updated by combining the interaction condition of the target comment, so that the relationship between the published time length and the interaction condition can be balanced, the rationality of the determined heat value can be improved, and the rationality of the comment sequencing result can be improved.
Optionally, the method further comprises:
determining interactor information corresponding to the newly added interaction under the condition that the newly added interaction of the target comment of the target content is received; determining an interactor parameter value corresponding to the newly added interaction information based on the interactor information;
and updating the interactive parameter value corresponding to the target comment based on the interactive parameter value corresponding to the newly added interactive information.
By adopting the technical scheme, the corresponding interaction parameter value can be updated in time under the condition that the target comment receives the newly added interaction, and when the hot value needs to be recalculated based on the interaction parameter value, the interaction parameter value can be directly obtained without temporary calculation.
Optionally, the newly added interaction includes a newly added reply, and updating the interaction parameter value corresponding to the target comment based on the interactor parameter value corresponding to the newly added interaction information includes:
determining reply content parameter values corresponding to the newly-added interaction information based on the newly-added replies;
and updating the interactive parameter value corresponding to the target comment based on the interactive parameter value corresponding to the newly added interactive information and the reply content parameter value.
By adopting the technical scheme, the accuracy of calculating the interactive parameter value can be improved, so that the accuracy of calculating the heat value can be improved, and the rationality of the comment sequencing result can be improved because the reply content parameter value is determined based on the newly added reply and the interactive parameter value of the target comment is updated based on the interactor parameter value and the reply content parameter value.
Optionally, the calculating the popularity value of the target comment based on the comment content parameter value, the comment parameter value, the interaction parameter value and the published time length corresponding to the target comment includes:
determining the sum of comment content parameter values, comment parameter values and interaction parameter values corresponding to the target comments as a first calculation parameter;
determining a second calculation parameter value based on the published time length corresponding to the target comment, wherein the second parameter value is inversely related to the published time length;
And determining the product of the first calculation parameter value and the second calculation parameter value as the heat value of the target comment.
By adopting the technical scheme, as the second parameter value is inversely related to the published time length and the product of the first parameter value and the second parameter value is determined as the heat value of the target comment, the heat value of the target comment can be attenuated along with the published time length, the accuracy of the calculated heat value can be improved, and the rationality of the comment sequencing result can be improved.
Optionally, the method further comprises:
under the condition that the target comment meets the reply updating condition, respectively determining whether the published time length of the target reply reaches a preset second attenuation time length for each target reply of the target comment;
when the published time length of the target reply reaches the second attenuation time length, recalculating the heat value of the target reply based on the reply content parameter value, the replier parameter value and the published time length corresponding to the target reply;
and ordering each target reply based on the heat value of each target reply to obtain a reply display sequence corresponding to the target comment.
By adopting the technical scheme, the relationship between the published time length and other parameters can be balanced, so that the accuracy of calculation of the heat value can be improved, and the rationality of the sorting comment results can be improved.
In a second aspect, the present application provides a comment sorting method, which adopts the following technical scheme:
a method for ordering comments, for use in a comment presentation system, the comment presentation system including a client and a server, the method comprising:
the client generates operation information corresponding to target content under the condition that the operation of a user on the target content is detected, and sends the operation information to the server;
under the condition that the service end receives the operation information, determining whether the published time length of each item of target comment reaches a preset first attenuation time length or not for each item of target comment of the target content;
the server recalculates the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment when the published time length of the target comment reaches the preset first attenuation time length; the server orders the target comments based on the hotness value of the target comments to obtain comment display sequences corresponding to the target content, and returns the comment display sequences to the client;
And under the condition that the comment presentation sequence is received, the client side sequentially presents each target comment based on the comment presentation sequence.
In a third aspect, the present application provides a comment electronic device, which adopts the following technical scheme:
an electronic device, the electronic device comprising:
at least one processor;
a memory;
at least one application program, wherein the at least one application program is stored in the memory and configured to be executed by the at least one processor, the at least one application program configured to: executing the ranking method of any comment provided in the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform any of the methods of ranking comments provided in the first aspect.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the method can help to improve the problem that comment ordering results are unreasonable, and because the heat value of the comment with the published time length reaching the preset first attenuation time length is inversely related to the published time length, the heat value of the target content with the published time length reaching the preset first attenuation time length can be attenuated according to the published time length, so that the method can help to balance the relation between the published time length and other parameters, and therefore the method is helpful to increase the exposure of newly sent comments, and the rationality of ordering comment results can be improved;
2. The method comprises the steps that when the published time length of the target content reaches the preset first decay time length, the heat value of the target content is attenuated according to the published time length, so that the heat value of a newly published comment cannot be attenuated under the condition that the published time length of the target content does not reach the preset first decay time length, the exposure of the newly published comment can be ensured, the accuracy of calculation of the heat value can be further improved, and the rationality of sequencing comment results can be improved.
Drawings
FIG. 1 is a flow chart of a method for sorting comments provided by an embodiment of the present application;
FIG. 2 is a flow chart of a process of adding comments provided by an embodiment of the present application;
FIG. 3 is a schematic flow chart of a heat value calculation process according to an embodiment of the present application;
FIG. 4 is a flowchart of a reply process according to an embodiment of the present application;
FIG. 5 is a flowchart of another additional reply process according to an embodiment of the present application;
FIG. 6 is a flowchart of another heat value calculation process according to an embodiment of the present application;
FIG. 7 is a flow chart of another method for ranking comments provided by an embodiment of the present application;
FIG. 8 is a flow chart of an operation information generation process according to an embodiment of the present application;
FIG. 9 is a flow chart of a comment presentation process provided by an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings 1 to 10 and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a comment ordering method, which is used in a server, wherein the server is in communication connection with at least one client.
The embodiment specifically describes the method by taking the ordering of the book comments as an application example. In actual implementation, the method can also be used for ranking comments of other contents, such as: video, pictures, microblogs, etc., which are not limited in this embodiment.
The server may be a book integrated management system, or may also be a processing system of a specific service, for example: an electronic book reading system, a book querying system, etc. Accordingly, the client may be an electronic book reading application, a book querying application, or the like.
Referring specifically to FIG. 1, the method of ranking comments includes the steps of:
step 101, respectively determining whether the published time length of the target comment reaches a preset first decay time length for each target comment of the target content under the condition that the target content meets the comment updating condition.
Executing step 102 when the published time length of the target comment reaches a preset first attenuation time length; the step 103 is performed directly based on the heat value obtained by the last calculation without updating the heat value when the published time length of the target comment does not reach the preset first decay time length, or the heat value of the target comment may be updated in other manners.
Wherein, the published duration refers to: the difference between the posting time of the target comment and the current time.
In one example, the target content includes a book, which may be an electronic book or an entity book, and the embodiment does not limit the type of the target content.
Optionally, the comment update condition includes receiving preset information and/or reaching a preset first update time. Specifically, receiving the preset information may include receiving a new comment of the target content, or may also include receiving a new interaction of the target comment of the target content; reaching the preset first update time may include reaching a fixed time, such as: the update is performed at a timing of 17:00 a day, or the method can also comprise the step of reaching a preset first waiting duration from the last update, and the embodiment does not limit the content of comment update conditions.
Alternatively, the preset first attenuation duration may be set according to practical experience, for example, 30 days, 60 days, 90 days, or 120 days, and the size of the attenuation duration is not limited in this embodiment.
In this embodiment, the description will be given taking, as an example, that the target comment includes all comments corresponding to the target content. The target comment may also be part of all comments of the target content at the time of actual implementation, such as: the target comment may be a comment except for a comment of manual intervention in all comments of the target content, where the manual intervention includes: manual topping, manual hiding, etc., the scope of the target comment is not limited by this embodiment.
Step 102, when the published time length of the target comment reaches the preset first decay time length, recalculating a heat value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment, wherein the heat value is inversely related to the published time length.
Wherein, comment content parameter values and comment parameters are stored in the server in advance; the comment content parameter value is determined based on the target comment and is used for indicating the quality of the comment content; the reviewer parameter value is determined based on the reviewer information of the target review for indicating the quality of the reviewer.
In one example, the comment content parameter value is determined based on the number of comment words and the number of words weight, and the reviewer parameter value is determined based on whether the reviewer is an author comment.
Optionally, recalculating the hotness value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment includes: determining the sum of comment content parameter values corresponding to the target comments and comment parameter values as a first calculation parameter; determining a second parameter value based on the published time length corresponding to the target comment; the product of the first parameter value and the second parameter value is determined as the heat value of the target comment.
Wherein the second parameter value is inversely related to the published time period, i.e. the longer the published time period the smaller the second parameter value. Therefore, the heat value of the target content with the published time reaching the preset first decay time is decayed according to the published time, so that the relation between the published time and other parameters can be balanced, the exposure of newly sent comments can be increased, and the rationality of the sequencing result can be improved.
In one example, the second parameter value is calculated by:
wherein p is a second parameter value; t is published duration; b is a preset constant less than 1, such as: 0.5; n is a preset value, such as: 365; t is the same as N, e.g., in days.
Further, the heat value of the target comment is recalculated based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment, and is expressed by the following formula:
wherein H is a heat value; a is comment content parameter value; c is the parameter value of the reviewer; t is the published time length corresponding to the target comment; b is a preset value greater than 0 and less than 1, such as: 0.5; n is a preset value, such as: 365; t is the same as N, e.g., in days.
And step 103, sorting the item target comments based on the hotness value of the item target comments to obtain a comment display sequence corresponding to the target content.
Optionally, sorting the comments of each item based on the hotness value of the comment of each item to obtain a comment display sequence corresponding to the target content, including: and ordering the item comments according to the order of the heat value from high to low to obtain a target comment display sequence corresponding to the target content. Further, for the target comments with the same hotness value, sorting is performed according to the sequence of the posting time.
In one example, the target comment includes at least one manual top comment, and the comments of each item are ordered based on the hotness value of the comment of each item to obtain a comment display sequence corresponding to the target content, including: sequencing the manual top comments based on the hotness value of each manual top comment to obtain a first sequence; sorting other comments based on the hotness value of the other comments except the manual top comment in each comment, so as to obtain a second sequence; and obtaining a comment display sequence corresponding to the target content based on the first sequence and the second sequence.
The implementation principle of the comment ordering method provided by the embodiment is as follows: under the condition that the target content meets comment updating conditions, for each item of target comment of the target content, determining whether the published time length of the target comment reaches a preset first attenuation time length or not; when the published time length of the target comment reaches a preset first attenuation time length, recalculating the heat value of the target comment based on the comment content parameter value, the commentator parameter value and the published time length corresponding to the target comment; the method comprises the steps of sorting each item of target comments based on the heat value of each item of target comments to obtain a comment display sequence corresponding to target content, and therefore the problem that comment sorting results are unreasonable can be facilitated to be solved.
Furthermore, the heat value of the target content is attenuated according to the published time length only when the published time length of the target content reaches the preset first attenuation time length, so that the heat value of the newly published comment cannot be attenuated when the newly published comment does not reach the preset first attenuation time length, the exposure of the newly published comment can be ensured, the accuracy of calculation of the heat value can be further improved, and the rationality of sequencing comment results can be improved.
Based on the technical scheme, further, the comment updating condition comprises that a new comment of the target content is received, and the target comment comprises the new comment; in the case of receiving the newly added comment of the target content, referring to fig. 2, step 103 ranks the comments of each item based on the hotness value of the comments of each item, and before obtaining the display sequence, the method further includes the following steps:
step 201, determining reviewer information of the newly added comment.
The reviewer information may include account information of the reviewer, or may also include device identification information of devices used by the reviewer, or may also include other identification information, such as: whether anonymous or not, the present embodiment does not limit the content of reviewer information.
Step 202, determining a reviewer parameter value corresponding to the newly added comment based on the reviewer information of the newly added comment.
In one example, the reviewer information includes reviewer account information, and determining a reviewer parameter value corresponding to the newly added comment based on the reviewer information of the newly added comment includes: determining the association relationship between the reviewer account and the content author; and determining the parameter value of the reviewer based on the preset parameter value corresponding to the association relation. Alternatively, the association relationship may be based on whether the reviewer is the author, where the association relationship includes the author or other personnel, and the preset parameter value corresponding to the author is greater than the preset parameter value corresponding to the other personnel. Further, when the association relationship indicates that the reviewer is other personnel, the association relationship may be further divided based on whether the reviewer is an author friend/vermicelli, where the association relationship includes an author friend/vermicelli or an irrelevant person, and a preset parameter value corresponding to the author friend/vermicelli is greater than or equal to a preset parameter value corresponding to the irrelevant person. Therefore, the reviewer parameter value can better reflect the reviewer quality of the newly added comments, so that the accuracy of determining the hotness value can be improved.
In another example, determining a reviewer parameter value corresponding to the newly added comment based on reviewer information of the newly added comment includes: determining a reviewer type based on the reviewer information; and determining the parameter value of the reviewer based on the preset parameter value corresponding to the reviewer type. Optionally, the reviewer types include: real name person and anonymizer, the preset parameter value corresponding to real name person is greater than the preset parameter value corresponding to anonymizer. Further, under the condition that the reviewer type is an actual reviewer, the reviewer type is further classified based on the reviewer account number level, and the preset parameter value corresponding to the high-level account number is greater than or equal to the preset parameter value corresponding to the low-level account number. Therefore, the reviewer parameter value can better reflect the reviewer quality of the newly added comments, so that the accuracy of determining the hotness value can be improved.
In actual implementation, the reviewer parameter value may be determined in combination with the above two examples, or may be determined in other manners, and the present embodiment is not limited to the manner in which the reviewer parameter value is determined.
And 203, determining comment content parameter values corresponding to the newly added comments based on the newly added comments.
Optionally, determining the comment content parameter value corresponding to the newly added comment based on the newly added comment includes: analyzing the newly added comments to obtain an analysis result; and determining comment content parameter values based on the preset parameter values corresponding to the analysis results.
In one example, the parsing result includes a total number of words of the newly added comment, and parsing the newly added comment to obtain the parsing result includes: and carrying out text analysis on the newly added comments to obtain the total word number of the newly added comments.
Correspondingly, determining the comment content parameter value based on the preset parameter value corresponding to the analysis result comprises the following steps: and determining comment content parameter values based on the total word number of the newly added comments and the weight of the preset single word. Therefore, the comment content parameter value can better reflect the content quality of the newly added comment, and the accuracy of determining the popularity value can be improved.
Further, the parsing result includes a non-repeated word number of the newly added comment, and before performing text parsing on the newly added comment to obtain a total word number of the newly added comment, the method further includes: removing duplication of the newly added comments to obtain duplicate removed newly added comments; and carrying out text analysis on the newly added comments after the duplicate removal to obtain the number of non-duplicate words of the newly added comments.
In actual implementation, keyword extraction may be performed on the newly added comment to obtain keyword information, and then comment content parameter values are determined based on a matching relationship between the keyword information and preset reference information of the target content.
Step 204, initializing a heat value corresponding to the newly added comment based on the comment parameter and the comment content parameter corresponding to the newly added comment.
Optionally, initializing a hotness value corresponding to the newly added comment based on the comment parameter and the comment content parameter corresponding to the newly added comment includes: and determining the sum of the reviewer parameters and the comment content parameters corresponding to the newly added comments as a heat value corresponding to the newly added comments.
In one example, determining the sum of the reviewer parameter and the comment content parameter corresponding to the newly added comment as the hotness value corresponding to the newly added comment includes: and determining the weighted sum of the commenter parameter and the comment content parameter corresponding to the newly added comment as a heat value corresponding to the newly added comment. The weights of the reviewer parameters and the comment content parameters can be preset according to actual requirements.
According to the technical scheme, under the condition that the newly added comment of the target content is received, the comment parameter value and the comment content parameter value corresponding to the newly added comment are determined, and the heat value of the newly added comment is initialized based on the comment parameter value and the comment content parameter value, so that the target comment of the target content is ordered according to the heat value, and therefore the comment display sequence corresponding to the target content can be updated in time under the condition that the newly added comment is received, and therefore the comment display sequence can be updated in time.
Based on the above technical solution, further, referring to fig. 3, step 102 recalculates the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment when the published time length of the target comment reaches the preset first decay time length, including the following steps:
step 301, when the published time length of the target comment reaches the preset first decay time length, recalculating the heat value of the target comment based on the comment content parameter value, the comment parameter value, the interaction parameter value and the published time length corresponding to the target comment.
Accordingly, referring to fig. 3, before the step 103 ranks the target comments based on the popularity value of the target comments, the method further includes the following steps:
step 302, recalculating the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the interaction parameter value corresponding to the target comment when the published time of the target comment does not reach the preset first decay time.
The interaction parameters are predetermined based on interaction conditions corresponding to the target comments.
Optionally, in step 101, if it is determined that the published duration of the target comment reaches the preset first decay duration, step 301 is executed; and executing step 302 under the condition that the published time length of the target comment does not reach the preset first decay time length.
In one example, the types of interactions include praise and reply, when praise or reply conditions of the target comment change, interaction parameters corresponding to the target comment change.
Optionally, calculating the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the interaction parameter value corresponding to the target comment includes: and determining the sum of the comment content parameter value, the commenter parameter value and the interaction parameter value corresponding to the target comment as a heat value of the target comment.
In one example, the popularity value of the target comment is recalculated based on the comment content parameter value, the comment parameter value, and the interaction parameter value corresponding to the target comment, and is represented by the following formula:
H=A+C+D
wherein H is a heat value; a is comment content parameter value; c is the parameter value of the reviewer; d is the interactive parameter value.
Optionally, calculating the popularity value of the target comment based on the comment content parameter value, the comment parameter value, the interaction parameter value and the published time length corresponding to the target comment includes: determining the sum of comment content parameter values, comment parameter values and interaction parameter values corresponding to the target comments as a first calculation parameter; determining a second calculation parameter value based on the published time length corresponding to the target comment; the product of the first calculation parameter value and the second calculation parameter value is determined as the heat value of the target comment.
In one example, the popularity value of the target comment is calculated based on the comment content parameter value, the comment parameter value, the interaction parameter value, and the published time length corresponding to the target comment, and is expressed by the following formula:
wherein H is a heat value; a is comment content parameter value; c is the parameter value of the reviewer; d is an interaction parameter value; t is the published time length corresponding to the target comment and is calculated by taking a day as a unit; b is a preset value greater than 0 and less than 1, such as: 0.5; n is a preset value, such as: 365; t is the same as N, e.g., in days.
According to the technical scheme, the interactive parameter value is added in the process of calculating the hotness value, so that the hotness value of the target comment can be updated by combining the interactive condition of the target comment, the relationship between the published time length and the interactive condition can be balanced, the accuracy and the rationality of the determined hotness value can be improved, and the rationality of the comment sequencing result can be improved.
Further, referring to fig. 4, the comment ordering method further includes the following steps:
step 401, determining interactor information corresponding to the newly added interaction under the condition that the newly added interaction of the target comment of the target content is received.
The manner of determining the interactor information corresponding to the newly added interactor is the same as the manner of determining the comment information of the newly added comment in the above step 201, and the detailed description is omitted herein for the sake of brevity with reference to the content corresponding to the above step 201.
Optionally, the newly added interaction may be newly added praise or newly added reply, and the type of the newly added interaction is not limited in this embodiment.
Step 402, determining an interactor parameter value corresponding to the newly added interaction information based on the interactor information.
The manner of determining the interactor parameter value corresponding to the newly added interactor information based on the interactor information is the same as the manner of determining the reviewer parameter value corresponding to the newly added comment based on the reviewer information of the newly added comment in the above step 202, and the detailed description is omitted herein.
And step 403, updating the interactive parameter value corresponding to the target comment based on the interactive parameter value corresponding to the newly added interactive information.
Optionally, updating the interactive parameter value corresponding to the target comment based on the interactor parameter value corresponding to the newly added interactive information includes: and determining the sum of the interactive parameter value corresponding to the newly added interactive information and the interactive parameter value corresponding to the target comment before updating as the interactive parameter value corresponding to the target comment after updating.
Because one comment may have multiple interactions, the interactive parameter values corresponding to the target comments can be obtained by accumulating the interactive parameter values corresponding to each interaction of the target.
In one example, the comment update condition includes an added interaction of the target comment of the target content received, at which time steps 401 through 403 are performed before steps 301 and 302.
In the above technical solution, under the condition of receiving the newly added interaction of the target comment of the target content, the interactive parameter value corresponding to the newly added interaction is determined, and the interactive parameter value corresponding to the target comment is updated based on the interactive parameter value, and when the hot value needs to be recalculated based on the interactive parameter value, the interactive parameter value can be directly obtained without temporary calculation.
Further, the newly added interaction includes newly added reply, referring to fig. 5, step 403, updating the interaction parameter value corresponding to the target comment based on the interactor parameter value corresponding to the newly added interaction information includes:
in step 501, a reply content parameter value is determined based on the newly added reply.
The method of determining the reply content parameter value based on the newly added reply is the same as the method of determining the comment content parameter value corresponding to the newly added comment based on the newly added comment in step 203, and the content corresponding to step 203 is specifically referred to, which is not described in detail herein.
Step 502, updating the interactive parameter value corresponding to the target evaluation based on the interactive parameter value and the reply content parameter value corresponding to the newly added interactive information.
The method for updating the interactive parameter value corresponding to the target comment based on the interactive parameter value and the reply content parameter value corresponding to the newly added interactive information is the same as the method for initializing the heat value corresponding to the newly added comment based on the comment parameter and the comment content parameter corresponding to the newly added comment in step 204, and the details corresponding to step 204 are specifically referred to, which is not described herein again.
According to the technical scheme, the reply content parameter value is determined based on the newly added reply, and the interactive parameter value of the target comment is updated based on the interactor parameter value and the reply content parameter value, so that the accuracy of calculating the interactive parameter value can be improved, the accuracy of calculating the heat value can be improved, and the rationality of the comment sequencing result can be improved.
Based on the above technical solution, further, referring to fig. 6, the method for sorting comments provided in this embodiment further includes the following steps:
step 601, respectively determining, for each target comment reply of the target comment, whether the published duration of the target reply reaches a preset second decay duration under the condition that the target comment satisfies the reply update condition.
Executing step 102 when the published duration of the target reply reaches a preset second decay duration; step 103 may be directly executed if the published duration of the target reply does not reach the preset second decay duration, or the heat value of the target reply may be updated in other manners, which is not limited in this embodiment.
Optionally, replying to the update condition includes receiving preset information and/or reaching a preset second update time. Specifically, the receiving of the preset information includes receiving a newly added interaction of a target comment of the target content; the reaching of the preset first update time may include reaching at least one fixed time per day, or may also include reaching the preset second waiting period from the last update, which is not limited in this embodiment.
Step 602, when the published duration of the target reply reaches the second decay duration, recalculating the popularity value of the target reply based on the reply content parameter value, the replier parameter value and the published duration corresponding to the target reply.
And step 603, sorting the replies of the item targets based on the hotness value of the replies of the item targets to obtain a reply display sequence corresponding to the target comment.
Except for the above specific descriptions, the specific implementation manners of the steps 601 to 603 are the same as the specific implementation manners of the steps 101 to 103, specifically, the implementation manners of the steps 601 and 101 are the same as the implementation manners of the steps 602 and 102, the implementation manners of the steps 603 and 103 are the same, and specific reference is made to the corresponding content of the steps 101 to 103, which is not repeated here.
It should be noted that, the technical solutions described in the steps 101 to 103 corresponding to the above-mentioned fig. 2 to 5 are also applicable to the steps 601 to 603, and the description of this embodiment is omitted.
According to the technical scheme, the heat value of the target content with the published time reaching the preset first decay time is decayed according to the published time, so that the relationship between the published time and other parameters can be balanced, the accuracy of calculation of the heat value can be improved, and the rationality of sorting comment results can be improved.
The embodiment of the application also provides another comment ordering method, which is used in a comment display system, wherein the comment display system comprises a client and a server, the server is used for executing the comment ordering method, and referring to fig. 7, the comment ordering method provided by the embodiment of the application comprises the following steps:
In step 701, the client generates operation information corresponding to the target content when detecting that the comment of the user on the target content triggers an operation.
Optionally, the operation information may be a newly added comment, or may also be newly added reply, where the content of the operation information in this embodiment is limited.
In step 702, the client sends operation information to the server.
In step 703, the server determines, for each target comment of the target content, whether the published duration of the target comment reaches the preset first attenuation duration, respectively, when receiving the operation information.
In step 704, the server recalculates the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment when the published time length of the target comment reaches the preset first decay time length.
Step 705, the server orders the comments of each item based on the hotness value of the comments of each item to obtain a comment display sequence corresponding to the target content.
For relevant details, reference is made to the embodiments of the ranking method portion for comments of the server provided in fig. 1 to 6, and this embodiment is not described herein.
The implementation principle of the comment ordering method provided by the embodiment is as follows: under the condition that the service side receives the operation information, for each item of target comments of the target content, determining whether the published time length of the target comments reaches a preset first attenuation time length or not; when the published time length of the target comment reaches a preset first attenuation time length, recalculating the heat value of the target comment based on the comment content parameter value, the commentator parameter value and the published time length corresponding to the target comment; the method comprises the steps of sorting all item target comments based on the hotness value of each item target comment to obtain a comment display sequence corresponding to the target content, so that the problem that the high-quality comment cannot be displayed in front can be solved.
In addition, the comment display sequence can be updated in time based on the operation of the user so that the client can display the comments based on the updated comment display sequence, and therefore the comment display effect can be improved.
In the above technical solution, referring to fig. 8, when detecting that the comment of the user on the target content triggers the operation, the client generates operation information corresponding to the target content, and includes the following steps:
step 801, displaying comments of the target content according to the most hot mode under the condition that the interaction area of the target content opened by the user is detected.
Wherein, the comment for displaying the target content according to the most hot mode means: and sequentially displaying the comments of the target content according to the heat value corresponding to the comments, namely sequentially displaying the comments of the target content based on the comment display sequence.
Step 802, monitoring user behavior, and executing step 803 when detecting that user comment on target content triggers operation; when it is detected that the user switches the display mode from the most hot mode to the latest mode, displaying comments of the target content according to the latest mode, and executing step 802; in case it is detected that the user switches the presentation mode from the latest mode to the hottest mode, the comment of the target content is presented in the hottest mode, step 802 is performed.
Wherein, displaying the comments of the target content according to the latest mode means that: and displaying the comments of the target content according to the comment posting time.
Step 803, determining the type of comment triggering operation, and executing step 804 when the comment triggering operation is newly added comment; in the case where the comment triggering operation is newly added praise, step 805 is executed; step 806 is performed in the case where the comment triggering operation is a newly added reply.
Step 804, obtaining the newly added comment content, generating operation information corresponding to the newly added comment operation based on the newly added comment content, and executing step 702.
Step 805, locating point praise operation corresponding target comment, generating operation information corresponding to newly added praise based on the target comment, and executing step 702.
Optionally, step 805 further includes adding 1 to the praise number of the target comment displayed by the original display interface.
Step 806, locating the target comment corresponding to the reply operation, obtaining the newly added reply content, generating operation information corresponding to the newly added reply based on the target comment and the newly added reply content, and executing step 702.
Optionally, step 806 further includes displaying the newly added reply content of the target comment displayed by the interface.
According to the technical scheme, the client can detect the behavior of the user after the user opens the interaction area of the target content and execute corresponding steps, so that the display mode of the comment of the target content can be adjusted based on the operation of the user, and the comment display effect can be improved.
Further, in the case that the operation information is the operation information corresponding to the newly added comment content, step 705, the server ranks the comments of each item based on the hotness value of the comment of each item, and after obtaining the comment display sequence corresponding to the target content, further includes: the server returns a comment display sequence and a target display position to the client; and under the condition that the comment showing sequence and the target showing position are received, refreshing each comment of the currently-shown target object based on the comment showing sequence and the target showing position by the client.
The target display position is a display position of a newly added comment, and the target display position may be a preset display position, for example: the first display position may be ranked, or may be a display position that is being browsed when the target user issues comments, and the determining manner of the target display position is not limited in this embodiment.
Optionally, refreshing each comment of the currently displayed target object based on the comment presentation sequence and the target presentation position includes: and displaying the newly added comments in the target display position, and sequentially displaying other comments according to the sequence of the comment display sequence.
Such as: the comment display sequence comprises four comments, and the sequence in the comment display sequence is as follows: the method comprises the steps of a first comment, a second comment, a newly added comment and a third comment, wherein a target display position is a display position with a first ranking, and at the moment, the display sequence of four comments in a client is the newly added comment, the first comment, the second comment and the third comment in sequence.
According to the technical scheme, after the comments are newly added, the comment display sequence of the client can be automatically refreshed according to the latest comment display sequence, and the newly added comments are displayed in the target display position, so that the user can immediately watch the comments published by the user, and the watching experience of the user can be improved.
Based on the above technical solution, optionally, referring to fig. 9, the method for sorting comments provided in this embodiment further includes the following steps:
step 901, a client monitors user behavior, and in the case that a user performs a refresh operation, step 902 is performed; and under the condition that the user executes the continuous browsing action, continuously displaying each target comment based on the currently used comment display sequence.
The refreshing operation may be to pull down the refreshing operation at the interface of the interaction area, or may also be to enter again after exiting the interaction area, or may also be to click on a refreshing control, which is not limited in the manner of the refreshing operation in this embodiment.
The continuous browsing action may be to slide the interface of the interaction area up and down, or may be to stay in the interface of the interaction area, which is not limited by the manner of refreshing operation in this embodiment.
In step 902, the client sends a comment query request corresponding to the target object to the server.
In step 903, the server returns a comment presentation sequence corresponding to the target object to the client under the condition of receiving the query request to be commented.
In step 904, the client sequentially displays each target comment corresponding to the target object based on the comment display sequence when receiving the comment display sequence.
According to the technical scheme, the client can detect the behavior of the user after receiving the comment display sequence and execute corresponding steps, so that the display mode of the comment of the target content can be adjusted based on the operation of the user, and the comment display effect can be improved.
The embodiment of the present application further provides an electronic device, as shown in fig. 10, where the electronic device 1000 shown in fig. 10 includes: a processor 1001 and a memory 1003. The processor 1001 is coupled to the memory 1003, such as via a bus 1002. Optionally, the electronic device 1000 may also include a transceiver 1004. It should be noted that, in practical applications, the transceiver 1004 is not limited to one, and the structure of the electronic device 1000 is not limited to the embodiment of the present application.
The processor 1001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application SpecificIntegrated Circuit ) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 1001 may also be a combination that implements computing functionality, such as a combination comprising one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 1002 may include a path to transfer information between the components. Bus 1002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (ExtendedIndustry Standard Architecture ) bus, among others. Bus 1002 may be divided into an address bus, a data bus, and the like. For ease of illustration, only one thick line is shown in fig. 10, but not only one bus or one type of bus.
Memory 1003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically ErasableProgrammable Read Only Memory ), magnetic disk storage or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 1003 is used for storing application code for executing the inventive arrangements and is controlled for execution by the processor 1001. The processor 1001 is configured to execute application code stored in the memory 1003 to implement what is shown in the foregoing method embodiment.
Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. But may also be a server or the like. The electronic device shown in fig. 10 is merely an example, and should not impose any limitation on the functionality and scope of use of embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed in a computer, causes the computer to execute the comment ordering method provided in the above embodiment.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein.
The foregoing is only a partial embodiment of the present application, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations should and are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method for ordering comments, characterized in that it is used for a server, the method comprising:
under the condition that the target content meets comment updating conditions, for each target comment of the target content, determining whether the published time length of the target comment reaches a preset first attenuation time length or not;
when the published time length of the target comment reaches the preset first attenuation time length, recalculating a heat value of the target comment based on a comment content parameter value, a comment parameter value and the published time length corresponding to the target comment, wherein the heat value is inversely related to the published time length;
and ordering each target comment based on the heat value of each target comment to obtain a comment display sequence corresponding to the target content.
2. The method of claim 1, wherein the comment update condition includes receiving an added comment of the target content, the target comment including the added comment; and under the condition that the newly added comments are received, sorting each target comment based on the heat value of each target comment, and before obtaining a display sequence, further comprising:
Determining the reviewer information of the newly added comments;
determining a reviewer parameter value corresponding to the newly added comment based on the reviewer information of the newly added comment;
determining comment content parameter values corresponding to the new comments based on the new comments;
and initializing a heat value corresponding to the new comment based on the comment parameter and the comment content parameter corresponding to the new comment.
3. The method according to claim 1, wherein, in the case where the published time period of the target comment reaches the preset first decay time period, recalculating the popularity value of the target comment based on the comment content parameter value, the comment parameter value, and the published time period corresponding to the target comment includes:
when the published time length of the target comment reaches the preset first attenuation time length, recalculating the heat value of the target comment based on the comment content parameter value, the commentator parameter value, the interaction parameter value and the published time length corresponding to the target comment; the interaction parameters are predetermined based on interaction conditions corresponding to the target comments.
4. A method according to claim 3, characterized in that the method further comprises:
Determining interactor information corresponding to the newly added interaction under the condition that the newly added interaction of the target comment of the target content is received;
determining an interactor parameter value corresponding to the newly added interaction information based on the interactor information;
and updating the interactive parameter value corresponding to the target comment based on the interactive parameter value corresponding to the newly added interactive information.
5. The method of claim 4, wherein the newly added interaction comprises a newly added reply, and updating the interaction parameter value corresponding to the target comment based on the interactor parameter value corresponding to the newly added interaction information comprises:
determining reply content parameter values corresponding to the newly-added interaction information based on the newly-added replies;
and updating the interactive parameter value corresponding to the target comment based on the interactive parameter value corresponding to the newly added interactive information and the reply content parameter value.
6. The method of claim 3, wherein the calculating the popularity value of the target comment based on the comment content parameter value, the reviewer parameter value, the interaction parameter value, and the published time period corresponding to the target comment comprises:
determining the sum of comment content parameter values, comment parameter values and interaction parameter values corresponding to the target comments as a first calculation parameter;
Determining a second calculation parameter value based on the published time length corresponding to the target comment, wherein the second parameter value is inversely related to the published time length;
and determining the product of the first calculation parameter value and the second calculation parameter value as the heat value of the target comment.
7. The method according to claim 1, wherein the method further comprises:
under the condition that the target comment meets the reply updating condition, respectively determining whether the published time length of the target reply reaches a preset second attenuation time length for each target reply of the target comment;
when the published time length of the target reply reaches the second attenuation time length, recalculating the heat value of the target reply based on the reply content parameter value, the replier parameter value and the published time length corresponding to the target reply;
and ordering each target reply based on the heat value of each target reply to obtain a reply display sequence corresponding to the target comment.
8. The comment ordering method is characterized by being used in a comment display system, wherein the comment display system comprises a client and a server, and the method comprises the following steps:
The client generates operation information corresponding to target content under the condition that the operation of a user on the target content is detected, and sends the operation information to the server;
under the condition that the service end receives the operation information, determining whether the published time length of each item of target comment reaches a preset first attenuation time length or not for each item of target comment of the target content;
the server recalculates the popularity value of the target comment based on the comment content parameter value, the comment parameter value and the published time length corresponding to the target comment when the published time length of the target comment reaches the preset first attenuation time length;
and the server orders the target comments based on the heat value of the target comments to obtain a comment display sequence corresponding to the target content.
9. An electronic device, comprising:
at least one processor;
a memory;
at least one application program, wherein the at least one application program is stored in the memory and configured to be executed by the at least one processor, the at least one application program configured to: a method of ranking comments in accordance with any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed in a computer, causes the computer to perform the ranking method of comments according to any one of claims 1 to 7.
CN202211710384.7A 2022-12-29 2022-12-29 Comment ordering method, electronic device and storage medium Pending CN117112774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211710384.7A CN117112774A (en) 2022-12-29 2022-12-29 Comment ordering method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211710384.7A CN117112774A (en) 2022-12-29 2022-12-29 Comment ordering method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN117112774A true CN117112774A (en) 2023-11-24

Family

ID=88795360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211710384.7A Pending CN117112774A (en) 2022-12-29 2022-12-29 Comment ordering method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117112774A (en)

Similar Documents

Publication Publication Date Title
US10747771B2 (en) Method and apparatus for determining hot event
US10789304B2 (en) Method and system for measuring user engagement with content items
US20200356572A1 (en) Search ranking method and apparatus, electronic device and storage medium
US9990442B2 (en) Method for determining relevant search results
CN110851712B (en) Method, device and computer readable medium for recommending book information
US10019419B2 (en) Method, server, browser, and system for recommending text information
MX2014002790A (en) Presenting search results in hierarchical form.
CN113422986B (en) Method, apparatus, device, medium, and program product for live room recommendation
EP3782048A1 (en) Action indicators for search operation output elements
US20140214621A1 (en) Method and device for pushing information
CN108536786A (en) A kind of information recommendation method, device, server and storage medium
US20180113866A1 (en) Ranking search result documents
CN111612581A (en) Method, device and equipment for recommending articles and storage medium
US20160371708A1 (en) Method and apparatus for determining a user's level of interest in web-based content
CN112765478A (en) Method, apparatus, device, medium, and program product for recommending content
US9256343B1 (en) Dynamically modifying an electronic article based on commentary
CN113205189B (en) Method for training prediction model, prediction method and device
CN107391534A (en) The page is shown, pagefile return method and device, computer-readable storage medium
US11151198B1 (en) Machine-learned disambiguation of user action data
CN113722593B (en) Event data processing method, device, electronic equipment and medium
CN109948084B (en) Webpage information display method, device, medium and computing equipment
CN113076395B (en) Semantic model training and search display method, device, equipment and storage medium
CN117112774A (en) Comment ordering method, electronic device and storage medium
CN110827101A (en) Shop recommendation method and device
CN111026981B (en) Visual display method, device and equipment for hot topics

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