Social media user anthropomorphized reply generation method based on cognitive state modeling

CN123014194APending Publication Date: 2026-10-30HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611236372.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本发明提供了一种基于认知状态建模的社交媒体用户拟人化回复生成方法,以解决回复生成时忽略内部认知状态导致保真度低,主导维度不清楚的问题

Benefits of technology

[0005]本发明提供了一种基于认知状态建模的社交媒体用户拟人化回复生成方法,以解决回复生成时忽略内部认知状态导致保真度低,主导维度不清楚的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014194A_ABST
    Figure CN123014194A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and discloses a social media user personification reply generation method based on cognitive state modeling, which comprises the following steps: obtaining a historical reply track of a target user, a current stimulus event, a real reply of the current stimulus event, and a plurality of historical stimulus events in the historical reply track; based on the historical reply track, the current stimulus event, the real reply of the current stimulus event, and the plurality of historical stimulus events, a dominant cognitive dimension in each cognitive dimension is determined for a plurality of cognitive dimensions determined based on a psychology theory; a cognitive reasoning path is constructed based on the dominant cognitive dimension; the cognitive reasoning path is subjected to progressive internalization training to obtain a trained generation model; and a personification reply is generated based on the trained generation model according to a new historical reply track and a stimulus event. The application can solve the problems of low fidelity caused by neglecting internal cognitive state during reply generation and unclear dominant dimension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically to a method for generating anthropomorphic responses from social media users based on cognitive state modeling. Background Technology

[0002] Social media simulation is an important method for mining and reproducing group behaviors (such as opinion evolution and information diffusion) from large-scale user-generated data. With the development of Large Language Model (LLM) technology, the mainstream technical solution is to use LLM to drive the generation of social media user behaviors, reproducing the personalized expressive behaviors of real users after being stimulated by events. In other words, the responses generated by the simulated agent are consistent with those of specific real users in terms of emotion, tone, stance, and length.

[0003] Related technical solutions fall into two categories. One typical approach directly generates responses based on user profiles and triggering events. For example, through role-playing or personalized prompting, the user's identity information, past statements, and the current stimulus are combined into prompt words, requiring a large language model to output a response accordingly. The other approach uses supervised fine-tuning to directly fit the mapping relationship from "user history and stimulus events" to "real responses" on the interaction data. However, these approaches skip the process of shaping the user's internal cognitive state into their explicit expression. This is because a real user's response is not directly determined by the profile, but rather driven by their internal cognitive state activated by the stimulus (such as emotion, stance, thought process, and intention). Ignoring this intermediate step leads to a systematic deviation between the generated response and a real person in terms of emotional intensity, tone, length, and stance, resulting in insufficient fidelity.

[0004] Some solutions also incorporate psychological theories or theories of mind to assist in generation, but they usually treat cognitive or psychological dimensions as a fixed prompt text description or as a fixed external structure embedded in the generation process. The way cognitive information is used is fixed before reasoning, and these solutions treat multiple cognitive dimensions equally, failing to identify the cognitive dimension that truly plays a dominant role in the current interaction. As a result, a large number of irrelevant signals are mixed in during generation, weakening the effective guidance for the response. Summary of the Invention

[0005] This invention provides a method for generating anthropomorphic replies from social media users based on cognitive state modeling, in order to solve the problems of low fidelity and unclear dominant dimensions caused by ignoring internal cognitive states during reply generation.

[0006] In a first aspect, the present invention provides a method for generating anthropomorphic responses from social media users based on cognitive state modeling, the method comprising: Acquire the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events from the historical response trajectory; Based on historical response trajectories, current stimulus events, actual responses to current stimulus events, and multiple historical stimulus events, the dominant cognitive dimension in each cognitive dimension is determined for multiple cognitive dimensions defined by psychological theories. Constructing cognitive reasoning paths based on dominant cognitive dimensions; The cognitive reasoning path is progressively internalized and trained to obtain a trained generative model. Based on the trained generative model, human-like responses are generated according to the target user's new historical response trajectory and stimulating events.

[0007] This invention provides a method for generating anthropomorphic responses to social media users based on cognitive state modeling. It proposes a novel paradigm for response generation driven by cognitive state modeling. By acquiring the target user's historical response trajectory, current stimulus event, actual responses to the current stimulus event, and multiple historical stimulus events from the historical response trajectory, and considering multiple cognitive dimensions determined based on psychological theory, it automatically identifies the dominant cognitive dimension truly driving the current interaction. Then, based on the dominant cognitive dimension, it constructs a cognitive reasoning path, generating a structured intermediate cognitive explanation for each interaction sample. Subsequently, it progressively internalizes the cognitive reasoning path, gradually internalizing cognitive reasoning ability from explicit to implicit into the model parameters, enabling the model to generate accurate anthropomorphic responses without explicit reasoning. This invention differs from directly generating anthropomorphic responses from profiles and events, or treating cognition as a fixed prompt or fixed external structure, fundamentally addressing the fidelity defects caused by "skipping internal cognitive states."

[0008] In one optional implementation, based on historical response trajectories, the current stimulus event, the actual response to the current stimulus event, and multiple historical stimulus events, the dominant cognitive dimension among multiple cognitive dimensions determined based on psychological theories is identified, including: Multiple historical stimuli and current stimuli are projected onto the semantic embedding space through a semantic mapping function to obtain the event semantic representation of each stimuli. Based on the similarity between the semantic representations of events, stimuli with similar semantics are clustered into multiple macro-event clusters; Cognitive state transition relationships are constructed based on macro event clusters, where each cognitive state transition relationship is used to record the cognitive state before the stimulus event occurs and the cognitive state after the stimulus event occurs. The dominant cognitive dimension is selected from various cognitive dimensions based on the cognitive state transition relationship.

[0009] In one optional implementation, the dominant cognitive dimension is selected from each cognitive dimension based on the cognitive state transition relationship, including: Construct all cognitive state transition relationships into a directed cognitive state transition graph; Based on the directed graph of cognitive state transition, we compare whether the state of each cognitive dimension has changed before and after the occurrence of the current stimulus event, and determine the set of candidate dimensions that have changed. Candidate cognitive dimensions are determined from the cognitive dimensions based on the number of cognitive dimensions contained in the candidate dimension set. Based on the directed graph of cognitive state transition, the conditional frequency of candidate cognitive dimensions becoming the dominant cognitive dimension is calculated under the conditions of limiting the event type and the cognitive state before the occurrence of the corresponding stimulus event. The baseline frequency when the event type is not limited is subtracted to obtain the population significance score of each candidate cognitive dimension. The group saliency scores are individually rescored and normalized to obtain the individual saliency vectors of each candidate cognitive dimension, and the cognitive dimension with the largest weight is determined as the dominant cognitive dimension.

[0010] In one optional implementation, candidate cognitive dimensions are determined from the cognitive dimensions based on the number of cognitive dimensions included in the candidate dimension set, including: If the candidate dimension set contains only one cognitive dimension, then the cognitive dimension is determined as the candidate cognitive dimension; If the candidate dimension set contains multiple cognitive dimensions, then the cognitive dimension with the lowest marginal frequency of state transition under the condition that the cognitive state is the same before the stimulus event occurs is selected as the candidate cognitive dimension.

[0011] In one optional implementation, the group saliency score is personalized and normalized to obtain a personalized saliency vector for each candidate cognitive dimension, including: By using a large language model combined with the target user's local interaction trajectory and reverse attribution reasons, the group saliency score is re-scored in a personalized way to obtain personalized scores for each candidate cognitive dimension. The personalized scores are normalized to obtain the personalized saliency vectors for each candidate cognitive dimension.

[0012] In one alternative implementation, a cognitive reasoning path is constructed based on the dominant cognitive dimension, including: Input the target user's historical response trajectory, current stimulus event, cognitive state transition relationship, actual response, and personalized salience vector into the large language model, and perform reverse reasoning on each cognitive dimension within the cognitive state to obtain the labeled reasoning path; Decompose the labeled reasoning path to obtain reasoning fragments for each cognitive dimension; The reasoning segments are scored and filtered, and then recombined to obtain the cognitive reasoning path.

[0013] In one optional implementation, the cognitive reasoning path is progressively internalized and trained to obtain a trained generative model, including: Based on historical response trajectories, current stimulus events, personalized saliency vectors, and cognitive states, the cognitive parameters are updated by reasoning through cognitive reasoning paths to obtain the first parameter. After removing inference fragments other than the dominant dimension, the dominant dimension is inferred based on historical response trajectories, current stimulus events, personalized saliency vectors, and cognitive states. The second parameter is then updated based on the first parameter. After removing cognitive reasoning paths and personalized saliency vectors, reasoning is performed based on historical response trajectories, current stimulus events, and cognitive states, and the third parameter is obtained by updating the second parameter. The generative model is obtained based on the third parameter.

[0014] Secondly, the present invention provides a device for generating anthropomorphic responses from social media users based on cognitive state modeling, the device comprising: The data acquisition module is used to acquire the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events in the historical response trajectory; The dimensional analysis module is used to determine the dominant cognitive dimension among multiple cognitive dimensions based on historical response trajectories, current stimulus events, actual responses to the current stimulus events, and multiple historical stimulus events, for each cognitive dimension determined based on psychological theories. The path building module is used to construct cognitive reasoning paths based on the dominant cognitive dimension. The model training module is used to progressively internalize the cognitive reasoning path to obtain the trained generative model. The response generation module is used to generate human-like responses based on the trained generative model, the target user's new historical response trajectory, and stimulating events.

[0015] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the above-described method for generating anthropomorphic social media user responses based on cognitive state modeling, or any of its corresponding embodiments.

[0016] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the cognitive state modeling-based anthropomorphic response generation method for social media users described in the first aspect or any corresponding embodiment thereof.

[0017] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the cognitive state modeling-based method for generating anthropomorphic responses from social media users as described in the first aspect or any corresponding embodiment above. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating a method for generating anthropomorphic responses from social media users based on cognitive state modeling, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the overall process of a method for generating anthropomorphic responses from social media users based on cognitive state modeling, according to an embodiment of the present invention. Figure 3 This is a structural block diagram of a social media user anthropomorphic reply generation device based on cognitive state modeling according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0022] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0023] Social media simulation is an important method for mining and reproducing group behaviors (such as opinion evolution and information diffusion) from large-scale user-generated data. To achieve high-fidelity simulation, the key lies in reproducing the personalized expressive behaviors of real users after being stimulated by events, that is, ensuring that the responses generated by the simulated agent are consistent with those of specific real users in terms of emotion, tone, stance, and length.

[0024] With the development of large-scale language model technology, the mainstream technical solution currently is to use large language models to drive the generation of social media user behavior. A typical solution directly generates responses based on user profiles and triggering events. For example, through role-playing or personalized prompts, the user's identity information, historical posts, and current stimulating events are concatenated into prompt words, requiring the large language model to output a response accordingly.

[0025] Another approach involves supervised fine-tuning to directly fit a mapping from "user history and stimulus events" to "real responses" onto the interaction data. In recent years, some work has also introduced psychological theories or theories of mind to assist in generation, but these usually treat the cognitive or psychological dimensions as a fixed prompt text description or as a fixed external structure embedded in the generation process, and the way cognitive information is used is fixed before reasoning.

[0026] While the aforementioned background technologies can generate responses that appear grammatically correct, they still have significant technical limitations in reproducing the personalized expressions of real users and achieving high-fidelity social media simulation.

[0027] First, existing solutions directly map user profiles and triggering events to response text, skipping the process of shaping the user's internal cognitive state into the outward expression. However, a real user's response is not directly determined by the profile, but rather driven by their internal cognitive states (such as emotions, stances, thought patterns, and intentions) activated by the stimulus. Ignoring this intermediate step leads to a systematic deviation between the generated response and the real user in terms of emotional intensity, tone, length, and stance, resulting in insufficient fidelity.

[0028] Secondly, even if some solutions introduce cognitive or psychological dimensions, they mostly treat them as fixed prompt text or fixed external structures, failing to extract cognitive states as structured factors that can be modeled from interaction data and learned under supervision. Furthermore, these solutions often treat multiple cognitive dimensions equally, failing to identify the cognitive dimension that truly plays a dominant role in the current interaction, thus mixing in a large number of irrelevant signals during generation and weakening the effective guidance for responses.

[0029] Finally, while introducing explicit multi-dimensional chain reasoning helps improve interpretability, it brings two problems: First, explicit reasoning requires additional decoding overhead during the reasoning stage, and attention is spread across multiple dimensions, which dilutes the role of the dominant dimension; second, such methods often rely on explicit cognitive labels as input during the reasoning stage, making it difficult to deploy them directly on new topics and scenarios lacking cognitive labels.

[0030] Therefore, the related technologies have defects such as "skipping internal cognitive states leading to low fidelity", "cognitive dimensions not being structurally modeled and the dominant dimension being unclear", and "explicit reasoning having high overhead and relying on annotation during reasoning".

[0031] To address the aforementioned problems, according to an embodiment of the present invention, a method for generating anthropomorphic responses from social media users based on cognitive state modeling 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.

[0032] This embodiment provides a method for generating anthropomorphic responses from social media users based on cognitive state modeling, which can be used in electronic devices such as processors / servers with computing power. Figure 1 This is a flowchart of a method for generating anthropomorphic responses to social media users based on cognitive state modeling, according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps: Step S101: Obtain the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events from the historical response trajectory.

[0033] Optionally, the objective of this invention is to first analyze the dominant cognitive dimension and construct a cognitive reasoning path during social media simulation, obtain a generative model through internalization training, and generate anthropomorphic responses based on the characteristics of the target user, i.e., the social media simulation object. This involves modeling an interaction on social media as a triple. ,in This represents the target user's historical response trajectory, that is, the complete time-series data sequence of the user's historical interactions on social media, including historical trigger events and their corresponding time series. This refers to the current stimulus event, which represents the external input content that directly triggers the target user's speaking behavior in the current round of interaction where a response is to be generated. Examples of such input include posts, news articles, or context. This represents the actual responses from target users to the current stimulating event.

[0034] For example, the current triggering event is a controversial topic on social media discussing gender equality, workplace gender discrimination, and gender diversity rights. The target users are netizens who have long been concerned about gender diversity issues. The data collection process involves gathering the user's historical response history, including past triggering events and the user's comments at the time, sorted chronologically. Regarding the current triggering event, "Should public facilities add more accessible restrooms for parents with young children of the opposite sex? It's a basic right." The user's historical response history, the current triggering event, their actual responses to the current triggering event, and multiple past triggering events from their historical response history are recorded as the raw interaction data sample.

[0035] Step S102: Based on historical response trajectories, current stimulus events, actual responses to the current stimulus events, and multiple historical stimulus events, determine the dominant cognitive dimension among multiple cognitive dimensions determined based on psychological theories.

[0036] Optionally, the present invention introduces a modelable cognitive state, in which the target user experiences a current stimulus event. The internal cognitive state below is denoted as It includes four cognitive dimensions, namely emotion Way of thinking ,position ,intention Its goal is to learn a generator. This makes its output approximate the actual response. This invention will address cognitive states. Represented as a four-dimensional discrete element Each dimension is based on mature psychological theories, and each dimension is classified according to different psychological theories. Experts are organized to conduct annotation training on user comments in social media data, and the samples in the dataset are labeled with four cognitive dimensions.

[0037] (1) Emotion

[0038] Emotion is used to analyze the subjective emotional feelings of target users in the face of current stimulating events. The corresponding psychological basis is the Plutchik discrete affective classification, which divides the target user's emotions into nine labels: joy, fear, disgust, trust, surprise, sadness, anticipation, neutrality, and uncertainty. For example, a user's statement "This person is purely slandering and spreading rumors, it's so disgusting" is labeled as "disgust," and "This place is so beautiful, I hope I can go there someday" is labeled as "anticipation."

[0039] (2) Way of thinking

[0040] Thinking patterns are used to analyze the logical thinking patterns of target users when they receive current stimuli. The corresponding psychological basis is the dual-process theory, which categorizes target users' thinking patterns into intuitive, conformist, emotional, experiential, logical, balanced, critical, and ambiguous types.

[0041] (3) Stance

[0042] Stance is used to analyze which side target users tend to favor in controversial topics. The corresponding psychological basis is social judgment theory. Target users' stances are divided into those who support entity A, those who support entity B, and those who are ambiguous. The ambiguous label is used to match binary controversial topics.

[0043] (4) Intention

[0044] Intent is used to analyze the purpose that target users want to achieve when they respond. The corresponding psychological basis is verbal behavior theory, which divides the target user's intent into information sharing, assertion, identification and alliance, objection and conflict, emotional catharsis, information seeking, and call to action.

[0045] Based on the changes in the target user's internal cognitive state under the current stimulus event, the dominant cognitive dimension that truly drives the current interactive behavior is identified among the four cognitive dimensions, with each current stimulus event corresponding to a unique dominant cognitive dimension.

[0046] Step S103: Construct a cognitive reasoning path based on the dominant cognitive dimension.

[0047] Optionally, after determining the sole dominant cognitive dimension, the user's historical response trajectory, the current stimulus event, the cognitive state before and after the stimulus, the actual response, and the salience information of each cognitive dimension are input into the large language model. The model then reverse-engineers the user's complete psychological activity from the final actual response, generating a complete inference text covering all four dimensions: emotion, thought, stance, and intention. The generated complete inference content is then broken down into independent inference fragments according to the four cognitive dimensions, with each fragment corresponding to one cognitive dimension. The fragment corresponding to the dominant cognitive dimension is the core main content of the entire inference, while the fragments of the other three dimensions serve only as supplementary information.

[0048] The reasoning fragments are verified and screened, retaining only those that meet the overall score, and eliminating invalid content that is logically flawed or deviates from the user's true psychology. The complete cognitive reasoning path is reconstructed using the dominant cognitive dimension as the main thread, with qualified reasoning fragments from other secondary dimensions interspersed and integrated as supplementary content, thus reassembling a structured, logically coherent, and standardized cognitive reasoning path.

[0049] Step S104: Perform progressive internalization training on the cognitive reasoning path to obtain the trained generative model.

[0050] Optionally, given a high-quality training set, the model needs to be taught to map from internal cognition to explicit response without explicit reasoning during the inference phase. The design motivation of this invention comes from the two-process theory: when faced with difficult problems, humans rely on slow explicit reasoning, which internalizes into rapid intuitive responses with experience. Inspired by implicit thought chains, this invention employs a three-step curriculum, transitioning from fully explicit reasoning to compact dominant-dimensional reasoning, and then to fully implicit generation; the optimization objective correspondingly evolves from joint likelihood maximization to marginal likelihood maximization.

[0051] Step S105: Based on the trained generative model, generate a human-like response according to the target user's new historical response trajectory and stimulus events.

[0052] Optionally, after the generative model has been trained, it no longer requires explicit external provision of cognitive state labels and personalized saliency vectors when faced with new interaction samples. Or structured reasoning path Because in the aforementioned progressive cognitive internalization training, the model has already compressed cognitive saliency judgment, reasoning path organization, and the mapping relationship from cognitive state to explicit response into the model parameters through three steps: "full-dimensional reasoning alignment - dominant dimension reasoning - implicit cognitive internalization". Therefore, the goal of the reasoning stage is no longer to explicitly reconstruct the cognitive process, but to allow the trained model to directly generate responses based on the current interaction context.

[0053] This invention provides a method for generating anthropomorphic responses to social media users based on cognitive state modeling. It proposes a novel paradigm for response generation driven by cognitive state modeling. By acquiring the target user's historical response trajectory, current stimulus event, actual responses to the current stimulus event, and multiple historical stimulus events from the historical response trajectory, and considering multiple cognitive dimensions determined based on psychological theory, it automatically identifies the dominant cognitive dimension truly driving the current interaction. Then, based on the dominant cognitive dimension, it constructs a cognitive reasoning path, generating a structured intermediate cognitive explanation for each interaction sample. Subsequently, it progressively internalizes the cognitive reasoning path, gradually internalizing cognitive reasoning ability from explicit to implicit into the model parameters, enabling the model to generate accurate anthropomorphic responses without explicit reasoning. This invention differs from directly generating anthropomorphic responses from profiles and events, or treating cognition as a fixed prompt or fixed external structure, fundamentally addressing the fidelity defects caused by "skipping internal cognitive states."

[0054] This embodiment provides a method for generating anthropomorphic responses from social media users based on cognitive state modeling. This method can be used in electronic devices such as processors / servers with computational capabilities. The process includes the following steps: Step S201: Obtain the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events from the historical response trajectory. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0055] Step S202: Based on historical response trajectories, current stimulus events, actual responses to the current stimulus events, and multiple historical stimulus events, determine the dominant cognitive dimension among multiple cognitive dimensions determined based on psychological theories.

[0056] Specifically, step S202 includes: Step S2021: Project multiple historical stimulus events and the current stimulus event onto the semantic embedding space through a semantic mapping function to obtain the event semantic representation of each stimulus event.

[0057] Optionally, the set of stimulus events occurring during the current interaction is denoted as , of which each This represents a stimulus event that may trigger a change in the user's cognitive dimension, such as user speech, system responses, external facts, emotionally triggered content, or key interactive behaviors in the context. `n` represents the total number of stimulus events in the current interaction. This is achieved through a semantic mapping function. Each stimulus event Projecting onto the semantic embedding space yields the corresponding event semantic representation. This semantic mapping function can be implemented by a pre-trained language model encoder, keyword rules, event classifier, or a combination thereof; the present invention does not limit its specific model structure.

[0058] Step S2022: Based on the similarity between the semantic representations of events, cluster semantically similar stimulus events into multiple macro-event clusters.

[0059] Optionally, the stimulus events are clustered, grouping semantically similar and triggering-mechanism-similar stimulus events into K macro-event clusters, denoted as K. , among which, a single A semantic representation of a specific stimulus event. This represents a set of macro-event clusters resulting from the aggregation of multiple stimulus events. This clustering process can group scattered stimulus events into more stable event categories, reducing noise caused by differences in the representation of individual events.

[0060] Step S2023: Construct cognitive state transition relationships based on macro event clusters, wherein each cognitive state transition relationship is used to record the cognitive state before the stimulus event occurs and the cognitive state after the stimulus event occurs.

[0061] Optionally, the cognitive state transfer relationship refers to the complete record of the changes in the target user's four-dimensional cognitive state before and after each stimulus event, which records "event type, target user's four-dimensional cognitive state before the event, and four-dimensional cognitive state after the event", and serves as the data basis for judging the pattern of dimensional changes.

[0062] Semantic representation of each event or macro event cluster Construct the cognitive state transition relationship triggered by it: .in, Indicates the cognitive state before the event occurs. It indicates the cognitive state after an event occurs.

[0063] Step S2024: Based on the cognitive state transition relationship, select the dominant cognitive dimension from each cognitive dimension.

[0064] Optionally, for each cognitive state transition relationship triggered by a stimulus event, the system determines the dominant cognitive dimension. It then compares the labels of the four cognitive dimensions before and after the event to determine if they differ, and selects the dominant cognitive dimension from those whose labels changed through calculation and comparison.

[0065] This embodiment provides a method for generating anthropomorphic responses to social media users based on cognitive state modeling. It maps stimulus events to a semantic embedding space for similarity clustering, obtains the transition relationship between cognitive states and stimulus events based on the resulting macro-event clusters, and then filters the dominant cognitive dimension according to the transition relationship. This invention, by mapping and clustering stimulus events, can achieve standardized digital representation of stimulus events. Merging and classifying scattered stimulus events improves the algorithm's generalization ability, accurately distinguishes the cognitive state change patterns corresponding to different types of stimulus events, and improves the accuracy and computational speed of filtering dominant cognitive dimensions.

[0066] In some optional implementations, step S2024 above includes: Step a1: Construct a directed graph of cognitive state transitions from all cognitive state transition relationships.

[0067] Step a2: Based on the directed graph of cognitive state transition, compare whether the state of each cognitive dimension has changed before and after the occurrence of the current stimulus event, and determine the set of candidate dimensions that have changed.

[0068] Step a3: Based on the number of cognitive dimensions contained in the candidate dimension set, determine the candidate cognitive dimensions from the cognitive dimensions.

[0069] Step a4: Based on the directed graph of cognitive state transition, calculate the conditional frequency of candidate cognitive dimensions becoming the dominant cognitive dimension under the conditions of limited event type and cognitive state before the occurrence of the corresponding stimulus event. Subtract the baseline frequency when the event type is not limited to obtain the population significance score of each candidate cognitive dimension.

[0070] Step a5 involves rescoring and normalizing the group saliency scores to obtain personalized saliency vectors for each candidate cognitive dimension, and then determining the cognitive dimension with the highest weight as the dominant cognitive dimension.

[0071] Optionally, the cognitive state transition relationships triggered by all stimulus events can be constructed into a directed graph: , where the node set Represents the discrete cognitive state space, edge set Record the relationship between cognitive state transitions before or after a stimulus event and their frequency of occurrence.

[0072] For dimensional space Compare whether cognitive states in each dimension changed before and after the occurrence of the stimulus event. For any given cognitive dimension... Define the change indicator function .in This represents the state on the d-th cognitive dimension before the stimulus event occurs. This represents the state on the d-th cognitive dimension after the stimulus event occurs. This is an indicator function that takes a value of 1 when the condition within the parentheses is true, and a value of 0 otherwise. This yields the set of candidate dimensions that have changed:

[0073] Candidate cognitive dimensions are selected from the cognitive dimensions with a value of 1, resulting in the candidate cognitive dimension corresponding to each cognitive state transition triggered by a stimulus event. In other words, for any historical transition edge... Each of these can obtain a dimension label. , is used to represent the dimension that best explains the change in cognitive state during this transition. It is the dominant cognitive dimension label determined for a single transition edge.

[0074] Statistical analysis of cognitive states before a given event Under certain conditions, a certain type of macro event cluster Will it significantly improve a certain cognitive dimension? The possibility of becoming the dominant cognitive dimension, that is, "whether there is a stable correlation between a certain type of event and changes in a certain cognitive dimension". Specifically, remember... For all from cognitive state Starting from, and by macro event clusters The set of triggered historical transition edges; denoted as For all from The set of historical transition edges from which a process originates, without being limited to any particular type of event that triggers it. For any cognitive dimension... The significance score of its dimension is defined as follows:

[0075] in This indicates that the state before the event was Under these conditions, macro event clusters Cognitive Dimensions This becomes the marginal increase in the dominant cognitive dimension. The first term on the right side of the formula represents: when the event type is limited to... Time, dimension The conditional frequency is determined to be the dominant cognitive dimension; the second term indicates: when the event type is not specified, the dimension... The baseline frequency was determined to be the dominant cognitive dimension. Subtracting the two yields the event cluster. This is an additional improvement compared to the general background transfer.

[0076] therefore, Represents macro event clusters It will make the dimensions It is more likely to become the dominant cognitive dimension; This indicates that the event cluster represents the dimension. No obvious additional effects; This indicates the lower dimension of the event cluster. The likelihood of it becoming the dominant cognitive dimension is lower than the background level. This score reflects a significant correlation signal based on historical statistics, rather than a causal effect in the strict sense.

[0077] It is for each cognitive dimension The scores are calculated separately, rather than for a single dominant cognitive dimension derived from a particular shift. This is because the purpose of calculating group saliency scores is to compare the saliency of different cognitive dimensions within the same category of events, thereby providing ranking and normalizable dimensional evidence for subsequent steps. If only a single cognitive dimension is retained, it becomes impossible to compare other cognitive dimensions or perform subsequent personalized weight allocation.

[0078] This embodiment presents a method for generating anthropomorphic responses to social media users based on cognitive state modeling. It proposes a mechanism for analyzing the saliency of cognitive dimensions under event conditions and a personalized rescoring mechanism. Through event semantic clustering and a directed graph of cognitive state transitions, it quantifies the activation boost of each type of stimulus event on each cognitive dimension, automatically locating the dominant cognitive dimension of the current interaction. Then, personalized rescoring based on a large language model corrects for individual response differences masked by the group mean, ensuring that guiding signals focus on the truly effective cognitive dimensions.

[0079] In some alternative implementations, step a3 above includes: Step b1: If the candidate dimension set contains only one cognitive dimension, then the cognitive dimension is determined as a candidate cognitive dimension.

[0080] Step b2: If the candidate dimension set contains multiple cognitive dimensions, then select the cognitive dimension with the lowest marginal frequency of state transition under the condition that the cognitive state is the same before the stimulus event occurs as the candidate cognitive dimension.

[0081] Optionally, the specific determination rules are as follows: if the candidate dimension set If the data contains only one cognitive dimension, then that cognitive dimension is directly identified as the candidate cognitive dimension to be triggered by the current stimulus event. The presence of multiple cognitive dimensions indicates that the current stimulus event simultaneously triggers changes in multiple cognitive dimensions. In this case, the state prior to the same stimulus event is preferred. Under these conditions, the cognitive dimension with the lowest marginal frequency of state transitions is selected as the candidate cognitive dimension. This is because high-frequency transitions may reflect regular fluctuations in the user's cognitive state or background drift, while low-frequency transitions are more likely to be significant changes triggered specifically by the current stimulus event. If no dimension changes, i.e. If the current stimulus event does not produce observable significant cognitive changes, it will not be included in the calculation of the candidate cognitive dimension.

[0082] In some alternative implementations, step a5 above includes: Step c1: Using a large language model combined with the target user's local interaction trajectory and reverse attribution reasons, the group saliency score is re-scored in a personalized manner to obtain personalized scores for each candidate cognitive dimension.

[0083] Step c2: Normalize the personalized scores to obtain the personalized saliency vectors for each candidate cognitive dimension.

[0084] Optionally, This is a statistically significant signal at the group level, reflecting which type of cognitive dimension changes a particular cluster of events is more likely to trigger in a historical sample. However, in actual interactions, different users may have different cognitive responses to the same type of stimulus. For example, with the same critical discourse, some users mainly exhibit emotional fluctuations, some mainly exhibit stance reinforcement, and others may exhibit a change in intent. Therefore, relying solely on group statistical significance can easily mask individual differences. To address this, this invention further introduces a personalized rescoring function. By combining the saliency of the group dimension with the local interaction trajectory of the current user, the individualized dimension weights are obtained.

[0085] Specifically, the current user's local trajectory is recorded as follows:

[0086] in, This indicates the user's cognitive state before the current stimulating event occurs. This indicates the macro event cluster to which the current stimulus event belongs. This indicates the user's cognitive state after a stimulating event occurs. This refers to the actual response, behavioral outcome, or response that the system needs to predict or generate during the current interaction. It is not a simple event label, but a personalized context used to describe "how the user's cognition changes before and after the current event".

[0087] At the same time, reverse attribution reasons are introduced. This is used to explain why a certain cognitive dimension in the current trajectory... This might be a more crucial cognitive dimension. This reasoning can be generated by a large language model based on the user's historical response trajectory, the current stimulus, changes in cognitive state before and after the event, and candidate cognitive dimensions. Its role is not to replace statistical scores, but rather to provide semantic interpretations and personalized corrections for the statistical scores tailored to the current user. For example, when a certain type of event statistically more often triggers emotional changes in a group, but the current user has historically tended to reinforce their stance on similar events, the reverse attribution reasoning can suggest that the model reduce the weight of the emotional dimension and increase the weight of the stance dimension.

[0088] The personalized rescoring function is defined as follows:

[0089] in, Representing cognitive dimensions Personalized scores based on the current user, current stimulus, and current interaction goal; Represents the significance score of the group; This represents the current user's local cognitive trajectory; Indicates the cognitive dimension The reverse attribution reason. In this invention, This can be implemented using a large language model, or a classification model, scoring model, or rule-based model. If implemented using a large language model, structured prompts can be used to require the model to respond to given... , and Under the condition of, output a value located in each cognitive dimension. The individualized scores within the intervals are provided, along with corresponding justifications. Subsequently, to transform the individualized scores across different cognitive dimensions into comparable weight distributions, softmax normalization is applied to all cognitive dimensions.

[0090] in, Representing cognitive dimensions The weight of personalization in the current user interaction; This is the dimension index variable used during normalized summation, iterating through all dimensions in the candidate dimension set D, and the denominator... It has no additional meaning and is only used to indicate the summation and normalization of scores for all candidate cognitive dimensions.

[0091] It's important to clarify that personalized rescoring involves uniformly rescoring all candidate cognitive dimensions, not just a single one. This is because scoring only a single cognitive dimension makes it impossible to determine whether it's truly more important than others, and it fails to establish a weight distribution for subsequent strategy selection. The purpose of personalized rescoring is to synthesize both group statistical evidence and individualized trajectory evidence to re-evaluate the relative importance of each cognitive dimension in the current interaction. Ultimately, this can be used to... Determine the dominant cognitive dimension in the current interaction.

[0092] Therefore, the group saliency score provides evidence of "event-dimension" saliency at the group level, answering the question, "Under normal circumstances, which type of cognitive dimension change is more likely to be triggered by this type of event?" The personalized saliency vector further combines the current user's local trajectory and reverse attribution rationale to answer the question, "For this user and this interaction, which cognitive dimension should we ultimately focus on?" The former emphasizes statistical stability, while the latter emphasizes individual adaptability; both are used together to improve the accuracy and interpretability of dominant dimension judgment.

[0093] Step S203: Construct a cognitive reasoning path based on the dominant cognitive dimension.

[0094] Specifically, step S203 includes: Step S2031: Input the target user's historical response trajectory, current stimulus event, cognitive state transition relationship, true response and personalized salience vector into the large language model, and perform reverse reasoning on each cognitive dimension within the cognitive state to obtain the labeled reasoning path.

[0095] Optionally, this invention employs a large language model or an equivalent generative reasoning model as the reasoning path builder, constructing a structured, labeled reasoning path for each cognitive state transition relationship through back-reasoning. This reasoning path is not a true record of the user's internal cognitive state changes, but rather a post-hoc rationalization supervision signal constructed based on the user's historical response trajectory, the current stimulus event, the cognitive state transition relationship, the actual response, and the personalized saliency vector, used to provide intermediate cognitive explanations for subsequent model training. Its input includes the user's historical response trajectory. Current stimulus event or stimulus sequence Cognitive state transition relationship Authentic replies and personalized saliency vectors Output the labeled inference path. .

[0096] Step S2032: Decompose and label the reasoning path to obtain reasoning fragments for each cognitive dimension.

[0097] Optionally, the reasoning path is labeled. It can be broken down into dimensional reasoning fragments, with the dominant cognitive dimension being the most important. As the main storyline. Among them, Indicates a focus on the cognitive dimension The generated reasoning fragments include reasoning fragments based on the emotional dimension, reasoning fragments based on the thinking style dimension, reasoning fragments based on the stance dimension, and reasoning fragments based on the intention dimension. This represents a complete reasoning path composed of reasoning fragments from all dimensions. Dominant cognitive dimension. From personalized saliency vector The cognitive dimension with the highest weight has been determined, namely: .in, Represents the set of candidate dimensions. Representing cognitive dimensions Personalization weight in the current interaction. Dominant cognitive dimension. It is only used to determine the main direction of the reasoning path, not to exclude auxiliary explanations from other dimensions.

[0098] Step S2033: Score and filter the reasoning segments, and recombine them to obtain the cognitive reasoning path.

[0099] Optionally, each reasoning segment is reviewed by multiple experts with psychology backgrounds under blind review conditions, and scored according to three criteria in a range of 1-10: (1) accuracy of the dominant dimension; (2) consistency of cognitive logic; and (3) transferability of fine-tuning. Only reasoning segments with an average score higher than 6 are retained to constitute the cognitive reasoning path. It should be noted that the reverse reasoning constructed after observing the true response Y is a post-hoc rationalization, rather than a record of the actual forward cognitive process; this invention will This is considered an intermediate monitoring signal screened by experts; expert screening can eliminate reasonable explanations that are fluent but inaccurate; subsequent internalization of the objective... Marginalize it so that the ex post facto reasoning structure does not directly intrude into the reasoning stage.

[0100] This embodiment presents a method for generating anthropomorphic responses to social media users based on cognitive state modeling. It proposes a cognitive reasoning path construction method based on reverse reasoning and expert screening. Using only real data recording "stimulus-response" pairs, it reconstructs dimension-wise intermediate cognitive supervision through reverse reasoning and filters out unreliable ex post facto rationalizations through multi-expert blind review. This achieves credible reasoning supervision on real-world data without intermediate cognitive annotations, improving the fidelity of the generated responses.

[0101] Step S204: Perform progressive internalization training on the cognitive reasoning path to obtain the trained generative model.

[0102] Specifically, step S204 includes: Step S2041: Based on the historical response trajectory, the current stimulus event, the personalized saliency vector, and the cognitive state, reason about each cognitive dimension through the cognitive reasoning path, update the cognitive parameters, and obtain the first parameter.

[0103] Optionally, the model first generates reasoning fragments in four cognitive dimensions, and then generates responses. This establishes a fundamental mapping from "internal cognition to explicit response" covering all four dimensions:

[0104] The input is , This represents taking the expectation of the training sample distribution; The cognitive parameters are: Generative models; Representing cognitive dimensions The corresponding reasoning fragment; This indicates the generation of cognitive dimensions. The reasoning fragments generated before other dimensional reasoning fragments are used to maintain contextual consistency between multidimensional reasoning; This represents a complete reasoning path composed of reasoning fragments from all cognitive dimensions; This indicates whether the response is genuine or the target response. The final output is the updated first parameter. .

[0105] The objective function contains two parts within parentheses. The first part... This is used to supervise the model in generating cognitive reasoning fragments dimension by dimension, enabling the model to learn the mapping from input conditions to internal cognitive interpretations. Part Two Used to supervise the model throughout the entire inference path With the assistance of [unclear], the target response is generated, enabling the model to learn the mapping from internal cognitive interpretation to explicit response. The negative sign indicates that negative log-likelihood is used as the optimization objective, that is, to maximize the probability of generating the correct reasoning path and the correct response.

[0106] Step S2042: Remove reasoning fragments other than the dominant dimension. Based on historical response trajectories, current stimulus events, personalized saliency vectors, and cognitive states, reason about the dominant dimension through reasoning fragments of the dominant dimension in the cognitive reasoning path, and update the second parameter based on the first parameter.

[0107] Optionally, only in reasoning fragments that dominate the cognitive dimension. Supervised analysis is performed on the upper dimension to compress redundant inferences on secondary dimensions while maintaining a stable output distribution.

[0108] The input is , This indicates that only the dominant cognitive dimension is retained. The corresponding reasoning segments no longer require the model to generate complete reasoning paths for all cognitive dimensions. Instead, supervision is focused on the most important dominant cognitive dimension. This compresses redundant reasoning from secondary dimensions while maintaining output response. The generated distribution is stable. The first term in the formula is used to supervise the model in generating the dominant cognitive dimension reasoning fragment, and the second term is used to supervise the model in generating the target response based on this dominant cognitive dimension reasoning fragment. The final output is based on the second parameter updated from the first parameter. .

[0109] Step S2043: Remove the cognitive reasoning path and personalized saliency vector, and perform reasoning based on historical response trajectory, current stimulus event and cognitive state. Update the third parameter based on the second parameter.

[0110] Step S2044: Obtain the generative model based on the third parameter.

[0111] Optionally, remove all intermediate inference from the supervision and... After removing from the input, the model directly fits the marginal target distribution:

[0112]

[0113] In this step This indicates that it does not contain explicit personalized saliency vectors. The input. This step no longer explicitly supervises the intermediate inference path generated by the model. Instead, it treats possible inference paths as latent variables within the model. In the formula... This indicates the probability that the model internally forms a certain potential cognitive reasoning path; This indicates that a response is generated based on the support of this potential reasoning path. The probability of . For all possible Summation indicates that the generative model does not need to explicitly output the inference path; it can integrate these underlying cognitive processes within the parameters and directly generate the target response. The final output is based on the third parameter updated from the second parameter. model parameters .

[0114] This embodiment presents a method for generating anthropomorphic responses from social media users based on cognitive state modeling, proposing a progressive three-step curriculum internalization mechanism. The optimization objective transitions sequentially from the full-dimensional joint likelihood to the dominant dimension likelihood, and then to the implicit marginal likelihood, gradually internalizing cognitive reasoning into shared LoRA (Low-Rank Adaptation of Large Language Models) parameters. The reasoning stage requires no explicit reasoning or saliency input, achieving zero additional reasoning overhead, and is compatible with the dual deployment capability of "controllable generation with annotations and degenerate generation without annotations".

[0115] Step S205: Based on the trained generative model, generate a human-like response according to the target user's new historical response trajectory and stimulus events.

[0116] Optionally, during the reasoning phase, when faced with new interaction samples, this invention no longer requires explicit external provision of cognitive labels and personalized saliency vectors. Or structured reasoning path This is because, in the aforementioned progressive cognitive internalization training, the model has already compressed cognitive saliency judgment, reasoning path organization, and the mapping relationship from cognitive state to explicit response into the model parameters through three steps: "full-dimensional reasoning alignment—dominant dimension reasoning—implicit cognitive internalization". Therefore, the goal of the inference phase is no longer to explicitly reconstruct the cognitive process, but rather to allow the trained model to directly generate responses based on the current interaction context. Specifically, when a new interaction sample contains the user's historical response trajectory, the current stimulus event or stimulus sequence, and external control specifications, the inference input is represented as: .in, This indicates the user's historical response trajectory or interaction information in the new scenario. This indicates the stimulus or context event that triggered the current response. This indicates optional external control specifications, such as response style, task constraints, generation goals, or platform specifications. It should be noted that... This is not the user's internal cognitive state, but rather the external control conditions provided to the generative model; if no external control specifications exist for the current scenario, then... If left empty, the input will degenerate into: The model is based on the parameters obtained after training. Generate reply directly:

[0117] in, This represents the final response generated by the model, i.e., the anthropomorphic response. The parameter is Generative models given input Generate candidate responses under certain conditions The probability. In the formula... This indicates selecting the response with the highest probability of generation from the candidate response space. In practical implementations, this process can be approximated by greedy decoding, beam search, or sampling decoding, and this invention does not limit the specific decoding algorithm.

[0118] Therefore, not providing cognitive labels does not mean the model does not use cognitive information, nor does it mean that the aforementioned cognitive modeling is cancelled. Rather, it means that the inference stage no longer relies on external explicit cognitive labels. In other words, cognitive supervision is only provided during the training phase using personalized saliency vectors. Structured reasoning path and target reply These external cognitive supervision signals participate in model optimization in the form of [unclear]; during the inference phase, these signals are removed, and the model relies on those already internalized into the parameters. The cognitive mapping capability in the model enables response generation. This avoids the cost of additional cognitive state annotation during deployment and ensures that the model still has transfer generation capabilities in new topics, new platforms, or new user scenarios where external cognitive annotations are lacking.

[0119] The social media user anthropomorphic reply generation method based on cognitive state modeling provided in this embodiment firstly achieves consistent improvements in reply fidelity across two benchmarks, CognitiveBench and SoMoSiMu-Bench, compared to 20 baseline methods, in four categories of indicators: text overlap, structural alignment, evaluation based on a large language model, and human evaluation. For example, compared to the strongest fine-tuning baseline, this invention improves the length fit rate from 90.73% to 97.33%, indicating that the generated reply is closer to a real person in terms of length, a significant personalized feature.

[0120] Secondly, this invention significantly improves fidelity while maintaining high efficiency in the inference phase. Since cognitive reasoning has been internalized into the model parameters during the training phase, no explicit reasoning needs to be generated during inference, nor is a saliency vector required. Therefore, compared to explicit chained reasoning methods, it does not introduce additional decoding overhead and has practical deployment value.

[0121] Finally, this invention enhances the controllability and generalization ability of the method. When cognitive specifications are provided, this invention performs cognitively controlled generation; when cognitive annotations are lacking, this invention automatically degenerates into unannotated generation, thus enabling smooth migration to new controversial topics and new user groups. This provides a generation tool that is closer to the laws of human cognition for high-fidelity social media simulation, opinion evolution, and information diffusion research.

[0122] As a specific application embodiment of the present invention, in order to verify the effectiveness of the present invention in reproducing the personalized expression of real users, this embodiment takes the controversial topic of "gender diversity" as a scenario and models a user's reply to a post containing insulting remarks.

[0123] In the first stage, the system first performs semantic clustering on provocative posts under the topic, obtaining macro-event clusters such as "insulting / aggressive events". Based on the cognitive transfer directed graph, the system calculates the dimensional salience scores of various event clusters: the results show that "insulting events" significantly increase the activation intensity of the emotional dimension and inhibit rational (logical) thinking. Subsequently, the system combines the user's local interaction trajectory and reverse attribution reasons to perform personalized rescoring of the group-level salience scores. After softmax normalization, it is found that α reaches its maximum value in the emotional dimension, thus concluding that the user's interaction in this instance was dominated by the "emotion" dimension.

[0124] In the second phase, the system uses GPT-4o as the inference engine, inputting the user's historical response trajectory, current stimulus event, cognitive state transition relationship, true response and personalized salience vector. Through reverse reasoning, it constructs a dimension-by-dimensional reasoning path with the emotional dimension as the main line, depicting the cognitive chain of "being insulted triggering anger, then taking the intention of objection and conflict, and generating a short but intense expression". This path was blind-reviewed by three psychology experts, and the average score was higher than 6, so it was retained as training supervision.

[0125] In the third stage, the system gradually internalizes the above reasoning through a three-step course: first, it aligns the reasoning across all four dimensions; then, it retains only the emotion-driven cognitive dimension for reasoning; finally, it removes all explicit reasoning and saliency inputs, directly fits the response distribution, and accumulates knowledge using shared LoRA parameters. After internalization, only the following parameters are given during the reasoning stage: The model directly generates a highly emotional, strongly worded, and concise response, closely matching the expression style of the real user. In contrast, the baseline method, which does not model cognitive states, tends to generate bland, neutral, and lengthy responses. This example demonstrates the significant effectiveness of this invention in reproducing personalized cognitive expression.

[0126] This invention provides a method for generating anthropomorphic social media user responses based on cognitive state modeling. It proposes a novel paradigm for response generation driven by cognitive state modeling. This method acquires the target user's historical response trajectory, current stimulus event, the actual response to the current stimulus event, and multiple historical stimulus events from the historical response trajectory. Cognitive state is explicitly represented as a psychologically grounded, four-dimensional structured modelable factor that can be extracted from interaction data. Based on this structured cognition, a cognitive reasoning path is constructed and internalized to obtain a generation model, which anchors response generation. This invention differs from methods that directly generate responses from profiles and events, or treat cognition as a fixed prompt or external structure, by fundamentally addressing the fidelity deficiency caused by "skipping internal cognitive states."

[0127] like Figure 2 , Figure 2 This is a schematic diagram of the overall process of a method for generating anthropomorphic responses to social media users based on cognitive state modeling according to an embodiment of this disclosure. Logically, it fully presents the entire process from cognitive element analysis, reasoning path construction, and progressive cognitive internalization.

[0128] The left-hand section of the diagram illustrates the analysis process for the dominant cognitive dimension: first, acquiring raw interaction data, and then analyzing it using emotions, ways of thinking, stances, and intentions. Figure 4 Each discrete dimension represents the user's mental state, and the cognitive driving dimension that dominates the current interaction is identified through the saliency analysis of event conditions, including semantic clustering of stimulus events, construction of cognitive transfer maps, and personalized rescoring, to obtain the dominant cognitive dimension corresponding to the maximum saliency vector.

[0129] The central section of the diagram illustrates the construction process of the reasoning path: using real responses as the endpoint, a large language model is used to perform reverse reasoning on the data obtained above, generating a dimension-by-dimensional labeled reasoning path for each sample, and then undergoing blind review and screening by psychology experts to obtain high-quality intermediate cognitive supervision.

[0130] The right-hand block of the diagram illustrates the process of progressive cognitive internalization: the model learns through a three-step course how to gradually absorb cognitive reasoning into the shared LoRA model parameters, transitioning from full-dimensional explicit reasoning to dominant-dimensional reasoning, and then to fully implicit generation, so that the reasoning stage can directly produce high-fidelity personalized responses consistent with real people without any explicit reasoning.

[0131] This embodiment also provides a social media user anthropomorphic reply generation device based on cognitive state modeling. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0132] This embodiment provides a device for generating anthropomorphic responses from social media users based on cognitive state modeling, such as... Figure 3 As shown, it includes: Data acquisition module 301 is used to acquire the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events in the historical response trajectory; The dimensional analysis module 302 is used to determine the dominant cognitive dimension among multiple cognitive dimensions based on historical response trajectories, current stimulus events, actual responses to the current stimulus events, and multiple historical stimulus events, for each cognitive dimension determined based on psychological theories. Path construction module 303 is used to construct cognitive reasoning paths based on the dominant cognitive dimension; The model training module 304 is used to progressively internalize the cognitive reasoning path to obtain the trained generative model. The response generation module 305 is used to generate human-like responses based on the trained generative model and the target user's new historical response trajectory and stimulus events.

[0133] In some alternative implementations, the dimensional analysis module 302 includes: The semantic mapping submodule is used to project multiple historical stimulus events and the current stimulus event onto the semantic embedding space through a semantic mapping function to obtain the event semantic representation of each stimulus event; The event clustering submodule is used to cluster semantically similar stimulus events into multiple macro event clusters based on the similarity between the semantic representations of events; The relation construction submodule is used to construct cognitive state transition relations based on macro event clusters. Each cognitive state transition relation is used to record the cognitive state before the stimulus event occurs and the cognitive state after the stimulus event occurs. The dimension filtering submodule is used to filter out the dominant cognitive dimension from various cognitive dimensions based on the cognitive state transition relationship.

[0134] In some optional implementations, the dimension filtering submodule includes: The directed graph construction unit is used to construct all cognitive state transition relationships into a directed cognitive state transition graph.

[0135] The set determination unit is used to compare whether the state of each cognitive dimension has changed before and after the occurrence of the current stimulus event based on the directed graph of cognitive state transition, and to determine the set of candidate dimensions that have changed.

[0136] The dimension determination unit is used to determine candidate cognitive dimensions from the cognitive dimensions based on the number of cognitive dimensions contained in the candidate dimension set.

[0137] The score calculation unit is used to calculate the conditional frequency of a candidate cognitive dimension becoming the dominant cognitive dimension under the conditions of limited event type and corresponding cognitive state before the occurrence of the stimulus event, based on the directed graph of cognitive state transition. The baseline frequency when the event type is not limited is subtracted to obtain the group significance score of each candidate cognitive dimension.

[0138] The vector calculation unit is used to perform personalized rescoring and normalization of the group saliency scores to obtain personalized saliency vectors for each candidate cognitive dimension, and to determine the cognitive dimension with the largest weight as the dominant cognitive dimension.

[0139] In some optional implementations, the dimension determination unit includes: A single-dimensional determination unit is used to determine a cognitive dimension as a candidate cognitive dimension if the candidate dimension set contains only one cognitive dimension.

[0140] The multi-dimensional determination unit is used to select the cognitive dimension with the lowest marginal frequency of state transition under the condition that the cognitive state is the same before the occurrence of the stimulus event as the candidate cognitive dimension if the candidate dimension set contains multiple cognitive dimensions.

[0141] In some optional implementations, the vector computation unit includes: The rescoring unit is used to rescorize the group saliency score by combining the large language model with the target user's local interaction trajectory and reverse attribution reasons, and obtain personalized scores for each candidate cognitive dimension. The normalization unit is used to normalize the personalized scores to obtain the personalized saliency vectors for each candidate cognitive dimension.

[0142] In some alternative implementations, the path construction module 303 includes: The reverse reasoning submodule is used to input the target user's historical response trajectory, current stimulus event, cognitive state transition relationship, true response and personalized salience vector into the large language model, and perform reverse reasoning on each cognitive dimension within the cognitive state to obtain the labeled reasoning path; The path decomposition submodule is used to decompose the labeled reasoning path and obtain reasoning fragments for each cognitive dimension. The path filtering submodule is used to score and filter reasoning fragments and recombine them to obtain cognitive reasoning paths.

[0143] In some alternative implementations, the model training module 304 includes: The first reasoning submodule is used to reason about each cognitive dimension based on historical response trajectories, current stimulus events, personalized saliency vectors, and cognitive states, and update cognitive parameters to obtain the first parameter. The second reasoning submodule is used to remove reasoning fragments other than the dominant dimension. Based on historical response trajectories, current stimulus events, personalized saliency vectors, and cognitive states, it reasons about the dominant dimension through reasoning fragments of the dominant dimension in the cognitive reasoning path, and updates the second parameter based on the first parameter. The third reasoning submodule is used to eliminate cognitive reasoning paths and personalized saliency vectors. It performs reasoning based on historical response trajectories, current stimulus events, and cognitive states, and updates the third parameters based on the second parameters.

[0144] The model generation submodule is used to generate a model based on the third parameter.

[0145] The social media user anthropomorphic reply generation device based on cognitive state modeling provided in this invention can execute the social media user anthropomorphic reply generation method based on cognitive state modeling provided in any embodiment of this invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.

[0146] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0147] The following is a detailed reference. Figure 4 This diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from memory 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device. The processor 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0148] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0149] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a memory 408, or installed from a ROM 402. When the computer program is executed by the processor 401, it performs the functions defined in the cognitive state modeling-based social media user anthropomorphic response generation method of the embodiments of the present invention.

[0150] Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0151] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the method for generating anthropomorphic social media user responses based on cognitive state modeling shown in the above embodiments is implemented.

[0152] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0153] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for generating anthropomorphic responses from social media users based on cognitive state modeling, characterized in that, The method includes: Acquire the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events from the historical response trajectory; Based on the historical response trajectory, the current stimulus event, the actual response to the current stimulus event, and the multiple historical stimulus events, the dominant cognitive dimension among the multiple cognitive dimensions determined based on psychological theories is determined. Construct a cognitive reasoning path based on the aforementioned dominant cognitive dimensions; The cognitive reasoning path is progressively internalized and trained to obtain a trained generative model; Based on the trained generative model, anthropomorphic responses are generated according to the target user's new historical response trajectory and stimulating events.

2. The method according to claim 1, characterized in that, Based on the historical response trajectory, the current stimulus event, the actual response to the current stimulus event, and the multiple historical stimulus events, the dominant cognitive dimension among the multiple cognitive dimensions determined based on psychological theories is identified, including: The multiple historical stimulus events and the current stimulus event are projected onto the semantic embedding space through a semantic mapping function to obtain the event semantic representation of each stimulus event; Based on the similarity between the semantic representations of the events, the stimuli with similar semantics are clustered into multiple macro-event clusters; Cognitive state transition relationships are constructed based on the macro event clusters, wherein each cognitive state transition relationship is used to record the cognitive state before the occurrence of the stimulus event and the cognitive state after the occurrence of the stimulus event; The dominant cognitive dimension is selected from each of the cognitive dimensions based on the cognitive state transition relationship.

3. The method according to claim 1, characterized in that, The process of selecting the dominant cognitive dimension from each cognitive dimension based on the cognitive state transition relationship includes: Construct all cognitive state transition relationships into a directed cognitive state transition graph; Based on the directed graph of cognitive state transition, compare whether the state of each cognitive dimension has changed before and after the occurrence of the current stimulus event, and determine the set of candidate dimensions that have changed. Based on the number of cognitive dimensions included in the candidate dimension set, candidate cognitive dimensions are determined from the cognitive dimensions; Based on the directed graph of cognitive state transition, the conditional frequency of the candidate cognitive dimension becoming the dominant cognitive dimension is calculated under the conditions of limiting the event type and the cognitive state before the occurrence of the corresponding stimulus event. The baseline frequency when the event type is not limited is then subtracted to obtain the population significance score of each candidate cognitive dimension. The group saliency scores are individually rescored and normalized to obtain the individual saliency vectors of each candidate cognitive dimension, and the cognitive dimension with the largest weight is determined as the dominant cognitive dimension.

4. The method according to claim 3, characterized in that, The step of determining candidate cognitive dimensions from the cognitive dimensions based on the number of cognitive dimensions included in the candidate dimension set includes: If the candidate dimension set contains only one cognitive dimension, then the cognitive dimension is determined as the candidate cognitive dimension; If the candidate dimension set contains multiple cognitive dimensions, then the cognitive dimension with the lowest marginal frequency of state transition under the condition that the cognitive states are the same before the occurrence of the stimulus event is selected as the candidate cognitive dimension.

5. The method according to claim 3, characterized in that, The process of performing personalized rescoring and normalization on the group saliency scores to obtain personalized saliency vectors for each candidate cognitive dimension includes: By using a large language model combined with the target user's local interaction trajectory and reverse attribution reasons, the group saliency score is re-scored in a personalized way to obtain personalized scores for each candidate cognitive dimension. The personalized scores are normalized to obtain the personalized saliency vectors for each of the candidate cognitive dimensions.

6. The method according to claim 5, characterized in that, The construction of the cognitive reasoning path based on the dominant cognitive dimension includes: The target user's historical response trajectory, the current stimulus event, the cognitive state transition relationship, the actual response to the current stimulus event, and the personalized saliency vector are input into the large language model. Reverse reasoning is performed on each cognitive dimension within the cognitive state to obtain the labeled reasoning path. Decompose the labeled reasoning path to obtain reasoning fragments for each of the cognitive dimensions; The reasoning segments are scored and filtered, and then recombined to obtain the cognitive reasoning path.

7. The method according to claim 6, characterized in that, The progressive internalization training of the cognitive reasoning path to obtain the trained generative model includes: Based on the historical response trajectory, the current stimulus event, the personalized salience vector, and the cognitive state, the cognitive parameters are updated by reasoning about each of the cognitive dimensions through the cognitive reasoning path to obtain the first parameter; The reasoning segments other than the dominant cognitive dimension are removed. Based on the historical response trajectory, the current stimulus event, the personalized salience vector, and the cognitive state, the dominant cognitive dimension is reasoned through the reasoning segments of the dominant cognitive dimension in the cognitive reasoning path. The second parameter is then updated based on the first parameter. The cognitive reasoning path and the personalized saliency vector are removed, and reasoning is performed based on the historical response trajectory, the current stimulus event, and the cognitive state. The third parameter is then updated based on the second parameter. The generative model is obtained based on the third parameter.

8. A device for generating anthropomorphic responses from social media users based on cognitive state modeling, characterized in that, The device includes: The data acquisition module is used to acquire the target user's historical response trajectory, current stimulus event, actual response to the current stimulus event, and multiple historical stimulus events in the historical response trajectory; The dimensional analysis module is used to determine the dominant cognitive dimension among multiple cognitive dimensions based on the historical response trajectory, the current stimulus event, the actual response to the current stimulus event, and the multiple historical stimulus events. The path construction module is used to construct cognitive reasoning paths based on the dominant cognitive dimension. The model training module is used to progressively internalize the cognitive reasoning path to obtain the trained generative model. The response generation module is used to generate a human-like response based on the trained generation model, according to the new historical response trajectory of the target user and the stimulus event.

9. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the social media user anthropomorphic reply generation method based on cognitive state modeling as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the social media user anthropomorphic response generation method based on cognitive state modeling as described in any one of claims 1 to 7.