Database detection operation method of biological feedback equipment
By combining CDC technology and Kafka Streams framework to clean and format the electromyography reaction data, and using incremental calculation algorithms for real-time update processing, the problem of insufficient real-time feedback capabilities of traditional database detection and calculation methods in large-scale detection scenarios is solved, and efficient and intuitive data processing and display are achieved.
Patent Information
- Application Number
- CN202510166394.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-02-14
AI Technical Summary
Traditional database detection and computing methods lack real-time feedback capabilities in large-scale pharmaceutical component detection scenarios, and the calculation delay is severe, which cannot meet the efficiency requirements of high-concurrency detection scenarios. The results are not intuitive, making it difficult to show the distribution patterns and trends of pharmaceutical components.
The electromyography biofeedback device is used to record electromyography reaction data, combine the change data capture CDC technology and the Kafka Streams stream processing framework to clean and format the data, use incremental calculation algorithms to update and calculate, group and prioritize abnormal deviation values, and generate heat maps and trend maps through independent visualization processes, and integrate to generate PDF or HTML format reports.
Real-time acquisition and processing of electromyography reaction data is achieved, real-time and efficiency are improved, and the intuitiveness and practicality of data interpretation is significantly improved through priority grouping and intuitive visualization, and can quickly adapt to the dynamic changes of data.
Smart Images

Figure CN120089398A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of database detection operations, and in particular to a database detection operation method for a biofeedback device. Background Art
[0002] In health management and medical diagnosis, biofeedback devices are widely used to evaluate the body's response to pharmaceutical ingredients, including Western medicines, traditional Chinese medicines, vitamins, microorganisms, etc., usually reaching tens of thousands of kinds. The device records the electromyogram response data of the measured person, analyzes the influence of each ingredient by combining statistical methods, and generates a corresponding health risk report to provide users with conditioning and intervention plans.
[0003] Traditional database detection operation methods mostly rely on full-scale data processing and statistical models such as linear regression and normal distribution. By calculating the response values of each pharmaceutical ingredient, the arithmetic mean is generated and compared with the standard deviation to identify data with significant differences; however, such methods have insufficient real-time feedback capabilities in large-scale ingredient detection scenarios. In cases where real-time detection and feedback results are required, the repeated scanning and item-by-item calculation of full-scale data will cause calculation delays and cannot meet the efficiency requirements of high-concurrency detection scenarios. For dynamically changing data, the detection results cannot be updated quickly, resulting in insufficient real-time performance; in addition, the result display methods of traditional solutions are mostly red, orange, and yellow markings, with relatively poor recognition effects and unable to intuitively reflect the influence distribution law and trend of pharmaceutical ingredients; therefore, there is an urgent need for a database detection operation method for biofeedback devices 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 pharmaceutical ingredients and the amount of detection data increase, traditional database detection operation methods gradually cannot meet the real-time feedback requirements; it is difficult to intuitively display and quickly assist in diagnosis.
[0006] 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 electromyogram biofeedback device to record and collect electromyogram response data, and cleaning and formatting the response data by combining the change data capture CDC technology and the Kafka Streams streaming processing framework; the electromyogram response data includes amplitude, frequency, and duration;
[0009] Step S2: Based on the EMG response data processed in Step S1, use the incremental calculation algorithm to update and calculate the EMG response data. The content of the update calculation includes: real-time updating the average value and standard deviation of the detection baseline, and generating the abnormal deviation value of each substance.
[0010] Step S3: Group and prioritize the abnormal deviation values generated in Step S2. The grouping and sorting rules are as follows:
[0011] Data with a deviation exceeding 3 times the standard deviation is marked as high priority, sorted from largest to smallest by the abnormal amplitude, and directly passed to Step S4 for processing; data with a deviation within 3 times the standard deviation is marked as low priority and processed in batch mode according to the detection order.
[0012] Step S4: Perform visual processing on the detection data according to the grouping results of Step S3.
[0013] Step S5: After completing the visual processing, integrate all detection results 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, wherein: 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 original EMG response data stream as D:
[0016] D = {d 1 , d 2 ,..., d n},
[0017] wherein, 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 the frequency, t i represents the duration, n is the total number of data points in the original data stream, i is the data point index, satisfying 1 ≤ i ≤ n.
[0018] Use the change data capture CDC technology to extract the change data stream. The extraction formula is:
[0019] C = {c 1 , c 2 ,..., c m},
[0020] wherein,
[0021] cj =(d j , Δ j ) represents the j-th data in the changed data stream, where d j is the j-th data in the original data stream, and Δ j represents the change type, including Δ j = 1 and Δ j = 0. 1 indicates data addition, 0 indicates data update. m is the total number of data points in the changed data stream, and j is the index of the changed data point, satisfying 1 ≤ j ≤ m, and m ≤ n;
[0022] Use the Kafka Streams framework to clean the changed 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] where 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, and the formatted data is:
[0026] d′ i =(a i , f i , t i , t s ),
[0027] where d′ i represents the i-th data after formatting, a i , f i , t i are the amplitude, frequency, and duration respectively, and t s represents the timestamp for recording this data,
[0028] Finally, transmit the cleaned data stream through Kafka Streams.
[0029] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: the step of using the incremental calculation algorithm to update and calculate the electromyogram response data is as follows:
[0030] Initialize the baseline average value and standard deviation, and set the initial values of the baseline average value and standard deviation to be μ 0 and σ 0 , and the initialization formula is:
[0031]
[0032] wherein, μ 0 represents the initial baseline average value, σ 0 represents the initial baseline standard deviation, k is the number of data points used for initialization calculation, 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 rule, and the baseline average value and standard deviation update formula are:
[0034]
[0035] wherein, μ p and σ p respectively represent the baseline average value and standard deviation when the total number of data points is p, a p is the amplitude of the current data point, p represents the total number of data points, and starts to increase from the initial k + 1.
[0036] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: the step of using the incremental calculation algorithm to update and calculate the electromyogram response data further includes,
[0037] According to the current baseline average value and standard deviation, calculate the abnormal deviation value z of each data point i :
[0038]
[0039] wherein, z i represents the abnormal deviation value of the i-th data, a i represents the data amplitude, μ p and σ p are the current baseline average value and standard deviation respectively;
[0040] Determine whether the data is abnormal through the abnormal deviation value,
[0041] If |z i | ≤ α, it is determined to be normal. If |z iIf it is greater than α, it is determined as an anomaly, where α is the threshold for anomaly determination.
[0042] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: the step of grouping and prioritizing the abnormal deviation values generated in step S2 is
[0043] Based on the abnormal deviation value z generated in step S2 i , group and prioritize the data, and the grouping and sorting method is:
[0044] Define the high-priority grouping rule:
[0045] G high ={z i ||z i |>β},
[0046] wherein, G high represents the high-priority data grouping, z i represents the abnormal deviation value of the i-th data, and β is the threshold for high-priority determination.
[0047] Define the low-priority grouping rule:
[0048] G low ={z i ||z i |≤β},
[0049] wherein, G low represents the low-priority data grouping;
[0050] Sort the high-priority data, and the sorting formula is:
[0051]
[0052] wherein, represents the high-priority data sorted from largest to smallest by absolute deviation, Sort is the sorting operation, and descending = True represents descending sorting.
[0053] Group the low-priority data by batch, and the grouping formula is:
[0054]
[0055] where B low represents the batch result of the low-priority data. is the j-th low-priority data batch, and q represents the number of batches of low-priority data.
[0056] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: in step S4, high-priority data generates a dedicated heat map through an independent visualization process, highlighting the abnormal intensity distribution, and the trend map is updated in real time to present the change in the time dimension.
[0057] Low-priority data is integrated into a grouped heat map to show the overall distribution characteristics.
[0058] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: the independent visualization process is
[0059] Define the heat map, and the defined formula is:
[0060]
[0061] Wherein, H high (x, y) represents the heat map value of high-priority data, x i , y i represents the spatial coordinates related to the abnormal deviation value z i , σ is the Gaussian kernel width parameter, and the initial value is determined by the empirical method and then adjusted according to the heat map effect.
[0062] Define the real-time trend map, and the defined formula is:
[0063]
[0064] Wherein, T high (t) represents the mapping of time t k and the deviation value z k , reflecting the time dynamic change of high-priority data, t k is the kth time point.
[0065] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: the steps of integrating the low-priority data into a grouped heat map to show the overall distribution characteristics are
[0066] Define the grouped heat map, and the defined formula is:
[0067]
[0068] Wherein, H low (x, y) represents the grouped heat map value of low-priority data, q is the number of grouping batches,
[0069] Define the statistical distribution map, and use a histogram to show the distribution of data deviation values in G low , and the histogram display formula is:
[0070] P(z) = Hist(G low , bins = b),
[0071] where P(z) represents the histogram distribution of the deviation value z, and bins = b represents the number of histogram bins.
[0072] As a preferred solution of the database detection operation method of a biofeedback device according to the present invention, wherein: the report content includes: the detection value of abnormal substances and their deviation from the average value, the separate analysis and visualization results of high-priority data, the overall grouped 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 a biofeedback device according to the present invention, wherein: the step of integrating all detection results to generate a report in PDF or HTML format is
[0074] Integrate the report according to the detection data and visualization results, and the integration formula is:
[0075] R = {R high , R low},
[0076] where R high includes the abnormal deviation value of high-priority data, the high-priority heat map H high and the trend chart T high , R low includes the grouped heat map H low of low-priority data and the statistical distribution chart P(z);
[0077] Use a report generation tool to generate the final report.
[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 the redundant processing operations of all data and improving the real-time performance; introducing an incremental calculation algorithm to process dynamic data, and realizing efficient abnormal deviation detection by updating the average value and standard deviation of the detection baseline, avoiding the high resource consumption of the traditional all-data calculation mode, and being able to quickly adapt to the dynamic changes of data.
[0079] In the present invention, during the abnormal data grouping and sorting stage, a priority grouping mechanism is introduced. For high-priority data with large deviations, it is sorted in descending order of the abnormal amplitude and immediately transmitted to the visualization module for key processing. For low-priority data with small deviations, it is processed in batch mode according to the detection order to optimize resource allocation and response speed. High-priority data generates exclusive heat maps and trend charts through an independent process to highlight its abnormal intensity distribution and time dynamic changes, while low-priority data is integrated into grouped heat maps and statistical distribution charts to intuitively display the overall distribution characteristics, significantly enhancing 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 accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0081] Figure 1 It is a schematic flowchart of a database detection operation method applied to a biofeedback device of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0082] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings of the specification.
[0083] Many specific details are set forth in the following description in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0084] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The "in one embodiment" appearing in different places in this specification does not all refer to the same embodiment, nor is it a separate or alternative embodiment that excludes other embodiments.
[0085] Embodiment 1, referring to Figure 1 This embodiment provides a database detection operation method for a biofeedback device, including the following steps:
[0086] Step S1, using an electromyographic biofeedback device to record and collect electromyographic response data, and cleaning and formatting the response data in combination with the change data capture (CDC) technology and the Kafka Streams streaming processing framework; the electromyographic response data includes amplitude, frequency, and duration.
[0087] The steps of cleaning and formatting the reaction data by combining the Change Data Capture (CDC) technology and the Kafka Streams streaming processing framework are as follows:
[0088] Define the original electromyogram reaction data stream as D:
[0089] D = {d 1 , d 2 ,..., d n},
[0090] where 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 the frequency, t i represents the duration, n is the total number of data points in the original data stream, i is the data point index, satisfying 1 ≤ i ≤ n,
[0091] Use the Change Data Capture (CDC) technology to extract the change data stream. The extraction formula is:
[0092] C = {c 1 , c 2 ,..., c m},
[0093] where
[0094] c j = (d j , Δ j ) represents the j-th data in the change data stream, d j is the j-th data in the original data stream, Δ j represents the change type, including Δ j = 1 and Δ j = 0, 1 indicates data addition, 0 indicates data update, m is the total number of data points in the change data stream, j is the index of the change data point, satisfying 1 ≤ j ≤ m, and m ≤ n;
[0095] Use the Kafka Streams framework to clean the change data stream. 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 data stream after cleaning, and a i is the amplitude of the i-th data, ∈ a is the minimum threshold for amplitude filtering, and 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 data after cleaning, and the formatted data is:
[0099] d′ i =(a i , f i , t i , t s ),
[0100] Among them, d′ i represents the i-th data after formatting, a i , f i , t i are the amplitude, frequency, and duration respectively, and t s represents the timestamp for recording this data,
[0101] Finally, transmit the data stream after cleaning through Kafka Streams;
[0102] Specifically, in step S1, combining the high efficiency and flexibility of distributed processing, extract the changed data stream through the CDC technology, effectively reducing duplicate processing operations; use Kafka Streams to perform real-time cleaning and formatting on the data stream, standardize the data into a unified structure form, and eliminate data points with amplitudes lower than the threshold and frequencies outside the range.
[0103] Step S2, based on the electromyogram response data processed in step S1, use the incremental calculation algorithm to perform update calculations on the electromyogram response data; the update calculation content includes: real-time update of the average value and standard deviation of the detection baseline, and generation of the abnormal deviation value for each substance;
[0104] The steps for using the incremental calculation algorithm to perform update calculations on the electromyogram response data are,
[0105] Initialize the average value and standard deviation of the baseline, and set the initial values of the average value and standard deviation of the baseline to μ 0 and σ 0 respectively, and the initialization formula is:
[0106]
[0107] Among them, μ 0 represents the initial average value of the baseline, and σ0 represents the initial baseline standard deviation, k is the number of data points used for initial calculation, a i is the amplitude of the i-th data, where 1 ≤ i ≤ k,
[0108] For each new data point a p Define the baseline dynamic update rule. The update formulas for the baseline mean and standard deviation are:
[0109]
[0110] where, μ p and σ p represent the baseline mean and standard deviation respectively when the total number of data points is p, a p is the amplitude of the current data point, p represents the total number of data points, starting from the initial k + 1 and increasing;
[0111] The steps of using the incremental calculation algorithm to update the electromyogram response data also include,
[0112] According to the current baseline mean and standard deviation, calculate the abnormal deviation value z of each data point i :
[0113]
[0114] where, z i represents the abnormal deviation value of the i-th data, a i represents the data amplitude, μ p and σ p are the current baseline mean and standard deviation respectively;
[0115] Determine whether the data is abnormal through the abnormal deviation value,
[0116] If |z i | ≤ α, it is determined to be normal. If |z i | > α, it is determined to be abnormal, where α is the threshold for abnormal determination;
[0117] Specifically, by dynamically updating the baseline mean and standard deviation of the electromyogram response data through the incremental calculation algorithm, it can not only efficiently process real-time data, but also quickly detect abnormal data points with large deviations from the baseline, avoiding the high overhead of traditional full-scale recalculation and being able to adapt 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 sorting rules are:
[0119] Data with a deviation exceeding 3 times the standard deviation is marked as high priority, sorted in descending order of the abnormal amplitude, and directly passed to step S4 for processing; data with a deviation within 3 times the standard deviation is marked as low priority and processed in batch mode according to the detection order;
[0120] The steps for grouping and prioritizing the abnormal deviation values generated in step S2 are as follows:
[0121] Based on the abnormal deviation value z i generated in step S2, group and prioritize the data. The grouping and sorting methods are as follows:
[0122] Define the high-priority grouping rule:
[0123] G high ={z i ||z i |>β},
[0124] where G high represents the high-priority data group, z i represents the abnormal deviation value of the i-th data, and β is the threshold for high-priority determination.
[0125] Define the low-priority grouping rule:
[0126] G low ={z i ||z i |≤β},
[0127] where G low represents the low-priority data group;
[0128] Sort the high-priority data. The sorting formula is:
[0129]
[0130] where represents the high-priority data sorted in descending order of the absolute value of the deviation. Sort is the sorting operation, and descending = True indicates descending sorting.
[0131] Group the low-priority data by batch. The grouping formula is:
[0132]
[0133] where B low represents the batch result of the low-priority data, is the j-th batch of low-priority data, and q represents the number of batches of low-priority data;
[0134] Specifically, grouping and sorting are performed based on the abnormal deviation values. High-deviation data is preferentially processed, while low-deviation data is processed in batches, improving the response speed and processing efficiency of anomaly detection.
[0135] Step S4: Visualize the detection data according to the grouping result of step S3;
[0136] In step S4, high-priority data generates an exclusive heat map through an independent visualization process, highlighting the abnormal intensity distribution, and the trend graph is updated in real time to present the change in the time dimension.
[0137] Low-priority data is integrated into a grouped heat map to show the overall distribution characteristics;
[0138] The independent visualization process is as follows:
[0139] Define the heat map, and the defined formula is:
[0140]
[0141] Among them, H high (x, y) represents the heat map value of high-priority data, x i , y i represents the spatial coordinates related to the abnormal deviation value z i , and σ is the Gaussian kernel width parameter. The initial value is determined by the empirical method and then adjusted according to the heat map effect.
[0142] Define the real-time trend graph, and the defined formula is:
[0143]
[0144] Among them, T high (t) represents the mapping between time t k and the deviation value z k , reflecting the time dynamic change of high-priority data, and t k is the kth time point;
[0145] The steps for integrating low-priority data into a grouped heat map to show the overall distribution characteristics are as follows:
[0146] Define the grouped heat map, and the defined formula is:
[0147]
[0148] Among them, H low (x, y) represents the grouped heat map value of low-priority data, and q is the number of grouping batches.
[0149] Define the statistical distribution graph, and use a histogram to show the distribution of data deviation values in G low , and the histogram display formula is:
[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 heatmaps and trend charts to highlight the spatial and temporal distribution characteristics of abnormal deviations; at the same time, the overall characteristics of low-priority data are presented through grouped heatmaps and statistical distribution charts, more intuitively showing the intensity of data anomalies and global characteristics.
[0153] Step S5, after completing the visualization process, integrate all detection results to generate a report in PDF or HTML format;
[0154] The report content includes: the detection value of the abnormal substance and its deviation from the average value, the individual analysis and visualization results of high-priority data, the overall grouped analysis and visualization charts of low-priority data, and personalized conditioning suggestions for abnormal results;
[0155] The steps to integrate all detection results to generate a report in PDF or HTML format are as follows:
[0156] Integrate a report based on the detection data and visualization results. The integration formula is:
[0157] R = {R high , R low},
[0158] where R high includes the abnormal deviation value of high-priority data, the high-priority heatmap H high and the trend chart T high , R low includes the grouped heatmap H low of low-priority data and the statistical distribution chart P(z);
[0159] Use a report generation tool to generate the final report;
[0160] Specifically, compared with traditional output solutions, the present invention can automatically integrate detection results, generate high-quality reports in PDF or HTML format, 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 not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A database detection operation method for a biofeedback device, characterized in that: include, Step S1, using an electromyographic biofeedback device to record and collect electromyographic response data, and combining 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 content includes: real-time updating of the mean value and standard deviation of the detection baseline, and generating an abnormal deviation value for each substance; Step S3, grouping and prioritizing the abnormal deviation values generated in step S2, and the grouping and prioritization rules are as follows: Data with deviations exceeding 3 times the standard deviation are marked as high priority and are directly passed to step S4 for processing after being sorted from large to small according to the abnormal amplitude; 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 completing the visualization processing, integrate all the detection results to generate a report in PDF or HTML format.
2. The database detection operation method of a biofeedback device according to claim 1, characterized in that: The steps of cleaning and formatting the reaction data by combining the change data capture CDC technology and the Kafka Streams stream processing framework are: Define the original electromyographic 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 represents the 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 changing the jth data in the 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 is satisfied; 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 ith 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. Set the initial values of the baseline mean and standard deviation to μ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, and the baseline mean and standard deviation update formulas are: 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 operation method of a biofeedback device according to claim 3, characterized in that: The step of updating the electromyographic response data using the incremental calculation algorithm 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. i |>α, it is judged as abnormal, where α is the threshold for abnormal judgment.
5. The database detection calculation method of the biofeedback device according to claim 4, characterized in that: The step of grouping and prioritizing the abnormal deviation values generated in step S2 is: Based on the abnormal deviation value z generated in step S2 i , group and prioritize the data, the grouping and sorting methods are: Define high priority grouping rules: G high ={z i ||from 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, the sorting formula is: in, It indicates the high priority data sorted from large to small by the absolute value of deviation. Sort is the sorting operation, descending = True indicates descending sorting. The low priority data is grouped into batches, and the grouping formula is: 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.
6. The database detection calculation method of the biofeedback device according to claim 5, characterized in that: In step S4, high-priority data generates a dedicated heat map through an independent visualization process, 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 grouped heat maps to show overall distribution characteristics.
7. The database detection calculation method of the biofeedback device according to claim 6, 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 The 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 define the formula as follows: Among them, T high (t) represents time t k With deviation value z k The mapping reflects the time dynamic changes of high priority data, t k is the kth time point.
8. The database detection calculation method of the biofeedback device according to claim 7, 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 in the following formula: 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.
9. The database detection calculation method of the biofeedback device according to claim 8, 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 grouping analysis and visualization charts of low-priority data, and personalized conditioning suggestions for abnormal results.
10. The database detection calculation method of the biofeedback device according to claim 9, characterized in that: The steps of integrating all test results to generate a report in PDF or HTML format are: The report is formed by integrating the test data and the 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 graph T high , R low Group heatmap including low priority data H low and the statistical distribution graph P(z); Generate a final report using the report generation tool.
Citation Information
Patent Citations
Identification method and device for interference data of electrocatdiogram database
CN106108850A
Patient chest-and-belly tumor breathing movement predicting and tracking method
CN109727672A
Monitoring device, method for setting reference baseline and readable storage medium
CN113613548A
Database detection operation method for biofeedback equipment
CN117438072A
Drainage pipe network GIS data quality control method and system based on dynamic knowledge base
CN117609218A
Cited By
Intelligent self-adaptive acupuncture electrical stimulation system and method
CN120827478A