An intelligent recommendation system for dietary management of headache patients
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 generate personalized taboo diet recommendations, which solves the problem of relying on subjective evaluation in the existing technology and improves the accuracy and effectiveness of diet management.
Patent Information
- Application Number
- CN202510732583.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-15
- 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 accuracy of dietary management and unstable effect.
It provides an intelligent recommendation system for dietary management of headache patients, including data acquisition module, frequent combination analysis module, continuous frequent statistics module and non-frequency sequence analysis module. It uses data mining technology to identify the food combination pattern of headache-induced foods and generate personalized taboo diet recommendations.
This has realized the personalized taboo diet recommendation based on data mining technology, which has improved the effectiveness and accuracy of diet management for headache patients and reduced the frequency of headache attacks.
Smart Images

Figure CN120260832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical informatics, and in particular to an intelligent recommendation system for diet management of headache patients. Background Art
[0002] Currently, clinical treatment for headaches primarily relies on medication, but dietary factors, as a key trigger of headaches, are receiving increasing attention in the medical community. Existing research suggests that certain foods or food combinations, such as alcohol, caffeine, cheese, and chocolate, may trigger headaches. Existing dietary management methods for headache patients are typically based on the subjective experience of doctors or nutritionists. These dietary recommendations fail to account for the varying food sensitivities among patients, resulting in low precision and unstable results. Summary of the Invention
[0003] The present invention aims to solve the technical problem that the dietary management of headache patients in the prior art relies on subjective evaluation and lacks personalized and accurate recommendations, and provides an intelligent recommendation system for dietary management of headache patients to solve the problem.
[0004] The technical solution of the present invention to solve the above technical problems is as follows:
[0005] The present invention provides an intelligent recommendation system for dietary management of headache patients, comprising: a data acquisition module for obtaining a plurality of dietary records of a preset time period before a headache of a target patient in the same cluster; a frequent combination analysis module for performing k-item frequent food combination statistics on the plurality of dietary records of the preset time period before a headache, to obtain a plurality of k-item frequent food combinations and a plurality of infrequent food combinations, wherein k is an integer, N≥k≥1, and N represents the number of food types; a continuous frequent statistics module for performing frequent sequence statistics on the plurality of k-item frequent food combinations based on the plurality of dietary records of the preset time period before a headache, to obtain a continuous frequent food combination and a discrete frequent food combination; a infrequent sequence analysis module for performing frequent sequence statistics on the plurality of infrequent food combinations based on the plurality of dietary records of the preset time period before a headache, to obtain a continuous infrequent food combination; and a taboo dietary recommendation module for adding the continuous frequent food combination, the discrete frequent food combination, and the continuous infrequent food combination into a taboo dietary recommendation list and sending the list to a dietary management terminal.
[0006] Optionally, the frequent combination analysis module is further configured to: Step 1: Count the food type sets of the plurality of diet records for a preset time period before a headache, and record the total number of food types as N; Step 2: Enumerate k combinations based on the food type set to obtain a k-item food combination set, where the initial value of k is 1; Step 3: Traverse the k-item food combination set, count the triggering frequency proportions of the plurality of diet records for a preset time period before a headache, and obtain a k-item food combination frequency proportion set; Step 4: Based on the k-item food combination frequency proportion set, screen k food combinations whose k-item food combination frequency proportions are greater than or equal to a first frequency proportion threshold from the k-item food combination set, and add the k-item food combinations to the plurality of k frequent food combinations; screen k food combinations whose k-item food combination frequency proportions are less than the first frequency proportion threshold, and add the k-item food combinations to the plurality of infrequent food combinations; Step 5: When k ≤ N, use k plus one to update the k value, and return to Step 2 to execute the loop; when k = N, output the plurality of k frequent food combinations and the plurality of infrequent food combinations.
[0007] Optionally, the frequent combination analysis module is further used to: extract a first food type set from the plurality of dietary records for a preset time period before a headache; traverse the first food type set and count a trigger frequency proportion set in the plurality of dietary records for a preset time period before a headache; and based on the trigger frequency proportion set, screen a second food type set from the first food type set whose trigger frequency proportion is greater than or equal to the first frequency proportion threshold, and set the set as the food type set.
[0008] Optionally, the frequent combination analysis module is further configured to: based on the trigger frequency percentage set, screen a third food type set having a trigger frequency percentage less than the first frequency percentage threshold from the first food type set, and add the third food type set into the multiple infrequent food combinations.
[0009] Optionally, the continuous frequent statistics module is further used to: extract the first k frequent food combinations from the multiple k frequent food combinations; traverse the several dietary records of a preset time period before the headache, and extract the food type trigger sequence set of the first k frequent food combinations; perform outlier analysis on the food type trigger sequence set to obtain the mean of the outlier factor of the sequence set; when the mean of the outlier factor of the sequence set 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.
[0010] Optionally, the continuous frequent statistics module is further used to: perform statistics on the proportion of similar foods with the same sequence number in pairs of the food type trigger sequence set, setting it as a trigger sequence similarity set; perform LOF outlier factor analysis based on the trigger sequence similarity set to obtain the outlier factor mean of the sequence set.
[0011] Optionally, the data acquisition module is also used to: obtain a target patient medical record portrait, wherein the target patient medical record portrait includes a baseline type label and a baseline quantitative label; obtain a sample headache patient medical record portrait, wherein the sample headache patient medical record portrait includes a sample type label and a sample quantitative label; count the proportion of the same type between the sample type label and the baseline type label to obtain a first cluster probability; count the ratio of the Euclidean distance between the sample quantitative label and the baseline quantitative label to the Euclidean distance threshold to obtain a second cluster probability; when the first cluster probability and the second cluster probability are both greater than or equal to the cluster probability threshold, add the sample headache patient to the target patient cluster sample.
[0012] Optionally, the taboo diet recommendation module is further used to: traverse the continuous frequent food combinations, the discrete frequent food combinations and the continuous infrequent food combinations, count the triggering frequencies in the target patient's diet log, and add them to the food combination warning factor set; according to the food combination warning factor set, sort the continuous frequent food combinations, the discrete frequent food combinations and the continuous infrequent food combinations, and send them to the diet management end.
[0013] The beneficial effects of the present invention are:
[0014] The data acquisition module obtains several dietary records from the target patient cluster for a preset time before a headache, thereby collecting dietary data from a group of headache patients with similar characteristics. This provides basic data support for subsequent analysis and ensures the targeted and accurate recommendations. The frequent combination analysis module performs k-item frequent food combination statistics on several dietary records from the preset time before a headache, obtaining multiple k-item frequent food combinations and multiple infrequent food combinations. This identifies food combination patterns that may be associated with headache attacks, including both frequent and infrequent food combinations, providing multi-dimensional data support for a comprehensive analysis of the association between food and headaches. The continuous frequent statistics module performs frequent sequence statistics on the multiple k-item frequent food combinations based on several dietary records from the preset time before a headache, obtaining continuous frequent food combinations and discrete frequent food combinations. This further analyzes the impact of food intake timing on headache attacks, distinguishing between food combinations that occur continuously in time and food combinations that occur discontinuously but frequently, thereby improving the accuracy of identifying precipitating factors. The infrequent sequence analysis module, based on a number of dietary records from a preset time period before a headache, traverses these multiple infrequent food combinations and performs frequent sequence statistics to obtain continuous infrequent food combinations. This identifies food combinations that are generally infrequent but may trigger headaches under specific time patterns, compensating for potential triggers that might be overlooked by analyzing only frequent combinations. The taboo dietary recommendation module adds continuous frequent food combinations, discrete frequent food combinations, and continuous infrequent food combinations to a taboo dietary recommendation list and sends it to the dietary management terminal. The analysis results are converted into specific dietary taboo recommendations and directly delivered to patients or medical staff, enabling intelligent and personalized dietary management and effectively preventing the onset of headaches.
[0015] Through the above technical solution, this application overcomes the limitations of traditional dietary management that relies on subjective evaluation, uses data mining technology to automatically identify individualized headache-inducing food combination patterns, provides accurate taboo dietary recommendations, realizes personalized taboo dietary recommendations, and significantly improves the effectiveness of dietary management for headache patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a schematic diagram of the structure of an intelligent recommendation system for diet management for headache patients provided by the present invention;
[0017] Figure 2 This is a flow chart of the frequent combination analysis module provided by the present invention performing statistics on k frequent food combinations.
[0018] In the accompanying drawings, the components represented by the reference numerals are as follows:
[0019] Data acquisition module 11, frequent combination analysis module 12, continuous frequent statistics module 13, non-frequent sequence analysis module 14, taboo diet recommendation module 15. DETAILED DESCRIPTION
[0020] This application provides an intelligent recommendation system for diet management of headache patients, which is used to solve the technical problems in the prior art that diet management of headache patients relies on subjective evaluation and lacks personalized and accurate recommendations.
[0021] Example: Figure 1 As shown, the present application provides an intelligent recommendation system for diet management for headache patients, the system comprising:
[0022] The data acquisition module 11 is used to obtain a plurality of dietary records of a preset time before a headache for a sample of the same cluster of target patients.
[0023] Specifically, Data Acquisition Module 11 is used to retrieve dietary records from the system database for a group of patients similar to the target patient (i.e., a cluster sample), specifically their dietary patterns during the specific time period preceding the onset of a headache. This data collection mechanism provides basic data support for subsequent dietary pattern analysis.
[0024] First, the data acquisition module 11 extracts a set of patient samples with similar medical history characteristics to the target patient from the system database to form a cluster of samples of the target patient. For these cluster samples, detailed dietary records are collected for a predetermined period of time (e.g., 24 hours, 48 hours, or other clinically significant time window) before the onset of the headache. These dietary records contain key information such as food type, time of consumption, and amount consumed, forming a structured set of dietary records for the predetermined period of time before the headache.
[0025] By focusing on data from patient groups with similar conditions to the target patients, the relevance and applicability of the analysis results are improved, the subjective experience evaluation problems commonly found in traditional dietary management methods are overcome, and precise dietary management recommendations are achieved.
[0026] The frequent combination analysis module 12 is used to perform k-item frequent food combination statistics on the plurality of dietary records of a preset time period before a headache, and 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.
[0027] Specifically, the frequent combination analysis module 12 is used to perform statistical analysis on a number of dietary records obtained by the data acquisition module 11 for a preset time period before a headache, and identify food combination patterns that may be related to a headache attack.
[0028] First, the frequent combination analysis module 12 identifies and counts all food types that appear in several dietary records of a preset time period before a headache, determining the total number of food types, N. Then, starting with k=1 and gradually increasing the value of k until it reaches N, the frequent combination analysis module 12 enumerates and counts all possible k-item food combinations. For each k value, the frequent combination analysis module 12 calculates the triggering frequency percentage of each k-item food combination in the dietary records before the headache, and categorizes these combinations into frequent food combinations and infrequent food combinations. Through this progressive combination analysis, the frequent combination analysis module 12 can comprehensively identify various dietary patterns that may trigger headaches, from single foods to multiple food combinations, providing basic data support for subsequent continuous frequent statistics and infrequent sequence analysis.
[0029] The k-item combination statistical method adopted by the frequent combination analysis module 12 overcomes the limitation of traditional dietary analysis that only focuses on the impact of a single food. It can effectively identify the potential impact of synergistic effects between foods on headache attacks and improve the accuracy and personalization of dietary management recommendations.
[0030] The continuous frequent statistics module 13 is used to perform frequent sequence statistics on the multiple k frequent food combinations based on the plurality of diet records of the preset time before the headache, and obtain continuous frequent food combinations and discrete frequent food combinations.
[0031] Specifically, the continuous-frequent statistics module 13 is used to analyze the temporal distribution characteristics of the k frequent food combinations identified by the frequent combination analysis module 12, further distinguishing the temporal characteristics of these food combinations. Using sequence analysis, the module determines whether the food combinations are associated with headaches in a continuous or discrete manner.
[0032] First, the continuous frequent statistics module 13 sequentially processes the multiple k frequent food combinations output by the frequent combination analysis module 12. For each k frequent food combination, the continuous frequent statistics module 13 extracts the intake time series of each food type in the combination from several dietary records of a preset time period before the headache onset, forming a food type trigger sequence set. The continuous frequent statistics module 13 then performs outlier analysis on these sequence sets, calculating the mean outlier factor of the sequence set to determine the degree of clustering of food types in the temporal 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 frequent food combination are relatively dispersed in time, and the k 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 the food combination are relatively concentrated in time, and the k frequent food combination is classified as a continuous frequent food combination. The outlier factor threshold is a critical value used to determine the degree of outliers in the sequence set, determined based on clinical data and statistical analysis.
[0033] Through the analysis method based on time series, the continuous frequent statistics module 13 can distinguish different types of headache-inducing food combination patterns, identify the different impact mechanisms of food combinations on headaches under different time distribution patterns, improve the scientificity and effectiveness of dietary taboo recommendations, and provide a basis for formulating more accurate dietary management strategies.
[0034] The infrequent sequence analysis module 14 is configured to perform frequent sequence statistics on the plurality of infrequent food combinations based on the plurality of dietary records of a preset time period before a headache, and obtain continuous infrequent food combinations.
[0035] 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 certain time series patterns.
[0036] 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 module extracts the intake time series of each food type in the infrequent food combination from a number of dietary records for a predetermined period before a headache onset and performs frequent sequence statistical analysis. By analyzing the temporal distribution characteristics of these food types, the module can identify food combinations that, while not frequently occurring overall, appear clustered within consecutive time periods and are associated with headache attacks. These combinations are known as continuous infrequent food combinations.
[0037] The non-frequent sequence analysis module 14 expands the scope of frequent pattern mining. It not only focuses on food combinations that appear frequently, but can also identify food combinations that may induce headaches under specific time patterns although the overall frequency is not high. This captures more potential headache triggers and provides patients with more comprehensive and personalized dietary taboo recommendations, effectively improving the accuracy of headache prevention and management.
[0038] The taboo dietary recommendation module 15 is configured to add the continuous frequent food combination, the discrete frequent food combination and the continuous infrequent food combination into a taboo dietary recommendation list and send the list to the dietary management terminal.
[0039] Specifically, the dietary taboo recommendation module 15 is used to integrate the output results of the aforementioned modules to generate personalized dietary taboo recommendations for target patients.
[0040] First, the taboo dietary recommendation module 15 aggregates and processes the continuous frequent food combinations and discrete frequent food combinations identified by the continuous frequent statistics module 13, as well as the continuous infrequent food combinations identified by the infrequent sequence analysis module 14, to obtain information on various food combinations that may induce headaches and add them to the taboo dietary recommendation list. The taboo dietary recommendation module 15 then sends this taboo dietary recommendation list to the dietary management terminal for review and use by medical staff or the patient. The dietary management terminal can be a hospital's patient management system, a mobile health application, or other terminal device capable of displaying and processing dietary recommendation information.
[0041] The Dietary Taboo Recommendation Module 15 transforms data analysis into practical advice, transforming complex food combination analysis results into intuitive, actionable dietary management guidance. By incorporating different types of potential headache-inducing food combinations into the recommended dietary taboo list, headache sufferers can be provided with a comprehensive and personalized dietary management plan, effectively helping them reduce the frequency of headaches caused by dietary factors and improve their quality of life.
[0042] Further, such as Figure 2 As shown, the execution steps of the frequent combination analysis module 12 include:
[0043] Step 1: Count the food types in the plurality of dietary records for a preset time period before the headache, and record the total number of food types as N;
[0044] Step 2: enumerate k combinations based on the food type set to obtain a k-item food combination set, where the initial value of k is 1;
[0045] Step 3: traverse the k-item food combination set, count the triggering frequency ratios of the plurality of diet records of the preset time before the headache, and obtain the k-item food combination frequency ratio set;
[0046] Step 4: Based on the frequency ratio set of the k food combinations, from the k food combination set, screen k food combinations whose frequency ratio is greater than or equal to a first frequency ratio threshold, and add them to the multiple k frequent food combinations; screen k food combinations whose frequency ratio is less than the first frequency ratio threshold, and add them to the multiple infrequent food combinations;
[0047] Step 5: When k≤N, use k plus one to update the k value, and return to step 2 to execute the loop. When k=N, output the multiple k frequent food combinations and the multiple infrequent food combinations.
[0048] In a feasible implementation, the execution steps of the frequent combination analysis module 12 include step 1, step 2, step 3, step 4 and step 5, so as to realize the statistical function of k frequent food combinations.
[0049] After receiving the multiple dietary records for the preset time period before a headache from the data acquisition module 11, the frequent combination analysis module 12 first proceeds to step 1, identifying and counting the food types in the dietary records for the preset time period before a headache. This module extracts all distinct food types appearing in these dietary records to form a complete food type set. The module then calculates the total number of food types N in this food type set, laying the foundation for subsequent combination analysis and determining the scope and upper limit of the combination analysis. The frequent combination analysis module 12 then proceeds to step 2, enumerating k combinations of the food type set determined in step 1. Initially, the value of k is set to 1, indicating that a single food type is being analyzed. The frequent combination analysis module 12 generates all possible k food combinations, forming a k-item food combination set. These combinations represent various food combinations that may be associated with headaches.
[0050] Next, the frequent combination analysis module 12 proceeds to step 3, where it traverses each of the k food combinations in the set of k food combinations generated in step 2 and calculates the frequency of each k food combination in a number of dietary records recorded for a preset period of time before a headache. Specifically, the frequent combination analysis module 12 counts the number of times each k food combination appears in these dietary records and divides this by the total number of dietary records to obtain the trigger frequency percentage for that frequent combination analysis module 12, thereby obtaining the k-food combination frequency. The trigger frequency percentages of all k food combinations (i.e., the k-food combination frequencies) constitute the k-food combination frequency percentage set. The frequent combination analysis module 12 then proceeds to step 4, where it classifies the k food combinations in the set according to a preset first frequency percentage threshold based on the k-food combination frequency percentage set obtained in step 3. K food combinations whose k-food combination frequencies are greater than or equal to the first frequency percentage threshold are classified as frequent food combinations, indicating that these combinations frequently appear in dietary records preceding a headache onset and have a strong correlation with headache induction. K food combinations whose frequency is less than the first frequency ratio threshold are classified as infrequent food combinations. Although these combinations occur less frequently, they may still be identified as potential headache triggers in subsequent sequence analysis. The first frequency ratio threshold is a critical value parameter used to distinguish between frequent and infrequent food combinations. It is set based on extensive clinical data analysis and is expressed as a decimal value between 0 and 1.
[0051] Subsequently, the frequent combination analysis module 12 continues the incremental combination analysis. After completing the analysis of the food combination corresponding to the current k value, the k value is increased by 1, and the module returns to step 2 to analyze higher-order food combinations. This cycle continues until the k value reaches the total number of food types, N. When k = N, the comprehensive analysis from a single food to N food combinations is complete, outputting multiple k frequent food combinations and multiple infrequent food combinations as the final results.
[0052] Through progressive analysis, the frequent combination analysis module 12 can comprehensively identify various food combination patterns that may be related to headaches, from simple to complex, and provide a detailed data basis for subsequent continuous frequent statistics and infrequent sequence analysis.
[0053] Furthermore, the execution steps of the frequent combination analysis module 12 further include:
[0054] Extracting a first food type set of the plurality of dietary records for a preset time period before a headache;
[0055] Traversing the first food type set, and counting the triggering frequency percentages of the plurality of food records of a preset time before a headache;
[0056] Based on the trigger frequency ratio set, a second food type set having a trigger frequency ratio greater than or equal to the first frequency ratio threshold is screened from the first food type set, and is set as the food type set.
[0057] In a preferred embodiment, the frequent combination analysis module 12 first extracts all food types that appear in the multiple dietary records for the preset time period before a headache, provided by the data acquisition module 11, to form an initial first food type set. This first food type set includes all food types that may be associated with headaches, but may also include some food types with extremely low frequency of occurrence and no significant correlation with headaches. This serves as the raw data basis for subsequent analysis. The frequent combination analysis module 12 then iterates over each food type in the first food type set, calculating its frequency of occurrence in the multiple dietary records for the preset time period before a headache. Specifically, the number of times each food type appears in these dietary records is counted and divided by the total number of dietary records to obtain the trigger frequency percentage for that food type. The trigger frequency percentages of all food types constitute the trigger frequency percentage set.
[0058] Subsequently, the first frequency ratio threshold is applied to screen and optimize the first food type set. The food types whose trigger frequency ratio reaches or exceeds the first frequency ratio threshold are screened out to form a second food type set, and this set is set as the food type set used for the subsequent k-item combination analysis. This optimization process eliminates those food types that have low frequency of occurrence and may not be significantly correlated with headaches, so that the subsequent combination analysis is more focused on possible headache triggers, improving the analysis efficiency and 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 frequency ratio that a food type needs to reach before it is considered a food type that may be related to headaches and then included in the subsequent analysis. This first frequency ratio threshold and the first frequency ratio threshold used to determine whether the k-item food combination is a frequent combination can be set to the same value in the system implementation, or can be set to different values according to specific application requirements to optimize the screening effect.
[0059] Through the above optimization processing, the frequent combination analysis module 12 can screen the initial food type set before performing k-item combination analysis, reduce the complexity of the analysis, and improve the accuracy of identifying potential headache-inducing foods, thereby achieving efficient and accurate dietary management recommendations.
[0060] Furthermore, the execution steps of the frequent combination analysis module 12 further include:
[0061] Based on the trigger frequency ratio set, a third food type set having a trigger frequency ratio less than the first frequency ratio threshold is screened from the first food type set, and added to the plurality of infrequent food combinations.
[0062] In one feasible embodiment, after the frequent combination analysis module 12 completes screening of the first food type set to obtain the second food type set, it also processes food types not included in the second food type set. Food types whose triggering frequency percentage is less than a first frequency percentage threshold are screened from the first food type set to form a third food type set. Although these food types occur less frequently, they may be associated with headaches in certain circumstances.
[0063] Each food type in the third food type set is treated as a single (k=1) infrequent food combination and directly added to the multiple infrequent food combinations. These single infrequent food combinations are further analyzed in the subsequent infrequent sequence analysis module 14 to identify the time series characteristics of these single infrequent food combinations and determine whether there are continuous infrequent food combinations.
[0064] This approach not only focuses on frequently occurring food types, but also takes into account the potential headache-inducing effects of less frequently occurring food types, particularly when these infrequent food types occur within specific time patterns. This comprehensive analysis strategy ensures that all possible headache triggers are captured, regardless of their frequency, leading to more comprehensive and personalized dietary avoidance recommendations.
[0065] Furthermore, the execution steps of the continuous frequent counting module 13 further include:
[0066] extracting first k frequent food combinations among the plurality of k frequent food combinations;
[0067] Traversing the plurality of dietary records of a preset time period before a headache, and extracting a food type trigger sequence set of the first k frequent food combinations;
[0068] Performing outlier analysis on the food type trigger sequence set to obtain the mean of the outlier factors of the sequence set;
[0069] When the outlier factor mean of the sequence set is greater than or equal to the outlier factor threshold, adding the first k frequent food combinations to the discrete frequent food combinations;
[0070] Otherwise, the first k frequent food combinations are added to the continuous frequent food combinations.
[0071] In a feasible embodiment, first, the continuous frequent statistics module 13 extracts one k-item frequent food combination from the multiple k-item frequent food combinations output by the frequent combination analysis module 12, and records it as the first k-item frequent food combination for time series feature analysis. The continuous frequent statistics module 13 will perform the same analysis process on each k-item frequent food combination to determine its time distribution characteristics. Then, the continuous frequent statistics module 13 traverses and analyzes a number of dietary records with a preset time period before the headache, and for the first k-item frequent food combination currently being processed, extracts the triggering time point of each food type in each dietary record to form a food type trigger sequence set. The sequence in the food type trigger sequence set records the time distribution of each food type in the first k-item frequent food combination, and is the basic data for determining the time characteristics of the combination.
[0072] Subsequently, an 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 is calculated, which can represent the overall degree of dispersion of the sequence set. The larger this value, the more dispersed the distribution of food types over time; conversely, the smaller the mean outlier factor of the sequence set, the more concentrated the distribution of food types over time. The calculated mean outlier factor of the sequence set is then 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 the first k frequent food combinations are relatively dispersed over time, and the first k frequent food combinations are classified as discrete frequent food combinations. Although such combinations occur frequently, the food types in them are generally not consumed within a continuous time period. The outlier factor threshold refers to the critical value used to distinguish between continuous frequent food combinations and discrete frequent food combinations. This value is determined by an expert panel based on statistical analysis of a large amount of clinical data. If the mean outlier factor of the sequence set is less than the outlier factor threshold, it indicates that the food types in the first k frequent food combinations are relatively concentrated in time, and the first k frequent food combinations are classified as continuous frequent food combinations. This type of combination is characterized by the continuous consumption of food types within a relatively concentrated time period. This dietary pattern may be more directly related to headache triggering mechanisms.
[0073] Through the above time series analysis, the continuous frequent statistics module 13 can further subdivide the types of frequent food combinations and identify food combinations with different time distribution characteristics, providing a basis for formulating more accurate diet management strategies.
[0074] Furthermore, the execution steps of the continuous frequent counting module 13 further include:
[0075] For the food type trigger sequence set, the proportion of the same type of food with the same sequence number is counted, and the result is set as the trigger sequence similarity set;
[0076] LOF outlier factor analysis is performed based on the trigger sequence similarity set to obtain the outlier factor mean of the sequence set.
[0077] In a preferred embodiment, when the continuous frequent statistics module 13 performs outlier analysis on the food type trigger sequence set and obtains the mean outlier factor of the sequence set, it first converts each dietary record of a preset duration before a headache into a time series, recording the time points at which each food type appears in the first k frequent food combinations. Assuming there are m dietary records, m time series are formed. These time series are aligned along the time axis, and the time axis is discretized into several time windows (e.g., one window per hour or every 30 minutes), with each window corresponding to a sequence position. For any two sequences A and B, the number of positions in which the same food type appears simultaneously in both sequences is calculated, and the number of positions is divided by the total number of sequence positions to obtain the similarity value between sequences A and B. This calculation is repeated for all possible sequence pairs (A, B) to obtain multiple similarity values, forming a trigger sequence similarity set.
[0078] Subsequently, the continuous frequent statistics module 13 uses the Local Outlier Factor (LOF) algorithm to analyze the trigger sequence similarity set. First, the k-nearest neighbors of each sequence are constructed based on the similarity values (where k is typically 10% of the number of sequences, rounded up). Then, the local reachability density (LOF) of each sequence is calculated. 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. The arithmetic mean of the LOF values of all sequences is then calculated to obtain the mean outlier factor of the sequence set, which is used to assess the degree of dispersion of the entire food type trigger sequence set.
[0079] Through analysis based on sequence similarity and LOF algorithm, technical support is provided for the continuous frequent statistics module 13 to accurately quantify the time distribution pattern of food, and it can reasonably distinguish between continuous frequent food combinations and discrete frequent food combinations based on the distribution characteristics in the time dimension.
[0080] Furthermore, the execution steps of the data acquisition module 11 include:
[0081] Obtaining a target patient's medical record portrait, wherein the target patient's medical record portrait includes a benchmark type label and a benchmark quantitative label;
[0082] Obtaining a sample headache patient medical record portrait, wherein the sample headache patient medical record portrait includes a sample type label and a sample quantification label;
[0083] Counting the proportion of the sample type label and the reference type label that are of the same type to obtain a first same-cluster probability;
[0084] Calculating a ratio of the Euclidean distance between the sample quantization label and the reference quantization label to a Euclidean distance threshold to obtain a second co-cluster probability;
[0085] When the first same-cluster probability and the second same-cluster probability are both greater than or equal to the same-cluster probability threshold, the sample headache patient is added to the target patient same-cluster sample.
[0086] In a preferred embodiment, the data acquisition module 11 first acquires the medical records of a target patient (i.e., the patient currently requiring dietary management recommendations), extracts key features from the records, and constructs a medical profile of the target patient. This profile consists of two types of labels: a baseline type label and a baseline quantitative label. The baseline type label refers to discrete categorical information describing the target patient's headache characteristics, including categorical features such as headache type, accompanying symptoms, and precipitating factors; the baseline quantitative label refers to continuous numerical information describing the target patient's headache characteristics, including continuous numerical features such as headache intensity, duration, and frequency. These labels together constitute a multidimensional data structure describing the target patient's headache characteristics. Simultaneously, the data acquisition module 11 extracts the medical records of all sample headache patients from the system database and constructs a medical profile for each sample patient in the same manner as for the target patient, resulting in a sample headache patient profile. The sample headache patient profile includes both a sample type label and a sample quantitative label. The sample type label is discrete categorical information that has the same structure as the baseline type label, including the sample patient's headache type, accompanying symptoms, and precipitating factors. The sample quantitative label is continuous numerical information that has the same structure as the baseline quantitative label, including the sample patient's headache intensity, duration, and frequency. These medical records of sample headache patients constitute the basic data pool and serve as comparison targets for identifying patients in the same cluster.
[0087] Subsequently, the data acquisition module 11 compares the sample type label of each sample patient with the benchmark type label of the target patient, and calculates the ratio of the number of matching labels between the two to the total number of labels as the first clustering probability. The first clustering probability reflects the degree of similarity between the sample patient and the target patient in discrete features. 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 patient's sample quantitative label and the benchmark quantitative label of the target patient, and then uses the ratio of this distance to the preset Euclidean distance threshold as the basis for the second clustering probability. The specific calculation method is: second clustering 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 clustering probability is 0. The second clustering probability reflects the degree of similarity between the sample patient and the target patient in continuous features. The higher the value, the more similar they are in terms of headache intensity, duration, etc.
[0088] Afterward, data acquisition module 11 comprehensively considers the first and second clustering probabilities. Only when both probability values reach or exceed a preset clustering probability threshold is the headache patient sample determined to belong to the same cluster as the target patient, i.e., to have significantly similar disease characteristics, and is added to the target patient's clustered sample set. This dual probability threshold screening mechanism ensures that clustered patients exhibit a high degree of similarity with the target patient in both discrete and continuous dimensions. The clustering probability threshold, which determines whether a sample patient belongs to the same cluster as the target patient, is used to assess whether the first and second clustering probabilities meet the required level of similarity. It is typically determined based on extensive clinical data and statistical analysis results to ensure that the selected clustered patients truly share similar headache characteristics and onset patterns with the target patient.
[0089] Through multidimensional similarity analysis based on medical record portraits, the data acquisition module 11 can identify clusters of patients with similar disease characteristics as the target patient, providing a highly relevant data basis for subsequent dietary analysis, thereby improving the personalization and clinical relevance of dietary taboo recommendations.
[0090] Furthermore, the execution steps of the dietary taboo recommendation module 15 include:
[0091] Traversing the continuous frequent food combination, the discrete frequent food combination, and the continuous infrequent food combination, counting the triggering frequencies in the target patient's diet log, and adding them to the food combination warning factor set;
[0092] According to the food combination warning factor set, the continuous frequent food combinations, the discrete frequent food combinations and the continuous infrequent food combinations are sorted and sent to the diet management terminal.
[0093] In one feasible implementation, the dietary taboo recommendation module 15 not only generates dietary taboo recommendations based on the data analysis results of patients in the same cluster but also personalizes them based on the target patient's own dietary habits. First, the target patient's historical dietary diary data is obtained. Then, all identified potential headache-inducing food combinations (including continuous frequent food combinations, discrete frequent food combinations, and continuous infrequent food combinations) are traversed, and the frequency of each food combination's appearance in the target patient's dietary diary (i.e., the trigger frequency) is counted. These trigger frequencies are added to a set of food combination warning factors, serving as an important indicator for assessing the impact of food combinations on the target patient's headaches. The dietary taboo recommendation module 15 then ranks all potential headache-inducing food combinations based on the trigger frequencies in the food combination warning factor set. The ranking principle prioritizes food combinations that appear more frequently in the target patient's dietary diary, as these food combinations are more likely to be the primary triggers of the patient's headaches. The ranked dietary taboo recommendation list is then sent to the dietary management terminal via the system interface for reference by medical staff or the patient.
[0094] By adjusting and ranking warning factors based on individual dietary habits, the Dietary Taboo Recommendation Module 15 provides targeted patients with more precise and personalized dietary taboo recommendations. This not only considers common data across patient groups with similar medical conditions, but also incorporates individual differences, enhancing the specificity and practicality of dietary management recommendations. Compared to traditional general dietary recommendations, this personalized ranking mechanism can help patients more effectively identify and avoid specific food combinations that may trigger headaches, thereby better controlling and managing headache symptoms.
[0095] Through the above detailed description of the intelligent recommendation system for diet management of headache patients in this specification, those skilled in the art can clearly understand the intelligent recommendation system for diet management of headache patients in this embodiment.
[0096] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An intelligent recommendation system for dietary management of headache patients, characterized by: include: A data acquisition module is used to obtain a number of dietary records of a preset time before a headache for a sample of the same cluster of target patients; a frequent combination analysis module, configured to perform k-item frequent food combination statistics on the plurality of dietary records of a preset time period before a 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 is configured to perform frequent sequence statistics on the plurality of k frequent food combinations based on the plurality of dietary records of a preset time period before a headache, to obtain continuous frequent food combinations and discrete frequent food combinations; a non-frequent sequence analysis module, configured to perform frequent sequence statistics on the plurality of non-frequent food combinations based on the plurality of dietary records of a preset time period before a headache, and obtain continuous non-frequent food combinations; a taboo diet recommendation module, configured to add the continuous frequent food combination, the discrete frequent food combination, and the continuous infrequent food combination into a taboo diet recommendation list and send the list to a diet management terminal; The continuous frequent statistics module is further used for: extracting first k frequent food combinations among the plurality of k frequent food combinations; Traversing the plurality of dietary records of a preset time period before a headache, and extracting a food type trigger sequence set of the first k frequent food combinations; Performing outlier analysis on the food type trigger sequence set to obtain the mean of the outlier factors of the sequence set; When the outlier factor mean of the sequence set is greater than or equal to the outlier factor threshold, adding the first k frequent food combinations to the discrete frequent food combinations; Otherwise, adding the first k frequent food combinations into the continuous frequent food combinations; The continuous frequent statistics module is further used to: perform statistics on the proportion of the same type of food with the same sequence number in pairs on the food type trigger sequence set, and set it as the trigger sequence similarity set; LOF outlier factor analysis is performed based on the trigger sequence similarity set to obtain the outlier factor mean of the sequence set.
2. The system according to claim 1, wherein The frequent combination analysis module is further used for: Step 1: Count the food types in the plurality of dietary records for a preset time period before the headache, and record the total number of food types as N; Step 2: enumerate k combinations based on the food type set to obtain a k-item food combination set, where the initial value of k is 1; Step 3: traverse the k-item food combination set, count the triggering frequency ratios of the plurality of diet records of the preset time before the headache, and obtain the k-item food combination frequency ratio set; Step 4: Based on the frequency ratio set of the k food combinations, from the k food combination set, screen k food combinations whose frequency ratio is greater than or equal to a first frequency ratio threshold, and add them to the multiple k frequent food combinations; screen k food combinations whose frequency ratio is less than the first frequency ratio threshold, and add them to the multiple infrequent food combinations; Step 5: When k≤N, use k plus one to update the k value, and return to step 2 to execute the loop. When k=N, output the multiple k 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: Extracting a first food type set of the plurality of dietary records for a preset time period before a headache; Traversing the first food type set, and counting the triggering frequency percentages of the plurality of food records of a preset time before a headache; Based on the trigger frequency ratio set, a second food type set having a trigger frequency ratio greater than or equal to the first frequency ratio threshold is screened from the first food type set, and is set as the food type set.
4. The system according to claim 3, wherein: The frequent combination analysis module is further configured to: based on the trigger frequency percentage set, screen a third food type set having a trigger frequency percentage less than the first frequency percentage threshold from the first food type set, and add the third food type set to the multiple infrequent food combinations.
5. The system according to claim 1, wherein: The data acquisition module is also used for: Obtaining a target patient's medical record portrait, wherein the target patient's medical record portrait includes a benchmark type label and a benchmark quantitative label; Obtaining a sample headache patient medical record portrait, wherein the sample headache patient medical record portrait includes a sample type label and a sample quantification label; Counting the proportion of the sample type label and the reference type label that are of the same type to obtain a first same-cluster probability; Calculating a ratio of the Euclidean distance between the sample quantization label and the reference quantization label to a Euclidean distance threshold to obtain a second co-cluster probability; When the first same-cluster probability and the second same-cluster probability are both greater than or equal to the same-cluster probability threshold, the sample headache patient is added to the target patient same-cluster sample.
6. The system according to claim 1, wherein: The taboo dietary recommendation module is also used to: Traversing the continuous frequent food combination, the discrete frequent food combination, and the continuous infrequent food combination, counting the triggering frequencies in the target patient's diet log, and adding them to the food combination warning factor set; According to the food combination warning factor set, the continuous frequent food combinations, the discrete frequent food combinations and the continuous infrequent food combinations are sorted and sent 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