A comment display method and device, electronic equipment and storage medium

By ranking comments based on their weight and interaction information, the problem of newest comments not necessarily providing relevant information about online resources is solved. This allows users to better browse recent and valuable comments, thus improving the user experience.

CN116303744BActive Publication Date: 2026-03-31BEIJING IQIYI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-21
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, the latest reviews do not necessarily provide good information about online resources, resulting in a poor user experience.

Method used

By acquiring multiple comments and a decay function, the weight of each comment is calculated based on its publication time and interaction information. The comments are then sorted based on their weight and interaction information, displaying recently published comments that provide relatively good information about online resources.

Benefits of technology

It improves the user experience, enabling users to more accurately browse recently published comments that provide better information about online resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303744B_ABST
    Figure CN116303744B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a comment display method and device, electronic equipment and storage medium, and relate to the technical field of computer. The method comprises: obtaining a plurality of comments for a target network resource and a plurality of attenuation functions; for each attenuation function, determining the weight of each comment corresponding to the attenuation function according to the attenuation function and the publication time of each comment; wherein the weight of the comment represented by different attenuation functions decreases at different magnitudes as the target time interval increases; the target time interval is the time interval between the publication time of the comment and the current time; sorting the plurality of comments according to the weight of each comment corresponding to the attenuation function and the interaction information of each comment to obtain the arrangement order of each comment corresponding to the attenuation function; and displaying a target comment in the plurality of comments based on the arrangement order of each comment corresponding to each attenuation function. The embodiments of the present application can improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a comment display method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of computer technology, client applications offer users increasingly more functions. Users can interact with other users regarding online resources through these clients. For example, a client can be a video client; while watching a video, a user can post comments, which the client can then display. Other users watching the video can browse these comments and obtain relevant information about the video, such as its content, based on those comments. They can then perform actions such as liking and replying to the comments, enabling user-to-user interaction regarding the video.

[0003] In related technologies, clients can display comments published more recently, that is, the most recent comments from users regarding online resources. However, the latest comments do not necessarily provide accurate information about the online resources. When browsing comments displayed on the client, users may not be able to obtain relevant information about the online resources, resulting in a poor user experience. Summary of the Invention

[0004] The purpose of this invention is to provide a comment display method, apparatus, electronic device, and storage medium to improve user experience. The specific technical solution is as follows:

[0005] In a first aspect of the present invention, a comment display method is provided, the method comprising:

[0006] Retrieve multiple comments for a target network resource, along with multiple decay functions;

[0007] For each decay function, the weight of each comment corresponding to that decay function is determined based on the decay function and the posting time of each comment; wherein, the weight of the comment represented by different decay functions decreases by different amounts as the target time interval increases; the target time interval is: the time interval between the posting time of the comment and the current time;

[0008] Based on the weight of each comment corresponding to the decay function and the interaction information of each comment, the multiple comments are sorted to obtain the arrangement order of each comment corresponding to the decay function;

[0009] Based on the order of the comments corresponding to each decay function, the target comment among the multiple comments is displayed.

[0010] Optionally, for each comment, the interaction information for that comment is: the number of preset actions performed on that comment;

[0011] The step of sorting the multiple comments according to the weight of each comment corresponding to the decay function and the interaction information of each comment to obtain the arrangement order of the comments corresponding to the decay function includes:

[0012] For each comment, the product of the weight of the comment corresponding to the decay function and the total number of preset operations on the comment is calculated to obtain the quality data of the comment corresponding to the decay function.

[0013] Based on the quality data of each comment corresponding to the decay function, sort the multiple comments in descending order to obtain the arrangement order of each comment corresponding to the decay function.

[0014] Optionally, a decay function corresponds to a preset number; the preset number is: the number of target comments determined from the decay function according to the order of the comments corresponding to the decay function;

[0015] When the publication time of the target network resource belongs to different time periods, the ratio between the preset numbers corresponding to each decay function is different; the proportion of the preset number corresponding to each decay function is determined based on the publication time of the target network resource and the magnitude by which the weight of the comments corresponding to each decay function decreases as the target time interval increases.

[0016] Optionally, displaying the target comment among the multiple comments based on the order of the comments corresponding to each decay function includes:

[0017] For each decay function, according to the order of the comments corresponding to the decay function, select the first preset number of comments corresponding to the decay function from the comments corresponding to the decay function to obtain the target comment group corresponding to the decay function;

[0018] The display order of the target comment groups corresponding to each decay function is determined according to the display priority from high to low.

[0019] The target comments in the multiple target comment groups are displayed according to the display order of the target comment groups corresponding to each decay function, and the arrangement order of the comments in each target comment group.

[0020] Optionally, the plurality of attenuation functions include: a first attenuation function, a second attenuation function, and a third attenuation function;

[0021] The first attenuation function is:

[0022]

[0023] Where w is the weight of the comment, and x is the target time interval for the comment;

[0024] The second decay function is:

[0025] w = 20.8465645221e (-0.1456829732x)

[0026] Where w is the weight of the comment, and x is the target time interval for the comment;

[0027] The third attenuation function is:

[0028]

[0029] Where w is the weight of the comment, and x is the target time interval for the comment.

[0030] Optionally, before determining the weight of each comment corresponding to each decay function based on the decay function and the publication time of each comment, the method further includes:

[0031] Based on the interaction information and posting time of each comment, the comments are grouped to obtain multiple candidate comment groups; each candidate comment group corresponds to a decay function.

[0032] For each decay function, the weight of each comment corresponding to that decay function is determined based on the decay function and the posting time of each comment, including:

[0033] For each decay function, the weight of each comment in the candidate comment group corresponding to the decay function is determined based on the decay function and the posting time of each comment in the candidate comment group corresponding to the decay function.

[0034] Optionally, the comments are grouped based on their interaction information and posting time to obtain multiple alternative comment groups, including:

[0035] Comments posted no earlier than the first time are grouped together to obtain the first alternative comment group;

[0036] Comments with more than a preset threshold of interactive information are grouped together to obtain a second alternative comment group;

[0037] Comments whose posting time falls between the second time and the first time are grouped together to obtain a third alternative comment group; wherein the second time is earlier than the first time.

[0038] Optionally, the first candidate comment group corresponds to the first decay function; the first decay function is: among the plurality of decay functions, the decay function whose weight of the comment decreases the most as the target time interval increases;

[0039] The second alternative comment group corresponds to the second decay function; the second decay function is: among the plurality of decay functions, the decay function whose weight of the comment decreases the least as the target time interval increases;

[0040] The third alternative comment group corresponds to the third decay function; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is less than the decrease in the weight of the comment corresponding to the first decay function as the target time interval increases; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is greater than the decrease in the weight of the comment corresponding to the second decay function as the target time interval increases.

[0041] In a second aspect of the invention, a comment display device is provided, the device comprising:

[0042] The acquisition module is used to acquire multiple comments for a target network resource, as well as multiple decay functions;

[0043] The weight determination module is used to determine the weight of each comment corresponding to each decay function based on the decay function and the posting time of each comment; wherein, the weight of the comment represented by different decay functions decreases by different amounts as the target time interval increases; the target time interval is: the time interval between the posting time of the comment and the current time;

[0044] The sorting module is used to sort the multiple comments according to the weight of each comment corresponding to the decay function and the interaction information of each comment, so as to obtain the sorting order of each comment corresponding to the decay function;

[0045] The display module is used to display the target comment among the multiple comments based on the order in which the comments are arranged according to each decay function.

[0046] Optionally, for each comment, the interaction information for that comment is: the number of preset actions performed on that comment;

[0047] The sorting module is specifically used for:

[0048] For each comment, the product of the weight of the comment corresponding to the decay function and the total number of preset operations on the comment is calculated to obtain the quality data of the comment corresponding to the decay function.

[0049] Based on the quality data of each comment corresponding to the decay function, sort the multiple comments in descending order to obtain the arrangement order of each comment corresponding to the decay function.

[0050] Optionally, a decay function corresponds to a preset number; the preset number is: the number of target comments determined from the decay function according to the order of the comments corresponding to the decay function;

[0051] When the publication time of the target network resource belongs to different time periods, the ratio between the preset numbers corresponding to each decay function is different; the proportion of the preset number corresponding to each decay function is determined based on the publication time of the target network resource and the magnitude by which the weight of the comments corresponding to each decay function decreases as the target time interval increases.

[0052] Optionally, the display module is specifically used for:

[0053] For each decay function, according to the order of the comments corresponding to the decay function, select the first preset number of comments corresponding to the decay function from the comments corresponding to the decay function to obtain the target comment group corresponding to the decay function;

[0054] The display order of the target comment groups corresponding to each decay function is determined according to the display priority from high to low.

[0055] The target comments in the multiple target comment groups are displayed according to the display order of the target comment groups corresponding to each decay function, and the arrangement order of the comments in each target comment group.

[0056] Optionally, the plurality of attenuation functions include: a first attenuation function, a second attenuation function, and a third attenuation function;

[0057] The first attenuation function is:

[0058]

[0059] Where w is the weight of the comment, and x is the target time interval for the comment;

[0060] The second decay function is:

[0061] w = 20.8465645221e (-0.1456829732x)

[0062] Where w is the weight of the comment, and x is the target time interval for the comment;

[0063] The third attenuation function is:

[0064]

[0065] Where w is the weight of the comment, and x is the target time interval for the comment.

[0066] Optionally, the device further includes:

[0067] The grouping module is used to group comments according to their interaction information and publication time before determining the weight of each comment corresponding to each decay function based on the decay function and the publication time of each comment, thus obtaining multiple candidate comment groups; wherein, each candidate comment group corresponds to one decay function.

[0068] The weight determination module is specifically used for:

[0069] For each decay function, the weight of each comment in the candidate comment group corresponding to the decay function is determined based on the decay function and the posting time of each comment in the candidate comment group corresponding to the decay function.

[0070] Optionally, the grouping module is specifically used for:

[0071] Comments posted no earlier than the first time are grouped together to obtain the first alternative comment group;

[0072] Comments with more than a preset threshold of interactive information are grouped together to obtain a second alternative comment group;

[0073] Comments whose posting time falls between the second time and the first time are grouped together to obtain a third alternative comment group; wherein the second time is earlier than the first time.

[0074] Optionally, the first candidate comment group corresponds to the first decay function; the first decay function is: among the plurality of decay functions, the decay function whose weight of the comment decreases the most as the target time interval increases;

[0075] The second alternative comment group corresponds to the second decay function; the second decay function is: among the plurality of decay functions, the decay function whose weight of the comment decreases the least as the target time interval increases;

[0076] The third alternative comment group corresponds to the third decay function; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is less than the decrease in the weight of the comment corresponding to the first decay function as the target time interval increases; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is greater than the decrease in the weight of the comment corresponding to the second decay function as the target time interval increases.

[0077] In a third aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0078] Memory, used to store computer programs;

[0079] When a processor executes a program stored in memory, it implements the comment display method steps described in any of the first aspects above.

[0080] In a fourth aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the comment display method steps described in any of the first aspects above.

[0081] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the comment display methods described above.

[0082] This invention provides a comment display method in which an electronic device acquires multiple comments for a target network resource and multiple decay functions; for each decay function, the weight of each comment corresponding to the decay function is determined based on the decay function and the publication time of each comment; wherein, the weight of the comment represented by different decay functions decreases by different amounts as the target time interval increases; the target time interval is the time interval between the publication time of the comment and the current time; the multiple comments are sorted according to the weight of each comment corresponding to the decay function and the interaction information of each comment to obtain the arrangement order of the comments corresponding to the decay function; and the target comment is displayed among the multiple comments based on the arrangement order of the comments corresponding to each decay function.

[0083] Based on the above processing, the weight of a comment can represent the probability that it effectively provides relevant information about the target network resource. Furthermore, since users generally interact with comments that effectively provide relevant information, such as liking or replying, the interaction information of the comments can represent the probability that they effectively provide relevant information about the target network resource. For each decay function, the order of the comments corresponding to that decay function is obtained based on the weight of each comment and the interaction information of each comment. Therefore, by displaying the target comments among multiple comments according to the order of the comments corresponding to each decay function, it is possible to more accurately display recently published target comments that effectively provide relevant information about the target network resource. Consequently, users can browse recently published target comments that effectively provide relevant information about the target network resource, thus improving the user experience. Attached Figure Description

[0084] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0085] Figure 1 This is a first flowchart of a comment display method provided in an embodiment of the present invention;

[0086] Figure 2 This is a schematic diagram illustrating the first type of correspondence between the target time interval and weight of comments provided in an embodiment of the present invention;

[0087] Figure 3 This is a schematic diagram illustrating a second correspondence between the target time interval and weight of comments, provided in an embodiment of the present invention.

[0088] Figure 4 This is a schematic diagram illustrating a third type of correspondence between the target time interval and weight of comments, provided in an embodiment of the present invention.

[0089] Figure 5 This is a second flowchart of the comment display method provided in an embodiment of the present invention;

[0090] Figure 6 This is a third flowchart of the comment display method provided in an embodiment of the present invention;

[0091] Figure 7 This is a fourth flowchart of the comment display method provided in an embodiment of the present invention;

[0092] Figure 8 This is a fifth flowchart of the comment display method provided in an embodiment of the present invention;

[0093] Figure 9 This is a schematic diagram illustrating the logical relationship for determining target comments provided in an embodiment of the present invention;

[0094] Figure 10 This is a sixth flowchart of the comment display method provided in the embodiments of the present invention;

[0095] Figure 11 A structural diagram of a comment display device provided in an embodiment of the present invention;

[0096] Figure 12 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0097] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0098] When displaying user-posted comments, the client can show comments that were posted more recently, i.e., the most recent comments about online resources. However, since the latest comments don't necessarily provide accurate information about the online resources, users may not be able to obtain relevant information while browsing the comments displayed on the client, resulting in a poor user experience.

[0099] To address the aforementioned problems, this invention provides a comment display method applied to an electronic device. The electronic device can acquire multiple comments targeting a target network resource and multiple decay functions. Following the method provided in this invention, for each decay function, the weight of each comment corresponding to that decay function is determined based on the decay function and the posting time of each comment. Then, based on the weight of each comment corresponding to the decay function and the interaction information of each comment, the multiple comments are sorted to obtain the arrangement order of the comments corresponding to the decay function. Subsequently, based on the arrangement order of the comments corresponding to each decay function, the target comment is displayed from among the multiple comments. The target comment is a recently posted comment that provides relatively good information about the target network resource. Consequently, users can browse recently posted target comments that provide relatively good information about the target network resource, thus improving the user experience.

[0100] See Figure 1 , Figure 1 A first flowchart of a comment display method provided in an embodiment of the present invention. The method may include the following steps:

[0101] S101: Obtain multiple comments for the target network resource, as well as multiple decay functions.

[0102] S102: For each decay function, determine the weight of each comment corresponding to the decay function based on the decay function and the posting time of each comment.

[0103] Among them, the weight of comments represented by different decay functions decreases by different amounts as the target time interval increases; the target time interval is the time interval between the posting time of the comment and the current time.

[0104] S103: Based on the weight of each comment corresponding to the decay function and the interaction information of each comment, sort the multiple comments to obtain the order of the comments corresponding to the decay function.

[0105] S104: Based on the order of comments corresponding to each decay function, display the target comment among multiple comments.

[0106] Based on the comment display method provided in this embodiment of the invention, the weight of a comment can represent the probability that it effectively provides relevant information about the target network resource. Furthermore, since users generally interact with comments that effectively provide relevant information about the target network resource, such as by liking or replying, the interaction information of the comments can represent the probability that they effectively provide relevant information about the target network resource. For each decay function, the order of the comments corresponding to that decay function is obtained based on the weight of each comment and the interaction information of each comment. Therefore, by displaying the target comments among multiple comments according to the order of the comments corresponding to each decay function, it is possible to more accurately display recently published target comments that effectively provide relevant information about the target network resource. Correspondingly, users can browse recently published target comments that effectively provide relevant information about the target network resource, thus improving the user experience.

[0107] Regarding step S101, the user can post comments on the target network resource through the client. For example, the target network resource can be a video, and when the user watches the video through the client, they can post comments on the video, such as describing the video content; or, the target network resource can also be music, and when the user plays the music through the client, they can post comments on the music, such as introducing the background of the music's creation.

[0108] Correspondingly, if the electronic device is the client, it can directly obtain multiple comments from multiple users regarding the target network resource, thus obtaining multiple comments on the target network resource.

[0109] If the electronic device is a server, it can obtain multiple comments from multiple users on the target network resource from the client, thus obtaining multiple comments on the target network resource.

[0110] When the time interval between the publication time of the target online resource and the current time is short, such as within 3 days after the target online resource is published, the client can directly display all the comments on the target online resource because there are few comments published by users through the client.

[0111] As the time interval between the publication time of the target network resource and the current time increases, the number of comments posted by users regarding the target network resource increases. Since the number of comments that the client's display interface can display is limited, meaning the client cannot display all comments on the display interface, the electronic device can display the target comment from multiple comments on the display interface according to the method provided in the embodiments of the present invention.

[0112] Electronic devices can acquire multiple attenuation functions. The number of attenuation functions can be set according to needs. For example, to improve the efficiency of comment display, fewer attenuation functions can be set; to improve the accuracy of comment display, more attenuation functions can be set.

[0113] The decay function represents the functional relationship between the weight of a comment and a target time interval, which is the time interval between the comment's publication time and the current time. Different decay functions represent different degrees to which the weight of a comment decreases as the target time interval increases.

[0114] Regarding step S102, when the electronic device acquires multiple comments, it can also acquire the publication time of each comment. Since user-posted comments cannot provide information about target network resources after the comment's publication time, comments published later are more likely to provide recent information about target network resources than comments published earlier. For each comment, the size of the target time interval corresponding to that comment represents the probability that the comment provides recent information about target network resources. The smaller the target time interval of the comment, i.e., the later the comment's publication time, the greater the probability that the comment provides recent information about target network resources; conversely, the larger the target time interval of the comment, i.e., the earlier the comment's publication time, the lower the probability that the comment provides recent information about target network resources.

[0115] Furthermore, as the target time interval increases, the probability that earlier published comments provide relatively good information about the target network resource decreases. Since the weight of a comment represents the probability that it provides relatively good information about the target network resource, the weight of a comment decreases as the target time interval increases.

[0116] The smaller the target time interval of a comment, the later the comment was published, and the greater the weight of the comment. When the weight of a comment is greater, the probability that the comment can provide relatively recent relevant information about the target network resource is higher. Conversely, the larger the target time interval of a comment, the earlier the comment was published, and the lower the weight of the comment. When the weight of a comment is lower, the probability that the comment can provide relatively recent relevant information about the target network resource is lower.

[0117] For each decay function, the electronic device can determine the weight of each comment corresponding to that decay function based on the decay function and the posting time of each comment.

[0118] In some embodiments, the plurality of decay functions include: a first decay function, a second decay function, and a third decay function.

[0119] The first decay function can be: among multiple decay functions, the decay function whose weight of the comment decreases the most as the target time interval increases, such as a Gaussian function.

[0120] The second decay function is the decay function among multiple decay functions that reduces the weight of the comment the least as the target time interval increases. For example, the second decay function can be an exponential function.

[0121] The decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is less than the decrease in the weight of the comment corresponding to the first decay function as the target time interval increases; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is greater than the decrease in the weight of the comment corresponding to the second decay function as the target time interval increases.

[0122] Specifically, the first decay function is:

[0123]

[0124] Where w is the weight of the comment, and x is the target time interval for the comment. The unit of x is days.

[0125] Since comments with shorter target time intervals have higher weights, and comments with shorter target time intervals are those published later, electronic devices can determine the weight of each comment based on a first decay function to identify later-published comments.

[0126] Since the weight of the comment corresponding to the first decay function decreases the most as the target time interval increases, for each comment, after the user publishes the comment targeting the target network resource, the weight of the comment decreases the most as the target time interval increases. Accordingly, determining the weight of each comment based on the first decay function allows comments published later to have a higher weight, and comments published earlier to have a lower weight.

[0127] See Table (1), which shows the correspondence between the target time interval and weight of the comments obtained based on the first decay function.

[0128] Table (1)

[0129] x (target time interval for comments) w(weight) 0 2.0001 1 1.871114 2 1.5319567 3 1.0977233 4 0.68840757 5 0.37785121 6 0.18153591 7 0.076366653 8 0.028156934 9 0.0091331619

[0130] Based on Table (1), we can obtain Figure 2 The diagram shows the first type of correspondence between the target time interval and the weight of the comments. Figure 2 The horizontal axis is x, and the vertical axis is w. Figure 2The x-coordinate of a point in Table (1) represents the target time interval of the comments, and the y-coordinate represents the weight in Table (1). That is, a set of (x, w) in Table (1) can correspond to... Figure 2 One of the points.

[0131] For example, Figure 2 Point A in the table corresponds to (0, 2.0001) in Table (1); Figure 2 Point B in the table corresponds to (1, 1.871114) in Table (1); Figure 2 Point C in the table corresponds to (2, 1.5319567) in Table (1); Figure 2 Point D in the table corresponds to (3, 1.0977233) in Table (1); Figure 2 Point E in the table corresponds to (4, 0.68840757) in Table (1); Figure 2 Point F in the table corresponds to (5, 0.37785121) in Table (1).

[0132] The second decay function is:

[0133] w = 20.8465645221e (-0.1456829732x) (2)

[0134] Where w is the weight of the comment, and x is the target time interval for the comment. The unit of x is years.

[0135] In order to identify comments that were published very early and provide good information about the target network resources, the electronic device can determine the weight of each comment corresponding to the first decay function based on the second decay function.

[0136] Because the weight of a comment corresponding to the second decay function decreases the least with increasing target time interval, for each comment, after a user posts a comment targeting a target network resource, the decrease in weight is minimal as the target time interval increases. Consequently, determining the weight of each comment based on the second decay function ensures that the weight decreases very slowly with increasing target time interval. This also ensures that comments posted earlier generally have higher weights.

[0137] See Table (2), which shows the correspondence between the target time interval and weight of the comments obtained based on the second decay function.

[0138] Table (2)

[0139]

[0140]

[0141] Based on Table (2), we can obtain Figure 3 The diagram shows a second type of correspondence between the target time interval and weight of the comments. Figure 3 The horizontal axis is x, and the vertical axis is w. Figure 3 The x-coordinate of a point in Table (2) represents the target time interval of the comments, and the y-coordinate represents the weight in Table (2). That is, a (x, w) in Table (2) can correspond to... Figure 3 One of the points.

[0142] For example, Figure 3 Point A in the table corresponds to (0, 20.846565) in Table (2); Figure 3 Point B in the table corresponds to (1, 18.020431) in Table (2); Figure 3 Point C in the table corresponds to (2, 15.577432) in Table (2); Figure 3 Point D in the table corresponds to (3, 13.465626) in Table (2); Figure 3 Point E in the table corresponds to (4, 11.640114) in Table (2); Figure 3 Point F in the table corresponds to (5, 10.062084) in Table (2); Figure 3 Point G in the table corresponds to (6, 8.6979844) in Table (2); Figure 3 Point H in the table corresponds to (7, 7.5188135) in Table (2); Figure 3 Point I in the table corresponds to (8, 6.4995008) in Table (2); Figure 3 Point J in the table corresponds to (9, 5.6183746) in Table (2); Figure 3 Point K in the table corresponds to (10, 4.8567011) in Table (2); Figure 3 Point L in the table corresponds to (11, 4.1982865) in Table (2); Figure 3 Point M in the table corresponds to (12, 3.6291319) in Table (2).

[0143] The third decay function is:

[0144]

[0145] Where w is the weight of the comment, and x is the target time interval for the comment. The unit of x is months.

[0146] In order to identify comments that were published earlier and provide relevant information about the target network resources, the electronic device can determine the weight of each comment based on the third decay function.

[0147] Because the decrease in the weight of comments corresponding to the third decay function as the target time interval increases is less than that of comments corresponding to the first decay function, and the decrease in the weight of comments corresponding to the third decay function as the target time interval increases is greater than that of comments corresponding to the second decay function, meaning the decrease in the weight of comments corresponding to the third decay function is larger, for each comment, after a user publishes a comment targeting a specific network resource, the decrease in the weight of that comment is larger as the target time interval increases. Determining the weight of each comment based on the third decay function allows comments published later to have a larger weight, and comments published earlier to have a smaller weight.

[0148] See Table (3), which shows the correspondence between the target time interval and weight of the comments obtained based on the third decay function.

[0149] Table (3)

[0150]

[0151]

[0152] Based on Table (3), we can obtain Figure 4 The diagram shows the third type of correspondence between the target time interval and weight of the comments. Figure 4 The horizontal axis is x, and the vertical axis is w. Figure 4 The x-coordinate of a point in Table (3) represents the target time interval of the comments, and the y-coordinate represents the weight in Table (3). That is, a (x, w) in Table (3) can correspond to... Figure 4 One of the points.

[0153] For example, Figure 4 Point A in the table corresponds to (0, 2.0001) in Table (3); Figure 4 Point B in the table corresponds to (1, 1.9820006) in Table (3); Figure 4 Point C in the table corresponds to (2, 1.9286792) in Table (3); Figure 4 Point D in the table corresponds to (3, 1.842979) in Table (3); Figure 4 Point E in the table corresponds to (4, 1.7293584) in Table (3); Figure 4 Point F in the table corresponds to (5, 1.5935069) in Table (3); Figure 4 Point G in the table corresponds to (6, 1.4418742) in Table (3); Figure 4 Point H in the table corresponds to (7, 1.2811661) in Table (3); Figure 4Point I in the table corresponds to (8, 1.1178626) in Table (3).

[0154] Based on the above processing, since the weights of each comment determined by each decay function represent the probability that the comment can provide relatively good information about the target network resource, the subsequent arrangement order of the comments corresponding to each decay function is obtained based on the weights of each comment corresponding to each decay function. Furthermore, by displaying the target comments among multiple comments according to the arrangement order of the comments corresponding to each decay function, it is possible to more accurately display recently published comments that can provide relatively good information about the target network resource. Consequently, users can browse recently published comments that can provide relatively good information about the target network resource, thus improving the user experience.

[0155] Regarding step S103, for a period of time after the target network resource is published, the client can directly display all comments related to the target network resource. Subsequently, other users can browse the comments displayed by the client before browsing the target network resource, and obtain relevant information about the target network resource from the comments displayed by the client to determine whether to browse the target network resource.

[0156] When other users browse target network resources, they can also view the comments posted by that user through the client and perform preset actions on those comments. These preset actions include at least one of the following: liking, disliking, replying to, or forwarding the comment. The electronic device counts the number of times users perform these preset actions on the comment, thus obtaining the interaction information for that comment.

[0157] Since users generally pre-select comments that provide relatively good information about the target network resource, these comments tend to have higher interaction rates. Therefore, for each comment, the interaction rate represents the probability that the comment provides relatively good information about the target network resource. The more interaction a comment has, the higher the probability that it provides relatively good information about the target network resource; conversely, the less interaction a comment has, the lower the probability.

[0158] A user's actions of liking, replying to, or sharing a comment indicate that the user has obtained information about the target online resource from that comment. A user's actions of disliking a comment indicate that the user has not obtained information about the target online resource from that comment.

[0159] In one implementation, the electronic device can count the sum of the number of times a user likes, replies, and shares a comment, and calculate the difference between this sum and the number of times a user dislikes a comment, thus obtaining the number of times the user performed a preset action on the comment, which is the interaction information of the comment.

[0160] In another implementation, the electronic device assigns different weights to each preset operation performed by the user in response to the comment, then calculates the product of the number of times the user performed each preset operation in response to the comment and the weight of the preset operation, and then calculates the sum of the calculation results corresponding to each preset operation to obtain the number of times the user performed the preset operation in response to the comment, that is, to obtain the interaction information of the comment.

[0161] For example, an electronic device can assign a weight of 0.3 to a like, 0.4 to a reply, 0.2 to a share, and 0.1 to a dislike. If a comment receives 100 likes, 10 replies, 20 shares, and 10 dislikes, the electronic device can calculate the comment's interaction information as 39.

[0162] For each decay function, after determining the weight of each comment corresponding to that decay function, the electronic device can sort multiple comments based on the weight of each comment corresponding to that decay function and the interaction information of each comment, thus obtaining the sorting order of the comments corresponding to that decay function.

[0163] In some embodiments, for each comment, the interaction information for that comment is: the number of preset actions performed on that comment. The preset actions include at least one of the following: a user's like, dislike, reply, or share action on that comment.

[0164] exist Figure 1 Based on this, see Figure 5 Step S103 may include the following steps:

[0165] S1031: For each comment, calculate the product of the weight of the comment corresponding to the decay function and the total number of preset operations for the comment to obtain the quality data of the comment corresponding to the decay function.

[0166] S1032: Sort the multiple comments according to the quality data of each comment corresponding to the decay function from largest to smallest, and obtain the sorting order of each comment corresponding to the decay function.

[0167] The amount of interactive information in a comment indicates the probability that the comment can provide relevant information about the target network resource. The weight of a comment indicates the probability that the comment can provide relevant recent information about the target network resource. Therefore, after the electronic device determines the weight and interactive information of each comment corresponding to the decay function, for each comment, the electronic device can calculate the product of the comment's weight and interactive information corresponding to the decay function to obtain the quality data of that comment. The magnitude of the quality data indicates the probability that the comment can provide relevant recent information about the target network resource. The larger the quality data of the comment, the greater the probability that the comment can provide relevant recent information about the target network resource; the smaller the quality data of the comment, the lower the probability that the comment can provide relevant recent information about the target network resource.

[0168] Furthermore, the electronic device sorts multiple comments according to the quality data of each comment corresponding to the decay function from largest to smallest. In the resulting order of comments corresponding to the decay function, the earlier a comment is in the order, the greater the probability that the comment can provide relatively good recent relevant information about the target network resource; the later a comment is in the order, the lower the probability that the comment can provide relatively good recent relevant information about the target network resource.

[0169] Based on the above processing, since the magnitude of the comment's quality data indicates the probability that the comment can provide relatively good recent relevant information about the target network resource, the comments are then sorted according to the quality data corresponding to each decay function. The target comments are then displayed in multiple sorting orders; these target comments are those that can provide relatively good recent relevant information about the target network resource. Consequently, users browsing recently published target comments that effectively provide relevant information about the target network resource can improve the user experience.

[0170] Regarding step S104, since the number of comments that the client's display interface can show is limited, meaning the client cannot display all the comments, the electronic device, after obtaining the order of the comments corresponding to each attenuation function, determines the target comment that can better provide recent relevant information about the target network resources from among the multiple comments based on the order of the comments corresponding to each attenuation function, and displays the target comment.

[0171] In some embodiments, a decay function corresponds to a preset number, which is the number of target comments determined from each comment according to the order in which the comments are arranged according to the decay function.

[0172] When the target network resource is published in different time periods, the ratio between the preset numbers corresponding to each decay function is different; the proportion of the preset number corresponding to each decay function is determined based on the publication time of the target network resource and the extent to which the weight of the comments corresponding to each decay function decreases as the target time interval increases.

[0173] For example, when the publication time of the target online resource falls within a first time period, the ratio between the preset numbers corresponding to each decay function is the first ratio. In the first ratio, the preset number corresponding to the first decay function has the largest proportion. The first decay function is: among multiple decay functions, the one whose weight of the comment decreases the most as the target time interval increases. For example, the first time period can be: within 30 days after the publication time of the target online resource.

[0174] For example, when the target online resource was published within the first time period, such as 15 days ago, and there are many comments posted by users regarding the target online resource, then there will be more comments that provide recent relevant information about the target online resource. Therefore, to provide users with more recent relevant information about the target online resource, the client needs to display more comments that can provide this information. Since the earlier a comment appears in the order of comments obtained according to the first decay function, the greater the probability that the comment can provide recent relevant information about the target online resource, the client can determine more target comments from the comments corresponding to the first decay function according to the order of comments corresponding to the first decay function. At this time, the ratio between the preset numbers corresponding to each decay function is the first ratio. In the first ratio, the preset number corresponding to the first decay function has the largest proportion. For example, if the total number of target comments is 10, the preset number corresponding to the first decay function can be 6, the preset number corresponding to the second decay function can be 3, and the preset number corresponding to the third decay function can be 1.

[0175] When the release time of the target network resource falls within the second time period, the ratio between the preset numbers corresponding to each decay function is the second ratio. In the second ratio, the preset number corresponding to the second decay function has the largest proportion. The second decay function is the decay function among multiple decay functions whose weight decreases the least as the target time interval increases. For example, the second time period could be 3 years or more after the video's release time.

[0176] When the target online resource was published in the second time period, such as 20 years ago, users can interact more with comments that provide relevant information about the target online resource. Therefore, to provide users with more information about the target online resource, the client needs to display more comments that provide such information. Since the earlier a comment appears in the order of comments obtained according to the second decay function, the greater the probability that the comment provides relevant information about the target online resource, the client can determine more target comments from those comments corresponding to the second decay function. At this point, the ratio between the preset numbers corresponding to each decay function is the second ratio. In the second ratio, the preset number corresponding to the second decay function has the largest proportion. For example, if the total number of target comments is 10, the preset number corresponding to the first decay function can be 1, the preset number corresponding to the second decay function can be 6, and the preset number corresponding to the third decay function can be 3.

[0177] When the publication time of the target online resource falls within the third time period, the ratio between the preset numbers corresponding to each decay function is the third ratio. In the third ratio, the preset number corresponding to the third decay function has the largest proportion. The decrease in the weight of comments corresponding to the third decay function as the target time interval increases is less than the decrease in the weight of comments corresponding to the first decay function; the decrease in the weight of comments corresponding to the third decay function as the target time interval increases is greater than the decrease in the weight of comments corresponding to the second decay function. For example, the third time period can be: beyond 30 days after the publication time of the target online resource, and within 3 years.

[0178] When the target online resource was published within the third time period (e.g., three months ago), fewer user comments are posted about it, resulting in fewer comments providing relevant information. Conversely, when the target online resource was recently published, more user comments are posted, leading to a greater number of comments providing relevant information. Therefore, to provide users with relevant information about the target online resource, the client needs to display a large number of comments that provide recent information. Since, according to the third decay function, comments appearing earlier in the order of comments are more likely to provide recent information, the client can determine the most relevant comments based on the order of comments corresponding to the third decay function. The ratio between the preset numbers corresponding to each decay function is then the third ratio. In this third ratio, the preset number corresponding to the third decay function has the largest proportion. If the total number of target comments can be 10, the preset number corresponding to the first decay function can be 2, the preset number corresponding to the second decay function can be 2, and the preset number corresponding to the third decay function can be 6.

[0179] Based on the above processing, the electronic device determines the ratio between the preset numbers corresponding to each attenuation function according to the release time of the target network resource. In other words, the electronic device can provide the user with relevant information about the target network resource based on the release time of the target network resource, thereby improving the user experience.

[0180] Once an electronic device identifies a target comment that provides recent relevant information about the target network resource, it can display the target comment for the user to browse.

[0181] If the electronic device is the client, for each decay function, the electronic device selects the first preset number of target comments corresponding to the decay function from the comments according to the order of the comments corresponding to the decay function, determines the display method of the target comments corresponding to each decay function, and directly displays each target comment according to the display method of each target comment for the user to browse.

[0182] If the electronic device is a server, for each decay function, the electronic device selects a preset number of target comments corresponding to that decay function from the comments corresponding to that decay function, and then sends each target comment, along with its display method, to the client. Correspondingly, upon receiving the target comments and their display methods, the client can display the target comments according to those methods.

[0183] Electronic devices can determine how each target comment is displayed in the following ways.

[0184] In one implementation, the electronic device can determine the display method of each target comment based on its quality data. For example, the target comments may include: target comment 1, target comment 2, target comment 3, and target comment 4. Target comment 1 has a quality data of 3, target comment 2 has a quality data of 1, target comment 3 has a quality data of 2, and target comment 4 has a quality data of 4. The target comments are arranged in descending order of their quality data, resulting in the following display method: target comment 4, target comment 1, target comment 3, and target comment 2.

[0185] In another implementation, Figure 1 Based on this, see Figure 6 Step S104 may include the following steps:

[0186] S1041: For each decay function, according to the order of the comments corresponding to the decay function, select the first preset number of comments corresponding to the decay function from the comments corresponding to the decay function to obtain the target comment group corresponding to the decay function.

[0187] S1042: Determine the display order of the target comment groups corresponding to each decay function according to the display priority from high to low.

[0188] S1043: Display the target comments in multiple target comment groups according to the display order of the target comment groups corresponding to each decay function, and the arrangement order of the comments in each target comment group.

[0189] Since users typically view comments at the top of the screen first when browsing comments about a target online resource, comments that provide recent and relevant information about the target online resource should be displayed at the top of the client's interface.

[0190] Electronic devices can acquire the display priority corresponding to each decay function. The higher the display priority of each decay function, the greater the probability that each target comment in the target comment group corresponding to that decay function can provide relatively good recent relevant information about the target network resource.

[0191] Therefore, electronic devices can determine the display order (which can be called the group display order) of the target comment groups corresponding to each decay function according to the display priority from high to low. For example, if the display priority of the first decay function is high, the target comments in the target comment group corresponding to the first decay function need to be displayed in the upper position of the client's display interface.

[0192] In one implementation, the display priority of each attenuation function can be fixed. For example, the display priority of the first attenuation function can be preset to be higher than that of the second attenuation function, and the display priority of the second attenuation function can be preset to be higher than that of the third attenuation function.

[0193] In another implementation, the display priority of each decay function can be obtained based on the publication time of the target network resource.

[0194] For example, the target network resource is a video. If the video's release time falls within a specific time period, such as 20 days ago, the video is considered to be in its peak viewing period. During this peak period, there are many user comments, providing a significant amount of recent information about the video. To provide users with more recent information about the video, comments with later release times can be displayed at the top of the client's display interface. Since later release comments have a higher weight than earlier release comments in the weighting determined by the first decay function, when sorting comments based on their weights and interaction information, later release comments are more likely to appear earlier in the order of comments according to the first decay function. In other words, the earlier a comment appears in the order of comments obtained by the first decay function, the greater the probability that it provides recent information about the target network resource. Therefore, the display priority corresponding to the first decay function can be set to the highest.

[0195] If the video's release date falls within the second time period, such as 20 years ago, it belongs to the video library period. Since users need to extract video-related information from comments, the client should display the most relevant comments at the top of the client's interface. Because comments with earlier release dates have higher weights according to the second decay function, when sorting comments based on their weights and interaction information, comments with higher interaction information are more likely to appear earlier in the order of comments according to the second decay function. In other words, the earlier a comment appears in the order of comments obtained by the second decay function, the greater the probability that it provides relevant information about the target online resource. Therefore, the display priority corresponding to the second decay function can be set to the highest.

[0196] If a video's release time falls within the third time period, such as a video released a year ago, it's considered to be in a non-peak period. During a non-peak period, fewer user comments are posted, resulting in fewer comments providing relevant information. Conversely, during a peak period, more user comments are posted, leading to more comments providing relevant information. Comments posted during a peak period are considered earlier posts. Therefore, to provide users with relevant video information, earlier posts can be displayed at the top of the client's interface. Since later posts have a higher weight than earlier posts in the weighting determined by the third decay function, when sorting comments based on their weight and interaction information, later posts with more interaction are more likely to appear earlier in the order of comments according to the third decay function. Since the earlier a comment appears in the order of comments obtained according to the third decay function, the greater the probability that the comment can provide more recent relevant information about the target network resource, the display priority corresponding to the third decay function can be set to the highest.

[0197] Furthermore, for each target comment group, the order of the target comments within that group is, in the order of comments according to the decay function corresponding to that target comment group (which can be called the comment order). For each target comment in that group, its position within the order of comments according to the decay function represents the probability that the comment can provide relatively good recent relevant information about the target network resource. The earlier the comment appears in the order of comments according to the decay function, the greater the probability that it can provide relatively good recent relevant information about the target network resource; conversely, the later the comment appears in the order of comments according to the decay function, the lower the probability that it can provide relatively good recent relevant information about the target network resource.

[0198] For example, the grouping display order is: the target comment group corresponding to the third decay function, the target comment group corresponding to the second decay function, and the target comment group corresponding to the first decay function.

[0199] The target comment group corresponding to the first decay function includes target comment 1 and target comment 2, and the order of the comments corresponding to the first decay function is: target comment 1, target comment 2.

[0200] The target comment groups corresponding to the second decay function include target comment 3 and target comment 4. The order of the comments corresponding to the second decay function is: target comment 4, target comment 3.

[0201] The target comment group corresponding to the third decay function includes target comment 5 and target comment 6. The order of the comments corresponding to the third decay function is: target comment 6, target comment 5.

[0202] Therefore, based on the group display order and the comment arrangement order, the electronic device can determine the arrangement order of the target comments as follows: target comment 6, target comment 5, target comment 4, target comment 3, target comment 1, and target comment 2. Subsequently, the electronic device displays the target comments according to their arrangement order.

[0203] Based on the above processing, since users browse the target comments displayed on the client's screen in a top-to-bottom order—that is, they first browse the target comments displayed at the top of the client's screen—displaying the target comments according to their order of arrangement allows those that provide the most recent relevant information about the target network resources to be displayed at the top of the client's screen. This ensures that users can browse the target comments that provide the most recent relevant information about the target network resources, thereby improving the user experience.

[0204] In some embodiments, to improve the efficiency of comment display, Figure 1 Based on this, see Figure 7 Before step S102, the following steps may also be included:

[0205] S105: Based on the interaction information and posting time of each comment, group the comments to obtain multiple alternative comment groups.

[0206] Each alternative comment group corresponds to a decay function.

[0207] Accordingly, step S102 may include the following steps:

[0208] S1021: For each decay function, determine the weight of each comment in the candidate comment group corresponding to the decay function based on the decay function and the publication time of each comment in the candidate comment group corresponding to the decay function.

[0209] For each comment, the interaction information represents the number of preset actions performed by the user in response to that comment. The amount of interaction information indicates the probability that the comment can provide relevant information about the target online resource. More interaction information indicates a higher probability that the comment can provide relevant information about the target online resource; less interaction information indicates a lower probability that the comment can provide relevant information about the target online resource.

[0210] The size of the target time interval for a comment indicates the probability that the comment provides recent relevant information about the target network resource. A larger target time interval indicates a lower probability that the comment provides recent relevant information about the target network resource; conversely, a smaller target time interval indicates a lower probability that the comment provides recent relevant information about the target network resource.

[0211] Therefore, electronic devices can group comments based on their interaction information and posting time, resulting in multiple candidate comment groups, each corresponding to a decay function. For example, comments posted later can be grouped into a first candidate comment group; comments with greater interaction information can be grouped into a second candidate comment group; and comments posted earlier can be grouped into a third candidate comment group.

[0212] In some embodiments, Figure 7 Based on this, see Figure 8 Step S105 may include the following steps:

[0213] S1051: Group comments published no earlier than the first time into one group to obtain the first alternative comment group.

[0214] S1052: Group comments with more than a preset threshold of interactive information into a second alternative comment group.

[0215] S1053: Group comments whose posting time falls between the second and first time into a third alternative comment group.

[0216] The second time point is earlier than the first time point.

[0217] Since the target time interval of a comment can represent the probability that the comment provides recent relevant information about the target network resource, electronic devices can group comments with a higher probability of providing recent relevant information about the target network resource into a group. That is, they can group recently published comments into a group, that is, group comments whose publication time is no earlier than the first time, to obtain the first candidate comment group.

[0218] The first time is prior to the current time, and the time interval between the first time and the current time can be set by technical personnel based on experience. For example, the time interval between the first time and the current time can be 15 days. Alternatively, the time interval between the first time and the current time can be 10% of the time interval between the release time of the target network resource and the current time.

[0219] The amount of interactive information in a comment can indicate the probability that it provides relevant information about the target online resource. Therefore, electronic devices can group comments with higher levels of interaction—that is, group comments where the user performs a preset action more than a preset number of times—to obtain a second candidate comment group. Comments in this second candidate group have a higher probability of providing relevant information about the target online resource.

[0220] The preset number of times can be set by technical personnel based on experience. For example, the preset number of times can be a fixed number, such as 100 times. Alternatively, the preset number of times can be the number of times users performed the preset action in each comment, ranked by the number of times users performed the preset action in the top 10% of the comments, but it is not limited to these.

[0221] Then, the electronic device can group comments that have a lower probability of providing recent relevant information about the target network resource compared to comments in the first candidate comment group, and a higher probability of providing recent relevant information about the target network resource compared to comments in the second candidate comment group. In other words, it can group comments published within a certain time period prior to the recent event into a group, specifically comments published between the second and first timestamps, thus obtaining the third candidate comment group. The second timetamp is earlier than the first timetamp.

[0222] The second time is located before the current time, and the time interval between the second time and the current time can be set by technical personnel based on experience. For example, the time interval between the second time and the current time can be one year. Alternatively, the time interval between the second time and the current time can be 30% of the time interval between the publication time of the target network resource and the current time.

[0223] For each comment, if the comment meets two grouping conditions simultaneously, such as the comment's interaction information being greater than a preset threshold and the comment's posting time not being earlier than the first time, the electronic device can classify the comment into the first alternative comment group, or it can classify the comment into the third alternative comment group.

[0224] Alternatively, electronic devices can obtain the display priority corresponding to a decay function and classify the comment into the alternative comment group corresponding to the decay function with higher display priority.

[0225] Based on the above processing, electronic devices can determine the candidate comment groups to which each comment belongs based on the interaction information and the posting time of each comment. In other words, the electronic device can categorize comments into recently posted comments and comments that provide relevant information about the target network resource. Accordingly, by selecting the target comment from the recently posted comments and the comments that provide relevant information about the target network resource, the user can browse comments that provide relevant information about the target network resource, thus improving the user experience.

[0226] Furthermore, since each candidate comment group only includes a subset of comments, for each decay function, the electronic device only needs to determine the target comment from the candidate comment group corresponding to that decay function, rather than determining the target comment from all comments based on that decay function. This improves comment display efficiency.

[0227] In some embodiments, for each candidate comment group, the weight of each comment in the candidate comment group can be determined based on the decay function corresponding to the candidate comment group and the publication time of each comment in the candidate comment group. The weight of a comment can represent the probability that the comment provides recent relevant information about the target network resource.

[0228] In some embodiments, for each candidate comment group, after obtaining the weight of each comment in the candidate comment group, the electronic device can sort the comments in the candidate comment group according to the weight of each comment and the interaction information of each comment, so as to obtain the sorting order of the comments in the candidate comment group.

[0229] Furthermore, the electronic device can select from the various candidate comment groups the comment that is more likely to provide recent relevant information about the target network resources as the target comment.

[0230] Specifically, for each candidate comment group, the electronic device can select the first preset number of comments from the order in which the comments in the candidate comment group are arranged, thus obtaining the target comment group corresponding to the candidate comment group. Then, based on the target comment group corresponding to each candidate comment group, the electronic device displays the target comments from multiple comments.

[0231] In some embodiments, the plurality of decay functions include: a first decay function, a second decay function, and a third decay function.

[0232] The first alternative comment group corresponds to the first decay function. The first decay function is the decay function among multiple decay functions that causes the comment weight to decrease the largest amount as the target time interval increases. For example, the first decay function can be a Gaussian function. This first decay function can be formula (1) in the aforementioned embodiment.

[0233] Since all comments in the first candidate comment group were published no earlier than the first time, meaning they are all selected comments with later publication times, and later-published comments are more likely to provide recent relevant information about the target network resource, the electronic device can determine the weight of each comment in the first candidate comment group based on a first decay function to identify later-published comments from the first candidate comment group. Because comments with shorter target time intervals have higher weights, and comments with shorter target time intervals (i.e., later-published comments) also have higher weights in the first candidate comment group, the calculated quality data for those comments can be larger. Subsequently, when determining the target comment based on the quality data, comments with later publication times can be identified as the target comments.

[0234] The second alternative comment group corresponds to the second decay function; the second decay function is the decay function among multiple decay functions that reduces the weight of the comment the least as the target time interval increases. For example, the second decay function can be an exponential function. The second decay function can be formula (2) in the aforementioned embodiment.

[0235] Since the comments in the second candidate comment group are those with interaction information exceeding a preset threshold, meaning they represent comments where the user performed preset actions frequently, these comments are more likely to provide relevant information about the target network resource. Therefore, to identify comments from the second candidate comment group that provide good information about the target network resource, the electronic device can determine the weight of each comment in the second candidate comment group based on a second decay function. Because the weight decreases very slowly with increasing target time intervals in the second decay function, the weights of the comments in the second decay function are relatively similar. Consequently, the more times the user performs preset actions on a comment, the higher the calculated quality data for that comment. Subsequently, when determining the target comment based on the quality data, the comments with the most frequent preset actions can be identified, thus identifying those that provide good information about the target network resource as the target comments.

[0236] The third alternative comment group corresponds to the third decay function; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is less than the decrease in the weight of the comment corresponding to the first decay function as the target time interval increases; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is greater than the decrease in the weight of the comment corresponding to the second decay function as the target time interval increases. The third decay function can be formula (3) in the aforementioned embodiment.

[0237] Since the comments in the third candidate comment group are those published between the second and first time points, they are essentially earlier published comments. Earlier published comments are likely those posted in the early stages of the target network resource's release, meaning they have a higher probability of providing relevant information. Therefore, to identify comments from the third candidate comment group that provide information about the target network resource, the electronic device can determine the weight of each comment in the third candidate comment group based on a third decay function. Because the weight decreases more slowly with increasing target time intervals in the third decay function, later published comments have a higher weight; that is, later published comments in the third candidate comment group have a higher weight. Subsequently, when determining the target comment based on quality data, later published comments can be identified, thus identifying comments that provide relevant information about the target network resource as the target comments.

[0238] See Figure 9 , Figure 9 This is a schematic diagram illustrating the logical relationship for determining target comments, provided in an embodiment of the present invention.

[0239] The target online resource can be a video. The video's release time is considered the first time segment if it's within three days of its initial release, i.e., during its peak viewing period. Since user comments on the target online resource are relatively few, the client can directly display all comments related to the target online resource. This means displaying the target comments through natural distribution.

[0240] Three days after a video is released, and within 30 days of its release (i.e., during its peak viewing period), the video's release time falls under the first timeframe. The electronic device can perform mixed display of highly interactive and trending comments. Highly interactive comments represent the target comment group corresponding to the second decay function; trending comments, i.e., comments whose release time is less than one year from the current time (i.e., the target time interval), represent the target comment groups corresponding to the first and third decay functions. Furthermore, the electronic device calculates the quality data of each comment according to the method provided in this embodiment, and selects and displays target comments from the highly interactive and trending comments based on the quality data and the target comment group to which each comment belongs.

[0241] The video's release time falls into the third time period if it occurs 30 days after its initial release and within three years of its release, i.e., during a non-peak period. The electronic device can perform a mixed display of highly interactive and trending comments. Following the method provided in this embodiment, the electronic device calculates the quality data of each comment, and based on the quality data and the target comment group to which each comment belongs, selects and displays the target comment from the highly interactive and trending comments.

[0242] Three years after the video's release, during the video's library phase, the release time falls into the second time period. Electronic devices can display highly interactive, trending, and latest comments in a mixed format. "Latest" refers to the most recent comments, i.e., comments with a target time interval of less than 15 days, representing the target comment group corresponding to the first decay function. Furthermore, the electronic device can, according to the method provided in this embodiment, select and display target comments from highly interactive comments, trending comments, and latest comments based on the quality data of each comment and the target comment group to which each comment belongs.

[0243] Based on the above processing, the weight of a comment can represent the probability that it effectively provides relevant information about the target network resource. Furthermore, since users generally interact with comments that effectively provide relevant information, such as liking or replying, the interaction information of the comments can represent the probability that they effectively provide relevant information about the target network resource. For each decay function, the order of the comments corresponding to that decay function is obtained based on the weight of each comment and the interaction information of each comment. Therefore, by displaying the target comments among multiple comments according to the order of the comments corresponding to each decay function, it is possible to more accurately display recently published target comments that effectively provide relevant information about the target network resource. Consequently, users can browse recently published target comments that effectively provide relevant information about the target network resource, thus improving the user experience.

[0244] Furthermore, since the target comment corresponding to each decay function is determined from all comments using that decay function, comments that can provide recent relevant information about the target network resources are avoided, thus improving the accuracy of the determined target comments.

[0245] Furthermore, by using multiple decay functions to jointly determine the target comments, the probability of displaying comments published within different time periods can be increased, thereby enhancing user engagement and willingness to post comments. Since the target comments include those that provide relevant information about the target network resources, the quality of each target comment displayed on the client's interface can also be improved, thus enhancing the user experience.

[0246] See Figure 10 , Figure 10 The sixth flowchart of the comment display method provided in the embodiments of the present invention.

[0247] S1001: Get comments.

[0248] Users can post comments on a target online resource using electronic devices. Correspondingly, the electronic device can retrieve multiple comments from various users on the target online resource, resulting in multiple comment sets. Furthermore, the electronic device can acquire multiple decay functions. The weight of a comment decreases by varying degrees as the target time interval increases, where the target time interval is the interval between the comment's posting time and the current time.

[0249] S1002: Determine multiple sorting orders based on the posting time of the comments.

[0250] After acquiring multiple comments and multiple decay functions for a target network resource, the electronic device determines the weight of each comment corresponding to each decay function based on the decay function and the posting time of each comment. Based on the weights of each comment corresponding to the decay function and the interaction information of each comment, the multiple comments are sorted to obtain the ranking order of the comments corresponding to the decay function.

[0251] In the aforementioned embodiments, the comment that appears earlier in the order of comments corresponding to the first decay function is the latest comment; in the aforementioned embodiments, the comment that appears earlier in the order of comments corresponding to the second decay function is the most popular comment; and in the aforementioned embodiments, the comment that appears earlier in the order of comments corresponding to the third decay function is the new hot comment.

[0252] S1003: Get TV series.

[0253] The TV series refers to the target network resource in the aforementioned embodiments.

[0254] S1004: Determine the time period to which the series belongs based on its release date.

[0255] The online release time of the series is the same as the release time of the target network resource in the aforementioned embodiment. The period to which the series belongs is the same as the period when the video is in its peak broadcast period, the period when the video is not in its peak broadcast period, or the period when the video is in its library.

[0256] Electronic devices can determine the time period to which a target online resource belongs based on its release time. If the time interval between the release time and the current time falls within the first time interval, the target online resource is determined to be in a peak viewing period; if the time interval falls within the third time interval, the target online resource is determined to be in a non-peak viewing period; and if the time interval falls within the second time interval, the target online resource is determined to be in a content library period.

[0257] S1005: Based on multiple sorting orders and the period to which the series belongs, identify the target comment from multiple comments and mix the target comments.

[0258] After determining the order of comments corresponding to each decay function, the electronic device can, based on the time period of the series, determine a preset number of comments corresponding to each decay function from the order of comments corresponding to each decay function, thus obtaining the target comment group corresponding to each decay function. Then, the target comments in each target comment group are mixed and arranged, that is, the display order of comments in multiple target comment groups is determined according to the display order of the target comment groups corresponding to each decay function and the arrangement order of the comments in each target comment group.

[0259] When the target network resource is in its peak viewing period, the ratio between the preset numbers corresponding to each decay function is the first ratio. In the first ratio, the preset number corresponding to the first decay function has the largest proportion.

[0260] When the target network resource is not in a peak broadcast period, the ratio between the preset numbers corresponding to each decay function is the third ratio. Among the third ratios, the preset number corresponding to the third decay function has the largest proportion.

[0261] When the target network resource is in the fragment library stage, the ratio between the preset numbers corresponding to each decay function is the second ratio. In the second ratio, the preset number corresponding to the second decay function has the largest proportion.

[0262] S1006: Output the sorting results.

[0263] The sorting result is the same as the display method of each target comment in the multiple target comment groups in the aforementioned embodiment.

[0264] After obtaining the group display order and the order of comments in each target comment group, the electronic device can display the target comments in multiple target comment groups according to the group display order and the order of comments in each target comment group. This is the sorting result output by the electronic device.

[0265] Based on the above processing, the weight of a comment can represent the probability that it effectively provides relevant information about the target network resource. Furthermore, since users generally interact with comments that effectively provide relevant information, such as liking or replying, the interaction information of the comments can represent the probability that they effectively provide relevant information about the target network resource. For each decay function, the order of the comments corresponding to that decay function is obtained based on the weight of each comment and the interaction information of each comment. Therefore, by displaying the target comments among multiple comments according to the order of the comments corresponding to each decay function, it is possible to more accurately display recently published target comments that effectively provide relevant information about the target network resource. Consequently, users can browse recently published target comments that effectively provide relevant information about the target network resource, thus improving the user experience.

[0266] Furthermore, since the target comment corresponding to each decay function is determined from all comments using that decay function, comments that can provide recent relevant information about the target network resources are avoided, thus improving the accuracy of the determined target comments.

[0267] Furthermore, by using multiple decay functions to jointly determine the target comments, the probability of displaying comments posted in different time periods can be increased. This ensures that user-posted comments have a certain display opportunity in different time periods, thereby increasing user engagement and willingness to post comments. Since the target comments include those that provide relevant information about the target network resources, the quality of each target comment displayed on the client's interface can be improved, thus enhancing the user experience.

[0268] Based on the same inventive concept as the above-described comment display method, this embodiment of the invention also provides a comment display device, see [link to related document]. Figure 11 The device includes:

[0269] The acquisition module 1101 is used to acquire multiple comments for a target network resource, as well as multiple decay functions;

[0270] The weight determination module 1102 is used to determine the weight of each comment corresponding to each decay function based on the decay function and the posting time of each comment; wherein, the weight of the comments represented by different decay functions decreases by different amounts as the target time interval increases; the target time interval is: the time interval between the posting time of the comment and the current time.

[0271] The sorting module 1103 is used to sort the multiple comments according to the weight of each comment corresponding to the decay function and the interaction information of each comment, so as to obtain the sorting order of each comment corresponding to the decay function;

[0272] Display module 1004 is used to display the target comment among the multiple comments based on the order of the comments corresponding to each decay function.

[0273] Optionally, for each comment, the interaction information for that comment is: the number of preset actions performed on that comment;

[0274] The sorting module 1103 is specifically used for:

[0275] For each comment, the product of the weight of the comment corresponding to the decay function and the total number of preset operations on the comment is calculated to obtain the quality data of the comment corresponding to the decay function.

[0276] Based on the quality data of each comment corresponding to the decay function in descending order, the multiple comments are sorted to obtain the arrangement order of each comment corresponding to the decay function;

[0277] Optionally, a decay function corresponds to a preset number; the preset number is: the number of target comments determined from the decay function according to the order of the comments corresponding to the decay function;

[0278] When the publication time of the target network resource is different, the ratio between the preset numbers corresponding to each decay function is different; the ratio between the preset numbers corresponding to each decay function is determined based on the publication time of the target network resource and the magnitude by which the weight of the comments corresponding to each decay function decreases as the target time interval increases.

[0279] Optionally, the display module 1104 is specifically used for:

[0280] For each decay function, according to the order of the comments corresponding to the decay function, select the first preset number of comments corresponding to the decay function from the comments corresponding to the decay function to obtain the target comment group corresponding to the decay function;

[0281] The display order of the target comment groups corresponding to each decay function is determined according to the display priority from high to low.

[0282] The target comments in the multiple target comment groups are displayed according to the display order of the target comment groups corresponding to each decay function, and the arrangement order of the comments in each target comment group.

[0283] Optionally, the plurality of attenuation functions include: a first attenuation function, a second attenuation function, and a third attenuation function;

[0284] The first attenuation function is:

[0285]

[0286] Where w is the weight of the comment, and x is the target time interval for the comment;

[0287] The second decay function is:

[0288] w = 20.8465645221e (-0.1456829732x)

[0289] Where w is the weight of the comment, and x is the target time interval for the comment;

[0290] The third attenuation function is:

[0291]

[0292] Where w is the weight of the comment, and x is the target time interval for the comment.

[0293] Optionally, the device further includes:

[0294] The grouping module is used to group comments according to their interaction information and publication time before determining the weight of each comment corresponding to each decay function based on the decay function and the publication time of each comment, thus obtaining multiple candidate comment groups; wherein, each candidate comment group corresponds to one decay function.

[0295] The weight determination module 1102 is specifically used for:

[0296] For each decay function, the weight of each comment in the candidate comment group corresponding to the decay function is determined based on the decay function and the posting time of each comment in the candidate comment group corresponding to the decay function.

[0297] Optionally, the grouping module is specifically used for:

[0298] Comments posted no earlier than the first time are grouped together to obtain the first alternative comment group;

[0299] Comments with more than a preset threshold of interactive information are grouped together to obtain a second alternative comment group;

[0300] Comments whose posting time falls between the second time and the first time are grouped together to obtain a third alternative comment group; wherein the second time is earlier than the first time.

[0301] Optionally, the first candidate comment group corresponds to the first decay function; the first decay function is: among the plurality of decay functions, the decay function whose weight of the comment decreases the most as the target time interval increases;

[0302] The second alternative comment group corresponds to the second decay function; the second decay function is: among the plurality of decay functions, the decay function whose weight of the comment decreases the least as the target time interval increases;

[0303] The third alternative comment group corresponds to the third decay function; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is less than the decrease in the weight of the comment corresponding to the first decay function as the target time interval increases; the decrease in the weight of the comment corresponding to the third decay function as the target time interval increases is greater than the decrease in the weight of the comment corresponding to the second decay function as the target time interval increases.

[0304] Based on the comment display device provided in this embodiment of the invention, the weight of a comment can indicate whether it effectively provides relevant information about the target network resource. Furthermore, since users typically interact with comments that effectively provide relevant information about the target network resource, such as by liking or replying, the interaction information of the comment can also indicate whether it effectively provides relevant information about the target network resource. For each decay function, the order of the comments corresponding to that decay function is obtained based on the weight of each comment and the interaction information of each comment. Therefore, by displaying the target comment among multiple comments according to the order of the comments corresponding to each decay function, it is possible to more accurately display recently published target comments that effectively provide relevant information about the target network resource. Consequently, users can browse recently published target comments that effectively provide relevant information about the target network resource, thus improving the user experience.

[0305] This invention also provides an electronic device, such as... Figure 12As shown, it includes a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204. The processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.

[0306] Memory 1203 is used to store computer programs;

[0307] When the processor 1201 executes the program stored in the memory 1203, it implements the steps of any of the comment display methods in the above embodiments.

[0308] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0309] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0310] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0311] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0312] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the comment display methods described in the above embodiments.

[0313] In yet another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the comment display methods described in the above embodiments.

[0314] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0315] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0316] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0317] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A comment display method characterized by, The method comprises: obtaining a plurality of comments on a target network resource and a plurality of decay functions; for each decay function, determining the weight of each comment corresponding to the decay function according to the decay function and the publication time of each comment; wherein the weight of the comment represented by different decay functions decreases at different rates as the target time interval increases; the target time interval is the time interval between the publication time of the comment and the current time; ranking the plurality of comments according to the weight of each comment corresponding to the decay function and the interaction information of each comment to obtain the ranking order of each comment corresponding to the decay function; displaying a target comment in the plurality of comments based on the ranking order of each comment corresponding to each decay function; one decay function corresponds to a preset number; the preset number is the number of target comments determined from the comments according to the ranking order of each comment corresponding to the decay function; when the publication time of the target network resource belongs to different time periods, the ratio between the preset numbers corresponding to each decay function is different; the ratio of the preset numbers corresponding to each decay function is determined based on the publication time of the target network resource and the rate at which the weight of the comment corresponding to each decay function decreases as the target time interval increases.

2. The method of claim 1, wherein, For each comment, the interaction information of the comment is the number of preset operations on the comment; the ranking of the plurality of comments according to the weight of each comment corresponding to the decay function and the interaction information of each comment to obtain the ranking order of each comment corresponding to the decay function comprises: for each comment, calculating the product of the weight of the comment corresponding to the decay function and the total number of preset operations on the comment to obtain the quality data of the comment corresponding to the decay function; ranking the plurality of comments according to the order from large to small of the quality data of each comment corresponding to the decay function to obtain the ranking order of each comment corresponding to the decay function.

3. The method of claim 1, wherein, the display of the target comment in the plurality of comments based on the ranking order of each comment corresponding to each decay function comprises: for each decay function, selecting the first preset number of comments corresponding to the decay function from the comments corresponding to the decay function according to the ranking order of the comments corresponding to the decay function to obtain a target comment group corresponding to the decay function; determining the display order of the target comment groups corresponding to each decay function in the order from high to low of the display priority of each decay function; displaying the target comments in the plurality of target comment groups according to the display order of the target comment groups corresponding to each decay function and the ranking order between the comments in each target comment group.

4. The method of claim 1, wherein, The plurality of decay functions comprises a first decay function, a second decay function and a third decay function; the first decay function is: wherein w is the weight of the comment and x is the target time interval of the comment; the second decay function is: wherein w is the weight of the comment and x is the target time interval of the comment; the third decay function is: wherein w is the weight of the comment and x is the target time interval of the comment.

5. The method of claim 1, wherein, Before the determining, for each decay function, a weight of each comment corresponding to the decay function according to the decay function and a publishing time of each comment, the method further comprises: grouping the comments according to the interaction information of each comment and the publishing time of each comment to obtain a plurality of candidate comment groups; wherein, one candidate comment group corresponds to one decay function; the determining, for each decay function, a weight of each comment corresponding to the decay function according to the decay function and a publishing time of each comment, comprises: for each decay function, determining a weight of each comment in a candidate comment group corresponding to the decay function according to the decay function and the publishing time of each comment in the candidate comment group corresponding to the decay function.

6. The method of claim 5, wherein, the grouping the comments according to the interaction information of each comment and the publishing time of each comment to obtain a plurality of candidate comment groups, comprises: dividing comments with a publishing time not earlier than a first time into a group to obtain a first candidate comment group; dividing comments with interaction information greater than a preset threshold into a group to obtain a second candidate comment group; dividing comments with a publishing time between a second time and the first time into a group to obtain a third candidate comment group; wherein, the second time is earlier than the first time.

7. The method of claim 6, wherein, the first candidate comment group corresponds to a first decay function; the first decay function is a decay function in the plurality of decay functions, in which a weight of a comment decreases most rapidly with an increase of a target time interval; the second candidate comment group corresponds to a second decay function; the second decay function is a decay function in the plurality of decay functions, in which a weight of a comment decreases least rapidly with an increase of a target time interval; the third candidate comment group corresponds to a third decay function; a weight of a comment corresponding to the third decay function decreases less rapidly with an increase of a target time interval than a weight of a comment corresponding to the first decay function; a weight of a comment corresponding to the third decay function decreases more rapidly with an increase of a target time interval than a weight of a comment corresponding to the second decay function.

8. A comment display device characterized by comprising: the device comprises: an acquisition module configured to acquire a plurality of comments on a target network resource and a plurality of decay functions; a weight determination module configured to determine, for each decay function, a weight of each comment corresponding to the decay function according to the decay function and a publishing time of each comment; wherein, different decay functions represent different rates of decrease of a weight of a comment with an increase of a target time interval; the target time interval is a time interval between a publishing time of a comment and a current time; a sorting module configured to sort the plurality of comments according to the weight of each comment corresponding to the decay function and the interaction information of each comment to obtain a ranking order of each comment corresponding to the decay function; a display module configured to display a target comment in the plurality of comments based on the ranking order of each comment corresponding to each decay function. One attenuation function corresponds to a preset number; the preset number is the number of target comments determined from the comments according to the arrangement order of the comments corresponding to the attenuation function; When the publication time of the target network resource belongs to different time periods, the ratio between the preset numbers corresponding to the attenuation functions is different; the proportion of the preset numbers corresponding to the attenuation functions is determined based on the publication time of the target network resource and the decreasing amplitude of the weight of the comments corresponding to each attenuation function with the increase of the target time interval.

9. An electronic device, comprising: The computer readable storage medium comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used for storing a computer program. The processor is used for executing the program stored in the memory to realize the method steps in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method steps in any one of claims 1-7.

Citation Information

Patent Citations

  • Comment information sorting method and device, storage medium and server

    CN111310079A