An elderly-oriented consultation accompanying robot and a method thereof
By extracting acoustic features and normalizing text from the voice input of the elderly, and combining semantic and metadata retrieval with source-based reasoning generation, the problems of accuracy and humanistic care in policy consultation for the elderly have been solved, thereby improving the quality of interaction and user trust.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU YALING INTERACTIVE INTELLIGENT SERVICE ROBOT CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing intelligent interactive robots struggle to accurately understand the vague verbal intentions of the elderly when handling policy inquiries, lack awareness of spatiotemporal constraints, and generate responses that lack accuracy and humanistic care, resulting in low interaction quality.
The system acquires user voice input signals and extracts acoustic features through the input interaction module, performs spoken term mapping and semantic integrity reconstruction using the text normalization module, conducts hybrid retrieval based on semantics and metadata using the semantic retrieval module, performs secondary relevance ranking using the context filtering module, performs source-based reasoning generation using the reasoning generation module, and outputs consultation feedback audio through the emotional speech synthesis module.
It improves the naturalness and recognition rate of the interaction between the elderly and the robot, ensures the authority and timeliness of the answers, alleviates the psychological pressure of the elderly, and enhances user stickiness and trust.
Smart Images

Figure CN122165456A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of companion robot technology, and in particular to a consultation and companion robot for the elderly and its method. Background Technology
[0002] In smart elderly care service scenarios, policy consultation is a core element in ensuring that the elderly can access social welfare, medical security, and legal support, and the quality of its interaction directly affects their quality of life. However, when the elderly inquire about policies, they often use fragmented and highly colloquial expressions, and their consultation needs are usually strongly limited by regional and individual attributes (such as household registration, age, specific identity, etc.).
[0003] While existing intelligent interactive robots can achieve basic speech recognition and dialogue, they have significant limitations when handling policy consultation tasks for the elderly. First, traditional systems struggle to accurately map the vague, colloquial intentions of the elderly to highly specialized and standardized policy terminology, leading to biased retrieval starting points. Second, current technologies often lack a deep understanding of user contextual attributes during semantic retrieval, easily overlooking spatiotemporal constraints in policy provisions and returning invalid information that doesn't match the user's actual situation (e.g., location or age mismatch). Furthermore, due to the risk of illusion in large language models generating responses, without strict source-based constraints, the generated answers often lack accurate policy basis and are unlikely to be accepted in serious government consultation scenarios. Simultaneously, most current robot voice feedback systems are too mechanical, failing to adjust to the psychological and emotional needs of the elderly and lacking humanistic care in human-computer interaction. Therefore, how to build a consultation and companion robot capable of deeply understanding spoken intentions, possessing spatiotemporal constraint awareness, and providing gentle and credible responses has become a critical technical problem urgently needing to be solved in the field of smart elderly care. Summary of the Invention
[0004] This application provides a consultation and companion robot for the elderly and a method thereof to at least solve the above-mentioned technical problems existing in the prior art.
[0005] According to a first aspect of this application, a consultation and companion robot for the elderly is provided, comprising: an input interaction module for acquiring user voice input signals and user attribute information, and extracting and transcribing acoustic features of the user voice input signals using an automatic speech recognition model to obtain original text; a text normalization module for performing colloquial terminology mapping and semantic integrity reconstruction on the original text based on a pre-set domain thesaurus and user attribute information to obtain normalized query text; a semantic retrieval module for performing a hybrid retrieval of the normalized query text based on semantics and metadata in a document vector library to obtain a candidate text set; a context filtering module for performing secondary relevance sorting and filtering on the candidate text set based on metadata tags in user attribute information to obtain a target policy context; an inference generation module for concatenating the normalized query text and the target policy context into binding prompts, and then inputting them into a large language model for source-based inference generation to obtain standardized response text; and a speech synthesis module for performing emotional speech synthesis on the standardized response text to output consultation feedback audio.
[0006] According to a second aspect of this application, a method for implementing a consultation and companion robot for the elderly is provided, comprising: acquiring user voice input signals and user attribute information, and extracting and transcribing the user voice input signals using an automatic speech recognition model to obtain the original text; based on a pre-set domain thesaurus and user attribute information, performing colloquial term mapping and semantic integrity reconstruction on the original text to obtain normalized query text; performing a hybrid retrieval based on semantics and metadata on the normalized query text in a document vector library to obtain a candidate text set; performing secondary relevance sorting and filtering on the candidate text set based on metadata tags in the user attribute information to obtain the target policy context; concatenating the normalized query text and the target policy context into restrictive prompts, and then inputting them into a large language model for source reasoning generation to obtain standardized response text; and performing emotional speech synthesis on the standardized response text to output consultation feedback audio.
[0007] Compared with existing technologies, this application provides a consultation and companion robot and its method for the elderly. First, by introducing a text normalization and user attribute fusion mechanism, the system effectively bridges the semantic gap between the elderly's language habits and professional policy terminology, enabling the machine to accurately understand non-standard query intentions and significantly improving the naturalness and recognition rate of the interaction. Second, by utilizing metadata-based contextual filtering and source-based reasoning generation strategies, this application retains the language organization capabilities of large models while strictly limiting the model's generation scope through retrieval-enhanced generation technology. This effectively suppresses the information illusion problem common in general large models in the policy field, ensuring the authority and timeliness of the answers. Furthermore, the application of emotional speech synthesis technology transforms cold policy pronouncements into warm, companion-like dialogues, greatly alleviating the psychological pressure and alienation the elderly experience when facing high-tech products, and increasing user stickiness and trust.
[0008] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0009] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0010] Figure 1 A schematic block diagram of a consultation and companion robot for the elderly, according to an embodiment of this application, is shown.
[0011] Figure 2 A schematic diagram of data flow for a consultation and companion robot for the elderly, according to an embodiment of this application, is shown.
[0012] Figure 3 A schematic block diagram of the input interaction module according to an embodiment of this application is shown.
[0013] Figure 4 A schematic block diagram of a text normalization module according to an embodiment of this application is shown.
[0014] Figure 5 A flowchart illustrating the implementation method of a consultation and companion robot for the elderly according to an embodiment of this application is shown. Detailed Implementation
[0015] To further illustrate the technical means and effects adopted by this application in order to achieve the intended purpose, the following detailed description of the specific implementation methods, structures, features and effects of this application is provided in conjunction with the accompanying drawings and preferred embodiments.
[0016] like Figure 1 and Figure 2 As shown, this application provides a consultation and companion robot 100 for the elderly, including: an input interaction module 110, used to acquire user voice input signals and user attribute information, and to extract and transcribe the user voice input signals using an automatic speech recognition model to obtain the original text; a text normalization module 120, used to perform colloquial term mapping and semantic integrity reconstruction on the original text based on a pre-set domain thesaurus and user attribute information to obtain normalized query text; a semantic retrieval module 130, used to perform a hybrid retrieval of the normalized query text based on semantics and metadata in a document vector library to obtain a candidate text set; a context filtering module 140, used to perform secondary relevance sorting and filtering on the candidate text set based on metadata tags in user attribute information to obtain the target policy context; an inference generation module 150, used to concatenate the normalized query text and the target policy context into binding prompts, and then input them into a large language model for source-based inference generation to obtain standardized response text; and a speech synthesis module 160, used to perform emotional speech synthesis on the standardized response text to output consultation feedback audio.
[0017] For example, in the input interaction module 110, the user's voice input signal and user attribute information are acquired, and the user's voice input signal is processed by an automatic speech recognition model to extract acoustic features and transcribe the original text. It should be understood that due to the physiological and cognitive limitations commonly faced by the elderly, such as decreased vision, dexterity in finger operation, and unfamiliarity with keyboard input methods, direct text input constitutes a serious digital divide. Therefore, this application uses voice as the primary interaction medium, aiming to capture the user's natural language input and convert it into machine-processable text data, while simultaneously acquiring the user's identity attribute data, laying a data foundation for subsequent precise policy matching and personalized services.
[0018] In one embodiment of this application, such as Figure 3 As shown, the input interaction module 110 includes: a speech preprocessing unit 111, used to perform signal preprocessing and endpoint detection on the user's speech input signal to obtain a valid speech frame sequence; an acoustic feature extraction unit 112, used to perform acoustic feature extraction and spatial mapping on the valid speech frame sequence to obtain an acoustic feature vector sequence; and a speech-to-text unit 113, used to input the acoustic feature vector sequence into the acoustic model and perform maximum a posteriori probability search in combination with the language model probability to obtain the original text.
[0019] Specifically, firstly, the system acquires the user's voice input signal in real time through a microphone array, and simultaneously reads user attribute information from the system backend or user login information. This user attribute information includes, but is not limited to, metadata such as the user's age, place of residence, and specific identity (e.g., low-income household, disabled person). For the acquired user voice input signal, the voice preprocessing unit first performs signal cleaning and endpoint detection. The system pre-emphasizes the original voice signal using a high-pass filter to improve the signal-to-noise ratio of the high-frequency components and compensate for high-frequency losses during pronunciation. The calculation logic for pre-emphasis processing is as follows:
[0020] Where y[n] represents the sampled value of the pre-emphasized output signal at time n, x[n] represents the original sampled value of the input speech signal at time n, x[n-1] represents the original sampled value of the input speech signal at time n-1, and α represents the pre-emphasis coefficient, which is usually set between 0.9 and 1.0. Subsequently, the system divides the pre-emphasized signal into short-time signal frames according to a preset time length (e.g., 25 milliseconds) and frame shift (e.g., 10 milliseconds), and multiplies each frame signal by a Hamming window to reduce spectral leakage. Based on this, the speech activity detection (VAD) algorithm based on short-time energy and zero-crossing rate is used to remove silent frames and pure noise frames, and to filter out a continuous set of frames containing effective speech information, i.e., the effective speech frame sequence.
[0021] After acquiring a valid speech frame sequence, the acoustic feature extraction unit performs a Fast Fourier Transform (FFT) on each frame signal to calculate its power spectral density, transforming the signal from the time domain to the frequency domain. To simulate the nonlinear characteristics of human ear perception of different frequencies, the system uses a set of triangular bandpass filters (i.e., Mel filter banks) to filter the power spectrum, mapping linear frequencies to the Mel frequency scale. The Mel frequency mapping relationship is shown below:
[0022] Here, Mel(f) represents the mapped Mel frequency value, f represents the actual physical frequency of the signal, and 2595 and 700 are constant factors for Mel scale transformation. The system calculates the logarithmic energy of each filter bank and performs a discrete cosine transform (DCT) on it to remove the correlation between the dimensions of the features, extracting the first N-order (e.g., 12th order) coefficients as cepstral coefficients. To capture the dynamic changes of speech, the system further calculates the first and second-order differences of the cepstral coefficients and concatenates them with the original cepstral coefficients to generate a high-dimensional acoustic feature vector sequence.
[0023] Finally, the speech-to-text unit inputs the aforementioned acoustic feature vector sequence into a pre-trained acoustic model (such as a deep neural network (DNN) or a Transformer encoder) to calculate the posterior probability of each phoneme state under a given observation sequence. Simultaneously, combining the prior knowledge of word co-occurrence probabilities provided by the pre-built language model, it uses a weighted finite-state transformer (WFST) or Viterbi algorithm to find a word sequence path in the search space that maximizes the posterior probability. This maximum posterior probability decoding process can be represented as:
[0024] in, O represents the optimal word sequence of the decoded output, i.e., the original text; W represents any possible word sequence in the dictionary; O seq Represents the input acoustic feature vector sequence; P(w|O seq P(O) represents the posterior probability; seq |w) represents the acoustic model probability; P(w) represents the language model probability. Through the above calculations, the system finally outputs the original text.
[0025] For example, in the text normalization module 120, based on a pre-set domain thesaurus and user attribute information, the original text is mapped to colloquial terms and semantically reconstructed to obtain normalized query text. It should be understood that elderly people often use non-standard colloquial vocabulary when consulting (e.g., using "medical expenses" to refer to "medical insurance reimbursement"), and often omit key subject or regional information (e.g., omitting "I am a resident of City A" or "I am 85 years old this year") because the presumed conversation partner already knows their identity. If such vague and information-deficient original text is directly used for retrieval, the accuracy of the retrieval results will be significantly reduced. Therefore, this step aims to transform unstructured colloquial text into standardized query text that is accurately understood by machines and contains complete retrieval elements through deterministic term mapping and context-based semantic completion.
[0026] In one embodiment of this application, such as Figure 4 As shown, the text normalization module 120 includes: a terminology standardization unit 121, used to segment the original text using a natural language segmentation tool, and perform maximum positive matching and replacement of the segmented word sequence with key-value pairs in the domain thesaurus to obtain standard terminology text; a slot completion unit 122, used to perform semantic slot detection on the standard terminology text, and when a subject or region slot is detected to be missing, extract specific field values from user attribute information and concatenate them to the corresponding position in the text to obtain complete semantic text; and a semantic normalization unit 123, used to perform syntactic reordering and stop word filtering on the complete semantic text based on a sequence-to-sequence model to obtain normalized query text.
[0027] Specifically, first, the terminology standardization unit receives the raw text generated by the preceding steps and performs word segmentation on it using natural language processing tools (such as Jieba or HanLP) to generate a lexical sequence. Then, the system iterates through this lexical sequence, performing maximum positive matching on key-value pairs in a pre-built domain thesaurus. This lexrus stores the mapping between commonly used colloquial terms among the elderly and standard policy terms, for example, {money: [subsidy, allowance], see a doctor: [medical insurance, medical care]}. If a lexical is detected... The system replaces the keys in the dictionary with the corresponding standard policy terms according to the mapping function; if no match is found, the original term is retained. The calculation logic of this mapping and replacement process is as follows:
[0028] in, This represents the standard word element generated at the i-th position after processing. K represents the original word at position i in the original text. dict K represents a domain thesaurus. dict ( () indicates that in the dictionary... The value corresponds to the standard terminology key. After reorganization, a standard terminology text with unambiguous colloquial expressions is generated.
[0029] Next, the slot completion unit performs syntactic dependency analysis and semantic slot detection on the standard terminology text, focusing on whether the core semantic slots necessary for policy queries are filled. These core slots include subject (Who), region (Where), and condition (Condition). When a key slot is detected as missing, the system activates the corresponding field in the user attribute information. An indicator function is introduced to determine the missing status, and the extracted user attribute text is injected into a specific position in the text sequence in a concatenated manner, thus making the implicit context explicit. This context fusion process can be represented as:
[0030] Among them, T comp T represents the complete semantic text after completing the attribute information. std Indicates standard terminology text, This represents the concatenation operation of text sequences. S represents the set of key semantic slots. j This represents the j-th type of slot in the set. This is an indicator function that takes the value 1 when a slot is missing. user (S) j This indicates the specific attribute value extracted from the user attribute information.
[0031] Finally, the semantic normalization unit uses a pre-trained sequence-to-sequence (Seq2Seq) model to syntactically reorder the complete semantic text, adjusts the inversion or redundant structures commonly found in elderly people's spoken language to make it conform to the standard retrieval paradigm of "region + object + policy type", and removes meaningless modal particles and punctuation marks, ultimately generating normalized query text.
[0032] For example, in the semantic retrieval module 130, a hybrid retrieval based on semantics and metadata is performed on the normalized query text in the document vector library to obtain a candidate text set. It should be understood that since policy documents typically contain a large number of technical terms and are rigorously worded, while the normalized query text, although standardized, may still contain inconsistencies with the original text, traditional keyword-based retrieval methods struggle to capture deep semantic relationships. Therefore, this step aims to utilize a high-dimensional vector space model to map the natural language query text into mathematical vectors, and to measure semantic similarity by calculating the geometric distance between vectors, thereby filtering out a candidate text set containing potential answers, providing a high-quality data foundation for subsequent precise filtering and inference generation.
[0033] In one embodiment of this application, the semantic retrieval module includes: a query vectorization unit, used to perform deep semantic vectorization encoding on the normalized query text through an encoder of a pre-trained language model to obtain a query feature vector; a similarity calculation unit, used to traverse the document vector library and calculate a similarity score list between the query feature vector and the document feature vectors pre-stored in the library; and a candidate retrieval unit, used to sort the relevant documents in descending order based on the similarity score list and extract the Top-K document blocks that meet a preset similarity threshold to obtain a candidate text set.
[0034] Specifically, firstly, the query vectorization unit receives the normalized query text generated by the preceding steps and calls the encoder of a pre-trained language model (such as BERT based on the Transformer architecture or the OpenAI text-embedding-3-small model) to perform deep semantic vectorization encoding. The system first uses a tokenizer to convert the normalized query text into a sequence of token IDs that meet the model's input requirements, adding start and delimiter characters. Then, this sequence is input into the model for forward propagation inference, capturing the text's contextual semantics and syntactic dependencies through a multi-head self-attention mechanism. The system extracts the contextual embeddings from the model output (e.g., extracting the [CLS] vector or performing average pooling), generating a fixed-dimensional (e.g., 1536-dimensional) floating-point vector, and performs L2 normalization on it to finally obtain the query feature vector. The computational logic of this encoding and conversion process is as follows:
[0035] Among them, Vquery This represents the output query feature vector. The parameter is The pre-trained language model encoding function, Q norm This represents the normalized query text input, and ||·|| represents the L2 norm of the vector.
[0036] Next, the similarity calculation unit traverses the pre-stored document feature vectors in the document vector library. These document feature vectors correspond to slices of policy text and have already undergone vectorization and normalization during the knowledge base construction phase. For each document feature vector, the system calculates its dot product with the query feature vector. Since both vectors have been normalized, the dot product result is equivalent to their cosine similarity in the vector space, used to quantify the semantic closeness between the query and the document. This similarity calculation process can be represented as:
[0037] Among them, Score i This represents the semantic similarity score between the normalized query text and the i-th document block in the database. represents the document feature vector corresponding to the i-th document block in the document vector library, and · represents the dot product operation of the vectors.
[0038] Finally, the candidate retrieval units sort the relevant documents in descending order based on the calculated similarity score list. To balance recall and precision, the system implements a Top-K truncation strategy, selecting the top K document blocks after sorting (e.g., K values range from 3 to 10), while applying a minimum similarity threshold (e.g., 0.75) to filter out long-tail results with insufficient relevance. Based on the filtered document index IDs, the system extracts the corresponding text content blocks from the original database and combines them into a candidate text set. The logic of this set filtering process is as follows:
[0039] Among them, C set Let L represent the final set of candidate texts for output, where Text(i) represents the original policy text content at index i, argtopk represents the operator that selects the K largest indices of the function, and L represents the set of candidate texts for output. score This represents the set of all calculated similarity scores.
[0040] For example, in the context filtering module 140, the candidate text set is relevance-based secondary sorting and filtering is performed on the metadata tags in the user attribute information to obtain the target policy context. It should be understood that while the preceding semantic retrieval step can recall semantically related documents, the vector model struggles to accurately distinguish subtle differences between "semantically similar but conditionally conflicting" documents (for example, "elderly allowance in City A" and "elderly allowance in City B" are extremely similar in semantic vectors, but the latter is invalid information for users in City A). Furthermore, policy documents have strict time limits; old and new policies often coexist and have similar texts. Without differentiation, it is highly likely that bots will mislead elderly users by citing repealed clauses. Therefore, this step aims to introduce a rule-driven metadata matching mechanism, using hard constraints (such as region and age) and soft constraints (such as timeliness) to perform secondary cleaning and reordering of candidate texts, ensuring that the final input context of the large model is currently valid and fully adapted to the user's identity.
[0041] In one embodiment of this application, the context filtering module includes: a metadata scoring unit, used to parse the structured tags of each document block in the candidate text set, compare them with user attribute information to calculate a matching reward score or a conflict penalty score to obtain a metadata matching score list; a hybrid sorting unit, used to perform semantic-rule hybrid score fusion sorting on the similarity score of the candidate text set and the metadata matching score list to obtain an optimal sorting list; and a context encapsulation unit, used to extract the main text content and corresponding document number tracing information of the preceding entries in the optimal sorting list, and concatenate and encapsulate them according to a preset format to obtain the target policy context.
[0042] Specifically, firstly, the metadata scoring unit parses the structured tags attached to each document block in the candidate text set, extracting key constraint dimensions such as applicable region, minimum applicable age, and target group identity. The system then compares these tags with user attribute information item by item. If a decisive conflict is found (e.g., the document's region is "City B" while the user's registered residence is "City A"), the system generates a very high penalty score; if a specific priority tag is matched (e.g., "low-income household"), a positive reward score is awarded. The calculation logic of this rule-matching scoring process is as follows:
[0043] in, This represents the overall metadata matching score of the i-th candidate document block. α represents the set of attribute dimensions to be validated. k To match the reward weights, the values are usually positive. For example, for the identity dimension, α can be set if a match is successful. k=1.0, to moderately increase the document's priority. β is the conflict penalty coefficient, used to handle hard conflicts such as geographical inconsistencies. This value needs to be set to a maximum value sufficient to offset any semantic score, ensuring that conflicting documents receive negative scores. This is a conflict indicator function.
[0044] Subsequently, the hybrid sorting unit reorders the candidate text set. In one embodiment of this application, the hybrid sorting unit is used to: sort the similarity scores S vec Matching score with metadata S meta The method involves normalizing and then applying a linear weighted sum. While computationally simple, it has a logical flaw in high-precision scenarios: extremely high semantic similarity may mask hard-to-define conflicts related to region or age.
[0045] Specifically, the above embodiments use a linear weighted superposition strategy to process the fusion of semantic vector scores and metadata matching scores, which has significant logical loopholes and timeliness blind spots in high-precision scenarios for policy consultation for the elderly.
[0046] First, linear complementary logic masks the veto attribute of the core constraint. Mathematically, linear weighting allows high-dimensional semantic similarity scores to compensate for low-dimensional rule matching scores. When a user queries senior citizen subsidies, if a policy from another region (e.g., City A) is found but its text description is highly relevant (e.g., 300 yuan for those over 80), the extremely high vector similarity score will inflate the overall weighted score. This could lead the system to recommend the policy to users in City A even if the geographical constraints are severely conflicting, creating a seriously misleading illusion.
[0047] Secondly, this implementation lacks the ability to perceive the timeliness of policies, placing policy documents that were repealed a decade ago in the same time frame as currently valid documents. Since the wording of old policies may not have changed drastically, simply relying on textual similarity will result in outdated information dominating the search results, failing to meet the stringent requirements of the policy consulting field for current validity.
[0048] To address the aforementioned technical shortcomings, an improved embodiment is proposed. Specifically, to address the failure of spatiotemporal constraints and the deficiencies in logical compensation, a reordering mechanism integrating a temporal gravity field and logical gating is constructed. This mechanism introduces a Gaussian kernel function to construct a time decay model and utilizes a Sigmoid function to construct a nonlinear filtering gate, achieving a logical transition from linear complementarity to probabilistic gating.
[0049] In another embodiment of this application, the hybrid sorting unit is configured to: obtain the current system time and the publication time of each document in the candidate text set, and perform timeliness semantic calibration on the similarity scores carried in the candidate text set to obtain a time calibration semantic score list; perform confidence-gated fusion on the time calibration semantic score list based on the metadata matching score list to obtain a gated fusion score list; construct a dynamic truncation threshold based on the arithmetic mean and standard deviation of the gated fusion score list, and perform adaptive filtering and descending sorting on the candidate text set based on the dynamic truncation threshold to generate an optimal sorting list.
[0050] Specifically, the first step is time-sensitive semantic calibration based on the Gaussian kernel function. To address the issue of old data interfering with current decisions, the system first performs time-sensitive calibration. The concept of a temporal gravity field is introduced, using the current system time as a reference, and the time decay coefficient of candidate documents is calculated using the Gaussian kernel function. For the input candidate text set, the publication timestamp of each document is extracted, its span from the current time is calculated, and the Gaussian distribution characteristics are used to modulate the original semantic vector score. This step gives the algorithm time awareness, forcibly increasing the weight of newly published policies under competitive conditions with similar semantics, while causing the score of outdated policies to decay non-linearly and rapidly, ensuring the freshness of the recommended content in the time dimension. The calculation formula for time-sensitive semantic calibration is as follows:
[0051] in, Defined as the semantic score of the i-th document after time calibration; T represents the original vector semantic similarity score; μ is the freshness reward coefficient, used to control the weighting of new policies. For example, taking μ=0.2 means that the newly released policy can receive a 20% score bonus; now The current system time; The publication date of the document; The time bandwidth parameter of the Gaussian kernel determines the sensitivity of decay (for example, setting it to 365 days means that policy decay is significant after more than a year; this is just an example and can be adjusted according to the actual situation).
[0052] Then, a confidence gating based on the Sigmoid function is performed. To completely eliminate the risk of false recall caused by linear compensation, a soft logic gating mechanism is introduced. Unlike the additive fusion of the first embodiment, this step treats the metadata matching score as a pass probability and uses the non-linear saturation characteristic of the Sigmoid function to map it to a confidence gating value in the (0,1) interval. Subsequently, this gating value is multiplied by the calibration semantic score calculated in the first step. This process transforms feature weighting into conditional probability constraints: when there is a conflict in metadata such as region and age, the gating value approaches 0, and no matter how high the semantic score is, the final fusion score will be forcibly suppressed to a low level; conversely, only when the hard constraints are met is the gating opened, and the semantic score is allowed to pass. This mechanism replicates the veto logic of human experts, ensuring the absolute effectiveness of spatiotemporal constraints. The calculation formula for the confidence gating is as follows:
[0053] in, Defined as the final fusion score of the i-th document; Semantic score after time calibration; It is a sigmoid activation function structure, which acts as a non-linear gate; The input metadata is matched to a score; This is the gating threshold, representing the passing grade for metadata matching. For example, taking... =0.5, only documents with non-negative metadata scores can pass; k is the steepness coefficient, the larger the value, the more obvious the gating switching effect, reflecting the severity of the constraint judgment, for example, take k=10.0.
[0054] Finally, dynamic threshold truncation and ranking are performed. To avoid introducing long-tail noise from fixed-number (Top-N) truncation, dynamic filtering based on statistical distribution is implemented. After obtaining the final fused score sequence, the statistical characteristics (mean and standard deviation) of the current batch scores are calculated, and a dynamic floating threshold is constructed. Only document entries with scores significantly higher than the average level (e.g., several standard deviations above the mean) are retained. This step aims to dynamically adjust the recall quantity based on query quality, prioritizing quality over quantity when relevant documents are scarce, avoiding the incorporation of low-quality policy information to fill the gaps, thereby outputting a high-purity, high-confidence optimal ranking list. The calculation formula for dynamic threshold truncation and ranking output is as follows:
[0055] Among them, L rank Defined as the optimal sorted list of the output; D (i) Represents the i-th document object; Its final score; μ score This is the arithmetic mean of the scores of all documents in the current retrieval batch; score This represents the standard deviation of the scores for all documents in the current retrieval batch. This is a dynamic adjustment coefficient (usually taken as a positive value) used to control the stringency of the filtration, for example, taking... =1.0 means only high-quality documents with scores one standard deviation above the mean are retained; sort This indicates a sorting operation based on scores in descending order.
[0056] Finally, the context encapsulation unit extracts the main text content and corresponding document number tracing information of the preceding items (e.g., Top-3) in the optimal sorting list, and concatenates and encapsulates them according to the preset prompt word format to generate the target policy context.
[0057] For example, in the reasoning generation module 150, after concatenating the normalized query text with the target policy context to form restrictive prompts, it is input into a large language model for source-based reasoning to generate standardized answer text. Specifically, although the preceding steps have already selected accurate policy context, the original policy provisions are often obscure and difficult to understand, which would cause comprehension barriers if presented directly to elderly users. At the same time, if the large model is asked questions directly without constraints, the model may use outdated information from its pre-training data to answer. Therefore, this step aims to build a strongly constrained reasoning environment through prompt engineering, forcing the large language model to read, understand, and rewrite only based on the provided context, and requiring it to explicitly annotate the source of information in the answer, thereby generating standardized answers that are both in line with the cognitive habits of the elderly, have emotional warmth, and are legally rigorous and accurate.
[0058] In one embodiment of this application, the reasoning generation module includes: a prompt word assembly unit, used to sequentially and formatfully assemble system instructions, target policy context, and normalized query text to obtain constraint prompt words based on preset system-level instruction role settings; a tag generation unit, used to input the constraint prompt words into the decoder of a large language model to obtain a generated tag sequence; and a text cleaning unit, used to use an inverse word segmenter to restore the generated tag sequence to natural language, and to perform text denoising and structured cleaning to obtain standardized answer text.
[0059] Specifically, firstly, the prompt assembly unit is responsible for constructing the context environment of the input model. The system loads a pre-defined system instruction, which defines the model's role (e.g., "a policy interpretation expert for a certain province") and behavioral boundaries (e.g., "must answer strictly according to the context, fabrication is prohibited"). Then, the system fills the "background information" area of the prompt template with the target policy context output from the previous steps and the "user question" area with the normalized query text. Following the specific dialogue format of the large language model (e.g., ChatML format), the system formattively concatenates the system instruction, background information, and user question to generate binding prompts. The prompt concatenation logic is as follows:
[0060] Among them, P input Constraints indicating completion, I sys Represents system-level instructions, C target Indicates the target policy context, Q norm This represents the normalized query text, and Concat represents the string concatenation operation.
[0061] Next, the tag generation unit inputs the aforementioned constraint prompts into the decoder of a large language model (such as GPT-4 or Tongyi Qianwen). The model first converts the text into a vector matrix and then uses the causal self-attention mechanism of a multi-layer Transformer decoder to calculate the context dependencies. At each time step t, the model calculates the context dependencies based on the input P. input Given the generated historical tag sequence y < t, calculate the conditional probability distribution of the next candidate tag in the vocabulary, and select the tag y with the highest probability using either kernel sampling (Top-P Sampling) or a greedy decoding strategy. t This continues until the end symbol is generated. This autoregressive generation process can be represented as:
[0062] Among them, y t This represents the tags generated at time step t, where V represents the model vocabulary and P(·) represents the conditional probability model. The weight parameters represent the weights of the large language model. Finally, the text cleaning unit uses an inverse tokenizer to restore the generated tokenized sequence to natural language text. To ensure the rigor of the answer, the system performs a phantom check, verifying whether the policy names cited in the text are included in the context of the target policy. Simultaneously, the system removes any remaining Markdown symbols, special control characters, or intermediate reasoning processes from the chain-of-thought process, ensuring the output is clean and clearly structured. The logic of this cleaning process is as follows:
[0063] Among them, T answer Y represents the standardized response text of the final output. seq This represents the generated tag sequence, and Sanitize represents the denoising and formatting function.
[0064] For example, in the speech synthesis module 160, standardized response text is processed using emotional speech synthesis to output consultation feedback audio. It should be understood that for elderly users, simple text reading can be visually taxing, while the cold, mechanical nature of traditional text-to-speech (TTS) can easily trigger feelings of alienation and anxiety. Therefore, this step is not merely a simple text-to-speech conversion, but rather uses deep learning technology to imbue the speech with specific emotional nuances (such as friendliness and patience) and appropriate prosodic features (such as moderate speaking speed and clear pauses), aiming to convey "companionship" and "care" through the auditory channel, thereby enhancing the acceptability of information and the user's sense of trust.
[0065] In one embodiment of this application, the speech synthesis module includes: an emotion recognition unit, used to predict the semantic emotion category confidence of standardized response text based on an emotion classification model; a prosodic parameter tuning unit, used to weight and adjust the baseline prosodic parameters based on the semantic emotion category confidence to obtain a speech synthesis parameter set; a spectrum generation unit, used to input the speech synthesis parameter set into an acoustic model to expand phoneme features through a duration predictor and a fundamental frequency predictor to obtain a Mel spectrum sequence; and a feedback audio generation unit, used to upsample the Mel spectrum sequence using a neural vocoder and perform inversion using a generative adversarial network to obtain consultation feedback audio.
[0066] Specifically, first, the sentiment recognition unit receives the standardized response text generated from the preceding steps and performs text regularization processing on it, including polyphonic character disambiguation, digit-to-text (TN) conversion, and prosodic boundary prediction, generating a linguistic feature sequence containing phonetic symbols and pause markers. Then, a pre-trained sentiment classification model (such as BERT-Sentiment) is used to analyze the semantic tendency of the text, calculating confidence scores for sentiment categories such as "friendly," "serious," or "neutral."
[0067] Next, the prosody parameter adjustment unit dynamically adjusts the baseline prosody parameters based on the aforementioned emotion scores. The system presets baseline parameters for the elderly (e.g., speech rate controlled at 150-200 words / minute, and a gentle, mature male or female voice). Through linear transformation or lookup table methods, the system maps emotion confidence scores to specific prosody control vectors. For example, when the "friendly" score is high, the system further reduces the speech rate, increases the fundamental frequency mean, and softens the voice quality. The calculation logic for this parameter mapping process is as follows:
[0068] in, Base represents the k-th specific prosodic control parameter value in the speech synthesis parameter set. (k) This represents the default baseline value for the k-th parameter, and E represents the set of sentiment categories. Score(T) represents the moderating weight coefficient of sentiment category e on parameter k. answer e) represents the sentiment probability score predicted by the model.
[0069] Subsequently, the spectrum generation unit inputs the adjusted speech synthesis parameter set into the encoder of the acoustic model to extract contextual hidden layer representations at the phoneme level. The hidden layer representations are expanded using a duration predictor and a fundamental frequency predictor to align their length with the target audio frame number, and emotion-related fundamental frequency contour information is injected. The expanded features are then input into the decoder (such as a Transformer or Conformer architecture) to predict the frequency domain features corresponding to each audio frame using autoregressive or non-autoregressive methods, generating a high-fidelity Mel-spectrum sequence. This acoustic feature prediction logic can be expressed as:
[0070] Among them, M spec This represents the generated Mel spectrum sequence. Encoder, Duration, Pitch, and Decoder represent the encoding, duration prediction, fundamental frequency prediction, and decoding modules of the acoustic model, respectively.
[0071] Finally, the feedback audio generation unit uses a neural vocoder (such as HiFi-GAN) to map the frequency domain Mel spectrum back to the time domain waveform. This process first upsamples the Mel spectrum sequence in the time dimension using a transposed convolutional layer, making it consistent with the number of sampling points in the target audio. Then, the neural vocoder, acting as the generator, simulates the filtering effect of the vocal tract through multiple layers of residual convolutional blocks, gradually reconstructing the phase information and fine structure of the waveform, ultimately outputting PCM digital waveform data. This waveform inversion process is as follows:
[0072] Among them, A output [t] represents the amplitude value of the final output consultation feedback audio at the sampling point at time t. The parameter is The neural vocoder generation function.
[0073] In summary, the consultation and companion robot for the elderly described in this application has been clarified. First, through terminology mapping and slot completion, the system greatly improves its compatibility with the non-standard expressions of the elderly, lowering the threshold for them to access information. Second, a secondary filtering mechanism based on metadata tags constructs a rigorous logical gate, which can accurately eliminate policy items that are semantically related but have conflicting attributes, fundamentally suppressing the "illusion" risk of large language models in serious consultation scenarios and ensuring the compliance and authority of the answers. In addition, the emotional speech synthesis technology analyzes the semantic tendency of standardized answer text and dynamically adjusts the synthesis parameters, so that the robot's feedback is no longer a rigid broadcast, but a friendly and companion-like guidance, significantly enhancing the elderly users' sense of trust and psychological comfort during the interaction process.
[0074] This application also provides a method for implementing a consultation and companion robot for the elderly, such as... Figure 5 As shown, the implementation method of the consultation and companion robot for the elderly includes: S1, acquiring user voice input signals and user attribute information, and extracting and transcribing the user voice input signals using an automatic speech recognition model to obtain the original text; S2, based on a pre-set domain thesaurus and user attribute information, performing colloquial term mapping and semantic integrity reconstruction on the original text to obtain normalized query text; S3, performing a hybrid retrieval based on semantics and metadata on the normalized query text in a document vector library to obtain a candidate text set; S4, based on metadata tags in the user attribute information, performing secondary relevance sorting and filtering on the candidate text set to obtain the target policy context; S5, after concatenating the normalized query text and the target policy context into binding prompts, inputting them into a large language model for source reasoning generation to obtain standardized response text; S6, performing emotional speech synthesis on the standardized response text to output consultation feedback audio.
[0075] It should be noted that the implementation method of the consultation and companion robot for the elderly in this application embodiment is similar in principle to the aforementioned consultation and companion robot for the elderly. Therefore, the implementation process, implementation principle, and beneficial effects of the implementation method of the consultation and companion robot for the elderly can be found in the description of the implementation process, implementation principle, and beneficial effects of the aforementioned consultation and companion robot for the elderly. Repeated descriptions will not be repeated.
[0076] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0077] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0078] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A consultation and companion robot for the elderly, characterized in that, include: The input interaction module is used to acquire user voice input signals and user attribute information, and to extract acoustic features and transcribe the user voice input signals through an automatic speech recognition model to obtain the original text. The text normalization module is used to perform colloquial term mapping and semantic integrity reconstruction on the original text based on a pre-set domain thesaurus and user attribute information to obtain normalized query text. The semantic retrieval module is used to perform a hybrid retrieval of normalized query text based on semantics and metadata in the document vector library to obtain a set of candidate texts; The context filtering module is used to perform secondary relevance sorting and filtering on the candidate text set based on metadata tags in user attribute information to obtain the target policy context. The reasoning generation module is used to concatenate the normalized query text with the target policy context to form restrictive prompts, and then input them into a large language model for source-based reasoning to generate standardized response text. The speech synthesis module is used to synthesize emotional speech from standardized response text to output consultation feedback audio.
2. The consultation and companion robot for the elderly according to claim 1, characterized in that, The input interaction module includes: The speech preprocessing unit is used to perform signal preprocessing and endpoint detection on the user's speech input signal to obtain an effective speech frame sequence; The acoustic feature extraction unit is used to extract acoustic features and spatially map them from the effective speech frame sequence to obtain an acoustic feature vector sequence. The speech-to-text unit is used to input the acoustic feature vector sequence into the acoustic model and perform maximum a posteriori probability search in combination with the language model probability to obtain the original text.
3. The consultation and companion robot for the elderly according to claim 1, characterized in that, The text normalization module includes: The terminology standardization unit is used to segment the original text based on natural language segmentation tools, and to perform maximum positive matching and replacement of the segmented word sequence with key-value pairs in the domain thesaurus to obtain standard terminology text; The slot completion unit is used to perform semantic slot detection on standard terminology text. When a missing subject or region slot is detected, it extracts specific field values from user attribute information and concatenates them to the corresponding position in the text to obtain complete semantic text. The semantic normalization unit is used to perform syntactic reordering and stop word filtering on the complete semantic text based on the sequence-to-sequence model to obtain normalized query text.
4. The consultation and companion robot for the elderly according to claim 1, characterized in that, The semantic retrieval module includes: The query vectorization unit is used to perform deep semantic vectorization encoding on the normalized query text through the encoder of the pre-trained language model to obtain the query feature vector; The similarity calculation unit is used to traverse the document vector library and calculate the similarity score list between the query feature vector and the pre-stored document feature vectors in the library; The candidate retrieval unit is used to sort relevant documents in descending order based on a similarity score list and extract the Top-K document blocks that meet the preset similarity threshold to obtain a candidate text set.
5. The consultation and companion robot for the elderly according to claim 1, characterized in that, The context filtering module includes: Metadata scoring unit is used to parse the structured tags of each document block in the candidate text set, compare them with user attribute information to calculate matching reward points or conflict penalty points to obtain a list of metadata matching scores; The hybrid sorting unit is used to perform semantic-rule hybrid score fusion sorting on the similarity score and metadata matching score list of candidate text sets to obtain the optimal sorted list; The context encapsulation unit is used to extract the text content of the preceding entries in the optimal sorting list and the corresponding document number tracing information, and to concatenate and encapsulate them according to a preset format to obtain the target policy context.
6. The consultation and companion robot for the elderly according to claim 1, characterized in that, The reasoning generation module includes: The prompt word assembly unit is used to format and assemble system instructions, target policy context, and normalized query text in sequence based on preset system-level instruction role settings to obtain constraint prompt words; The tag generation unit is used to input the constraint prompt words into the decoder of the large language model to obtain the generated tag sequence; The text cleaning unit is used to use an inverse word segmenter to restore the generated token sequence to natural language, and to perform text denoising and structured cleaning to obtain standardized response text.
7. The consultation and companion robot for the elderly according to claim 1, characterized in that, The speech synthesis module includes: The emotion recognition unit is used to predict the semantic emotion category confidence of standardized response text based on the emotion classification model; The prosodic parameter adjustment unit is used to weight and adjust the baseline prosodic parameters based on the semantic emotion category confidence to obtain the speech synthesis parameter set; The spectrum generation unit is used to input the speech synthesis parameter set into the acoustic model to expand the phoneme features through the duration predictor and the fundamental frequency predictor to obtain the Mel spectrum sequence. The feedback audio generation unit is used to upsample the Mel spectrum sequence using a neural vocoder and perform inversion using a generative adversarial network to obtain the consultation feedback audio.
8. The consultation and companion robot for the elderly according to claim 5, characterized in that, The hybrid sorting unit is used for: Obtain the current system time and the publication time of each document in the candidate text set, and perform timeliness semantic calibration on the similarity scores carried in the candidate text set to obtain a time calibration semantic score list; Based on the metadata matching score list, the time calibration semantic score list is subjected to confidence-gated fusion to obtain a gated fusion score list. Based on the arithmetic mean and standard deviation of the gated fusion score list, a dynamic truncation threshold is constructed, and the candidate text set is adaptively filtered and sorted in descending order based on the dynamic truncation threshold to generate the optimal sorted list.
9. A method for implementing a consultation and companion robot for the elderly, characterized in that, include: The system acquires user voice input signals and user attribute information, and uses an automatic speech recognition model to extract acoustic features and transcribe the user voice input signals to obtain the original text. Based on a pre-built domain thesaurus and user attribute information, the original text is mapped to colloquial terms and semantically reconstructed to obtain normalized query text. A hybrid retrieval based on semantics and metadata is performed on the normalized query text in the document vector library to obtain a candidate text set; Based on the metadata tags in the user attribute information, the candidate text set is relevance-based secondary sorting and filtering to obtain the target policy context; After concatenating the normalized query text with the target policy context to form restrictive prompts, the text is then input into a large language model for source-based reasoning to generate standardized response text. Emotional speech synthesis is used to generate audio feedback for standardized response texts.