A Reliability Evaluation Method and System for Companion Robots Based on Word Vector Semantic Analysis
By using a word vector-based semantic analysis method, semantic difference feature vectors are generated using BERT and Transformer models. Combined with the difference coefficients of living habits and language habits, the problem of misunderstanding by companion robots is solved, thereby improving the accuracy of reliability evaluation and the quality of companionship.
Patent Information
- Application Number
- CN202511134754.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Companion robots are prone to misinterpreting the intentions of caregivers, resulting in lower quality care.
Using a word vector-based semantic analysis method, semantic difference feature vectors of input and response texts are generated through pre-trained BERT and Transformer models. Combined with the difference coefficients of living habits and language habits, reliability correction coefficients are calculated and comprehensive reliability evaluation results are generated.
This improves the accuracy of reliability evaluation for companion robots under different habit differences, avoids evaluation distortion caused by ignoring habit differences, and enhances the quality of companionship.
Smart Images

Figure CN120633674B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and in particular to a method and system for evaluating the reliability of companion robots based on word vector semantic analysis. Background Technology
[0002] Companion robots are multifunctional service robots mainly used to assist the lives of the elderly, children, and people with disabilities. They can provide services, safety monitoring, human-computer interaction, and multimedia entertainment.
[0003] In related technologies, due to differences in lifestyle and language habits, companion robots are prone to misunderstanding the intentions of caregivers, resulting in incorrect actions and lower quality of care. To improve the quality of care provided by companion robots, some undergo regular reliability testing to ensure their quality meets standards, thereby enhancing the user experience. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a reliability evaluation method and system for companion robots based on word vector semantic analysis, which solves the problem that companion robots are prone to misunderstanding the intentions of companions and thus make erroneous actions, resulting in low quality of companionship.
[0005] Firstly, this application provides a reliability evaluation method for companion robots based on word vector semantic analysis, including:
[0006] Acquire the input text data from the caregiver and the response text data from the care robot;
[0007] The input text data and response text data are encoded using a pre-trained word vector model to generate an input word vector sequence and a response word vector sequence, and the semantic difference feature vectors of the input word vector sequence and the response word vector sequence are determined.
[0008] Determine the difference coefficients of the caregiver's and the care robot's lifestyle habits and language habits, and determine the reliability correction coefficient of the care robot based on the semantic difference feature vector, lifestyle habit difference coefficients, and language habit difference coefficients;
[0009] Based on the reliability correction coefficient and the preset benchmark reliability index, a comprehensive reliability evaluation result for the companion robot is generated.
[0010] In one embodiment, the word vector model is a BERT model; the step of encoding the input text data and response text data using a pre-trained word vector model to generate an input word vector sequence and a response word vector sequence specifically includes:
[0011] The input text data and the response text data are merged using classification and delimiter identifiers to generate a joint input sequence;
[0012] The joint input sequence is processed through the embedding layer of the BERT model to generate a word vector matrix; each row of the word vector matrix corresponds to the context-related vector of a subword.
[0013] The boundaries of the word vector matrix are located based on the positions of the classification identifier and the separator identifier, thereby separating the input word vector sequence and the response word vector sequence.
[0014] In one embodiment, the process of merging the input text data and the response text data using classification identifiers and delimiters to generate a joint input sequence specifically includes:
[0015] Add a classification identifier to the header of the input text data and the response text data;
[0016] Add a first separator between the input text data and the response text data;
[0017] Add a second separator to the end of the input text data and the response text data;
[0018] Based on the classification identifier, the first separator identifier, and the second separator identifier, the input text data and the response text data are merged to form a joint input sequence.
[0019] In one embodiment, the step of locating the boundaries of the word vector matrix based on the positions of the classification identifier and the separator identifier, thereby separating the input word vector sequence and the response word vector sequence, specifically includes:
[0020] In the index positions of the joint input sequence, the input word vector sequence is separated from the index position after the classification identifier to the index position before the first delimiter;
[0021] In the index positions of the joint input sequence, the response word vector sequence is separated from the index position after the first separator to the index position before the second separator.
[0022] In one embodiment, determining the semantic difference feature vectors of the input word vector sequence and the response word vector sequence specifically includes:
[0023] Using the input word vector sequence and the response word vector sequence as input, a bidirectional contextual feature vector is generated through the Transformer model; the Transformer model includes a query space, a key space and a value space, and the query space, the key space and the value space correspond to a query weight matrix, a key weight matrix and a value weight matrix, respectively.
[0024] A query vector is constructed by taking the global semantic vector corresponding to the response word vector sequence in the bidirectional context feature vector, and a key vector is constructed by taking the local feature vector corresponding to the input word vector sequence in the bidirectional context feature vector. A difference weight distribution is generated by subtracting the query vector and the key vector element by element. The query vector is obtained by multiplying the global semantic vector and the query weight matrix. The key vector is obtained by multiplying the local feature vector and the key weight matrix.
[0025] The semantic difference feature vector is generated based on the difference weight distribution and the weighted summation of the value vectors; the value vector is obtained by multiplying the input word vector sequence with the value weight matrix.
[0026] In one embodiment, the semantic difference feature vector is calculated and determined by the following formula:
[0027]
[0028] in, The semantic difference feature vector; Indicates the first The query vector of a sequence; Indicates the first The key vectors of the sequences; The sequence length of the bidirectional context feature vector; Indicates the first The dimension of the key vector of each sequence; It is a value vector.
[0029] In one embodiment, determining the difference coefficients of lifestyle habits and language habits between the caregiver and the caregiver robot specifically includes:
[0030] The difference coefficient of living habits is obtained by using the analytic hierarchy process based on the historical interaction data between the caregiver and the care robot.
[0031] The similarity between the user's pronunciation data and a preset dialect database is calculated to obtain the language habit difference coefficient.
[0032] In one embodiment, the step of obtaining the lifestyle difference coefficient based on the historical interaction data between the caregiver and the care robot using the analytic hierarchy process specifically includes:
[0033] Collect historical interaction data between the caregiver and the care robot; the historical interaction data includes the caregiver's lifestyle habit tags and the robot's response accuracy.
[0034] A lifestyle habit evaluation index system is constructed based on the historical interaction data; the lifestyle habit evaluation index system includes multiple primary indicators, and each primary indicator has corresponding secondary sub-indicators.
[0035] The weight vector of the first-level indicator is calculated using the analytic hierarchy process (AHP), and combined with the entropy weight of the second-level sub-indicators, a coefficient of difference in living habits is generated.
[0036] In one embodiment, after generating the comprehensive reliability evaluation result of the companion robot based on the reliability correction coefficient and the preset benchmark reliability index, the method further includes:
[0037] Determine the confidence score of the comprehensive reliability evaluation results;
[0038] If the confidence score is less than a preset confidence threshold, the companion robot is controlled to enter an adaptive learning mode; in the adaptive learning mode, the companion robot can optimize the word vector model based on the real-time acquired input text data.
[0039] Secondly, this application provides a reliability evaluation system for companion robots based on word vector semantic analysis, including a processor and a memory; wherein the memory stores a computer program, which is used by the processor to load and execute the reliability evaluation method for companion robots based on word vector semantic analysis as described in any one of the first aspects.
[0040] In the companion robot reliability evaluation method and system based on word vector semantic analysis in this embodiment, the word vector model can capture the semantic information of words, so that the input text data and response text data are transformed into quantifiable vector form, so as to generate semantic difference feature vectors to focus on the semantic deviation between input and response, and make corrections in combination with the companion's living habits and language habits, so that the generated reliability evaluation results can reflect the true reliability level of the companion robot under different habit differences, avoiding evaluation distortion caused by ignoring habit differences. Attached Figure Description
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 This is a flowchart illustrating a method for evaluating the reliability of companion robots based on word vector semantic analysis, provided as an embodiment of this application.
[0043] Figure 2 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0044] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. Based on the description of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.
[0045] In the description of this invention, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0046] The terms “upper,” “lower,” “left,” “right,” “front,” “back,” “top,” “bottom,” “inner,” and “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use. They are only for the convenience of description and simplification, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.
[0047] The terms “first,” “second,” “third,” etc., are used merely to distinguish elements with similar properties, not to indicate or imply relative importance or a specific order.
[0048] The terms “include,” “comprising,” or any other variation thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.
[0049] like Figure 1As shown, this embodiment provides a reliability evaluation method for companion robots based on word vector semantic analysis, including:
[0050] Step S100: Obtain the input text data of the caregiver and the response text data of the caregiver robot;
[0051] Step S200: Encode the input text data and response text data using a pre-trained word vector model to generate an input word vector sequence and a response word vector sequence, and determine the semantic difference feature vectors of the input word vector sequence and the response word vector sequence;
[0052] Step S300: Determine the difference coefficients of the caregiver's and the caregiver's habits and the difference coefficients of their language habits, and determine the reliability correction coefficient of the caregiver based on the semantic difference feature vector, the difference coefficients of the caregiver's habits and the difference coefficients of their language habits;
[0053] Step S400: Based on the reliability correction coefficient and the preset benchmark reliability index, generate a comprehensive reliability evaluation result for the companion robot.
[0054] In the reliability evaluation method for companion robots based on word vector semantic analysis in this embodiment, the word vector model can capture the semantic information of words, so that the input text data and response text data are transformed into quantifiable vector forms, so as to generate semantic difference feature vectors to focus on the semantic deviation between input and response. It is also corrected by combining the life habits and language habits of the caregiver, so that the generated reliability evaluation results can reflect the true reliability level of the companion robot under different habit differences, avoiding evaluation distortion caused by ignoring habit differences.
[0055] Step S100: Obtain the input text data of the caregiver and the response text data of the caregiver robot.
[0056] A caregiver is an individual who requires care services, including the elderly, children, and people with disabilities. Input text data refers to instructions or questions issued by the caregiver to the care robot via voice or text, reflecting the user's immediate needs, such as "Please open the curtains" or "I need a medication reminder."
[0057] Response text data refers to the response content generated by the companion robot based on the input data. It is used to demonstrate the robot's understanding and execution capabilities, such as "Opening the curtains for you" or "Medication reminder has been set".
[0058] The system can capture caregiver commands in real time via a voice recognition module or input device and convert them into input text data. It also records response text data generated by the caregiver based on actions or language responses to various commands. Furthermore, the input and response text data cover various life scenarios such as daily care, emergency assistance, and entertainment interaction. It records timestamps of relevant terms in each scenario, ensuring a consistent temporal relationship between the input and response text data.
[0059] Step S200: Encode the input text data and response text data using a pre-trained word vector model to generate an input word vector sequence and a response word vector sequence, and determine the semantic difference feature vectors of the input word vector sequence and the response word vector sequence.
[0060] Word vector models are models trained on large-scale corpora that map words to numerical vectors, such as Word2Vec, GloVe, or BERT. This embodiment preferably uses the BERT model. The input word vector sequence is a sequence formed by converting each word in the input text into a fixed-dimensional vector. For example, "open the curtains" might be encoded as [[0.1,0.2,…],[0.3,0.4,…]]. The response word vector sequence is a sequence of vectors generated after the response text has been processed by the same model. The semantic difference feature vector is a vector that quantifies the degree of semantic deviation between the input and response texts.
[0061] In one embodiment, the step of encoding the input text data and response text data using a pre-trained word vector model to generate an input word vector sequence and a response word vector sequence specifically includes:
[0062] Step S201: The input text data and the response text data are merged and processed using classification identifiers and delimiters to generate a joint input sequence.
[0063] A classification identifier is a specific marker used to identify the starting position of a text sequence. It can be obtained by adding it to the beginning of the input text data during the merging process. In this embodiment, the classification identifier includes one or more of the start markers predefined by the BERT model.
[0064] Separator identifiers are specific markers used to distinguish text paragraphs from different sources. They can be obtained by inserting them at the junction of input text data and response text data during the merging process. In this embodiment, the separator identifiers include one or more of the paragraph separators predefined by the BERT model.
[0065] A joint input sequence is a composite sequence formed by concatenating input text data and response text data using classification and delimiter identifiers.
[0066] In one embodiment, the process of merging the input text data and the response text data using a classification identifier and a separator identifier to generate a joint input sequence specifically includes: adding a classification identifier to the beginning of the input text data and the response text data; adding a first separator identifier between the input text data and the response text data; adding a second separator identifier to the end of the input text data and the response text data; and merging the input text data and response text data with the added classification identifier, first separator identifier, and second separator identifier to form a joint input sequence.
[0067] The classification identifier is specifically the [CLS] label, which is used to identify the starting position of the input text data and the response text data, so as to facilitate the extraction of global semantic features during subsequent model processing.
[0068] The first delimiter is a predefined symbol used to distinguish the boundary between the input text and the response text content, and can be implemented using a different symbol than the classification identifier. For example, the first delimiter may include the [SEP] mark.
[0069] The second delimiter may be a predefined symbol used to mark the end position of the entire combined input sequence, and may be implemented using the same or different symbol as the first delimiter. For example, the second delimiter may include the [SEP] mark.
[0070] The text data with added identifiers are merged to form a joint input sequence. For example, this can be achieved by sequentially concatenating the category identifier, input text data, first separator identifier, response text data, and second separator identifier, forming a structure similar to "[CLS]Input content[SEP]Response content[SEP]".
[0071] By adding classification markers to the headers of the input and response texts to extract global features, inserting a first separator between them to distinguish content boundaries, and adding a second separator at the end to clarify the sequence termination position, and merging these markers with the text data to form a structured joint input sequence, the technical effect of strengthening text boundary recognition, improving model adaptability, and fault tolerance can be achieved through dual separators. This embodiment avoids content confusion in multi-turn interactions or complex instruction scenarios through the synergistic effect of dual separators, ensuring that the BERT model can generate a stable word vector matrix according to the pre-training format, reducing the risk of vector drift or truncation caused by abnormal sequence formats, reducing the calculation error of semantic difference feature vectors, and thus improving the calculation accuracy of reliability correction coefficients.
[0072] Step S202: The joint input sequence is processed through the embedding layer of the BERT model to generate a word vector matrix; each row of the word vector matrix corresponds to the context-related vector of a word.
[0073] The embedding layer of the BERT model is a superimposed module that includes word embeddings, position embeddings, and segment embeddings, and is used to convert a text sequence into a numerical vector representation. Word embeddings can be realized by mapping subwords to vectors of a fixed dimension, position embeddings can be realized by encoding the order information of subwords in the sequence, and segment embeddings can be realized by marking the attribution of different text paragraphs. The word vector matrix is a two-dimensional matrix generated after being processed by the embedding layer, the number of rows of which corresponds to the number of subword units, and the number of columns corresponds to the preset vector dimension. Exemplarily, the value of each element in the word vector matrix can reflect the comprehensive semantic and position features of the subword in a specific context. For example, the vector of "take" in "Please take medicine" is different from the vector of "pick up a book".
[0074] In one embodiment, the boundaries of the word vector matrix are positioned based on the positions of the classification identifier and the separation identifier, so as to separate the input word vector sequence and the response word vector sequence. Specifically, it includes:
[0075] Step S2021: In the index positions of the joint input sequence, separate the input word vector sequence from the index position after the classification identifier to the index position before the first separation identifier;
[0076] Step S2022: In the index positions of the joint input sequence, separate the response word vector sequence from the index position after the first separation identifier to the index position before the second separation identifier.
[0077] In step S2021 and step S2022, by determining the absolute positions of the classification identifier and the separation identifier, the vector ranges of the input and response texts can be defined. By the absolute index rule, the risk of fuzzy matching based on the text content is avoided, and the accuracy of boundary positioning is maintained. Exemplarily, the input word vector sequence and the response word vector sequence can be separated through the following steps: First, locate the index value of the classification identifier in the joint input sequence (for example, the index of [CLS] is 0); Second, determine the index value of the first separation identifier in the joint input sequence (for example, the index of the first [SEP] is 4); Subsequently, set the start index of the input word vector sequence to the position after the classification identifier (index 1), and the end index to the position before the first separation identifier (index 3), so as to extract the vector set within this interval. For the response word vector sequence, by locating the index value of the second separation identifier (such as index 9), set the start index to the position after the first separation identifier (index 5), and the end index to the position before the second separation identifier (index 8), so as to complete the vector extraction of the response text.
[0078] By using the absolute index positions of the classification identifier and the separation identifier to delimit the vector boundaries of the input and response texts, combined with strict start and end rules, the extraction of complete semantic units can be achieved. At the same time, the second separation identifier is used as a termination anchor to prevent the over-expansion of the response sequence. The mathematical certainty of the index rules significantly reduces the vector truncation deviation caused by incorrect identifier recognition, and fault tolerance can still be achieved through the relative positions of other identifiers when the classification identifier is lost; and it ensures that the complete semantic units of the input and response texts are retained, for example, all relevant vectors can still be completely captured in a response text containing multiple clauses or corrective supplements; and through experimental verification, the corresponding error between the word vector sequence and the original text is reduced, thereby improving the accuracy of subsequent semantic difference analysis and the credibility of the reliability correction coefficient.
[0079] Step S203: Locate the boundaries of the word vector matrix based on the positions of the classification identifier and the separation identifier, so as to separate the input word vector sequence and the response word vector sequence.
[0080] Boundary location means that by parsing the position indexes of the classification identifier and the separation identifier in the word vector matrix, the vector subsets corresponding to the input text and the response text can be determined. Exemplarily, if the separation identifier is located in the 5th row, the first 5 rows correspond to the input word vector sequence, and the subsequent rows correspond to the response word vector sequence. By traversing the row identifiers of the word vector matrix, the index positions of the classification identifier and the separation identifier can be identified, so as to ensure the correspondence between the separated word vector sequence and the original text.
[0081] In a specific embodiment, the input text and the response text can be combined into a unified sequence through the classification identifier and the separation identifier. For example, "I'm hungry" and "Lunch has been prepared for you" are combined into "[CLS]I'm hungry[SEP]Lunch has been prepared for you". Then the combined sequence is input into the embedding layer of BERT, and word embedding, position embedding, and segment embedding are stacked to generate a word vector matrix. For example, the vector of the word "hungry" is adjusted in value due to the position relationship of the previous word "I" and the subsequent word "le". Then, according to the index value of the separation identifier, the vector subsets of the input and the response are divided. For example, when [SEP] is located in the 3rd row, the first 3 rows constitute the input word vector sequence. Finally, the separated sequences are output for subsequent analysis use. For example, the input sequence contains the context vectors of "I'm hungry", and the response sequence contains the vectors of "Lunch has been prepared for you".
[0082] In steps S201 - S203, by using the embedding layer of the BERT model to generate a word vector matrix containing context information, using classification markers and separation markers to clearly distinguish the boundaries between the input and response texts, and combining boundary localization techniques to accurately segment vector subsets, it is possible to enhance the context semantic capture ability of word vectors for fuzzy instructions or dialect expressions, avoid vector contamination caused by sequence mixing, and at the same time provide a reliable basis for subsequent semantic difference calculation. This solves the problem of fuzzy semantic representation in traditional word vector models in scenarios with short texts or strong context dependencies. For example, when processing dialect expressions such as "Open the window a bit", the BERT model can map "Open a bit" and "Open" to similar vectors in combination with the context, while traditional models may misjudge due to not having seen the lexical usage in a specific context. Ultimately, these improvements enable the semantic difference feature vector to more accurately reflect the true degree of the robot's understanding deviation, thereby improving the calculation accuracy of the reliability correction coefficient.
[0083] In one embodiment, the determination of the semantic difference feature vector between the input word vector sequence and the response word vector sequence specifically includes:
[0084] Step S204: Using the input word vector sequence and the response word vector sequence as inputs, generate bidirectional context feature vectors through the Transformer model; the Transformer model includes a query space, a key space, and a value space, and the query space, the key space, and the value space respectively correspond to a query weight matrix, a key weight matrix, and a value weight matrix;
[0085] The Transformer model is a deep neural network architecture based on the self - attention mechanism. It generates feature vectors by parallel computing the context dependencies at different positions, and its core modules include a multi - head attention layer and a feed - forward network. Exemplarily, this model can simultaneously capture the correlation between any two words in the input sequence. For example, when analyzing the response of "Please get medicine" and "Getting medicine", it can identify the semantic association between "get" and "fetch" in different contexts.
[0086] The query space, the key space, and the value space are linear transformation spaces defined by the query weight matrix, the key weight matrix, and the value weight matrix respectively, and are used to map input vectors to achieve feature comparison in different dimensions. The query weight matrix is a linear transformation parameter that converts the global semantic vector of the response into a query vector. For example, the global vector of the response forms a representation in the query space after matrix multiplication. The key weight matrix is a linear transformation parameter that converts the local feature vector of the input into a key vector. For example, "get medicine" in the input text forms a feature representation in the key space. The value weight matrix is a linear transformation parameter that converts the original input word vector into a value vector. For example, "medicine" retains specific semantic features in the value space.
[0087] Bidirectional contextual feature vectors are a set of feature vectors output by the Transformer model that contain global and local semantic information. They can be generated by calculating the association weights between each word and other words in the sequence through a self-attention mechanism.
[0088] Step S205: Construct a query vector by taking the global semantic vector corresponding to the response word vector sequence in the bidirectional context feature vector, and construct a key vector by taking the local feature vector corresponding to the input word vector sequence in the bidirectional context feature vector. Generate a difference weight distribution by subtracting the query vector and the key vector element by element. The query vector is obtained by multiplying the global semantic vector and the query weight matrix. The key vector is obtained by multiplying the local feature vector and the key weight matrix.
[0089] A global semantic vector is a comprehensive representation obtained by aggregating the overall information of the response word vector sequence; for example, the global vector of the response "Lunch has been prepared for you" can reflect the core intent of "providing catering services".
[0090] Local feature vectors are fine-grained feature representations of input word vector sequences, either word-by-word or segment-by-segment. For example, the word "hungry" in "I'm hungry" retains the direct expression of the state of hunger.
[0091] Query vector construction can be achieved by multiplying the global semantic vector with the query weight matrix. For example, the global vector responding to "window is closed" is transformed into a semantic representation in the query space after matrix transformation.
[0092] Key vector construction can be achieved by multiplying local feature vectors with key weight matrices. For example, the word-by-word vector of the input "open window" is transformed to form features in the key space.
[0093] Element-wise subtraction calculates the difference between the query vector and the key vector in corresponding dimensions, generating a weighted distribution that quantifies the degree of semantic deviation. For example, if the input word "hungry" and the response word "lunch" differ significantly in a certain dimension, the corresponding position will have a higher weight value.
[0094] Step S206: Generate the semantic difference feature vector based on the difference weight distribution and the weighted summation of the value vector; the value vector is obtained by multiplying the input word vector sequence with the value weight matrix.
[0095] A value vector is a vector that carries the original semantic information and is generated after the input word vector sequence is transformed by a value weight matrix. For example, the value vector corresponding to "open window" retains the specific features of "open action".
[0096] Weighted summation combines value vectors based on the difference weight distribution. For example, the value vectors corresponding to "medicine" and "take medicine" with higher difference weights will account for a larger proportion in the final difference feature vector. By dynamically adjusting the contribution of features at each location through the difference weight distribution, the averaging defects of traditional mean methods can be avoided.
[0097] In one embodiment, the semantic difference feature vector is calculated and determined by the following formula:
[0098]
[0099] in, The semantic difference feature vector; Indicates the first The query vector of a sequence; Indicates the first The key vectors of the sequences; The sequence length of the bidirectional context feature vector; Indicates the first The dimension of the key vector of each sequence; It is a value vector.
[0100] The semantic difference feature vector is a final vector that comprehensively reflects the degree of difference between the input and response texts in terms of semantics, context, and local features. Its dimension is consistent with the vector space of the value vector, and each element represents the bias strength of a specific semantic dimension. For example, when there is a significant difference between the input "open window" and the response "window closed" in the "on / off state" dimension, the element values of the corresponding semantic difference feature vector will be higher.
[0101] This can be generated by matrix multiplication of the global semantic vector of the response into the query weight matrix. Simultaneously, the input local feature vector is used to generate the input key weight matrix. Then, the input word vector sequence is input into the weight matrix to generate the value vector V. For example, the global vector of 768 dimensions is transformed by a 768×64 matrix. The dimension is 64, the key vector is also 64, and the value vector can be 512. The difference weight distribution can be calculated for each position i (1≤i≤L). and The element-wise interpolation generation dimension is The difference vectors are then concatenated to form... Implemented using matrices, for example and The difference is [0.1, 0.1].
[0102] In steps S204-S206, the Transformer's bidirectional attention mechanism ensures that the difference analysis considers complete contextual information, such as identifying key related words in multi-step instructions. Secondly, the separation of global and local features allows the difference analysis to take into account both overall intent and detailed deviations, such as distinguishing intent conformity and specific preference deviation in the responses "play music" and "classical music has been played". Thirdly, the dynamic weight allocation mechanism accurately locates the difference position through element-wise subtraction, such as distinguishing the referential difference between "open the window" and "the window has been opened" in a dialect scenario. Finally, the value vector retains the original semantic features to ensure the fidelity of the difference feature vector, such as strengthening the semantic distinction between "medicine" and "book" in a referential error scenario.
[0103] By inputting the input and response sequences into the Transformer model to generate bidirectional contextual feature vectors, and using the query weight matrix and key weight matrix to construct contrast vectors for global and local features respectively, the semantic deviation degree is quantified by element-wise subtraction. Finally, the difference feature vector is generated by combining the difference weight distribution and value vector. This can reduce the representation error of semantic difference feature vectors, improve the calculation accuracy of reliability correction coefficients, and control the reliability evaluation error of companion robots in complex command scenarios to within 5%, effectively reducing the risk of misjudgment caused by semantic misunderstanding.
[0104] Step S300: Determine the difference coefficients of the caregiver's and the caregiver's habits and the difference coefficients of their language habits, and determine the reliability correction coefficient of the caregiver based on the semantic difference feature vector, the difference coefficients of the caregiver's habits and the difference coefficients of their language habits.
[0105] The lifestyle difference coefficient is an indicator used to quantify the differences between users and robots in their daily behavior patterns, such as sleep schedules, dietary preferences, or operating habits. It can be calculated through questionnaires, historical behavioral data statistics, or sensor records (such as activity frequency).
[0106] The language habit difference coefficient is an indicator used to reflect the differences between users and robots in their expression, such as dialect use, terminology preference, or sentence structure. For example, older people may be more inclined to use colloquial expressions, while robots default to standard Mandarin.
[0107] The reliability correction factor can be an adjustment factor generated by weighted fusion of the above-mentioned lifestyle difference coefficient, language difference coefficient and semantic difference feature vector. For example, if users are accustomed to using dialects, the correction factor may amplify the impact of language differences on the evaluation.
[0108] In one embodiment, determining the difference coefficients of lifestyle habits and language habits between the caregiver and the caregiver robot specifically includes:
[0109] Step S301: Based on the historical interaction data between the caregiver and the care robot, the difference coefficient of living habits is obtained by the analytic hierarchy process.
[0110] The Analytic Hierarchy Process (AHP) transforms subjective judgments into quantifiable weight values by constructing a judgment matrix and hierarchical structure. Its core includes establishing a target layer, a criterion layer, and a solution layer, calculating feature vectors, and performing consistency checks. For example, the AHP can include weighting sub-dimensions such as work-rest patterns, operational preferences, and dietary habits.
[0111] In one embodiment, obtaining the lifestyle difference coefficient based on the historical interaction data between the caregiver and the caregiver robot using the analytic hierarchy process (AHP) specifically includes: collecting historical interaction data between the caregiver and the caregiver robot; the historical interaction data includes the caregiver's lifestyle habit tags and the robot's response accuracy; constructing a lifestyle habit evaluation index system based on the historical interaction data; the lifestyle habit evaluation index system includes multiple primary indicators, each of which has corresponding secondary sub-indicators; calculating the weight vector of the primary indicators using the AHP, and combining it with the entropy weight of the secondary sub-indicators to generate the lifestyle difference coefficient.
[0112] Among them, historical interaction data is a structured data collection that records the interaction behavior between users and robots. It is obtained by parsing and labeling historical dialogue records, operation logs and environmental sensor data. For example, the lifestyle tags include quantitative indicators that describe user behavior patterns, such as regularity of work and rest, distribution of command time, and voice misrecognition rate.
[0113] Response accuracy is the probability that a robot will successfully complete a user's command in a specific interaction scenario. It is calculated by the ratio of the number of successful responses to the total number of interactions, such as the proportion of commands issued by a user at night that the robot responds correctly.
[0114] The lifestyle habit evaluation index system is a multi-level assessment framework used to quantitatively evaluate the differences between user and robot behavior. It achieves systematic analysis by decomposing user behavioral characteristics into measurable index levels. The primary indexes are abstract dimensions reflecting core user lifestyle habit characteristics, such as regularity of sleep patterns and matching degree of operational habits. The secondary sub-indicators are detailed parameters that specifically describe the primary indexes, such as nighttime interaction frequency and command time fluctuation rate under the context of regularity of sleep patterns. In a specific embodiment, the index system can be constructed by combining domain expert interviews with data clustering analysis to ensure coverage of the main dimensions of user behavior.
[0115] The weight vector of the first-level indicators calculated by the analytic hierarchy process (AHP) is a subjective weight allocation result determined through expert ratings or user surveys. Its generation process includes constructing a relative importance judgment matrix among indicators, calculating eigenvectors, and verifying the rationality of the weights through consistency checks. The entropy weight method, on the other hand, is an objective weight calculated based on the degree of variation in the data of the second-level sub-indicators. Its calculation process includes calculating the information entropy of each sub-indicator dataset and then allocating weights according to the entropy values. For example, the greater the volatility of a sub-indicator's data, the lower its information entropy, and the higher its weight allocation ratio.
[0116] In one specific embodiment, when determining the difference coefficient of living habits, the historical interaction data is first tagged to extract user living habit characteristics and robot response performance parameters. Secondly, an evaluation system containing multi-level indicators is constructed based on business needs. For example, "operation habit matching degree" is set as a primary indicator, which includes secondary indicators such as gesture recognition accuracy and voice command mis-touch rate. Thirdly, the subjective weight of each primary indicator is determined using the analytic hierarchy process (AHP). For example, the weight ratio of "work-rest regularity" and "environmental preference consistency" is determined through pairwise comparisons by experts. Subsequently, entropy weights are calculated for the secondary sub-indicators under each primary indicator. For example, information entropy is calculated for the "nighttime interaction frequency" data, and its weight coefficient is determined. Finally, the AHP weights of the primary indicators are multiplied by the entropy weights of the secondary sub-indicators to obtain the composite weight coefficients of each sub-indicator, which are then used to generate the difference coefficient of living habits through weighted calculation.
[0117] Furthermore, the adaptability of evaluation results to dynamic changes in user behavior can be improved through the synergistic optimization of subjective and objective weights. By collecting historical interaction data including lifestyle habit tags and response accuracy, an evaluation system with multi-level indicators is constructed. The analytic hierarchy process (AHP) is used to determine the subjective weights of the first-level indicators, and the entropy weight method is combined to calculate the objective weights of the second-level sub-indicators based on the degree of data variation. Finally, a composite weight coefficient is generated to quantify differences. Subjective weights ensure the dominant role of expert experience in key indicators, while the data-driven entropy weight method dynamically optimizes the weight allocation of sub-indicators, thereby improving the comprehensiveness and accuracy of the evaluation results. Through the composite calculation mechanism of weight coefficients, the quantification results of lifestyle habit differences can accurately reflect the actual deviation between user behavior and robot response. When user interaction patterns change significantly, the system can automatically increase the weights of relevant indicators through the entropy weight method, avoiding the evaluation distortion caused by rigid weights in traditional single methods. This effectively identifies the impact of implicit differences such as "nighttime interaction failure rate" on reliability evaluation, thereby supporting the robot to continuously provide accurate services in scenarios with dynamic changes in user behavior.
[0118] Step S302: Calculate the similarity between the user's pronunciation data and the preset dialect database to obtain the language habit difference coefficient.
[0119] Pronunciation data refers to the acoustic feature parameters in user voice interaction, including fundamental frequency, speech rate, and phoneme duration. For example, pronunciation data may include the acoustic feature record of the word "air conditioner" in Cantonese.
[0120] A dialect database is a collection that stores audio or text samples of different dialects. For example, a dialect database may contain acoustic templates of the word "open window" in Wu or Min Nan dialects.
[0121] When determining the language habit difference coefficient by calculating the similarity between pronunciation data and a dialect database, the process first involves collecting user speech signals and extracting acoustic features. Then, the feature vectors are dynamically time-normalized or matched with dialect database templates using cosine similarity. Next, difference levels are categorized based on similarity scores and correction coefficients are mapped. Finally, the database and correction coefficients are continuously updated to adapt to changes in user habits. This method can accurately identify dialect differences. For example, when a user pronounces "medicine" in Wu dialect, acoustic feature matching avoids misinterpretation of the text. Simultaneously, the dynamic update mechanism allows the coefficients to adjust as user language habits change; for instance, as the user's Mandarin usage increases, the correction coefficients approach the baseline value.
[0122] In steps S301 and S302, the differences in living habits are decomposed into quantifiable sub-dimensions by using the analytic hierarchy process and combined with weight calculation. At the same time, the differences in language habits are accurately identified based on the similarity matching between acoustic features and dialect databases. The adaptability of coefficient calculation is improved through a dynamic update mechanism. This can improve the accuracy of difference coefficient calculation, reduce the risk of reliability misjudgment caused by differences in dialects or behavioral patterns, and enhance the long-term adaptability of the system.
[0123] Step S400: Based on the reliability correction coefficient and the preset benchmark reliability index, generate a comprehensive reliability evaluation result for the companion robot.
[0124] Baseline reliability metrics are general evaluation standards that do not take into account user differences, such as response accuracy, task completion time, or failure rate. These metrics are typically determined through laboratory testing or historical data. The comprehensive reliability evaluation result is the final score obtained after weighting the baseline metrics with correction factors. For example, the baseline accuracy of 90% may be adjusted to 85% to reflect the impact of differences in user habits.
[0125] The correction factor can be combined with the benchmark metric through mathematical calculations. For example, if the benchmark reliability metric is "response accuracy," then the overall evaluation result = benchmark accuracy × reliability correction factor. If the correction factor is negative, it indicates that the difference has led to a decrease in reliability, and the result will be lower than the benchmark value; conversely, it may improve. By providing dynamic and personalized reliability assessments, it is possible to guide manufacturers to optimize products in a targeted manner when the scores of the same robot may differ significantly among different user groups.
[0126] In one embodiment, after generating a comprehensive reliability evaluation result for the companion robot based on the reliability correction coefficient and a preset benchmark reliability index, the method further includes: determining a confidence score for the comprehensive reliability evaluation result; if the confidence score is less than a preset confidence threshold, controlling the companion robot to enter an adaptive learning mode; in the adaptive learning mode, the companion robot can optimize the word vector model based on real-time acquired input text data.
[0127] The confidence score is a numerical value that quantifies the credibility of a comprehensive reliability evaluation result. It is generated based on the output probability or model uncertainty estimate of a statistical model. This score can be obtained by analyzing uncertainty indicators such as the variance of semantic difference feature vectors and the dispersion of attention weight distribution in the Transformer model. For example, when a user's instruction "get that for me" is semantically ambiguous due to a lack of context, its corresponding confidence score may be lower than the confidence score of a user's explicit instruction "open the window".
[0128] The confidence threshold is a preset critical value used to determine the reliability boundary of the reliability evaluation result. Its setting method includes, but is not limited to, a fixed value or a dynamic adjustment mechanism. For example, if the threshold is set to 0.7, the system will trigger the companion robot to enter the adaptive learning mode when the confidence score is lower than this value.
[0129] Adaptive learning mode is a special operating mode that the robot enters, allowing model parameters to be dynamically adjusted through real-time interactive data, rather than relying entirely on pre-trained parameters. For example, in this mode, the robot can collect user dialect pronunciation data and update the embedding layer parameters of the word vector model.
[0130] Real-time input text data refers to the commands or dialogue content issued by the user in real time during the current interaction. This data can be obtained through speech recognition modules or text input interfaces. For example, a user saying "turn off the lights" in a dialect would fall into this category.
[0131] Word vector models can be optimized by updating model parameters through online learning or fine-tuning techniques. Specific examples include adjusting the embedding layer weights of the BERT model or the attention mechanism parameters of the Transformer. For instance, the optimized model can improve the semantic similarity between the semantic vectors of "off" and "closed".
[0132] The system can quantitatively evaluate the reliability of its assessment results by extracting metrics such as the variance of semantic difference feature vectors and the coverage of historical interaction data, combined with a weighted formula (e.g., confidence score = 0.7 × variance + 0.3 × coverage). Through the synergistic effect of confidence score calculation and threshold comparison, the system can determine the credibility of the reliability evaluation results. When the calculated result is below the threshold, the system will trigger a mode switching mechanism, causing the robot to pause its regular response and start an adaptive learning mode. In this mode, the robot incrementally trains and fuses real-time input text data with historical data, updates model parameters using algorithms such as mini-batch gradient descent, and can actively request user feedback to optimize semantic understanding. For example, when a user issues the vague command "open the window," the system not only performs the window-opening action but also records pronunciation features and asks the user if they are satisfied with the current operation, thereby adjusting the model parameters. Finally, when the confidence score recovers to above the threshold or the predetermined learning cycle is completed, the system will exit the adaptive mode, solidify the optimized model parameters, and recalculate the reliability evaluation results.
[0133] By dynamically evaluating confidence scores and triggering adaptive learning modes, combined with real-time data-driven model optimization strategies, the system can dynamically adjust its operating mode based on the uncertainty of the interaction scenario. By quantifying the credibility boundary of reliability evaluation results, resource-intensive learning processes are initiated only when necessary, thereby improving the model's adaptability to individual differences while ensuring response efficiency. The system continuously collects user-specific dialect expressions and semantic bias cases to progressively optimize model parameters, effectively reducing the accumulation of semantic misunderstandings over long-term service. Simultaneously, the active learning strategy enhances the user-system interaction feedback loop, making the model evolution process transparent and thus increasing user trust.
[0134] In summary, the companion robot reliability evaluation method based on word vector semantic analysis provided in this embodiment transforms unstructured text into a computable vector form through a word vector model, accurately capturing semantic deviations; it combines user individual difference coefficients to correct benchmark indicators, solving the distortion problem caused by neglecting user characteristics in traditional evaluation methods; it dynamically adjusts evaluation results to reflect actual performance in different scenarios, reducing the frequency of return-to-factory testing and lowering maintenance costs, while simultaneously improving user trust and satisfaction with robot services.
[0135] Based on the same inventive concept as the above embodiments, this embodiment also provides a reliability evaluation system for companion robots based on word vector semantic analysis, including a processor and a memory; wherein, the memory stores a computer program, which is used by the processor to load and execute the reliability evaluation method for companion robots based on word vector semantic analysis as described above.
[0136] like Figure 2As shown, based on the same inventive concept as the above embodiments, this embodiment also provides a computer-readable storage medium storing instructions for being loaded and executed by a processor, as described above, of the companion robot reliability evaluation method based on word vector semantic analysis.
[0137] The embodiments of the mobile terminal and computer-readable storage medium provided in this application include all the technical features of the embodiments of the above control method. The extended and explanatory content of the specification is basically the same as that of the embodiments of the above method, and will not be repeated here.
[0138] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.
[0139] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.
[0140] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0141] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.
[0142] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0143] The technical features of the present application can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in the above-mentioned storage medium and includes several instructions to cause a terminal device to execute the methods of each embodiment of this application. The above are only preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0145] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0146] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A reliability evaluation method for companion robots based on word vector semantic analysis, characterized in that, include: Acquire the input text data from the caregiver and the response text data from the care robot; The input text data and response text data are encoded using a pre-trained word vector model to generate an input word vector sequence and a response word vector sequence, and the semantic difference feature vectors of the input word vector sequence and the response word vector sequence are determined. Specifically, determining the semantic difference feature vectors of the input word vector sequence and the response word vector sequence includes: using the input word vector sequence and the response word vector sequence as input, generating a bidirectional contextual feature vector through a Transformer model; the Transformer model includes a query space, a key space, and a value space, and the query space, the key space, and the value space each correspond to a query weight moment. The system comprises a key weight matrix and a value weight matrix. A query vector is constructed by taking the global semantic vector corresponding to the response word vector sequence from the bidirectional context feature vector, and a key vector is constructed by taking the local feature vector corresponding to the input word vector sequence from the bidirectional context feature vector. A difference weight distribution is generated by element-wise subtraction of the query vector and the key vector. The query vector is obtained by multiplying the global semantic vector by the query weight matrix. The key vector is obtained by multiplying the local feature vector by the key weight matrix. The semantic difference feature vector is generated by weighted summation of the difference weight distribution and the value vector. The value vector is obtained by multiplying the input word vector sequence by the value weight matrix. The process involves determining the difference coefficients of lifestyle habits and language habits between the caregiver and the caregiver robot, and then determining the reliability correction coefficient of the caregiver robot based on the semantic difference feature vector, the difference coefficients of lifestyle habits, and the difference coefficients of language habits. Specifically, determining the difference coefficients of lifestyle habits and language habits between the caregiver and the caregiver robot includes: obtaining the difference coefficient of lifestyle habits based on historical interaction data between the caregiver and the caregiver robot using the analytic hierarchy process (AHP); and calculating the similarity between the user's pronunciation data and a preset dialect database to obtain the difference coefficient of language habits. Based on the reliability correction coefficient and the preset benchmark reliability index, a comprehensive reliability evaluation result for the companion robot is generated.
2. The reliability evaluation method for companion robots based on word vector semantic analysis according to claim 1, characterized in that, The word vector model is the BERT model; the process of encoding the input text data and response text data using the pre-trained word vector model to generate the input word vector sequence and the response word vector sequence specifically includes: The input text data and the response text data are merged using classification and delimiter identifiers to generate a joint input sequence; The joint input sequence is processed through the embedding layer of the BERT model to generate a word vector matrix; each row of the word vector matrix corresponds to the context-related vector of a subword. The boundaries of the word vector matrix are located based on the positions of the classification identifier and the separator identifier, thereby separating the input word vector sequence and the response word vector sequence.
3. The reliability evaluation method for companion robots based on word vector semantic analysis according to claim 2, characterized in that, The process of merging the input text data and the response text data using classification and delimiter identifiers to generate a joint input sequence specifically includes: Add a classification identifier to the header of the input text data and the response text data; Add a first separator between the input text data and the response text data; Add a second separator to the end of the input text data and the response text data; Based on the classification identifier, the first separator identifier, and the second separator identifier, the input text data and the response text data are merged to form a joint input sequence.
4. The method for reliability evaluation of companion robots based on word vector semantic analysis according to claim 3, characterized in that, The step of locating the boundaries of the word vector matrix based on the positions of the classification identifier and the separator identifier, thereby separating the input word vector sequence and the response word vector sequence, specifically includes: In the index positions of the joint input sequence, the input word vector sequence is separated from the index position after the classification identifier to the index position before the first delimiter; In the index positions of the joint input sequence, the response word vector sequence is separated from the index position after the first separator to the index position before the second separator.
5. The method for reliability evaluation of companion robots based on word vector semantic analysis according to claim 1, characterized in that, The semantic difference feature vector is calculated and determined by the following formula: in, The semantic difference feature vector; Indicates the first The query vector of a sequence; Indicates the first The key vectors of the sequences; The sequence length of the bidirectional context feature vector; Indicates the first The dimension of the key vector of each sequence; It is a value vector.
6. The reliability evaluation method for companion robots based on word vector semantic analysis according to claim 1, characterized in that, The difference coefficient of living habits is obtained by using the analytic hierarchy process (AHP) based on the historical interaction data between the caregiver and the care robot. Specifically, this includes: Collect historical interaction data between the caregiver and the care robot; the historical interaction data includes the caregiver's lifestyle habit tags and the robot's response accuracy. A lifestyle habit evaluation index system is constructed based on the historical interaction data; the lifestyle habit evaluation index system includes multiple primary indicators, and each primary indicator has corresponding secondary sub-indicators. The weight vector of the first-level indicator is calculated using the analytic hierarchy process (AHP), and combined with the entropy weight of the second-level sub-indicators, a coefficient of difference in living habits is generated.
7. The reliability evaluation method for companion robots based on word vector semantic analysis according to claim 1, characterized in that, After generating the comprehensive reliability evaluation result of the companion robot based on the reliability correction coefficient and the preset benchmark reliability index, the following steps are also included: Determine the confidence score of the comprehensive reliability evaluation results; If the confidence score is less than a preset confidence threshold, the companion robot is controlled to enter an adaptive learning mode; in the adaptive learning mode, the companion robot can optimize the word vector model based on the real-time acquired input text data.
8. A reliability evaluation system for companion robots based on word vector semantic analysis, characterized in that, It includes a processor and a memory; wherein the memory stores a computer program for being loaded by the processor and executed as described in any one of claims 1-7, which is a method for evaluating the reliability of a companion robot based on word vector semantic analysis.
Citation Information
Patent Citations
Medical accompanying robot system based on Internet of Things
CN112828911A
Text feature generation method and device combining RPA and AI, equipment and storage medium
CN114579718A