Portable massage instrument offline adaptive electric stimulation control method and system fusing voice feedback
By constructing a multimodal adaptive control model on portable massage devices and combining voice feedback and physiological signals, personalized electrical stimulation control on low-performance devices was achieved, solving the problems of insufficient device compatibility and safety in offline scenarios, and improving user experience and safety.
Patent Information
- Application Number
- CN202611336406.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-24
AI Technical Summary
Existing portable electrical stimulation massage devices cannot achieve personalized adaptive control in offline use scenarios, rely on a single physiological signal, leading to physical discomfort, and lack multimodal feature fusion and local iteration capabilities, resulting in insufficient safety protection.
A multimodal adaptive modulation model integrating physiological and somatosensory features is constructed, lightweight optimization is performed, and it is deployed on low-performance devices. Dynamic weight fusion is performed in conjunction with voice feedback to achieve local feature storage and iteration. A two-layer security protection logic is constructed to autonomously generate personalized electrical stimulation parameters.
It achieves high-precision, safe and controllable personalized electrical stimulation adaptive adjustment in offline scenarios, improves device compatibility and user experience, solves the problem of somatosensory mismatch caused by a single physiological signal, and ensures safety and compatibility accuracy.
Smart Images

Figure CN123148540A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of offline adaptive electrical stimulation control technology for portable massagers, and particularly relates to a method and system for offline adaptive electrical stimulation control of portable massagers that integrates voice feedback. Background Technology
[0002] Most existing portable electrical stimulation massage devices rely on cloud servers for model calculations and parameter optimization. In offline use scenarios where the network is disconnected, they can only use factory-preset fixed-level parameters and cannot achieve personalized adaptive adjustment based on the user's real-time physical condition. Traditional control schemes mostly rely on objective physiological signals such as skin impedance to adjust electrical stimulation parameters, ignoring the influence of the user's subjective sensory feedback. When electrode displacement, skin sweating, or limb micro-movements cause distortion of physiological signals, it is easy for the device's detection data to be normal, but the user actually feels stinging, soreness, or discomfort in the intensity, resulting in poor control adaptation. At the same time, conventional deep learning models have a large number of parameters and require high inference computing power, making it difficult to deploy them directly on the low-power MCU hardware of massage devices. They lack lightweight implementation methods that combine cloud pre-training with on-device pruning, quantization, and knowledge distillation, and also lack isolated compressed storage and local security verification mechanisms for multi-user, multi-site feature data, making it difficult to achieve continuous iterative updates of user models on the device side.
[0003] Furthermore, existing massage devices employ relatively simple safety protection methods, generally relying solely on fixed hardware thresholds for over-limit protection. They lack a dual-layer protection logic combining objective physiological monitoring with subjective sensory feedback, resulting in insufficient protection against complex human working conditions. Most products on the market lack local offline self-testing capabilities, cannot automatically identify the user's tolerance baseline upon startup, and lack dynamic weighted multimodal feature fusion mechanisms and small-sample local incremental iteration capabilities after massage. They cannot continuously revise the user tolerance model based on on-site samples collected with each massage, and the device's personalized adaptation capability does not improve with usage. In offline conditions, they suffer from technical shortcomings such as lag in parameter adaptation, insufficient safety protection dimensions, and the inability of the model to autonomously evolve, thus limiting the actual user experience of portable massagers. Summary of the Invention
[0004] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide an offline adaptive electrical stimulation control method for a portable massager incorporating voice feedback, the method comprising:
[0005] A multimodal adaptive control model integrating objective physiological characteristics and subjective somatosensory characteristics was constructed, and the model was optimized for lightweighting and accuracy enhancement. The adaptive control model was then deployed and applied offline on low-performance edge devices.
[0006] When the device is working offline, it collects physiological state signals and user subjective voice and somatosensory signals in parallel. It performs time-series alignment processing on the two signals, and performs quantization conversion of subjective voice and somatosensory information and noise filtering of physiological signals, respectively, to obtain standardized subjective somatosensory features and effective physiological feature data that can be used for subsequent processing.
[0007] Establish a multi-source feature fusion and control mechanism on the edge side, adaptively and dynamically balance the user's subjective sensory information and objective physiological state information, and fuse and generate a unified control feature quantity that takes into account both the physical state of device detection and the user's subjective user experience.
[0008] An independent storage space is built locally on the device to compress and isolate the stimulation-related feature data of multiple users and multiple parts. Based on the fusion and control feature quantity, the electrical stimulation output parameters are dynamically adjusted in a continuous and gradual adjustment manner. Local incremental iteration is carried out using the on-site data generated during the massage process to continuously update and persistently retain user tolerance-related model data.
[0009] When the device is offline, it can autonomously perform a self-test of user tolerance, generate personalized initial stimulation parameters and safety thresholds, and dynamically and adaptively correct electrical stimulation output parameters based on real-time fusion characteristics to adapt to the differentiated usage needs of different users and muscle states. At the same time, it combines user subjective feedback and objective physiological parameters to construct a dual-layer safety protection logic, realizing fully offline, high-precision and safe and controllable personalized electrical stimulation adaptive adjustment.
[0010] Furthermore, embodiments of the present invention also provide an offline adaptive electrical stimulation control system for a portable massager that integrates voice feedback, characterized in that it includes:
[0011] A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to perform the above-described portable massager offline adaptive electrical stimulation control method with fused voice feedback by executing the machine-executable instructions.
[0012] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including machine-executable instructions, the machine-executable instructions being stored in a computer-readable storage medium, the processor of a computer device reading the machine-executable instructions from the computer-readable storage medium, the processor executing the machine-executable instructions, causing the computer device to execute the above-described portable massager offline adaptive electrical stimulation control method with integrated voice feedback.
[0013] Based on the above, lightweight processing of multimodal models is achieved through cloud pre-training combined with pruning, quantization, and knowledge distillation. This allows complex multimodal neural network models to be deployed on low-performance MCUs of portable massagers, enabling offline inference on the device side without relying on cloud computing power. A dual-modal dynamic weight fusion strategy of physiological signals and voice / sensory perception is adopted, which adaptively allocates two types of feature weights based on comfortable steady-state conditions and abnormal sensation scenarios. This compensates for physiological signal detection deviations caused by electrode displacement, skin sweating, and limb tremors, effectively solving the problem of sensation mismatch caused by single physiological sensor regulation. Utilizing Flash partitioned isolated storage, hash deduplication compression, and hash verification mechanisms, secure and lightweight storage of multi-user, multi-site feature data is achieved. Combined with incremental iterative updates using small samples on the device side after the massage, local parameter fine-tuning of the model is completed using only local massage samples, eliminating the need for global retraining. This allows the tolerance threshold, sensation-impedance mapping, and optimal parameter range models to dynamically evolve along with the user's physical state over a long period, continuously improving parameter adaptation accuracy.
[0014] This invention enables autonomous tolerance self-testing of the device in completely offline conditions. It generates user-specific initial electrical stimulation parameters and safety thresholds by collecting multi-source initial features through trial stimulation, abandoning generic factory-fixed parameters. It outputs electrical stimulation through a gradual, smooth fine-tuning mechanism with extremely small steps, avoiding abrupt stimulation changes caused by sudden shifts in intensity levels. Simultaneously, it constructs a dual-layer safety protection logic of physiological monitoring and subjective sensory verification. Abnormal physiological signals or user feedback of discomfort can trigger parameter reduction limits, ensuring massage safety from multiple dimensions. The entire process of control, fusion, storage, iteration, and safety protection is executed locally in a closed loop on the device, without relying on the network or cloud backend. It also considers the low-power MCU's computing power and memory constraints, reducing hardware requirements while achieving personalized adaptive adjustment of electrical stimulation for different user constitutions and muscle fatigue states. This significantly improves the compatibility and user experience of portable massagers in offline scenarios. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the execution flow of the offline adaptive electrical stimulation control method for a portable massager that integrates voice feedback, provided in an embodiment of the present invention.
[0016] Figure 2 This is a schematic diagram of exemplary hardware and software components of the portable massager offline adaptive electrical stimulation control system with integrated voice feedback provided in an embodiment of the present invention. Detailed Implementation
[0017] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating an embodiment of the present invention regarding an offline adaptive electrical stimulation control method for a portable massager that incorporates voice feedback. The following is a detailed description of this offline adaptive electrical stimulation control method for a portable massager that incorporates voice feedback.
[0018] Step S110: Construct a multimodal adaptive control model that integrates objective physiological characteristics and subjective sensory characteristics of the human body, and perform lightweight optimization and accuracy enhancement on the model to complete the offline deployment and application of the adaptive control model on low-performance end devices;
[0019] A bimodal adaptive control model network framework was constructed. The model input dimensions included physiological temporal features and somatosensory semantic features, while the model output dimensions corresponded to three types of parameters: electrical stimulation amplitude, frequency, and duty cycle. The constructed basic network model underwent structured lightweighting processing, specifically including network layer node selection, feature channel pruning, and model parameter dimensionality reduction. Accuracy enhancement and compensation parameters were configured simultaneously, and modal feature alignment weight coefficients, residual compensation thresholds, and feature fitting correction coefficients were set. After lightweighting and accuracy enhancement, the model structure, parameter weights, and computational logic were firmware-adapted and encapsulated, converting them into a runnable program format compatible with the low-power MCU architecture of the massager. The encapsulated model program was then permanently written to the device's local firmware storage area, completing the offline model deployment on the device. An independent inference runtime environment was configured on the device, and local inference computing power scheduling parameters, memory usage thresholds, and offline runtime permission parameters were set.
[0020] Step S111: Construct a cloud-based training dataset, which includes synchronously collected skin impedance physiological sampling data, user voice somatosensory text, and corresponding electrical stimulation modulation parameter labels, and perform cleaning and standardization annotation on the dataset.
[0021] A cloud-based multimodal dataset acquisition and storage architecture was established, with data acquisition sampling frequencies set. Skin impedance physiological data sampling frequency was fixed at 100Hz, with a single frame sampling duration of 20ms. User voice and somatosensory text data were acquired using a trigger-based acquisition method, with a single effective acquisition duration ranging from 0.5s to 2s. Electrical stimulation modulation parameters were acquired synchronously in real-time, recording a set of parameter labels every 20ms. The dataset included time-series raw physiological data, raw voice and text data, and corresponding ground truth data of electrical stimulation parameters from multiple users, multiple body massage sites, and multiple stimulation levels. The raw dataset underwent cleaning processing, removing physiological data with amplitudes exceeding the preset impedance range, abnormal sampling intervals, and waveform jumps, as well as voice and text data lacking effective semantics, silent segments, and repetitive content. Standardized annotation was performed on the remaining effective data, establishing a somatosensory semantic quantitative labeling system, physiological data sampling specification labels, and electrical stimulation parameter range labels. The dataset was then structurally classified and standardized for archiving, forming a dedicated structured dataset for cloud-based training.
[0022] Step S112: Construct a dual-branch multimodal adaptive neural network basic model. The model is set with independent physiological feature input branches and speech-sensory feature input branches, which are used to extract skin impedance temporal physiological features and encoded speech-sensory features, respectively. The features output from the two branches are concatenated and fused and then connected to the parameter mapping output layer to predict the amplitude, frequency, and duty cycle control parameters of the electrical stimulation pulse. The multimodal adaptive neural network basic model is supervised and trained using the labeled dataset. After iterative convergence, a high-precision cloud pre-trained basic model is obtained.
[0023] A dual-branch multimodal adaptive neural network model was constructed, with two independent feature extraction input branches: one for physiological features and the other for speech and somatosensory features. The physiological feature input branch's interface is adapted to one-dimensional temporal skin impedance data, while the speech and somatosensory feature input branch's interface is adapted to encoded somatosensory semantic feature vectors. Each feature extraction branch is configured with independent convolutional layers, pooling layers, activation functions, and feature selection parameters to independently perform single-modal feature extraction operations. A feature concatenation and fusion layer is set in the network backend to connect to the feature vectors output from the two branches, completing feature dimension alignment and channel concatenation. The fusion layer is connected to a parameter mapping output layer, which contains three sets of independent fully connected prediction sublayers, corresponding to the output parameters of electrical stimulation amplitude, frequency, and duty cycle, respectively. A cloud-based structured labeled dataset was used and input into the network model in batch training mode. The batch size, base learning rate, and weight decay coefficient were set for each training session. Full-supervised training was performed, continuously iterating and updating the network weight parameters until the model loss value converged and the parameters stabilized, thus solidifying the complete parameters of the pre-trained basic model in the cloud.
[0024] Step S1121: Standardize, clean, and structure the collected physiological time-series data and user voice-sensory text data respectively to complete the unified dimensional representation and modal standardization transformation of objective physiological data and subjective sensory semantic data, and generate standardized input feature data that can be used for training and feature extraction of multimodal neural network models.
[0025] The collected skin impedance physiological time-series data underwent standardized cleaning, unifying the sampling interval, significant digits, and numerical units. Time-series breakpoints, aberrations, and duplicate samples were removed, and missing samples were imputed using linear interpolation. User voice-sensory text data underwent text cleaning, removing invalid characters, repetitive semantics, and blank text, retaining only valid sensory semantic text. The cleaned voice-text underwent structured encoding, using fixed-dimensional word vector encoding to convert text semantics into fixed-dimensional feature vectors, unifying the dimensionality of all sensory feature vectors. Temporal warping and dimensional compression were performed on the physiological time-series data, unifying the time-series data frame length and the number of feature dimensions. This completed the unified dimensionality conversion between objective physiological time-series data and subjective sensory semantic data, generating standardized input feature data with consistent dimensions, uniform format, and no abnormal interference, for subsequent network model feature extraction and training.
[0026] Step S1122: Construct two functionally independent single-modal feature extraction network branches to perform deep feature mining and adaptive purification on the standardized objective physiological time series data and subjective somatic feature vectors respectively, and extract effective features of the two modalities and filter out redundant interference information.
[0027] Two structurally independent and functionally decoupled single-modal feature extraction network branches were constructed, corresponding to feature extraction operations for physiological temporal data and somatosensory encoded feature data, respectively. The physiological feature extraction branch uses a one-dimensional convolutional network structure with fixed kernel size, stride, pooling threshold, and activation function parameters. It performs layer-by-layer convolution operations, temporal feature extraction, and fluctuation feature capture on standardized skin impedance temporal data, filtering out invalid interference features such as high-frequency noise and low-frequency redundancy, and outputs a temporal physiological feature vector. The speech-somatosensory feature extraction branch uses a fully connected feature purification network structure with multi-layer feature transformation nodes and feature selection thresholds. It performs semantic feature purification, weight allocation, and effective feature selection on the encoded somatosensory feature vector, eliminating semantically redundant and invalid encoded features. Both branches independently complete feature mining, outputting purified single-modal effective feature vectors respectively.
[0028] Step S1123: Set up a feature splicing and fusion layer, perform dimension alignment and channel splicing on the temporal physiological feature vector output by the physiological feature extraction branch and the semantic somatosensory feature vector output by the speech somatosensory feature extraction branch, and generate a multimodal fusion feature vector that simultaneously represents the objective physiological state of the human body and the subjective somatosensory state of the user.
[0029] An independent feature concatenation and fusion layer is configured, defining feature fusion operation rules and dimension alignment standards. The temporal physiological feature vector output from the physiological feature extraction branch and the semantic somatosensory feature vector output from the speech somatosensory feature extraction branch are read. Dimension alignment is performed on the two single-modal feature vectors of different dimensions, unifying the number of channels and data dimensions of the two feature vectors through dimension completion and feature mapping adaptation. After dimension alignment, channel concatenation and fusion operations are performed, serially concatenating the temporal physiological feature channels and the semantic somatosensory feature channels to generate a multimodal fused feature vector containing both objective physiological state information and subjective somatosensory state information. The overall dimension, channel order, and data storage format of the fused feature vector are fixed, providing standardized fused feature input for backend parameter mapping prediction.
[0030] Step S1124: Construct a parameter mapping output layer containing three independent fully connected prediction sub-layers, and connect the multimodal fusion feature vector to the parameter mapping output layer. The three fully connected prediction sub-layers correspond to three types of control parameters: electrical stimulation pulse amplitude, working frequency, and duty cycle, respectively. Based on the multimodal fusion feature vector, complete parameter regression prediction and output the predicted value of electrical stimulation control parameters that adapts to the user's real-time state.
[0031] A parameter mapping output layer is constructed, containing three structurally independent, parameter-free fully connected prediction sublayers. These sublayers correspond to the regression prediction of three types of modulation parameters: electrical stimulation pulse amplitude, operating frequency, and duty cycle. The fused multimodal feature vector is synchronously input into the three fully connected prediction sublayers, each configured with independent weight matrices, bias parameters, and activation functions. The amplitude prediction sublayer outputs predicted electrical stimulation amplitude values within a preset range, the frequency prediction sublayer outputs predicted operating frequency values within a preset frequency range, and the duty cycle prediction sublayer outputs predicted duty cycle values. The three prediction sublayers operate synchronously and output independently, integrating the prediction results of the three types of parameters to generate a complete electrical stimulation modulation parameter prediction dataset, thus completing the mapping output operation from multimodal features to electrical stimulation modulation parameters.
[0032] Step S1125: Conduct full-scale supervised training based on the cloud dataset that has been cleaned and labeled. Use the paired standardized skin impedance time series data and speech somatosensory coding features as model inputs, and use the manually labeled optimal electrical stimulation amplitude, frequency, and duty cycle parameters as training ground value labels. Construct a mean squared error loss function to quantify the deviation between the predicted value and the ground value. Use the gradient descent algorithm in conjunction with the backpropagation mechanism to iteratively update the weights and bias parameters of the dual-branch network, feature fusion layer, and parameter mapping output layer.
[0033] A standardized dataset with cleaned and labeled data from the cloud was retrieved to construct input sample pairs for model training. These pairs consisted of standardized skin impedance time-series data, speech-based somatosensory coding features, and manually labeled ground truth electrical stimulation parameters. Model training hyperparameters were initialized, setting the initial learning rate, batch size, weight decay coefficient, and iteration step size. A mean squared error loss function was constructed to quantify the numerical deviation between the model parameter predictions and the manually labeled ground truth parameters. Gradient descent was used as the core optimization algorithm, with backpropagation logic configured. The loss error was propagated backward according to the preset iteration step size, updating all weight and bias parameters of the dual-branch feature extraction network, feature fusion layer, and parameter mapping output layer layer by layer. The loss function value, parameter update magnitude, and feature output data were recorded throughout each iteration to complete the iterative fitting and correction of the model parameters.
[0034] Step S1126: Set the preset number of iterations and convergence threshold, monitor the training loss and model prediction accuracy in real time, and terminate the training iteration and solidify the model parameters after the loss function tends to stabilize and the prediction accuracy reaches the preset standard.
[0035] The system presets the maximum number of iterations and the training convergence threshold, establishes fixed iteration termination criteria, loss function fluctuation thresholds, and model prediction accuracy attainment thresholds. During model training, training loss values, parameter prediction accuracy, and network weight update data are collected in real-time for each iteration, continuously monitoring the convergence trend of the loss function and the change trend of model prediction accuracy. When the fluctuation range of the loss function value in multiple consecutive iterations is less than the preset fluctuation threshold, and the model's prediction accuracy for electrical stimulation amplitude, frequency, and duty cycle parameters all reach the preset accuracy standards, the model training is considered converged. The model iteration training process is terminated, and the weight parameters, bias parameters, fusion operation parameters, and prediction layer mapping parameters of each network layer are locked, solidifying all model structure parameters and operation parameters, and generating the final cloud-based pre-trained basic model fixed parameter file.
[0036] Step S113: Perform hierarchical structured pruning on the pre-trained basic model in the cloud, calculate the contribution of each network node and feature channel to the model output, remove redundant fully connected layer parameters, invalid convolutional nodes and redundant feature mapping channels with contribution values lower than the preset threshold, and retain only the functional network structures of skin impedance feature extraction, speech somatosensory semantic parsing and electrical stimulation parameter mapping to obtain the pruned intermediate model.
[0037] The complete parameters of the pre-trained cloud-based basic model are read and solidified. Contribution metrics are calculated for fully connected layers, convolutional layers, and feature channel nodes. A formula for calculating the contribution metrics of network nodes is constructed, and the influence weight of each structure on the parameter prediction results is statistically analyzed node-by-node and channel-by-channel. Preset node contribution thresholds and channel retention thresholds are used to filter and remove redundant fully connected layer parameters, invalid convolutional operation nodes, and redundant feature mapping channels whose contribution values are below the preset thresholds. The core network structures and effective parameters for skin impedance temporal feature extraction, speech-based semantic parsing, multimodal feature fusion, and electrical stimulation parameter mapping are retained. After removing redundant structures, the model network hierarchy is reorganized, the model parameter matrix is updated, the model computation logic is streamlined, and a simplified, parameter-compressed pruned intermediate model is generated. The pruned effective model parameter file is then saved.
[0038] Step S114: Perform 8-bit integer quantization on the intermediate pruning model, convert the original 32-bit floating-point weights and bias parameters of the model into 8-bit integer data, match and configure the scaling factor and zero offset parameters, and replace traditional floating-point operations with integer operations.
[0039] The 32-bit floating-point weight and bias parameters of the pruned intermediate model are read and uniformly converted to 8-bit integers. A quantization scaling factor and zero-point offset correction parameter are set to establish a precise mapping between floating-point and integer data. All network parameters are scaled, offset, and rounded proportionally, converting all 32-bit floating-point parameters to 8-bit integers. The original floating-point operation logic of the model is replaced, and the forward inference formula is reconstructed, replacing the original floating-point operations with integer operations. The quantized feature output values are simultaneously calibrated to compensate for quantization accuracy errors. After quantization, the 8-bit integer model parameters are fixed, generating a quantized intermediate model file adapted to the low-computing-power MCU integer operation architecture.
[0040] Step S115: Build a cloud-based knowledge distillation training framework. Use the unsimplified high-precision cloud-based basic model as the teacher model and the pruned and quantized intermediate model as the student model. Input small sample data into the teacher model and student model simultaneously. Use the control parameters output by the teacher model and the distribution of intermediate layer features as soft labels to construct the distillation loss function. Update the student model parameters through reverse iteration and transfer the multi-scenario control logic and parameter convergence rules of the cloud model.
[0041] A cloud-based knowledge distillation training framework was constructed, configuring a teacher-student model distillation architecture. The unpruned, high-precision pre-trained base model was designated as the teacher model, while the pruned, lightweight intermediate model was designated as the student model. A small-sample standard dataset from the cloud was selected as the distillation training samples, and data from the same batch were simultaneously input into both the teacher and student models. The electrical stimulation modulation parameters output by the teacher model and the feature distribution data of the intermediate network layers were collected and set as distillation soft labels. A composite distillation loss function was constructed by combining these with the ground truth hard labels. Distillation learning rate, iteration count, and loss weight ratio parameters were set. The network weights and feature mapping parameters of the student model were continuously updated through a reverse iteration mechanism. The multi-scenario modulation parameter logic and feature fitting rules of the teacher model were transferred to the student model, solidifying the parameters of the lightweight, high-precision student model after distillation.
[0042] Step S116: Convert the format of the lightweight adaptive control model and compile the firmware to generate a localized executable model file adapted to the low-power MCU of the portable massager, and burn it into the local firmware of the massager.
[0043] The lightweight adaptive control model, after distillation, undergoes cross-platform format conversion, transforming the cloud-trained model file into a proprietary model format compatible with embedded MCUs. The model's computational logic is compiled, parameters are fixed, and instructions are adapted. Redundant cloud-trained modules, gradient update modules, and data caching modules are removed, retaining only the core computational modules required for edge inference: feature extraction, feature fusion, and parameter prediction. The massager's local firmware is configured with appropriate parameters to match the device's MCU computing power, memory space, and operating frequency. The model is then compiled and packaged at the firmware level, generating a lightweight executable model file that can run directly offline on the device. This model file is then fixed to the massager's local firmware storage partition using a flashing tool, completing the edge model deployment and fixation.
[0044] Step S117: When the device is in offline operation, the local MCU directly calls the fixed lightweight adaptive control model to complete the end-side inference, autonomously completes the multimodal fusion analysis of the objective physiological characteristics of the human body and the subjective somatic characteristics of the user, and outputs the corresponding electrical stimulation control parameters in real time, without the need for cloud computing power to participate in the whole process.
[0045] The device switches to offline operation, disables cloud network communication links and remote computing power access, initializes the local MCU model inference environment, and loads the lightweight adaptive control model parameters embedded in the firmware. During device operation, the local MCU collects real-time physiological time-series data of user skin impedance and user somatosensory feedback data, completes data standardization preprocessing and encoding conversion, and inputs it into the locally embedded model. The model independently completes offline inference calculations on the device side, sequentially performing single-modal feature extraction, dual-modal feature fusion, and electrical stimulation parameter mapping prediction calculations, and outputs the electrical stimulation amplitude, frequency, and duty cycle adjustment parameters for the corresponding operating conditions in real time. All data acquisition, feature parsing, model inference, and parameter output processes are completed locally on the device, without cloud data interaction or computing power access.
[0046] Step S118: Perform accuracy verification tests on the deployed edge model, compare the output data deviation between the edge model and the cloud teacher model, and if the output deviation exceeds the preset range, iteratively optimize the pruning threshold and quantization parameters until the inference accuracy of the edge model meets the preset standard.
[0047] A test environment for verifying the accuracy of the edge model was established. Multiple standard test samples from different users, body parts, and fatigue states were selected and input into both the cloud-based teacher model and the edge-deployed model. The output results of the electrical stimulation parameters of both models were collected simultaneously. The output values of amplitude, frequency, and duty cycle parameters were compared dimension by dimension, and the average deviation, maximum deviation, and deviation fluctuation range of multiple samples were calculated. Preset allowable ranges for model output deviation and accuracy thresholds were established. When the output deviation between the edge model and the cloud-based teacher model exceeded the preset range, the model pruning contribution threshold, quantization scaling factor, and distillation loss weight parameters were iteratively adjusted in reverse. The pruning, quantization, and distillation processes were re-executed, and iterative optimization was repeated until the edge model's inference accuracy, parameter deviation, and output stability all met the preset standards. Finally, a qualified edge offline model was solidified.
[0048] Step S120: When the device is working offline, it collects physiological state signals and user subjective voice and body sensation signals in parallel, performs time alignment processing on the two signals, completes the quantization conversion of subjective voice and body sensation information and noise filtering of physiological signals, and obtains standardized subjective body sensation features and effective physiological feature data that can be processed later.
[0049] When the device is offline, a dual-channel parallel signal acquisition mechanism is activated, simultaneously opening the skin impedance physiological signal acquisition link and the voice-sensory signal acquisition link. Both signals use a unified system clock as the timing reference. The physiological signal is continuously acquired at a fixed sampling frequency of 100Hz to obtain continuous skin impedance timing sampling points. The voice-sensory signal is acquired using a triggered acquisition method, with a single effective acquisition window duration set to 0.5 to 2 seconds. The device's local MCU performs timing alignment processing on the two asynchronously acquired signals. Using the physiological signal sampling timestamp as a reference, the voice signal frames are interpolated and timestamp calibrated to ensure a one-to-one correspondence between the timing of the two signal frames. For the acquired raw voice-sensory signals, a graded quantization conversion is performed according to a preset semantic quantization standard, converting the user's subjective feedback such as soreness, stinging, comfort, and discomfort into discrete quantization scores of 0 to 10 levels. For the physiological signal of skin impedance, a sliding mean filtering combined with median filtering algorithm is used to perform noise filtering, remove power frequency interference, contact jitter, and sudden pulse abnormalities that cause abrupt sampling points, regulate the signal sampling accuracy and data format, and finally output standardized somatosensory quantitative features and noise-reduced effective physiological feature data, which are stored in the memory buffer for subsequent fusion operations.
[0050] Step S130: Establish a multi-source feature fusion and control mechanism on the edge, adaptively and dynamically balance the user's subjective sensory information and objective physiological state information, and fuse and generate a unified control feature quantity that takes into account both the physical state of device detection and the user's subjective user experience.
[0051] The device's local firmware pre-deploys a multi-source feature fusion and control mechanism, constructing a dual-modal feature collaborative computing architecture. Physiological feature weight factors and somatosensory feature weight factors are set as dynamic control parameters. This mechanism runs entirely on the local MCU, without calling cloud algorithms or network data, using real-time collected standardized skin impedance physiological features and user somatosensory quantification scores as fixed input sources. The device dynamically updates the weight ratio of the two types of features based on the user's real-time usage status, completing an adaptive trade-off between objective physical detection information and subjective somatosensory information. The weight allocation values switch in real-time according to preset scenario thresholds, ensuring the sum of the weights of the two types of features remains constant at 1 under different scenarios, guaranteeing the stability of the fusion calculation data range. After dynamic weight assignment, the dual-modal features are aggregated and calculated using an embedded lightweight fusion formula, unifying the contribution ratio of the two heterogeneous features, and outputting a one-dimensional, normalized, unified multi-modal fusion control feature quantity that can be directly used for parameter control. This provides a standardized computational basis for subsequent fine-tuning of electrical stimulation parameters, state determination, and model iteration.
[0052] Step S131: Based on the independent extraction of end-side skin impedance physiological features and user sensation features, the device local real-time multi-source feature fusion control logic is activated to perform dimension unification adaptation and normalization processing on the skin impedance physiological feature vector collected and filtered in real time on the end side and the user subjective sensation quantization score obtained offline. The two types of heterogeneous modal features are unified to the same numerical calculation range to build the basis for dual-modal feature collaborative calculation.
[0053] After extracting skin impedance physiological features and quantifying user sensation features, the device's local MCU initiates its built-in multi-source feature fusion and control logic. It reads the filtered multi-dimensional skin impedance physiological feature vector and the 0-10 level discrete scores of sensation quantization from the buffer. Dimensional unification adaptation is performed for the two types of heterogeneous modal data. The multi-dimensional temporal physiological feature vector is dimensionally regularized, unifying the number of feature channels and sampling frame length. The sensation quantization scalar data is dimensionally expanded and adapted, ensuring both types of data have the same computational dimensional structure. Subsequently, an extreme value normalization algorithm is used to synchronously perform global mapping processing on both types of data. Using the device's pre-stored physiological feature extreme value range and sensation score extreme value range as the mapping benchmark, all data are uniformly scaled to the dimensionless standard computational range of 0 to 1. After normalization, the numerical ranges and computational dimensions of the physiological feature data and sensation feature data are completely aligned, constructing the data foundation for dual-modal feature collaborative computation and supporting subsequent dynamic weight allocation and weighted fusion calculations.
[0054] Step S132: Pre-solidify the dynamic weight adaptive allocation strategy in the device's local firmware, and divide it into two control scenarios based on the user's real-time usage status: comfortable steady state and abnormal body sensation.
[0055] A complete dynamic weight adaptive allocation strategy is embedded in the massager's local firmware. Judgment threshold parameters and corresponding weight parameter groups for two usage scenarios are pre-written, and all parameters are stored in local read-only storage, allowing direct access when the device is offline. The strategy internally divides into two mutually exclusive control scenarios: a comfortable steady-state scenario and a sensory abnormality scenario. Each scenario has independent state judgment conditions, feature weight values, and state duration parameters. The device's local MCU reads sensory quantification data, skin impedance fluctuation data, and continuous frame state data in real time, and performs scene recognition calculations cyclically according to preset judgment logic, updating the scene judgment every 20 milliseconds. Different scenarios are bound to fixed initial weight ranges, and small, smooth adjustments to weights are supported during continuous scenario states to avoid abrupt weight changes. All scene judgment rules, weight matching parameters, and state switching logic are locally embedded, eliminating the need for cloud configuration updates and enabling autonomous scene recognition and weight strategy invocation on the device side.
[0056] Step S133: When it is detected that the user is in a stable state of still comfort and no negative tactile feedback, increase the fusion weight of skin impedance physiological characteristics and decrease the weight of voice tactile characteristics, and prioritize the implementation of regulation based on the user's skin conductivity state, muscle tension and other objective physiological and physical states.
[0057] The device continuously monitors the user's somatosensory feedback frame sequence and skin impedance fluctuations. When no negative somatosensory semantic feedback such as soreness, stinging, or discomfort is detected for a preset number of consecutive frames, and the variance of the skin impedance temporal data fluctuation is less than a preset stability threshold, the device determines that the user is in a comfortable steady-state control scenario. The device immediately executes a steady-state weight allocation strategy, increasing the fusion weight value of the skin impedance physiological characteristics, with a value range of 0.6 to 0.8, while simultaneously decreasing the weight value of the somatosensory quantitative characteristics, with a corresponding value range of 0.2 to 0.4. The sum of the two weights remains at 1. In this scenario, the core control basis is the change in the user's skin conductivity and the impedance fluctuation characteristics corresponding to muscle tension. Objective physiological state data is prioritized for parameter control calculations, with somatosensory features serving only as auxiliary correction factors. The weight switching process adopts a gradual and smooth transition, with the weight adjustment amplitude in a single frame not exceeding 0.05, to avoid abrupt changes in electrical stimulation parameters caused by sudden changes in fusion feature values.
[0058] Step S134: When the user is detected to have abnormal feedback such as soreness, stinging, or discomfort in force, the weight allocation strategy is automatically switched to increase the weight of the user's subjective feedback features and decrease the weight of the skin impedance physiological features. The user's subjective feeling is used as the basis for regulation to compensate for the physiological signal detection deviation caused by limb micro-movement and skin condition fluctuation.
[0059] The device analyzes offline voice-based somatosensory quantification results in real time. When it detects clear semantic feedback from the user indicating abnormal somatosensory sensations such as soreness, tingling, excessive force, or numbness, or when the somatosensory quantification score exceeds a preset comfort threshold, it determines that it has entered a somatosensory abnormality control scenario. The device automatically performs a reverse weighting strategy, increasing the weight of the user's subjective somatosensory quantification features to the 0.6-0.8 range, while simultaneously decreasing the weight of skin impedance physiological features to the 0.2-0.4 range. In this scenario, the user's subjective somatosensory experience is used as the core basis for control, prioritizing the use of somatosensory feedback data to correct electrical stimulation output parameters. By using high-weighted somatosensory features in fusion calculations, it compensates for detection biases such as physiological signal waveform distortion and impedance sampling offset caused by user limb micro-movements, skin sweating, slight electrode displacement, and momentary muscle tremors. This corrects the control errors caused by single physiological sensor detection, ensuring that the control logic in abnormal somatosensory states closely matches the user's actual experience.
[0060] Step S135: Based on dynamically allocated feature weights, the normalized physiological feature data and the body sensation quantification score are weighted and fused using the lightweight weighted fusion calculation formula on the device side to generate a unified multimodal fusion control feature quantity that takes into account both the user's objective physiological state and subjective user experience in real time.
[0061] After completing the bimodal feature normalization and dynamic weight allocation, the device calls the locally fixed end-side lightweight weighted fusion calculation formula to perform feature aggregation calculation. The MCU reads the normalized single-dimensional comprehensive physiological feature score and the somatosensory quantification standard score, and performs a value-by-value multiplication operation with the dynamic weight parameters matched to the current scene to obtain the weighted physiological feature value and the weighted somatosensory feature value. The two types of weighted feature values are linearly summed and aggregated to generate the initial fusion feature quantity. The device simultaneously starts the amplitude limiting correction mechanism to constrain the aggregated feature quantity within the standard control range of 0 to 1. Values exceeding the upper and lower limits are truncated and assigned values to eliminate extreme value abnormal data interference. Each data acquisition cycle corresponds to the output of a set of real-time fusion control feature quantities. The feature quantities are dynamically updated according to the user's physiological state and somatosensory feedback, realizing multimodal fusion output that takes into account both objective physiological state and subjective user experience, supporting subsequent fine-tuning of electrical stimulation parameters.
[0062] Step S1351: After independently extracting the physiological features of skin impedance and the user's somatosensory features, the local MCU of the massager wakes up the built-in multi-source feature fusion operation logic. For the two types of heterogeneous data, namely the high-dimensional physiological feature vector of skin impedance after filtering and noise reduction and the discrete somatosensory quantization scores of 0-10 levels, the extreme value normalization algorithm is used to carry out full-domain numerical mapping, and the original fluctuation values of skin impedance and the somatosensory quantization scores are uniformly scaled to the dimensionless standard operation range of 0 to 1. At the same time, the temporal feature vector of skin impedance is subjected to dimensional compression mapping, and the multi-dimensional temporal features are aggregated into a single-dimensional comprehensive physiological feature score.
[0063] After the device independently extracts the physiological characteristics of skin impedance and the user's sensory features, the local MCU actively activates the built-in multi-source feature fusion operation logic and loads the locally fixed extreme value normalization operation parameters. For the multi-dimensional skin impedance temporal feature vector output after filtering and noise reduction, a global extreme value traversal operation is first performed to extract the maximum and minimum impedance values within the current massage cycle. The extreme value normalization formula is then used to map all temporal sampling points to the 0-1 value range. Simultaneously, dimensionality compression and aggregation are performed on the multi-dimensional temporal feature vector, and a weighted average algorithm is used to fuse the multi-channel temporal data into a single-dimensional comprehensive physiological feature score. For the 0-10 level discrete sensory quantization scores, a fixed-ratio mapping method is used to uniformly scale them to the 0-1 dimensionless range, eliminating the differences in dimensions and units between the two types of data. All normalization and dimensionality compression operations are completed by the MCU's local integer operations, without relying on floating-point computing power or cloud computing resources, outputting bimodal standardized feature data in a unified format and within a unified range.
[0064] Step S1352: Pre-solidify the dual-scene control logic in the device's local firmware, configure the judgment thresholds and matching weight parameter groups corresponding to the comfortable steady state and abnormal body sensation state, so that the device can identify the user's real-time usage status on the terminal side without cloud intervention.
[0065] The device pre-defines dual-scene autonomous control logic in its local firmware storage area, configuring complete judgment parameter sets for comfortable steady-state and abnormal tactile states respectively. These parameters include a comfort threshold for tactile score, a consecutive frame count threshold for negative tactile sensation, a skin impedance fluctuation variance threshold, a scene duration threshold, and weighting parameters for the two types of scenes. All threshold and weight parameters are fixed as read-only constants and can be accessed at any time during offline operation. The MCU reads real-time tactile and physiological data cyclically according to a fixed operating cycle, and performs state judgments one by one against the preset thresholds, without requiring cloud-based commands or parameter updates. The system has a scene anti-shake judgment mechanism, requiring multiple consecutive frames of data to meet the criteria for scene switching in a single state judgment. This avoids frequent scene jumps caused by instantaneous data fluctuations, achieving fully autonomous, stable, and reliable user state recognition and control strategy matching on the device side.
[0066] Step S1353: When the device does not detect negative tactile feedback such as soreness, stinging, or discomfort in the user's continuous frames, and the fluctuation of skin impedance data is within the preset stable range, it is determined that the user is in a static and comfortable steady state. The weight of the skin impedance physiological characteristics is adaptively increased, and the weight of the tactile quantification score is simultaneously decreased. The user's skin conductivity characteristics and muscle tension objective physiological state are used as the basis for regulation.
[0067] The device continuously analyzes the somatosensory feedback and physiological data fluctuations across consecutive detection frames. When a preset number of consecutive data frames do not reveal negative somatosensory semantics such as soreness, stinging, or discomfort, and the variance of the skin impedance time-series data is less than a preset stability threshold, the device determines that the user is in a stable, comfortable state. The device immediately executes steady-state weight adaptation logic, adaptively increasing the weight of the skin impedance physiological characteristics while simultaneously decreasing the weight of the somatosensory quantification score proportionally, ensuring that the sum of the two weights remains constant at 1. In this condition, the device prioritizes the impedance changes corresponding to the user's skin conductivity and muscle tension as the core control basis. It accurately captures the user's muscle relaxation state and tolerance trends based on stable physiological signals, with somatosensory features serving only as minor auxiliary corrections to ensure the stability and physiological fit of steady-state control. Weight updates are performed smoothly throughout the process.
[0068] Step S1354: When the device detects that the user has clear feedback of physical discomfort, or the physical discomfort quantification score exceeds the preset comfort threshold, it is determined to be a physical discomfort abnormality scenario. The weight allocation logic is automatically switched to increase the weight of the user's subjective physical discomfort quantification score and decrease the weight of the skin impedance physiological characteristics. Based on the user's subjective physical discomfort feedback, the device corrects the physiological signal distortion caused by limb tremors, skin sweating, and slight electrode displacement.
[0069] The device continuously analyzes offline voice-based haptic feedback. Once it detects clear semantic feedback of haptic discomfort, or if the real-time haptic feedback score exceeds a preset comfort threshold, it immediately enters a haptic abnormality control scenario. The system automatically switches preset weighting logic, increasing the fusion weight of the user's subjective haptic feedback score and decreasing the weight of skin impedance physiological characteristics. This control mode prioritizes the user's subjective haptic experience, correcting hardware detection biases. It compensates for distortions caused by limb tremors, sweating, slight electrode displacement, and transient muscle tremors leading to physiological signal waveform distortion and impedance sampling offset. By incorporating high-weighted haptic features, it offsets control errors caused by abnormal fluctuations in physiological signals, ensuring that the device prioritizes responding to the user's actual sensations when experiencing discomfort, thus improving control safety and comfort.
[0070] Step S1355: After completing the dynamic weight allocation of dual-modal features, the embedded lightweight weighted fusion calculation formula on the edge is called. The normalized comprehensive physiological feature score and the somatosensory quantification score are multiplied by the corresponding dynamic weights respectively. The two types of weighted feature values are summed and aggregated. At the same time, the calculation result is constrained within the standard control feature range through the amplitude limiting correction mechanism. A unified multimodal control feature quantity that takes into account both the user's objective physiological state and subjective user experience is generated in real time.
[0071] After completing the dynamic weight allocation of dual-modal features, the device calls the locally embedded lightweight weighted fusion calculation formula to perform aggregation operations. The normalized comprehensive physiological feature score and the somatosensory quantification score are multiplied by the corresponding dynamic weight parameters to obtain two types of weighted feature data. Linear summation aggregation is performed on the two sets of weighted feature data to generate the initial multimodal fusion feature quantity. The system has built-in standard control feature range constraint rules to perform amplitude limiting correction on the aggregation result, forcibly truncating and correcting abnormal values exceeding the 0-1 range to ensure that the output feature quantity always remains within the effective control range. A fusion operation is completed synchronously in each signal acquisition cycle, updating the multimodal control feature quantity in real time. This allows the output feature to synchronously follow the fluctuations in the user's physiological state and changes in somatosensory feedback, forming a standardized control benchmark quantity that considers both objective physiological state and subjective user experience.
[0072] Step S1356: The entire offline autonomous operation and control process on the device side is completed locally on the massager side, including data standardization, user status and scenario determination, dynamic weight switching, and multimodal feature fusion. It does not require cloud data transmission and computing power support, and relies on the complementary error correction of dual-modal information to build a precise personalized control benchmark.
[0073] All data standardization processing, user status scenario determination, dynamic weight switching, and multimodal feature fusion calculations are completed within the local MCU on the device side, with network communication links completely shut down, and no cloud data uploads, parameter downloads, or remote computing power calls are performed. During the data preprocessing stage, the local MCU handles signal filtering, timing alignment, and numerical normalization. Status determination and weight switching utilize locally fixed thresholds and strategy parameters. Feature fusion employs lightweight integer calculation formulas on the device side. This entire control logic forms a complete local closed-loop calculation system, relying on real-time complementary error correction of physiological and somatosensory dual-modal information to correct single-modal detection errors. It constructs a stable, accurate, and personalized electrostimulation control benchmark under completely offline conditions, with all calculation results stored only in local memory for parameter adjustment and model iteration.
[0074] Step S136: The entire process of feature normalization, scene determination, weight iteration, and multi-source feature fusion calculation is completed locally on the massager end, without the need for cloud computing power and data interaction support. A globally accurate control basis is constructed through dual-modal information complementarity and error correction.
[0075] In fully offline operation, all feature normalization calculations, user scenario state determination, dynamic weight iteration updates, and multi-source feature fusion and aggregation calculations are independently executed by the device's local MCU, without cloud computing power involvement, network data interaction, or remote parameter updates. The device cyclically refreshes the dual-modal feature states and weight ratios according to a fixed calculation cycle, iteratively updating the fused control feature quantities in real time. Through a bidirectional complementary mechanism of objective physiological data and subjective somatosensory data, it mutually corrects detection biases, signal distortion, and state lag issues present in single-modal data, continuously optimizing the accuracy of the control benchmark. All calculation logic, parameter thresholds, fusion formulas, and judgment rules are solidified in the local firmware, achieving autonomous closed-loop control on the device side and continuously outputting precise control criteria that fit the user's real-time physical state and subjective feelings.
[0076] Step S140: Construct an independent storage space on the device to compress and isolate the stimulation-related feature data of multiple users and multiple parts, dynamically adjust the electrical stimulation output parameters by adopting a continuous and gradual adjustment method based on the fused control feature quantity, and carry out local incremental iteration using the on-site data generated during the massage process to continuously update and persistently retain the user tolerance-related model data.
[0077] The device constructs an independent multi-user, multi-site feature storage system in the local Flash storage area, performing partitioned, isolated, and compressed storage on all electrical stimulation-related feature data. Relying on real-time generated multimodal fusion control feature quantities, the device calls locally pre-configured minimal-step progressive adjustment parameters to dynamically correct the output parameters of electrical stimulation amplitude, frequency, and duty cycle, achieving smooth adjustment without jumps. During a single massage session, local incremental sample data is continuously collected and cached in real-time in a temporary storage area. After the massage task ends, an incremental iteration mechanism is automatically triggered, using on-site measured sample data to locally correct user tolerance thresholds, parameter ranges, and mapping models. The iteratively optimized model data, after hash compression, deduplication, and verification processing, is persistently stored in the corresponding independent storage partition, continuously accumulating personalized user usage data, enabling continuous iteration and optimization of model parameters as the user experiences.
[0078] Step S141: Divide the local Flash storage area of the massager device into an independent user model storage partition, physically and logically isolate the user model storage partition from the device system firmware partition and the real-time data cache partition, and establish independent data storage subdirectories and data index tags for different user identities and different massage body parts to complete the classification and isolated storage of multi-user and multi-body model data.
[0079] The device logically partitions its local Flash storage space, creating a dedicated storage partition for user models. This partition is physically and logically isolated from the system firmware partition, runtime log partition, and real-time cache partition, preventing cross-partition data overwriting and read / write interference. Within the user model storage partition, a multi-level subdirectory structure is established based on the user's unique identification ID and massage area code. Each user and each massage area corresponds to an independent storage subdirectory and a unique data index tag. When reading or writing data, the device accurately locates the corresponding subdirectory using the user ID and area index, enabling categorized storage, isolated read / write, and independent updates of multi-user and multi-area model data. All storage directory structures and index mappings are permanently embedded in the local firmware, allowing for direct addressing, reading, writing, and retrieval even offline, avoiding cross-contamination of multi-user and multi-area data.
[0080] Step S142: For the user tolerance threshold, optimal electrical stimulation parameter range for each part, somatosensory-skin impedance mapping characteristics, and historical control parameter sample multidimensional feature data that need to be persistently stored, a customized feature parameter hash compression algorithm is used for lightweight processing. Duplicate feature parameters and redundant interval data are deduplicated by hash and dimensional compression, and only effective feature data with user-specific differences are retained. At the same time, a unique hash check code is bound to the model data of the massage part corresponding to each group of users.
[0081] The device performs lightweight compression and secure binding on all user feature data requiring persistent storage. The data includes user tolerance thresholds for various body parts, optimal parameter ranges for electrical stimulation amplitude, frequency, and duty cycle, a bidirectional mapping feature matrix of somatosensory-skin impedance, and historical multi-round modulation parameter sample sequences. The device uses a locally embedded, customized feature parameter hash compression algorithm to perform global deduplication and dimensionality compression on the structured feature data. It compares duplicate parameter ranges, overlapping sample data, and homogeneous steady-state features, eliminating redundant data without individual differences and retaining only effective features that reflect user individual differences and state update characteristics. Dimensional pruning is performed on the high-dimensional mapping matrix, retaining highly correlated core dimensions and mapping weights. After data compression, a unique, irreversible hash checksum is generated for the entire set of model data for a single user and single body part, and bound to the corresponding data packet index header, completing the lightweight, secure, and unique storage process.
[0082] Step S1421: The device's local MCU traverses the multidimensional feature dataset that needs to be persistently stored. The multidimensional feature dataset includes the user's tolerance threshold, the electrical stimulation amplitude, frequency, and duty cycle optimal parameter range corresponding to each body part, the somatosensory-skin impedance bidirectional mapping feature matrix, and the historical multi-round adjustment parameter sample sequence.
[0083] The device's local MCU actively traverses the complete multidimensional feature dataset to be persistently stored, reading structured feature data category by category. The dataset specifically includes the user's tolerance threshold upper and lower limits for each massage area, the optimal range for electrical stimulation amplitude, the optimal range for working frequency, the optimal range for pulse duty cycle, the bidirectional mapping feature matrix of somatosensory-skin impedance, and historical multi-round real-time adjustment parameter sample sequences. The MCU parses the field content line by line according to the preset data structure, distinguishing different data formats such as threshold parameters, range parameters, matrix features, and time-series sample parameters, completing the complete traversal and collection of all data. During the traversal, the user identifier, area identifier, and generation timestamp for each data set are recorded simultaneously, constructing a complete dataset to be processed, providing complete data input for subsequent data cleaning, normalization, hash deduplication, and dimensionality compression.
[0084] Step S1422: Perform field splitting and semantic normalization on all the structured feature data obtained by traversal, unify the data type, significant number of digits and storage format of various feature data, and remove invalid dirty data with abnormal collection and incorrect format, and complete the standardization cleaning and normalization preprocessing of the original feature data.
[0085] The device performs field splitting and semantic normalization on the full set of structured feature data after traversal and aggregation. It unifies the data storage format according to parameter types, standardizing the significant digits of floating-point data, the value range of integer data, the dimensional specifications of matrix data, and the sampling interval of time-series data. It verifies the validity of the data format field by field, identifying invalid or dirty data due to acquisition anomalies, out-of-bounds values, incorrect formats, or missing values. Unqualified data is removed, and locally missing data is filled in. During the normalization process, it distinguishes between general and personalized parameters, unifies the storage field definitions and data structures of all feature data, and ensures the consistency of feature data formats collected in different batches and time periods. This completes the standardization, cleaning, and normalization preprocessing of the original dataset, outputting a standardized dataset that can be directly used for hash operations and compressed storage.
[0086] Step S1423: Call the customized lightweight feature hash compression algorithm embedded on the device side to perform hash digest matching and comparison to remove duplicates from the preprocessed full feature data, identify and delete fixed and reused general parameter ranges, homogeneous steady-state features and duplicate historical sample data, screen out redundant and invalid data that do not have personalized distinguishability, and retain only the effective feature data that corresponds to a single user and a single massage part and has individual differences, status updates and scene uniqueness;
[0087] The device utilizes a customized, lightweight feature hash compression algorithm embedded on the device side to calculate feature hash digest values for each group of preprocessed, standardized feature data. Through a global hash digest comparison and matching mechanism, redundant data with universal fixed parameter ranges, multiple rounds of repetitive steady-state features, and completely overlapping historical control samples are identified as lacking personalized differentiation and deleted. The algorithm retains only core feature data unique to a single user and a single massage area, possessing individual differences, state updates, and scenario-specific characteristics, while eliminating invalid parameters that are globally uniform, unchanging, or unable to reflect differences in user tolerance. The deduplication process compares samples and intervals individually to ensure that the retained data consists entirely of effective features that can characterize the user's personalized physical state and tolerance characteristics, achieving precise and concise data storage.
[0088] Step S1424: Perform dimensionality compression processing on the high-dimensional somatosensory-skin impedance bidirectional mapping feature matrix, retain strongly correlated feature dimensions and effective mapping weights, and prune redundant dimensions with low contribution and weak correlation. Under the premise of fully preserving the user's personalized tolerance rules and regulatory mapping relationship, complete the lightweight dimensionality reduction storage of multi-dimensional feature data to adapt to the storage and computing resource limitations of low-power MCUs.
[0089] The device performs lightweight dimensionality compression on the high-dimensional somatosensory-skin impedance bidirectional mapping feature matrix, calculating the contribution weight of each feature dimension to the somatosensory mapping result and parameter output result. Based on a preset contribution threshold, it retains highly correlated and high-contribution core feature dimensions and effective mapping weights, while pruning low-contribution, weakly correlated, and redundant dimensions. The dimensionality compression process fully preserves the user's personalized tolerance boundary rules, physiological somatosensory correspondences, and parameter mapping logic, without disrupting the original model mapping mechanism and parameter adaptation rules. By reducing the number of matrix storage parameters through dimensionality reduction, it lowers MCU data read / write overhead and memory usage, adapting to the computing power and storage resource limitations of low-power embedded MCUs, and achieving lightweight, low-maintenance, and long-term storage of high-dimensional feature data.
[0090] Step S1425: After completing the data deduplication and dimensional compression processing, perform an overall hash operation on the entire set of compressed model data corresponding to a single user and a single part. Combine the user's unique identifier, massage part identifier, model parameters and feature mapping data to generate an irreversible hash digest. Use this hash digest as a unique hash check code to bind the corresponding model data package and solidify it to the index header of the corresponding storage subdirectory.
[0091] After the device completes data deduplication and dimensionality compression, it performs a comprehensive hash operation on the entire compressed model data for each user and single body part. The input parameters include the user's unique identifier, the massage area's unique identifier, the compressed tolerance threshold parameter, the optimal electrical stimulation parameter range, and the weight parameters of the somatosensory-impedance mapping matrix. A fixed-length unique hash digest is generated using an irreversible hash algorithm. This digest serves as the unique hash checksum for the current data packet, is bound to the corresponding model data packet, and is permanently stored in the index header area of the corresponding subdirectory, corresponding one-to-one with the model data. Each set of user body part model data is independently bound to a unique checksum; checksums for different users and different body parts are not repeated, thus completing the unique identification and secure binding of the model data.
[0092] Step S1426: Each time the device writes, updates, or reads user model data, it recalculates the hash value of the current model data in real time and compares it with the pre-bound baseline hash check code. When the hash comparison result is inconsistent, it determines that the data has been tampered with, lost, or is corrupted, and automatically loads the valid historical backup model data and intercepts the writing of abnormal data.
[0093] Before each model data write, parameter update, and data read operation, the device automatically triggers a hash verification process. It recalculates the hash digest value of the current model data packet in real time and precisely compares the real-time calculated hash value with the baseline hash checksum pre-stored in the index header. If the two hash values are inconsistent, it determines that the current model data has been tampered with, lost, corrupted, or abnormally overwritten, immediately blocking the current data write and read operation and preventing the abnormal data from taking effect. Simultaneously, the device automatically retrieves and restores historical valid model data stored in the local backup partition, ensuring that the device always uses complete, correct, and untampered standard model data, achieving full-process security protection for model data read and write.
[0094] Step S1427: The entire process of feature data regularization, hash deduplication, dimension compression and hash security verification is completed locally on the device side, which greatly reduces the data storage volume on the device side, while ensuring the uniqueness, integrity and storage security of multi-user and multi-location model data.
[0095] The device performs all operations—feature data regularization, field standardization, hash digest comparison and deduplication, high-dimensional feature dimension compression, hash security verification, and binding—within a local embedded environment on the device side. All calculations do not rely on cloud computing power or network transmission. Redundant data removal and dimensional simplification significantly reduce the size of model data storage, lowering Flash storage usage and data read / write time. Through unique hash checksum binding and real-time comparison mechanisms, it achieves unique locking, integrity verification, and tamper-proof protection for each group of multi-user, multi-location model data. While maintaining lightweight storage, it comprehensively ensures the security, accuracy, and validity of locally persisted model data, providing a reliable data foundation for subsequent offline control and incremental iteration.
[0096] Step S143: When the device is running offline, the user tolerance model parameters stored locally are retrieved in real time. Combined with the multimodal fusion control feature quantity generated in real time on the device side, a continuous and gradual parameter fine-tuning mechanism with a very small step size is adopted. The single-step fine-tuning threshold and adjustment rate of the electrical stimulation amplitude, frequency, and duty cycle are pre-configured. Based on the real-time change amplitude of the fusion control feature quantity, the electrical stimulation output parameters are corrected step by step and with small gradient iterations to achieve smooth and continuous adjustment of stimulation parameters, adapting to the dynamic changes of the user's muscle fatigue state and tolerance.
[0097] During offline operation, the device reads the fixed tolerance model parameters and optimal parameter range benchmarks for the corresponding user and body part from the local Flash partition in real time. The MCU retrieves the latest multimodal fusion control features in real time and performs parameter correction calculations based on the locally pre-configured minimal step-size progressive fine-tuning mechanism. The device pre-fixes the single-step fine-tuning thresholds, maximum single adjustment amount, and adjustment rate parameters for three types of parameters: electrical stimulation amplitude, operating frequency, and pulse duty cycle. All fine-tuning parameters are locally fixed and can be accessed offline. Based on the real-time fluctuation amplitude and trend of the fusion control features, the device distinguishes between steady-state changes and abrupt changes, and uses a step-by-step small gradient iterative method to correct the electrical stimulation output parameters frame by frame, with the adjustment amplitude controlled within the range imperceptible to the human body. Throughout the process, the electrical stimulation parameters are smoothly and continuously adjusted without any level jumps, dynamically adapting to the real-time changes in muscle fatigue accumulation and tolerance during the user's massage.
[0098] Step S144: During a single massage session, three types of incremental data are collected in real time through the device's local MCU: filtered skin impedance physiological data, quantified somatosensory feedback data obtained from the user's offline voice analysis, and electrical stimulation output parameter data for each progressive fine-tuning. This forms multi-source associated sample data corresponding to a single massage session, and the sample data is temporarily cached in the device's local temporary storage area.
[0099] Throughout the entire cycle of a single massage task, the device's local MCU activates a synchronous multi-source data acquisition and caching mechanism, continuously collecting three types of incremental on-site data at a fixed sampling frequency. The first type is effective skin impedance physiological time-series data after filtering and noise reduction; the second type is user somatosensory feedback score data generated by offline voice parsing and quantization; and the third type is the real-time output parameters of electrical stimulation amplitude, frequency, and duty cycle corresponding to each progressive fine-tuning. The device performs time-series correlation matching of physiological data, somatosensory data, and control parameters at the same moment to form time-aligned multi-source correlated sample units, accumulating frame by frame to generate a complete sample dataset for a single massage cycle. All incremental sample data are temporarily stored in the device's local high-speed cache area and are not permanently fixed. They are used for incremental iteration updates of the model after the massage task ends.
[0100] Step S145: After a single massage task is completed, the device automatically triggers the local small sample incremental iterative update mechanism, retrieves the incremental on-site sample data generated during the massage, compares the deviation between the historical model data and the actual measured sample data, iteratively corrects and optimizes the tolerance threshold model, somatosensory-impedance mapping model, and optimal parameter range model for the user's corresponding massage area, updates the model tolerance threshold boundary, optimizes the bimodal feature mapping relationship, corrects the optimal electrical stimulation parameter range, and iteratively generates model parameters that are adapted to the user's real-time physical state.
[0101] After a single massage session ends normally and the device stops outputting electrical stimulation, the MCU automatically triggers a local small-sample incremental iterative update mechanism, requiring no manual triggering or cloud intervention. The device reads multi-source incremental on-site sample data cached throughout the massage session, retrieves locally stored historical benchmark model data, and performs a dimension-by-dimensional comparison between the measured samples and historical models, quantifying the parameter deviations, feature mapping deviations, and state adaptation deviations between the two types of data. Based on the quantified deviation results, targeted corrections and optimizations are performed on the user's tolerance threshold model, somatosensory-skin impedance mapping model, and optimal electrical stimulation parameter range model for the corresponding massage area. The upper and lower limits of the tolerance threshold are updated, the weights of the bimodal feature mapping are fine-tuned, and the optimal parameter range is iteratively corrected to generate new model parameters adapted to the user's real-time physical state.
[0102] Step S1451: After a single massage task is completed normally, the device's local MCU automatically wakes up the pre-fixed end-side small sample incremental iterative update mechanism, without the need for cloud command issuance and network data synchronization, and completes the device's local autonomous iterative optimization.
[0103] After a single massage session ends and the device enters standby mode, the local MCU automatically activates the pre-fixed edge-side small-sample incremental iterative update mechanism. The system automatically blocks cloud communication links and remote control commands, entering a fully autonomous local iterative operation. The device does not need to receive update commands from the cloud or synchronize data online; all iteration triggering logic, calculation rules, and parameter update strategies are autonomously scheduled and executed by the local firmware. The system automatically verifies the integrity of the massage sample data and, after confirming the validity of the incremental samples, formally starts the iteration process. Throughout the process, the local MCU's lightweight computing power completes all deviation calculations, parameter corrections, and model update operations, achieving automatic, offline, and autonomous incremental model optimization after the massage ends.
[0104] Step S1452: Retrieve and construct multi-source incremental sample training pairs. Retrieve incremental on-site sample data cached in real time by the device during the complete massage cycle. The incremental on-site sample data includes skin impedance time-series physiological characteristic data, user body sensation quantitative feedback data, multimodal fusion control characteristic quantity, and progressively fine-tuned electrical stimulation amplitude, frequency, and duty cycle control parameter sequence. Interrelate and match multiple types of data to construct one-to-one corresponding closed-loop multi-source small sample training pairs.
[0105] The device retrieves incremental on-site sample data cached throughout the entire massage cycle. This sample set includes full-time temporal skin impedance physiological characteristic data, sequential user sensory feedback data, real-time updated multimodal fusion control features, and progressively fine-tuned electrical stimulation amplitude, frequency, and duty cycle parameter sequences. Using timestamps as a reference, the device precisely correlates and matches physiological characteristics, sensory data, fusion features, and control parameters at the same sampling moment, constructing one-to-one corresponding closed-loop multi-source small-sample training pairs. All training pairs are temporally aligned, dimensionally matched, and data complete, forming a standardized incremental sample dataset covering the entire massage process, providing effective training basis for incremental iterative correction of the model.
[0106] Step S1453: Accurate matching of historical model data. Based on the currently logged-in user's identity and massage area index, accurately read the historical benchmark model data corresponding to the user and massage area in the device's local Flash storage partition. The historical benchmark model data includes historical tolerance threshold boundaries, somatosensory-skin impedance bidirectional mapping matrix, and optimal electrical stimulation parameter range model. Complete the accurate matching of historical model parameters with the current measured incremental sample data.
[0107] The device reads the unique identifier of the currently logged-in user and the index code of the currently active massage area. Based on this dual index, it precisely addresses the local Flash storage partition and retrieves the historical baseline model data corresponding to the user and the corresponding massage area. The retrieved data includes historical tolerance threshold upper and lower limits, a two-way weight matrix for somatosensory-skin impedance mapping, and historical optimal electrical stimulation amplitude, frequency, and duty cycle parameter ranges. The device performs homologous matching between the retrieved historical baseline model parameters and the newly constructed multi-source incremental training sample set, ensuring consistency in user identity, massage area, and data dimensions during iterative optimization. This achieves accurate comparison and alignment between historical baseline data and real-time incremental sample data.
[0108] Step S1454: Multi-dimensional model deviation quantification analysis, start the lightweight deviation calculation logic on the end side, compare the output deviation, feature mapping deviation and parameter adaptation deviation of the current real-time sample data with the historical model data in each dimension, and quantify the dynamic offset of the user's current muscle fatigue level, skin conductivity state and body tolerance relative to the historical state.
[0109] The device initiates its local lightweight deviation calculation logic, performing data comparison calculations dimension by dimension. It calculates the deviations in physiological characteristics output, bimodal feature mapping fitting, and electrical stimulation parameter adaptation between the current measured sample and historical model data. Using deviation quantification formulas, it calculates the numerical values and trends of deviations in each dimension, quantifying the dynamic offset of the user's accumulated muscle fatigue, fluctuations in skin conductivity, and changes in somatosensory tolerance relative to historical states. This accurately identifies deviation issues in historical model parameters, such as adaptation lag, interval bias, and mapping distortion, and outputs multi-dimensional quantified deviation results, providing precise data for hierarchical model correction.
[0110] Step S1455: Based on the quantitative deviation between the measured data and the historical model, implement hierarchical differentiated incremental correction and optimization for the tolerance threshold model, the somatosensory-skin impedance mapping model, and the optimal parameter range model, dynamically update the user tolerance boundary range, fine-tune the dual-modal feature mapping association weights, and iteratively update the optimal control parameter benchmark range.
[0111] Based on multi-dimensional quantification of deviation results, the device implements hierarchical differentiated incremental correction and optimization for three core models. For the tolerance threshold model, the upper and lower threshold boundaries are dynamically widened or narrowed according to the user's perceived critical point and impedance fluctuation limit, updating the user's real-time tolerance range. For the somatosensory-skin impedance mapping model, a small-sample gradient correction strategy is used to fine-tune the dual-modal feature association weights and matrix parameters, optimizing the fitting accuracy between subjective somatosensory perception and objective physiological signals. For the optimal parameter range model, the optimal steady-state control parameters are selected, historically poorly adapted parameter nodes are replaced, and the optimal parameter baseline range is iteratively updated, completing targeted local optimization and correction for the three models.
[0112] Step S1456: The entire model optimization process adopts the edge-side small sample incremental learning strategy, which only performs local parameter fine-tuning of the model for this incremental sample data, without the need to carry out global model retraining.
[0113] This model iteration and optimization employed a device-specific few-shot incremental learning strategy throughout, performing local parameter fine-tuning only on the incremental sample dataset generated during the massage session, without performing global model parameter initialization or full retraining. The device maintained the main network structure and basic mapping logic of the model, correcting only local weight parameters, threshold boundaries, and parameter ranges that exceeded the deviation limit, significantly reducing the MCU's computational load and power consumption. The iteration process updated only a small number of deviation parameters, resulting in fewer training iterations, lower computational latency, and lower power consumption, fully adapting to the computational limitations of embedded low-power devices while ensuring that the model optimization direction closely aligned with the user's real-time physical changes.
[0114] Step S1457: After the model iteration optimization is completed, the updated set of model data is standardized, hashed to remove duplicates and compressed in dimension. Redundant parameters and invalid dimension information generated during the iteration process are removed, while effective features with user-specific differences are retained. At the same time, a unique hash check code is regenerated based on the user identifier, massage part identifier and new model parameters to replace the model's original old check code.
[0115] After incremental iterative optimization of the model, the device performs standardization and normalization processing on the updated complete set of model data, unifying the data format and effective accuracy. Redundant parameters, duplicate intervals, and invalid dimension information generated during the iteration process are removed field by field, while retaining the core effective features that reflect user-specific differences. Based on the current user identifier, massage area identifier, and new model parameters, the device re-executes a comprehensive hash operation to generate a new and unique hash checksum, automatically replacing the old checksum. This completes the secure binding and unique identification of the updated model data, ensuring that the iterated model data is concise, effective, verifiable, and traceable.
[0116] Step S1458: The latest model data, which has been iteratively optimized and completed with lightweight compression and security verification, is stored locally and persistently to achieve incremental updates and upgrades of the model on the device side in a single round. The model parameters are continuously iteratively optimized based on local small sample data accumulated during each use, dynamically adapting to the long-term dynamic changes in the user's physical condition, skin parameters and tolerance. The entire process is based on the device side lightweight algorithm to complete offline closed-loop iterative optimization.
[0117] The device will iteratively optimize, hash-compressed, and securely verify the latest model data, and persistently write it locally to the corresponding storage partition, completing a single-round incremental upgrade of the device-side model. Relying on the local small-sample incremental data accumulated from each massage task, the device continuously iterates and refines model parameters, dynamically adapting to long-term dynamic changes in the user's skin condition, muscle tolerance, and overall physical condition. The entire iterative optimization process is completed offline in a closed loop based on a lightweight device-side algorithm, requiring no cloud computing power or network support. Through long-term cumulative iteration, it continuously improves the model's adaptation accuracy and the degree of personalized adjustment, achieving an adaptive optimization effect where the model becomes more accurate with use.
[0118] Step S146: After hash compression, the newly optimized user model data is overwritten and written to the independent model storage partition of the corresponding user and the corresponding massage area to complete local persistent storage. No cloud computing power or data synchronization is required throughout the process. The model achieves autonomous iterative optimization by relying on the incremental sample data accumulated locally on the device. Through multiple uses, samples are continuously accumulated and the model accuracy is iteratively refined to adaptively match the differentiated tolerance needs of users with different physical conditions, fatigue levels and usage scenarios, thereby continuously improving the personalization, accuracy and adaptability of the massager's electrical stimulation control.
[0119] The device takes the newly generated user model data from this iteration and optimization, processes it through field normalization, hash deduplication, dimensional compression, and hash verification, and then overwrites it into the local independent model storage partition corresponding to the user's identity and the corresponding massage area, achieving localized persistent storage. The entire process involves no cloud computing power, no network data synchronization, and no remote parameter updates; it relies entirely on incremental sample data accumulated locally on the device to achieve autonomous model iteration and upgrades. Through repeated massage use, the device continuously accumulates multi-scenario, multi-state test samples, constantly correcting model biases, optimizing parameter ranges, and updating mapping relationships. This continuously refines the model's control accuracy, adaptively adapting to the differentiated tolerance needs of users with varying fatigue levels, skin conditions, and usage scenarios, and continuously improving the personalization and precision of the device's electrical stimulation control.
[0120] Step S150: When the device is offline, it can autonomously complete the user's tolerance self-test, generate personalized initial stimulation parameters and safety thresholds, and dynamically and adaptively correct the electrical stimulation output parameters based on real-time fusion characteristics to adapt to the differentiated usage needs of different users and muscle states. At the same time, it combines the user's subjective somatosensory feedback and objective physiological parameters to construct a dual-layer safety protection logic, so as to achieve fully offline, high-precision and safe and controllable personalized electrical stimulation adaptive adjustment.
[0121] The device switches to a completely offline, independent operating mode, disabling all cloud network communication channels, remote computing power call interfaces, and general parameter library loading permissions. It only uses the lightweight algorithms and configuration parameters embedded in the local firmware. The device first calls its local self-test program to autonomously detect the user's skin tolerance and muscle condition. Based on the collected raw physiological and sensory data, it generates personalized initial electrical stimulation parameters using an edge-side fitting algorithm. Simultaneously, it generates upper and lower limit safety threshold ranges specific to each user's individual body part, completing the initial configuration of the startup parameters. During the formal operation phase, based on the dual-modal fusion control feature quantity output by local real-time computation, it calls a minimal step-size progressive fine-tuning algorithm to continuously and smoothly correct the electrical stimulation amplitude, frequency, and duty cycle parameters, dynamically matching the output parameters according to the real-time changes in the user's muscle fatigue state and physical tolerance. The device simultaneously runs a dual-layer safety protection program, simultaneously monitoring objective physiological parameters of skin impedance and quantitative data from the user's subjective sensory feedback, constraining the upper limit and adjustment amplitude of the electrical stimulation output in real time. All self-testing, parameter initialization, dynamic adjustment, and safety monitoring operations are performed in a closed loop on the device's local MCU, without relying on external computing power or network resources, thus completing offline personalized electrical stimulation adaptive control.
[0122] Step S151: Offline autonomous start of tolerance self-test. The device is in a completely offline working condition. It does not need to rely on cloud network, background computing power and general preset parameter library. It calls the lightweight self-test algorithm that is fixed locally on the device and autonomously starts the user's skin tolerance and muscle condition self-test process.
[0123] When the device is operating completely offline, cloud network data interaction, background remote computing power scheduling, and access to the device's built-in general preset parameter library are disabled. All program execution, data calculation, and parameter generation rely on the device's local hardware resources and embedded programs. After the device powers on and completes initialization, it automatically calls the lightweight tolerance self-test algorithm program pre-embedded in the local Flash firmware, autonomously triggering the self-test start command for the user's skin tolerance and muscle relaxation state, without manual triggering or cloud command control. After the self-test process starts, the device's local MCU independently schedules the signal acquisition module, electrical stimulation output module, and data processing module to work together, sequentially completing signal output, data acquisition, and feature recognition calculations according to the preset self-test timing logic. The entire process uses locally embedded lightweight calculation logic, without loading any cloud-based general parameters or global model parameters, relying entirely on the device's local resources to complete the autonomous self-test of the user's basic physical state.
[0124] Step S152: Trial Stimulation and Multi-Source Initial Feature Acquisition. The device outputs a low-amplitude, wide-safety-margin trial basic electrical stimulation signal, and simultaneously and continuously acquires real-time temporal data of skin impedance at the user's massage site. It captures the user's initial physiological stress fluctuations, muscle tension, skin conductivity status, and physiological characteristics. Combined with the user's initial somatosensory feedback quantitative score, it automatically identifies the user's current physical tolerance baseline, muscle relaxation state, and skin perception sensitivity.
[0125] After the device initiates its self-test process, the electrical stimulation output module outputs a preset low-amplitude, wide-safety-margin trial electrical stimulation signal. The amplitude, frequency, and duty cycle of the stimulation signal all use fixed self-test parameters locally embedded in the device, ensuring the safety and stability of the self-test process. Simultaneously with the output of the trial signal, the device continuously collects real-time temporal data of the skin impedance at the user's massage contact area at a fixed sampling frequency of 100Hz, completely recording raw data such as impedance fluctuations, numerical abrupt changes, and steady-state intervals within the self-test cycle. The MCU analyzes the temporal data to extract three basic physiological characteristic data: the user's initial physiological stress fluctuations, muscle tension, and skin conductivity. It simultaneously collects the user's sensory feedback information during the self-test phase, completes the 0-10 level quantization score conversion, and combines it with the physiological characteristic data to perform comprehensive calculations, accurately identifying the user's current physical tolerance baseline value, muscle relaxation level, and skin perception sensitivity level, generating a complete user initial state self-test dataset.
[0126] Step S153: Offline fitting generates personalized initial parameters and safety thresholds. Based on the multi-source initial feature data obtained from self-testing, personalized initial electrical stimulation parameters and safety threshold ranges that are adapted to the user's real-time physical state are automatically fitted and generated through the local algorithm on the edge.
[0127] After the device completes its self-test, the local MCU fully reads the multi-source initial feature data collected, including structured data such as skin impedance temporal characteristics, muscle tension characteristics, skin conductivity characteristics, and the user's initial somatosensory quantification score. The device calls the locally pre-pre-built edge-side fitting algorithm, loads a lightweight fitting formula and parameter mapping rules adapted to the self-test data, and performs normalization, feature weight allocation, and correlation fitting calculations on the multi-source initial feature data. Combining the user's skin perception sensitivity, body tolerance baseline, and muscle relaxation state, it automatically calculates and generates personalized initial electrical stimulation parameters adapted to the user's real-time body state, specifically including initial stimulation amplitude, operating frequency, and pulse duty cycle parameters. At the same time, based on the user's tolerance baseline extreme value data, it fits and generates user-specific upper and lower limit safety threshold ranges for electrical stimulation parameters, replacing the device's factory-standard fixed parameters, and completing the personalized parameter initialization configuration storage in offline mode.
[0128] Step S154: Progressive dynamic parameter correction based on fusion features. During the actual massage process, the device continuously reads the real-time dual-modal fusion control feature quantity. According to the dynamic change trend of the fusion features and the real-time numerical fluctuation, the device adopts a very small step progressive fine-tuning strategy to continuously and smoothly adaptively correct the electrical stimulation output parameters. This adapts in real time to the changes in the user's muscle fatigue accumulation and the dynamic rise and fall of body tolerance during the massage process, and adapts to the differentiated usage needs of different users with different physical conditions, different muscle relaxation states, and different fatigue levels.
[0129] After completing the initial configuration of personalized parameters upon startup, the device enters the formal dynamic massage control working state, maintaining offline operation throughout. It continuously retrieves the dual-modal fusion control feature quantities updated in real-time by the local MCU as the control benchmark. The device captures the instantaneous values, fluctuation amplitudes, and temporal trends of the fusion feature quantities in real-time according to a fixed sampling period, continuously identifying the user's muscle fatigue accumulation progress and the rise and fall of physical tolerance during the massage process. The device calls upon a locally fixed, minimal-step progressive fine-tuning strategy to perform uninterrupted smooth fine-tuning calculations on three core parameters: electrical stimulation amplitude, frequency, and pulse duty cycle, abandoning the method of abrupt adjustment. Based on the dynamic changes of the fusion feature quantities, the device corrects the electrical stimulation output parameters in real-time, adapting to differences in physical condition, initial muscle relaxation state, and real-time changes in fatigue levels among different users, maintaining smooth and continuous parameter adjustment throughout the entire process, achieving dynamically adapted personalized electrical stimulation control.
[0130] Step S1541: Offline dynamic control mode entry. After the device completes the offline self-test process and loads the personalized initial electrical stimulation parameters and safety thresholds adapted to the individual user's state, it enters the dynamic massage control working stage. The entire process is independent of cloud network and background computing power. The local MCU retrieves the continuously iteratively updated dual-modal fusion control feature quantity in the device's running memory in real time as the basis for real-time control.
[0131] The device performs a complete offline self-test upon startup, fitting user-specific initial electrical stimulation parameters and generating safety threshold ranges. It then automatically loads personalized parameters into the running memory, completing the device parameter initialization configuration. The device remains offline throughout the process, disabling cloud network communication, background computing power access, and remote parameter updates. All control calculations are performed by the local embedded MCU. During operation, the device continuously retrieves the real-time iteratively updated dual-modal fusion control feature quantity from the running memory. This feature quantity is generated by fusing local physiological and somatosensory data, with a value update every 20 milliseconds. The MCU uses this real-time fusion feature quantity as the sole criterion for dynamic control, initiating the end-side dynamic massage control logic and entering a refined offline adaptive control mode. No external computing power or data participates in the parameter control process throughout.
[0132] Step S1542: Combine dynamic acquisition of fusion features and user status identification. The device collects the instantaneous values, temporal change slope and continuous frame fluctuation trend of the fusion control feature quantity in real time according to the preset fixed sampling frequency. Combined with the dynamic change law of the fusion feature quantity, it accurately determines the current muscle fatigue accumulation progress, muscle tension change and real-time somatosensory tolerance state rise and fall trend, and accurately distinguishes the different physical states of the user in the early stage of muscle relaxation, the middle stage of fatigue accumulation and the late stage of muscle soreness.
[0133] During dynamic adjustment, the device continuously reads dual-modal fusion control feature quantities at a preset fixed sampling frequency, collecting three core data types frame by frame: instantaneous values of feature quantities, temporal change slopes, and fluctuation differences between consecutive frames. The device's locally embedded state identification algorithm quantifies the user's muscle fatigue accumulation progress, real-time muscle tension values, and the rising and falling trends of perceived tolerance by comparing the positive and negative signs of feature quantity change slopes, fluctuation amplitudes, and steady-state durations. Based on the changing patterns of continuous multi-frame feature data, the device accurately divides the user's massage state into stages, identifying three typical body states: early stage of muscle relaxation, middle stage of fatigue accumulation, and late stage of muscle soreness. Corresponding user state identification signals are output, providing precise data support for matching subsequent parameter fine-tuning directions and step sizes, achieving real-time end-device identification of the user's body state.
[0134] Step S1543: Pre-configure of minimal step size fine-tuning rules. The device has a locally pre-fixed library of minimal step size progressive fine-tuning rules. It abandons the traditional mechanical gear jump adjustment mode. For the three core output parameters of electrical stimulation amplitude, frequency and pulse duty cycle, the corresponding single-step fine-tuning increment, fine-tuning rate and steady-state holding threshold are configured independently. Based on the positive upward trend or negative downward trend of the fused feature quantity, the corresponding parameter fine-tuning direction and fine-tuning step size are adaptively matched.
[0135] The device's local firmware pre-deploys a minimal-step progressive fine-tuning rule library. This library abandons the traditional level-based abrupt adjustment logic, independently configuring fine-tuning rules for three types of electrical stimulation parameters. Dedicated single-step fine-tuning increments, fine-tuning rates, and steady-state hold thresholds are set for electrical stimulation amplitude, operating frequency, and pulse duty cycle. All parameters are stored locally in read-only memory and can be directly accessed offline. The device determines the fine-tuning direction based on the changing trend of the fused feature quantity. When the fused feature quantity increases positively, it matches a parameter-increasing fine-tuning rule; when the fused feature quantity decreases negatively, it matches a parameter-decreasing fine-tuning rule. The system adaptively matches the corresponding fine-tuning step size based on the magnitude of feature quantity fluctuations: small fluctuations match small-step fine-tuning, and large fluctuations match moderately large-step fine-tuning, ensuring that parameter adjustments closely match the user's real-time physical changes.
[0136] Step S1544: Gradual parameter adjustment in a relaxed state. When the fusion feature quantity is detected to be changing smoothly and positively, the user's physiological state tends to be relaxed and the body tolerance is steadily increasing, the device gradually increases the electrical stimulation output parameters according to the preset minimal gradient, slowly increasing the intensity of massage stimulation to adapt to the physiological changes of the user's muscles gradually relaxing and adapting to the stimulation.
[0137] The device monitors the changes in dual-modal fusion feature quantities in real time. When multiple consecutive frames show a smooth positive trend in the fusion feature quantities, and the user's skin impedance tends to be stable with no negative quantifiable feedback, it determines that the user's muscles are gradually relaxing and their somatosensory tolerance is steadily improving. The device invokes a preset minimal gradient increment rule to gradually increase the electrical stimulation amplitude, frequency, and duty cycle output parameters in steps, layers, and small increments. The magnitude of each parameter increment is strictly controlled within a preset minimal range. The parameter increment process adopts a gradual and smooth increase mode, without abrupt changes or jumps, conforming to the physiological changes of the user's muscles gradually relaxing and adapting to the electrical stimulation intensity, matching the real-time state of the user's steadily improving tolerance, and achieving precise adaptive control during the relaxation phase.
[0138] Step S1545: Parameter reduction and adjustment under fatigue and soreness conditions. When the fusion characteristic quantity shows a decline and fluctuation, and the user's muscle tension increases or fatigue and soreness characteristic signals are detected, the device reduces the parameter increment or reverses the electrical stimulation parameter by a small amount, actively reducing the electrical stimulation output intensity to adapt to the dynamic changes in the user's real-time physical tolerance.
[0139] The device continuously monitors the fluctuations in fusion characteristic quantities and the user's physiological and somatosensory data. When it detects a continuous decline in fusion characteristic quantities, coupled with fluctuations in skin impedance data indicating tension and an unpleasant shift in somatosensory quantification scores, it determines that the user's muscle tension has increased, fatigue and soreness have accumulated, and physical tolerance has decreased. The device immediately activates parameter reduction and adjustment logic, reducing the incremental increase of the original parameters, or slightly reducing the output parameters of electrical stimulation amplitude, frequency, and duty cycle based on the fluctuation amplitude. The parameter reduction process remains smooth and continuous, adaptively matching the reduction amplitude according to the user's degree of fatigue and soreness, precisely adapting to the dynamic changes in the user's real-time decreased tolerance, avoiding discomfort caused by excessive stimulation intensity, and matching the user's needs in a fatigued state.
[0140] Step S1546: Smooth fine-tuning and steady-state lockout anti-shake control. All electrical stimulation parameters are adjusted using a continuous smooth iteration method, controlling the single parameter fine-tuning amplitude within the minimum range imperceptible to the human body. At the same time, a short-term steady-state lockout mechanism is configured. When the fluctuation amplitude of the fused feature quantity is less than the preset steady-state threshold, the current optimal electrical stimulation parameter is locked and maintained for stable output.
[0141] All electrical stimulation parameter fine-tuning calculations in the device employ a continuous, smooth, iterative mechanism, uniformly constraining the amplitude of each parameter fine-tuning step. This keeps the amount of change in each adjustment within a minimal range imperceptible to the human body, eliminating sudden parameter changes and intensity jumps. The device has a locally pre-defined steady-state lock-in threshold and calculates the inter-frame fluctuation difference of the fused feature quantities in real time. When the fluctuation amplitude of the fused feature quantities in multiple consecutive frames is less than the preset steady-state threshold, the user's physical state is determined to have entered a stable phase, automatically triggering a short-term steady-state lock-in mechanism. In the lock-in state, the device locks the current optimal electrical stimulation output parameters, maintaining stable parameter output and pausing dynamic fine-tuning. The lock-in is released only after a significant fluctuation in the feature quantities is detected, effectively avoiding output jitter caused by frequent fine-tuning and ensuring the stability of the massage output.
[0142] Step S1547: User-personalized adaptive adaptation. During real-time control, the device dynamically adapts to user physical differences, initial muscle relaxation state, and real-time fatigue level. It adaptively matches differentiated parameter adjustment rates and ranges based on the individual differences in skin perception sensitivity, muscle tolerance limit, and fatigue accumulation speed of different users.
[0143] During dynamic device adjustment, personalized basic data and real-time status data are continuously linked to complete differentiated adaptation calculations. Locally stored user physical attributes, initial muscle relaxation parameters, and historical fatigue response data are retrieved as adaptation benchmarks. Based on differences in skin sensitivity, muscle tolerance thresholds, and fatigue accumulation rates among different users, customized parameter adjustment rates and ranges are adaptively matched. High-sensitivity users are matched with low-speed, small-range fine-tuning rules, while low-sensitivity users are matched with moderately high-speed, large-range fine-tuning rules. Users with fast fatigue accumulation rates are adapted to higher-frequency parameter correction cycles, while users with slow fatigue accumulation rates have extended steady-state maintenance durations, achieving refined and differentiated dynamic parameter control tailored to each individual.
[0144] Step S1548: Offline closed-loop fine-tuning at the device end. All the computational logic of the entire set of fusion feature monitoring, user body state determination, parameter step size matching, and progressive adaptive correction is completed in the offline closed loop at the device end. Relying on the real-time feedback closed loop of dual-modal fusion features, the electrical stimulation output state is continuously optimized to ensure stable and precise control of massage electrical stimulation output, which is in line with the muscle state and somatosensory needs of users at different massage stages.
[0145] The entire computational logic of the device, encompassing feature acquisition and monitoring, user body state identification, parameter fine-tuning step size matching, and progressive adaptive correction, is deployed locally in the device's embedded firmware. It operates entirely offline in a closed loop on the device side, requiring no cloud data interaction or remote computing power support. Using dual-modal fusion features as the basis for real-time feedback, the device continuously iterates and optimizes the amplitude, frequency, and duty cycle parameters of the electrical stimulation output, ensuring smooth, jitter-free, and precise adjustment throughout the entire process. The device can accurately adapt to the user's body state changes throughout the entire massage process, from initial relaxation to mid-stage fatigue and late-stage soreness, matching the personalized sensory needs and muscle state characteristics of different users. It achieves high-precision, dynamic, and personalized adaptive fine-tuning of electrical stimulation even in completely offline operation.
[0146] Step S155: Construct a dual-layer safety protection mechanism based on physiological and sensory perception, and establish a dual-layer safety protection logic that combines objective physiological monitoring with subjective sensory verification;
[0147] The device's local firmware pre-builds a dual-layer security protection logic, constructing a two-dimensional security control system that coordinates an objective physiological monitoring protection layer and a subjective sensory verification protection layer. These two protection mechanisms operate synchronously and in parallel, independently determining and collaboratively constraining the electrical stimulation output parameters. The objective physiological monitoring protection layer collects real-time data on skin impedance fluctuations and signal steady-state characteristics at the user's massage site, continuously comparing and monitoring against preset physiological safety thresholds to capture sudden physiological signal changes, abnormal fluctuations, and deviations exceeding thresholds. The subjective sensory verification protection layer reads the user's offline voice parsing, quantifying sensory scores and sensory status labels, continuously identifying abnormal sensory signals such as soreness, tingling, excessive force, and numbness. The dual protection mechanisms independently output constraint commands; any layer detecting an anomaly can trigger parameter reduction and restriction operations, comprehensively ensuring the device's offline operational safety.
[0148] Step S156: Offline closed-loop adaptive control on the device side. The entire control process, including tolerance self-check, personalized parameter initialization, dynamic parameter adaptive correction, and dual-layer safety protection, is completed offline in a closed loop on the device side. It does not require cloud data interaction or remote computing power support, but relies on local real-time physiological perception, somatosensory feedback correction, and lightweight algorithm iteration.
[0149] The entire user tolerance self-test process, personalized parameter initialization configuration process, dynamic parameter adaptive correction process, and dual-layer security protection and control process are integrated into the device's local firmware system. All data acquisition, feature calculation, parameter fitting, dynamic adjustment, and safety judgment logic are completed offline in a closed loop on the device side. The device completely disables cloud network transmission, remote computing power access, and cloud parameter synchronization functions, relying solely on local MCU lightweight algorithms, locally stored data, and locally acquired real-time physiological and somatosensory data to complete the entire adaptive control process. Through local real-time physiological sensing, somatosensory feedback correction, and continuous iterative optimization of output parameters using lightweight algorithms, the device completely eliminates dependence on external devices and networks, achieving a fully offline, high-precision, safe, and controllable personalized electrical stimulation adaptive adjustment operation mode.
[0150] Based on the same inventive concept, please refer to Figure 2 The diagram shows a schematic block diagram of a portable massager offline adaptive electrical stimulation control system 100 with integrated voice feedback, provided in an embodiment of this application, for performing the above-described portable massager offline adaptive electrical stimulation control method with integrated voice feedback. The portable massager offline adaptive electrical stimulation control system 100 with integrated voice feedback may include a communication unit 110, a machine-readable storage medium 120, and a processor 130.
[0151] In this embodiment, both the machine-readable storage medium 120 and the processor 130 are located within the portable massager offline adaptive electrical stimulation control system 100 with integrated voice feedback, and are separately configured. However, it should be understood that the machine-readable storage medium 120 may also be independent of the portable massager offline adaptive electrical stimulation control system 100 with integrated voice feedback, and may be accessed by the processor 130 via a bus interface. Alternatively, the machine-readable storage medium 120 may also be integrated into the processor 130 and may communicate and interact with external systems via the communication unit 110.
[0152] The processor 130 is the control center of the portable massager offline adaptive electrical stimulation control system 100 with integrated voice feedback. It connects to various parts of the system via various interfaces and lines. By running or executing software programs and / or modules stored in the machine-readable storage medium 120, and by calling data stored in the machine-readable storage medium 120, it performs various functions and processes data of the portable massager offline adaptive electrical stimulation control system 100 with integrated voice feedback, thereby providing overall monitoring of the system. Optionally, the processor 130 may include one or more processing cores; for example, the processor 130 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. The machine-readable storage medium 120 is used to store machine-executable instructions for executing the scheme of this application, and the processor 130 is used to execute the machine-executable instructions stored in the machine-readable storage medium 120 to implement the portable massager offline adaptive electrical stimulation control method with integrated voice feedback provided in the aforementioned method embodiment.
[0153] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
[0154] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A portable massager offline adaptive electrical stimulation control method integrating voice feedback, characterized in that: Includes the following steps: A multimodal adaptive control model integrating objective physiological characteristics and subjective somatosensory characteristics was constructed, and the model was optimized for lightweighting and accuracy enhancement. The adaptive control model was then deployed and applied offline on low-performance edge devices. When the device is working offline, it collects physiological state signals and user subjective voice and somatosensory signals in parallel. It performs time-series alignment processing on the two signals, and performs quantization conversion of subjective voice and somatosensory information and noise filtering of physiological signals, respectively, to obtain standardized subjective somatosensory features and effective physiological feature data that can be used for subsequent processing. Establish a multi-source feature fusion and control mechanism on the edge side, adaptively and dynamically balance the user's subjective sensory information and objective physiological state information, and fuse and generate a unified control feature quantity that takes into account both the physical state of device detection and the user's subjective user experience. An independent storage space is built locally on the device to compress and isolate the stimulation-related feature data of multiple users and multiple parts. Based on the fusion and control feature quantity, the electrical stimulation output parameters are dynamically adjusted in a continuous and gradual adjustment manner. Local incremental iteration is carried out using the on-site data generated during the massage process to continuously update and persistently retain user tolerance-related model data. When the device is offline, it can autonomously perform a self-test of user tolerance, generate personalized initial stimulation parameters and safety thresholds, and dynamically and adaptively correct electrical stimulation output parameters based on real-time fusion characteristics to adapt to the differentiated usage needs of different users and muscle states. At the same time, it combines user subjective feedback and objective physiological parameters to construct a dual-layer safety protection logic, realizing fully offline, high-precision and safe and controllable personalized electrical stimulation adaptive adjustment.
2. The portable massager offline adaptive electrical stimulation control method with integrated voice feedback as described in claim 1, characterized in that: The construction of a multimodal adaptive control model integrating objective physiological characteristics and subjective sensory characteristics, along with lightweight optimization and accuracy enhancement of the model, and the offline deployment and application of the adaptive control model on low-performance edge devices, includes: A cloud-based training dataset is constructed, which includes synchronously collected skin impedance physiological sampling data, user voice somatosensory text, and corresponding electrical stimulation modulation parameter labels. The dataset is then cleaned and standardized with annotation. A basic model of a dual-branch multimodal adaptive neural network was constructed. The model is set with independent physiological feature input branches and speech-sensory feature input branches, which are used to extract skin impedance temporal physiological features and encoded speech-sensory features, respectively. The features output from the two branches are concatenated and fused and then fed into the parameter mapping output layer to predict the amplitude, frequency, and duty cycle control parameters of the electrical stimulation pulse. The basic model of the multimodal adaptive neural network is supervised and trained using an annotated dataset. After iterative convergence, a high-precision cloud-pre-trained basic model is obtained. A hierarchical structured pruning process is performed on the pre-trained basic model in the cloud. The contribution of each network node and feature channel to the model output is calculated. Redundant fully connected layer parameters, invalid convolutional nodes and redundant feature mapping channels with contribution values lower than a preset threshold are removed. Only the functional network structures of skin impedance feature extraction, speech somatosensory semantic parsing and electrical stimulation parameter mapping are retained to obtain the pruned intermediate model. The intermediate pruning model is quantized into 8-bit integers, and the original 32-bit floating-point weights and bias parameters are converted into 8-bit integer data. The scaling factor and zero offset parameters are matched and configured, and the traditional floating-point operations are replaced by integer operations. A cloud-based knowledge distillation training framework is built, using an unsimplified high-precision cloud-based basic model as the teacher model and a pruned and quantized intermediate model as the student model. Small sample data is synchronously input into the teacher and student models. The control parameters output by the teacher model and the distribution of intermediate layer features are used as soft labels to construct the distillation loss function. The parameters of the student model are updated through reverse iteration, and the multi-scenario control logic and parameter convergence rules of the cloud model are transferred. The lightweight adaptive control model is formatted and compiled into firmware to generate a localized executable model file adapted to the low-power MCU of the portable massager, which is then burned into the local firmware of the massager. When the device is in offline operation, the local MCU directly calls the fixed lightweight adaptive control model to complete the end-side inference, autonomously completes the multimodal fusion analysis of the objective physiological characteristics of the human body and the subjective somatic characteristics of the user, and outputs the corresponding electrical stimulation control parameters in real time, without the need for cloud computing power to participate in the whole process; Accuracy verification tests are performed on the deployed edge model. The output data deviation between the edge model and the cloud teacher model is compared. If the output deviation exceeds the preset range, the pruning threshold and quantization parameters are iteratively optimized until the inference accuracy of the edge model meets the preset standard.
3. The portable massager offline adaptive electrical stimulation control method integrating voice feedback according to claim 2, characterized in that: The aforementioned construction of a dual-branch multimodal adaptive neural network basic model involves setting up independent physiological feature input branches and speech-sensory feature input branches to extract skin impedance temporal physiological features and encoded speech-sensory features, respectively. The features output from the two branches are concatenated and fused before being fed into a parameter mapping output layer to predict the amplitude, frequency, and duty cycle modulation parameters of the electrical stimulation pulse. The multimodal adaptive neural network basic model is then trained under supervised supervision using a labeled dataset. After iterative convergence, a high-precision cloud-pre-trained basic model is obtained, including: The collected physiological time-series data and user voice and somatosensory text data are standardized, cleaned, normalized and structured, respectively, to complete the unified dimensional representation and modal standardization transformation of objective physiological data and subjective somatosensory semantic data, and generate standardized input feature data that can be used for training and feature extraction of multimodal neural network models. Two functionally independent single-modal feature extraction network branches were constructed to perform deep feature mining and adaptive purification on the standardized objective physiological time-series data and subjective somatosensory feature vectors, respectively, to extract effective features of the two modalities and filter out redundant interference information. A feature splicing and fusion layer is set up to perform dimension alignment and channel splicing on the temporal physiological feature vector output by the physiological feature extraction branch and the semantic somatosensory feature vector output by the speech somatosensory feature extraction branch, thereby generating a multimodal fusion feature vector that simultaneously represents the objective physiological state of the human body and the subjective somatosensory state of the user. A parameter mapping output layer containing three independent fully connected prediction sublayers is constructed. Multimodal fusion feature vectors are connected to the parameter mapping output layer. The three fully connected prediction sublayers correspond to three types of control parameters: electrical stimulation pulse amplitude, operating frequency, and duty cycle, respectively. Parameter regression prediction is completed based on the multimodal fusion feature vectors, and the predicted values of electrical stimulation control parameters adapted to the user's real-time state are output. Full-scale supervised training was carried out using cloud datasets that had been cleaned and labeled. Paired standardized skin impedance time-series data and speech somatosensory coding features were used as model inputs. Manually labeled optimal electrical stimulation amplitude, frequency, and duty cycle parameters were used as training ground value labels. A mean squared error loss function was constructed to quantify the deviation between the predicted value and the ground value. The gradient descent algorithm was combined with the backpropagation mechanism to iteratively update the weights and bias parameters of the dual-branch network, feature fusion layer, and parameter mapping output layer. Set a preset number of iterations and a convergence threshold, monitor the training loss and model prediction accuracy in real time, and terminate the training iteration and solidify the model parameters after the loss function tends to stabilize and the prediction accuracy reaches the preset standard.
4. The portable massager offline adaptive electrical stimulation control method integrating voice feedback according to claim 1, characterized in that: The establishment of the edge-side multi-source feature fusion and control mechanism adaptively and dynamically balances the user's subjective sensory information and objective physiological state information, and fuses and generates a unified control feature quantity that takes into account both the physical state of device detection and the user's subjective experience, including: Based on the independent extraction of end-side skin impedance physiological features and user sensation features, the device local real-time multi-source feature fusion and control logic is activated. The skin impedance physiological feature vectors collected and filtered in real time on the end side and the user subjective sensation quantization scores obtained offline are subjected to dimension unification adaptation and normalization processing. The two types of heterogeneous modal features are unified to the same numerical calculation range, and the basis for dual-modal feature collaborative calculation is constructed. A dynamic weight adaptive allocation strategy is pre-fixed in the device's local firmware, which is divided into two control scenarios based on the user's real-time usage status: comfortable steady state and abnormal body sensation. When the user is detected to be in a stable state of stillness, comfort and no negative tactile feedback, the fusion weight of skin impedance physiological characteristics is increased and the weight of voice tactile characteristics is decreased. The regulation is implemented based on the user's skin conductivity, muscle tension and other objective physiological and physical states. When the system detects abnormal feedback from the user, such as soreness, stinging, or discomfort, it automatically switches the weight allocation strategy to increase the weight of the user's subjective feedback features and decrease the weight of the skin impedance physiological features. The system uses the user's subjective feeling as the basis for adjustment to compensate for the physiological signal detection deviation caused by limb micro-movements and skin condition fluctuations. Based on dynamically allocated feature weights, the normalized physiological feature data and the body sensation quantification score are weighted and fused using a lightweight weighted fusion calculation formula on the device side, generating a unified multimodal fusion control feature quantity that takes into account both the user's objective physiological state and subjective user experience in real time. The entire process, including feature normalization, scene determination, weight iteration, and multi-source feature fusion calculation, is completed locally on the massager itself, without the need for cloud computing power and data interaction support. It constructs a globally accurate control basis through dual-modal information complementarity and error correction.
5. The portable massager offline adaptive electrical stimulation control method with integrated voice feedback according to claim 4, characterized in that: The dynamically allocated feature weights are used to perform weighted fusion calculations on normalized physiological feature data and haptic quantification scores through a lightweight weighted fusion calculation formula on the device side. This generates a unified multimodal fusion control feature quantity in real time that takes into account both the user's objective physiological state and subjective user experience, including: After independently extracting the physiological features of skin impedance and the user's sensory features, the massager's local MCU activates the built-in multi-source feature fusion operation logic. For the two types of heterogeneous data, namely the high-dimensional physiological feature vector of skin impedance after filtering and noise reduction and the discrete sensory quantization scores of 0-10 levels, the extreme value normalization algorithm is used to carry out full-domain numerical mapping, which unifies and scales the original fluctuation values of skin impedance and the sensory quantization scores to the dimensionless standard operation range of 0 to 1. At the same time, the temporal feature vector of skin impedance is subjected to dimensional compression mapping, which aggregates the multi-dimensional temporal features into a single-dimensional comprehensive physiological feature score. The dual-scene control logic is pre-fixed in the device's local firmware, and the judgment thresholds and matching weight parameter groups corresponding to the comfortable steady state and abnormal body sensation state are configured. The device can identify the user's real-time usage status independently on the edge without cloud intervention. When the device does not detect any negative tactile feedback such as soreness, stinging, or discomfort in the user's body in consecutive frames, and the fluctuation of skin impedance data is within the preset stable range, it determines that the user is in a static and comfortable steady state. The weight of the skin impedance physiological characteristics is adaptively increased, while the weight of the tactile quantification score is simultaneously decreased. The user's skin conductivity characteristics and muscle tension objective physiological state are used as the basis for regulation. When the device detects that the user has clear feedback of physical discomfort, or the physical discomfort quantification score exceeds the preset comfort threshold, it is determined to be a physical discomfort abnormality scenario. It automatically switches the weight allocation logic, increases the weight of the user's subjective physical discomfort quantification score, reduces the weight of skin impedance physiological characteristics, and corrects physiological signal distortion caused by limb tremors, skin sweating, and slight electrode displacement based on the user's subjective physical discomfort feedback. After completing the dynamic weight allocation of dual-modal features, the embedded lightweight weighted fusion calculation formula is called on the edge side. The normalized comprehensive physiological feature score and the somatosensory quantification score are multiplied by the corresponding dynamic weights respectively. The two types of weighted feature values are summed and aggregated. At the same time, the calculation result is constrained within the standard control feature range through the amplitude limiting correction mechanism, and a unified multimodal control feature quantity that takes into account both the user's objective physiological state and subjective user experience is generated in real time. The entire offline autonomous operation and control process is completed locally on the massager, including data standardization, user status and scenario determination, dynamic weight switching, and multimodal feature fusion. It does not require cloud data transmission and computing power support, and relies on complementary and error-correcting dual-modal information to build a precise personalized control benchmark.
6. The portable massager offline adaptive electrical stimulation control method with integrated voice feedback as described in claim 1, characterized in that: The device constructs an independent storage space locally to compress and isolate stimulation-related feature data from multiple users and multiple body parts for storage. Based on the fused control feature quantities, it uses a continuous and gradual adjustment method to dynamically adjust the electrical stimulation output parameters. Furthermore, it utilizes on-site data generated during the massage process for local incremental iteration, continuously updating and persistently retaining user tolerance-related model data, including: A separate user model storage partition is defined in the local Flash storage area of the massage device. The user model storage partition is physically and logically isolated from the device system firmware partition and real-time data cache partition. Independent data storage subdirectories and data index tags are established for different user identities and different massage body parts to complete the classification and isolated storage of multi-user, multi-body model data. For user tolerance thresholds, optimal electrical stimulation parameter ranges for each body part, somatosensory-skin impedance mapping characteristics, and multidimensional feature data of historical control parameter samples that need to be persistently stored, a customized feature parameter hash compression algorithm is used for lightweight processing. Duplicate feature parameters and redundant interval data are deduplicated by hash and dimensional compression, leaving only effective feature data with user-specific differences. At the same time, a unique hash check code is bound to the model data of the massage part corresponding to each group of users. When the device is running offline, it retrieves the user tolerance model parameters stored locally in real time, combines them with the multimodal fusion control features generated in real time on the device side, and adopts a continuous and gradual parameter fine-tuning mechanism with a very small step size. The single-step fine-tuning threshold and adjustment rate of the electrical stimulation amplitude, frequency, and duty cycle are pre-configured. Based on the real-time change amplitude of the fusion control features, the electrical stimulation output parameters are corrected step by step and with small gradients iteratively, so as to achieve smooth and continuous adjustment of stimulation parameters and adapt to the dynamic changes of the user's muscle fatigue state and tolerance. Throughout a single massage session, the device's local MCU synchronously collects three types of incremental data in real time: filtered skin impedance physiological data, quantified somatosensory feedback data obtained from the user's offline voice analysis, and electrical stimulation output parameter data for each progressively fine-tuned session. This forms multi-source correlated sample data corresponding to a single massage session, and the sample data is temporarily cached in the device's local temporary storage area. After a single massage task is completed, the device automatically triggers a local small sample incremental iterative update mechanism, retrieves the incremental on-site sample data generated during the massage, compares the deviation between the historical model data and the actual measured sample data, and iteratively corrects and optimizes the tolerance threshold model, somatosensory-impedance mapping model, and optimal parameter range model for the user's corresponding massage area. It updates the model tolerance threshold boundary, optimizes the bimodal feature mapping relationship, corrects the optimal electrical stimulation parameter range, and iteratively generates model parameters that are adapted to the user's real-time physical state. After hash compression, the newly optimized user model data is overwritten into the independent model storage partition corresponding to the user and the massage area, achieving local persistent storage. No cloud computing power or data synchronization is required throughout the process. The model achieves autonomous iterative optimization by relying on incremental sample data accumulated locally on the device. Through repeated use, samples are continuously accumulated and the model accuracy is iteratively refined. The model adaptively matches the differentiated tolerance needs of users with different physical conditions, fatigue levels, and usage scenarios, continuously improving the personalization, accuracy, and adaptability of the massager's electrical stimulation control.
7. The portable massager offline adaptive electrical stimulation control method with integrated voice feedback according to claim 6, characterized in that: The user tolerance thresholds, optimal electrical stimulation parameter ranges for each body part, somatosensory-skin impedance mapping characteristics, and historical control parameter sample multidimensional feature data that need to be persistently stored are lightweighted using a customized feature parameter hash compression algorithm. This algorithm performs hash deduplication and dimensionality compression on duplicate feature parameters and redundant range data, retaining only valid feature data with individual user differences. Simultaneously, a unique hash verification code is bound to the model data for each user's corresponding massage area, including: The device's local MCU traverses the multidimensional feature dataset that needs to be persistently stored. The multidimensional feature dataset includes the user's tolerance threshold, the electrical stimulation amplitude, frequency, and optimal duty cycle parameter range for each body part, the somatosensory-skin impedance bidirectional mapping feature matrix, and historical multi-round adjustment parameter sample sequences. All structured feature data obtained through traversal are split into fields and semantically normalized to unify the data type, significant number of digits and storage format of various feature data, and invalid dirty data with collection abnormalities and incorrect formats are removed to complete the standardization cleaning and normalization preprocessing of the original feature data. The device-side fixed customized lightweight feature hash compression algorithm is invoked to perform hash digest matching and comparison to remove duplicates from the preprocessed full feature data. Fixed and reused general parameter ranges, homogeneous steady-state features and duplicate historical sample data are identified and deleted. Redundant and invalid data that do not have personalized distinguishability are screened out, and only effective feature data with individual differences, status updates and scene uniqueness corresponding to a single user and a single massage part are retained. Dimensional compression processing is performed on the high-dimensional somatosensory-skin impedance bidirectional mapping feature matrix. Strongly correlated feature dimensions and effective mapping weights are retained, while low-contribution and weakly correlated redundant dimensions are pruned. Under the premise of fully preserving the user's personalized tolerance rules and regulatory mapping relationships, lightweight dimensionality reduction storage of multi-dimensional feature data is completed, which is adapted to the storage and computing resource limitations of low-power MCUs. After completing the data deduplication and dimensional compression processing, the entire set of compressed model data corresponding to a single user and a single part is subjected to a hash operation. An irreversible hash digest is generated by combining the user's unique identifier, massage part identifier, model parameters and feature mapping data. This hash digest is used as a unique hash check code to bind the corresponding model data package and is fixed to the index header of the corresponding storage subdirectory. Each time user model data is written, updated, or read, the device recalculates the hash value of the current model data in real time and compares it with the pre-bound baseline hash check code. When the hash comparison result is inconsistent, it determines that the data has been tampered with, lost, or is corrupted, and automatically loads the valid historical backup model data and intercepts the writing of abnormal data. The entire process of feature data regularization, hash deduplication, dimension compression, and hash security verification is completed locally on the device side, which greatly reduces the data storage volume on the device side, while ensuring the uniqueness, integrity, and storage security of multi-user, multi-location model data.
8. The portable massager offline adaptive electrical stimulation control method with integrated voice feedback according to claim 6, characterized in that: After a single massage session, the device automatically triggers a local small-sample incremental iterative update mechanism. It retrieves the incremental on-site sample data generated during the massage, compares the deviation between historical model data and the measured sample data, and iteratively corrects and optimizes the user's tolerance threshold model, somatosensory-impedance mapping model, and optimal parameter range model for the corresponding massage area. This updates the model's tolerance threshold boundary, optimizes the bimodal feature mapping relationship, corrects the optimal electrical stimulation parameter range, and iteratively generates model parameters adapted to the user's real-time physical state, including: After a single massage task is completed normally, the device’s local MCU automatically wakes up the pre-fixed end-side small sample incremental iterative update mechanism, without the need for cloud command issuance or network data synchronization, and completes the device’s local autonomous iterative optimization. Multi-source incremental sample training pairs are retrieved and constructed. Incremental on-site sample data cached in real time by the device during the complete massage cycle are retrieved. The incremental on-site sample data includes skin impedance time-series physiological characteristic data, user body sensation quantitative feedback data, multi-modal fusion control characteristic quantity, and successively fine-tuned electrical stimulation amplitude, frequency, and duty cycle control parameter sequence. Multiple types of data are correlated and matched to construct one-to-one corresponding closed-loop multi-source small sample training pairs. The historical model data is accurately matched from the same source. Based on the currently logged-in user's identity and the massage area index, the historical baseline model data corresponding to the user and the massage area in the device's local Flash storage partition is accurately read. The historical baseline model data includes historical tolerance threshold boundaries, a bidirectional mapping matrix of somatosensory-skin impedance, and an optimal electrical stimulation parameter range model. This completes the accurate matching of the historical model parameters with the current measured incremental sample data. Multi-dimensional model deviation quantification analysis, start the lightweight deviation calculation logic on the terminal side, compare the output deviation, feature mapping deviation and parameter adaptation deviation of the current real-time sample data with the historical model data in each dimension, and quantify the dynamic offset of the user's current muscle fatigue level, skin conductivity state and body tolerance relative to the historical state. Based on the quantitative deviation between measured data and historical models, hierarchical differentiated incremental correction and optimization are implemented for the tolerance threshold model, the somatosensory-skin impedance mapping model, and the optimal parameter range model. This dynamically updates the user tolerance boundary range, fine-tunes the weights associated with the bimodal feature mapping, and iteratively updates the baseline range of the optimal control parameters. The entire model optimization process adopts an edge-side small-sample incremental learning strategy, which only fine-tunes the local parameters of the model for the current incremental sample data, without the need to retrain the global model. After the model iteration and optimization are completed, the updated set of model data is standardized, hashed to remove duplicates and compressed in dimension. Redundant parameters and invalid dimension information generated during the iteration process are removed, while effective features with user-specific differences are retained. At the same time, a unique hash check code is regenerated based on the user identifier, massage part identifier and new model parameters to replace the model's original old check code. The latest model data, which has been iteratively optimized and completed with lightweight compression and security verification, is stored locally and persistently. This enables incremental updates and upgrades of the model on the device side in a single round. The model parameters are continuously optimized iteratively based on local small sample data accumulated during each use, dynamically adapting to long-term dynamic changes in the user's physical condition, skin parameters, and tolerance. The entire process is based on the device side lightweight algorithm to complete offline closed-loop iterative optimization.
9. The portable massager offline adaptive electrical stimulation control method with integrated voice feedback according to claim 1, characterized in that: The device can autonomously perform user tolerance self-testing in offline mode, generate personalized initial stimulation parameters and safety thresholds, and dynamically and adaptively correct electrical stimulation output parameters based on real-time fusion features to adapt to the differentiated usage needs of different users and muscle states. Simultaneously, it combines user subjective feedback and objective physiological parameters to construct a dual-layer safety protection logic, achieving fully offline, high-precision, and safe controllable personalized electrical stimulation adaptive adjustment, including: Offline autonomous tolerance self-test: When the device is in a completely offline working condition, it does not rely on cloud network, background computing power and general preset parameter library. It calls the lightweight self-test algorithm that is fixed locally on the device and autonomously starts the self-test process of user skin tolerance and muscle condition. The device outputs a low-amplitude, wide-safety-margin trial basic electrical stimulation signal, while simultaneously and continuously collecting real-time temporal data of the skin impedance of the user's massage area. It captures the user's initial physiological stress fluctuations, muscle tension, skin conductivity status and physiological characteristics, and combines the user's initial somatosensory feedback with quantitative scores to automatically identify the user's current physical tolerance baseline, muscle relaxation status and skin perception sensitivity. Offline fitting generates personalized initial parameters and safety thresholds. Based on the multi-source initial feature data obtained from self-testing, personalized initial electrical stimulation parameters and safety threshold ranges that adapt to the user's real-time physical state are automatically fitted and generated through a local algorithm on the edge. Based on the progressive dynamic parameter correction of fusion features, during the actual massage work, the device continuously reads the real-time dual-modal fusion control feature quantity. According to the dynamic change trend of the fusion features and the real-time numerical fluctuation, the device adopts a very small step progressive fine-tuning strategy to continuously and smoothly adaptively correct the electrical stimulation output parameters. This adapts in real time to the changes in the user's muscle fatigue accumulation and the dynamic rise and fall of the body's tolerance during the massage process, and adapts to the differentiated usage needs of different users with different physical conditions, different muscle relaxation states, and different fatigue levels. Construct a dual-layer safety protection mechanism based on physiological and sensory perception, and establish a dual-layer safety protection logic that combines objective physiological monitoring with subjective sensory verification; The device-side offline closed-loop adaptive control process, which includes tolerance self-testing, personalized parameter initialization, dynamic parameter adaptive correction, and dual-layer safety protection, is completed offline in a closed loop on the device side. It does not require cloud data interaction or remote computing power support, but relies on local real-time physiological perception, somatosensory feedback correction, and lightweight algorithm iteration.
10. A portable massager offline adaptive electrical stimulation control system integrating voice feedback, characterized in that, include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to execute the portable massager offline adaptive electrical stimulation control method with fused voice feedback as described in any one of claims 1 to 9 by executing the machine-executable instructions.
