Discussion of thread generation methods, electronic devices, and computer-readable storage media

By comprehensively considering the number of comments, comment time interval, root node relevance, and semantic relevance to calculate node attractiveness, and using maximum likelihood estimation and multinomial logic models to dynamically construct discussion threads, the problem of poor accuracy in discussion thread modeling in existing technologies is solved, and more accurate prediction of user response behavior is achieved.

CN122332659APending Publication Date: 2026-07-03SHANGHAI COSMA AUTOMOTIVE TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610805584.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing discussion thread modeling methods rely on structured statistical methods, resulting in poor logic and inconsistent semantics in the generated discussion threads, making it impossible to accurately predict user response behavior.

Method used

By calculating the node attractiveness of comment text nodes from multiple attractiveness evaluation dimensions (number of comments, comment time interval, root node relevance, and semantic relevance), and using maximum likelihood estimation and multinomial logistic models to determine the selection probability, the target discussion thread is dynamically constructed.

Benefits of technology

It improves the accuracy and semantic rationality of discussion thread modeling, ensures that the generated path matches the user's real comment behavior, and achieves accurate prediction of the target comment text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332659A_ABST
    Figure CN122332659A_ABST
Patent Text Reader

Abstract

This application provides a method for generating discussion threads, an electronic device, and a computer-readable storage medium, relating to the field of online discussion modeling technology. The method includes: obtaining an initial discussion thread and target comment text, wherein the initial discussion thread includes comment text nodes, which represent historical comment text; determining the node attractiveness of the comment text nodes to the target comment text from multiple attractiveness evaluation dimensions; determining the selection probability corresponding to the comment text nodes based on the node attractiveness, obtaining a selection probability set; determining the parent node corresponding to the target comment text from the comment text nodes based on the selection probability set; and constructing a target text node connected to the parent node in the initial discussion thread to obtain the target discussion thread, wherein the target text node corresponds to the target comment text. This application solves the technical problem of poor accuracy in discussion thread modeling in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of online discussion modeling technology, and more specifically, to a discussion thread generation method, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Discussion thread modeling is one of the core tasks in social media and online community discussion analysis. Its goal is to automatically construct parent-child response relationships between comments, reconstruct the semantic structure and evolution path of user discussions, and thus support application scenarios such as discussion prediction, user behavior modeling, and synthetic data generation.

[0003] In existing technologies, discussion thread modeling mainly relies on structured statistical methods, such as predicting the parent node selection behavior of new comments based on topological features such as the number of comments and node popularity, through heuristic rules or simple probability models (such as the priority connection model). This modeling method only relies on structural attributes for probability allocation, resulting in poor logic and semantic incoherence in the generated discussion threads, and thus failing to accurately predict user reply behavior.

[0004] There is currently no good solution to the above problems. Summary of the Invention

[0005] This application provides a thread generation method, an electronic device, and a computer-readable storage medium to at least solve the technical problem of poor accuracy in thread modeling in related technologies.

[0006] According to one aspect of the embodiments of this application, a method for generating discussion threads is provided, comprising: obtaining an initial discussion thread and a target comment text, wherein the initial discussion thread includes comment text nodes, which are used to represent historical comment text; determining the node attractiveness of the comment text nodes to the target comment text from multiple attractiveness evaluation dimensions; determining the selection probability corresponding to the comment text nodes based on the node attractiveness, thereby obtaining a selection probability set; determining the parent node corresponding to the target comment text from the comment text nodes based on the selection probability set; and constructing a target text node connected to the parent node in the initial discussion thread to obtain the target discussion thread, wherein the target text node corresponds to the target comment text.

[0007] Furthermore, multiple attractiveness evaluation dimensions include: number of comments, comment time interval, root node relevance, and semantic relevance. The initial discussion thread includes multiple comment text nodes connected in a tree structure. From multiple attractiveness evaluation dimensions, the node attractiveness of multiple comment text nodes to the target comment text is determined, including: traversing multiple comment text nodes, and for the currently traversed comment text node, determining the node attractiveness of the current comment text node based on the number of comments, comment time interval, root node relevance, and semantic relevance. Among these, the comment time interval is used to characterize the time difference between the publication timestamp of the historical comment text corresponding to the current comment text node and the publication timestamp of the target comment text; the root node relevance is used to measure whether the current comment text node is a root node; and the semantic relevance is used to characterize the degree of semantic relevance between the historical comment text corresponding to the current comment text node and the target comment text.

[0008] Furthermore, based on the number of comments, comment time interval, root node relevance, and semantic relevance corresponding to the current comment text node, the node attractiveness of the current comment text node is determined, including: using a predefined target weighted parameter vector to perform weighted fusion processing on the number of comments, comment time interval, root node relevance, and semantic relevance to obtain the node attractiveness of the current comment text node.

[0009] Furthermore, the discussion of thread generation methods also includes: obtaining an initial parameter vector; and using the maximum likelihood estimation method to estimate the parameters of the initial parameter vector to obtain the target weighted parameter vector.

[0010] Furthermore, based on node attractiveness, the selection probability corresponding to the comment text node is determined, resulting in a selection probability set, including: using a multinomial logic model to map the node attractiveness corresponding to multiple comment text nodes into multiple selection probabilities through exponential normalization; and constructing a selection probability set based on the multiple selection probabilities.

[0011] Furthermore, based on the selection probability set, the parent node corresponding to the target comment text is determined from the comment text nodes, including: using the cumulative distribution function to process the selection probability set to obtain the cumulative probability set; randomly sampling the cumulative probability set to obtain the sampling result; and determining the parent node based on the sampling result.

[0012] Furthermore, the discussion of thread generation methods also includes: in response to the current comment text node being the root node, determining the root node relevance value as a first value; in response to the current comment text node being a non-root node, determining the root node relevance value as a second value, wherein the first value is greater than the second value.

[0013] Furthermore, the discussion of thread generation methods also includes: using a natural language processing model to process the historical comment text and the target comment text corresponding to the current comment text node respectively, to obtain the historical text embedding vector and the target text embedding vector; calculating the cosine similarity between the historical text embedding vector and the target text embedding vector, obtaining the calculation result, and using the calculation result as the value of semantic relevance.

[0014] According to another aspect of the embodiments of this application, a discussion thread generation system is also provided, comprising: an acquisition module, configured to acquire an initial discussion thread and a target comment text, wherein the initial discussion thread includes comment text nodes, and the comment text nodes are used to represent historical comment texts; a first determination module, configured to determine the node attractiveness of the comment text nodes to the target comment text from multiple attractiveness evaluation dimensions; a second determination module, configured to determine the selection probability corresponding to the comment text nodes based on the node attractiveness, thereby obtaining a selection probability set; a third determination module, configured to determine the parent node corresponding to the target comment text from the comment text nodes based on the selection probability set; and a construction module, configured to construct a target text node connected to the parent node in the initial discussion thread, thereby obtaining a target discussion thread, wherein the target text node corresponds to the target comment text.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0016] According to another aspect of the embodiments of this application, a vehicle is also provided, including: a memory storing an executable program; and a processor for running the executable program, wherein the executable program executes the methods in various embodiments of this application when it runs.

[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0018] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0019] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the methods in various embodiments of this application.

[0020] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.

[0021] In this embodiment, an initial discussion thread and a target comment text are obtained. The initial discussion thread includes comment text nodes, which are used to represent historical comment texts. The node attractiveness of the comment text nodes to the target comment text is determined from multiple attractiveness evaluation dimensions. Based on the node attractiveness, the selection probability corresponding to the comment text node is determined, resulting in a selection probability set. Based on the selection probability set, the parent node corresponding to the target comment text is determined from the comment text nodes. A target text node connected to the parent node is constructed in the initial discussion thread to obtain the target discussion thread, where the target text node corresponds to the target comment text. This application comprehensively calculates the node attractiveness of comment text nodes to target comment text from multiple attractiveness evaluation dimensions. This node attractiveness effectively reflects the overall matching between comment text nodes and target comment text, thereby improving the rationality of discussion thread modeling. Based on node attractiveness, the selection probability of comment text nodes is derived and a selection probability set is formed, realizing probabilistic and quantitative modeling of user preferences reflected by target comment text. Based on this selection probability set, the parent node corresponding to the target comment text is determined to ensure that the selected parent node has statistically significant optimality, thereby ensuring that the subsequent generation path of the discussion thread matches the user's actual comment behavior. Finally, the target text node connected to the parent node is dynamically constructed in the initial discussion thread, realizing accurate expansion of the discussion tree structure, and thus achieving accurate prediction of user comment behavior corresponding to the target comment text. Therefore, this application achieves the technical effect of improving the accuracy of discussion thread modeling, thereby solving the technical problem of poor accuracy in discussion thread modeling in related technologies. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0023] Figure 1 This is a flowchart illustrating a thread generation method according to an embodiment of this application;

[0024] Figure 2 This is an example diagram of a discussion thread according to an embodiment of this application;

[0025] Figure 3 This is an example diagram of another discussion thread according to an embodiment of this application;

[0026] Figure 4 This is a flowchart illustrating another thread generation method according to an embodiment of this application;

[0027] Figure 5 This is a structural block diagram of a discussion thread generation system according to an embodiment of this application. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] According to an embodiment of this application, an embodiment of a thread generation method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0031] This embodiment provides a method for discussing thread generation. Figure 1 This is a flowchart illustrating a thread generation method according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0032] Step S10: Obtain the initial discussion thread and the target comment text, wherein the initial discussion thread includes comment text nodes, and the comment text nodes are used to represent historical comment text;

[0033] Step S11: Determine the node attractiveness of the comment text node to the target comment text from multiple attractiveness evaluation dimensions;

[0034] Step S12: Based on node attractiveness, determine the selection probability corresponding to the comment text node to obtain the selection probability set;

[0035] Step S13: Based on the selection probability set, determine the parent node corresponding to the target comment text from the comment text nodes;

[0036] Step S14: Construct a target text node connected to the parent node in the initial discussion thread to obtain the target discussion thread, where the target text node corresponds to the target comment text.

[0037] The aforementioned initial discussion thread refers to a tree structure in social media or online communities, consisting of multiple user comments arranged chronologically and in relation to replies. Its root node is the original post content (such as a news article or topic initiation post), and the remaining nodes are the user's replies to existing comments, i.e., historical comment text.

[0038] Optionally, each comment text node includes text content, a posting timestamp, a parent node index, and a node number. The comment text node is the basic unit in this tree structure, used to carry the specific semantic content and structural relationships expressed by the user; its essence is a joint representation of textual semantics and topological position.

[0039] In one alternative embodiment, the initial discussion thread already has a root node and several generated child nodes (i.e., multiple comment text nodes), forming a dynamic structure that can be modeled.

[0040] The target comment text mentioned above is the new comment content that is currently to be inserted into the initial discussion thread. Its source can be real user input, system simulation generation, or external data stream.

[0041] In one alternative embodiment, the initial discussion thread is constructed from real-time collected social media platform comment data, such as a chronological sequence of dialogues extracted from a forum. Each comment is cleaned and denoised to retain valid text, posting time, and parent node references. The target comment text can be generated using a natural language generation model or can be based on real user input.

[0042] Optionally, to support semantic computation, all comment texts (including the target comment text) are encoded into dense vectors of fixed dimensions through a pre-trained sentence embedding model to form a set of semantic representations.

[0043] In addition, nodes in the initial discussion thread should also record their "active time window," which is the time interval from when the node posted to the current moment. Optionally, the initial discussion thread may contain multiple subtrees with similar topics, which can be merged through semantic clustering to form a more representative background discussion space, thereby improving the generalization ability of the target comment's parent node prediction.

[0044] The node attractiveness mentioned above refers to the inherent tendency of a certain comment text node (i.e., candidate parent node) to attract new comments (i.e. target comment text) to establish a reply relationship with it at the current moment. Its essence is a non-negative value, reflecting the probability weight of the node as the parent node of a new comment.

[0045] Node attractiveness is calculated from multiple structured and semantic dimensions, each of which represents a user's potential motivation for responding in social interactions.

[0046] Optionally, the attractiveness evaluation dimensions include, but are not limited to: the number of comments (i.e., the number of existing child nodes), the comment time interval (i.e., the interval from when the node was published to when the current new comment was published), the root node relevance (i.e., whether it is the initial post), and the semantic relevance (i.e., the degree of semantic relevance between the target comment text and the comment text node). These dimensions together constitute a high-dimensional feature vector used to characterize the "attractiveness" of the comment text node in the social context.

[0047] In one optional embodiment, for each candidate parent node (i.e., each comment text node), based on its historical information in the initial discussion thread, the contribution of four dimensions (i.e., the number of comments, the comment time interval, root node relevance, and semantic relevance) is calculated sequentially. By combining the contributions of the above four dimensions, the node attractiveness corresponding to each candidate parent node is determined. This calculation process is performed independently for each candidate parent node, forming a set of attractiveness values, which serve as input for subsequent probability allocation.

[0048] Optionally, the measurement of semantic relevance can identify the "continuity of topic" at the semantic level. For example, if the target comment text is "This algorithm has too high latency when deployed on edge devices," and the candidate parent node is "This model's inference time exceeds 500ms," although the wording is different, they are highly semantically related, thus significantly increasing the attractiveness of the node. Conversely, if the candidate parent node is "The weather is nice today," the semantic similarity is close to 0, and its attractiveness is almost zero, even if the node has high popularity (i.e., a large number of child nodes). In summary, incorporating the measurement of semantic relevance effectively avoids the unreasonable generation of "high-popularity but irrelevant replies," making the discussion thread closer to real human dialogue patterns in both structure and semantics.

[0049] The selection probability mentioned above refers to the normalized probability that a certain node is selected as the parent node corresponding to the target comment text among all candidate parent nodes (i.e. all comment text nodes).

[0050] In one alternative embodiment, node attractiveness is mapped to a probability distribution using a multinomial logic model. This multinomial logic model treats node attractiveness as an exponential form of the system utility function and uses the Softmax function to normalize the probability, ensuring that the sum of the probabilities of all candidate nodes is 1, thereby satisfying the basic requirements of the probability distribution.

[0051] In one optional embodiment, the calculated node attractiveness of each comment text node is first subjected to an exponential transformation to enhance the relative advantage of highly attractive nodes, and then a normalization factor is calculated to obtain the normalized selection probability. This process calculates for each comment text node one by one, generating a selection probability set containing t (i.e., the total number of comment text nodes) probability values. Each element in the selection probability set corresponds to the probability that a comment text node will be selected as a parent node.

[0052] The above-mentioned determination of the parent node corresponding to the target comment text refers to selecting one node from multiple comment text nodes based on probability as the direct reply object of the target comment text.

[0053] In one optional embodiment, based on a determined discrete probability distribution (i.e., a set of probability distributions), a parent node is selected from multiple comment text nodes using a random sampling mechanism to serve as the direct superior of the target comment text. Optionally, this process does not rely on heuristic rules or greedy maximum selection, but instead employs a probability sampling method based on the Cumulative Distribution Function (CDF) to ensure that the generation process conforms to the theoretical settings of the probability model, thereby maintaining the statistical consistency of the spanning tree.

[0054] For example, the cumulative distribution function sampling method is used to select the parent node. First, the obtained selection probability set is arranged in order of node number and accumulated to form a CDF sequence, that is, the cumulative probability of the i-th node is equal to the sum of the probabilities of the previous i nodes. Then, a uniformly distributed random number r is generated in the interval [0, 1]. The cumulative probability interval that r falls into is determined by binary search or linear scan. The node corresponding to this interval is the selected parent node. This method ensures that the selection result strictly follows the given probability distribution and naturally avoids the generation of circular structures (because each new node only connects to existing nodes), thus maintaining the acyclicity of the discussion tree.

[0055] The aforementioned target text node refers to the tree structure node corresponding to the target comment text. Optionally, the target text node includes: the comment text content, the corresponding sentence embedding vector, a timestamp, the parent node number, and the update status of the number of comments.

[0056] In one optional embodiment, the target text node is attached to the parent node determined in the previous step in a valid tree structure, thereby completing the dynamic expansion of the initial discussion thread and obtaining the target discussion thread.

[0057] It should be noted that the discussion thread is modeled as a directed acyclic tree, where each node is only allowed to have one parent node to ensure that the structure is acyclic and the path is unique, thus avoiding semantic conflicts such as circular references or multiple parent nodes.

[0058] In one optional embodiment, a determined parent node number k is obtained, a parent-child edge between the new node and k is established in the graph structure database, the target comment text is encoded into a corresponding semantic vector, the generation time is recorded, a node ID is assigned, and the child node count of the parent node k is updated. The entire process does not modify the existing node structure; only the new node is appended to the end of the tree, ensuring that the tree structure remains valid.

[0059] It's easy to understand that the generated target discussion threads can be used for subsequent comment prediction, discussion analysis, or as simulation training data. In batch generation scenarios, steps S10 to S14 can be executed N times in a loop, each time using the latest generated thread as input to gradually build a complete large-scale discussion tree. This mechanism supports incremental, online generation, eliminates the need for pre-calculating the entire graph, and possesses good scalability and real-time response capabilities.

[0060] In this embodiment, an initial discussion thread and a target comment text are obtained. The initial discussion thread includes comment text nodes, which are used to represent historical comment texts. The node attractiveness of the comment text nodes to the target comment text is determined from multiple attractiveness evaluation dimensions. Based on the node attractiveness, the selection probability corresponding to the comment text node is determined, resulting in a selection probability set. Based on the selection probability set, the parent node corresponding to the target comment text is determined from the comment text nodes. A target text node connected to the parent node is constructed in the initial discussion thread to obtain the target discussion thread, where the target text node corresponds to the target comment text. This application comprehensively calculates the node attractiveness of comment text nodes to target comment text from multiple attractiveness evaluation dimensions. This node attractiveness effectively reflects the overall matching between comment text nodes and target comment text, thereby improving the rationality of discussion thread modeling. Based on node attractiveness, the selection probability of comment text nodes is derived and a selection probability set is formed, realizing probabilistic and quantitative modeling of user preferences reflected by target comment text. Based on this selection probability set, the parent node corresponding to the target comment text is determined to ensure that the selected parent node has statistically significant optimality, thereby ensuring that the subsequent generation path of the discussion thread matches the user's actual comment behavior. Finally, the target text node connected to the parent node is dynamically constructed in the initial discussion thread, realizing accurate expansion of the discussion tree structure, and thus achieving accurate prediction of user comment behavior corresponding to the target comment text. Therefore, this application achieves the technical effect of improving the accuracy of discussion thread modeling, thereby solving the technical problem of poor accuracy in discussion thread modeling in related technologies.

[0061] The thread generation method discussed in the embodiments of this application will be further described below.

[0062] Optionally, the multiple attractiveness evaluation dimensions include: number of comments, comment time interval, root node relevance, and semantic relevance. The initial discussion thread includes multiple comment text nodes connected in a tree structure. From the multiple attractiveness evaluation dimensions, the node attractiveness of multiple comment text nodes to the target comment text is determined, including the following steps: traversing multiple comment text nodes, and for the currently traversed comment text node, determining the node attractiveness of the current comment text node based on the number of comments, comment time interval, root node relevance, and semantic relevance corresponding to the current comment text node. Here, the comment time interval is used to characterize the time difference between the publication timestamp of the historical comment text corresponding to the current comment text node and the publication timestamp of the target comment text; the root node relevance is used to measure whether the current comment text node is a root node; and the semantic relevance is used to characterize the degree of semantic relevance between the historical comment text corresponding to the current comment text node and the target comment text.

[0063] The number of comments mentioned above refers to the number of times a particular comment text node is directly replied to by other users. It reflects the node's activity and influence within the discussion thread and is a core structural feature for measuring a node's "popularity." In real-world social scenarios, users are more inclined to reply to nodes that have already been discussed by multiple people because these nodes often carry core viewpoints or points of contention, possessing high information density and participation value. In this embodiment, the number of comments is converted into the node's degree value, i.e., the total number of child nodes of that node in the tree structure.

[0064] Optionally, when initializing the discussion thread, a counter variable is maintained for each node. This counter automatically increments whenever a new comment selects the node as its parent node. To avoid numerical inflation causing instability in subsequent calculations, the natural logarithm of the number of comments is taken, resulting in a diminishing marginal effect in the contribution of popularity, which is closer to the psychological law in real-world behavior that "the attractiveness of a popular node tends to saturate."

[0065] Optionally, the above-mentioned comment time interval refers to the time interval between the publication time number of the historical comment text corresponding to a certain comment text node and the publication time number of the target comment text, which is used to characterize the timeliness decay effect of comments.

[0066] In real-world discussion environments, users are more inclined to reply to recent comments, while showing significantly less interest in nodes that haven't been updated in a long time. This psychological tendency is known as the "forgetting curve" or "time decay" in social communication. In this embodiment, the comment time interval is calculated in hours or minutes and is introduced as a negative influencing factor in the attractiveness calculation.

[0067] Optionally, the publication time number of each comment text node is recorded and compared with the time number corresponding to the generation of a new comment to obtain the comment time interval. To enhance time sensitivity, the comment time intervals are used in the calculation in a linearly weighted manner, with the coefficient corresponding to the comment time interval being negative, ensuring that the longer the time, the lower the attractiveness. To prevent numerical overflow due to excessive time differences, a maximum time threshold (e.g., 72 hours) is set. Comments exceeding this threshold are no longer included in the parent node candidate pool, thereby improving computational efficiency and focusing on active topic windows.

[0068] The aforementioned root node relevance refers to whether the current comment text node is the initial post (i.e., the root node of the entire discussion thread), used to simulate the user's special attention to the source information.

[0069] It's easy to understand that in most online communities, the original post often serves as the starting point and core issue of the discussion. Even if it has been neglected for a long time, it may still be repeatedly responded to by subsequent users due to the importance of the topic, forming a "retrospective discussion".

[0070] In one alternative embodiment, the root node relevance feature is abstracted as a binary indicator variable. It takes a value of 1 if the current node is the root node; otherwise, it takes a value of 0. Optionally, the root node is automatically identified, marked, and stored in metadata when the initial discussion thread is constructed.

[0071] The introduction of root node relevance features enables the identification and preservation of the "authority bias" of root nodes, preventing the value of the initial post from being completely ignored due to time decay. For example, in a long thread about the range of new energy vehicles, even if the first comment has been published for several days, if it raises key questions, it may still be cited again by new users due to the importance of the issue. Root node relevance is a key parameter for capturing such behavior.

[0072] The aforementioned semantic relevance refers to the degree of similarity between the current historical comment text and the target comment text in the semantic space. In an optional embodiment, sentence embedding technology from natural language processing is used to map the comment content into high-dimensional vectors, and the strength of semantic association is quantified by calculating the cosine similarity between the vectors.

[0073] For example, a pre-trained sentence encoding model is used to encode each historical comment text and the target comment text into 768-dimensional semantic vectors, and the cosine value of their angle is calculated. The result is between -1 and 1. The closer the value is to 1, the more semantically related it is.

[0074] By calculating semantic relevance, it is possible to identify semantic continuation, rebuttal, or supplementary relationships. For example, if the target comment text is "Battery degradation is severe at low temperatures," and previous comments mention "reduced winter range" or "insufficient thermal management system," even without a direct reply, their semantic similarity may still be high, thus making them the selected parent node. This mechanism significantly improves the semantic coherence of the generated thread, making the dialogue logic closer to natural human communication.

[0075] In one optional embodiment, each comment text node in the initial discussion thread is sequentially traversed, and the feature values ​​of the above four dimensions are extracted for each comment text node. These features are then substituted into a unified attraction function to obtain the node attraction of each comment text node to the target comment text.

[0076] In the above steps, by traversing multiple comment text nodes and calculating the node attractiveness of each comment text node one by one, a refined modeling of user reply behavior is achieved. The number of comments reflects the popularity of the node; the more active the node, the more likely it is to be cited by subsequent comments. The comment time interval suppresses the attractiveness of outdated comments through a decay mechanism, making the model more inclined to select recently active nodes, thus enhancing the time dynamics. Root node relevance, as a binary indicator variable, assigns special preference weights to the initial post, ensuring that the discussion thread always revolves around the core topic. Semantic relevance measures the semantic fit between new and historical comments through the cosine similarity of sentence embeddings, making the reply content logically coherent at the semantic level. The above four types of features together constitute a multi-dimensional attractiveness scoring system. Their linear combination form ensures the interpretable contribution of each factor to the selection probability, avoiding the one-sidedness of a single dimension. In summary, through the collaborative modeling of structural and semantic features, the accuracy of parent node selection and the semantic rationality of generated discussion threads are significantly improved, making the synthesized results closer to the composite decision-making behavior of users on real social platforms based on popularity, timeliness, and semantic consistency.

[0077] Optionally, the node attractiveness of the current comment text node is determined based on the number of comments, comment time interval, root node relevance, and semantic relevance corresponding to the current comment text node, including the following steps: using a predefined target weighted parameter vector, the number of comments, comment time interval, root node relevance, and semantic relevance are weighted and fused to obtain the node attractiveness of the current comment text node.

[0078] The aforementioned target weighted parameter vector is a four-dimensional parameter vector obtained through maximum likelihood estimation optimization.

[0079] In an alternative embodiment, the target weighted parameter vector is defined as: ,in, The weighting factor for the number of comments is used to adjust the strength of the contribution of structural popularity to attractiveness; The time decay coefficient, its logarithmic form is defined as follows: This is used to ensure that the decay rate is always positive, and to avoid negative values ​​that could cause the model to fail. The root node bias weight controls the tendency for the root node to be selected preferentially even when there is no semantic association. The semantic relevance weights adjust the relative importance of semantic consistency in the selection mechanism. The target weighted parameter vector is the core learnable variable, which determines the relative influence of the four features in the decision-making process. Its values ​​are obtained through back-learning from real discussion data, rather than being manually set.

[0080] In one alternative implementation, node attraction is calculated using a node attraction function, which can be expressed as follows:

[0081] (1)

[0082] in, Indicates node attractiveness. Represents a node In time The degree (number of comments). Indicates from node Post to current comment The time interval, This is the root node indicator function; the value is 1 for the root node and 0 for non-root nodes. The cosine similarity between the sentence embeddings of the new comment and the candidate parent node is used to quantify semantic relevance. The weighting factor is the number of comments received. The time decay coefficient, The root node is biased by weight. The semantic relevance weights are used. The node attraction function maps the four heterogeneous features to the same numerical space, enabling interpretable fusion of multi-dimensional features.

[0083] Optionally, a non-linear activation function can be introduced to perform non-linear transformation on some features. For example, a sigmoid mapping can be used for semantic relevance to compress similarity values ​​in the [0, 1] interval and enhance the discriminative power of low similarity regions.

[0084] In the above steps, node attractiveness is obtained by linearly weighting and fusing four types of features—number of comments, comment time interval, root node relevance, and semantic relevance—by multiplying them by corresponding parameters in a predefined target weighted parameter vector. This quantifies the attractiveness of comment text nodes. This weighted fusion mechanism avoids the subjectivity and static nature of traditional heuristic rules, making the calculation of node attractiveness both interpretable and data-driven. In summary, by fusing multi-dimensional features, the rationality and semantic consistency of parent node selection during discussion thread generation are significantly improved, effectively solving the generation distortion problem caused by ignoring semantic relationships in existing technologies.

[0085] Optionally, the discussion of thread generation methods also includes the following steps:

[0086] Step S111: Obtain the initial parameter vector;

[0087] Step S112: The maximum likelihood estimation method is used to estimate the parameters of the initial parameter vector to obtain the target weighted parameter vector.

[0088] The aforementioned initial parameter vector refers to the initial set of values ​​assigned to the feature weights in the Logit model before model training begins. This vector characterizes the relative influence of different structural and semantic features on user response behavior. Its dimension is consistent with the number of input features; in this application, it is specifically four-dimensional, corresponding to the parameters... , , as well as The initial value of each term is usually set based on experience or uniform randomization to ensure that the model has a reasonable exploration space in the early stages of training and avoids getting trapped in local optima or gradient explosion.

[0089] In one alternative embodiment, the initial parameter vector can be set manually or estimated through historical data statistics, such as based on the proportion of replies to the root node in a real comment tree. The initial value, or derived from the logarithmic distribution mean based on the comment interval time. The initial values ​​are used. The initialization process does not depend on the training data; it only serves to provide an optimizable starting point, ensuring good convergence and numerical stability in the subsequent maximum likelihood estimation process. It should be noted that if the initial values ​​deviate too far from the true distribution, it may lead to slow or non-convergence of the model. Therefore, a reasonable initialization strategy has a significant impact on the model training efficiency and final performance.

[0090] Maximum Likelihood Estimation (MLE) is a statistical inference method. Its core idea is to find a set of model parameters that maximize the probability of the observed real data occurring under those parameters.

[0091] In one alternative embodiment, the observation data is a tree structure of multiple real discussion threads, where the sequence of parent nodes selected for each newly added comment in each tree constitutes an observation sample. The goal of maximum likelihood estimation is to optimize the parameter vector. This maximizes the joint generation probability of all observation threads.

[0092] In one alternative embodiment, in order to estimate model parameters from observation data... The maximum likelihood estimation method is used. Let the training dataset be: . Let represent the i-th discussion tree, and let its size be | . | Under the assumption of independent and identically distributed distributions, the likelihood function is defined as follows:

[0093] (2)

[0094] in, For given parameters Time dataset The likelihood function is used to measure the parameters. The degree of interpretation of the observed data, The parameters of the logic generative model are solved by maximum likelihood estimation. For the i-th comment tree, This represents the number of nodes in the tree (i.e., the number of comments). Let t be the new node (the t-th comment) that appears in the tree at time step t. The probability of selecting the parent node for the comment at time step t in the i-th tree. Let N represent the sequence of parent nodes in the i-th tree up to time step t-1, where N is the number of discussion threads in the training set. Here, the attraction function is used to determine the unnormalized probability of becoming the parent node of a new comment. This is a normalization factor, ensuring that the sum of probabilities equals 1.

[0095] Optionally, the specific process of parameter estimation can be implemented as follows: initial parameter vector Calculate the parent node selection probability for each discussion tree and at each time step; construct the likelihood function. The likelihood function is maximized using numerical optimization methods (such as gradient descent or quasi-Newton methods); the parameters are iteratively updated until convergence to obtain the optimal estimate. That is, the target weighted parameter vector.

[0096] Optionally, to verify the accuracy of the maximum likelihood estimation, the following verification steps can be used: randomly select the true parameters. ;based on Generate a synthetic discussion dataset; apply the MLE method to the generated data to estimate parameters. ; Calculate residuals Repeat the above process several times (e.g., 50, 100, 200, 500 times), and calculate the mean and variance of the residuals to evaluate the stability and accuracy of the estimation results. This training method can achieve accurate modeling of the discussion thread generation process while ensuring parameter interpretability.

[0097] Through the steps described above, the maximum likelihood estimation method is used to estimate the parameters of the initial parameter vector. This allows for the reverse derivation of a better parameter combination based on real discussion tree data, ensuring a high degree of alignment between the parameters and observed behavior. This improves the fitting accuracy and interpretability of user response behavior. These steps collectively achieve automated, data-driven, robust estimation from initial parameters to the target weighted parameter vector. This provides a high-confidence, reproducible parameter foundation for subsequent online generation and synthesis of discussion threads, ensuring that the generated results accurately reflect the dynamics of real discussions within a probabilistic framework.

[0098] Optionally, based on node attractiveness, the selection probability corresponding to the comment text node is determined to obtain a set of selection probabilities, including the following steps:

[0099] Step S121: Using a multinomial logic model, the node attractiveness corresponding to multiple comment text nodes is mapped into multiple selection probabilities through exponential normalization.

[0100] Step S122: Construct a set of selection probabilities based on multiple selection probabilities.

[0101] Multinomial Logit (MNL) is a discrete choice model used to describe the probability distribution of an individual choosing an option based on the system utility of each option among multiple alternatives.

[0102] In one alternative embodiment, multiple logic models are used to model the behavior of a new comment selecting a parent node among existing comment nodes.

[0103] For the attraction function This involves unified modeling of the system utility function in discrete choice models. Within the framework of a multinomial logic model, each candidate parent node... At time step The system utility is represented as:

[0104] (3)

[0105] in, Represents a node At time step The system utility, , Represents a node eigenvectors, Defined as:

[0106] (4)

[0107] in, Represents a node In time The degree (number of comments). Indicates from node Post to current comment The time interval, This is the root node indicator function; the value is 1 for the root node and 0 for non-root nodes. The cosine similarity between the sentence embeddings of the new comment and the candidate parent node is used to quantify semantic relevance.

[0108] Attraction function With utility function Equivalent, that is: Based on the definition of the utility function, the probability of choosing a parent node is expressed as:

[0109] (5)

[0110] (6)

[0111] in, Indicates at time step The parent node of the newly added node, This represents the parent node vector before time step t-1. This is a normalization factor used to ensure that the sum of the selection probabilities of all candidate parent nodes is 1.

[0112] Due to the attraction function With utility function Equivalent, therefore, the probability of choosing a parent node can also be expressed as:

[0113] (7)

[0114] (8)

[0115] Using the above formula for the selection probability of parent nodes, we can calculate the selection probabilities for each of the multiple comment text nodes.

[0116] The aforementioned selection probability set refers to the ordered set of selection probabilities corresponding to multiple comment text nodes at a given time step. This selection probability set is essentially a probability mass function, where each element corresponds to the relative probability that an existing node will be selected as the parent node by a new comment. Its size is consistent with the total number of nodes in the current discussion tree, and each element represents an independent, mutually exclusive event probability. This set not only contains probability values ​​but also implicitly identifies the nodes within the tree structure, enabling subsequent sampling processes to accurately backtrack to specific comment text nodes.

[0117] Through the above steps, the attractiveness of each comment text node is mapped to a selection probability using exponential normalization. This achieves a non-linear amplification and probabilistic expression of the attractiveness of each comment text node, ensuring that highly attractive nodes receive significantly higher selection weights. Simultaneously, the monotonicity of the exponential function maintains the attractiveness ranking relationship, providing a stable mathematical foundation for subsequent probability allocation. Based on multiple selection probabilities, a selection probability set is constructed, forming a complete discrete probability distribution. This provides a calculable and repeatable decision-making basis for subsequent random sampling of parent nodes.

[0118] Optionally, based on the selection probability set, the parent node corresponding to the target comment text is determined from the comment text nodes, including the following steps:

[0119] Step S131: Use the cumulative distribution function to process the selection probability set to obtain a cumulative probability set.

[0120] Step S132: Conduct random sampling on the cumulative probability set to obtain a sampling result.

[0121] Step S133: Determine the parent node based on the sampling result.

[0122] The cumulative distribution function (CDF) is a probability statistical tool used to describe the cumulative probability that a random variable takes a value less than or equal to a specific value.

[0123] In an optional embodiment, the selection probability set is calculated by the multinomial logistic model. The role of the cumulative distribution function is to accumulate these discrete probability values in the order of node numbers to form a monotonically increasing sequence, and the last value of this sequence is 1, indicating that the total probability coverage of all possible parent nodes is complete.

[0124] Exemplarily, assume that at time step t, there are t review text nodes. Calculate the probability p_k that each node k (k = 1 to t) is selected as the parent node of the new review, forming a probability set {p_1, p_2,..., p_t}. Subsequently, calculate the cumulative probabilities in order of node numbers: the cumulative probability of the first node is c_1 = p_1, the second is c_2 = p_1 + p_2, the third is c_3 = p_1 + p_2 + p_3, and so on until c_t = 1. This cumulative probability set {c_1, c_2,..., c_t} constitutes an ordered interval partition. This process ensures the integrity and samplability of the probability distribution and provides a structured basis for subsequent random sampling.

[0125] In an optional embodiment, the random sampling of the cumulative probability set is implemented by the uniform random number mapping method: First, generate a uniform random number r in the interval [0, 1), which represents a "point-throwing" position on the CDF interval; subsequently, find the smallest index k (i.e., the sampling result) in the constructed cumulative probability set that satisfies the condition c_{k - 1} ≤ r < c_k, and this index k is the number of the selected parent node, where c_0 = 0. Further, based on the determined sampling result, the corresponding parent node can be determined.

[0126] For example, a pseudo-random number generator is called to generate a double-type random number r∈[0,1). If the cumulative probability set is {0.2, 0.5, 0.8, 1.0}, and the random number r=0.65, then the search finds that 0.5≤0.65<0.8, corresponding to index k=3, so the 3rd node is selected as the parent node. To improve search efficiency, a binary search algorithm is used instead of linear traversal, reducing the search time complexity from O(t) to O(log t), significantly improving the sampling efficiency under large-scale discussion threads (e.g., t>1000).

[0127] In the above steps, by processing the selection probability set using the cumulative distribution function, the normalized selection probability of each comment text node is transformed into a cumulative probability, achieving an ordered integration of probability distributions and providing a mathematical foundation for subsequent random sampling. Random sampling of the cumulative probability set ensures that the parent node selection process strictly follows the probability distribution defined by the multi-logic model, avoiding biases caused by heuristic or deterministic selection. Determining the parent node based on the sampling results ensures that each step of node generation conforms to the statistical laws of the probability model, guaranteeing the randomness and repeatability of the generation path.

[0128] Optionally, the discussion of thread generation methods also includes the following steps:

[0129] Step S113: In response to the current comment text node being the root node, determine the value of the root node relevance as the first value.

[0130] Step S114: In response to the fact that the current comment text node is not a root node, determine the value of the root node relevance as a second value, wherein the first value is greater than the second value.

[0131] The first value mentioned above is a preset positive real number, which is higher than the second value. This indicates that the root node has a significantly higher tendency to be responded to than ordinary nodes, in order to simulate users' continuous attention to the original topic or high-authority feedback behavior in real social scenarios.

[0132] In one optional embodiment, if the current comment text node is the root node, the root node relevance is determined to be 1; if the current comment text node is not the root node, the root node relevance is determined to be 0.

[0133] In the above steps, by setting two distinct value categories, the nonlinear enhancement of the attractiveness of the root node and the moderate suppression of the root dependency of non-root nodes are achieved. Thus, without introducing additional feature parameters, the generated discussion tree is effectively guided to present a reasonable distribution in which the root node dominates but is not monopolistic, thereby improving the diversity and realism of the generated threads.

[0134] Optionally, the discussion of thread generation methods also includes the following steps:

[0135] Step S115: Using a natural language processing model, perform text processing on the historical comment text and the target comment text corresponding to the current comment text node to obtain the historical text embedding vector and the target text embedding vector.

[0136] Step S116: Calculate the cosine similarity between the historical text embedding vector and the target text embedding vector, obtain the calculation result, and use the calculation result as the value of semantic relevance.

[0137] The aforementioned natural language processing (NLP) models refer to deep learning models capable of mapping natural language text into dense representations in a continuous vector space. The core function of NLP models is to capture the semantic connotation of text, rather than relying solely on surface-level word matching. Optionally, the NLP models employed include, but are not limited to, pre-trained sentence encoders such as Sentence-BERT, UniversalSentence Encoder, or ALBERT. These models are all based on the Transformer architecture, undergo self-supervised pre-training on large-scale corpora, and are capable of modeling the semantics of entire sentences, outputting fixed-dimensional vector representations.

[0138] In one optional embodiment, each comment text first undergoes standardization preprocessing, including removing special characters, unifying capitalization, and normalizing word segmentation and punctuation, before being input into a selected sentence encoder model. For example, when using Sentence-BERT, the historical comment text and the target comment text are processed by the BERT encoding layer, and then a sentence-level representation is obtained through mean pooling. Finally, a 768-dimensional or 1024-dimensional floating-point vector is output as the historical comment text embedding vector and the target comment text embedding vector, respectively.

[0139] In one optional embodiment, to improve the robustness of semantic representation, the historical comment text embedding vectors can undergo sliding window normalization after generation to eliminate vector scale bias caused by differences in text length or expression style. The target comment text embedding vector is provided in real time by external input or an AI generation system to simulate comment content under real user behavior. To adapt to different language environments, multilingual encoders can be configured to enable the model to have cross-language semantic alignment capabilities.

[0140] The cosine similarity mentioned above is a mathematical index that measures the directional consistency of two vectors in a high-dimensional space. Its value range is [-1, 1]. The closer the value is to 1, the more similar the two vectors are; the closer it is to 0, the less similar they are; and a negative value indicates semantic opposition. In the embodiments of this application, cosine similarity is used to quantify the semantic association strength between historical comment text and target comment text, and is incorporated as a semantic relevance feature into the probabilistic model for discussion tree generation.

[0141] Through the above steps, natural language processing models are used to encode historical and target comment texts, respectively, resulting in corresponding historical and target text embedding vectors. This transforms discrete text semantics into dense representations in a continuous vector space, providing a computational mathematical foundation for subsequent quantitative comparisons of semantic relationships. Furthermore, cosine similarity is calculated based on these vectors, directly quantifying the directional consistency between the target and historical comments in the semantic space. This calculation result, used as a value for semantic relevance, avoids the semantic sparsity and ambiguity problems caused by keyword matching or manual rules, achieving an objective, continuous, and differentiable measure of semantic coherence between comments.

[0142] Optionally, Figure 2 This is an example diagram of a discussion thread according to an embodiment of this application, such as... Figure 2 As shown, when the 10th comment node is added to the initial discussion thread, it is necessary to determine the parent node of the 10th comment node, and then update the initial discussion thread to obtain the target discussion thread. Specifically, Figure 2 The array in the current discussion thread displays the parent node number of each comment node. For example, the parent node number of the 2nd comment node is 1, the parent node number of the 3rd comment node is 1, the parent node number of the 4th comment node is 2, the parent node number of the 5th comment node is 1, the parent node number of the 6th comment node is 5, the parent node number of the 7th comment node is 2, the parent node number of the 8th comment node is 1, and the parent node number of the 9th comment node is 6.

[0143] Optionally, Figure 3 This is an example diagram of another discussion thread according to an embodiment of this application, such as... Figure 3 As shown, the discussion thread is a tree structure composed of multiple user comments arranged in chronological order and reply relationships. Its root node is the original post content (such as news articles or topic initiation posts), and the remaining nodes are the user's reply content to existing comments.

[0144] Optionally, Figure 4 This is a flowchart illustrating another thread generation method according to an embodiment of this application, such as... Figure 4 As shown, the thread generation method can be implemented as follows: input historical comments; calculate the attractiveness function (based on historical interactions / features); calculate the probability of the multinomial logistic model; train the maximum likelihood estimation parameters (offline training stage); use the cumulative distribution function sampling algorithm (efficient probability sampling); select the parent node (sampling / maximization strategy); use online / lazy generation strategy (real-time or delayed generation); generate new nodes (comments / replies).

[0145] Optionally, the discussion thread is represented as a tree, where each comment corresponds to a node, the root node corresponds to the initial post (such as a news article or the first comment), and each node is allowed to have only a single parent node to ensure that the discussion tree structure is acyclic. The connections between nodes are represented by vectors. It means that, among them Indicates at time step The parent node number of the newly added node. Initially. , This corresponds to the response from the root node. The total number of nodes in the discussion thread is denoted as... This number can be dynamically changed to accommodate the modeling needs of discussion threads of different sizes.

[0146] Furthermore, to capture semantic relationships between comments, sentence embedding vectors are introduced. Possible embedding methods include, but are not limited to, Sentence-BERT, ALBERT (Lightweight BERT), contrastive learning sentence encoders, and general sentence encoders. Cosine similarity is then calculated. Incorporating semantic information into the attraction function This generates discussion threads that are more consistent with actual semantic logic.

[0147] In one alternative embodiment, a method for generating online or lazy discussion threads based on multiple logic models and sentence semantic embeddings has the following input and output definitions. The inputs include: ; Used to quantify semantic features between comments; root node of the initial discussion thread. The total number of comments to be generated is N. The output is the complete discussion thread tree: Each node contains a parent node number, comment content, and semantic embedding features.

[0148] Optionally, the method for generating discussion threads online or lazily based on multiple logical models and sentence semantic embedding can be implemented as follows: initialize the root node, taking the original post or the first comment as the root node. The degree of the root node is initialized to 1. Store the sentence embedding vector of the root node. The nodes are generated iteratively at each time step. For each time step t=1, 2, ..., N-1, the following steps are performed: traverse all generated nodes k=1, ..., t, and obtain their structural and semantic features: node degree. Release interval Root node indicator function and sentence embedding vectors For each candidate parent node k, calculate the attractiveness; based on the multinomial logistic model, map the attractiveness to the selection probability; use the cumulative distribution function sampling method to select a parent node from the candidate parent node set. and order Update the parent node degree Embed the sentence of the new node into a vector. Add to set E; when the number of generated nodes reaches the predetermined total number N, output the complete discussion thread tree. .

[0149] In one alternative embodiment, the process of generating a synthetic discussion thread includes: using the original post or submission as the root node. and set the initial degree According to time steps New comment nodes are generated gradually using an online / lazy generation mechanism. At each time step, parent nodes are sampled based on the probability distribution of the multinomial logic model and using the cumulative distribution function algorithm. and order All generated comment nodes gradually form a complete tree structure under parent-child relationships. Output the synthesized discussion thread, including: node number and corresponding parent node, comment content and its sentence semantic embedding vector, node timestamp and structural features.

[0150] It should be noted that the multinomial logic model generation method is based on the following assumptions: the relative preference of two candidate parent nodes is not affected by other nodes; all users respond consistently to node features; and the selection error is independent and identically distributed in each observation sample.

[0151] It is easy to understand that the discussion thread generation method based on multiple logical models and semantic embedding provided in this application achieves high-precision modeling of online discussion trees by combining the structural features of comments with semantic consistency, making the prediction of the parent node of new comments more consistent with the dynamics of real discussions. At the same time, it uses maximum likelihood estimation to optimize parameters, which can generate high-quality synthetic data that matches the statistical characteristics of real discussion threads. Furthermore, it adopts an online, lazy generation mechanism and a cumulative distribution function algorithm to ensure that the generated result is an acyclic tree structure, thereby quickly adapting to different discussion environments without pre-computation, realizing real-time generation and simulation, and providing a reliable parameter verification mechanism. This method shows excellent practicality in scenarios such as discussion analysis, model training, and algorithm verification. In addition, by combining discrete selection models with sentence embedding cosine similarity for discussion tree generation and prediction, it demonstrates significant technical innovation.

[0152] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0153] According to an embodiment of this application, a system embodiment of a discussion thread generation system is provided. It should be noted that this system can be used to execute the above-described discussion thread generation method.

[0154] According to another aspect of the embodiments of this application, a discussion thread generation system is also provided. Figure 5 This is a structural block diagram of a discussion thread generation system according to an embodiment of this application, such as... Figure 5 As shown, the discussion thread generation system 500 includes: an acquisition module 501, used to acquire an initial discussion thread and a target comment text, wherein the initial discussion thread includes comment text nodes, which are used to represent historical comment texts; a first determination module 502, used to determine the node attractiveness of the comment text nodes to the target comment text from multiple attractiveness evaluation dimensions; a second determination module 503, used to determine the selection probability corresponding to the comment text node based on the node attractiveness, and obtain a selection probability set; a third determination module 504, used to determine the parent node corresponding to the target comment text from the comment text nodes based on the selection probability set; and a construction module 505, used to construct a target text node connected to the parent node in the initial discussion thread, and obtain the target discussion thread, wherein the target text node corresponds to the target comment text.

[0155] Optionally, the multiple attractiveness evaluation dimensions include: number of comments, comment time interval, root node relevance, and semantic relevance. The initial discussion thread includes multiple comment text nodes, which are connected in a tree structure. The first determining module 502 is further used to: traverse multiple comment text nodes, and for the currently traversed comment text node, determine the node attractiveness of the current comment text node based on the number of comments, comment time interval, root node relevance, and semantic relevance corresponding to the current comment text node. The comment time interval is used to characterize the time difference between the publication timestamp of the historical comment text corresponding to the current comment text node and the publication timestamp of the target comment text. The root node relevance is used to measure whether the current comment text node is a root node. The semantic relevance is used to characterize the degree of semantic relevance between the historical comment text corresponding to the current comment text node and the target comment text.

[0156] Optionally, the first determining module 502 is further configured to: use a predefined target weighted parameter vector to perform weighted fusion processing on the number of comments, comment time interval, root node relevance and semantic relevance to obtain the node attractiveness of the current comment text node.

[0157] Optionally, the first determining module 502 is further configured to: obtain an initial parameter vector; and use the maximum likelihood estimation method to estimate the parameters of the initial parameter vector to obtain the target weighted parameter vector.

[0158] Optionally, the second determining module 503 is further configured to: use a multi-logic model to map the node attractiveness corresponding to multiple comment text nodes into multiple selection probabilities through exponential normalization; and construct a selection probability set based on the multiple selection probabilities.

[0159] Optionally, the third determining module 504 is further configured to: process the selection probability set using the cumulative distribution function to obtain the cumulative probability set; randomly sample the cumulative probability set to obtain the sampling result; and determine the parent node based on the sampling result.

[0160] Optionally, the first determining module 502 is further configured to: in response to the current comment text node being the root node, determine the value of the root node relevance as a first value; in response to the current comment text node being a non-root node, determine the value of the root node relevance as a second value, wherein the first value is greater than the second value.

[0161] Optionally, the first determining module 502 is further configured to: use a natural language processing model to perform text processing on the historical comment text and the target comment text corresponding to the current comment text node, respectively, to obtain the historical text embedding vector and the target text embedding vector; calculate the cosine similarity between the historical text embedding vector and the target text embedding vector, obtain the calculation result, and use the calculation result as the value of semantic relevance.

[0162] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0163] Optionally, in this embodiment, the executable program performs the following steps when it runs:

[0164] Step S10: Obtain the initial discussion thread and the target comment text, wherein the initial discussion thread includes comment text nodes, and the comment text nodes are used to represent historical comment text;

[0165] Step S11: Determine the node attractiveness of the comment text node to the target comment text from multiple attractiveness evaluation dimensions;

[0166] Step S12: Based on node attractiveness, determine the selection probability corresponding to the comment text node to obtain the selection probability set;

[0167] Step S13: Based on the selection probability set, determine the parent node corresponding to the target comment text from the comment text nodes;

[0168] Step S14: Construct a target text node connected to the parent node in the initial discussion thread to obtain the target discussion thread, where the target text node corresponds to the target comment text.

[0169] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0170] Optionally, in this embodiment, the executable program can be configured to store an executable program for performing the following steps:

[0171] Step S10: Obtain the initial discussion thread and the target comment text, wherein the initial discussion thread includes comment text nodes, and the comment text nodes are used to represent historical comment text;

[0172] Step S11: Determine the node attractiveness of the comment text node to the target comment text from multiple attractiveness evaluation dimensions;

[0173] Step S12: Based on node attractiveness, determine the selection probability corresponding to the comment text node to obtain the selection probability set;

[0174] Step S13: Based on the selection probability set, determine the parent node corresponding to the target comment text from the comment text nodes;

[0175] Step S14: Construct a target text node connected to the parent node in the initial discussion thread to obtain the target discussion thread, where the target text node corresponds to the target comment text.

[0176] According to another aspect of the embodiments of this application, a vehicle is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0177] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0178] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the methods in various embodiments of this application.

[0179] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods described in the various embodiments of this application.

[0180] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0181] In this application, "multiple" refers to two or more.

[0182] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0183] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0184] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0185] In the embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0186] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0187] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0188] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0189] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for generating threads, characterized in that, include: Obtain the initial discussion thread and the target comment text, wherein the initial discussion thread includes comment text nodes, which are used to represent historical comment text; The node attractiveness of the comment text node to the target comment text is determined from multiple attractiveness evaluation dimensions; Based on the node attractiveness, the selection probability corresponding to the comment text node is determined, and a selection probability set is obtained; Based on the selection probability set, determine the parent node corresponding to the target comment text from the comment text nodes; In the initial discussion thread, a target text node connected to the parent node is constructed to obtain the target discussion thread, wherein the target text node corresponds to the target comment text.

2. The discussion thread generation method according to claim 1, characterized in that, The multiple attractiveness evaluation dimensions include: number of comments, comment time interval, root node relevance, and semantic relevance. The initial discussion thread includes multiple comment text nodes connected in a tree structure. The node attractiveness of the multiple comment text nodes to the target comment text is determined from the multiple attractiveness evaluation dimensions, including: The process iterates through the multiple comment text nodes. For the currently traversed comment text node, the node attractiveness of the current comment text node is determined based on the number of comments, the comment time interval, the root node relevance, and the semantic relevance. The comment time interval is used to characterize the time difference between the publication timestamp of the historical comment text corresponding to the current comment text node and the publication timestamp of the target comment text. The root node relevance is used to measure whether the current comment text node is a root node. The semantic relevance is used to characterize the degree of semantic relevance between the historical comment text corresponding to the current comment text node and the target comment text.

3. The thread generation method according to claim 2, characterized in that, Based on the number of comments corresponding to the current comment text node, the comment time interval, the root node relevance, and the semantic relevance, the node attractiveness of the current comment text node is determined, including: Using a predefined target weighted parameter vector, the number of comments, the comment time interval, the root node relevance, and the semantic relevance are weighted and fused to obtain the node attractiveness of the current comment text node.

4. The discussion thread generation method according to claim 3, characterized in that, The method for generating discussion threads also includes: Obtain the initial parameter vector; The initial parameter vector is estimated using the maximum likelihood estimation method to obtain the target weighted parameter vector.

5. The thread generation method according to claim 2, characterized in that, Based on the node attractiveness, the selection probability corresponding to the comment text node is determined, resulting in the selection probability set, including: Using a multi-logic model, the node attractiveness corresponding to the multiple comment text nodes is mapped into multiple selection probabilities through exponential normalization; Based on the multiple selection probabilities, the selection probability set is constructed.

6. The thread generation method according to claim 2, characterized in that, Based on the selection probability set, determining the parent node corresponding to the target comment text from the comment text nodes includes: The cumulative probability set is obtained by processing the selection probability set using the cumulative distribution function. Random sampling is performed on the cumulative probability set to obtain the sampling results; Based on the sampling results, the parent node is determined.

7. The thread generation method according to claim 2, characterized in that, The method for generating discussion threads also includes: In response to the fact that the current comment text node is the root node, the relevance value of the root node is determined to be the first value; In response to the fact that the current comment text node is a non-root node, the value of the relevance of the root node is determined to be a second value, wherein the first value is greater than the second value.

8. The discussion thread generation method according to claim 2, characterized in that, The method for generating discussion threads also includes: Using a natural language processing model, text processing is performed on the historical comment text and the target comment text corresponding to the current comment text node to obtain the historical text embedding vector and the target text embedding vector; The cosine similarity between the historical text embedding vector and the target text embedding vector is calculated to obtain the calculation result, and the calculation result is used as the value of the semantic relevance.

9. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the executable program, wherein the executable program, when running, performs the thread generation method described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium resides to perform the discussion thread generation method according to any one of claims 1 to 8.