Headache patient diet management intelligent recommendation system
Through the intelligent dietary management recommendation system for headache patients, data mining technology is used to identify the food combination pattern of headache-induced food, and personalized taboo diet suggestions are provided, which solves the problem of inaccurate management caused by subjective evaluation in the existing technology, and improves the effect of headache prevention.
Patent Information
- Application Number
- CN202510732583.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The existing dietary management methods for headache patients rely on subjective assessment and lack personalized and accurate recommendations, resulting in low management accuracy and unstable results.
An intelligent dietary management recommendation system for headache patients was designed. The data acquisition module collected diet records of the preset duration before headache. The frequent combination analysis module was used to identify frequent and non-frequency food combinations. The continuous frequent statistical module analyzed the time distribution characteristics of the food combination. The non-frequency sequence analysis module identified potential inducing factors and generated a list of taboo diet recommendations.
It has realized personalized taboo diet recommendations, improved the effectiveness and accuracy of diet management for headache patients, and effectively prevented headache attacks.
Smart Images

Figure CN120260832A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical informatics, and particularly to an intelligent recommendation system for diet management of headache patients. Background Art
[0002] Currently, the clinical treatment of headache mainly relies on drug control. However, as one of the important inducing factors of headache, diet factors have attracted more and more attention in the medical field. Existing studies have shown that certain foods or food combinations may induce headache attacks, such as alcohol, caffeine, cheese, chocolate, etc. The existing diet management methods for headache patients usually rely on the subjective experience evaluation of doctors or dietitians. Such diet recommendations do not take into account the differences in food sensitivity among different patients, resulting in low accuracy and unstable effects of diet management. Summary of the Invention
[0003] Aiming at the technical problems in the prior art that the diet management of headache patients relies on subjective evaluation and lacks personalized and accurate recommendations, the present invention provides an intelligent recommendation system for diet management of headache patients to solve these problems.
[0004] The technical solution of the present invention for solving the above technical problems is as follows: The present invention provides an intelligent recommendation system for diet management of headache patients, including: a data acquisition module, configured to obtain a plurality of diet records of a target patient's same-cluster samples within a preset time period before headache; a frequent combination analysis module, configured to perform k-item frequent food combination statistics on the plurality of diet records within the preset time period before headache to obtain a plurality of k-item frequent food combinations and a plurality of infrequent food combinations, where k is an integer, N≥k≥1, and N represents the number of food types; a continuous frequent statistics module, configured to traverse the plurality of k-item frequent food combinations based on the plurality of diet records within the preset time period before headache to perform frequent sequence statistics to obtain continuous frequent food combinations and discrete frequent food combinations; an infrequent sequence analysis module, configured to traverse the plurality of infrequent food combinations based on the plurality of diet records within the preset time period before headache to perform frequent sequence statistics to obtain continuous infrequent food combinations; and a taboo diet recommendation module, configured to add the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations to a taboo diet recommendation list and send it to a diet management terminal.
[0005] Optionally, the frequent combination analysis module is further configured to: Step 1: Count the set of food types in the diet records within a preset duration before headache, and denote the total number of food types as N; Step 2: Enumerate k-item combinations based on the set of food types to obtain a k-item food combination set, with the initial value of k equal to 1; Step 3: Traverse the k-item food combination set, and count the trigger frequency proportion in the diet records within a preset duration before headache to obtain a k-item food combination frequency proportion set; Step 4: Based on the k-item food combination frequency proportion set, select k-item food combinations with a k-item food combination frequency proportion greater than or equal to the first frequency proportion threshold from the k-item food combination set, and add them to the multiple k-item frequent food combinations. Select k-item food combinations with a k-item food combination frequency proportion less than the first frequency proportion threshold and add them to the multiple infrequent food combinations; Step 5: When k ≤ N, update the value of k with k + 1 and return to Step 2 to execute the loop. When k = N, output the multiple k-item frequent food combinations and the multiple infrequent food combinations.
[0006] Optionally, the frequent combination analysis module is further configured to: Extract the first set of food types from the diet records within a preset duration before headache; Traverse the first set of food types and count the trigger frequency proportion set in the diet records within a preset duration before headache; Based on the trigger frequency proportion set, select a second set of food types with a trigger frequency proportion greater than or equal to the first frequency proportion threshold from the first set of food types, and set it as the set of food types.
[0007] Optionally, the frequent combination analysis module is further configured to: Based on the trigger frequency proportion set, select a third set of food types with a trigger frequency proportion less than the first frequency proportion threshold from the first set of food types, and add them to the multiple infrequent food combinations.
[0008] Optionally, the continuous frequent statistics module is further configured to: Extract the first k-item frequent food combinations from the multiple k-item frequent food combinations; Traverse the diet records within a preset duration before headache and extract the food type trigger sequence set of the first k-item frequent food combinations; Perform outlier analysis on the food type trigger sequence set to obtain the mean of the sequence set outlier factor; When the mean of the sequence set outlier factor is greater than or equal to the outlier factor threshold, add the first k-item frequent food combinations to the discrete frequent food combinations; Otherwise, add the first k-item frequent food combinations to the continuous frequent food combinations.
[0009] Optionally, the continuous frequent statistics module is further configured to: Perform pairwise same-sequence-number same-kind food proportion statistics on the food type trigger sequence set, and set it as the trigger sequence similarity set; Perform LOF outlier factor analysis based on the trigger sequence similarity set to obtain the mean of the sequence set outlier factor.
[0010] Optionally, the data acquisition module is further configured to: obtain a medical record portrait of a target patient, where the medical record portrait of the target patient includes a reference type label and a reference quantization label; obtain a medical record portrait of a sample headache patient, where the medical record portrait of the sample headache patient includes a sample type label and a sample quantization label; count the proportion of the same types of the sample type label and the reference type label to obtain a first same-cluster probability; count the ratio of the Euclidean distance between the sample quantization label and the reference quantization label to the Euclidean distance threshold to obtain a second same-cluster probability; when both the first same-cluster probability and the second same-cluster probability are greater than or equal to the same-cluster probability threshold, add the sample headache patient to the same-cluster samples of the target patient.
[0011] Optionally, the taboo diet recommendation module is further configured to: traverse the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations, count the trigger frequencies in the diet log of the target patient, and add them to the food combination warning factor set; sort the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations according to the food combination warning factor set, and send them to the diet management terminal.
[0012] The beneficial effects of the present invention are: The data acquisition module obtains several pre - headache - preset - duration dietary records of the target patient's same - cluster samples, thereby collecting the dietary data of headache patients with similar characteristics, providing basic data support for subsequent analysis, and ensuring the pertinence and accuracy of recommendations. The frequent combination analysis module performs k - item frequent food combination statistics on several pre - headache - preset - duration dietary records, obtains multiple k - item frequent food combinations and multiple infrequent food combinations, and identifies food combination patterns that may be related to headache attacks, including both frequently - occurring food combinations and infrequently - occurring food combinations, providing multi - dimensional data support for comprehensively analyzing the relevance between food and headache. The continuous frequent statistics module traverses the multiple k - item frequent food combinations based on several pre - headache - preset - duration dietary records to perform frequent sequence statistics, obtains continuous frequent food combinations and discrete frequent food combinations, thereby further analyzing the impact of food intake timing on headache attacks, distinguishing food combinations that continuously appear in time and food combinations that do not appear continuously in time but frequently appear, and thus improving the accuracy of identifying inducing factors. The infrequent sequence analysis module traverses the multiple infrequent food combinations based on several pre - headache - preset - duration dietary records to perform frequent sequence statistics, obtains continuous infrequent food combinations, thereby identifying food combinations that are overall infrequently - occurring but may induce headache under specific timing patterns, making up for potential inducing factors that may be overlooked by only analyzing frequent combinations. The taboo diet recommendation module adds continuous frequent food combinations, discrete frequent food combinations, and continuous infrequent food combinations to the taboo diet recommendation list and sends it to the diet management terminal, converts the analysis results into specific diet taboo suggestions, and directly transmits them to patients or medical staff, realizing the intelligence and personalization of diet management, and thus effectively preventing headache attacks.
[0013] Through the above - mentioned technical solution, this application overcomes the limitations of traditional diet management relying on subjective evaluation, uses data mining technology to automatically identify individualized headache - inducing food combination patterns, provides accurate taboo diet recommendations, realizes personalized taboo diet recommendations, and significantly improves the effectiveness of diet management for headache patients. Brief Description of the Drawings
[0014] Figure 1 It is a schematic structural diagram of an intelligent recommendation system for diet management of headache patients provided by the present invention; Figure 2 It is a schematic flowchart of the k - item frequent food combination statistics performed by the frequent combination analysis module provided by the present invention.
[0015] In the drawings, the components represented by each reference numeral are as follows: Data acquisition module 11, frequent combination analysis module 12, continuous frequent statistics module 13, infrequent sequence analysis module 14, taboo diet recommendation module 15. Detailed Embodiments
[0016] This application provides an intelligent recommendation system for diet management of headache patients, aiming to solve the technical problems in the prior art that the diet management of headache patients relies on subjective evaluation and lacks personalized and accurate recommendations.
[0017] Example: As Figure 1 shown, this application provides an intelligent recommendation system for diet management of headache patients, and the system includes: A data acquisition module 11, configured to obtain a number of pre-headache preset-duration diet records of the same-cluster samples of the target patient.
[0018] Specifically, the data acquisition module 11 is used to retrieve the diet record data of the patient group similar to the target patient (i.e., the same-cluster samples) from the system database, especially the diet situation within a specific time period before the headache attack. The data acquisition module 11 provides basic data support for subsequent diet pattern analysis through a data collection mechanism.
[0019] First, the data acquisition module 11 extracts a set of patient samples with similar medical record characteristics to the target patient from the system database to form the same-cluster samples of the target patient, and for these same-cluster samples of the target patient, detailed diet records within a preset duration before the headache attack (for example, it can be 24 hours, 48 hours or other clinically significant time windows) are collected. These diet records contain key information such as food types, eating times, and consumption amounts, forming a number of structured pre-headache preset-duration diet records.
[0020] By focusing on the data of the patient group with similar conditions to the target patient, the relevance and applicability of the analysis results are improved, the problem of subjective experience evaluation commonly existing in traditional diet management methods is overcome, and accurate diet management recommendations are realized.
[0021] A frequent combination analysis module 12, configured to perform k-item frequent food combination statistics on the number of pre-headache preset-duration diet records to obtain a number of k-item frequent food combinations and a number of infrequent food combinations, where k is an integer, N≥k≥1, and N represents the number of food types.
[0022] Specifically, the frequent combination analysis module 12 is used to perform statistical analysis on the number of pre-headache preset-duration diet records obtained by the data acquisition module 11 to identify food combination patterns that may be related to the headache attack.
[0023] First, the frequent combination analysis module 12 identifies and counts all food types that appear in several pre-headache diet records with a preset duration, and determines the total number of food types N. Then, starting from k = 1, the frequent combination analysis module 12 gradually increases the value of k until N, and enumerates and counts all possible k-item food combinations. For each value of k, the frequent combination analysis module 12 calculates the trigger frequency ratio of each k-item food combination in the pre-headache diet records, and classifies these combinations into two categories: frequent food combinations and infrequent food combinations. Through this progressive combination analysis, the frequent combination analysis module 12 can comprehensively identify various possible diet patterns that trigger headaches, from single foods to multi-food combinations, providing basic data support for subsequent continuous frequent statistics and infrequent sequence analysis.
[0024] The k-item combination statistical method adopted by the frequent combination analysis module 12 overcomes the limitation of only focusing on the impact of single foods in traditional diet analysis, and can effectively identify the potential impact of the synergistic effect between foods on headache attacks, improving the accuracy and personalization level of diet management recommendations.
[0025] The continuous frequent statistics module 13 is used to perform frequent sequence statistics by traversing the multiple k-item frequent food combinations based on the several pre-headache diet records with a preset duration, and obtain continuous frequent food combinations and discrete frequent food combinations.
[0026] Specifically, the continuous frequent statistics module 13 is used to deeply analyze the distribution characteristics of the k-item frequent food combinations identified by the frequent combination analysis module 12 in the time dimension, and further distinguish the timing characteristics of these food combinations. The continuous frequent statistics module 13 uses sequence analysis methods to determine whether the food combinations are associated with headache attacks in a continuous or discrete manner.
[0027] First, the continuous frequent statistics module 13 sequentially processes multiple k-item frequent food combinations output by the frequent combination analysis module 12. For each k-item frequent food combination, the continuous frequent statistics module 13 extracts the intake time series of each food type in the combination from several diet records within a preset duration before headache, forming a food type trigger sequence set. Then, the continuous frequent statistics module 13 performs outlier analysis on these sequence sets and calculates the mean outlier factor of the sequence sets to determine the degree of aggregation of food types in the time dimension. When the mean outlier factor of the sequence set is greater than or equal to the preset outlier factor threshold, it indicates that the food types in the k-item frequent food combination are relatively dispersed in time, and this k-item frequent food combination is classified as a discrete frequent food combination. Conversely, when the mean outlier factor of the sequence set is less than the outlier factor threshold, it indicates that the food types in this food combination are relatively concentrated in time, and this k-item frequent food combination is classified as a continuous frequent food combination. Among them, the outlier factor threshold is a critical value for judging the outlier degree of the sequence set and is determined based on clinical data and statistical analysis.
[0028] Through the time series-based analysis method, the continuous frequent statistics module 13 can distinguish different types of headache-inducing food combination patterns, identify different influence mechanisms of food combinations on headache under different time distribution patterns, improve the scientificity and effectiveness of diet taboo recommendations, and provide a basis for formulating more accurate diet management strategies.
[0029] The infrequent sequence analysis module 14 is used to perform frequent sequence statistics on the multiple infrequent food combinations by traversing the multiple infrequent food combinations based on the several diet records within a preset duration before headache, to obtain continuous infrequent food combinations.
[0030] Specifically, the infrequent sequence analysis module 14 is used to analyze the time series characteristics of the infrequent food combinations identified by the frequent combination analysis module 12. Although these food combinations are not classified as frequent combinations in the overall analysis, they may still be correlated with headache attacks under specific time series patterns.
[0031] First, the infrequent sequence analysis module 14 sequentially processes the multiple infrequent food combinations output by the frequent combination analysis module 12. For each infrequent food combination, the infrequent sequence analysis module 14 extracts the intake time series of each food type in the infrequent food combination from several diet records within a preset duration before headache and performs frequent sequence statistical analysis. By analyzing the distribution characteristics of these food types in the time dimension, the infrequent sequence analysis module 14 can identify food combinations that, although having a low overall occurrence frequency, appear concentrated within a continuous time period and are related to headache attacks, that is, continuous infrequent food combinations.
[0032] The infrequent sequence analysis module 14 extends the scope of frequent pattern mining. It not only focuses on frequently occurring food combinations but also can identify food combinations that, although not high in overall frequency, may induce headaches under specific time patterns, thereby capturing more potential headache triggers and providing more comprehensive and personalized dietary taboo suggestions for patients, effectively improving the accuracy of headache prevention and management.
[0033] The taboo diet recommendation module 15 is used to add the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations to the taboo diet recommendation list and send it to the diet management terminal.
[0034] Specifically, the taboo diet recommendation module 15 is used to integrate the output results of the foregoing modules to generate personalized dietary taboo suggestions for the target patient.
[0035] First, the taboo diet recommendation module 15 summarizes the continuous frequent food combinations and discrete frequent food combinations identified by the continuous frequent statistics module 13, and the continuous infrequent food combinations identified by the infrequent sequence analysis module 14 to obtain food combination information of various types that may induce headaches, and adds it to the taboo diet recommendation list. Then, the taboo diet recommendation module 15 sends this taboo diet recommendation list to the diet management terminal for medical staff or the patient himself / herself to consult and use. Among them, the diet management terminal can be the patient management system of the hospital, a mobile health application, or other terminal devices that can display and process diet recommendation information.
[0036] The taboo diet recommendation module 15 realizes the transformation from data analysis to practical suggestions, converting the complex food combination analysis results into intuitive and operable diet management guidance. By including different types of potential headache-inducing food combinations in the taboo diet recommendation list, it can provide a comprehensive and personalized diet management plan for headache patients, effectively helping patients reduce the frequency of headache attacks caused by diet factors and improving the quality of life.
[0037] Furthermore, as Figure 2 shown, the execution steps of the frequent combination analysis module 12 include: Step 1: Count the set of food types in the diet records within the preset duration before headache, and record that the total number of food types is equal to N; Step 2: Enumerate k-item combinations based on the set of food types to obtain a k-item food combination set, and the initial value of k is equal to 1; Step 3: Traverse the k-item food combination set, count the trigger frequency ratio in the diet records within the preset duration before headache for each combination, and obtain a k-item food combination frequency ratio set; Step 4: Based on the set of k-item food combination frequency proportions, from the set of k-item food combinations, screen out the k-item food combinations whose k-item food combination frequency proportion is greater than or equal to the first frequency proportion threshold, and add them to the multiple k-item frequent food combinations. Screen out the k-item food combinations whose k-item food combination frequency proportion is less than the first frequency proportion threshold, and add them to the multiple infrequent food combinations; Step 5: When k ≤ N, update the value of k using k + 1, and return to Step 2 to execute the loop. When k = N, output the multiple k-item frequent food combinations and the multiple infrequent food combinations.
[0038] In a feasible implementation manner, the execution steps of the frequent combination analysis module 12 include Step 1, Step 2, Step 3, Step 4, and Step 5 to implement the function of counting k-item frequent food combinations.
[0039] When the frequent combination analysis module 12 receives several pre-headache preset-duration diet records obtained by the data acquisition module 11, first, the frequent combination analysis module 12 enters Step 1 to identify and count the food types in the several pre-headache preset-duration diet records, extract all different food types that appear in these diet records, form a complete set of food types, and calculate the total number N of food types in this set of food types, laying a foundation for subsequent combination analysis and determining the scope and upper limit of the combination analysis. Then, the frequent combination analysis module 12 enters Step 2 to enumerate k-item combinations for the set of food types determined in Step 1. Initially, the value of k is set to 1, indicating the analysis of a single food type. The frequent combination analysis module 12 generates all possible k-item food combinations to form a set of k-item food combinations. These combinations represent various food collocation ways that may be related to headache attacks.
[0040] Next, the frequent combination analysis module 12 enters step three, traverses each k-item food combination in the k-item food combination set generated in step two, and calculates the frequency of occurrence of each k-item food combination in several dietary records within a preset duration before headache. Specifically, the frequent combination analysis module 12 counts the number of times each k-item food combination appears in these dietary records and divides it by the total number of dietary records to obtain the proportion of the trigger frequency of this frequent combination analysis module 12, thereby obtaining the k-item food combination frequency. The proportion of the trigger frequency (i.e., the k-item food combination frequency) of all k-item food combinations constitutes the k-item food combination frequency proportion set. After that, the frequent combination analysis module 12 enters step four, and based on the k-item food combination frequency proportion set obtained in step three, classifies the k-item food combinations in the k-item food combination set according to a preset first frequency proportion threshold. For k-item food combinations with a k-item food combination frequency greater than or equal to this first frequency proportion threshold, they are classified as frequent food combinations, indicating that these combinations frequently appear in the dietary records before headache attacks and have a strong correlation with the induction of headache. For k-item food combinations with a k-item food combination frequency less than this first frequency proportion threshold, they are classified as infrequent food combinations. Although these combinations have a low frequency of occurrence, they may still be identified as potential headache inducing factors in subsequent sequence analysis. Among them, the first frequency proportion threshold is a critical value parameter used to distinguish between frequent food combinations and infrequent food combinations, which is set based on a large amount of clinical data analysis and is expressed as a decimal value between 0 and 1.
[0041] Subsequently, the frequent combination analysis module 12 continues with incremental combination analysis. When the food combination analysis corresponding to the current k value is completed, the k value is increased by 1, and it returns to step two to analyze higher-order food combinations. This loop process continues until the k value reaches the total number N of food types. When k = N, a comprehensive analysis from single foods to N-item food combinations is completed, and multiple k-item frequent food combinations and multiple infrequent food combinations are output as the final results.
[0042] Through progressive analysis, the frequent combination analysis module 12 can comprehensively identify various food combination patterns related to headache from simple to complex, providing a detailed data basis for subsequent continuous frequent statistics and infrequent sequence analysis.
[0043] Furthermore, the execution steps of the frequent combination analysis module 12 further include: Extracting the first food type set of the several dietary records within a preset duration before headache; Traversing the first food type set and counting the proportion set of the trigger frequency of the several dietary records within a preset duration before headache; Based on the set of trigger frequency ratios, a second set of food types with a trigger frequency ratio greater than or equal to the first frequency ratio threshold is screened from the first set of food types and set as the set of food types.
[0044] In a preferred embodiment, first, the frequent combination analysis module 12 extracts all the food types that have appeared from several pre-headache preset-duration diet records provided by the data acquisition module 11 to form an initial first set of food types. This first set of food types includes all the food types that may be related to headaches, but may include some food types with extremely low occurrence frequencies and insignificant correlations with headaches, which is the raw data basis for subsequent analysis. Then, the frequent combination analysis module 12 traverses each food type in the first set of food types and calculates its occurrence frequency in several pre-headache preset-duration diet records. Specifically, the number of times each food type appears in these diet records is counted and divided by the total number of diet records to obtain the trigger frequency ratio of this food type. The trigger frequency ratios of all food types constitute the set of trigger frequency ratios.
[0045] Subsequently, the first set of food types is screened and optimized using the first frequency ratio threshold. The food types with a trigger frequency ratio reaching or exceeding the first frequency ratio threshold are screened out to form a second set of food types, and this set is set as the set of food types for subsequent k-item combination analysis. This optimization process eliminates those food types with low occurrence frequencies and insignificant possible correlations with headaches, making the subsequent combination analysis more focused on potential headache inducing factors, and improving the analysis efficiency and the accuracy of the results. Among them, the first frequency ratio threshold refers to the critical value used to screen a single food type, indicating the minimum occurrence frequency ratio that a food type needs to reach to be considered a food type that may be related to headaches and thus included in subsequent analysis. The first frequency ratio threshold for judging whether a k-item food combination is a frequent combination can be set to the same value as the first frequency ratio threshold in the system implementation, or can be set to different values according to specific application requirements to optimize the screening effect.
[0046] Through the above optimization process, the frequent combination analysis module 12 can screen the initial set of food types before performing k-item combination analysis, reduce the complexity of the analysis, and improve the recognition accuracy of potential headache-inducing foods, thereby achieving efficient and accurate diet management recommendations.
[0047] Furthermore, the execution steps of the frequent combination analysis module 12 further include: Based on the set of trigger frequency ratios, a third set of food types with a trigger frequency ratio less than the first frequency ratio threshold is screened from the first set of food types and added to the multiple non-frequent food combinations.
[0048] In a feasible implementation manner, while the frequent combination analysis module 12 finishes screening the first food type set to obtain the second food type set, it will also process those food types that are not included in the second food type set. Food types with a trigger frequency ratio less than the first frequency ratio threshold are screened out from the first food type set to form a third food type set. Although the occurrence frequency of these food types is low, they may be associated with headache attacks under specific circumstances.
[0049] Each food type in the third food type set is regarded as a non-frequent food combination with a single item (k = 1) and is directly added to multiple non-frequent food combinations. These single-item non-frequent food combinations will be further analyzed in the subsequent non-frequent sequence analysis module 14 to identify the characteristics of these single-item non-frequent food combinations in the time series and determine whether there are consecutive non-frequent food combinations.
[0050] Through this processing method, not only the food types with high occurrence frequency are concerned, but also the headache-inducing effects that the low-frequency food types may have are not ignored, especially when these low-frequency food types appear in a specific time pattern. This comprehensive analysis strategy ensures that various possible headache triggers can be captured, regardless of their occurrence frequency, so as to provide more comprehensive and personalized diet taboo suggestions.
[0051] Furthermore, the execution steps of the continuous frequent statistics module 13 further include: Extracting the first k-item frequent food combinations from the multiple k-item frequent food combinations; Traversing the several diet records within the preset duration before headache, and extracting the food type trigger sequence set of the first k-item frequent food combinations; Performing outlier analysis on the food type trigger sequence set to obtain the mean value of the sequence set outlier factor; When the mean value of the sequence set outlier factor is greater than or equal to the outlier factor threshold, adding the first k-item frequent food combinations to the discrete frequent food combinations; Otherwise, adding the first k-item frequent food combinations to the continuous frequent food combinations.
[0052] In a feasible implementation, first, the continuous frequent statistics module 13 sequentially extracts a k-item frequent food combination from the multiple k-item frequent food combinations output by the frequent combination analysis module 12, denoted as the first k-item frequent food combination, for time series feature analysis. The continuous frequent statistics module 13 will execute the same analysis process for each k-item frequent food combination to judge its time distribution characteristics. Then, the continuous frequent statistics module 13 traverses and analyzes several diet records with a preset duration before headache. For the currently processed first k-item frequent food combination, it extracts the trigger time points of each food type in each diet record to form a food type trigger sequence set. The sequences in the food type trigger sequence set record the time distribution of each food type in the first k-item frequent food combination and are the basic data for judging the time characteristics of this combination.
[0053] Subsequently, outlier analysis is performed on the food type trigger sequence set obtained in the previous step to calculate the degree of dispersion between the sequences in the food type trigger sequence set. Through outlier analysis, the mean outlier factor of the sequence set, which can characterize the overall dispersion degree of the sequence set, is calculated. The larger this value is, the more dispersed the distribution of food types in time; conversely, the smaller the mean outlier factor of the sequence set, the more concentrated the distribution of food types in time. Then, the calculated mean outlier factor of the sequence set is compared with a preset outlier factor threshold. If the mean outlier factor of the sequence set is greater than or equal to the outlier factor threshold, it indicates that the food types in this first k-item frequent food combination are relatively dispersed in the time dimension, and this first k-item frequent food combination is classified as a discrete frequent food combination. Although such combinations occur frequently, the food types in them are usually not ingested within consecutive time periods. Among them, the outlier factor threshold refers to the critical value used to distinguish continuous frequent food combinations and discrete frequent food combinations, and this value is determined by the expert group based on a large amount of clinical data statistical analysis. If the mean outlier factor of the sequence set is less than the outlier factor threshold, it indicates that the food types in this first k-item frequent food combination are relatively concentrated in the time dimension, and this first k-item frequent food combination is classified as a continuous frequent food combination. The characteristic of such combinations is that the food types in them are usually continuously ingested within a relatively concentrated time period, and this diet pattern may be more directly related to the headache triggering mechanism.
[0054] Through the above time series analysis, the continuous frequent statistics module 13 can further subdivide the types of frequent food combinations, identify food combinations with different time distribution characteristics, and provide a basis for formulating more accurate diet management strategies.
[0055] Furthermore, the execution steps of the continuous frequent statistics module 13 further include: Statistically calculate the proportion of the same serial number and the same type of food in pairs for the food type trigger sequence set, which is set as the trigger sequence similarity set; Perform LOF outlier factor analysis based on the trigger sequence similarity set to obtain the mean outlier factor of the sequence set.
[0056] In a preferred embodiment, when the continuous frequent statistics module 13 performs outlier analysis on the food type trigger sequence set to obtain the mean outlier factor of the sequence set, first, the continuous frequent statistics module 13 converts each diet record within a preset duration before headache into a time series, which records the occurrence time points of each food type in the first k frequent food combinations. Assuming there are m diet records, m time series are formed. Align these time series along the time axis and discretize the time axis into several time windows (such as one window per hour or every 30 minutes), and each window corresponds to a serial number position. For any two sequences A and B, calculate the number of positions where the same food types appear simultaneously in both sequences at all serial number positions, and divide it by the total number of serial number positions to obtain the similarity value between sequences A and B. Repeat this calculation for all possible sequence pairs (A, B) to obtain multiple similarity values, forming the trigger sequence similarity set.
[0057] Subsequently, the continuous frequent statistics module 13 analyzes the trigger sequence similarity set using the Local Outlier Factor (LOF) algorithm. First, construct the k-nearest neighbors of each sequence based on the similarity values (where k is usually rounded up to 10% of the number of sequences), and then calculate the local reachability density of each sequence. For each sequence, its LOF value is defined as the ratio of the average local reachability density of its k-nearest neighbors to the local reachability density of the sequence itself. Then, calculate the arithmetic mean of the LOF values of all sequences to obtain the mean outlier factor of the sequence set, which is used to evaluate the dispersion degree of the entire food type trigger sequence set.
[0058] Through the analysis based on sequence similarity and the LOF algorithm, it provides technical support for the continuous frequent statistics module 13 to accurately quantify the food time distribution pattern, and can reasonably distinguish continuous frequent food combinations and discrete frequent food combinations according to the distribution characteristics in the time dimension.
[0059] Furthermore, the execution steps of the data acquisition module 11 include: Obtain the medical record portrait of the target patient, where the medical record portrait of the target patient includes a benchmark type label and a benchmark quantization label; Obtain the medical record portrait of the sample headache patients, where the medical record portrait of the sample headache patients includes a sample type label and a sample quantization label; Count the proportion of the same types of the sample type label and the benchmark type label to obtain the first clustering probability; Calculate the ratio of the Euclidean distance between the sample quantization label and the reference quantization label to the Euclidean distance threshold to obtain the second same-cluster probability; When both the first same-cluster probability and the second same-cluster probability are greater than or equal to the same-cluster probability threshold, add the sample headache patients to the target patient same-cluster samples.
[0060] In a preferred embodiment, first, the data acquisition module 11 acquires the medical record data of the target patient (i.e., the patient who currently needs to be provided with dietary management recommendations), extracts key features therefrom, and constructs a medical record portrait of the target patient. This medical record portrait consists of two types of labels, namely, reference type labels and reference quantization labels. Among them, the reference type labels refer to the discrete classification information describing the headache characteristics of the target patient, including classification features such as headache type, accompanying symptoms, and inducing factors; the reference quantization labels refer to the continuous numerical information describing the headache characteristics of the target patient, including continuous numerical features such as headache intensity, duration, and attack frequency. These labels together constitute a multi-dimensional data structure describing the headache characteristics of the target patient. At the same time, the data acquisition module 11 extracts the medical record data of all sample headache patients from the system database, and constructs a medical record portrait for each sample patient in the same way as the target patient, obtaining the medical record portraits of sample headache patients. The medical record portraits of sample headache patients include sample type labels and sample quantization labels. The sample type labels are discrete classification information with the same structure as the reference type labels, including the headache type, accompanying symptoms, inducing factors, etc. of the sample patient; the sample quantization labels are continuous numerical information with the same structure as the reference quantization labels, including the headache intensity, duration, attack frequency, etc. of the sample patient. These medical record portraits of sample headache patients constitute the basic data pool, which is the comparison object for identifying same-cluster patients.
[0061] Subsequently, the data acquisition module 11 compares the sample type labels of each sample patient with the reference type labels of the target patient, calculates the proportion of the number of matching labels between the two in the total number of labels, and takes it as the first same-cluster probability. The first same-cluster probability reflects the similarity degree between the sample patient and the target patient in discrete features, and the higher the value, the more similar they are in terms of headache type, symptom characteristics, etc. At the same time, the data acquisition module 11 calculates the Euclidean distance between the sample quantization label of the sample patient and the reference quantization label of the target patient, and then takes the ratio of this distance to the preset Euclidean distance threshold as the basis for the second same-cluster probability. The specific calculation method is: second same-cluster probability = 1 - (Euclidean distance / Euclidean distance threshold) when the Euclidean distance is less than the Euclidean distance threshold. If the Euclidean distance is greater than or equal to the Euclidean distance threshold, the second same-cluster probability is 0. The second same-cluster probability reflects the similarity degree between the sample patient and the target patient in continuous features, and the higher the value, the more similar they are in terms of headache intensity, duration, etc.
[0062] After that, the data acquisition module 11 comprehensively considers the first same-cluster probability and the second same-cluster probability. Only when both probability values reach or exceed the preset same-cluster probability threshold, the sample headache patient is determined to belong to the same cluster as the target patient, that is, having significantly similar disease characteristics, and is added to the set of same-cluster samples of the target patient. This dual-probability threshold screening mechanism ensures that the patients in the same cluster are highly similar to the target patient in both the discrete feature dimension and the continuous feature dimension. Among them, the same-cluster probability threshold refers to the probability critical value for judging whether a sample patient belongs to the same cluster as the target patient, and is used to evaluate whether the first same-cluster probability and the second same-cluster probability reach the required similarity level. It is usually determined based on a large amount of clinical data and statistical analysis results to ensure that the selected same-cluster patients truly have similar headache characteristics and onset patterns as the target patient.
[0063] Through the multi-dimensional similarity analysis based on the medical record portrait, the data acquisition module 11 can identify the group of same-cluster patients with similar disease characteristics to the target patient, providing a highly relevant data basis for subsequent diet analysis, thereby improving the personalization and clinical relevance of diet taboo recommendations.
[0064] Furthermore, the execution steps of the taboo diet recommendation module 15 include: Traverse the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations, count the trigger frequencies in the diet log of the target patient, and add them to the food combination warning factor set; Sort the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations according to the food combination warning factor set, and send them to the diet management terminal.
[0065] In a feasible implementation manner, the taboo diet recommendation module 15 not only generates taboo food recommendations based on the data analysis results of same-cluster patients, but also makes personalized adjustments in combination with the eating habits of the target patient itself. First, obtain the historical diet log data of the target patient, and then traverse all the identified potential headache-inducing food combinations (including continuous frequent food combinations, discrete frequent food combinations, and continuous infrequent food combinations), and count the occurrence frequency (i.e., trigger frequency) of each food combination in the diet log of the target patient. These trigger frequencies are added to the food combination warning factor set as an important indicator for evaluating the impact degree of food combinations on the headache of the target patient. Then, the taboo diet recommendation module 15 sorts all the potential headache-inducing food combinations according to the trigger frequencies in the food combination warning factor set. The sorting principle is to rank the food combinations with higher occurrence frequencies in the diet log of the target patient in the front, because these food combinations are more likely to be the main inducements of the patient's headache. The sorted taboo diet recommendation list is sent to the diet management terminal through the system interface for medical staff or the patient himself / herself to refer to.
[0066] Through the warning factor adjustment and sorting mechanism based on the patient's personal eating habits, the taboo diet recommendation module 15 can provide more accurate and personalized diet taboo suggestions for the target patient. It not only considers the common data of patients with similar disease characteristics, but also combines the individual differences of the target patient, improving the pertinence and practicality of diet management recommendations. Compared with traditional general diet suggestions, the personalized sorting mechanism can help patients more effectively identify and avoid specific food combinations that may induce headaches, thereby better controlling and managing headache symptoms.
[0067] Through the foregoing detailed description of an intelligent recommendation system for diet management of headache patients in this specification, those skilled in the art can clearly know an intelligent recommendation system for diet management of headache patients in this embodiment.
[0068] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An intelligent recommendation system for diet management of headache patients, characterized in that, Including: A data acquisition module for obtaining a number of pre-headache preset-duration dietary records of the same-cluster samples of the target patient; A frequent combination analysis module for performing k-item frequent food combination statistics on the number of pre-headache preset-duration dietary records to obtain multiple k-item frequent food combinations and multiple infrequent food combinations, where k is an integer, N≥k≥1, and N represents the number of food types; A continuous frequent statistics module for traversing the multiple k-item frequent food combinations based on the number of pre-headache preset-duration dietary records to perform frequent sequence statistics and obtain continuous frequent food combinations and discrete frequent food combinations; An infrequent sequence analysis module for traversing the multiple infrequent food combinations based on the number of pre-headache preset-duration dietary records to perform frequent sequence statistics and obtain continuous infrequent food combinations; A taboo diet recommendation module for adding the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations to a taboo diet recommendation list and sending it to the diet management terminal.
2. The system according to claim 1, characterized in that The frequent combination analysis module is further used for: Step 1: Count the food type set of the number of pre-headache preset-duration dietary records, and record the total number of food types as N; Step 2: Perform k-item combination enumeration based on the food type set to obtain a k-item food combination set, and the initial value of k is equal to 1; Step 3: Traverse the k-item food combination set, count the trigger frequency ratio in the number of pre-headache preset-duration dietary records, and obtain a k-item food combination frequency ratio set; Step 4: Based on the k-item food combination frequency ratio set, select k-item food combinations with a k-item food combination frequency ratio greater than or equal to the first frequency ratio threshold from the k-item food combination set and add them to the multiple k-item frequent food combinations, and select k-item food combinations with a k-item food combination frequency ratio less than the first frequency ratio threshold and add them to the multiple infrequent food combinations; Step 5: When k≤N, update the value of k with k+1 and return to Step 2 to execute the loop. When k=N, output the multiple k-item frequent food combinations and the multiple infrequent food combinations.
3. The system according to claim 2, wherein The frequent combination analysis module is further used for: Extract the first food type set of the number of pre-headache preset-duration dietary records; Traverse the first food type set and count the trigger frequency ratio set in the number of pre-headache preset-duration dietary records; Based on the trigger frequency ratio set, select a second food type set with a trigger frequency ratio greater than or equal to the first frequency ratio threshold from the first food type set and set it as the food type set.
4. The system according to claim 3, wherein The frequent combination analysis module is further used for: Based on the trigger frequency ratio set, select a third food type set with a trigger frequency ratio less than the first frequency ratio threshold from the first food type set and add it to the multiple infrequent food combinations.
5. The system according to claim 1, characterized in that, The continuous frequent statistics module is further used for: Extract the first k-item frequent food combinations of the multiple k-item frequent food combinations; Traverse the number of pre-headache preset-duration dietary records and extract the food type trigger sequence set of the first k-item frequent food combinations; Perform outlier analysis on the food type trigger sequence set to obtain the mean of the sequence set outlier factor; When the mean of the sequence set outlier factor is greater than or equal to the outlier factor threshold, add the first k frequent food combinations to the discrete frequent food combinations; Otherwise, add the first k frequent food combinations to the continuous frequent food combinations.
6. The system according to claim 5, wherein The continuous frequent statistics module is further configured to: perform statistics on the proportion of the same serial number and the same type of food in the food type trigger sequence set, and set it as the trigger sequence similarity set; Perform LOF outlier factor analysis based on the trigger sequence similarity set to obtain the mean of the sequence set outlier factor.
7. The system according to claim 1, wherein The data acquisition module is further configured to: Obtain the medical record portrait of the target patient, where the medical record portrait of the target patient includes a benchmark type label and a benchmark quantization label; Obtain the medical record portrait of the sample headache patient, where the medical record portrait of the sample headache patient includes a sample type label and a sample quantization label; Statistically calculate the proportion of the same type of the sample type label and the benchmark type label to obtain the first co-cluster probability; Statistically calculate the ratio of the Euclidean distance between the sample quantization label and the benchmark quantization label to the Euclidean distance threshold to obtain the second co-cluster probability; When both the first co-cluster probability and the second co-cluster probability are greater than or equal to the co-cluster probability threshold, add the sample headache patient to the target patient co-cluster sample.
8. The system according to claim 1, characterized in that, The taboo diet recommendation module is further configured to: Traverse the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations, statistically calculate the trigger frequency in the diet log of the target patient, and add it to the food combination warning factor set; Sort the continuous frequent food combinations, the discrete frequent food combinations, and the continuous infrequent food combinations according to the food combination warning factor set, and send them to the diet management terminal.
Citation Information
Patent Citations
System and method for excavating abnormal change process of time series data
CN105205113A
Object recommendation method and device based on recommendation model
CN111709810A
Systems and methods for food analysis, personalized recommendations, and health management
CN111902878A
Adverse drug reaction trace management method and system
CN118280602A
Diet recommendation method and system for rehabilitation patients
CN118538373A
