Dynamic mental health management system and method

Through the mental health dynamic management system, the quantum privacy module and dynamic rank adjustment Tucker decomposition are used, and combined with reinforcement learning to generate personalized intervention strategies, the privacy security, feature adaptation and intervention lag problems of the existing system are solved, and the security and real-time optimization of the mental health management system are achieved.

CN120511056APending Publication Date: 2025-08-19CHENGDU POLYTECHNIC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510605259.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing mental health management system cannot meet the needs of data privacy and security, dynamic adaptation of multimodal features and real-time optimization of personalized interventions at the same time, and there are problems of quantum computing threats, spatiotemporal drift across devices data distribution and static strategy generation lag.

Method used

The mental health dynamic management system is adopted, including data acquisition module, tensor processing module, quantum privacy module, federal aggregation module, correction compensation module, strategy generation module and neural compression module, and personalized intervention strategies are generated through quantum privacy protection, dynamic rank adjustment Tucker decomposition, reinforcement learning and reinforcing learning to generate personalized intervention strategies and deploy them in real time.

Benefits of technology

It has achieved information security communication guarantee for psychological assessment data, generalization ability of cross-device data fusion and individual adaptability, and solved the problems of privacy security and intervention lag in traditional systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120511056A_ABST
    Figure CN120511056A_ABST
Patent Text Reader

Abstract

The invention relates to the field of psychological health monitoring, and discloses a psychological health dynamic management system, which comprises a data acquisition module used for acquiring time, space and behavior multi-modal data of a user in real time; the tensor processing module is connected with the data acquisition module and is used for constructing the multi-modal data into a three-dimensional tensor and carrying out dimension reduction decomposition on the three-dimensional tensor; the quantum privacy module is connected with the tensor processing module and is used for performing quantization coding and privacy protection processing on the decomposed feature gradient; the federation aggregation module is connected with the quantum privacy module and is used for executing collaborative optimization of model parameters among distributed nodes; and the correction compensation module is bidirectionally connected with the tensor processing module and the federal aggregation module. The quantum privacy module realizes irreversible hidden transmission of gradient data, adopts a quantum state superposition coding and dynamic measurement basis selection mechanism, and ensures that the transmission process meets differential privacy constraints through non-orthogonal basis projection measurement and quantum noise injection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mental health monitoring, and in particular to a dynamic mental health management system and method. Background Art

[0002] There is an urgent need to build a real-time, accurate, and privacy-compliant dynamic mental health management system. Traditional mental health assessments rely on subjective scales and regular interviews, which suffer from limitations such as discrete monitoring and delayed interventions, making it difficult to capture transient fluctuations in emotions and the dynamic evolution of behavioral patterns. In recent years, the integration of wearable devices and artificial intelligence technologies has provided new avenues for continuous mental state monitoring. However, technical bottlenecks remain, such as the high-dimensional heterogeneity of multimodal data, the risk of privacy leakage, and the generation of personalized intervention strategies.

[0003] In existing technologies, mental health management systems typically employ a federated learning framework to achieve multi-institutional data collaboration, ensuring data security through homomorphic encryption or differential privacy. They utilize fixed-rank tensor decomposition for multi-source feature extraction and output standardized intervention recommendations based on a predefined rule base. For example, some systems employ homomorphic encryption algorithms based on mathematical problems (such as RSA and Paillier) to encrypt and transmit psychological assessment data, relying on static key management mechanisms. Feature fusion modules often employ fixed-rank constrained CP decomposition or Tucker decomposition techniques, removing redundant information by manually setting decomposition dimensions. Intervention strategy generation modules often employ decision trees or rule matching engines to generate fixed-strength intervention instructions based on historical data labels.

[0004] However, existing technologies suffer from systemic flaws: when building a closed-loop mental health management system, they are unable to simultaneously meet the three core requirements of data privacy and security, dynamic adaptation of multimodal features, and real-time optimization of personalized intervention. Specifically, traditional encryption methods rely on difficult mathematical assumptions, exposing them to the threat of quantum computing and the risk of man-in-the-middle attacks; fixed-rank tensor decomposition struggles to cope with the spatiotemporal drift of cross-device data distribution, leading to feature confusion and model degradation; and static policy generation mechanisms based on rule bases lack the ability to dynamically respond to the real-time evolution of users' mental states, resulting in delayed intervention and poor individual adaptability. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present invention provides a dynamic mental health management system and method, which solves the problem that the existing mental health management system cannot coordinately optimize data privacy protection, dynamic adaptation of multimodal features, and real-time optimization of personalized intervention.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: A dynamic mental health management system, comprising:

[0007] Data collection module, used to obtain users' time, space and behavior multimodal data in real time;

[0008] A tensor processing module, connected to the data acquisition module, configured to construct the multimodal data into a three-dimensional tensor and perform dimensionality reduction decomposition;

[0009] A quantum privacy module, connected to the tensor processing module, for performing quantization encoding and privacy protection processing on the decomposed feature gradients;

[0010] A federated aggregation module, connected to the quantum privacy module, for performing collaborative optimization of model parameters among distributed nodes;

[0011] a correction and compensation module, bidirectionally connected to the tensor processing module and the federated aggregation module, for detecting and correcting cross-layer data deviations;

[0012] A strategy generation module, connected to the federation aggregation module, generates personalized psychological intervention strategies based on reinforcement learning;

[0013] a neural compression module, connected to the strategy generation module, converting continuous strategy parameters into a spiking neural morphological model;

[0014] The edge deployment module is connected to the neural compression module to realize real-time decision reasoning on the terminal device.

[0015] Preferably, the tensor processing module specifically includes:

[0016] Based on the Tucker decomposition method, the original tensor is decomposed into the product of the core tensor and multiple factor matrices;

[0017] A rank constraint term is introduced during the decomposition process to control the complexity of the model. The rank constraint term acts on the rank value of the factor matrix of each dimension;

[0018] Dynamically adjust the rank parameters of each dimension according to the spatiotemporal distribution characteristics of data features;

[0019] Iteratively optimize the core tensor and factor matrix parameters through the alternating direction multiplication method;

[0020] The core tensor dimension is smaller than the original tensor, and the rank parameters of each dimension are set independently.

[0021] Preferably, the quantum privacy module includes:

[0022] The quantum coding unit maps the numerical gradient vector into the probability amplitude distribution of the quantum state;

[0023] Quantum entanglement unit, which generates inseparable states through controlled phase operations between multiple quantum bits;

[0024] The quantum decoding unit realizes the reverse conversion from the aggregate state to the original parameter space through a specific measurement basis.

[0025] Preferably, the federation aggregation module specifically includes:

[0026] The dual-objective optimization unit constructs a joint optimization objective that includes the gradient direction consistency constraint and the privacy noise constraint, where:

[0027] The first optimization goal is to minimize the difference between the gradient direction of each client's local model and the global gradient direction;

[0028] A dynamic noise regulator that updates the diagonal elements of the covariance matrix Σ in real time according to the preset privacy budget ε;

[0029] The quantum state projection decoder performs computational basis measurements on the aggregated quantum state and maps the quantum state amplitude distribution back to the gradient space;

[0030] Distributed parameter synchronizer, which distributes the decoded global gradient to each client to complete the model update;

[0031] The inverse matrix of the noise covariance matrix Σ is involved in the quadratic constraint calculation of the optimization objective.

[0032] Preferably, the correction and compensation module specifically includes:

[0033] Gradient alignment detection unit, which calculates the difference in gradient direction between the tensor decomposition layer and the federated aggregation layer. The difference is represented by the ratio of the Frobenius inner product of the gradient vectors of the two layers to the product of their norms.

[0034] a threshold judgment unit, activating a correction channel when the difference is lower than a preset threshold range;

[0035] The residual correction execution unit concatenates the tensor decomposition gradient and the federated aggregate gradient and inputs them into the learnable parameter matrix, generating a compensation signal through a modified linear activation function;

[0036] Dynamic correction controller, which adjusts the injection intensity of the compensation signal according to the real-time gradient difference;

[0037] The compensation signal is residually superimposed on the original core tensor to form a corrected feature tensor.

[0038] Preferably, the strategy generation module specifically includes:

[0039] Compound reward building blocks, synchronously calculating the following indicators:

[0040] The difference in probability distribution before and after the policy update is quantified by KL divergence;

[0041] The temporal continuity of the user's mental state is measured by the cosine similarity of adjacent state vectors;

[0042] The exploration incentive intensity of strategic actions is dynamically adjusted through the strategic entropy value;

[0043] The proximal policy optimization unit uses an update rule with gradient clipping to constrain the maximum amplitude of policy updates;

[0044] Advantage function estimator, which calculates the time series difference error based on the generalized advantage estimation method;

[0045] Policy entropy constraint controller, dynamically adjusts the weight coefficient of the entropy regularization term;

[0046] The gradient clipping operation limits the policy update rate to a preset range to prevent the training process from diverging.

[0047] Preferably, the neural compression module performs:

[0048] Pulse trigger signal generation: triggers a pulse signal when the continuous weight value exceeds the dynamically calculated activation threshold, and the activation threshold is adaptively adjusted according to the input distribution characteristics;

[0049] Synaptic weight iteration: Based on the temporal order of pre- and post-synaptic neuron spikes, the connection weight is strengthened or weakened within a preset time window.

[0050] The weight update follows the pulse timing-dependent plasticity rule, satisfying the adjustment direction that positive time difference strengthens the connection and negative time difference weakens the connection.

[0051] Preferably, the neural compression module further performs:

[0052] Pulse frequency encoding: Mapping the policy network weight values to pulse emission frequencies, where high-frequency pulses correspond to high absolute values of weights;

[0053] Weight update quantification: The change in connection weight is calculated using the following formula:

[0054]

[0055] Where η is the learning rate parameter and λ is the weight decay coefficient, and their value ranges are 0<η≤0.1 and 0.01≤λ≤0.1 respectively.

[0056] Preferably, the edge deployment module includes:

[0057] The neuromorphic encoder converts the continuous parameters output by the strategy generation module into a pulse timing-dependent encoding format. The conversion is achieved through a dynamic integration-discharge mechanism that satisfies the neuron membrane potential integration formula:

[0058]

[0059] where w k is the synaptic weight, N spike Counts the number of pulses in the time window.

[0060] The present invention also provides a method for dynamic management of mental health, comprising the following steps:

[0061] Step 1: Construct a three-dimensional data tensor of user spatiotemporal behavior in real time;

[0062] Step 2: Perform tensor decomposition with dynamic rank constraint to generate the core feature matrix;

[0063] Step 3: Perform quantum state encoding and entanglement protection on the decomposed characteristic gradient;

[0064] Step 4: Perform multi-node parameter collaborative aggregation under the federated learning framework;

[0065] Step 5: Dynamically correct the cross-layer deviation between decomposition features and aggregation parameters;

[0066] Step 6: Generate biologically inspired psychological intervention strategies based on reinforcement learning;

[0067] Step 7: compress the policy model into a spiking neuromorphic coding format;

[0068] Step 8: Deploy the compression model on the edge device and perform real-time decision reasoning.

[0069] The present invention provides a dynamic management system and method for mental health, which has the following beneficial effects:

[0070] 1. This invention achieves irreversible and hidden transmission of gradient data through a quantum privacy module. This module employs quantum state superposition encoding and a dynamic measurement basis selection mechanism to map gradient information in federated learning to quantum entangled states. Non-orthogonal basis projection measurement and quantum noise injection ensure that the transmission process satisfies differential privacy constraints. Compared to static encryption methods in traditional homomorphic encryption technology that rely on mathematical problems, this solution leverages the quantum no-cloning theorem to fundamentally eliminate the possibility of man-in-the-middle attacks that intercept ciphertext and infer parameters, providing information security communication guarantees for multi-institutional joint modeling of psychological assessment data.

[0071] 2. This invention uses an entropy-driven, dynamically rank-adjusted Tucker decomposition algorithm to extract core tensors from multimodal psychological monitoring data. The factor matrix is optimized using alternating least squares, and redundant noise dimensions are removed using L1 regularization constraints. Traditional fixed-rank decomposition schemes are prone to feature confusion when data distribution shifts. This technology dynamically adjusts the decomposition rank using the Hilbert-Schmidt independence test, addressing dimensional mismatches when fusing heterogeneous data across devices and ensuring the cross-scenario generalization of behavioral feature representation.

[0072] 3. This invention utilizes a reinforcement learning framework based on proximal policy optimization to design a composite objective function that includes state continuity rewards, KL divergence constraints, and dynamic entropy regulation. A dual-network architecture separates the policy evaluation and policy improvement processes, and an action masking mechanism is incorporated to filter intervention instructions that are inconsistent with the current physiological state. Compared to the rigid policy output of traditional static rule engines, this solution utilizes backpropagation of temporal difference errors to achieve online fine-tuning of policy parameters, addressing the issue of intervention lag caused by the dynamic evolution of the user's psychological state and improving the individual adaptability of cognitive behavioral therapy. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 It is the main framework diagram of the present invention;

[0074] Figure 2 Schematic diagram of the method of the present invention. DETAILED DESCRIPTION

[0075] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the present specification. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0076] Please see the attached Figure 1 The embodiment of the present invention provides a dynamic mental health management system, including:

[0077] Data collection module, used to obtain users' time, space and behavior multimodal data in real time;

[0078] The tensor processing module is connected to the data acquisition module and is used to construct the multimodal data into a three-dimensional tensor and perform dimensionality reduction decomposition;

[0079] The quantum privacy module is connected to the tensor processing module and is used to perform quantization encoding and privacy protection on the decomposed feature gradients;

[0080] The federated aggregation module, connected to the quantum privacy module, is used to perform collaborative optimization of model parameters among distributed nodes;

[0081] Correction and compensation module, bidirectionally connected tensor processing module and federated aggregation module, used to detect and correct cross-layer data deviations;

[0082] The strategy generation module connects to the federation aggregation module and generates personalized psychological intervention strategies based on reinforcement learning;

[0083] The neural compression module, connected to the policy generation module, converts the continuous policy parameters into a spiking neuromorphic model;

[0084] The edge deployment module is connected to the neural compression module to achieve real-time decision reasoning on the terminal device.

[0085] The tensor processing module specifically includes:

[0086] Based on the Tucker decomposition method, the original tensor is decomposed into the product of the core tensor and multiple factor matrices;

[0087] A rank constraint term is introduced in the decomposition process to control the complexity of the model. The rank constraint term acts on the rank value of the factor matrix of each dimension.

[0088] Dynamically adjust the rank parameters of each dimension according to the spatiotemporal distribution characteristics of data features;

[0089] Iteratively optimize the core tensor and factor matrix parameters through the alternating direction multiplication method;

[0090] The core tensor dimension is smaller than the original tensor, and the rank parameters of each dimension are set independently.

[0091] The quantum privacy module includes:

[0092] The quantum coding unit maps the numerical gradient vector into the probability amplitude distribution of the quantum state;

[0093] Quantum entanglement unit, which generates inseparable states through controlled phase operations between multiple quantum bits;

[0094] The quantum decoding unit realizes the reverse conversion from the aggregate state to the original parameter space through a specific measurement basis.

[0095] The federation aggregation module specifically includes:

[0096] The dual-objective optimization unit constructs a joint optimization objective that includes the gradient direction consistency constraint and the privacy noise constraint, where:

[0097] The first optimization goal is to minimize the difference between the gradient direction of each client's local model and the global gradient direction;

[0098] A dynamic noise regulator that updates the diagonal elements of the covariance matrix Σ in real time according to the preset privacy budget ε;

[0099] The quantum state projection decoder performs computational basis measurements on the aggregated quantum state and maps the quantum state amplitude distribution back to the gradient space;

[0100] Distributed parameter synchronizer, which distributes the decoded global gradient to each client to complete the model update;

[0101] The inverse matrix of the noise covariance matrix Σ is used to calculate the quadratic constraint of the optimization objective.

[0102] The correction and compensation module specifically includes:

[0103] Gradient alignment detection unit, which calculates the difference in gradient direction between the tensor decomposition layer and the federated aggregation layer. The difference is represented by the ratio of the Frobenius inner product of the gradient vectors of the two layers to the norm product;

[0104] A threshold judgment unit activates the correction channel when the difference is lower than a preset threshold range;

[0105] The residual correction execution unit concatenates the tensor decomposition gradient and the federated aggregate gradient and inputs them into the learnable parameter matrix, generating a compensation signal through a modified linear activation function;

[0106] Dynamic correction controller, which adjusts the injection intensity of the compensation signal according to the real-time gradient difference;

[0107] The compensation signal is residually superimposed on the original core tensor to form the corrected feature tensor.

[0108] The strategy generation module specifically includes:

[0109] Compound reward building blocks, synchronously calculating the following indicators:

[0110] The difference in probability distribution before and after the policy update is quantified by KL divergence;

[0111] The temporal continuity of the user's mental state is measured by the cosine similarity of adjacent state vectors;

[0112] The exploration incentive intensity of strategic actions is dynamically adjusted through the strategic entropy value;

[0113] The proximal policy optimization unit uses an update rule with gradient clipping to constrain the maximum amplitude of policy updates;

[0114] Advantage function estimator, which calculates the time series difference error based on the generalized advantage estimation method;

[0115] Policy entropy constraint controller, dynamically adjusts the weight coefficient of the entropy regularization term;

[0116] The gradient clipping operation limits the policy update rate to a preset range to prevent the training process from diverging.

[0117] The neural compression module performs:

[0118] Pulse trigger signal generation: When the continuous weight value exceeds the dynamically calculated activation threshold, the pulse signal is triggered. The activation threshold is adaptively adjusted according to the input distribution characteristics;

[0119] Synaptic weight iteration: Based on the temporal order of pre- and post-synaptic neuron spikes, the connection weight is strengthened or weakened within a preset time window.

[0120] The weight update follows the pulse timing-dependent plasticity rule, satisfying the adjustment direction that positive time difference strengthens the connection and negative time difference weakens the connection.

[0121] The Neural Compression Module further performs:

[0122] Pulse frequency encoding: Mapping the policy network weight values to pulse emission frequencies, where high-frequency pulses correspond to high absolute values of weights;

[0123] Weight update quantification: The change in connection weight is calculated using the following formula:

[0124]

[0125] Where η is the learning rate parameter and λ is the weight decay coefficient, and their value ranges are 0<η≤0.1 and 0.01≤λ≤0.1 respectively.

[0126] Edge deployment modules include:

[0127] The neuromorphic encoder converts the continuous parameters output by the strategy generation module into a pulse timing-dependent encoding format. The conversion is achieved through a dynamic integration-discharge mechanism, satisfying the neuron membrane potential integration formula:

[0128]

[0129] where w k is the synaptic weight, N spike Counts the number of pulses in the time window.

[0130] In this embodiment, the data acquisition module is used to acquire multimodal behavioral data of users in real time and construct a three-dimensional dynamic tensor containing temporal, spatial, and behavioral characteristics. Alternatively, multimodal data may include, but is not limited to, physiological indicator signals, spatial movement trajectories, and behavioral motion characteristics. Specifically, the data acquisition module utilizes a sensor array integrated into wearable devices and mobile terminals to achieve the simultaneous acquisition and fusion processing of multi-source heterogeneous data.

[0131] In one possible implementation, the collection of time dimension data is achieved through a high-precision clock chip to ensure the timing alignment of the sensor data. For example, the timestamp recording accuracy is not less than milliseconds, and the linear interpolation method is used in the data preprocessing stage to compensate for the sampling frequency differences of different sensors. It should be noted that the interpolation process meets the following constraints: for any two adjacent sampling points t n With t n+1 , the calculation formula for the missing value x(t) is:

[0132]

[0133] where t n ≤t≤t n+1 . It can be understood that this processing method can effectively avoid the distortion of the tensor structure caused by multi-device data synchronization errors. As a preferred solution, the spatial dimension data includes geographic location coordinates and environmental parameters. Specifically, the geographic location coordinates are obtained through the GNSS module and converted into a standardized grid code. Exemplarily, the longitude and latitude coordinates (lat, lon) are mapped to discrete grid indices (i, j), and the conversion formula is:

[0134]

[0135] Where Δ is the grid resolution, preferably set to 0.01 degrees to balance positioning accuracy and computational complexity. It should be noted that environmental parameters include but are not limited to light intensity and noise decibel value, which are collected at a fixed frequency by the environmental sensor of the mobile terminal.

[0136] In one possible implementation, behavioral feature dimension data is obtained by extracting features from raw signals collected by an inertial measurement unit (IMU). Specifically, the following processing is performed on the three-axis signals of the accelerometer and gyroscope:

[0137] Perform sliding window normalization on the original signal, and the window length is preferably 50 sampling points;

[0138] Calculate the statistical characteristics of the signal within the window, including mean, variance, peak value and zero-crossing rate;

[0139] The dimensionality is reduced to a preset dimension (such as 8 dimensions) through principal component analysis (PCA).

[0140] Exemplarily, the calculation formula of the zero rate ZCR is:

[0141]

[0142] Where I(-) is the indicator function and N is the number of sampling points in the window.

[0143] It is understandable that the data acquisition module also needs to detect and repair abnormal data in real time. As an option, the three sigma principle based on dynamic thresholds can be adopted:

[0144] For each data stream (x t ), calculate the sliding window mean μ and standard deviation σ t , if |x t -μ t |>3σ t , then the data point is marked as an outlier and replaced by linear interpolation of adjacent data.

[0145] It should be noted that the construction of the three-dimensional tensor must meet the requirements of spatiotemporal alignment. Specifically, during the data fusion stage, the time dimension is divided into segments of fixed length (such as 1 second), and each segment contains:

[0146] Time sequence {t1,t2,...,t T}, where T is determined by the highest sampling frequency;

[0147] Spatial grid encoding matrix Record the grid index at each time point;

[0148] Behavioral Characteristics Matrix D is the feature dimension after dimensionality reduction.

[0149] For example, tensor The construction of is completed by the following steps: the spatiotemporal behavior data of each time segment are grouped by grid index and the missing grids are filled with zeros.

[0150] As a preferred solution, the data acquisition module supports dynamic adjustment of the sampling frequency. Specifically, when a sudden change in user behavior pattern is detected (such as from static to active), the sampling rate is increased using the following formula:

[0151] f new =min(f max ,α·f base +β·||a||2);

[0152] where f max is the maximum sampling rate supported by the device, a is the acceleration vector, and β is the adjustment coefficient. It should be noted that this mechanism can optimize device energy consumption while ensuring data integrity.

[0153] In this embodiment, the tensor processing module is used to reduce the dimensionality of multimodal data and extract core features. Alternatively, the module implements data compression and feature extraction through a tensor decomposition method with dynamically adjusted rank parameters. This process involves data preprocessing, executing the decomposition algorithm, and iterating optimized parameters. It is understood that the module's functionality relies on modeling and constraining the inherent structure of multidimensional data.

[0154] In one possible implementation, the tensor decomposition method uses the Tucker decomposition model. Specifically, given an input tensor Its decomposition form is:

[0155] X≈G×1 ×1 U (1) ×2 ×1 U (2) ×3 ×1 U (3) ;

[0156] in, is the core tensor, is the factor matrix of each dimension, R n ≤I n It should be noted that the dimension product R1R2R3 of the core tensor must meet the preset compression rate constraint.

[0157] As a preferred solution, the rank parameter is dynamically adjusted according to the data characteristics. Exemplarily, the method for determining the time dimension rank R1 includes the following steps:

[0158] Calculate the Shannon entropy value of the time series H = -∑p(x)logp(x), where the probability distribution p(x) is obtained through histogram statistics;

[0159] If the entropy value exceeds the preset threshold, the rank parameter is increased to retain more temporal variation features;

[0160] Otherwise, the rank parameter is reduced to improve compression efficiency.

[0161] It can be understood that this dynamic adjustment mechanism can adapt to data complexity and avoid overfitting or information loss problems caused by fixed rank parameters.

[0162] Specifically, the decomposition process introduces a nuclear norm regularization constraint to control the model complexity. In the optimization objective function, a rank constraint on the factor matrix is added:

[0163]

[0164] Here, ||.||* represents the matrix nuclear norm, and the regularization coefficient λ is used to balance the reconstruction error and model complexity. It should be noted that the nuclear norm, as a convex relaxation of the rank function, can effectively guide the factor matrix to a low rank.

[0165] In one possible implementation, the optimization problem is solved iteratively using the alternating direction method of multipliers (ADMM). The specific process includes:

[0166] Core tensor update: fix the factor matrix and solve G by least squares method;

[0167] Factor matrix update: fix other parameters and update U dimension by dimension (n) , combined with the nuclear norm approximation end operator;

[0168] Lagrange multiplier correction: adjust the integer zero vector according to the degree of constraint violation.

[0169] Exemplarily, in the factor matrix update step, the proximal operator performs a singular value threshold shrinkage operation on the matrix:

[0170] U (n) ←S r (Σ)=U·diag(max(σ i -τ,0))·V T ;

[0171] Where Σ is the singular value matrix and τ is the shrinkage threshold. It can be understood that this operation can significantly reduce the matrix rank.

[0172] It should be noted that the iterative process must meet the convergence condition. Preferably, the calculation is terminated when the relative change of the objective function value between two adjacent iterations is 10-5 or when the maximum number of iterations (such as 200) is reached. As an option, the convergence judgment formula is:

[0173]

[0174] where f (k) is the objective function value of the kth iteration, and ∈ is the preset tolerance parameter.

[0175] In one possible implementation, the module supports real-time verification and adjustment of decomposition results. Specifically, the following verification is performed after each iteration:

[0176] Calculate the core tensor volume ratio

[0177] If ρ exceeds a preset threshold (e.g., 30%), the rank parameters of each dimension are reduced proportionally;

[0178] Reinitialize the factor matrix and continue the optimization.

[0179] It can be understood that this mechanism can ensure that the decomposition process always meets the compression rate constraint and avoids resource consumption exceeding the device processing capacity.

[0180] In this embodiment, the quantum privacy module is used to quantize and protect the privacy of the characteristic gradients after tensor decomposition. Alternatively, the module implements concealed transmission of gradient information through quantum state mapping, entanglement operations, and measurement basis selection. It is understood that the design goal of this module is to maintain the accuracy of parameter aggregation during federated learning while ensuring data privacy.

[0181] In one possible implementation, the quantum encoding unit performs the conversion of the gradient vector to the quantum state. Specifically, the input gradient matrix First, normalize it:

[0182]

[0183] Where ∈ is a very small positive number (preferably 10 -6 ), which is used to avoid division by zero errors. It should be noted that the normalization operation constrains the gradient value to the interval [-1, 1] to ensure that it can be used as a legal probability amplitude for the quantum state amplitude.

[0184] For example, quantum state mapping is implemented by a three-qubit system. Constructing quantum states:

[0185]

[0186] Where n = 3, the amplitude value α i One-to-one correspondence with the gradient tensor elements satisfies:

[0187]

[0188] Here, i1, i2, and i3 are the binary expansions of the three-dimensional index. It can be understood that this mapping method encodes the three-dimensional gradient information into the amplitude distribution of the quantum state, achieving a compact representation of high-dimensional data.

[0189] In this embodiment, the federated aggregation module is used to perform collaborative optimization and privacy-preserving aggregation of model parameters across distributed nodes. Alternatively, the module achieves robust updates of the global model by constructing a dual-objective optimization model with gradient direction consistency constraints and differential privacy noise. The design of this module must strike a balance between multi-client parameter alignment and user data privacy.

[0190] In one possible implementation, the dual-objective optimization unit constructs the following joint optimization objective function:

[0191]

[0192] in, The local gradient of the cth client, is the global gradient, and Σ is the noise covariance matrix. It should be noted that the first term constrains the consistency of the gradient direction of each client with the global gradient, and the second term satisfies the differential privacy requirement by injecting noise. For example, the inverse matrix of the noise covariance matrix Σ -1 Participate in quadratic constraint calculations to ensure dynamic adaptation of noise intensity to privacy budget.

[0193] In general, the dynamic noise regulator updates the diagonal elements of the covariance matrix in real time according to the preset privacy budget ∈. Preferably, the noise standard deviation σ i The calculation formula is:

[0194]

[0195] Where Δf is the gradient sensitivity (preferably calculated using L2 sensitivity), and T is the total number of training rounds. It can be understood that this formula mathematically binds the privacy budget to the noise intensity, making the privacy protection level quantifiable and controllable. In one possible implementation, the sensitivity Δf is calculated as:

[0196]

[0197] That is, in each round of training, the maximum difference in gradients between clients is selected as the sensitivity benchmark.

[0198] As a preferred solution, the quantum state projection decoder performs a computational basis measurement on the aggregated quantum state. Specifically, the decoding process includes the following steps:

[0199] Perform projection measurement on the quantum state |ψ′> in a selected computational basis to obtain a classical bit string;

[0200] Map the bit string back to the real space and reconstruct the noisy gradient vector;

[0201] Suppress measurement noise through sliding average filtering to obtain a stable global gradient estimate

[0202] Exemplarily, the filtering operation uses exponential decay weighting:

[0203]

[0204] The smoothing coefficient α is preferably set to the range of 0.8-0.95. It should be noted that this process can effectively alleviate the random fluctuations caused by quantum measurement.

[0205] In this embodiment, the correction compensation module is used to detect and correct cross-layer gradient deviations between the tensor decomposition layer and the federated aggregation layer. Optionally, the module maintains consistent feature representations through gradient alignment assessment, residual signal generation, and dynamic strength adjustment mechanisms. This module is designed to address cross-layer feature mismatches caused by distributed training and privacy-preserving operations.

[0206] In one possible implementation, the gradient alignment detection unit calculates the directional difference between the two levels of gradients by using the Frobenius inner product. Specifically,

[0207] In one possible implementation, the gradient alignment detection unit calculates the directional difference between the two-level gradients by Frobenius inner product. Specifically, let the gradient of the tensor decomposition layer be The federation aggregation layer gradient is First, Flattened to a vector Then calculate the normalized difference index:

[0208]

[0209] It should be noted that the inner product calculation requires the alignment of the vector dimensions. For example, when R1R2R3≠d, the dimensions are aligned by zero padding or truncation, preferably retaining the first min(R1R2R3,d).

[0210] In this embodiment, the strategy generation module is used to generate personalized psychological intervention strategies based on reinforcement learning. Optionally, the module achieves a balance between strategy exploration and utilization through the design of a composite reward function, a proximal policy optimization algorithm, and a dynamic entropy constraint mechanism. It is understood that the design goal of this module is to output a sequence of psychological intervention actions that aligns with individual behavioral characteristics while protecting user privacy.

[0211] In one possible implementation, the compound reward building block simultaneously calculates multiple metrics to guide policy optimization. Specifically, the reward function consists of the following three core components:

[0212] Strategy update difference reward: The difference in probability distribution between the new and old strategies is quantified by KL divergence. The calculation formula is:

[0213] It should be noted that this indicator is used to constrain the strategy update range and prevent the training process from becoming unstable due to sudden changes in the strategy.

[0214] State continuity reward: Calculate the cosine similarity of the state vectors at adjacent moments. The formula is:

[0215]

[0216] where φ(·) is the feature vector output by the state encoder. It can be understood that this reward term encourages the policy to generate intervention actions with temporal coherence.

[0217] Policy entropy reward: The exploration ability of the policy is quantified by Shannon entropy. The calculation formula is:

[0218]

[0219] The coefficient α is dynamically adjusted according to the training stage. For example, a higher entropy weight is set in the initial stage to promote exploration, and gradually decays to a lower limit as the training progresses.

[0220] As a preferred solution, the proximal policy optimization unit adopts an update rule with gradient clipping. Specifically, the policy update objective function is defined as:

[0221]

[0222] The importance sampling ratio A t is the advantage function estimate, and β is the clipping threshold (preferably set to 0.2). It should be noted that this mechanism effectively avoids training divergence caused by excessive policy deviation by limiting the policy update rate.

[0223] In this embodiment, the neural compression module is used to convert continuous policy parameters into a spiking neuromorphic encoding format. Optionally, the module implements bioinspired compression of deep learning models into spiking neural networks through dynamic threshold spike triggering, synaptic weight iteration rules, and a frequency encoding mechanism. It is understood that the design goal of this module is to significantly reduce computational resource consumption while preserving the model's inference capabilities.

[0224] In a possible implementation, the pulse trigger signal generating unit controls the pulse emission based on a dynamic activation threshold. Specifically, for a continuous weight value w∈[-1,1], the activation threshold V th The calculation formula is:

[0225]

[0226] Where μ is the baseline threshold (preferably set to 0.2), σ is the adjustment coefficient (preferably set to 0.1), and N is the number of neurons in the current layer. It should be noted that this dynamic adjustment mechanism can adaptively control the pulse emission frequency based on the sparsity of the weight distribution, avoiding the problem of over-activation or inhibition caused by a fixed threshold.

[0227] For example, when the membrane potential integral value V(t) exceeds V th When , a pulse signal is triggered and the membrane potential is reset to the resting state. The membrane potential integral formula is:

[0228]

[0229] where δ(·) is the Dirac function, N spike is the number of pulses triggered in the time window. It can be understood that the integrate-discharge model simulates the cumulative discharge characteristics of biological neurons.

[0230] As a preferred solution, the synaptic weight iteration unit follows the spike timing dependent plasticity (STDP) rule. Specifically, the connection weight change Δw ij The calculation formula is:

[0231]

[0232] Where Δt = t post -t pre is the time difference between the pre-synaptic and post-synaptic spike triggering, τ + With τ - are the time constants of long-term potentiation and depression, respectively (preferably 20ms and 40ms), H(·) is a step function, and the learning rate η is preferably set to 0.05. It should be noted that this rule adjusts synaptic strength through time correlation to achieve a biologically plausible learning mechanism.

[0233] In this embodiment, the edge deployment module is used to perform real-time decision-making and reasoning on the terminal device, dynamically adapting to computing resource constraints. Alternatively, the module implements a sliding window fusion mechanism, a dynamic precision switching strategy, and a resource-aware scheduling algorithm to achieve efficient and low-cost localized decision-making. It is understood that the design of this module must strike a balance between real-time response speed and limited hardware resources.

[0234] In a possible implementation, the sliding window fusion unit performs temporal smoothing on the continuous reasoning results. Specifically, the decision output sequence {a t-T+1 ,…,a t}, using exponential decay weighted fusion algorithm:

[0235]

[0236] The attenuation coefficient γ is preferably set to 0.95, and the time window length T is dynamically adjusted according to the device processing capability. It should be noted that this mechanism effectively suppresses instantaneous noise interference in the output of the spiking neural network by weighted integration of historical decisions.

[0237] For example, the dynamic precision switching strategy adjusts the computing mode based on the remaining memory and CPU utilization of the device. Specifically, when the memory is detected to be below the threshold, the following processing flow is activated:

[0238] Convert the floating-point pulse count to 8-bit fixed-point representation;

[0239] The membrane potential integrator is truncated to retain only the high-significant bits;

[0240] Shut down the spike monitoring thread of non-critical neural layers.

[0241] It is understandable that this strategy sacrifices some computing accuracy in exchange for a significant reduction in memory usage, ensuring service continuity in resource-constrained scenarios.

[0242] As a preferred solution, the resource-aware scheduler uses a two-level priority queue to manage inference tasks. Specifically, the calculation formula for task priority P is:

[0243] P=α·Urgency+(1-α)·ResourceCost;

[0244] Urgency is determined by the decision type (e.g., psychological crisis intervention tasks are set to the highest level). Resource cost, ResourceCost, is quantified by estimating memory and computing cycles, with a weight coefficient α preferably set to 0.7. It should be noted that this scheduling mechanism prioritizes the real-time requirements of high-urgency tasks.

[0245] The dynamic mental health management method described below and the dynamic mental health management system described above can be referenced to each other.

[0246] Please see the attached Figure 2 , a method for dynamic management of mental health, comprising the following steps:

[0247] Step 1: Construct a three-dimensional data tensor of user spatiotemporal behavior in real time;

[0248] Step 2: Perform tensor decomposition with dynamic rank constraint to generate the core feature matrix;

[0249] Step 3: Perform quantum state encoding and entanglement protection on the decomposed characteristic gradient;

[0250] Step 4: Perform multi-node parameter collaborative aggregation under the federated learning framework;

[0251] Step 5: Dynamically correct the cross-layer deviation between decomposition features and aggregation parameters;

[0252] Step 6: Generate biologically inspired psychological intervention strategies based on reinforcement learning;

[0253] Step 7: compress the policy model into a spiking neuromorphic coding format;

[0254] Step 8: Deploy the compression model on the edge device and perform real-time decision reasoning.

[0255] The device of this embodiment can be used to execute the above method embodiment, and its principles and technical effects are similar, so they will not be repeated here.

[0256] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A dynamic management system for mental health, characterized in that: include: Data collection module, used to obtain users' time, space and behavior multimodal data in real time; A tensor processing module, connected to the data acquisition module, configured to construct the multimodal data into a three-dimensional tensor and perform dimensionality reduction decomposition; A quantum privacy module, connected to the tensor processing module, for performing quantization encoding and privacy protection processing on the decomposed feature gradients; A federated aggregation module, connected to the quantum privacy module, for performing collaborative optimization of model parameters among distributed nodes; a correction and compensation module, bidirectionally connected to the tensor processing module and the federated aggregation module, for detecting and correcting cross-layer data deviations; A strategy generation module, connected to the federation aggregation module, generates personalized psychological intervention strategies based on reinforcement learning; a neural compression module, connected to the strategy generation module, converting continuous strategy parameters into a spiking neural morphological model; The edge deployment module is connected to the neural compression module to realize real-time decision reasoning on the terminal device.

2. A dynamic mental health management system according to claim 1, characterized in that: The tensor processing module specifically includes: Based on the Tucker decomposition method, the original tensor is decomposed into the product of the core tensor and multiple factor matrices; A rank constraint term is introduced during the decomposition process to control the complexity of the model. The rank constraint term acts on the rank value of the factor matrix of each dimension; Dynamically adjust the rank parameters of each dimension according to the spatiotemporal distribution characteristics of data features; Iteratively optimize the core tensor and factor matrix parameters through the alternating direction multiplication method; The core tensor dimension is smaller than the original tensor, and the rank parameters of each dimension are set independently.

3. A dynamic mental health management system according to claim 1, characterized in that: The quantum privacy module includes: The quantum coding unit maps the numerical gradient vector into the probability amplitude distribution of the quantum state; Quantum entanglement unit, which generates inseparable states through controlled phase operations between multiple quantum bits; The quantum decoding unit realizes the reverse conversion from the aggregate state to the original parameter space through a specific measurement basis.

4. A dynamic mental health management system according to claim 1, characterized in that: The federation aggregation module specifically includes: The dual-objective optimization unit constructs a joint optimization objective that includes the gradient direction consistency constraint and the privacy noise constraint, where: The first optimization goal is to minimize the difference between the gradient direction of each client's local model and the global gradient direction; A dynamic noise regulator that updates the diagonal elements of the covariance matrix Σ in real time according to the preset privacy budget ε; The quantum state projection decoder performs computational basis measurements on the aggregated quantum state and maps the quantum state amplitude distribution back to the gradient space; Distributed parameter synchronizer, which distributes the decoded global gradient to each client to complete the model update; The inverse matrix of the noise covariance matrix Σ is involved in the quadratic constraint calculation of the optimization objective.

5. A dynamic mental health management system according to claim 1, characterized in that: The correction and compensation module specifically includes: Gradient alignment detection unit, which calculates the difference in gradient direction between the tensor decomposition layer and the federated aggregation layer. The difference is represented by the ratio of the Frobenius inner product of the gradient vectors of the two layers to the product of their norms. a threshold judgment unit, activating a correction channel when the difference is lower than a preset threshold range; The residual correction execution unit concatenates the tensor decomposition gradient and the federated aggregate gradient and inputs them into the learnable parameter matrix, generating a compensation signal through a modified linear activation function; Dynamic correction controller, which adjusts the injection intensity of the compensation signal according to the real-time gradient difference; The compensation signal is residually superimposed on the original core tensor to form a corrected feature tensor.

6. A dynamic mental health management system according to claim 1, characterized in that: The strategy generation module specifically includes: Compound reward building blocks, synchronously calculating the following indicators: The difference in probability distribution before and after the policy update is quantified by KL divergence; The temporal continuity of the user's mental state is measured by the cosine similarity of adjacent state vectors; The exploration incentive intensity of strategic actions is dynamically adjusted through the strategic entropy value; The proximal policy optimization unit uses an update rule with gradient clipping to constrain the maximum amplitude of policy updates; Advantage function estimator, which calculates the time series difference error based on the generalized advantage estimation method; Policy entropy constraint controller, dynamically adjusts the weight coefficient of the entropy regularization term; The gradient clipping operation limits the policy update rate to a preset range to prevent the training process from diverging.

7. A dynamic mental health management system according to claim 1, characterized in that: The neural compression module performs: Pulse trigger signal generation: triggers a pulse signal when the continuous weight value exceeds the dynamically calculated activation threshold, and the activation threshold is adaptively adjusted according to the input distribution characteristics; Synaptic weight iteration: Based on the temporal order of pre- and post-synaptic neuron spikes, the connection weight is strengthened or weakened within a preset time window. The weight update follows the pulse timing-dependent plasticity rule, satisfying the adjustment direction that positive time difference strengthens the connection and negative time difference weakens the connection.

8. A dynamic mental health management system according to claim 1, characterized in that: The neural compression module further performs: Pulse frequency encoding: Mapping the policy network weight values to pulse emission frequencies, where high-frequency pulses correspond to high absolute values of weights; Weight update quantification: The change in connection weight is calculated using the following formula: Where η is the learning rate parameter and λ is the weight decay coefficient, and their value ranges are 0<η≤0.1 and 0.01≤λ≤0.1 respectively.

9. A dynamic mental health management system according to claim 1, characterized in that: The edge deployment module includes: The neuromorphic encoder converts the continuous parameters output by the strategy generation module into a pulse timing-dependent encoding format. The conversion is achieved through a dynamic integration-discharge mechanism that satisfies the neuron membrane potential integration formula: where w k is the synaptic weight, N spike Counts the number of pulses in the time window.

10. A method for dynamic management of mental health, according to a dynamic management system of mental health according to any one of claims 1 to 9, characterized in that: The following steps are involved: Step 1: Construct a three-dimensional data tensor of user spatiotemporal behavior in real time; Step 2: Perform tensor decomposition with dynamic rank constraint to generate the core feature matrix; Step 3: Perform quantum state encoding and entanglement protection on the decomposed characteristic gradient; Step 4: Perform multi-node parameter collaborative aggregation under the federated learning framework; Step 5: Dynamically correct the cross-layer deviation between decomposition features and aggregation parameters; Step 6: Generate biologically inspired psychological intervention strategies based on reinforcement learning; Step 7: compress the policy model into a spiking neuromorphic coding format; Step 8: Deploy the compression model on the edge device and perform real-time decision reasoning.

Citation Information

Cited By

  • Landslide risk monitoring method and system for seated area

    CN120726766A