Endocrine metabolism index real-time processing method based on edge calculation

By constructing a lightweight state-space model and using sparse matrix operation optimization strategies, the real-time performance and efficiency issues of endocrine and metabolic index processing in edge computing environments were resolved, achieving low-latency and high-precision filtering processing to meet the needs of medical-grade real-time early warning.

CN121662413APending Publication Date: 2026-03-13NANJING FIRST HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve efficient, real-time processing of endocrine and metabolic indicators in edge computing environments, especially in scenarios involving multivariate coupling or high-frequency sampling. Traditional Kalman filtering algorithms suffer from high computational complexity and cannot meet the real-time early warning requirements of medical applications.

Method used

A lightweight state-space model is constructed, and an adaptive noise covariance estimation mechanism and a sparse matrix operation optimization strategy are combined. A sparse matrix inversion algorithm is used to dynamically update the observation noise covariance matrix, thereby reducing computational complexity and improving processing efficiency.

Benefits of technology

Low-latency, high-precision filtering of endocrine and metabolic indicators was implemented on resource-constrained embedded devices, meeting the requirements of medical-grade real-time early warning, reducing power consumption and improving system response speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121662413A_ABST
    Figure CN121662413A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses an endocrine metabolism index real-time processing method based on edge calculation. The method comprises the following steps: acquiring time sequence data of blood glucose, insulin, cortisol and thyroid stimulating hormone collected by wearable equipment; constructing a lightweight linear state space model of the diagonal dominant sparse state transition matrix; initializing a noise covariance matrix; iterative Kalman filtering based on a sparse matrix inversion algorithm is executed; the observation noise covariance is dynamically adjusted according to the residual error; and when the filtering result exceeds a clinical critical value, triggering local early warning and uploading to the cloud. According to the scheme, the single filtering delay is controlled within 80 milliseconds while the numerical stability is guaranteed, and the early warning timeliness and the system energy efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to a real-time processing method for endocrine metabolic indicators based on edge computing. Background Technology

[0002] With the rapid development of smart healthcare and wearable health monitoring technologies, real-time dynamic analysis of endocrine and metabolic indicators (such as blood glucose, insulin, and cortisol) has become a crucial aspect of chronic disease management and critical early warning. These indicators are highly nonlinear, time-varying, and easily affected by individual physiological states and environmental interference; their accurate processing relies on efficient signal filtering and state estimation algorithms. In remote monitoring and edge intelligence scenarios, data needs to be processed with low latency on resource-constrained devices close to the sensing end to support immediate clinical decision-making or automated intervention.

[0003] Real-time processing methods for endocrine and metabolic indicators based on edge computing focus on achieving online filtering, noise suppression, and trend prediction of physiological signals at the terminal side. The core objective of this approach is to reduce the algorithm's requirements for computing resources, memory bandwidth, and energy consumption while ensuring estimation accuracy, thereby adapting to the demanding operating environments of embedded medical devices or wearable terminals.

[0004] Existing technologies generally employ traditional Kalman filtering and its derivative algorithms for state estimation of endocrine metabolic indicators. However, these methods suffer from high matrix operation complexity and fixed iteration processes, making them unsuitable for the limited computing power and real-time requirements of edge devices. Especially in scenarios involving multivariate coupling or high-frequency sampling, redundant state covariance updates and gain calculations increase processing latency, failing to meet the medical-grade second-level or even sub-second-level early warning response requirements.

[0005] Fixed parameter configurations cannot adaptively adjust the computational granularity based on the dynamic characteristics of signals, further exacerbating resource waste and response lag. Therefore, there is an urgent need for a lightweight, adaptive filtering mechanism for edge computing architectures that can achieve efficient real-time processing of endocrine metabolic indicators while ensuring clinical accuracy. Summary of the Invention

[0006] This invention provides a real-time processing method for endocrine and metabolic indicators based on edge computing. By constructing a lightweight state observation model and combining an adaptive noise covariance estimation mechanism with a sparse matrix operation optimization strategy, it achieves low-latency and high-precision filtering processing of endocrine and metabolic indicator data streams on resource-constrained edge devices, thereby meeting the stringent requirements of medical-grade real-time early warning for both response timeliness and numerical stability.

[0007] This invention provides a real-time processing method for endocrine and metabolic indicators based on edge computing, comprising:

[0008] Acquire raw endocrine and metabolic index time-series data continuously collected by wearable physiological sensing devices, wherein the raw endocrine and metabolic index time-series data includes at least blood glucose concentration, insulin level, cortisol concentration, and thyroid-stimulating hormone level;

[0009] A lightweight linear state-space model is constructed. The state transition matrix of the lightweight linear state-space model is a diagonally dominated sparse matrix, and its non-zero elements only retain the coefficient terms corresponding to metabolic pathways with strong physiological coupling between adjacent time steps.

[0010] Initialize the system process noise covariance matrix and the observation noise covariance matrix. The initial value of the system process noise covariance matrix is ​​set based on the standard deviation of physiological fluctuations of endocrine metabolic indicators under resting conditions, and the initial value of the observation noise covariance matrix is ​​set based on the sensor measurement error variance measured by the wearable physiological sensing device during the factory calibration stage.

[0011] Perform an iterative filtering process, the iterative filtering process including:

[0012] Based on the prior state estimate at the current moment and the lightweight linear state-space model, calculate the predicted state vector at the current moment;

[0013] Using the predicted state vector and the actual observed value at the current time, the Kalman gain matrix is ​​calculated. The Kalman gain matrix is ​​solved by using a sparse matrix inversion algorithm, which only operates on the sub-blocks composed of non-zero elements in the covariance matrix.

[0014] The posterior state estimate is updated based on the Kalman gain matrix, and the posterior state estimate is output as the filtered result of the endocrine metabolism index at the current time.

[0015] In each iteration, the observation noise covariance matrix is ​​dynamically updated according to the following rule:

[0016] If the absolute value of the residuals at three consecutive time steps is greater than the preset physiological abnormality threshold, then the diagonal elements of the observation noise covariance matrix will be multiplied by a decay factor of one.

[0017] If the absolute value of the residuals at five consecutive time steps is less than the preset physiological steady-state threshold, then the diagonal elements of the observation noise covariance matrix are multiplied by a growth factor of 2; the value of the attenuation factor of 1 is 0.7, and the value of the growth factor of 2 is 1.3.

[0018] When the filtered result of any endocrine and metabolic indicator exceeds the preset clinical critical value range, a local real-time warning signal is immediately triggered, and the warning event, along with the corresponding timestamp, indicator type, and value, are packaged and uploaded to the cloud-based medical monitoring platform via a low-power wide area network.

[0019] This invention also provides a real-time processing system for endocrine and metabolic indicators based on edge computing, which is deployed in an embedded edge device equipped with a microcontroller unit, a memory capacity of less than 8 megabytes, and a main frequency of less than 500 MHz. The system includes:

[0020] The raw data acquisition unit is used to acquire raw endocrine and metabolic index time-series data continuously collected by the wearable physiological sensing device. The raw endocrine and metabolic index time-series data includes at least blood glucose concentration, insulin level, cortisol concentration and thyroid-stimulating hormone level.

[0021] The lightweight model building unit is used to build a lightweight linear state-space model. The state transition matrix of the lightweight linear state-space model is a diagonally dominated sparse matrix, and its non-zero elements only retain the coefficient terms corresponding to metabolic pathways with strong physiological coupling between adjacent time steps.

[0022] The covariance initialization unit is used to initialize the system process noise covariance matrix and the observation noise covariance matrix. The initial value of the system process noise covariance matrix is ​​set based on the standard deviation of the physiological fluctuation of endocrine metabolic indicators in the resting state, and the initial value of the observation noise covariance matrix is ​​set based on the sensor measurement error variance measured by the wearable physiological sensing device during the factory calibration stage.

[0023] An iterative filtering unit is configured to perform iterative filtering processing steps, the iterative filtering processing steps including:

[0024] Based on the prior state estimate at the current moment and the lightweight linear state-space model, the predicted state vector at the current moment is calculated; using the predicted state vector and the actual observation at the current moment, the Kalman gain matrix is ​​calculated, wherein the Kalman gain matrix is ​​solved by a sparse matrix inversion algorithm, which only operates on the sub-blocks composed of non-zero elements in the covariance matrix.

[0025] The posterior state estimate is updated based on the Kalman gain matrix, and the posterior state estimate is output as the filtered result of the endocrine metabolism index at the current time.

[0026] The covariance adaptive update unit is used to dynamically update the observation noise covariance matrix in each iteration, and its update rule is as follows:

[0027] If the absolute value of the residuals at three consecutive time steps is greater than the preset physiological abnormality threshold, then the diagonal elements of the observation noise covariance matrix will be multiplied by a decay factor of one.

[0028] If the absolute value of the residuals at five consecutive time steps is less than the preset physiological steady-state threshold, then the diagonal elements of the observation noise covariance matrix are multiplied by a growth factor of two.

[0029] The value of the first attenuation factor is 0.7, and the value of the second growth factor is 1.3;

[0030] The real-time early warning triggering unit is used to immediately trigger a local real-time early warning signal when the filtered result of any endocrine and metabolic indicator exceeds the preset clinical critical value range. The early warning event, along with the corresponding timestamp, indicator type, and value, is packaged and uploaded to the cloud-based medical monitoring platform via a low-power wide area network.

[0031] As one embodiment of the present invention, the process of constructing the state transition matrix of the lightweight linear state-space model specifically includes: identifying the feedback regulation pathway between blood glucose, insulin, cortisol and thyroid-stimulating hormone based on the endocrine physiology knowledge graph;

[0032] Only the matrix elements corresponding to direct regulatory relationships are retained, and the rest are set to zero; the retained non-zero elements are assigned the average regulatory strength coefficient in the healthy population, which is determined by Granger causality analysis in a large-scale clinical cohort study.

[0033] In one embodiment of the present invention, the sparse matrix inversion algorithm employs an improved conjugate gradient method, and its iteration termination condition is that the residual norm is less than 10. -4 The maximum number of iterations is limited to five; in each conjugate gradient iteration, the matrix-vector multiplication operation only traverses the non-zero element indices and their values ​​stored in the compressed sparse row format of the covariance matrix.

[0034] In one embodiment of the present invention, the preset physiological abnormality threshold is 20% of the upper limit of the normal reference range of the corresponding endocrine and metabolic indicators; the preset physiological homeostasis threshold is 5% of the upper limit of the normal reference range of the corresponding endocrine and metabolic indicators; and the clinical critical value range is set according to the latest version of the clinical laboratory critical value standard published by the Endocrinology Branch of the Chinese Medical Association.

[0035] As one embodiment of the present invention, the wearable physiological sensing device includes a subcutaneous implantable glucose sensor, a sweat insulin immunochromatographic chip, a salivary cortisol electrochemical detection module, and a fingertip blood micro-quantity thyroid-stimulating hormone fluorescent immunosensor.

[0036] The sampling frequency of each sensor is uniformly set to once per minute, and a timestamp alignment mechanism is used to ensure synchronization of multi-source data.

[0037] As one embodiment of the present invention, the microcontroller unit of the edge device adopts a reduced instruction set architecture, and its floating-point arithmetic unit supports single-precision floating-point arithmetic.

[0038] The memory allocation strategy adopts static memory pool management, which pre-allocates fixed address space for state vectors, covariance matrices and intermediate calculation variables to avoid uncertain delays introduced by dynamic memory allocation.

[0039] As one embodiment of the present invention, the low-power wide area network adopts a narrowband Internet of Things communication protocol, and the early warning event data packet adopts a binary encoding format, which includes a 16-bit timestamp, an 8-bit indicator type identifier and a 32-bit floating-point value, with a total packet length of less than 64 bytes.

[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0041] 1. This invention constructs a lightweight state-space model driven by physiological mechanisms, replacing the dense state transition matrix in traditional Kalman filtering with a diagonally dominated sparse matrix, thereby reducing the dimensionality and complexity of matrix operations. Combined with a dedicated inversion algorithm for sparse matrices, the computational load of a single filtering iteration is reduced. On embedded edge devices with memory capacity less than 8 megabytes and clock frequency less than 500 MHz, the single filtering processing latency is controlled within 80 milliseconds, meeting the hard requirement of less than 100 milliseconds for medical-grade real-time early warning.

[0042] 2. An adaptive update mechanism for observation noise covariance based on residual statistical characteristics is introduced, enabling the filter to dynamically distinguish between sensor noise and actual physiological abnormalities, avoiding filter divergence or response lag caused by covariance mismatch in pathological conditions. Experiments show that in a simulated diabetic ketoacidosis attack scenario, the warning trigger time of this invention is earlier than that of the traditional extended Kalman filter, and the false positive rate is reduced. Furthermore, through static memory allocation and narrowband IoT simplified data packet design, the overall system power consumption is reduced, extending the continuous working time of wearable devices and providing reliable technical support for long-term home monitoring of patients with chronic endocrine diseases. Attached Figure Description

[0043] Figure 1 This is a flowchart of the real-time processing method for endocrine and metabolic indicators based on edge computing proposed in this invention.

[0044] Figure 2 This is a block diagram of the real-time processing system for endocrine and metabolic indicators based on edge computing in this invention.

[0045] Figure 3 This is a schematic diagram of the sparse structure of the state transition matrix in this invention;

[0046] Figure 4 This is a flowchart of the Kalman filter iterative processing in this invention;

[0047] Figure 5 This is the real-time early warning triggering logic diagram in this invention;

[0048] Figure 6 This is a block diagram of hardware resource management in this invention. Detailed Implementation

[0049] Please refer to the attached document. Figures 1 to 6 This invention provides a real-time processing method for endocrine and metabolic indicators based on edge computing. This method is deployed in resource-constrained embedded edge devices to solve the processing delay problem caused by the high computational complexity of traditional Kalman filtering algorithms in wearable medical scenarios.

[0050] The edge device has a microcontroller unit, a memory capacity of less than 8 megabytes, and a main frequency of less than 500 MHz. Its operating environment places stringent requirements on real-time performance, power consumption, and numerical stability.

[0051] To meet the needs of real-time early warning in medical applications, this method constructs a lightweight linear state-space model driven by physiological mechanisms, and combines an adaptive noise covariance estimation mechanism with a sparse matrix operation optimization strategy to achieve low-latency and high-precision filtering of endocrine metabolic index data streams.

[0052] The method includes the following steps:

[0053] S1, acquire raw endocrine and metabolic index time-series data continuously collected by wearable physiological sensing devices;

[0054] S2, construct a lightweight linear state-space model;

[0055] S3, Initialize the system process noise covariance matrix and the observation noise covariance matrix;

[0056] S4, Perform the iterative filtering process;

[0057] S5, dynamically update the observation noise covariance matrix during each iteration;

[0058] S6: When the filtered result of any endocrine and metabolic indicator exceeds the preset clinical critical value range, a local real-time warning signal is immediately triggered, and the warning event is uploaded to the cloud medical monitoring platform through a low-power wide area network.

[0059] In step S1, raw endocrine metabolic index time-series data continuously collected by the wearable physiological sensing device are acquired. The raw endocrine metabolic index time-series data includes at least blood glucose concentration, insulin level, cortisol concentration, and thyroid-stimulating hormone level.

[0060] The wearable physiological sensing device includes a subcutaneously implanted glucose sensor, a sweat insulin immunochromatographic chip, a salivary cortisol electrochemical detection module, and a fingertip blood micro-quantity thyroid-stimulating hormone fluorescent immunosensor.

[0061] Each sensor collects data synchronously at a fixed sampling frequency of once per minute, and a hardware-level timestamp alignment mechanism ensures strict synchronization of multi-source physiological signals in the time dimension.

[0062] The timestamp alignment mechanism uses a unified real-time clock source to drive all sensor modules, eliminating sampling offsets caused by independent crystal oscillator drift.

[0063] The raw data is converted from analog to digital and stored in the input buffer of the edge device in single-precision floating-point format. The data frame of each time step contains the values ​​of four indicators and their corresponding 64-bit timestamps, forming a four-dimensional observation vector.

[0064] The observation vector serves as the input for subsequent filtering. Its integrity is guaranteed by a checksum mechanism. If the checksum fails, the frame is discarded and a communication error log is recorded.

[0065] In step S2, a lightweight linear state-space model is constructed.

[0066] The state transition matrix of the lightweight linear state-space model is a diagonally dominated sparse matrix, whose non-zero elements only retain the coefficients of metabolic pathways that have strong physiological coupling between adjacent time steps.

[0067] The specific construction process is as follows: First, based on the knowledge graph of endocrine physiology, the feedback regulatory pathways between blood glucose, insulin, cortisol and thyroid-stimulating hormone are identified.

[0068] The knowledge graph encompasses core regulatory networks such as the hypothalamus-pituitary-adrenal axis, the hypothalamus-pituitary-thyroid axis, and the pancreas-liver glucose metabolism axis, clarifying the direct regulatory relationships between various hormones. For example, insulin has a negative feedback inhibitory effect on blood glucose, cortisol has a downregulating effect on insulin sensitivity, and thyroid-stimulating hormone is subject to long-feedback inhibition by free thyroxine.

[0069] Secondly, only the matrix elements corresponding to the direct control relationships mentioned above are retained, and the remaining elements are set to zero.

[0070] In the resulting fourth-order state transition matrix, the diagonal elements represent the inertia maintenance coefficients of each index, while the off-diagonal non-zero elements represent the adjustment intensity across indices.

[0071] Next, the retained non-zero elements are assigned their average moderating strength coefficients in healthy individuals, which are determined by Granger causality analysis in large-scale clinical cohort studies.

[0072] Granger causality analysis is based on two years of longitudinal monitoring data to calculate the lead-lag relationship between time series of various indicators and quantify the response magnitude caused by unit changes.

[0073] The final state transition matrix for:

[0074] ;

[0075] This indicates the rate at which blood glucose levels decay. This represents the inhibition coefficient (negative value) of insulin on blood glucose. This indicates the rate of insulin metabolism itself. This indicates the coefficient by which cortisol promotes insulin secretion. and These represent the autoregulation coefficients of cortisol and thyroid-stimulating hormone, respectively.

[0076] The matrix has a strictly lower triangular or upper triangular structure, and the absolute value of the diagonal elements is greater than the sum of the absolute values ​​of the off-diagonal elements in the same row, satisfying the diagonal dominance condition and ensuring system stability. This sparse structure reduces the 16 parameters of the traditional dense fourth-order matrix to 7 non-zero parameters, reducing the computational load of subsequent matrix operations.

[0077] In step S3, the system process noise covariance matrix is ​​initialized. Covariance matrix of observation noise System process noise covariance matrix The initial values ​​are set based on the standard deviation of physiological fluctuations of endocrine and metabolic indicators at rest.

[0078] Specifically, the standard deviation of each indicator was calculated by statistically analyzing monitoring data from healthy subjects during 72 consecutive hours of sleep at night. , , , And Initialized as a diagonal matrix, its diagonal elements are respectively , , , Observation noise covariance matrix The initial value is set based on the sensor measurement error variance measured during the factory calibration phase of the wearable physiological sensing device.

[0079] The calibration process is carried out in a standard laboratory environment. The sensor readings are compared with the results of the gold standard detection method (such as high performance liquid chromatography and chemiluminescence immunoassay), and the mean square error is calculated as the initial noise variance of each sensor.

[0080] It is also initialized as a diagonal matrix, with its diagonal elements corresponding to the measurement error variances of the four sensors.

[0081] Initial covariance matrix Setting it to the identity matrix multiplied by a large constant (e.g., 100) indicates a high degree of uncertainty in the initial state estimation.

[0082] In step S4, an iterative filtering process is performed. This step is executed cyclically at each sampling time t, and specifically includes: based on the prior state estimate at the current time... Using the lightweight linear state-space model, calculate the predicted state vector at the current time step:

[0083] ;

[0084] Using the predicted state vector and the actual observation value at the current time Calculate the Kalman gain matrix ;

[0085] Update the posterior state estimate based on the Kalman gain matrix:

[0086] ;

[0087] The estimated posterior state value is then output as the filtered result of the endocrine and metabolic index at the current moment.

[0088] The key lies in the fact that the Kalman gain matrix is ​​solved using a sparse matrix inversion algorithm, which only operates on the sub-blocks composed of non-zero elements in the covariance matrix.

[0089] Specifically, the Kalman gain calculation formula is as follows:

[0090] ;

[0091] The observation matrix H is a fourth-order identity matrix because the observed values ​​directly correspond to the state variables. Prediction error covariance matrix:

[0092] ;

[0093] because It is a sparse matrix. Although not strictly sparse, its non-zero structure inherits the sparse pattern of A, forming a banded structure. In solving... When this is done, an improved conjugate gradient method is used.

[0094] The algorithm stores the covariance matrix in a compressed sparse row format, recording only the column indices and values ​​of non-zero elements. The initial solution for the conjugate gradient iteration is set as a zero vector, and the iteration terminates when the residual norm is less than 10. -4The maximum number of iterations is limited to 5 to prevent infinite loops under ill-conditioned conditions. In each conjugate gradient iteration, the matrix-vector multiplication operation only traverses the indices and values ​​of non-zero elements stored in the compressed sparse row format, avoiding redundant calculations on zero elements.

[0095] This optimization reduces the number of floating-point operations in a single inversion operation from O(n³) to O(kn), where To determine the average number of non-zero elements per row, for this fourth-order system, The value is approximately 2, reducing the computational load.

[0096] In step S5, the observation noise covariance matrix is ​​dynamically updated during each iteration. Its update rule is based on the statistical properties of the residual sequence. The residual is defined as:

[0097] ;

[0098] This is the difference between the observed and predicted values. The system maintains a sliding window of residual absolute values ​​with a length of five.

[0099] If the absolute value of the residuals at three consecutive time steps is greater than the preset physiological abnormality threshold, it is determined that there is a real physiological abnormality rather than sensor noise. At this time, the diagonal elements of the observation noise covariance matrix are multiplied by an attenuation factor of 1, which is set to 0.7, to reduce the filter's confidence in the current observation and prevent outliers from excessively skewing the state estimation.

[0100] If the absolute value of the residuals at five consecutive time steps is less than the preset physiological steady-state threshold, the system is determined to be in a stable state and the sensor is working normally. At this time, the diagonal elements of the observation noise covariance matrix are multiplied by a growth factor of 2, which is set to 1.3, to enhance the filter's dependence on the observation data and improve tracking accuracy.

[0101] The preset physiological abnormality threshold is 20% of the upper limit of the normal reference range of the corresponding endocrine and metabolic indicators. For example, the upper limit of normal blood glucose is 6.1 mmol / L, and its abnormal threshold is 7.32 mmol / L.

[0102] The preset physiological homeostasis threshold is 5% of the upper limit of the normal reference range for the corresponding endocrine and metabolic indicators, that is, the homeostasis threshold for blood glucose is 6.405 mmol / L.

[0103] This adaptive mechanism enables the filter to dynamically distinguish between sensor drift, environmental interference, and real pathological events, avoiding filter divergence caused by covariance mismatch during acute episodes such as diabetic ketoacidosis.

[0104] In step S6, when the filtered result of any endocrine metabolic indicator exceeds the preset clinical critical value range, a local real-time warning signal is immediately triggered.

[0105] The clinical critical value ranges are set according to the latest version of the clinical laboratory critical value standards published by the Chinese Society of Endocrinology, such as blood glucose less than 2.2 mmol / L or greater than 25 mmol / L, and cortisol greater than 1200 nanomoles / L. The warning trigger logic is executed immediately after the filtering result is output, without any additional delay.

[0106] Once triggered, the edge device's general-purpose input / output pins immediately drive the buzzer and vibration motor to issue a local alarm, while simultaneously uploading the warning event data packet to the cloud-based medical monitoring platform via a low-power wide-area network.

[0107] The low-power wide-area network employs a narrowband IoT communication protocol. Data packets use a binary encoding format, including a 16-bit timestamp (in seconds, calculated from Coordinated Universal Time), an 8-bit indicator type identifier (blood glucose 0x01, insulin 0x02, cortisol 0x03, thyroid-stimulating hormone 0x04), and a 32-bit single-precision floating-point value. The total packet length is less than 64 bytes. This streamlined design minimizes wireless transmission power consumption and air interface occupancy time.

[0108] The execution of the entire method depends on the hardware resource constraint management of the edge devices.

[0109] The microcontroller unit adopts a reduced instruction set architecture, and its floating-point unit supports single-precision floating-point operations, without enabling double precision to save power consumption.

[0110] The memory allocation strategy adopts static memory pool management, which pre-allocates fixed address space for the state vector (16 bytes), covariance matrix (64 bytes), Kalman gain (16 bytes), and intermediate calculation variables (such as residuals, predicted states, etc., totaling 128 bytes) to avoid the uncertain latency and fragmentation risks introduced by dynamic memory allocation.

[0111] All arrays and matrices are stored contiguously in row-major order for easy, cache-friendly access.

[0112] The main program loop is woken up with a precise 1-minute cycle, triggered by a real-time clock interrupt, to ensure strict synchronization between sampling and processing.

[0113] During non-processing periods, the microcontroller enters a deep sleep mode, maintaining power only for the real-time clock and sensor interfaces, with an overall system average power consumption of less than 10 milliwatts.

[0114] In summary, this method achieves endocrine and metabolic index filtering processing that meets medical-grade real-time early warning requirements on extremely resource-constrained edge devices through triple optimization of physiological mechanism-guided model sparsification, covariance adaptive adjustment, and sparse matrix-specific algorithms.

[0115] The single-pass filtering delay is controlled within 80 milliseconds, reducing system power consumption and providing reliable technical support for long-term home monitoring of patients with chronic endocrine diseases.

[0116] At the system level, the present invention also provides a real-time processing system for endocrine and metabolic indicators based on edge computing, which is deployed in the aforementioned embedded edge device.

[0117] The system includes a raw data acquisition unit, a lightweight model construction unit, a covariance initialization unit, an iterative filtering unit, a covariance adaptive update unit, and a real-time early warning triggering unit.

[0118] The raw data acquisition unit is responsible for receiving the synchronized four-dimensional observation vector from the wearable physiological sensing device and performing verification and buffering.

[0119] The lightweight model building unit loads pre-stored state transition matrix parameters when the system starts. These parameters are stored in read-only memory and cannot be modified, ensuring model consistency.

[0120] The covariance initialization unit is read from non-volatile memory upon first power-on. and The initial value is used; if this is the first time it is used, the default clinical value is used.

[0121] The iterative filtering unit is the core execution module, and its implementation strictly follows the aforementioned sparse conjugate gradient algorithm. All matrix operations call the optimized linear algebra library functions.

[0122] The covariance adaptive update unit maintains the residual sliding window and updates it after each filtering step. matrix.

[0123] The real-time early warning trigger unit monitors the filtering results and activates local alarms and narrowband IoT transmission when a critical value is triggered.

[0124] Each unit shares data through global state variables, without dynamic message passing, ensuring deterministic execution timing.

[0125] The system adopts an event-driven architecture, activating only when data arrives or a timed interrupt occurs, and remaining in low-power sleep mode the rest of the time to meet the battery life requirements of wearable devices.

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

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

Claims

1. A method for real-time processing of endocrine and metabolic indicators based on edge computing, characterized in that, include: Acquire raw endocrine and metabolic index time-series data continuously collected by wearable physiological sensing devices, wherein the raw endocrine and metabolic index time-series data includes at least blood glucose concentration, insulin level, cortisol concentration, and thyroid-stimulating hormone level; A lightweight linear state-space model is constructed. The state transition matrix of the lightweight linear state-space model is a diagonally dominated sparse matrix, and its non-zero elements only retain the coefficient terms corresponding to metabolic pathways with strong physiological coupling between adjacent time steps. Initialize the system process noise covariance matrix and the observation noise covariance matrix. The initial value of the system process noise covariance matrix is ​​set based on the standard deviation of physiological fluctuations of endocrine metabolic indicators under resting conditions, and the initial value of the observation noise covariance matrix is ​​set based on the sensor measurement error variance measured by the wearable physiological sensing device during the factory calibration stage. The iterative filtering process includes: calculating the predicted state vector at the current moment based on the prior state estimate at the current moment and the lightweight linear state-space model; Using the predicted state vector and the actual observed value at the current time, the Kalman gain matrix is ​​calculated. The Kalman gain matrix is ​​solved using a sparse matrix inversion algorithm, which only operates on the sub-blocks composed of non-zero elements in the covariance matrix. The posterior state estimate is updated based on the Kalman gain matrix, and the posterior state estimate is output as the filtered result of the endocrine metabolism index at the current time.

2. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 1, characterized in that, In each iteration, the observation noise covariance matrix is ​​dynamically updated according to the following rule: If the absolute value of the residuals at three consecutive time steps is greater than the preset physiological abnormality threshold, then the diagonal elements of the observation noise covariance matrix will be multiplied by a decay factor of one. If the absolute value of the residuals at five consecutive time steps is less than the preset physiological steady-state threshold, then the diagonal elements of the observation noise covariance matrix are multiplied by a growth factor of two. When the filtered result of any endocrine and metabolic indicator exceeds the preset clinical critical value range, a local real-time warning signal is immediately triggered, and the warning event, along with the corresponding timestamp, indicator type, and value, are packaged and uploaded to the cloud-based medical monitoring platform via a low-power wide area network.

3. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 1, characterized in that, The construction of the lightweight linear state-space model includes: Based on the knowledge graph of endocrine physiology, the feedback regulatory pathways between blood glucose, insulin, cortisol and thyroid-stimulating hormone are identified. Only retain the matrix elements corresponding to direct control relationships, and set the rest of the elements to zero; The retained non-zero elements were assigned their average moderating strength coefficients in the healthy population, which were determined by Granger causality analysis in large-scale clinical cohort studies.

4. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 3, characterized in that, The state transition matrix of the lightweight linear state-space model is a fourth-order diagonally dominant sparse matrix, and its structure satisfies: The diagonal elements represent the inertia maintenance coefficient of each indicator itself, while the off-diagonal non-zero elements represent the adjustment strength across indicators, and the absolute value of the diagonal elements is greater than the sum of the absolute values ​​of the off-diagonal elements of the same category.

5. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 4, characterized in that, Initialize the system process noise covariance matrix and the observation noise covariance matrix, including: The system process noise covariance matrix is ​​initialized as a diagonal matrix, with its diagonal elements being the squares of the physiological fluctuation standard deviations of blood glucose, insulin, cortisol, and thyroid-stimulating hormone under resting conditions. The observation noise covariance matrix is ​​initialized as a diagonal matrix, with its diagonal elements being the sensor measurement error variances of the corresponding wearable physiological sensing devices measured during the factory calibration phase.

6. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 5, characterized in that, In the iterative filtering process, the sparse matrix inversion algorithm employs an improved conjugate gradient method.

7. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 6, characterized in that, The improved conjugate gradient method, when performing matrix-vector multiplication in each iteration, only traverses the indices and values ​​of non-zero elements stored in the compressed sparse row format of the covariance matrix.

8. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 7, characterized in that, In the dynamically updated observation noise covariance matrix, the preset physiological abnormality threshold is 20% of the upper limit of the normal reference range of the corresponding endocrine and metabolic indicators; the preset physiological homeostasis threshold is 5% of the upper limit of the normal reference range of the corresponding endocrine and metabolic indicators.

9. The real-time processing method for endocrine metabolic indicators based on edge computing according to claim 8, characterized in that, The wearable physiological sensing device includes a subcutaneous implantable glucose sensor, a sweat insulin immunochromatographic chip, a salivary cortisol electrochemical detection module, and a fingertip blood micro-level thyroid-stimulating hormone fluorescent immunosensor. Each sensor uses a timestamp alignment mechanism to ensure synchronization of multi-source data.

10. The method for real-time processing of endocrine metabolic indicators based on edge computing according to claim 9, characterized in that, The timestamp alignment mechanism uses a unified real-time clock source to drive all sensor modules to eliminate sampling offset caused by independent crystal oscillator drift.