A Smart Dialogue Method and System for Elderly Companionship Based on User Profiles

By using multimodal data analysis and frequent pattern mining, user profile vectors and interaction sequences are generated. Combined with TF-IDF and pre-trained language models, the problem of insufficient user feature representation in existing technologies is solved, and the interaction patterns of the elderly are accurately captured and personalized dialogue is achieved.

CN120998202BActive Publication Date: 2026-01-30KUAISHANGYUN (SHANGHAI) NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511525378.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-30
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing intelligent dialogue methods for elderly companionship fail to combine deep indicators such as heart rate variability, walking ratio, and application usage frequency to construct comprehensive features, resulting in insufficient dimensions of user feature representation, lack of structured mining of interaction sequences, difficulty in capturing the regularity of daily interaction patterns of the elderly, and lack of in-depth analysis based on prefix trees or frequent pattern sets, leading to inaccurate extraction of long-term interaction habits and potential intentions.

Method used

By collecting multimodal data, calculating user features and generating user profile vectors, constructing interaction sequences and prefix trees, extracting candidate pattern sets, calculating support and similarity, generating frequent pattern sets, and combining TF-IDF vectors and pre-trained language models to generate dialogue sentences, intelligent dialogue is achieved.

Benefits of technology

It enhances the ability to capture long-term interactive behavior patterns of the elderly, improves the accuracy of intent inference and the personalization of dialogue, and enhances the interpretability and authenticity of the intelligent companionship system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120998202B_ABST
    Figure CN120998202B_ABST
Patent Text Reader

Abstract

This invention discloses a user profile-based intelligent dialogue method and system for elderly companionship, belonging to the field of intelligent interaction technology. The method includes calculating user features based on multimodal data, concatenating them into a user profile vector, generating a frame sequence from speech, calculating interaction feature vectors, constructing an interaction sequence, generating a prefix tree, extracting all paths, calculating support, and generating a candidate pattern set. It also extracts the intent label corresponding to each pattern in the candidate pattern set, generates a frequent pattern set, calculates similarity, generates associated intent labels and confidence scores, extracts frequency features from the user profile vector, concatenates them into interest feature sub-vectors, calculates joint utility, and selects the maximum value as the optimal intent. This invention enhances the ability to capture long-term interaction behavior patterns of the elderly by combining prefix trees and frequent pattern mining with interaction sequence clustering, and improves the accuracy of intent inference by combining interest utility and matching utility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent interaction technology, and in particular to an intelligent dialogue method and system for elderly companionship based on user profiles. Background Technology

[0002] With the accelerating aging of society, intelligent companionship technology has gradually become an important research direction for both academia and industry. The widespread adoption of intelligent wearable devices and intelligent interactive systems has made it technically feasible to provide health monitoring and emotional support based on multimodal data. In the field of intelligent dialogue, early systems mainly relied on keyword matching or template library retrieval, which made it difficult to achieve personalized interaction. With the development of natural language processing, speech analysis, and user profiling technologies, intelligent companionship systems based on semantic understanding have gradually emerged, which can provide relatively natural dialogue feedback to a certain extent based on the user's historical behavior and interests.

[0003] Existing intelligent dialogue methods for elderly companionship still have shortcomings. Most systems only perform simple normalization or threshold judgment on raw sensor data, failing to combine deep indicators such as heart rate variability, walking ratio, and application usage frequency to construct comprehensive features. This results in insufficient dimensions of user feature representation. Existing methods lack structured mining of interaction sequences, making it difficult to capture the regularity of daily interaction patterns of the elderly. They also lack in-depth analysis based on prefix trees or frequent pattern sets, leading to inaccurate extraction of long-term interaction habits and potential intentions. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a method and system for intelligent dialogue for elderly companionship based on user profiles. It solves the problem that most systems only perform simple normalization or threshold judgment on raw sensor data, and fail to combine deep indicators such as heart rate variability, walking ratio, and application usage frequency to construct comprehensive features, resulting in insufficient dimensions of user feature representation. Existing methods lack structured mining of interaction sequences, making it difficult to capture the regularity of the daily interaction patterns of the elderly. They also lack in-depth analysis based on prefix trees or frequent pattern sets, resulting in inaccurate extraction of long-term interaction habits and potential intentions.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an intelligent dialogue method for elderly companionship based on user profiles, comprising,

[0008] Collect and preprocess multimodal data, calculate user features based on multimodal data, concatenate them into user profile vectors, generate frame sequences from speech, calculate interaction feature vectors, construct interaction sequences, generate prefix trees, extract all paths, calculate support, and generate candidate pattern sets.

[0009] Extract the intent label corresponding to each pattern in the candidate pattern set, generate a frequent pattern set, calculate the similarity, generate associated intent labels and confidence, extract frequency features from the user profile vector, concatenate them into interest feature sub-vectors, calculate the joint utility, and select the maximum value as the optimal intent.

[0010] Extract the text corresponding to the optimal intent, convert it into a TF-IDF vector, calculate the semantic score, generate the final comparison fragment, load the pre-trained language model to generate dialogue sentences, and conduct intelligent dialogue with the elderly.

[0011] As a preferred embodiment of the intelligent dialogue method for elderly companionship based on user profiles described in this invention, the steps of constructing interaction sequences, generating prefix trees, extracting all paths, calculating support, and generating candidate pattern sets include:

[0012] User features are calculated based on multimodal data, and user features are concatenated into user profile vectors using vector concatenation.

[0013] The audio is sorted chronologically to generate a frame sequence;

[0014] The phase space vector is constructed for the frame sequence using the delayed coordinate method, and the Lyapunov exponent and fractal dimension are calculated based on the phase space vector.

[0015] Calculate short-time energy based on frame sequences;

[0016] The Lyapunov exponent, fractal dimension, and short-time energy are concatenated into a frame feature vector, and the mean is calculated and defined as the interaction feature vector.

[0017] Collect historical interaction data and construct interaction sequences;

[0018] K-means clustering is used to cluster the interaction feature vectors in the interaction sequence to generate state triples and construct a quantized interaction sequence.

[0019] Initialize an empty prefix tree with an empty root node. Insert the state triples of the interaction sequence into the tree in chronological order. Each node stores the triples, edges represent time transitions, and nodes record the occurrence counts to generate the prefix tree.

[0020] The prefix tree is traversed using a depth-first search to extract all paths, the support is calculated, and the support is filtered by a threshold to generate a candidate pattern set.

[0021] As a preferred embodiment of the intelligent dialogue method for elderly companionship based on user profiles described in this invention, the step of extracting the intent tag corresponding to each pattern in the candidate pattern set, generating a frequent pattern set, calculating similarity, and generating associated intent tags and confidence scores includes:

[0022] For each pattern in the candidate pattern set, extract the corresponding intent label from historical interaction data based on the timestamp of the quantized interaction sequence to generate a frequent pattern set;

[0023] The sliding window method is used to set a time window, and the interaction records within the time window are selected from the interaction sequence, sorted in ascending order of timestamp, to generate a recent interaction feature set;

[0024] Extract the interaction feature vectors corresponding to the recent interaction feature set, add them to the recent interaction feature set, and generate subsequences;

[0025] K-means clustering is used to cluster the recent interaction feature vector machine in the subsequence to generate state triples and construct quantized subsequences;

[0026] Based on each pattern and quantized subsequence in the frequent pattern set, the similarity is calculated, the pattern with the highest similarity is selected, and the corresponding associated intent label is obtained.

[0027] Calculate the confidence score based on similarity.

[0028] As a preferred embodiment of the intelligent dialogue method for elderly companionship based on user profiles described in this invention, the calculation of joint utility and selection of the maximum value as the optimal intent includes:

[0029] Extract frequency features from user profile vectors, concatenate them into interest feature sub-vectors, and calculate the interest utility of intent.

[0030] The interaction data corresponding to the associated intent tags and interest tags are converted into TF-IDF vectors, and the cosine similarity is calculated and defined as the matching utility of the intent.

[0031] Calculate the mean of interest utility and matching utility to obtain the joint utility, and select the maximum value as the optimal intention.

[0032] As a preferred embodiment of the intelligent dialogue method for elderly companionship based on user profiles described in this invention, the step of extracting the text corresponding to the optimal intent, converting it into a TF-IDF vector, calculating the semantic score, and generating the final comparison segment includes:

[0033] Extract the text corresponding to the optimal intent, convert it into a TF-IDF vector, and calculate the semantic similarity with the text fragment;

[0034] Segments with a similarity greater than a similarity threshold are selected to form a subset of candidate segments;

[0035] Extract each candidate segment from the candidate segment subset and calculate its semantic score;

[0036] The dialogue segment with the highest semantic score is selected as the final comparison segment.

[0037] As a preferred embodiment of the intelligent dialogue method for elderly companionship based on user profiles described in this invention, the step of loading a pre-trained language model to generate dialogue sentences and engaging in intelligent dialogue with the elderly includes:

[0038] Extract the text corresponding to the final comparison segment, load the pre-trained language model, and generate dialogue sentences;

[0039] Convert dialogue sentences into speech to enable intelligent conversations with the elderly.

[0040] As a preferred embodiment of the intelligent dialogue method for elderly companionship based on user profiles described in this invention, the step of collecting and preprocessing multimodal data includes:

[0041] Multimodal data of the elderly is collected through smart bracelets and smartphones, and then denoised and normalized.

[0042] The multimodal data includes heart rate interval, step count, sleep duration, walking time, awake time, device usage frequency, voice, and interaction data.

[0043] Secondly, this invention provides a user profile-based intelligent dialogue method system for elderly companionship, comprising:

[0044] The data collection and processing module is used to collect multimodal data of the elderly and perform noise reduction and normalization processing.

[0045] The user profile clustering module is used to calculate user features, concatenate them into user profile vectors, generate state triples through K-means clustering, construct a prefix tree, and generate a candidate pattern set.

[0046] The intent matching module is used to extract and filter intent tags from candidate patterns, optimize intent inference by calculating interest utility and matching utility, and select the optimal intent for response.

[0047] The semantic scoring module is used to filter candidate text fragments, select the most matching dialogue fragments based on semantic similarity and semantic score, and conduct intelligent dialogue.

[0048] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the intelligent dialogue method for elderly companionship based on user profiles as described in the first aspect of the present invention.

[0049] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the intelligent dialogue method for elderly companionship based on user profiles as described in the first aspect of the present invention.

[0050] The beneficial effects of this invention are as follows: This invention enhances the ability to capture the long-term interactive behavior patterns of the elderly by combining prefix trees and frequent pattern mining with interaction sequence clustering, and improves the accuracy of intent inference by combining interest utility and matching utility. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a flowchart of the intelligent dialogue method for elderly companionship based on user profiles in Example 1;

[0053] Figure 2 This is a schematic diagram of the intelligent dialogue system for elderly companionship based on user profiles in Example 1. Detailed Implementation

[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0055] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0056] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0057] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a smart dialogue method for elderly companionship based on user profiles, including the following steps:

[0058] S1. Collect multimodal data and preprocess it. Calculate user features based on the multimodal data, concatenate them into user profile vectors, generate frame sequences from the speech, calculate interaction feature vectors, construct interaction sequences, generate prefix trees, extract all paths, calculate support, and generate candidate pattern sets.

[0059] Specifically, collecting and preprocessing multimodal data includes:

[0060] Multimodal data of the elderly is collected through smart bracelets and smartphones, and then denoised and normalized.

[0061] The multimodal data includes heart rate interval, step count, sleep duration, walking time, awake time, device usage frequency, voice, and interaction data.

[0062] Multidimensional data breaks through the limitations of traditional single-modal profiling, enabling user profiles to not only contain static information but also reflect dynamic changes. Data preprocessing eliminates environmental noise and scale differences, enhances the stability of feature vectors, and is conducive to improving reliability in subsequent pattern mining.

[0063] Furthermore, an interaction sequence is constructed, a prefix tree is generated, all paths are extracted, support is calculated, and a candidate pattern set is generated, including:

[0064] Calculate user characteristics based on multimodal data;

[0065] The standard deviation of the heart rate interval is calculated and defined as heart rate variability, then normalized to generate the HRV feature, using the following formula:

[0066] ,

[0067] in HRV characteristics For heart rate variability, The median of heart rate variability;

[0068] Step count and sleep characteristics are calculated using constraint functions, as shown in the formula:

[0069] ,

[0070] ,

[0071] in For step count features, As a sleep characteristic, and For the constraint function, and These are the normalized upper bounds for step count and sleep duration, respectively. and These are the number of steps taken and the duration of sleep in the last 24 hours, respectively.

[0072] The percentage of walking time is calculated based on walking time and waking time using the following formula:

[0073] ,

[0074] in The percentage of walking time. Walking time, For waking time;

[0075] The application usage frequency is calculated based on the number of times the device is used, using the following formula:

[0076] ,

[0077] in For the frequency of use of the o-th application, For the number of times the o-th application is used, This represents the normalized upper limit for the number of uses.

[0078] The walking time percentage and application usage frequency are defined as walking time percentage feature and application usage frequency feature respectively using the direct assignment method.

[0079] Collect tagged historical interaction data, convert it into text data and perform text cleaning, and calculate word vectors. For each tag, manually define an initial keyword vector set, calculate the intersection of each word vector with the initial keyword set, and assign topic tags to obtain an annotated corpus. The formula is:

[0080] ,

[0081] ,

[0082] ,

[0083] in This represents the size of the intersection of the word vector set and the keyword vector set. For the first The initial keyword vector set for each interest tag. For the first The word vector set of the text, For the first Subtext topic tags For annotating corpus, For the number of texts;

[0084] The TF-IDF vector of the interaction data is calculated using the TF-IDF method. Word vectors are extracted from the keyword set in the annotated corpus, cosine similarity is calculated, and interest labels are assigned. The formula is as follows:

[0085] ,

[0086] in For the first Interest tags assigned during each interaction. and The first The TF-IDF vector of the nth interaction and the nth Word vectors of the secondary keyword set Cosine similarity;

[0087] Count the frequency of each interest tag, normalize it, and generate frequency features using the following formula:

[0088] ,

[0089] in Frequency features of interest tags For interest tag data, For the first Interest tags assigned in each interaction;

[0090] The user features are concatenated into a user profile vector using vector concatenation. The formula is as follows:

[0091] ,

[0092] Where F is the user profile vector. and These are the characteristics of walking time percentage and application usage frequency, respectively.

[0093] The audio is sorted chronologically to generate a frame sequence;

[0094] The phase space vector for the frame sequence is constructed using the delayed coordinate method, and the formula is as follows:

[0095] ,

[0096] in Let be the phase space vector of the i-th frame. For the audio data of the i-th frame, The delay time is determined by the autocorrelation function. is the start time of the i-th frame;

[0097] Based on the phase space vector, the Lyapunov exponent and fractal dimension are calculated using the following formula:

[0098] ,

[0099] ,

[0100] ,

[0101] in The Lyapunov index, The total number of trajectory points. Let be the phase space vector of the j-th frame. for The nearest neighbor vector, For correlation integrals, the proportion of phase space vector point pairs with a distance less than r is calculated, reflecting the distance distribution of phase space vector point pairs, where r is the distance threshold. Let be the phase space vector of the k-th frame. For the Heaviside function, Where j is the fractal dimension and k is the vector index;

[0102] Based on the frame sequence, the short-time energy is calculated using the following formula:

[0103] ,

[0104] in Let i be the short-time energy of the i-th frame. This represents the number of intra-frame sampling points. This represents the value of the nth sampling point in the i-th frame, corresponding to the speech data, where n is the sampling point index;

[0105] The Lyapunov exponent, fractal dimension, and short-time energy are concatenated into a frame feature vector, and the mean is calculated and defined as the interaction feature vector, as shown in the formula:

[0106] ,

[0107] ,

[0108] in Let i be the feature vector of the i-th frame. Here, M represents the interaction feature vector, and M represents the number of frames.

[0109] Collect historical interaction data and construct an interaction sequence using the following formula:

[0110] ,

[0111] in It is an interaction sequence, containing interaction feature vectors and timestamp pairs. For the first Second interaction timestamp This is an interactive index, where t is the current timestamp;

[0112] K-means clustering is used to cluster the interaction feature vectors in the interaction sequence to generate state triples, and the quantized interaction sequence is constructed using the following formula:

[0113] ,

[0114] in To quantify the interaction sequence, , as well as Let Lyapunov exponent, fractal dimension, and short-time energy be the quantized state label for the i-th interaction, and let represent the state triplet.

[0115] Initialize an empty prefix tree with an empty root node. Insert the state triples of the interaction sequence into the tree in chronological order. Each node stores the triples, edges represent time transitions, and nodes record the occurrence counts to generate the prefix tree.

[0116] We use a depth-first search to traverse the prefix tree, extract all paths, and each path represents a sequence of state triples. We then calculate the support using the following formula:

[0117] ,

[0118] in For path Support This represents the number of times the last node appears in the path. For all path sets, For any path in the set of all paths;

[0119] The support is thresholded to generate a candidate pattern set, using the following formula:

[0120] ,

[0121] in For the candidate pattern set, This is the support threshold.

[0122] This invention introduces a constraint function to map the values ​​to a reasonable range. This method avoids the interference of extreme values ​​on user profiles and ensures the balance between different features. Compared with simple keyword matching methods, TF-IDF, combined with the weight distribution in the corpus, can avoid interference from high-frequency but meaningless words, thus more accurately reflecting user interests. Combined with semantic similarity calculation (cosine similarity), it can achieve high-precision matching between interactive text and interest tags, improving the accuracy of interest profiles. By introducing dynamic features (Lyapunov exponent and fractal dimension), the speech signal is not only described as a spectrum or energy distribution, but also captures the dynamic evolution features of speech, combined with short-time energy... Computation can create a multi-faceted characterization of speech signals, including both energy information in the time domain and complex dynamic features, enabling more comprehensive speech modeling. The generated interactive feature vectors not only reflect the nature of a single speech interaction but also statistically capture the speech pattern preferences of the elderly, helping to improve the stability of subsequent intent recognition. Prefix trees can clearly display the temporal patterns of user interaction states while ensuring storage efficiency. By generating candidate pattern sets through support filtering, low-frequency patterns with strong randomness and high noise can be effectively filtered out, while retaining core behavioral patterns that are highly representative of the user profile. This not only improves the efficiency of pattern matching but also provides interpretability support for intelligent companion systems.

[0123] S2. Extract the intent label corresponding to each pattern in the candidate pattern set, generate a frequent pattern set, calculate the similarity, generate associated intent labels and confidence, extract frequency features from the user profile vector, concatenate them into interest feature sub-vectors, calculate the joint utility, and select the maximum value as the optimal intent.

[0124] Specifically, the intent tag corresponding to each pattern in the candidate pattern set is extracted, a frequent pattern set is generated, and similarity is calculated to generate associated intent tags and confidence scores, including:

[0125] For each pattern in the candidate pattern set, extract the corresponding intent tag from historical interaction data based on the timestamp of the quantized interaction sequence to generate a frequent pattern set, as shown in the formula:

[0126] ,

[0127] ,

[0128] in The intent label associated with the pattern path in the candidate pattern set. Extract the corresponding intent tags from historical interaction data. This represents the number of times the intent corresponding to the pattern appears. For frequent pattern sets, It is a frequent pattern sequence;

[0129] The sliding window method is used to set a time window, and the interaction records within the time window are selected from the interaction sequence, sorted in ascending order of timestamp, to generate a recent interaction feature set;

[0130] Extract the interaction feature vectors corresponding to the recent interaction feature set, add them to the recent interaction feature set, and generate a subsequence, as shown in the formula:

[0131] ,

[0132] in For subsequences, For recent interaction feature set, The recent interaction feature vector, Timestamps of recent interaction data;

[0133] K-means clustering is used to cluster the recent interaction feature vectors in the subsequence, generating state triples to construct the quantized subsequence, as shown in the formula:

[0134] ,

[0135] in For quantized subsequences, , as well as For the first The quantized state labels of the sub-interactions (Lyapunov exponent, fractal dimension, and short-time energy) represent state triples. and The first Secondary interaction feature vectors and time windows;

[0136] Based on each pattern and quantized subsequence in the frequent pattern set, the similarity is calculated using the following formula:

[0137] ,

[0138] in For sequence similarity, For the first A frequent pattern;

[0139] Select the pattern with the highest similarity and obtain the corresponding associated intent tag, using the following formula:

[0140] ,

[0141] Where I represents the associated intent label. For pattern index, For sequence similarity;

[0142] Based on similarity, the confidence score is calculated using the following formula:

[0143] ,

[0144] in , where is the confidence level.

[0145] Intent annotation enables the association of low-level state triple sequences with high-level semantic labels. By using a sliding window, interaction data within a specific time range can be extracted from the interaction sequence, ensuring the system's time sensitivity and dynamic perception of recent changes in the user's state. This avoids the lag caused by relying solely on long-term patterns and avoids relying solely on label statistics. Instead, it improves the real-time intent recognition accuracy through dynamic matching. Sequence similarity calculation can tolerate certain temporal perturbations, improving robustness to complex interactive behaviors. By selecting the maximum similarity, it ensures that the output results have the highest relevance to the user's recent state, reducing misjudgments.

[0146] Furthermore, the joint utility is calculated, and the maximum value is selected as the optimal intention, including:

[0147] Extract frequency features from the user profile vector, concatenate them into an interest feature sub-vector, and calculate the interest utility of the intent using the following formula:

[0148] ,

[0149] in For the first The interest utility of an intention Let u be the interest feature sub-vector. For the first Sub-vectors of secondary interest features;

[0150] The interaction data corresponding to the associated intent tags and interest tags are converted into TF-IDF vectors, and the cosine similarity is calculated, defined as the intent matching utility, with the formula as follows:

[0151] ,

[0152] in For the first The effectiveness of matching an intent. and The first The TF-IDF vectors of the i-th intention and the i-th intention;

[0153] Calculate the mean of interest utility and matching utility to obtain the joint utility, and select the maximum value as the optimal intention.

[0154] Interest utility characterizes users' long-term interest tendencies, while matching utility characterizes immediate semantic needs. The combination of the two forms a comprehensive metric that combines long-term and short-term needs. TF-IDF and cosine similarity methods can capture the semantic proximity between intent and interest, improving cross-modal semantic alignment capabilities. Through the mean mechanism of joint utility, the integration of interest preferences and immediate interaction is achieved.

[0155] S3. Extract the text corresponding to the optimal intent, convert it into a TF-IDF vector, calculate the semantic score, generate the final comparison segment, load the pre-trained language model to generate dialogue sentences, and conduct intelligent dialogue with the elderly; specifically, extract the text corresponding to the optimal intent, convert it into a TF-IDF vector, calculate the semantic score, and generate the final comparison segment, including:

[0156] Extract the text corresponding to the optimal intent, convert it into a TF-IDF vector, and calculate its semantic similarity to the text fragment. The formula is as follows:

[0157] ,

[0158] in The semantic similarity between the fragment and the optimal intent. For the i-th dialogue segment, For optimal intent indexing, and These are the TF-IDF vectors of the optimal intent and the dialogue segment, respectively;

[0159] Segments with similarity greater than a similarity threshold are selected to form a subset of candidate segments, using the following formula:

[0160] ,

[0161] in For a subset of candidate fragments, The similarity threshold;

[0162] Extract each candidate segment from the candidate segment subset and calculate its semantic score using the following formula:

[0163] ,

[0164] in The semantic score of the dialogue segment, The TF-IDF vector of the current intent label. The combined utility of the optimal intention;

[0165] The dialogue segment with the highest semantic score is selected as the final comparison segment.

[0166] The TF-IDF method can quantify the keyword weights in the text, ensuring semantic consistency between candidate segments and user intent. Through a similarity filtering mechanism, irrelevant segments that do not meet user needs are automatically excluded, improving corpus matching efficiency and ensuring that the final generated dialogue content is not only grammatically correct but also semantically aligned with the needs of elderly users. By introducing a joint utility parameter, the semantic score not only considers semantic similarity but also reflects the user's long-term interests and preferences, enabling the differentiation of semantically similar segments with significant differences in user interests, and prioritizing content with high interest matching.

[0167] Furthermore, a pre-trained language model is loaded to generate dialogue sentences for intelligent conversations with the elderly, including:

[0168] Extract the text corresponding to the final comparison segment, load a pre-trained language model (such as a BERT variant), and generate dialogue sentences;

[0169] Convert dialogue sentences into speech to enable intelligent conversations with the elderly.

[0170] Pre-trained language models possess powerful semantic modeling capabilities, enabling them to generate fluent, natural, and context-appropriate dialogue sentences. Compared to fixed templates, the models can generate sentences with different styles and expressions, avoiding repetition and a mechanical feel. Voice output can enhance the authenticity and intimacy of the interaction, allowing the elderly to feel accompanied.

[0171] This embodiment also provides a smart dialogue method system for elderly companionship based on user profiles, including:

[0172] The data collection and processing module is used to collect multimodal data of the elderly and perform noise reduction and normalization processing.

[0173] The user profile clustering module is used to calculate user features, concatenate them into user profile vectors, generate state triples through K-means clustering, construct a prefix tree, and generate a candidate pattern set.

[0174] The intent matching module is used to extract and filter intent tags from candidate patterns, optimize intent inference by calculating interest utility and matching utility, and select the optimal intent for response.

[0175] The semantic scoring module is used to filter candidate text fragments, select the most matching dialogue fragments based on semantic similarity and semantic score, and conduct intelligent dialogue.

[0176] This embodiment also provides a computer device applicable to the intelligent dialogue method for elderly companionship based on user profiles, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the intelligent dialogue method for elderly companionship based on user profiles as proposed in the above embodiment.

[0177] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0178] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the intelligent dialogue method for elderly companionship based on user profiles as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0179] In summary, this invention enhances the ability to capture long-term interactive behavior patterns of the elderly by combining prefix trees and frequent pattern mining with interaction sequence clustering, and improves the accuracy of intent inference by combining interest utility and matching utility.

[0180] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for an elderly companion intelligent conversation based on a user portrait, characterized in that: comprising, collecting multi-modal data and preprocessing, calculating user features based on multi-modal data, splicing into user portrait vectors, sorting the speech in multi-modal data in time sequence to generate frame sequences, calculating interaction feature vectors; constructing interaction sequences, generating prefix trees, extracting all paths, calculating support, and generating candidate pattern sets; extracting the intent labels corresponding to each pattern in the candidate pattern set, generating frequent pattern sets, calculating similarity, generating associated intent labels and confidence, extracting frequency features in the user portrait vector, splicing into interest feature sub-vectors, calculating joint utility, and selecting the maximum value as the optimal intent; extracting the text corresponding to the optimal intent, converting it into a TF-IDF vector, calculating a semantic score, generating the final comparison segment, loading a pre-trained language model to generate a dialogue sentence, and having an intelligent dialogue with the elderly; The construction of the interaction sequence, the generation of the prefix tree, the extraction of all paths, the calculation of the support, and the generation of the candidate pattern set comprise: calculating user features based on multi-modal data, and using vector splicing method to splice user features into user portrait vectors; sorting the speech in time sequence to generate frame sequences; using the delay coordinate method to construct phase space vectors for the frame sequences, and calculating Lyapunov exponents and fractal dimensions based on the phase space vectors; calculating short-time energy based on the frame sequences; splicing Lyapunov exponents, fractal dimensions, and short-time energy into frame feature vectors, and calculating the mean value as the interaction feature vector; collecting historical interaction data and constructing interaction sequences; using K-means clustering to cluster the interaction feature vectors in the interaction sequences to generate state triplets, constructing quantized interaction sequences, and the formula is: , wherein is a quantized interaction sequence, , and is the quantized state label of the ith interaction, respectively corresponding to the Lyapunov exponent, the fractal dimension and the short-time energy, representing the state triplet, is the ith frame feature vector, is the ith interaction timestamp, is the interaction index, is the interaction sequence; initializing an empty prefix tree, the root node is empty, inserting the state triplets of the interaction sequence into the tree in time sequence, each node stores a triplet, the edge represents time transition, and the node records the number of occurrences, and the prefix tree is generated; using depth-first search to traverse the prefix tree, extracting all paths, calculating support, and the formula is: , wherein is the support of the path is the number of occurrences of the path end node, is the number of occurrences of the path end node, is the set of all paths, is any path in the set of all paths; threshold filtering the support to generate a candidate pattern set; The extraction of the intent labels corresponding to each pattern in the candidate pattern set, the generation of the frequent pattern set, and the calculation of the similarity to generate the associated intent labels and the confidence comprise: for each pattern in the candidate pattern set, extracting the corresponding intent label from the historical interaction data according to the timestamp of the quantized interaction sequence, generating the frequent pattern set, and the formula is: , , wherein is an intent label associated with a pattern path in the candidate pattern set, is an intent label extracted from the historical interaction data, is a number of occurrences of the pattern corresponding to the intent, is a frequent pattern set, is a frequent pattern sequence; using the sliding window method to set a time window, selecting the interaction records within the time window from the interaction sequence, sorting them in ascending order of timestamp, and generating a recent interaction feature set; extracting the interaction feature vectors corresponding to the recent interaction feature set, adding the recent interaction feature set to generate a subsequence, and the formula is: , wherein is a subsequence, is a recent interaction feature set, is a recent interaction feature vector, is a recent interaction data timestamp; using K-means clustering to cluster the recent interaction feature vectors in the subsequence to generate state triplets and construct a quantized subsequence; calculating the similarity based on each pattern in the frequent pattern set and the quantized subsequence, and the formula is: , wherein is the sequence similarity, is the quantized sub-sequence, is the th frequent pattern; selecting the pattern with the maximum similarity to obtain the corresponding associated intent label; calculating the confidence based on the similarity; The calculation of the joint utility and the selection of the maximum value as the optimal intent comprise: Collect historical interaction data with labels, convert them into text data and perform text cleaning, and calculate word vectors, manually define an initial keyword vector set for each label, calculate the word vector intersection of each word vector with the initial keyword set, and assign a topic label to obtain a labeled corpus, the formula is: , , , wherein is the size of the intersection of the set of word vectors and the set of keyword vectors, is the initial set of keyword vectors for the interest label, is the set of word vectors for the text, is the topic label for the text, is the annotated corpus, is the number of texts; Use the TF-IDF method to calculate the TF-IDF vector of the interaction data, extract the word vector of the keyword set in the labeled corpus, calculate the cosine similarity, and assign an interest label, the formula is: , in For the first Interest tags assigned during each interaction. and The first The TF-IDF vector of the nth interaction and the nth Word vectors of the secondary keyword set Cosine similarity; Count the number of occurrences of each interest label and normalize it to generate a frequency feature, the formula is: , wherein is a frequency feature of the interest tag, is interest tag data, is an interest tag assigned for the nth interaction; Extract the frequency feature from the user portrait vector and concatenate it into an interest feature sub-vector to calculate the interest utility of the intent, the formula is: , wherein is the interest utility for the th intent, is the u-th interest feature sub-vector, is the th interest feature sub-vector; Convert the interaction data corresponding to the associated intent label and interest label into a TF-IDF vector, and calculate the cosine similarity, which is defined as the matching utility of the intent. Calculate the average of the interest utility and the matching utility to obtain the joint utility, and select the maximum value as the optimal intent. The text corresponding to the optimal intent is converted into a TF-IDF vector, and a semantic score is calculated to generate the final comparison segment, including: Extract the text corresponding to the optimal intent, convert it into a TF-IDF vector, and calculate the semantic similarity with the text segment of the labeled corpus, the formula is: , wherein is the semantic similarity of the segment to the optimal intent, is the i-th dialogue segment, is the optimal intent index, and are the TF-IDF vectors of the optimal intent and dialogue segment, respectively; Filter segments with a similarity greater than the similarity threshold to form a candidate segment subset. Extract each candidate segment in the candidate segment subset and calculate the semantic score, the formula is: , wherein is a semantic score for the dialogue segment, is a TF-IDF vector for the current intent label, is a joint utility for the optimal intent; Select the dialog segment with the maximum semantic score as the final comparison segment. 2.The user portrait-based smart conversation method for elderly companion, as claimed in claim 1, wherein: The pre-trained language model is loaded to generate a dialog sentence, and an intelligent conversation is conducted with the elderly, including: Extract the text corresponding to the final comparison segment, load the pre-trained language model, and generate a dialog sentence; Convert the dialog sentence into speech and conduct an intelligent conversation with the elderly. 3.The user portrait-based smart conversation method for elderly companion, as claimed in claim 1, wherein: The multi-modal data is collected and preprocessed, including: Collect multi-modal data of the elderly through intelligent bracelets and smartphones, and perform denoising and normalization processing; The multi-modal data includes heart rate interval, step count, sleep duration, walking time, wake-up time, device usage frequency, voice, and interaction data.

4. An elderly companion intelligent conversation system based on a user portrait, based on the elderly companion intelligent conversation method based on the user portrait of any one of claims 1-3, characterized in that: Including, The collection and processing module is used to collect multi-modal data of the elderly and perform denoising and normalization processing; The portrait clustering module is used to calculate user features, concatenate them into a user portrait vector, generate state triplets through K-means clustering, construct a prefix tree, and generate a candidate mode set; The matching intent module is used to extract and filter intent labels from candidate modes, optimize intent inference by calculating interest utility and matching utility, and select the optimal intent for response; The semantic score module is used to filter candidate text segments, select the most matching dialog segment based on semantic similarity and semantic score, and conduct an intelligent conversation.

5. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that: The processor executes the computer program to realize the steps of the user portrait-based elderly companion intelligent conversation method of any one of claims 1-3.

6. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to realize the steps of the user portrait-based elderly companion intelligent conversation method of any one of claims 1-3.

Citation Information

Patent Citations

  • Similar speaking recognition method and system using linear and nonlinear feature extraction

    CA2492204A1

  • Intentional scene recognition method and system based on user portrait

    CN106489148A