A database detection calculation method for biofeedback equipment

By combining electromyographic biofeedback equipment with CDC technology and the Kafka Streams framework, we can collect and clean electromyographic response data in real time. By using incremental calculation algorithms and priority grouping mechanisms, we can solve the problem of insufficient real-time feedback in traditional methods and achieve efficient and intuitive anomaly detection and report generation.

CN120089398BActive Publication Date: 2025-09-30BEIJING REMEDA INT BIOLOGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510166394.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-09-30
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

Traditional database detection calculation methods lack real-time feedback capabilities in high-concurrency detection scenarios, are unable to quickly update test results, and the result display method is not intuitive, making it difficult to reflect the impact distribution patterns and trends of medical ingredients.

Method used

The electromyographic biofeedback device is combined with the change data capture (CDC) technology and the Kafka Streams streaming processing framework to clean and format the response data. An incremental calculation algorithm is used to update the detection baseline and generate abnormal deviation values. Reports are generated through priority grouping and visualization processing.

Benefits of technology

It achieves efficient and real-time anomaly detection and feedback, highlights the anomaly intensity distribution through exclusive heat maps and trend maps of high-priority data, and displays the overall characteristics through grouped heat maps and statistical distribution maps of low-priority data, thus improving the intuitiveness and practicality of data interpretation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120089398B_ABST
    Figure CN120089398B_ABST
Patent Text Reader

Abstract

The present invention discloses a database detection operation method for a biofeedback device, which relates to the technical field of database detection operation. The present invention combines the change data capture (CDC) technology and the Kafka Streams streaming processing framework to collect and clean electromyographic response data in real time, effectively reducing redundant processing operations of the full data, introducing an incremental calculation algorithm to process dynamic data, and quickly adapting to dynamic changes in data by updating the average value and standard deviation of the detection baseline; at the same time, a priority grouping mechanism is introduced to sort high-priority data with large deviations from large to small according to the abnormal amplitude, and immediately transmit it to a visualization module for focused processing; for low-priority data with small deviations, a batch mode is adopted to process it in the detection order, optimizing resource allocation and response speed; high-priority data generates exclusive heat maps and trend maps through independent processes, and low-priority data is integrated into group heat maps and statistical distribution maps, significantly improving the intuitiveness and practicality of data interpretation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database detection and operation, and in particular to a database detection and operation method for a biofeedback device. Background Art

[0002] In health management and medical diagnosis, biofeedback devices are widely used to evaluate the human body's response to medical ingredients, which include Western medicine, traditional Chinese medicine, vitamins, microorganisms, etc., usually reaching tens of thousands of types. The equipment records the subject's electromyographic response data, combines statistical methods to analyze the impact of each ingredient, and generates corresponding health risk reports to provide users with conditioning and intervention plans.

[0003] Traditional database detection calculation methods mostly rely on full data processing and statistical models such as linear regression and normal distribution. By calculating the response value of each medicinal ingredient, generating an arithmetic mean, and comparing it with the standard deviation, data with significant differences are identified. However, this type of method lacks real-time feedback capabilities in large-scale ingredient detection scenarios. When real-time detection and feedback results are required, the repeated scanning and item-by-item calculation of the full data will lead to calculation delays, which cannot meet the efficiency requirements of high-concurrency detection scenarios. For dynamically changing data, the test results cannot be updated quickly, and the real-time performance is insufficient. In addition, the results of traditional solutions are mostly displayed in red, orange and yellow labels, with relatively poor recognition effect, and cannot intuitively reflect the distribution law and trend of the influence of medicinal ingredients. Therefore, there is an urgent need for a database detection calculation method for biofeedback equipment to solve such problems. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] The present invention provides a database detection operation method for a biofeedback device to solve the problem that as the types of medical ingredients and the amount of detection data increase, traditional database detection operation methods are gradually unable to meet the real-time feedback needs and are difficult to intuitively display and quickly assist in diagnosis.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] An embodiment of the present invention provides a database detection operation method for a biofeedback device, which includes:

[0008] Step S1: Using an electromyographic biofeedback device to record and collect electromyographic response data, and using the change data capture (CDC) technology and the Kafka Streams streaming processing framework to clean and format the response data; the electromyographic response data includes amplitude, frequency, and duration;

[0009] Step S2, based on the electromyographic response data processed in step S1, using an incremental calculation algorithm to update the electromyographic response data; the update calculation includes: real-time updating of the mean and standard deviation of the detection baseline, and generating an abnormal deviation value for each substance;

[0010] Step S3: group and prioritize the abnormal deviation values ​​generated in step S2. The grouping and ranking rules are as follows:

[0011] Data with deviations exceeding 3 times the standard deviation are marked as high priority and sorted by anomaly magnitude from largest to smallest, and then directly passed to step S4 for processing; data with deviations within 3 times the standard deviation are marked as low priority and processed in batch mode according to the detection order;

[0012] Step S4, visualizing the detection data according to the grouping result of step S3;

[0013] Step S5: After the visualization process is completed, all the test results are integrated to generate a report in PDF or HTML format.

[0014] As a preferred solution of the database detection operation method of the biofeedback device described in the present invention, the step of cleaning and formatting the response data by combining the change data capture CDC technology and the Kafka Streams streaming processing framework is as follows:

[0015] Define the raw EMG response data stream as D:

[0016] D={d1,d2,...,d n},

[0017] Among them, d i =(a i , f i , t i ) represents the i-th data in the original data stream, a i represents the amplitude, f i represents frequency, t i Indicates duration, n is the total number of data points in the original data stream, i is the data point index, and satisfies 1≤i≤n.

[0018] Use the change data capture (CDC) technology to extract the change data stream. The extraction formula is:

[0019] C={c1,c2,...,c m},

[0020] in,

[0021] c j =(d j , Δ j) indicates the jth data in the changed data stream, d j is the jth data in the original data stream, Δ j Indicates the change type, including Δ j =1 and Δ j = 0, 1 indicates new data, 0 indicates data update, m is the total number of data points in the changed data stream, j is the index of the changed data point, and 1≤j≤m, and m≤n;

[0022] Use the Kafka Streams framework to clean the change data stream and define the cleaned data set as D clean :

[0023] D clean ={d i |a i ≥∈ a , f min ≤f i ≤f max},

[0024] Among them, D clean Represents the cleaned data stream, a i is the amplitude of the i-th data, ∈ a is the minimum threshold for amplitude filtering, f i is the frequency of the i-th data, f min and f max Represent the minimum and maximum values ​​of the frequency respectively,

[0025] Format the cleaned data. The formatted data is:

[0026] d′ i =(a i , f i , t i , t s ),

[0027] Where d′ i Indicates the formatted i-th data, a i 、f i , t i are amplitude, frequency and duration respectively, t s Indicates the timestamp of recording the data.

[0028] Finally, the cleaned data stream is transmitted through Kafka Streams.

[0029] As a preferred solution of the database detection operation method of the biofeedback device of the present invention, the step of using the incremental calculation algorithm to update the electromyographic response data is as follows:

[0030] Initialize the baseline mean and standard deviation. Assume that the initial values ​​of the baseline mean and standard deviation are μ0 and σ0 respectively. The initialization formula is:

[0031]

[0032] Where μ0 represents the initial baseline mean, σ0 represents the initial baseline standard deviation, k is the number of data points used for initialization calculation, and a i is the amplitude of the i-th data, satisfying 1≤i≤k,

[0033] For each new data point a p Define the baseline dynamic update rules. The baseline mean and standard deviation update formulas are as follows:

[0034]

[0035] Among them, μ p and σ p They represent the baseline mean and standard deviation when the total number of data points is p, respectively. p is the amplitude of the current data point, p represents the total number of data points, and it increases from the initial k+1.

[0036] As a preferred solution of the database detection operation method of the biofeedback device of the present invention, the step of updating the electromyographic response data using the incremental calculation algorithm further includes:

[0037] Calculate the abnormal deviation value z for each data point based on the current baseline mean and standard deviation i :

[0038]

[0039] Among them, z i Indicates the abnormal deviation value of the i-th data, a i Indicates the data amplitude, μ p and σ p are the current baseline mean and standard deviation, respectively;

[0040] Determine whether the data is abnormal by using the abnormal deviation value.

[0041] If |z i |≤α, it is considered normal. If |z i |>α, it is determined to be abnormal, where α is the threshold for abnormality determination.

[0042] As a preferred solution of the database detection operation method of the biofeedback device of the present invention, the step of grouping and prioritizing the abnormal deviation values ​​generated in step S2 is as follows:

[0043] Based on the abnormal deviation value z generated in step S2 i , group and prioritize the data in the following ways:

[0044] Define high priority grouping rules:

[0045] G high ={z i ||z i |>β},

[0046] Among them, G high Indicates high priority data packets, z i represents the abnormal deviation value of the i-th data, β is the threshold for high priority judgment,

[0047] Define low priority grouping rules:

[0048] G low ={z i ||z i |≤β},

[0049] Among them, G low Indicates low priority data packets;

[0050] Sort high priority data using the following formula:

[0051]

[0052] in, Indicates high-priority data sorted from large to small by absolute deviation value. Sort is the sorting operation, descending = True indicates descending sorting.

[0053] Group low-priority data into batches using the following formula:

[0054]

[0055] Among them, B low Indicates batch results of low-priority data, is the jth low-priority data batch, and q represents the number of batches of low-priority data.

[0056] As a preferred solution of the database detection calculation method of the biofeedback device described in the present invention, in step S4, high-priority data is generated through an independent visualization process to generate a dedicated heat map, highlighting the abnormal intensity distribution, and updating the trend map in real time to show the time dimension change.

[0057] Low-priority data is aggregated into group heat maps to show overall distribution characteristics.

[0058] As a preferred solution of the database detection operation method of the biofeedback device of the present invention, wherein: the independent visualization process is:

[0059] Define the heat map, the definition formula is:

[0060]

[0061] Among them, H high (x, y) represents the heat map value of high priority data, x i ,y i Indicates the abnormal deviation value z i Related spatial coordinates, σ is the Gaussian kernel width parameter, the initial value is determined by empirical method, and then adjusted according to the heat map effect,

[0062] Define a real-time trend chart, and the definition formula is:

[0063]

[0064] Among them, T high (t) represents time t k and the deviation value z k The mapping reflects the time dynamic changes of high priority data, t k is the kth time point.

[0065] As a preferred solution of the database detection operation method of the biofeedback device of the present invention, the step of integrating the low-priority data into a group heat map and displaying the overall distribution characteristics is as follows:

[0066] Define the group heat map, the definition formula is:

[0067]

[0068] Among them, H low (x, y) represents the group heat map value of low priority data, q is the number of group batches,

[0069] Define a statistical distribution graph and use a histogram to display G low The distribution of data deviation values ​​in the histogram is shown as follows:

[0070] P(z)=Hist(G low , bins = b),

[0071] Wherein, P(z) represents the histogram distribution of the deviation value z, and bins=b represents the number of histogram bins.

[0072] As a preferred embodiment of the database detection calculation method for the biofeedback device described in the present invention, the report content includes: the detection value of abnormal substances and their deviation from the average value, individual analysis and visualization results of high-priority data, overall group analysis and visualization charts of low-priority data, and personalized conditioning suggestions for abnormal results.

[0073] As a preferred solution of the database detection operation method of the biofeedback device of the present invention, the step of integrating all the detection results to generate a report in PDF or HTML format is as follows:

[0074] The report is generated by integrating the test data and visualization results. The integration formula is:

[0075] R={R high , R low},

[0076] Among them, R high Including abnormal deviation values ​​of high-priority data, high-priority heat map H high and trend chart T high , R low Group heat map H including low priority data low and statistical distribution graph P(z);

[0077] Generate a final report using the report generation tool.

[0078] The beneficial effects of the present invention are as follows: the present invention combines the change data capture CDC technology and the Kafka Streams streaming processing framework to collect and clean electromyographic response data in real time, effectively reducing redundant processing operations of the full data and improving real-time performance; introduces an incremental calculation algorithm to process dynamic data, and realizes efficient abnormal deviation detection by updating the mean and standard deviation of the detection baseline, avoiding the high resource consumption of the traditional full calculation mode and being able to quickly adapt to dynamic changes in data.

[0079] The present invention introduces a priority grouping mechanism in the abnormal data grouping and sorting stage. For high-priority data with large deviations, it sorts them from large to small according to the abnormal amplitude and immediately transmits them to the visualization module for key processing; for low-priority data with small deviations, it adopts batch mode to process them in the order of detection, optimizing resource allocation and response speed; high-priority data generates exclusive heat maps and trend maps through independent processes, highlighting its abnormal intensity distribution and time dynamic changes, while low-priority data is integrated into group heat maps and statistical distribution maps, which intuitively display the overall distribution characteristics, significantly improving the intuitiveness and practicality of data interpretation. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0081] Figure 1 Schematic diagram of the flow of the database detection calculation method applied to the biofeedback device of the present invention. DETAILED DESCRIPTION

[0082] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0083] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0084] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0085] Example 1, with reference to Figure 1 This embodiment provides a database detection operation method for a biofeedback device, comprising the following steps:

[0086] Step S1: Using an electromyographic biofeedback device to record and collect electromyographic response data, and using the change data capture (CDC) technology and the Kafka Streams streaming processing framework to clean and format the response data; the electromyographic response data includes amplitude, frequency, and duration;

[0087] The steps to clean and format the reaction data by combining the change data capture CDC technology and the Kafka Streams streaming processing framework are as follows:

[0088] Define the raw EMG response data stream as D:

[0089] D={d1,d2,...,d n},

[0090] Among them, d i =(a i , f i , ti ) represents the i-th data in the original data stream, a i represents the amplitude, f i represents frequency, t i Indicates duration, n is the total number of data points in the original data stream, i is the data point index, and satisfies 1≤i≤n.

[0091] Use the change data capture (CDC) technology to extract the change data stream. The extraction formula is:

[0092] C={c1,c2,...,c m},

[0093] in,

[0094] c j =(d j , Δ j ) indicates the jth data in the changed data stream, d j is the jth data in the original data stream, Δ j Indicates the change type, including Δ j =1 and Δ j = 0, 1 indicates new data, 0 indicates data update, m is the total number of data points in the changed data stream, j is the index of the changed data point, and 1≤j≤m, and m≤n;

[0095] Use the Kafka Streams framework to clean the change data stream and define the cleaned data set as D clean :

[0096] D clean ={d i |a i ≥∈ a , f min ≤f i ≤f max},

[0097] Among them, D clean Represents the cleaned data stream, a i is the amplitude of the i-th data, ∈ a is the minimum threshold for amplitude filtering, f i is the frequency of the i-th data, f min and f max Represent the minimum and maximum values ​​of the frequency respectively,

[0098] Format the cleaned data. The formatted data is:

[0099] d′ i =(a i , f i , t i , ts ),

[0100] Where d′ i Indicates the formatted i-th data, a i 、f i , t i are amplitude, frequency and duration respectively, t s Indicates the timestamp of recording the data.

[0101] Finally, the cleaned data stream is transmitted through Kafka Streams;

[0102] Specifically, in step S1, the efficiency and flexibility of distributed processing are combined to extract the changed data stream through CDC technology, effectively reducing repeated processing operations; Kafka Streams is used to clean and format the data stream in real time, standardize the data into a unified structural form, and eliminate data points with amplitudes below the threshold and frequency ranges exceeding the limit.

[0103] Step S2, based on the electromyographic response data processed in step S1, using an incremental calculation algorithm to update the electromyographic response data; the update calculation includes: real-time updating of the mean and standard deviation of the detection baseline, and generating an abnormal deviation value for each substance;

[0104] The steps for updating the electromyographic response data using the incremental calculation algorithm are as follows:

[0105] Initialize the baseline mean and standard deviation. Assume that the initial values ​​of the baseline mean and standard deviation are μ0 and σ0 respectively. The initialization formula is:

[0106]

[0107] Where μ0 represents the initial baseline mean, σ0 represents the initial baseline standard deviation, k is the number of data points used for initialization calculation, and a i is the amplitude of the i-th data, satisfying 1≤i≤k,

[0108] For each new data point a p Define the baseline dynamic update rules. The baseline mean and standard deviation update formulas are as follows:

[0109]

[0110] Among them, μ p and σ p They represent the baseline mean and standard deviation when the total number of data points is p, respectively. p is the amplitude of the current data point, p represents the total number of data points, and increases from the initial k+1;

[0111] The step of updating the electromyographic response data using the incremental calculation algorithm also includes:

[0112] Calculate the abnormal deviation value z for each data point based on the current baseline mean and standard deviation i :

[0113]

[0114] Among them, z i Indicates the abnormal deviation value of the i-th data, a i Indicates the data amplitude, μ p and σ p are the current baseline mean and standard deviation, respectively;

[0115] Determine whether the data is abnormal by using the abnormal deviation value.

[0116] If |z i |≤α, it is considered normal. If |z i |>α, it is judged as abnormal, where α is the threshold for abnormal judgment;

[0117] Specifically, by dynamically updating the baseline mean and standard deviation of the electromyographic response data through an incremental calculation algorithm, it can not only efficiently process real-time data, but also quickly detect abnormal data points that deviate significantly from the baseline, avoiding the high overhead of traditional full recalculation and adapting to the dynamic changes of real-time data.

[0118] Step S3: group and prioritize the abnormal deviation values ​​generated in step S2. The grouping and ranking rules are as follows:

[0119] Data with deviations exceeding 3 times the standard deviation are marked as high priority and sorted by anomaly magnitude from largest to smallest, and then directly passed to step S4 for processing; data with deviations within 3 times the standard deviation are marked as low priority and processed in batch mode according to the detection order;

[0120] The steps of grouping and prioritizing the abnormal deviation values ​​generated in step S2 are:

[0121] Based on the abnormal deviation value z generated in step S2 i , group and prioritize the data in the following ways:

[0122] Define high priority grouping rules:

[0123] G high ={z i ||z i |>β},

[0124] Among them, G high Indicates high priority data packets, z irepresents the abnormal deviation value of the i-th data, β is the threshold for high priority judgment,

[0125] Define low priority grouping rules:

[0126] G low ={z i ||z i |≤β},

[0127] Among them, G low Indicates low priority data packets;

[0128] Sort high priority data using the following formula:

[0129]

[0130] in, Indicates high-priority data sorted from large to small by absolute deviation value. Sort is the sorting operation, descending = True indicates descending sorting.

[0131] Group low-priority data into batches using the following formula:

[0132]

[0133] Among them, B low Indicates batch results of low-priority data, is the jth low-priority data batch, and q represents the number of batches of low-priority data;

[0134] Specifically, the data is grouped and sorted based on the abnormal deviation value, with high-deviation data being processed first, while low-deviation data is processed in batches, thus improving the response speed and processing efficiency of anomaly detection.

[0135] Step S4, visualizing the detection data according to the grouping result of step S3;

[0136] In step S4, high-priority data is visualized through an independent process to generate a dedicated heat map, highlighting the abnormal intensity distribution, and updating the trend map in real time to show the changes in the time dimension.

[0137] Low-priority data is integrated into a group heat map to show the overall distribution characteristics;

[0138] The independent visualization process is,

[0139] Define the heat map, the definition formula is:

[0140]

[0141] Among them, H high(x, y) represents the heat map value of high priority data, x i ,y i Indicates the abnormal deviation value z i Related spatial coordinates, σ is the Gaussian kernel width parameter, the initial value is determined by empirical method, and then adjusted according to the heat map effect,

[0142] Define a real-time trend chart, and the definition formula is:

[0143]

[0144] Among them, T high (t) represents time t k and the deviation value z k The mapping reflects the time dynamic changes of high priority data, t k is the kth time point;

[0145] The steps to integrate low-priority data into a group heat map and show the overall distribution characteristics are as follows:

[0146] Define the group heat map, the definition formula is:

[0147]

[0148] Among them, H low (x, y) represents the group heat map value of low priority data, q is the number of group batches,

[0149] Define a statistical distribution graph and use a histogram to display G low The distribution of data deviation values ​​in the histogram is shown as follows:

[0150] P(z)=Hist(G low , bins = b),

[0151] Where P(z) represents the histogram distribution of the deviation value z, and bins=b represents the number of histogram bins;

[0152] Specifically, high-priority data is processed through independent heat maps and trend maps to highlight the spatial and temporal distribution characteristics of abnormal deviations; at the same time, the overall characteristics of low-priority data are displayed through grouped heat maps and statistical distribution maps, which more intuitively demonstrates the abnormal intensity and global characteristics of the data.

[0153] Step S5: After the visualization process is completed, all the test results are integrated to generate a report in PDF or HTML format;

[0154] The report includes: detection values ​​of abnormal substances and their deviation from the average value, individual analysis and visualization results of high-priority data, overall group analysis and visualization charts of low-priority data, and personalized treatment recommendations for abnormal results;

[0155] The steps to integrate all test results to generate a report in PDF or HTML format are:

[0156] The report is generated by integrating the test data and visualization results. The integration formula is:

[0157] R={R high , R low},

[0158] Among them, R high Including abnormal deviation values ​​of high-priority data, high-priority heat map H high and trend chart T high , R low Group heat map H including low priority data low and statistical distribution graph P(z);

[0159] Generate final report using report generation tool;

[0160] Specifically, compared with traditional output solutions, the present invention can automatically integrate test results, generate high-quality PDF or HTML format reports, and intuitively present the analysis of high-priority data and the overall trend of low-priority data.

[0161] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A database detection calculation method for a biofeedback device, characterized by: include, Step S1: Using an electromyographic biofeedback device to record and collect electromyographic response data, and using the change data capture (CDC) technology and the Kafka Streams streaming processing framework to clean and format the response data; the electromyographic response data includes amplitude, frequency, and duration; Step S2, based on the electromyographic response data processed in step S1, using an incremental calculation algorithm to update the electromyographic response data; the update calculation includes: real-time updating of the mean and standard deviation of the detection baseline, and generating an abnormal deviation value for each substance; Step S3: group and prioritize the abnormal deviation values ​​generated in step S2. The grouping and ranking rules are as follows: Data with deviations exceeding 3 times the standard deviation are marked as high priority and sorted by anomaly magnitude from largest to smallest, and then directly passed to step S4 for processing; data with deviations within 3 times the standard deviation are marked as low priority and processed in batch mode according to the detection order; Step S4, visualizing the detection data according to the grouping result of step S3; Step S5: After the visualization process is completed, all the test results are integrated to generate a report in PDF or HTML format; The steps of grouping and prioritizing the abnormal deviation values ​​generated in step S2 are as follows: Based on the abnormal deviation value z generated in step S2 i , group and prioritize the data in the following ways: Define high priority grouping rules: G high ={z i ||with i |>β}, Among them, G high Indicates high priority data packets, z i represents the abnormal deviation value of the i-th data, β is the threshold for high priority judgment, Define low priority grouping rules: G low ={z i ||z i |≤β}, Among them, G low Indicates low priority data packets; Sort high priority data using the following formula: in, Indicates high-priority data sorted from large to small by absolute deviation value. Sort is the sorting operation, descending = True indicates descending sorting. Group low-priority data into batches using the following formula: Among them, B low Indicates batch results of low-priority data, is the jth low-priority data batch, and q represents the number of batches of low-priority data.

2. The database detection calculation method of a biofeedback device according to claim 1, characterized in that: The steps for cleaning and formatting the reaction data by combining the change data capture CDC technology and the Kafka Streams stream processing framework are as follows: Define the raw EMG response data stream as D: D={d1,d2,...,d n }, Among them, d i =(a i ,f i ,t i ) represents the i-th data in the original data stream, a i represents the amplitude, f i represents frequency, t i Indicates duration, n is the total number of data points in the original data stream, i is the data point index, and satisfies 1≤i≤n. Use the change data capture (CDC) technology to extract the change data stream. The extraction formula is: C={c1,c2,...,c m }, in, c j =(d j ,Δ j ) indicates the jth data in the changed data stream, d j is the jth data in the original data stream, Δ j Indicates the change type, including Δ j =1 and Δ j = 0, 1 indicates new data, 0 indicates data update, m is the total number of data points in the changed data stream, j is the index of the changed data point, and 1≤j≤m, and m≤n; Use the Kafka Streams framework to clean the change data stream and define the cleaned data set as D clean : D clean ={d i |a i ≥∈ a ,f min ≤f i ≤f max }, Among them, D clean Represents the cleaned data stream, a i is the amplitude of the i-th data, ∈ a is the minimum threshold for amplitude filtering, f i is the frequency of the i-th data, f min and f max Represent the minimum and maximum values ​​of the frequency respectively, Format the cleaned data. The formatted data is: d′ i =(a i ,f i ,t i ,t s ), Among them, d' i Indicates the formatted i-th data, a i 、f i , t i are amplitude, frequency and duration respectively, t s Indicates the timestamp of recording the data. Finally, the cleaned data stream is transmitted through Kafka Streams.

3. The database detection calculation method of a biofeedback device according to claim 2, characterized in that: The step of using the incremental calculation algorithm to update the electromyographic response data is as follows: Initialize the baseline mean and standard deviation. Assume that the initial values ​​of the baseline mean and standard deviation are μ0 and σ0 respectively. The initialization formula is: Where μ0 represents the initial baseline mean, σ0 represents the initial baseline standard deviation, k is the number of data points used for initialization calculation, and a i is the amplitude of the i-th data, satisfying 1≤i≤k, For each new data point a p Define the baseline dynamic update rules. The baseline mean and standard deviation update formulas are as follows: Among them, μ p and σ p They represent the baseline mean and standard deviation when the total number of data points is p, respectively. p is the amplitude of the current data point, p represents the total number of data points, and it increases from the initial k+1.

4. The database detection calculation method of a biofeedback device according to claim 3, characterized in that: The step of using the incremental calculation algorithm to update the electromyographic response data also includes: Calculate the abnormal deviation value z for each data point based on the current baseline mean and standard deviation i : Among them, z i Indicates the abnormal deviation value of the i-th data, a i Indicates the data amplitude, μ p and σ p are the current baseline mean and standard deviation, respectively; Determine whether the data is abnormal by using the abnormal deviation value. If |z i |≤α, it is considered normal. If |z i |>α, it is determined to be abnormal, where α is the threshold for abnormality determination.

5. The database detection calculation method of a biofeedback device according to claim 4, characterized in that: In step S4, high-priority data is visualized through an independent process to generate a dedicated heat map, highlighting the abnormal intensity distribution, and updating the trend map in real time to show the changes in the time dimension. Low-priority data is aggregated into group heat maps to show overall distribution characteristics.

6. The database detection calculation method of a biofeedback device according to claim 5, characterized in that: The independent visualization process is: Define the heat map, the definition formula is: Among them, H high (x,y) represents the heat map value of high priority data, x i ,y i Indicates the abnormal deviation value z i Related spatial coordinates, σ is the Gaussian kernel width parameter, the initial value is determined by empirical method, and then adjusted according to the heat map effect, Define a real-time trend chart, and the definition formula is: Among them, T high (t) represents time t k and the deviation value z k The mapping reflects the time dynamic changes of high priority data, t k is the kth time point.

7. The database detection calculation method of a biofeedback device according to claim 6, characterized in that: The steps of integrating the low priority data into a group heat map and displaying the overall distribution characteristics are as follows: Define the group heat map, the definition formula is: Among them, H low (x,y) represents the group heat map value of low priority data, q is the number of group batches, Define a statistical distribution graph and use a histogram to display G low The distribution of data deviation values ​​in the histogram is shown as follows: P(z)=Hist(G low ,bins=b), Wherein, P(z) represents the histogram distribution of the deviation value z, and bins=b represents the number of histogram bins.

8. The database detection calculation method of a biofeedback device according to claim 7, characterized in that: The report content includes: the detection values ​​of abnormal substances and their deviations from the average value, individual analysis and visualization results of high-priority data, overall group analysis and visualization charts of low-priority data, and personalized conditioning suggestions for abnormal results.

9. The database detection calculation method of a biofeedback device according to claim 8, characterized in that: The steps of integrating all test results to generate a report in PDF or HTML format are: The report is generated by integrating the test data and visualization results. The integration formula is: R={R high ,R low }, Among them, R high Including abnormal deviation values ​​of high-priority data, high-priority heat map H high and trend chart T high , R low Group heat map H including low priority data low and statistical distribution graph P(z); Generate a final report using the report generation tool.