A robot interaction mode switching method based on environmental context and tone distribution difference judgment

By collecting and preprocessing environmental context and tone distribution data, calculating the degree of difference, and performing dynamic threshold comparison and fuzzy logic algorithm decision-making, the problem of judging the difference between environmental context and user tone distribution in robot interaction is solved, realizing real-time and personalized response of robot interaction.

CN122220786APending Publication Date: 2026-06-16BEIJING HAIBAICHUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HAIBAICHUAN TECH CO LTD
Filing Date
2026-03-23
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, the degree of difference between the environmental context and the user's tone of voice in a robot interaction environment cannot be determined in real time, leading to incorrect selection of interaction modes and affecting the accuracy and fluency of the response.

Method used

By collecting environmental context data and user tone distribution data of the robot's interaction environment, the difference between the environmental context and tone distribution is calculated after preprocessing. Cosine similarity is calculated using multi-dimensional feature vector space. Interaction mode switching decisions are made by combining dynamic threshold adjustment algorithm and fuzzy logic algorithm. In case of abnormality, backup data source is activated to achieve adaptive optimization.

Benefits of technology

Real-time assessment of the differences between the environmental context and the user's tone of voice reduces interaction mode selection errors, improves response accuracy and personalization, reduces false triggers, and ensures the timeliness and reliability of interaction mode switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220786A_ABST
    Figure CN122220786A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of robot interaction, and discloses a robot interaction mode switching method based on environment context and tone distribution difference judgment, which comprises the following steps: collecting environment context data and user tone distribution data of a robot interaction environment, pre-processing the environment context data and the tone distribution data, generating environment context pre-processing data and tone distribution pre-processing data, performing difference degree calculation and processing on environment context features and tone distribution features based on the environment context pre-processing data and the tone distribution pre-processing data, and generating environment context and tone distribution difference judgment data, which can judge the difference degree between the environment context and the user tone distribution in real time, reduce the interaction mode selection error problem caused by unclear differences, and reduce the risk of interaction mode mis-matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot interaction technology, specifically a method for switching robot interaction modes based on the difference between environmental context and tone distribution. Background Technology

[0002] The robot interaction mode switching method based on the difference between environmental context and tone distribution is a complex system that integrates multiple advanced technologies. It aims to improve the robot's adaptability and user experience accuracy in multimodal interaction scenarios. This is one of the core components of the system, responsible for capturing environmental context data and user tone distribution data of the robot's environment.

[0003] Currently, due to the presence of various dynamic factors in the robot interaction environment, when switching robot interaction modes in real time, the equipped context detection module collects environmental data but cannot determine the degree of difference between the environmental context and the user's tone distribution in real time. When the context and tone do not match, the wrong interaction mode is selected, which will cause the robot to respond inaccurately and fail to guarantee the smoothness of the interaction.

[0004] Therefore, a robot interaction mode switching method based on the difference between environmental context and tone distribution is proposed to solve the above problems. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a robot interaction mode switching method based on the judgment of differences between environmental context and tone distribution, which solves the problem mentioned in the background technology of being unable to judge the degree of difference between environmental context and user tone distribution in real time.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for switching robot interaction modes based on the difference between environmental context and tone distribution, the method comprising the following steps: S1. Collect environmental context data and user tone distribution data of the robot's interaction environment; S2. Preprocess the environmental context data and the tone distribution data to generate environmental context preprocessed data and tone distribution preprocessed data. S3. Based on the preprocessed environmental context data and the preprocessed intonation distribution data, calculate the difference between environmental context features and intonation distribution features to generate judgment data on the difference between environmental context and intonation distribution. S4. Based on the difference between the environmental context and tone distribution, perform interaction mode switching threshold comparison processing to generate interaction mode switching trigger data. When the difference between the environmental context and tone distribution does not exceed the preset threshold, directly execute step S6. S5. When the difference between the environmental context and tone distribution judgment data exceeds a preset threshold, perform interaction mode decision processing to generate target interaction mode data. S6. Based on the interaction mode switching trigger data, execute the robot interaction mode switching operation to generate interaction mode switching execution data; S7. Evaluate the effect of the interaction mode switching execution data, generate interaction mode switching optimization data, and feed it back to step S1 to achieve adaptive adjustment.

[0007] Preferably, the step S1 of collecting environmental context data and user tone distribution data of the robot interaction environment includes the following steps: S11. Collect environmental context data of the robot's interactive environment through a multimodal sensor array mounted on the robot. The multimodal sensor array includes a microphone array, a light sensor, and a depth camera. The environmental context data represents a set of environmental parameters in the robot's interactive environment with time series as the reference system. S12. Collect user pitch distribution data through the voice processing module integrated in the robot. The voice processing module includes a high-fidelity microphone and a digital signal processor. The pitch distribution data represents the pitch parameter distribution curve of the user's voice based on the time axis.

[0008] Preferably, the generation of environmental context preprocessing data and intonation distribution preprocessing data in step S2 includes the following steps: S21. Import the generated environmental context data and the tone distribution data into the robot interaction management platform, and use the wavelet transform algorithm to denoise and normalize the environmental context data to generate environmental context preprocessing data. S22. The Fourier transform algorithm is used to perform spectral analysis and feature enhancement on the intonation distribution data to generate intonation distribution preprocessed data.

[0009] Preferably, the step S3 of generating environmental context and intonation distribution difference judgment data includes the following steps: S31. Obtain the environmental context preprocessing data and the intonation distribution preprocessing data; S32. Input the preprocessed environmental context data and the preprocessed intonation distribution data into the difference calculation model, calculate the cosine similarity between the environmental context features and the intonation distribution features based on the multidimensional feature vector space, and generate environmental context and intonation distribution difference judgment data based on the similarity threshold. When the cosine similarity between the preprocessed environmental context data and the preprocessed intonation distribution data is higher than 0.8, the output of the environmental context and intonation distribution difference judgment data is low difference. When the cosine similarity between the preprocessed environmental context data and the preprocessed intonation distribution data is less than 0.8, the output of the environmental context and intonation distribution difference judgment data is high difference.

[0010] Preferably, generating the interaction mode switching trigger data in step S4 includes the following steps: S41. When the difference between the environmental context and tone distribution is high, a dynamic threshold adjustment algorithm is used to compare the difference between the environmental context and tone distribution with a preset threshold in real time. The preset threshold is dynamically generated by a machine learning model based on the user's historical interaction behavior data. S42. When the difference between the environmental context and the tone distribution exceeds the preset threshold, generate the interaction mode switching trigger data and activate step S5. When the difference between the environmental context and the tone distribution is not exceeded by the preset threshold, the interaction mode maintenance data is generated and step S6 is executed directly.

[0011] Preferably, generating the target interaction mode data in step S5 includes the following steps: S51. When the interaction mode switching triggers data activation, a multi-dimensional interaction mode decision matrix is ​​established, which includes three types: formal interaction mode, leisure interaction mode, and emergency interaction mode. S52. Based on the differences in environmental context and tone distribution, determine the size of the data, use fuzzy logic algorithm to calculate the applicability score of each interaction mode, and select the interaction mode with the highest score as the target interaction mode data.

[0012] Preferably, generating the interaction mode switching execution data in step S6 includes the following steps: S61. Convert the interaction mode switching trigger data into robot control commands; S62. Perform interaction mode switching operations through the robot motion control module and speech synthesis module, including adjusting the robot's voice output volume, modifying the dialogue content style, and changing the robot's limb movement trajectory; S63. Monitor the switching process in real time, generate interactive mode switching execution data and store it in the robot interaction log database.

[0013] Preferably, the step S7 of generating interaction mode switching optimization data includes the following steps: S71. Collect user feedback data after switching interaction modes, including voice response time, changes in user facial expressions, and completion rate of interactive tasks; S72. Compare user feedback data with expected interaction effects to generate an evaluation score for the interaction mode switching effect; S73. When the evaluation score is lower than the preset standard, the data acquisition parameters in step S1 are automatically adjusted to realize the adaptive optimization loop of the interactive mode switching method.

[0014] Preferably, the method further includes an exception handling mechanism, which enables backup data sources, including pre-stored environment templates and default tone libraries, when the collection of environmental context data and tone distribution data fails.

[0015] Preferably, the exception handling mechanism specifically includes: S101. Real-time monitoring of the working status of the multimodal sensor array and voice processing module through a heartbeat detection algorithm; S102. When a data acquisition device malfunction is detected, automatically switch to the cloud historical database to retrieve similar environmental context and tone distribution data; S103. Use an interpolation algorithm to generate data to judge the difference between the simulated environment context and intonation distribution, and maintain the continuity of the interactive mode switching function.

[0016] Compared with existing technologies, this invention provides a robot interaction mode switching method based on the judgment of differences in environmental context and tone distribution, which has the following beneficial effects: 1. In this invention, when switching robot interaction modes in real time, environmental context data and user tone distribution data of the robot interaction environment are collected. Based on the preprocessed environmental context data and tone distribution data, the difference between environmental context features and tone distribution features is calculated and processed to generate environmental context and tone distribution difference judgment data. This can judge the degree of difference between environmental context and user tone distribution in real time, reduce the problem of incorrect interaction mode selection due to unclear differences, ensure the accuracy of robot interaction response, and reduce the risk of mismatch of interaction modes.

[0017] 2. In this invention, when comparing the threshold for switching robot interaction modes, the threshold comparison is performed based on the difference in environmental context and tone distribution. A dynamic threshold adjustment algorithm is used to compare the difference judgment data with the preset threshold in real time. The preset threshold is dynamically generated based on the user's historical interaction behavior data through a machine learning model, enabling the system to adapt to the dynamic changes in different user habits, reducing the delay and false triggering of interaction mode switching. Furthermore, when the threshold is abnormal, adaptive adjustment is achieved through real-time comparison, ensuring the timeliness and reliability of interaction mode switching.

[0018] 3. In this invention, when making robot interaction mode decisions, if the difference judgment data of environmental context and tone distribution exceeds a preset threshold, an interaction mode decision matrix is ​​established by performing interaction mode decision processing, including formal interaction mode, casual interaction mode and emergency interaction mode. Based on the magnitude of the difference judgment data, a fuzzy logic algorithm is used to calculate the applicability score of each interaction mode, realizing multi-dimensional difference analysis. This enables the system to flexibly cope with complex interaction scenarios, reduce the problem of rigid interaction mode switching, and improve the personalization and real-time effect of robot interaction. Attached Figure Description

[0019] Figure 1 This is a flowchart of the robot interaction mode switching method based on the difference between environmental context and tone distribution according to the present invention. Detailed Implementation

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

[0021] Please see Figure 1 This method for switching robot interaction modes based on the difference between environmental context and intonation distribution includes the following steps: S1. Collect environmental context data and user tone distribution data of the robot's interaction environment; S2. Preprocess the environmental context data and intonation distribution data to generate preprocessed environmental context data and preprocessed intonation distribution data. S3. Based on the preprocessed environmental context data and the preprocessed intonation distribution data, calculate the difference between environmental context features and intonation distribution features to generate data for judging the difference between environmental context and intonation distribution. S4. Based on the difference between the environmental context and tone distribution, the interaction mode switching threshold is compared and processed to generate interaction mode switching trigger data. When the difference between the environmental context and tone distribution does not exceed the preset threshold, step S6 is executed directly. S5. When the difference between the environmental context and tone distribution data exceeds the preset threshold, perform interaction mode decision processing to generate target interaction mode data. S6. Based on the interaction mode switching trigger data, execute the robot interaction mode switching operation and generate interaction mode switching execution data; S7. Evaluate the effect of the interaction mode switching execution data, generate interaction mode switching optimization data, and feed it back to step S1 to achieve adaptive adjustment. The steps involved in collecting environmental context data and user tone distribution data for the robot's interaction environment in S1 are as follows: S11. Collect environmental context data of the robot's interactive environment through a multimodal sensor array mounted on the robot. The multimodal sensor array includes a microphone array, a light sensor, and a depth camera. The environmental context data represents a set of environmental parameters in the robot's interactive environment with time series as the reference system. S12. Collect user intonation distribution data through the voice processing module integrated in the robot. The voice processing module includes a high-fidelity microphone and a digital signal processor. The intonation distribution data represents the distribution curve of intonation parameters in the user's voice based on the time axis. The steps involved in generating preprocessed environmental context data and intonation distribution data in S2 are as follows: S21. Import the generated environmental context data and tone distribution data into the robot interaction management platform, and use wavelet transform algorithm to denoise and normalize the environmental context data to generate environmental context preprocessing data. The specific process of wavelet transform denoising: First, wavelet decomposition: The original environmental context data is decomposed into wavelet coefficients of multiple scales using Discrete Wavelet Transform (DWT). DWT uses a set of low-pass and high-pass filters to decompose the signal into approximation coefficients and detail coefficients. The decomposition formula can be expressed as: ; in, For the first Layer approximation coefficients For the first Layer detail factor, Original environmental context data, For scaling function, For wavelet functions, For time indexing, The wavelet decomposition level is denoted as . For coefficient index; The number of decomposition layers is selected based on the signal characteristics, usually 3-5 layers, to ensure that noise is mainly concentrated in the detail coefficients; Secondly, thresholding: Thresholding rules are applied to detail coefficients to suppress noise. Common methods include soft thresholding and hard thresholding, with soft thresholding better preserving signal smoothness. The soft thresholding formula is as follows: ; in, The detail coefficients after thresholding. For symbolic functions, For threshold parameters, This is for calculating the maximum value. This step removes high-frequency noise while avoiding over-smoothing; Finally, signal reconstruction: using the thresholded detail coefficients and the original approximation coefficients, the denoised signal is reconstructed through inverse discrete wavelet transform. The reconstruction formula is: ; in, The signal after denoising. For detail coefficients, These are approximate coefficients. For wavelet functions, For scaling function, For continuous time variables; At this point, the denoising process is complete, the output signal is cleaner, and it is easier to extract features later. The specific process of wavelet transform normalization: This process includes two stages: scale normalization and data standardization. In the scale normalization stage, the approximate coefficients obtained from wavelet decomposition are used for energy normalization. Since the energy differences of coefficients at different scales are large, the coefficients need to be scaled to make their energy consistent. The formula can be expressed as: ; in, These are the normalized approximate coefficients. These are the normalized detail coefficients. The L2 norm of the approximate coefficients, The L2 norm of the detail coefficients; Next, the data standardization stage: the normalized coefficients are reconstructed into a signal, and global standardization is performed, commonly using minimum-maximum normalization, with the following formula: ; in, For the standardized signal, The signal after denoising. The minimum value of the signal. This represents the maximum value of the signal. This step maps the data to a fixed interval, ensuring that the environmental context preprocessing data has a consistent dimension, providing reliable input for subsequent difference calculations; S22. The Fourier transform algorithm is used to perform spectral analysis and feature enhancement processing on the intonation distribution data to generate intonation distribution preprocessed data; Spectrum analysis processing procedure: Spectral analysis aims to decompose the time-domain pitch distribution signal into frequency-domain components and identify dominant frequency features. First, the input pitch distribution data is preprocessed, including pre-emphasis and frame-by-frame windowing to reduce spectral leakage. Then, the Discrete Fourier Transform (DFT) is applied to calculate the spectrum. ; in, It is a frequency domain signal. For intonation distribution data, For complex exponential basis functions, For time indexing, For frequency index, For frame length, The imaginary unit; Feature enhancement process: Feature enhancement, based on spectral analysis results, strengthens key intonation components and suppresses noise. Firstly, a bandpass filtering strategy is employed: a bandpass filter is designed according to the range of human voice audio, and the spectrum is... Weighting: ; in Let be the filter weighting function. The enhanced frequency domain signal; Next, dynamic range compression is performed, and logarithmic compression is applied to the amplitude spectrum to enhance details of weak components: ; in, The compression factor is 1. The amplitude spectrum is compressed. The amplitude of the frequency domain signal; Finally, background noise is suppressed by spectral subtraction: the noise spectrum is estimated and then subtracted from the original spectrum. ; in, The amplitude spectrum after denoising. The noise spectrum amplitude; The enhanced spectrum is reconstructed into a time-domain signal by inverse Fourier transform, generating preprocessed pitch distribution data; The steps involved in generating data to determine the differences between contextual and intonation distribution in S3 are as follows: S31. Obtain environmental context preprocessing data and intonation distribution preprocessing data; S32. Input the preprocessed environmental context data and the preprocessed intonation distribution data into the difference calculation model, calculate the cosine similarity between the environmental context features and the intonation distribution features based on the multidimensional feature vector space, and generate the difference judgment data between the environmental context and the intonation distribution based on the similarity threshold. When the cosine similarity between the preprocessed environmental context data and the preprocessed intonation distribution data is higher than 0.8, the output environmental context and intonation distribution difference judgment data is low difference. When the cosine similarity between the preprocessed environmental context data and the preprocessed intonation distribution data is less than 0.8, the output environmental context and intonation distribution difference judgment data is high difference. The steps involved in generating interaction mode switching trigger data in S4 are as follows: S41. When the difference between the environmental context and tone distribution is high, a dynamic threshold adjustment algorithm is used to compare the difference between the environmental context and tone distribution with a preset threshold in real time. The preset threshold is dynamically generated by a machine learning model based on the user's historical interaction behavior data. Threshold dynamic generation stage: The preset threshold is not a fixed value, but is dynamically generated based on user historical interaction data through a machine learning model. First, the system extracts historical data from the robot interaction log database, including historical context and tone distribution difference judgment data and corresponding successful interaction mode switching records. Then, a time-series prediction model is used to train the historical data, learning the mapping relationship between difference judgment data and the optimal switching time. At the point of time The generating formula can be expressed as: ; in, To dynamically preset thresholds, For the current time, For historical data indexing, For historical data points, For the past Historical differences at specific points in time are used to determine data. These are the weighting coefficients. For bias terms, For the decision function of the machine learning model; This stage enables the threshold to adaptively adjust according to changes in user behavior patterns, providing a dynamic benchmark for real-time comparison; Real-time comparison and calculation stage: Data on the differences in environmental context and intonation distribution at the current point in time. Then, the system compares it with a dynamically preset threshold. Real-time comparison is performed, and the comparison process is based on a window sliding mechanism, within each time window. Internal calculation of the deviation of the differential data from the threshold: ; in, For deviation, For the current difference judgment data, For dynamically preset thresholds; Meanwhile, to enhance the robustness of the comparison, a fault tolerance factor is introduced. And a double threshold rule is used for judgment: when When the threshold is exceeded, the system determines that the interaction mode switching trigger data is generated and the decision processing in step S5 is activated. when If the condition is "not exceeding the preset threshold", the interactive mode maintenance data is generated and the process jumps directly to step S6. This comparison process is implemented using lightweight computing to ensure real-time switching of interaction modes; Threshold update phase: To achieve continuous adaptation, the dynamic threshold adjustment algorithm updates the preset threshold based on real-time feedback after each comparison. If the evaluation score is high after switching the current interaction mode, the current threshold is strengthened; if the score is lower than the preset standard, the parameters of the threshold generation model are adjusted using the gradient descent algorithm. ; in, For learning rate, Performance evaluation score The gradient with respect to the threshold parameter; The updated threshold is applied immediately to the next round of comparison, forming a closed-loop control of "comparison-evaluation-optimization"; S42. When the difference between the environmental context and the tone distribution exceeds the preset threshold, generate the interaction mode switching trigger data and activate step S5. When the difference between the environmental context and the tone distribution data does not exceed the preset threshold, the interaction mode maintenance data is generated and step S6 is executed directly. Generating target interaction pattern data in S5 includes the following steps: S51. When the interaction mode switching triggers data activation, a multi-dimensional interaction mode decision matrix is ​​established, which includes three types: formal interaction mode, casual interaction mode, and emergency interaction mode. S52. Based on the differences in environmental context and intonation distribution, the size of the data is judged. The applicability score of each interaction mode is calculated using fuzzy logic algorithm. The interaction mode with the highest score is selected as the target interaction mode data. The specific process can be divided into three key stages: input fuzzification, fuzzy rule reasoning and defuzzification. Input fuzzification is the process of converting precise input variables into fuzzy sets. The difference judgment data is a continuous value, which needs to be mapped to a fuzzy linguistic variable. Let the actual value of the difference judgment data be... Its membership degree to the "highly dissimilar" set Calculated using the following Gaussian membership function: ; in, It is the center point of the function. It is the width parameter. For data used to determine differences; Similarly, calculate Membership degree for "low difference" and "medium difference" and This step converts precise input values ​​into fuzzy quantities, laying the foundation for subsequent rule-based reasoning. Fuzzy rule reasoning is the process of mapping fuzzy inputs to fuzzy output sets based on a predefined fuzzy rule base. Defuzzification is the process of converting the output fuzzy set into a precise fitness score, which is the basis for the final decision. The centroid method is the most commonly used method, which calculates the center of the area under the membership function curve of the output fuzzy set. The membership function of the aggregated fuzzy set of "applicability of formal interaction modes". The final applicability score for this model is the applicability score. The calculation formula is: ; in, Rate the suitability of the formal interaction mode. For applicability score, The membership function after aggregation; This formula calculates the center point of the weighted average of the membership functions and uses it as the accurate applicability score. Similarly, the applicability score of the casual interaction mode is calculated. Applicability score of emergency interaction mode Ultimately, the system selects the interaction mode with the highest score as the target interaction mode data to complete the decision. The steps involved in generating interactive mode switching execution data in S6 are as follows: S61. Convert the interaction mode switching trigger data into robot control instructions; S62. Perform interaction mode switching operations through the robot motion control module and speech synthesis module, including adjusting the robot's voice output volume, modifying the dialogue content style, and changing the robot's limb movement trajectory; S63. Monitor the switching process in real time, generate interactive mode switching execution data and store it in the robot interaction log database; The steps involved in generating interaction mode switching optimization data in S7 are as follows: S71. Collect user feedback data after switching interaction modes, including voice response time, changes in user facial expressions, and completion rate of interactive tasks; S72. Compare user feedback data with expected interaction effects to generate an evaluation score for the interaction mode switching effect; S73. When the evaluation score is lower than the preset standard, the data acquisition parameters in step S1 are automatically adjusted to realize the adaptive optimization loop of the interactive mode switching method. The method also includes an exception handling mechanism, which enables backup data sources, including pre-stored environment templates and default tone libraries, when the collection of environmental context data and tone distribution data fails. The exception handling mechanism specifically includes: S101. Real-time monitoring of the working status of the multimodal sensor array and voice processing module through a heartbeat detection algorithm; Heartbeat signal generation stage: The multimodal sensor array and voice processing module, acting as the monitored devices, periodically generate and send heartbeat signals. These heartbeat signals contain device identifiers, timestamps, and brief status data, with signal transmission intervals. Dynamic adjustment based on equipment type: For high-priority equipment, the interval is shorter; for low-priority equipment, the interval can be extended. The interval adjustment formula can be expressed as: ; in, It is the basic interval. It is the load factor. This is the current load of the device. This is the maximum allowable load; This ensures shorter intervals and improved monitoring sensitivity under high loads, with signals transmitted to the monitoring unit of the robot interaction management platform via an internal bus; Signal reception and timeout detection phase: The monitoring unit continuously listens for heartbeat signals and maintains a heartbeat record table, storing the latest signal timestamp for each device. The latest heartbeat time is The current time is Timeout detection is based on a preset timeout threshold. The monitoring unit periodically scans all devices and calculates the time difference: ; when If so, a timeout alarm will be triggered; To reduce false alarms, the algorithm employs a sliding window mechanism to check the number of consecutive timeouts: Let the window size be... When continuous If all tests time out, it is identified as a potential fault, which improves robustness and avoids the impact of instantaneous network jitter. Fault diagnosis and response phase: When a device is judged to have timed out, the algorithm further analyzes the fault type. First, it calculates the fault confidence score. Based on the consistency of historical heartbeat data: ; in, It is an indicator function. For detecting the index within the window, when If so, it is confirmed as a fault; S102. When a data acquisition device malfunction is detected, automatically switch to the cloud historical database to retrieve similar environmental context and tone distribution data; S103. Use interpolation algorithms to generate data to judge the differences between simulated environmental context and intonation distribution, and maintain the continuity of the interactive mode switching function. Interpolation algorithms construct a mathematical function To pass through the known set of data points Thus, the estimate is made. Missing values ​​at time points The methods typically employ lightweight algorithms such as linear interpolation and spline interpolation to balance computational efficiency and accuracy; Linear interpolation model: This is the simplest method. Assume the function changes linearly between adjacent data points, and its formula is: ; in, and It is adjacent Two historical data points, For the current moment Simulated difference data, For a historic moment The difference data, For a historic moment Difference data; This method is fast and suitable for scenarios where data changes gradually. Spline interpolation model: When historical data fluctuates significantly, a smoother cubic spline interpolation is used. This is achieved by constructing a piecewise cubic polynomial function. To connect all data points and ensure the continuity of the first and second derivatives at the connection points, thus making the interpolation curve smoother, its functional form is: ; in, For spline coefficients, The starting time of the segmented interval, The end time of the segmented interval; coefficient By solving a tridiagonal linear equation system to satisfy the boundary conditions and continuity of all data points, spline interpolation can better capture the changing trend of the data, but the computational cost is relatively large. The algorithm selection is based on the fault type and system real-time requirements: linear interpolation is preferred for transient faults, while spline interpolation is used for persistent faults and complex data changes. After calculation based on the selected interpolation model, the data for judging the difference between the simulated environment context and intonation distribution at the current moment is generated.

[0022] The operation steps of a robot interaction mode switching method based on the difference between environmental context and tone distribution are as follows: Step 1: Data Acquisition Principles The first step of the method is to collect environmental context data and user tone distribution data of the robot's interaction environment. The environmental context data is acquired through a multimodal sensor array on the robot, including a microphone array, a light sensor, and a depth camera. These sensors capture a set of environmental parameters based on time series. The user tone distribution data is collected through a speech processing module composed of a high-fidelity microphone and a digital signal processor, forming a tone parameter distribution curve based on the time axis, including pitch, volume, and speech features. The acquisition process emphasizes real-time performance and completeness to provide the raw data foundation for subsequent processing.

[0023] Step 2: Data Preprocessing Principles The collected raw data needs to be preprocessed to eliminate noise and enhance features. Environmental context data is denoised and normalized using wavelet transform: first, the data is decomposed into approximation coefficients and detail coefficients through discrete wavelet transform; then, a soft thresholding rule is applied to suppress high-frequency noise; finally, a clean signal is reconstructed through inverse transform and min-max normalization is performed to ensure that the data has consistent dimensions. Pitch distribution data is analyzed and enhanced using Fourier transform: the time-domain signal is converted into frequency-domain components through discrete Fourier transform; then, bandpass filters and dynamic range compression techniques are used to enhance key human voice features; and background noise is suppressed through spectral subtraction. The preprocessed data generates environmental context preprocessed data and pitch distribution preprocessed data to ensure the accuracy of subsequent difference calculations.

[0024] Step 3: Principle of Difference Calculation Based on preprocessed data, the method calculates the difference between environmental context features and intonation distribution features. The principle is to input the preprocessed environmental context data and the preprocessed intonation distribution data into the difference calculation model, and calculate the cosine similarity in the multidimensional feature vector space. Specifically, the two types of data are represented by vectorization, and the cosine value of the angle between them is calculated as a similarity index. The similarity threshold is set to 0.8: when the cosine similarity is higher than 0.8, low difference judgment data is output, indicating that the environment and intonation are consistent; when it is lower than 0.8, high difference judgment data is output, indicating that the environment and intonation are inconsistent. The core of this step is to quantify the degree of difference, providing a decision basis for switching interaction modes.

[0025] Step 4: Threshold Comparison Principle The difference judgment data needs to be compared with a preset threshold in real time to trigger the switching of the interaction mode. The preset threshold is not a fixed value, but is dynamically generated by a machine learning model based on the user's historical interaction behavior data. It can adapt to different user habits. The comparison process adopts a dynamic threshold adjustment algorithm. First, the threshold mapping relationship is learned from historical data through a time series prediction model. Then, the deviation between the difference data and the threshold is calculated at the current time point, and a fault tolerance factor is introduced to perform double threshold judgment. When the difference data exceeds the threshold, the interaction mode switching trigger data is generated to activate the decision processing. Otherwise, the maintenance data is generated and the switching operation is executed directly. This principle ensures the timeliness and reliability of the switching and reduces false triggering.

[0026] Step 5: Decision-Making Principles for Interaction Modes When a switch is triggered, the method performs interaction mode decision processing. The principle is to establish a multi-dimensional interaction mode decision matrix, including three types: formal interaction mode, casual interaction mode, and emergency interaction mode. Fuzzy logic algorithm is used to calculate the applicability score of each mode: first, the difference judgment data is fuzzified into high, medium, and low difference sets, and then mapped through a membership function. Then, reasoning is performed based on a predefined rule base. Finally, the fuzzy output is converted into a precise score through defuzzification, and the highest score is selected as the target interaction mode data. This principle enables the system to flexibly cope with complex scenarios and improve the personalized interaction effect.

[0027] Step Six: Switching Operation Principle After the decision is made, the method performs an interaction mode switching operation. The principle is to convert the switching trigger data into robot control instructions, and adjust the interactive behavior through the motion control module and speech synthesis module. Specifically, this includes adjusting the voice output volume, modifying the dialogue content style, and changing the body movement trajectory. The switching process is monitored in real time, and the interaction mode switching execution data is generated and stored in the log database for subsequent evaluation. This principle emphasizes seamless transition and ensures a smooth user experience.

[0028] Step 7: Effect Evaluation and Optimization Principles Finally, the method performs effect evaluation and adaptive optimization. The principle is to collect user feedback data after switching, compare it with the expected effect to generate an evaluation score, and when the score is lower than the preset standard, the data collection parameters are automatically adjusted to form a feedback loop. At the same time, the method integrates an anomaly handling mechanism: it monitors the device status through a heartbeat detection algorithm, switches to cloud backup data in case of failure, and uses an interpolation algorithm to generate simulated difference data to maintain system continuity. This closed-loop optimization principle ensures the long-term stability and adaptive improvement of the method.

[0029] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0030] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for switching robot interaction modes based on the difference between environmental context and intonation distribution, characterized in that, The method includes the following steps: S1. Collect environmental context data and user tone distribution data of the robot's interaction environment; S2. Preprocess the environmental context data and the tone distribution data to generate environmental context preprocessed data and tone distribution preprocessed data. S3. Based on the preprocessed environmental context data and the preprocessed intonation distribution data, calculate the difference between environmental context features and intonation distribution features to generate judgment data on the difference between environmental context and intonation distribution. S4. Based on the difference between the environmental context and tone distribution, perform interaction mode switching threshold comparison processing to generate interaction mode switching trigger data. When the difference between the environmental context and tone distribution does not exceed the preset threshold, directly execute step S6. S5. When the difference between the environmental context and tone distribution judgment data exceeds a preset threshold, perform interaction mode decision processing to generate target interaction mode data. S6. Based on the interaction mode switching trigger data, execute the robot interaction mode switching operation to generate interaction mode switching execution data; S7. Evaluate the effect of the interaction mode switching execution data, generate interaction mode switching optimization data, and feed it back to step S1 to achieve adaptive adjustment.

2. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The step of collecting environmental context data and user tone distribution data of the robot interaction environment in S1 includes the following steps: S11. Collect environmental context data of the robot's interactive environment through a multimodal sensor array mounted on the robot. The multimodal sensor array includes a microphone array, a light sensor, and a depth camera. The environmental context data represents a set of environmental parameters in the robot's interactive environment with time series as the reference system. S12. Collect user pitch distribution data through the voice processing module integrated in the robot. The voice processing module includes a high-fidelity microphone and a digital signal processor. The pitch distribution data represents the pitch parameter distribution curve of the user's voice based on the time axis.

3. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The steps involved in generating environmental context preprocessing data and intonation distribution preprocessing data in S2 are as follows: S21. Import the generated environmental context data and the tone distribution data into the robot interaction management platform, and use the wavelet transform algorithm to denoise and normalize the environmental context data to generate environmental context preprocessing data. S22. The Fourier transform algorithm is used to perform spectral analysis and feature enhancement on the intonation distribution data to generate intonation distribution preprocessed data.

4. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The steps involved in generating the environmental context and intonation distribution difference judgment data in S3 are as follows: S31. Obtain the environmental context preprocessing data and the intonation distribution preprocessing data; S32. Input the preprocessed environmental context data and the preprocessed intonation distribution data into the difference calculation model, calculate the cosine similarity between the environmental context features and the intonation distribution features based on the multidimensional feature vector space, and generate environmental context and intonation distribution difference judgment data based on the similarity threshold. When the cosine similarity between the preprocessed environmental context data and the preprocessed intonation distribution data is higher than 0.8, the output of the difference judgment data between the environmental context and intonation distribution is low. When the cosine similarity between the preprocessed environmental context data and the preprocessed intonation distribution data is less than 0.8, the output of the environmental context and intonation distribution difference judgment data is high difference.

5. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The process of generating interaction mode switching trigger data in S4 includes the following steps: S41. When the difference between the environmental context and tone distribution is high, a dynamic threshold adjustment algorithm is used to compare the difference between the environmental context and tone distribution with a preset threshold in real time. The preset threshold is dynamically generated by a machine learning model based on the user's historical interaction behavior data. S42. When the difference between the environmental context and the tone distribution exceeds the preset threshold, generate the interaction mode switching trigger data and activate step S5. When the difference between the environmental context and the tone distribution is not exceeded by the preset threshold, the interaction mode maintenance data is generated and step S6 is executed directly.

6. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The process of generating target interaction mode data in S5 includes the following steps: S51. When the interaction mode switching triggers data activation, a multi-dimensional interaction mode decision matrix is ​​established, which includes three types: formal interaction mode, leisure interaction mode, and emergency interaction mode. S52. Based on the differences in environmental context and tone distribution, determine the size of the data, use fuzzy logic algorithm to calculate the applicability score of each interaction mode, and select the interaction mode with the highest score as the target interaction mode data.

7. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The step of generating interaction mode switching execution data in S6 includes the following steps: S61. Convert the interaction mode switching trigger data into robot control commands; S62. Perform interaction mode switching operations through the robot motion control module and speech synthesis module, including adjusting the robot's voice output volume, modifying the dialogue content style, and changing the robot's limb movement trajectory; S63. Monitor the switching process in real time, generate interactive mode switching execution data and store it in the robot interaction log database.

8. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that, The steps involved in generating the interaction mode switching optimization data in S7 are as follows: S71. Collect user feedback data after switching interaction modes, including voice response time, changes in user facial expressions, and completion rate of interactive tasks; S72. Compare user feedback data with expected interaction effects to generate an evaluation score for the interaction mode switching effect; S73. When the evaluation score is lower than the preset standard, the data acquisition parameters in step S1 are automatically adjusted to realize the adaptive optimization loop of the interactive mode switching method.

9. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 1, characterized in that: The method also includes an exception handling mechanism, which enables backup data sources, including pre-stored environment templates and default tone libraries, when the collection of environmental context data and tone distribution data fails.

10. The robot interaction mode switching method based on the difference between environmental context and intonation distribution as described in claim 9, characterized in that, The exception handling mechanism specifically includes: S101. Real-time monitoring of the working status of the multimodal sensor array and voice processing module through a heartbeat detection algorithm; S102. When a data acquisition device malfunction is detected, automatically switch to the cloud historical database to retrieve similar environmental context and tone distribution data; S103. Use an interpolation algorithm to generate data to judge the difference between the simulated environment context and intonation distribution, and maintain the continuity of the interactive mode switching function.