AI interaction-based personalized knowledge graph dialogue generation method for the elderly

By integrating multi-dimensional information and generating dynamic dialogues based on personalized knowledge graphs for the elderly, this study solves the problem of a spiral deterioration in psychological state caused by the mutual reinforcement of role loss and loneliness in AI interaction, and provides a personalized psychological support dialogue solution.

CN121658617BActive Publication Date: 2026-04-21HUNAN WOMENS UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN WOMENS UNIV
Filing Date
2026-02-06
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing AI-interactive dialogue systems for the elderly have failed to effectively identify and alleviate the spiraling deterioration of their psychological state caused by the mutual reinforcement of role loss and loneliness, and have been unable to effectively intervene in dialogues using the personalized knowledge graphs of the elderly.

Method used

By reading role transition event records from the personalized knowledge graph of the elderly, a feature template of role loss is generated. Combined with the analysis of dialogue text during AI interaction, the assessment results of role loss and loneliness are calculated. The Granger causality test algorithm is used to analyze the coupling relationship between the two, generate a personalized spiral blocking intervention plan, dynamically adjust the dialogue generation strategy, and output continuous personalized psychological support dialogue.

Benefits of technology

It enables the identification and intervention of the spiral deterioration of the psychological state of the elderly. The generated psychological support dialogue content is matched with the elderly’s family background, role transition experience and emotional needs. It can adjust the direction and intensity of intervention based on real-time emotional response, overcoming the shortcomings of static dialogue systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658617B_ABST
    Figure CN121658617B_ABST
Patent Text Reader

Abstract

This invention relates to the field of personalized intelligent dialogue and digital companionship technology for the elderly, and discloses a method for generating personalized knowledge graph dialogues for the elderly based on AI interaction. The method includes: reading role transition event records from the family structure subgraph of the elderly's personalized knowledge graph to generate a role loss feature template; obtaining recent AI dialogue initiation records during late-night hours, statistically analyzing the number of consecutive late-night dialogues, average dialogue duration, and frequency of proactive communication to generate loneliness level labels; generating personalized spiral blocking intervention plans based on spiral intensity coefficients and spiral type labels; and executing the collaborative psychological support dialogue script to generate dialogues and output a continuous personalized psychological support dialogue sequence. This invention addresses the technical challenge of generating effective intervention dialogues using personalized knowledge graphs when role loss and loneliness reinforce each other in AI-interactive elderly dialogue services, leading to a spiral deterioration of the psychological state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of personalized intelligent dialogue and digital companionship technology for the elderly, and more specifically, to a method for generating personalized knowledge graph dialogues for the elderly based on AI interaction. Background Technology

[0002] With the arrival of an aging society, the demand for intelligent companionship and emotional exchange among the elderly is growing. AI interaction technology provides the elderly with new ways of dialogue services, enabling natural language interaction between humans and machines through AI-driven dialogue systems. In AI interaction scenarios, the elderly, after experiencing role transitions within the family (such as from caregiver to cared-for, from family decision-maker to observer), simultaneously face feelings of role loss and loneliness due to reduced social interaction. These two negative emotions influence and reinforce each other in daily life. Especially at night, the loneliness is particularly intense for elderly people living alone or lacking companionship, and loneliness further deepens their nostalgia for past roles and feelings of loss, creating a vicious cycle.

[0003] In AI-based interactive dialogue services for the elderly, a complex mutually reinforcing effect exists between role loss and loneliness: after role transitions, the elderly reduce social activities due to the loss of their original social functions, leading to an accumulation of loneliness; while the persistent loneliness makes the elderly more immersed in nostalgia for their past roles, reinforcing the sense of loss. Existing AI dialogue systems, when generating dialogues using knowledge graphs, treat loneliness relief and role adaptation support as separate issues, failing to fully utilize the multi-dimensional information in the elderly's personalized knowledge graphs for correlation analysis. This makes it difficult to identify the coupling relationship between the two, hindering the generation of effective intervention dialogues in the early stages of the spiral effect, leading to a continuous deterioration of the elderly's mental state. Summary of the Invention

[0004] This invention provides a method for generating personalized knowledge graph dialogues for the elderly based on AI interaction, which solves the technical problem in related technologies where the psychological state spirals down due to the reinforcing effects of role loss and loneliness in AI-interactive dialogue services for the elderly, making it difficult to use personalized knowledge graphs to generate effective intervention dialogues.

[0005] This invention provides a method for generating personalized knowledge graph dialogues for the elderly based on AI interaction, including:

[0006] The system reads role transition event records from the family structure subgraph of the personalized knowledge graph of the elderly, queries the typical manifestations of loss of this type of transition from the psychological adaptation knowledge base of role transition, and generates a role loss feature template.

[0007] Acquire a collection of recent dialogue texts of elderly people during AI interaction, and use the aforementioned role loss feature template to perform semantic matching and sentiment analysis on text fragments involving family relationships and self-worth, calculate the role loss intensity score, and generate role loss assessment results;

[0008] The system obtains records of AI conversations initiated by elderly people during recent late-night hours, counts the number of consecutive late-night conversations, average conversation duration, and frequency of proactive self-expression, and uses a loneliness accumulation assessment algorithm to calculate a loneliness accumulation index and generate loneliness level labels.

[0009] Align the time series of the assessment results of role loss with the time series of the assessment results of loneliness, use the Granger causality test algorithm to analyze the lead-lag relationship between the two, calculate the mutual reinforcement coefficient, and generate the role loss-loneliness spiral intensity coefficient and spiral type label.

[0010] Based on the spiral intensity coefficient and spiral type label, a combination of intervention strategies targeting the spiral effect is selected from the psychological intervention strategy library to generate a personalized spiral blocking intervention plan;

[0011] Based on the weighting of the personalized spiral blocking intervention program, the loneliness relief dialogue material sequence and the role value reconstruction dialogue material are interwoven and arranged to generate a collaborative psychological support dialogue script.

[0012] The collaborative psychological support dialogue script is executed to generate dialogues. The dialogue generation strategy is dynamically adjusted according to the real-time emotional response of the elderly, and a continuous personalized psychological support dialogue sequence is output.

[0013] Furthermore, the calculation of the character's sense of loss intensity rating includes:

[0014] The semantic similarity between the semantic vector of the dialogue text fragment and the semantic vector of each expression mode in the character's sense of loss feature template is calculated using cosine similarity to obtain the semantic matching degree.

[0015] A method combining an emotion dictionary and a deep learning model was used to identify the negative emotion polarity and its intensity in text.

[0016] The semantic matching degree, negative emotion intensity value and corresponding expression mode weight coefficient of each matched dialogue text fragment are weighted and summed to obtain the character's sense of loss intensity score.

[0017] Furthermore, the calculation of the cumulative loneliness index includes:

[0018] The number of consecutive late-night conversations is normalized to obtain the first normalized value.

[0019] The average conversation duration is normalized to obtain the second normalized value;

[0020] The frequency of proactive confiding is normalized to obtain a third normalized value;

[0021] The first, second, and third normalized values ​​are multiplied by their respective weighting coefficients and then summed to obtain the cumulative loneliness index.

[0022] The sum of the weighting coefficients is equal to 1.

[0023] Furthermore, the Granger causality test algorithm is used to analyze the lead-lag relationship between the two, including:

[0024] For the time series of character loss and loneliness, regression models containing both self-lag and other-lag terms are established respectively.

[0025] The first Granger causality test statistic is obtained by determining whether the coefficient of the causal relationship between role loss and loneliness is significantly non-zero through the F-test.

[0026] The second Granger causality test statistic is obtained by determining whether the coefficient of the causal relationship between loneliness and role loss is significantly non-zero through the F-test.

[0027] The intensity coefficient of the role loss-loneliness spiral is equal to the square root of the product of the first Granger causality test statistic and the second Granger causality test statistic.

[0028] Furthermore, the spiral type label is determined based on a combination of causal relationship directions, including:

[0029] When the causal relationship is significant in both directions, it is labeled as bidirectional reinforcement.

[0030] When only the causal relationship between role loss and loneliness is significant, it is marked as role loss-dominant type;

[0031] When only loneliness has a significant causal relationship with the sense of loss of the character, it is marked as loneliness-dominant;

[0032] When the causal relationship in both directions is not significant, it is marked as an independent fluctuation type.

[0033] Furthermore, the weighting of the combined intervention strategies is dynamically adjusted based on the spiral type label:

[0034] For a two-way reinforcing spiral, the role value reconstruction strategy, social promotion strategy, and emotional guidance strategy should be balanced in proportion.

[0035] For the character loss-dominated spiral, increase the weight of the character value reconstruction strategy;

[0036] For the loneliness-dominant spiral, increase the weight of social facilitation strategies and emotional support strategies.

[0037] Furthermore, the arrangement of dialogue material sequences for alleviating loneliness and dialogue material for rebuilding character value includes:

[0038] Based on loneliness level labels, matching topic categories are selected from the companion dialogue topic library, positive emotional nodes and their related content that match the candidate topics are extracted from the elderly’s personalized knowledge graph, and sorted using a topic coherence assessment algorithm to generate a sequence of loneliness relief dialogue materials.

[0039] Based on the current adaptation stage label, select the corresponding role adaptation support strategy from the dialogue strategy library, extract the areas and success cases where the elderly can play a value in the new role from the elderly's personalized knowledge graph, and generate dialogue materials for role value reconstruction.

[0040] The dialogue coherence optimization algorithm is used to adjust the order and connection of materials. The dialogue coherence optimization algorithm is based on the semantic relevance and emotional transition smoothness between adjacent dialogue materials.

[0041] Furthermore, dynamically adjusting the dialogue generation strategy based on the elderly's real-time emotional responses includes:

[0042] Real-time emotional responses are obtained by analyzing elderly people's dialogue responses, including text emotional polarity, response positivity, and topic engagement.

[0043] When a negative shift in the emotional response of older adults is detected, reduce the depth of the current topic, switch to a lighter topic, and increase the proportion of empathetic expressions.

[0044] Furthermore, it also includes:

[0045] After completing one round of intervention dialogue, a reassessment time point is set, and the updated role loss assessment results, loneliness assessment results, and spiral intensity coefficient are obtained again at the reassessment time point;

[0046] When the helical strength coefficient falls below the warning threshold multiple times consecutively, reduce the intervention frequency.

[0047] When the helical strength coefficient rebounds, the enhanced intervention process is triggered.

[0048] This invention provides a personalized knowledge graph dialogue generation system for the elderly based on AI interaction, comprising:

[0049] The role loss assessment module is used to read role transition event records from the personalized knowledge graph of the elderly, generate role loss feature templates, and perform semantic matching and sentiment analysis on the dialogue text of the elderly to generate role loss assessment results.

[0050] The loneliness assessment module is used to obtain records of AI conversations initiated by the elderly late at night, calculate the cumulative loneliness index, and generate loneliness level labels.

[0051] The spiral detection module is used to align the time sequence of the role loss assessment results with the time sequence of the loneliness assessment results, and use the Granger causality test algorithm to analyze the coupling relationship between the two to generate the role loss-loneliness spiral intensity coefficient and spiral type label.

[0052] The intervention plan generation module is used to select combined intervention strategies from the psychological intervention strategy library based on the spiral intensity coefficient and spiral type label to generate a personalized spiral blocking intervention plan.

[0053] The dialogue script generation module is used to interweave and arrange dialogue materials for loneliness relief and dialogue materials for role value reconstruction according to the weight ratio of the intervention plan, and generate collaborative psychological support dialogue scripts.

[0054] The dialogue execution module is used to execute collaborative psychological support dialogue scripts, dynamically adjust the dialogue generation strategy based on the elderly’s real-time emotional responses, and output a continuous personalized psychological support dialogue sequence.

[0055] The beneficial effects of this invention are as follows:

[0056] This invention overcomes the limitations of treating role adaptation and loneliness relief as independent issues and ignoring their mutually reinforcing effects by quantitatively assessing the intensity coefficient of the role loss-loneliness spiral and analyzing the two-dimensional coupling relationship based on Granger causality tests. This enables the system to identify the spiral deterioration trend of the psychological state of the elderly.

[0057] This invention overcomes the problem that general dialogue generation cannot adapt to individual differences among the elderly by integrating multi-dimensional information based on the elderly’s personalized knowledge graph and arranging dialogue materials driven by a personalized spiral blocking intervention program. This makes the generated psychological support dialogue content match the elderly’s family background, role transition experience and emotional needs.

[0058] This invention overcomes the problem that static dialogue scripts cannot adapt to changes in the emotional state of the elderly by monitoring emotional responses in real time during AI interaction and adjusting dynamic dialogue generation strategies, enabling the dialogue system to flexibly adjust the direction and intensity of intervention based on the elderly’s immediate feedback.

[0059] Therefore, this invention addresses the technical challenge of generating effective intervention dialogues using personalized knowledge graphs when the psychological state spirals down due to the reinforcing effects of role loss and loneliness in AI-based interactive dialogue services for the elderly. Attached Figure Description

[0060] Figure 1This is a flowchart of a personalized knowledge graph dialogue generation method for the elderly based on AI interaction, according to the present invention.

[0061] Figure 2 This is a bar chart illustrating the 30-day trend of role loss and loneliness according to the present invention.

[0062] Figure 3 This is a bar chart illustrating the multi-dimensional contribution analysis of the loneliness accumulation index of this invention;

[0063] Figure 4 This invention is a heatmap of textual analysis of the sense of loss in characters.

[0064] Figure 5 This is a bar chart comparing the improvement in psychological state before and after the intervention of this invention;

[0065] Figure 6 This is the structure and relationship diagram of the personalized knowledge graph for the elderly in this invention;

[0066] Figure 7 This is a scatter matrix diagram of the coherence of dialogue material arrangement and the smoothness of emotional transition in this invention. Detailed Implementation

[0067] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0068] At least one embodiment of the present invention discloses a method for generating personalized knowledge graph dialogues for the elderly based on AI interaction, such as... Figure 1 As shown, it includes the following steps:

[0069] Step 100: Obtain information on role transition events and role loss characteristic templates for the elderly.

[0070] Family structure information, role labels, and role transition event records are retrieved from the family structure subgraph of the personalized knowledge graph of the elderly to obtain the transition type, occurrence time, and information of the family members involved. Based on the role transition event records, typical manifestations of loss and adaptation stage characteristics of this type of transition are queried from the role transition psychological adaptation knowledge base to generate role loss characteristic templates and adaptation reference frameworks.

[0071] It should be noted that the aforementioned role transition events include, but are not limited to, the following types: from primary caregiver to caregiver, from family breadwinner to dependent, from family decision-maker to observer, and from leaving a professional role to taking a home-based role. The role loss characteristic template contains typical semantic expression patterns corresponding to various role transitions, including nostalgic expressions of past roles, negative expressions of current roles, and expressions of questioning self-worth.

[0072] In one application example, for Mr. Zhang (72 years old, a retired teacher), an elderly user using an AI dialogue system, the system retrieved the following information from the family structure subgraph of his personalized knowledge graph: Mr. Zhang experienced the death of his spouse 6 months ago, subsequently transitioning from the primary caregiver to being cared for by his son. The family members involved include his son, Zhang Moumou, and his daughter-in-law, Li Mou. Based on the transition type of "from primary caregiver to being cared for," the system retrieved typical expressions of loss for this type of transition from the role transition psychological adaptation knowledge base. The generated role loss feature template contained three semantic expression patterns: nostalgic expressions (e.g., "I used to take care of them all the time," "I managed the household my whole life"), negative expressions (e.g., "Now I can't do anything," "I've become a burden"), and questioning expressions (e.g., "What's the point of living?" "I don't want to be a burden to my children"). The adaptation reference framework shows that the typical adaptation period for this type of role transition is 6 to 18 months.

[0073] Step 200: Analyze the dialogue text of the elderly and generate the assessment results of role loss.

[0074] We acquire recent dialogue texts of elderly people during AI interaction, and use role loss feature templates to perform semantic matching and sentiment analysis on text fragments involving themes such as family relationships, self-worth, and nostalgia for past roles. We calculate the intensity score of role loss and generate role loss assessment results and current adaptation stage labels.

[0075] Furthermore, the time window for the aforementioned "recent dialogue texts" is defined as dialogue records that trace back 7 days from the current moment. This time window is set based on the cyclical characteristics of changes in the psychological state of the elderly. The 7-day window can capture the emotional fluctuation patterns of the elderly within a complete cycle.

[0076] It should be noted that the semantic matching described above employs a text similarity calculation method based on a pre-trained language model, calculating the cosine similarity between the semantic vectors of the dialogue text fragments and the semantic vectors of each expression pattern in the character's sense of loss feature template. Sentiment analysis combines a sentiment lexicon with a deep learning model to identify the negative sentiment polarity and intensity in the text. Character sense of loss intensity rating. The calculation formula is:

[0077]

[0078] in, For the first The semantic vectors of the matched dialogue text fragments. This is the semantic vector of the corresponding character's sense of loss feature template. The cosine similarity function is used. This represents the negative sentiment intensity value of the text fragment. These are the weighting coefficients for this type of expression pattern. The number of text segments matched.

[0079] Furthermore, weighting coefficients The range of values ​​is And satisfy the constraints. Due to the cosine similarity function The range of values ​​is When the calculation result is negative, it indicates a negative correlation between semantic vectors. In this case, the text fragment is judged as a mismatch and is not included in the cumulative calculation of the character's sense of loss intensity score. Since only cumulative calculation is performed... Text fragments, The valid range of values ​​is , combined and Character's sense of loss intensity rating The range of values ​​is .

[0080] The current adaptation stage labels are determined based on the stage division criteria defined in the adaptation reference framework, including the denial stage, anger stage, negotiation stage, depression stage, and acceptance stage.

[0081] Furthermore, the determination of the current adaptation phase is based on the intensity rating of the character's sense of loss. The degree of matching with the feature templates of each stage was determined. Specifically, semantic similarity was calculated between the dialogue text fragments and the typical expression templates of each adaptation stage, and the stage with the highest similarity was selected as the label for the current adaptation stage. Among them, the typical expression features of the denial stage are avoiding topics related to role change or denying the facts of the change; the typical expression features of the anger stage are complaining about family members or the environment; the typical expression features of the negotiation stage are conditional acceptance or bargaining expressions; the typical expression features of the depression stage are pessimistic emotions and denial of self-worth; and the typical expression features of the acceptance stage are rational cognition and a willingness to actively adjust.

[0082] In the aforementioned application example, the system obtained a collection of AI dialogue texts from Zhang over the past 7 days and identified 4 text fragments related to the sense of loss of the character.

[0083] Table 1. Results of the analysis of Zhang's sense of role loss in the dialogue text fragment:

[0084]

[0085] According to the formula Calculate the intensity of a character's sense of loss: By matching each text fragment with the adaptation stage template, the system found that expressions such as "my son thinks I'm causing trouble" had the highest similarity to the self-worth denial characteristics of the depressive period, and determined that Zhang was currently in the depressive adaptation stage.

[0086] The aforementioned pre-trained language model employs a Transformer-based text encoder. The input layer receives segmented dialogue text fragments, converts word units into vector representations through a word embedding layer, and then superimposes positional encoding vectors. The encoder contains multiple Transformer encoding blocks, each consisting of a multi-head self-attention layer and a feedforward neural network layer. The calculation formula for the multi-head self-attention layer is:

[0087]

[0088] in, , , These are the query matrix, key matrix, and value matrix, respectively, obtained from the input vector through a linear transformation. Let be the dimension of the key vector. This represents the transpose. The output layer takes the hidden state vector at the beginning of the sequence as the semantic vector representation of the text segment. The pre-trained language model is pre-trained using a masked language modeling task, fine-tuned on a character loss corpus, uses the cross-entropy loss function, and employs the Adam optimization algorithm for parameter updates.

[0089] The deep learning model used in the aforementioned sentiment analysis is a bidirectional long short-term memory network. The input layer receives a sequence of word embedding vectors from the text. ,in The sequence length is given. A bidirectional LSTM layer processes the input sequence along the forward and reverse directions, respectively, where the LSTM unit at time [time value missing]. The internal calculation process is as follows:

[0090] Forget gate control vector:

[0091] Input gate control vector:

[0092] Candidate cell state vector:

[0093] Cell status update:

[0094] Output gate control vector:

[0095] Hidden state output:

[0096] in, The sigmoid activation function is defined as follows: ; Let hyperbolic tangent activation function be defined as follows: ; This is an element-wise multiplication operation; , , , This is the weight matrix; , , , It is the bias vector; This represents the concatenated vector of the hidden state from the previous time step and the current input.

[0097] A forward LSTM processes the input sequence from front to back in time steps to obtain a forward hidden state sequence. The inverse LSTM processes the input sequence from back to front time step by time step to obtain the inverse hidden state sequence. The forward and reverse hidden states are concatenated to obtain a bidirectional representation. The output layer is a fully connected layer that maps the concatenated hidden state at the final time step to an emotion polarity category probability vector and an emotion intensity value. For the emotion polarity category probability vector, the argmax function is used to select the category index with the highest probability as the predicted emotion polarity category; the emotion intensity value is constrained to the [0,1] interval by the sigmoid activation function and serves as the normalized negative emotion intensity value. It is directly used for subsequent calculation of the intensity of character loss. The bidirectional long short-term memory network adopts a supervised learning mode, is trained using sentiment-annotated corpus, and the loss function is a weighted sum of the cross-entropy loss of sentiment polarity classification and the mean squared error loss of sentiment intensity regression. The Adam optimization algorithm is used for parameter updates.

[0098] Figure 4 This demonstrates the semantic similarity distribution of different expression modes (nostalgic expressions, negative expressions, and questioning expressions) in different dialogue text fragments.

[0099] Step 300: Analyze the late-night conversations of the elderly to generate loneliness assessment results.

[0100] The system obtains recent records of AI dialogues initiated by elderly people during late night hours (22:00-06:00), counts the number of consecutive late night dialogues, average dialogue duration, and frequency of proactive confiding, calculates the loneliness accumulation index using a loneliness accumulation assessment algorithm, and generates loneliness level labels and late night loneliness behavior feature vectors.

[0101] It should be noted that the above-mentioned algorithm for assessing the cumulative degree of loneliness is based on a comprehensive evaluation of multi-dimensional features of late-night conversation behavior. (Loneliness Cumulative Index) The calculation formula is:

[0102]

[0103] in, This is the normalized value of the number of consecutive late-night conversations. This is the normalized value of the average conversation duration. This is a normalized value for the frequency of proactively sharing information. , , The weight coefficients for each dimension satisfy... .

[0104] Furthermore, the statistical time window for "recent late-night hours" is defined as late-night conversation records dating back 14 days from the current moment. The specific values ​​for the weighting coefficients are... , , The weighting coefficient ratio reflects the dominant role of the number of consecutive late-night conversations in the accumulation of loneliness, while also taking into account the auxiliary role of conversation duration and frequency of confiding.

[0105] The original data for the three dimensions mentioned above have different dimensions (number of days, duration, and frequency), and need to be normalized preprocessed to eliminate the difference in dimensions. Specifically, for the number of consecutive late-night conversations and the average conversation duration, the range normalization method is used to map the original values ​​to the [0,1] interval; for the frequency of proactive confiding, the proportion of confiding speech is calculated based on the total number of late-night conversations, and its value itself is within the [0,1] interval, and is directly used as the normalized value.

[0106] Furthermore, the identification of confessional discourse is based on the semantic features and sentence structure of the dialogue text. Specifically, a dialogue text is identified as confessional discourse when it meets one of the following conditions: the text length exceeds 1.5 times the average dialogue length; the text contains first-person subjects and emotional vocabulary; the text describes personal experiences, feelings, or distress in declarative sentences. The identification of confessional discourse is achieved through a pre-trained text classification model, with the input being a fragment of dialogue text and the output being a binary label for the confessional discourse.

[0107] The loneliness level labels are based on a threshold of the cumulative loneliness index, and include three levels: mild loneliness, moderate loneliness, and severe loneliness.

[0108] Furthermore, due to , , All values ​​are normalized, and their range is [value range missing]. And the weighting coefficients satisfy Therefore, the cumulative loneliness index The range of values ​​is The thresholds for different levels of loneliness are as follows: when... At that time, it was determined to be mild loneliness; when At that time, it was determined to be moderate loneliness; when At that time, it was determined to be severe loneliness.

[0109] In the aforementioned application example, the system retrieved Zhang's AI dialogue initiation records during late-night hours (22:00-06:00) over the past 14 days. The raw behavioral data is as follows: 9 consecutive days of late-night dialogues, a total dialogue duration of 385 minutes (an average of 42.8 minutes per dialogue), and a total of 156 rounds of dialogue, including 68 rounds of verbal expression. The system's normalization parameter is set as follows: the range of consecutive late-night dialogue days is... The range of average conversation duration is [number]. Minutes. Based on this, the normalized values ​​for each dimension are calculated: , , The system generates feature vectors of lonely behavior at night. .

[0110] According to the formula Calculate the cumulative loneliness index: .because The system determined that Zhang's loneliness level was severe.

[0111] Figure 3 Three dimensions that represent the cumulative loneliness index: number of consecutive late-night conversations ( (weight α=0.4), average dialogue duration ( (Weight β=0.3), frequency of proactively confiding ( (Weight γ = 0.3).

[0112] Step 400: Detect the coupling relationship between the character's sense of loss and loneliness, and generate the character's loss-loneliness spiral intensity coefficient.

[0113] Align the time series of the character loss assessment results with the time series of the loneliness assessment results, use the Granger causality test algorithm to analyze the lead-lag relationship between the two, calculate the mutual reinforcement coefficient, and generate the character loss-loneliness spiral intensity coefficient and spiral type label.

[0114] It should be noted that the Granger causality test algorithm described above is used to determine whether changes in role loss can predict changes in loneliness, and whether changes in loneliness can predict changes in role loss. Before conducting the test, the time series of role loss intensity ratings and the time series of loneliness cumulative indexes are respectively subjected to Z-score standardization to eliminate the influence of the scale difference between the two series on the regression coefficients.

[0115] Furthermore, the time series was constructed using daily frequency sampling, with the role loss intensity score and loneliness accumulation index calculated daily as the daily observations. The time window length used for the Granger causality test was set to 30 days, meaning that 30 consecutive observation points were used to construct the time series. and .

[0116] Specifically, for the standardized time sequence of role loss Loneliness Time Sequence The following regression models are established respectively:

[0117]

[0118]

[0119] in, The lag order is... , For constant terms, , , , For regression coefficients, , This is the error term. The coefficient is determined using the F-test. and Whether it is significantly non-zero, thus determining the direction and strength of the causal relationship.

[0120] Furthermore, the error term and It satisfies the white noise assumption, i.e., the mean is 0, the variance is constant, and the errors at each time point are independent. Regression coefficients , , , It is estimated using ordinary least squares and its value range is the real number field. .

[0121] Furthermore, lag order The value range is positive integers, and its specific value is determined based on the sampling frequency of the time series data and the lag characteristics of changes in the psychological state of the elderly. When daily frequency sampling is used... The range of values ​​is The significance level used in the F-test. Set to 0.05, when the p-value of the F-test is less than... When the causal relationship in the corresponding direction is determined to be significant.

[0122] Character Loss - Lonely Spiral Intensity Coefficient Strength calculation based on bidirectional causality:

[0123]

[0124] in, Granger causality test statistic for the relationship between a character's sense of loss and loneliness. Granger causality test statistic for loneliness on role loss.

[0125] Furthermore, the Granger causality test statistic This is the F-distribution test statistic, and its range is... To achieve the optimal helical strength coefficient Comparable, for and Mapping is performed using the sigmoid function: ,in This is the scaling factor, with a value of 5. After mapping... ,and then .

[0126] Spiral type labels are determined based on the combination of causal relationship directions, including: bidirectional reinforcement type (causal relationship is significant in both directions), role loss dominant type (only the causal relationship between role loss and loneliness is significant), loneliness dominant type (only the causal relationship between loneliness and role loss is significant), and independent fluctuation type (causal relationship is not significant in either direction).

[0127] In this embodiment, to more accurately capture the dynamic evolution characteristics of the spiral effect, the changing trend of the spiral intensity coefficient is also calculated. Specifically, linear regression is performed on the spiral intensity coefficient sequence calculated over multiple consecutive time windows to obtain the trend slope. When the trend slope is positive and exceeds a preset threshold, it indicates that the spiral effect is intensifying, and the intervention priority needs to be increased.

[0128] Furthermore, a preset threshold for the trend slope. The threshold is set to 0.1, meaning that an intervention priority increase is triggered when the trend slope is greater than 0.1. The preset threshold for the trend slope is based on the following: within the standardized range of the character's loss-loneliness spiral intensity coefficient, a slope greater than 0.1 indicates that the character's loss-loneliness spiral intensity coefficient increases by more than 10% within a unit time window, which is a significantly aggravated trend.

[0129] In the aforementioned application example, the system constructed a time-series sequence of Zhang's role loss intensity ratings over 30 consecutive days. Time series of loneliness accumulation index The two sequences were then Z-score standardized. The lag order was used. Granger causality test was performed, and the results are as follows: F-statistic of role loss on the direction of loneliness. The corresponding p-value is 0.0008; the F-statistic of loneliness in the direction of character loss. The corresponding p-value is 0.0021. Since the p-values ​​in both directions are less than the significance level of 0.05, the two-way causal relationship is determined to be significant. A sigmoid mapping is applied to the F-statistic: , According to the formula Calculate the helical strength coefficient: Since the causal relationships in both directions are significant, the system determines that Zhang's spiral type label is "bidirectional reinforcement type".

[0130] Figure 2 This shows the temporal changes of the role loss intensity score (S_role) and loneliness accumulation index (I_lonely) of an elderly user, Zhang, over a continuous 30-day period.

[0131] Step 500: Based on the spiral detection results, generate a personalized spiral blockade intervention plan.

[0132] Based on the numerical value, trend of change, and spiral type label of the spiral intensity coefficient, a combination of intervention strategies targeting the spiral effect is selected from the psychological intervention strategy library, including the weight ratio of role value reconstruction strategy, social promotion strategy, and emotional guidance strategy, to generate a personalized spiral blocking intervention plan.

[0133] It should be noted that the weighting of the above combined intervention strategies is dynamically adjusted according to the spiral type label. For a two-way reinforcement spiral, the three strategies are balanced; for a role loss-dominated spiral, the weighting of the role value reconstruction strategy is increased; for a loneliness-dominated spiral, the weighting of the social facilitation strategy and the emotional support strategy is increased.

[0134] Furthermore, the specific weighting ratios for each helix type are as follows: For bidirectional reinforcing helices, ;

[0135] For the character loss-dominated spiral For the loneliness-dominated spiral, For independent undulating spirals, weights are dynamically allocated based on the ratio of the current character's sense of loss intensity score to the accumulated loneliness index. When the character's sense of loss intensity score is high, the weights are increased. When the cumulative loneliness index is high, it increases. and .

[0136] Personalized spiral blockade intervention programs include the following components: - Intervention strategy weight vector - This indicates the weighting of the three strategies: role value reconstruction, social promotion, and emotional support; - The intervention intensity level is determined based on the spiral intensity coefficient, including three levels: preventive intervention, routine intervention, and intensive intervention; - The intervention timing recommendation is determined based on the active dialogue periods and emotional state fluctuation patterns of the elderly.

[0137] Furthermore, each weight component in the intervention strategy weight vector satisfies the following constraints: ,and The threshold classification for intervention intensity levels is based on the spiral intensity coefficient. Confirmed: When When necessary, preventative interventions should be adopted; when When, routine intervention is used; when In such cases, intensive intervention should be adopted.

[0138] In the aforementioned application example, Zhang's spiral type label is "bidirectional reinforcement type," and the system selects a balanced intervention strategy weight vector based on this type: .because The intervention intensity level was determined to be "intensive intervention." System analysis of Zhang's historical active dialogue periods revealed that his dialogue frequency was highest and emotional fluctuations were most pronounced between 10:00 PM and 11:30 PM. Therefore, the intervention timing was suggested to be initiated daily at 9:30 PM to preventatively address the peak of loneliness. The generated personalized spiral blocking intervention plan includes: an intervention strategy weight vector. The intervention intensity level is intensive intervention, and the intervention time is 21:30 daily.

[0139] Step 600: Generate a collaborative psychological support dialogue script.

[0140] Based on loneliness level labels, matching topic categories are selected from a predefined companionship dialogue topic library. Positive emotional nodes matching candidate topics and their associated content are extracted from the elderly's personalized knowledge graph. These are then ranked using a topic coherence assessment algorithm to generate a personalized loneliness-alleviation dialogue material sequence. Based on the current adaptation stage label and adaptation support needs, corresponding role adaptation support strategies are selected from a dialogue strategy library. Areas where the elderly can contribute value in new roles and successful cases are extracted from the elderly's personalized knowledge graph to generate personalized role value reconstruction dialogue material.

[0141] The dialogue material sequence for loneliness relief and the dialogue material for role value reconstruction are interwoven and arranged according to the weight ratio of the personalized spiral blocking intervention plan. The dialogue coherence optimization algorithm is used to adjust the order and connection of the materials to generate a collaborative psychological support dialogue script.

[0142] It should be noted that the input to the above topic coherence assessment algorithm is a set of candidate dialogue topics and the topic vectors corresponding to each topic. The output is a sequence of topics sorted in descending order of coherence score. The topic coherence assessment algorithm calculates the cosine similarity between each candidate topic vector and the positive sentiment node vector in the personalized knowledge graph of the elderly as the topic matching degree, calculates the cosine similarity between adjacent topic vectors as the topic transition smoothness, and uses the weighted sum of the two as the coherence score for sorting.

[0143] Furthermore, the identification of positive sentiment nodes in the personalized knowledge graph for the elderly is based on the sentiment polarity attribute of the nodes. During the knowledge graph construction phase, a sentiment analysis model is used to calculate the sentiment polarity score for each content node; nodes with a sentiment polarity score greater than 0 are labeled as positive sentiment nodes. Thematic coherence scoring is also included. The calculation formula is: ,in For topic matching degree, For the smoothness of the theme transition, The balancing factor is 0.6, which indicates that topic relevance dominates the coherence score.

[0144] The aforementioned dialogue coherence optimization algorithm employs a greedy strategy for sequence optimization. The input to the algorithm consists of a set of dialogue materials for loneliness relief, a set of dialogue materials for role value reconstruction, and weighting constraints for intervention strategies. The output is the optimized sequence of interwoven dialogue materials. Starting with the initial material, the algorithm selects the material with the highest semantic relevance and satisfying the weighting constraints from the candidate materials as the next material, until all materials are arranged. Semantic relevance is obtained by calculating the cosine similarity of the topic vectors of adjacent materials, and emotional transition smoothness is obtained by calculating the difference in emotional polarity between adjacent materials. The optimization objective is to maximize the overall dialogue script coherence score while satisfying the weighting constraints of the intervention strategies.

[0145] Furthermore, the objective function for optimizing dialogue coherence is defined as: ,in The total number of dialogue materials. For the first Vector representation of each material, The cosine similarity function is used. For the smoothness function of emotional transition, The balance coefficient is set to 0.3. Emotional transition smoothness function. ,in and The first The and the first The sentiment polarity score of each material, with a value range of [value range missing]. , The range of values ​​is A larger value indicates a smoother emotional transition between adjacent elements. The constraints are: , , ,in , , The quantities of the three types of materials are respectively. The tolerance threshold is set to 0.1.

[0146] In this embodiment of the application, to avoid the abruptness of the dialogue, the material transitions in the dialogue script use natural transitional statements. For the transition point from the theme of loneliness relief to the theme of role value reconstruction, a related guiding statement is used, such as "Speaking of which, it reminds me of what you mentioned earlier..."; for the transition point from the theme of role value reconstruction to the theme of emotional guidance, an emotionally resonant statement is used, such as "These experiences are indeed very precious, how do you feel now...".

[0147] In the aforementioned application example, based on Zhang's level of loneliness (severe loneliness) and current adaptation stage (depressed period), the system selected three theme categories from the companionship dialogue theme library: "Sharing Warm Memories," "Family Emotional Connection," and "Exchange of Interests." Positive emotional nodes extracted from Zhang's personalized knowledge graph included: teaching achievements in his teaching career, deep teacher-student relationships, calligraphy hobby and awards, and memories of accompanying his grandson's growth. The system also extracted areas from the knowledge graph where Zhang could contribute value in his new role: tutoring his grandson (utilizing his teaching expertise), sharing life wisdom and educational experience, and guiding a community senior calligraphy class.

[0148] The system allocates weights according to intervention strategies. The materials are interwoven and arranged to generate a collaborative psychological support dialogue script containing nine dialogue material units.

[0149] Table 2. Material arrangement sequence of the collaborative psychological support dialogue script:

[0150]

[0151] The script contains 3 character value reconstruction materials, 3 loneliness relief materials, and 3 emotional guidance materials, with the actual allocation being: Matching with target weights All deviations are within the tolerance threshold. Within the range.

[0152] Figure 7 This demonstrates the distribution of the two dimensions of "similarity to the previous material" and "smoothness of emotional transition" for each material unit in the collaborative psychological support dialogue script.

[0153] Step 700: Execute the dialogue script and output a continuous personalized psychological support dialogue sequence.

[0154] During AI interaction, a collaborative psychological support dialogue script is executed to generate dialogues. The dialogue generation strategy is dynamically adjusted based on the elderly’s real-time emotional response. Intervention records and effect feedback are written into the psychological health subgraph of the elderly’s personalized knowledge graph, and the continuous personalized psychological support dialogue sequence and spiral state update results are output.

[0155] It should be noted that the acquisition of the aforementioned real-time emotional responses is achieved by analyzing the emotional characteristics of the elderly's dialogue responses, including the emotional polarity of the text, the responsiveness (response speed and response length), and topic engagement (whether they actively extend the topic). When a negative shift in the elderly's emotional response is detected, the dialogue generation strategy is dynamically adjusted, including reducing the depth of the current topic, switching to a more relaxed topic, and increasing the proportion of empathetic expressions.

[0156] Furthermore, responsiveness Quantization calculations are based on two dimensions: response speed and response length. ,in This is the actual response time. The maximum waiting time threshold, In response to text length, This represents the historical average response length. The value is set to 120 seconds; responses exceeding the maximum waiting time threshold are considered negative responses. When the response speed component is zero, the response speed component is zero. The range of values ​​is ,when This was judged as a negative shift in emotional response. (Topic engagement) The determination is based on whether the reply text contains new topic elements: when the reply text contains entities, events, or viewpoints related to the current topic but not mentioned in the system's comments, it is determined as an active extension of the topic. ;otherwise .

[0157] Intervention records include conversation duration, type of intervention strategy used, a summary of conversation content, and emotional response scores of the older adults. Effectiveness feedback is calculated based on changes in role loss intensity scores and cumulative loneliness index before and after the intervention.

[0158] Further, performance feedback rating The calculation formula is: ,in and The ratings for the intensity of role loss before and after the intervention are: and These represent the cumulative loneliness index before and after the intervention. The range of values ​​is ,when The value indicates that the intervention is effective; the larger the value, the better the intervention effect. This indicates that the intervention was ineffective or had a negative effect. When the denominator is 0, the corresponding component takes the value of 0.

[0159] In this embodiment, to achieve sustained psychological support, the system sets a reassessment time point after completing one round of intervention dialogue. At the reassessment time point, steps 200 to 400 are re-executed to obtain updated assessment results of role loss, loneliness, and spiral intensity coefficient, thereby evaluating the intervention effect and adjusting subsequent intervention plans. When the spiral intensity coefficient falls below the warning threshold multiple times consecutively, the intervention frequency can be reduced; when the spiral intensity coefficient rebounds, a reinforced intervention process is triggered.

[0160] Furthermore, the review time points are set at 24 hours, 72 hours, and 168 hours after the end of the intervention dialogue, corresponding to short-term effect assessment, medium-term effect assessment, and long-term effect assessment, respectively. Warning threshold. Set to 0.3, when the character's Lost-Lonely Spiral intensity coefficient is... When the value is below the warning threshold, it indicates that the spiral effect is under control. The criterion for multiple consecutive assessments is that the conditions are met in three consecutive reassessments.

[0161] In the aforementioned application example, the system initiated a dialogue with Mr. Zhang at 21:30, executing a collaborative psychological support dialogue script. When executing the third material unit (the sense of accomplishment from tutoring his grandson), Mr. Zhang replied, "My grandson isn't good at math. Last week I taught him word problems, and he finally got it! He jumped for joy!" The response time was 8 seconds, the text length was 35 characters, and he proactively extended the topic with details of the lesson. The system calculated the responsiveness. A value of 1.0, the upper limit, is considered a positive response. Topic engagement. (Actively extending the topic). Based on this, the system determines that the current dialogue material has triggered positive emotional feedback and continues to execute the original dialogue strategy.

[0162] When executing the 6th material unit (exchanging feelings about current life adaptation), Zhang's response became "Sigh, what's the use of saying all this?", with a response time of 45 seconds and a text length of 9 characters. The system calculates the responsiveness: .Although The negative shift judgment was not triggered, but the text sentiment polarity detection was negative (sentiment score -0.62). The system dynamically adjusted its strategy, reduced the depth of the current topic, and transitioned to the more relaxed topic of the 7th material unit (calligraphy hobby and creation sharing) ahead of time.

[0163] After the dialogue, the system wrote the intervention record into Zhang's personalized knowledge graph mental health subgraph. At the 168-hour reassessment point, the system recalculated Zhang's mental state assessment results.

[0164] Table 3 Comparison of psychological state assessment results before and after intervention:

[0165]

[0166] Calculated based on the performance feedback scoring formula: .because The system determines that the intervention is effective. Based on the review results, the system adjusts the intervention intensity level from "intensive intervention" to "routine intervention" and updates the strategy weighting of subsequent intervention plans.

[0167] Figure 5The study demonstrates the changes in psychological state indicators at three review time points: 24 hours, 72 hours, and 168 hours, after implementing collaborative psychological support dialogue intervention on user Zhang.

[0168] Figure 6 This demonstrates the overall structure of a personalized knowledge graph for older adults, including subgraphs on family structure, social relationships, and mental health. Figure 3 Large module.

[0169] This implementation overcomes the limitation of treating role adaptation and loneliness relief as independent issues and ignoring their mutual reinforcement effect by quantitatively assessing the intensity coefficient of the role loss-loneliness spiral and analyzing the two-dimensional coupling relationship based on Granger causality test. This enables the system to identify the spiral deterioration trend of the elderly's psychological state.

[0170] This implementation overcomes the problem that general dialogue generation cannot adapt to individual differences among the elderly by integrating multi-dimensional information based on the elderly’s personalized knowledge graph and arranging dialogue materials driven by personalized spiral blocking intervention programs. It makes the generated psychological support dialogue content match the elderly’s family background, role transition experience and emotional needs.

[0171] This implementation overcomes the problem that static dialogue scripts cannot adapt to changes in the emotional state of the elderly by monitoring emotional responses in real time during AI interaction and adjusting dynamic dialogue generation strategies, enabling the dialogue system to flexibly adjust the direction and intensity of intervention based on the elderly’s immediate feedback.

[0172] Therefore, this implementation addresses the technical challenge of generating effective intervention dialogues using personalized knowledge graphs when the psychological state spirals down due to the reinforcing effects of role loss and loneliness in AI-based interactive dialogue services for the elderly.

[0173] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for generating personalized knowledge graph dialogues for the elderly based on AI interaction, characterized in that, Includes the following steps: The system reads role transition event records from the family structure subgraph of the personalized knowledge graph of the elderly, queries the typical manifestations of loss of this type of transition from the psychological adaptation knowledge base of role transition, and generates a role loss feature template. The system acquires a collection of recent dialogue texts of elderly people during AI interaction, uses the aforementioned role loss feature template to perform semantic matching and sentiment analysis on text fragments involving family relationships and self-worth, calculates role loss intensity scores, and generates role loss assessment results. The system obtains records of AI conversations initiated by elderly people during recent late-night hours, counts the number of consecutive late-night conversations, average conversation duration, and frequency of proactive communication, and uses a loneliness accumulation assessment algorithm to calculate a loneliness accumulation index and generate loneliness level labels. The calculation of the cumulative loneliness index includes: The number of consecutive late-night conversations is normalized to obtain the first normalized value. The average conversation duration is normalized to obtain the second normalized value; The frequency of proactive confiding is normalized to obtain a third normalized value; The first, second, and third normalized values ​​are multiplied by their respective weighting coefficients and then summed to obtain the cumulative loneliness index. Wherein, the sum of the weighting coefficients is equal to 1; Align the time series of the assessment results of role loss with the time series of the assessment results of loneliness, use the Granger causality test algorithm to analyze the lead-lag relationship between the two, calculate the mutual reinforcement coefficient, and generate the role loss-loneliness spiral intensity coefficient and spiral type label. Based on the spiral intensity coefficient and spiral type label, a combination of intervention strategies targeting the spiral effect is selected from the psychological intervention strategy library to generate a personalized spiral blocking intervention plan; Based on the weighting of the personalized spiral blocking intervention program, the loneliness relief dialogue material sequence and the role value reconstruction dialogue material are interwoven and arranged to generate a collaborative psychological support dialogue script. The collaborative psychological support dialogue script is executed to generate dialogues. The dialogue generation strategy is dynamically adjusted according to the real-time emotional response of the elderly, and a continuous personalized psychological support dialogue sequence is output.

2. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 1, characterized in that, The calculation of the character's sense of loss intensity score includes: The semantic similarity between the semantic vector of the dialogue text fragment and the semantic vector of each expression mode in the character's sense of loss feature template is calculated using cosine similarity to obtain the semantic matching degree. A method combining an emotion dictionary and a deep learning model was used to identify the negative emotion polarity and its intensity in text. The semantic matching degree, negative emotion intensity value and corresponding expression mode weight coefficient of each matched dialogue text fragment are weighted and summed to obtain the character's sense of loss intensity score.

3. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 1, characterized in that, The analysis of the lead-lag relationship between the two using the Granger causality test algorithm includes: For the time series of character loss and loneliness, regression models containing both self-lag and other-lag terms are established respectively. The first Granger causality test statistic is obtained by determining whether the coefficient of the causal relationship between role loss and loneliness is significantly non-zero through the F-test. The second Granger causality test statistic is obtained by determining whether the coefficient of the causal relationship between loneliness and role loss is significantly non-zero through the F-test. The intensity coefficient of the role loss-loneliness spiral is equal to the square root of the product of the first Granger causality test statistic and the second Granger causality test statistic.

4. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 1, characterized in that, The spiral type label is determined based on a combination of causal relationship directions, including: When the causal relationship is significant in both directions, it is labeled as bidirectional reinforcement. When only the causal relationship between role loss and loneliness is significant, it is marked as role loss-dominant type; When only loneliness has a significant causal relationship with the sense of loss of the character, it is marked as loneliness-dominant; When the causal relationship in both directions is not significant, it is marked as an independent fluctuation type.

5. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 4, characterized in that, The weighting of the combined intervention strategies is dynamically adjusted based on the spiral type label: For a two-way reinforcing spiral, the role value reconstruction strategy, social promotion strategy, and emotional guidance strategy should be balanced in proportion. For the character loss-dominated spiral, increase the weight of the character value reconstruction strategy; For the loneliness-dominant spiral, increase the weight of social facilitation strategies and emotional support strategies.

6. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 1, characterized in that, The method of interweaving and arranging dialogue material sequences for alleviating loneliness with dialogue material for reconstructing character value includes: Based on loneliness level labels, matching topic categories are selected from the companion dialogue topic library, positive emotional nodes and their related content that match the candidate topics are extracted from the elderly's personalized knowledge graph, and sorted using a topic coherence assessment algorithm to generate a sequence of loneliness relief dialogue materials. The topic coherence assessment algorithm calculates the cosine similarity between each candidate topic vector and the positive emotion node vector in the personalized knowledge graph of the elderly as the topic matching degree, calculates the cosine similarity between adjacent topic vectors as the topic transition smoothness, and uses the weighted sum of the two as the coherence score for ranking. Based on the current adaptation stage label, select the corresponding role adaptation support strategy from the dialogue strategy library, extract the areas and success cases where the elderly can play a value in the new role from the elderly's personalized knowledge graph, and generate dialogue materials for role value reconstruction. The dialogue coherence optimization algorithm is used to adjust the order and connection of materials. The dialogue coherence optimization algorithm is based on the semantic relevance and emotional transition smoothness between adjacent dialogue materials. Emotional transition smoothness function ,in and The first The and the first The emotional polarity score of each material; The dialogue coherence optimization algorithm starts with the initial material and selects the material with the highest semantic relevance to the current material and which meets the weight ratio constraint from the candidate materials as the next material, until all materials are arranged. The semantic relevance is obtained by calculating the cosine similarity of the topic vectors of adjacent materials.

7. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 1, characterized in that, The strategy for dynamically adjusting dialogue generation based on the real-time emotional responses of the elderly includes: Real-time emotional responses are obtained by analyzing elderly people's dialogue responses, including text emotional polarity, response positivity, and topic engagement. When a negative shift in the emotional response of older adults is detected, reduce the depth of the current topic, switch to a lighter topic, and increase the proportion of empathetic expressions.

8. The method for generating personalized knowledge graph dialogues for the elderly based on AI interaction according to claim 1, characterized in that, Also includes: After completing one round of intervention dialogue, a reassessment time point is set, and the updated role loss assessment results, loneliness assessment results, and spiral intensity coefficient are obtained again at the reassessment time point; When the helical strength coefficient falls below the warning threshold multiple times consecutively, reduce the intervention frequency. When the helical strength coefficient rebounds, the enhanced intervention process is triggered.

9. A personalized knowledge graph dialogue generation system for the elderly based on AI interaction, used to execute the personalized knowledge graph dialogue generation method for the elderly based on AI interaction as described in any one of claims 1-8, characterized in that, include: The role loss assessment module is used to read role transition event records from the personalized knowledge graph of the elderly, generate role loss feature templates, and perform semantic matching and sentiment analysis on the dialogue text of the elderly to generate role loss assessment results. The loneliness assessment module is used to obtain records of AI conversations initiated by the elderly late at night, calculate the cumulative loneliness index, and generate loneliness level labels. The spiral detection module is used to align the time sequence of the role loss assessment results with the time sequence of the loneliness assessment results, and use the Granger causality test algorithm to analyze the coupling relationship between the two to generate the role loss-loneliness spiral intensity coefficient and spiral type label. The intervention plan generation module is used to select combined intervention strategies from the psychological intervention strategy library based on the spiral intensity coefficient and spiral type label to generate a personalized spiral blocking intervention plan. The dialogue script generation module is used to interweave and arrange dialogue materials for loneliness relief and dialogue materials for role value reconstruction according to the weight ratio of the intervention plan, and generate collaborative psychological support dialogue scripts. The dialogue execution module is used to execute collaborative psychological support dialogue scripts, dynamically adjust the dialogue generation strategy based on the elderly’s real-time emotional responses, and output a continuous personalized psychological support dialogue sequence.

Citation Information

Patent Citations

  • Old people loneliness comprehensive management system and method based on mobile phone APP

    CN120564971A

  • User emotion recognition and psychological intervention system and method based on large language model

    CN120764557A