A traditional Chinese medicine taking compliance information evaluation method and system

By calculating and adjusting the mixed entropy and constructing a decision tree, and combining swarm intelligence algorithms to optimize parameters, the problems of unclear feature associations and individual patient differences in the assessment of traditional Chinese medicine adherence information were solved, achieving higher assessment accuracy and stability.

CN122117223APending Publication Date: 2026-05-29GUANGWAI HOSPITAL XICHENG DISTRICT BEIJING (GUANGWAI GERIATRIC HOSPITAL XICHENG DISTRICT BEIJING)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGWAI HOSPITAL XICHENG DISTRICT BEIJING (GUANGWAI GERIATRIC HOSPITAL XICHENG DISTRICT BEIJING)
Filing Date
2026-04-16
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing methods for assessing adherence to traditional Chinese medicine (TCM) use are hampered by complex influencing factors and unclear correlations between characteristics and adherence levels. This makes it difficult to accurately identify core distinguishing features, resulting in insufficient accuracy in adherence assessment. Furthermore, significant individual differences among patients and complex distribution of clinical data make it difficult for traditional parameter optimization methods to adapt to the actual distribution of clinical data, leading to weak adherence identification capabilities and poor stability of assessment results.

Method used

The mixed entropy is adjusted by calculating the balance coefficient and the distribution adjustment index, high-discrimination features are labeled, a decision tree is constructed and a penalty coefficient is introduced to optimize the model parameters to improve the evaluation accuracy and stability; a swarm intelligence algorithm is constructed to dynamically reorganize the parameter search space and enhance the global search capability and stability of parameter optimization.

Benefits of technology

It improved the accuracy and stability of the assessment of Chinese medicine adherence information, reduced the rate of misjudgment and missed judgment, and enhanced the adaptability to different individual patients and the practicality of the assessment results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122117223A_ABST
    Figure CN122117223A_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine taking compliance information evaluation method and system, and belongs to the technical field of information evaluation. The method comprises the following steps: data acquisition, traditional Chinese medicine taking compliance information evaluation model construction, model parameter optimization and traditional Chinese medicine taking compliance information evaluation. According to the method, the mixed entropy is calculated by using the balance coefficient and the distribution adjustment index, the high-differentiation features are marked, the penalty coefficient is introduced, the compliance comprehensive complexity is obtained, the optimal split features and the optimal split points are determined, the decision tree is recursively constructed, and the total loss function is constructed. According to the population recombination probability, the dynamic recombination is carried out, the core template, the mutation template and the dynamic template are constructed, the three strategies are set, the individual positions in the elite population are updated, the elite guidance and the random disturbance are combined, the individual positions in the common population are updated, the optimal parameter combination is determined, and the stability and the accuracy of the traditional Chinese medicine taking compliance information evaluation result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information assessment technology, specifically referring to a method and system for assessing the adherence to traditional Chinese medicine. Background Technology

[0002] The method for assessing adherence to traditional Chinese medicine (TCM) is a technical solution that utilizes intelligent sensing and data analysis technologies to dynamically assess the level of TCM adherence by collecting multidimensional information data from patients, providing visualized assessment reports, improving the therapeutic effect of TCM, ensuring medication safety, and promoting the development of precision management and intelligent services in TCM.

[0003] However, existing methods for assessing adherence to traditional Chinese medicine (TCM) use suffer from several problems. Firstly, the factors influencing adherence are complex, the correlation between characteristics and adherence levels is unclear, and core distinguishing features cannot be accurately identified, leading to insufficient accuracy in adherence assessment. Secondly, existing methods for assessing adherence to TCM use exhibit significant individual patient differences and complex clinical data distribution, making it difficult for traditional parameter optimization methods to adapt to the actual clinical data distribution. This results in weak adherence identification capabilities and poor stability of assessment results. Summary of the Invention

[0004] To address the above issues and overcome the shortcomings of existing technologies, this invention provides a method and system for evaluating traditional Chinese medicine (TCM) adherence information. Addressing the problems of complex influencing factors, unclear correlations between features and adherence levels, and the inability to accurately select core distinguishing features in existing TCM adherence assessment methods, which lead to insufficient accuracy in adherence information evaluation, this solution calculates and adjusts the mixing entropy using a balance coefficient and a distribution adjustment index to obtain class discrimination. High-discrimination features are then labeled, and adherence category complexity and feature attribute complexity are calculated. A penalty coefficient is introduced to obtain the comprehensive adherence complexity of a subset of data. The optimal splitting feature and optimal splitting point are determined, and a decision tree is recursively constructed. A total loss function is built, incorporating classification loss, structure regularization loss, and feature effectiveness loss, thus balancing evaluation accuracy, model complexity, and feature quality. To reduce the rates of false positives and false negatives and improve the stability and accuracy of TCM (Traditional Chinese Medicine) adherence assessment results, this solution addresses the problems of significant individual patient differences, complex clinical data distribution, and the difficulty of adapting traditional parameter optimization methods to real clinical data distribution, leading to weak adherence identification capabilities and poor assessment results stability. This solution constructs a parameter search space, divides the population into elite and general groups, and dynamically recombines the data based on population recombination probability. It constructs core templates, variant templates, and dynamic templates, and sets three strategies based on these templates to update the positions of individuals in the elite group. It combines elite guidance with random perturbation to update the positions of individuals in the general group, determining the optimal parameter combination, accelerating parameter optimization efficiency, improving practicality while maintaining assessment accuracy, and significantly enhancing the stability of assessment results.

[0005] The technical solution adopted by this invention is as follows: This invention provides a method for assessing the adherence to traditional Chinese medicine, which includes the following steps:

[0006] Step S1: Data Acquisition;

[0007] Step S2: Construction of a model for assessing adherence to traditional Chinese medicine;

[0008] Step S3: Model parameter optimization;

[0009] Step S4: Assessment of Chinese medicine adherence information.

[0010] Further, in step S1, the data collection involves collecting historical patients' adherence information on traditional Chinese medicine (TCM) and their corresponding adherence levels, and then preprocessing the data. The TCM adherence information includes basic patient characteristics, TCM prescription characteristics, patient medication behavior characteristics, and environmental intervention characteristics. The adherence levels include high adherence, medium adherence, and low adherence, and these levels are used as data labels. The preprocessing includes data cleaning, data encoding, data normalization, and dataset construction to obtain training and testing datasets.

[0011] Furthermore, in step S2, the construction of the traditional Chinese medicine adherence information assessment model specifically includes the following steps:

[0012] Step S21: Discrimination feature labeling; Based on the training dataset, calculate the adjusted mixture entropy of each feature using the balance coefficient and the distribution adjustment index, calculate the class discrimination of the feature based on the adjusted mixture entropy, set the discrimination threshold, label the features with class discrimination not lower than the discrimination threshold as high discrimination features, and create a root node containing the entire training dataset.

[0013] Step S22: Subset complexity evaluation; For each high-discriminative feature in the dataset corresponding to the current node, traverse all possible values ​​as split points, and use a binary splitting rule to divide the dataset into two disjoint subsets. For each feature-split point combination, calculate the compliance category complexity and feature attribute complexity of each subset, and introduce a penalty coefficient to obtain the comprehensive compliance complexity of each subset.

[0014] Step S23: Optimal split selection; Based on the comprehensive dependency complexity of the two subsets, calculate the overall dependency split complexity corresponding to the current feature-split point combination, traverse each high-discrimination feature and all its possible split points, select the feature-split point combination with the smallest overall dependency split complexity, and determine it as the optimal split feature and optimal split point for the current node. Based on this optimal split feature and optimal split point, divide the dataset of the current node into two subsets, create new nodes for each subset, and connect them to the parent node through edges.

[0015] Step S24: Recursively generate the decision tree; Repeat steps S22 to S23 for the newly generated nodes, select the optimal splitting feature and the optimal splitting point for each node in turn, and generate new nodes in a recursive manner to build the decision tree. When the dataset corresponding to a node meets any stopping condition, the node stops splitting and becomes a leaf node. The constructed decision tree is used as a model for evaluating the compliance information of traditional Chinese medicine.

[0016] Step S25: Loss function construction; combine the classification loss term, structure regularization loss term, and feature validity loss term to construct the total loss function.

[0017] Further, in step S3, the model parameter optimization is performed on the parameters of the traditional Chinese medicine adherence information assessment model based on a swarm intelligence algorithm; specifically, it includes the following steps:

[0018] Step S31: Initialize individual positions; construct a parameter search space, randomly initialize individual positions within the parameter search space, use each individual position to represent a set of parameter combinations, and use the total loss value of the Chinese medicine administration compliance information evaluation model established based on the parameter combinations on the test dataset as the fitness value of the corresponding individual position.

[0019] Step S32: Elite Division and Dynamic Reorganization; Sort all individuals in ascending order of fitness value, divide the top 40% of individuals with smaller fitness values ​​into elite group, and divide the bottom 60% of individuals into ordinary group, calculate the population reorganization probability based on the current iteration number, and generate a random number that follows a uniform distribution of (0, 1). If the random number is less than the population reorganization probability, then perform dynamic reorganization operation.

[0020] Step S33: Elite template construction; Select the three individuals with the lowest fitness values ​​from the elite population and construct the core template, mutation template, and dynamic template respectively;

[0021] Step S34: Elite group update; Generate a random number that follows a uniform distribution of [0, 1] for the position of each individual in the elite group. Based on the value range of the random number, select the corresponding strategy from the three strategies to update the individual position.

[0022] Step S35: Update the general population; combine elite guidance with random perturbation to update the position of individuals in the general population;

[0023] Step S36: Determine the optimal parameter combination; update the fitness values ​​of all individual positions, and determine whether there are any individual positions whose fitness values ​​are lower than the preset fitness threshold. If so, the parameter combination corresponding to that individual position is the optimal parameter combination, and the parameter optimization process ends; otherwise, determine whether the maximum number of iterations has been reached. If it has been reached, return to step S31 to reinitialize the individual positions and start a new round of search; if it has not been reached, increment the iteration count by 1 and return to step S32 to continue iterative optimization.

[0024] Furthermore, in step S4, the assessment of TCM medication adherence information involves collecting real-time TCM medication adherence information data from patients, preprocessing it, and then inputting it into a TCM medication adherence information assessment model constructed based on the optimal parameter combination to obtain the real-time patient's corresponding adherence level and generate an assessment report.

[0025] The present invention provides a system for evaluating the adherence to traditional Chinese medicine (TCM) use, including a data acquisition module, a TCM adherence to medicine adherence information evaluation model construction module, a model parameter optimization module, and a TCM adherence to medicine adherence information evaluation module.

[0026] The data acquisition module collects historical data on patients' adherence to traditional Chinese medicine and their corresponding adherence levels, performs preprocessing, and sends the data to the traditional Chinese medicine adherence information assessment model construction module.

[0027] The traditional Chinese medicine (TCM) medication adherence information assessment model construction module calculates and adjusts the mixed entropy using a balance coefficient and a distribution adjustment index to obtain the class discrimination, labels high-discrimination features, calculates the compliance class complexity and feature attribute complexity, introduces a penalty coefficient to obtain the comprehensive compliance complexity, determines the optimal splitting feature and the optimal splitting point, recursively constructs a decision tree, constructs a total loss function including classification loss, structure regularization loss, and feature effectiveness loss, and sends the data to the model parameter optimization module.

[0028] The model parameter optimization module constructs a parameter search space, divides the elite group and the ordinary group, performs dynamic recombination according to the population recombination probability, constructs core templates, mutation templates and dynamic templates respectively, sets three strategies based on the templates, updates the position of individuals in the elite group, combines elite guidance with random perturbation to update the position of individuals in the ordinary group, determines the optimal parameter combination, and sends the data to the traditional Chinese medicine adherence information evaluation module.

[0029] The TCM medication adherence information assessment module constructs a TCM medication adherence information assessment model based on the optimal parameter combination, obtains the real-time patient's corresponding adherence level, and generates an assessment report.

[0030] The beneficial effects achieved by the present invention using the above solution are as follows:

[0031] (1) To address the problems in existing methods for assessing adherence to traditional Chinese medicine (TCM) that are complex influencing factors, unclear correlation between features and adherence levels, and inability to accurately screen core distinguishing features, which leads to insufficient accuracy in assessing adherence information, this scheme calculates and adjusts the mixed entropy using a balance coefficient and a distribution adjustment index to obtain the class distinguishability, marks high distinguishability features, accurately screens core distinguishing features sensitive to adherence levels, and reduces redundant information interference; calculates the adherence category complexity and feature attribute complexity, and introduces a penalty coefficient to obtain the comprehensive adherence complexity of the subset, making the subset division more in line with clinical patterns and improving the clarity of adherence level distinction; determines the optimal splitting feature and optimal splitting point, and recursively constructs a decision tree; constructs a total loss function that includes classification loss, structure regularization loss, and feature effectiveness loss, taking into account assessment accuracy, model complexity, and feature quality, reducing misjudgment and missed judgment rates, and improving the stability and accuracy of TCM adherence information assessment results.

[0032] (2) In view of the problems in the existing methods for assessing the adherence to traditional Chinese medicine, such as the prominent individual differences among patients, the complex distribution of clinical data, and the difficulty of adapting traditional parameter optimization methods to the distribution of real clinical data, resulting in weak adherence identification ability and poor stability of assessment results, this scheme constructs a parameter search space, divides the elite group and the general group, and performs dynamic recombination according to the population recombination probability to enhance the global search capability of parameter optimization and improve the identification coverage of various adherence patterns; constructs core templates, variant templates and dynamic templates respectively to form multi-mode collaborative optimization, which is more in line with the distribution of real clinical data and improves the search accuracy of key assessment parameters; sets three strategies based on templates to update the individual positions in the elite group, taking into account both local fine mining and global optimal guidance, and improving the adaptability to different individual patients; combines elite guidance with random perturbation to update the individual positions in the general group, determine the optimal parameter combination, accelerate the parameter optimization efficiency, improve practicality while ensuring assessment accuracy, and significantly improve the stability of assessment results. Attached Figure Description

[0033] Figure 1 A flowchart illustrating a method for assessing adherence to traditional Chinese medicine provided by this invention;

[0034] Figure 2 This is a schematic diagram of a traditional Chinese medicine adherence information assessment system provided by the present invention;

[0035] Figure 3 This is a flowchart illustrating step S2;

[0036] Figure 4 This is a flowchart illustrating step S3.

[0037] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation

[0038] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0039] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0040] Example 1, see Figure 1 The present invention provides a method for assessing the adherence to traditional Chinese medicine, the method comprising the following steps:

[0041] Step S1: Data collection; Collect historical data on patients' adherence to traditional Chinese medicine and their corresponding adherence levels, and perform preprocessing.

[0042] Step S2: Construction of a Traditional Chinese Medicine (TCM) Adherence Information Assessment Model; Calculate the adjusted mixture entropy using the balance coefficient and distribution adjustment index to obtain the class discrimination, label high-discrimination features, calculate the adherence category complexity and feature attribute complexity, introduce a penalty coefficient to obtain the comprehensive adherence complexity, determine the optimal splitting feature and optimal splitting point, recursively construct a decision tree, and construct a total loss function that includes classification loss, structure regularization loss, and feature effectiveness loss;

[0043] Step S3: Model parameter optimization; Construct a parameter search space, divide the elite group and the ordinary group, perform dynamic recombination according to the population recombination probability, construct core template, mutation template and dynamic template respectively, set three strategies based on the templates, update the position of individuals in the elite group, combine elite guidance with random perturbation to update the position of individuals in the ordinary group, and determine the optimal parameter combination.

[0044] Step S4: Assessment of Traditional Chinese Medicine (TCM) Adherence Information; Based on the optimal parameter combination, construct a TCM adherence information assessment model to obtain the real-time adherence level of patients and generate an assessment report.

[0045] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, data collection involves collecting historical patients' Chinese medicine adherence information data and their corresponding adherence levels, and performing preprocessing.

[0046] The data on adherence to traditional Chinese medicine includes patient basic characteristics data, traditional Chinese medicine prescription characteristics data, patient medication behavior characteristics data, and environmental intervention characteristics data;

[0047] The patient's basic characteristics data include age, gender, weight, height, underlying diseases, allergy history, and cognitive function score based on MMSE (Mini Mental State Examination).

[0048] The data on the characteristics of traditional Chinese medicine prescriptions include the dosage form of the traditional Chinese medicine, the number of times the medicine is taken daily, the time of administration of the medicine is taken daily, the dosage of each medicine prescribed, and the total number of days of treatment.

[0049] The patient medication behavior characteristics data include the actual number of times medication is taken per day, the actual dosage of medication is taken per day, the number of times medication is missed per day, the duration of delayed medication is taken per day, and the number of times the dosage is adjusted by the patient himself per day;

[0050] The environmental intervention characteristic data include whether family members supervise medication, the frequency of weekly medical staff follow-up visits, and whether the patient has joined a patient management group;

[0051] The compliance levels include high compliance, medium compliance, and low compliance, and the compliance levels are used as data labels.

[0052] The preprocessing includes data cleaning, data encoding, data normalization, and dataset construction to obtain training and test datasets.

[0053] The data cleaning process involves removing erroneous, missing, and outlier values ​​from the data.

[0054] The data encoding uses One-Hot encoding to convert categorical data into numerical data.

[0055] The data normalization is to use the max-min scaling method to unify numerical data to the range [0, 1].

[0056] The dataset was constructed by dividing historical patients' Chinese medicine adherence information into training and testing datasets in a 7:3 ratio.

[0057] Example 3, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S2, the construction of the traditional Chinese medicine adherence information assessment model specifically includes the following steps:

[0058] Step S21: Discrimination Feature Labeling; Among the many factors affecting the use of traditional Chinese medicine, some features have low information content in distinguishing compliance levels, and direct use will introduce noise and reduce model efficiency; Based on the training dataset, the adjusted mixture entropy of each feature is calculated through the balance coefficient and the distribution adjustment index. The class discrimination of the feature is calculated based on the adjusted mixture entropy. A discrimination threshold is set, and features with a class discrimination of not less than the discrimination threshold are labeled as high discrimination features. A root node is created, which contains the entire training dataset; Focusing on the core indicators that are sensitive to changes in compliance, the interference of irrelevant or weakly correlated features is excluded; The formula used is as follows:

[0059] ;

[0060] ;

[0061] In the formula, In the training dataset D tra The modulated mixing entropy of feature X, where z is the balance coefficient. c is the distribution moderating index. , It is the a-th value of feature X in the training dataset. a The empirical probability, where n is the total number of distinct values ​​of feature X, and D i It is the i-th feature X i The category discrimination is given by Y, where Y is the set of compliance level labels and y is the compliance level index. It is the training dataset D tra The subset of data with a compliance level of y and They are and D tra The amount of data in In the training dataset D tra The i-th feature X i Adjusting the mixing entropy, Is The i-th feature X i Adjusting the mixing entropy;

[0062] Step S22: Subset complexity assessment; When partitioning data subsets, considering only class purity can easily overlook the dispersion of features within subsets and the differences in features between different compliance levels; For each high-discriminative feature in the dataset corresponding to the current node, all possible values ​​are traversed as split points, and a binary split rule is used to divide the dataset into two disjoint subsets. For each feature-split point combination, the compliance class complexity and feature attribute complexity of each subset are calculated, and a penalty coefficient is introduced to obtain the comprehensive compliance complexity of each subset; This ensures that the splitting process not only focuses on the classification results but also on the stability and interpretability of patient features within subsets, avoiding invalid partitions with mixed features and unclear meanings; The formula used is as follows:

[0063] ;

[0064] ;

[0065] ;

[0066] In the formula, It is for feature-split point combination The b-th subset S b The overall complexity of compliance, where λ is the penalty coefficient. , and They are S b The complexity of the dependency category and the complexity of the feature attribute. It is S b The proportion of data with a compliance level of y, where α is the coefficient of variation. , It is S b The coefficient of variation of all data with compliance level y on feature X. It is the total number of categories of compliance levels; It is in S b Given a compliance level of y, the conditional entropy of feature X; β is the inter-class difference coefficient. , It is in S b The maximum absolute difference in the mean of characteristic X among different compliance levels; y1 and y2 are two different levels of compliance. and They are S b The mean of the data with compliance levels y1 and y2 on feature X. It is in S b The range of characteristic X;

[0067] Step S23: Optimal Splitting Selection; Node splitting methods are diverse, and blind splitting can lead to chaotic compliance assessment decision logic and weak model generalization ability. Based on the combined compliance complexity of the two subsets, calculate the overall compliance splitting complexity corresponding to the current feature-split point combination. Iterate through each high-discrimination feature and all its possible split points, selecting the feature-split point combination with the minimum overall compliance splitting complexity. This combination is determined as the optimal splitting feature and optimal splitting point for the current node. Based on this optimal splitting feature and optimal splitting point, divide the current node's dataset into two subsets, create new nodes for each subset, and connect them to the parent node via edges. The formula used is as follows:

[0068] ;

[0069] In the formula, It is a combination of features and split points. The corresponding overall compliance splitting complexity, and It is the combined complexity of the dependency between the two subsets after the split. and It represents the number of data points in the two subsets after the split. It represents the number of data points in the dataset before the split;

[0070] Step S24: Recursive generation of decision tree; Repeat steps S22 to S23 for newly generated nodes, selecting the optimal splitting feature and optimal splitting point for each node in turn, and further generating new nodes, thereby recursively constructing the decision tree. When the dataset corresponding to a node meets any stopping condition, the node stops splitting and becomes a leaf node. The constructed decision tree is used as a model for evaluating the compliance information of traditional Chinese medicine. The stopping conditions include: (1) the compliance level of all data in the node is the same; (2) there are no remaining high-discrimination features in the node for splitting; (3) the number of data in the node is less than the minimum data threshold Th. date , (4) The number of leaf nodes reaches the maximum threshold Th for leaf nodes. node , (5) The depth of the decision tree reaches the maximum depth threshold Th depth , ;

[0071] Step S25: Loss Function Construction; The total loss function is constructed by combining the classification loss term, structure regularization loss term, and feature effectiveness loss term. The classification loss term uses weighted multi-class cross-entropy to address potential class imbalance issues in compliance levels. The structure regularization loss term considers the number of leaf nodes in the decision tree, the average split depth, and the effectiveness of node splits to control model complexity and avoid overfitting. The feature effectiveness loss term quantifies the average discriminative power of the high-discriminative features used during decision tree splitting to enhance the effectiveness of feature selection. The formula used is as follows:

[0072] ;

[0073] ;

[0074] ;

[0075] ;

[0076] In the formula, , , and These are the total loss value, classification loss value, structure regularization loss value, and feature effectiveness loss value. It is the total number of data points in the test dataset. It is the number of data points in the test dataset with a compliance level of y. g If the true compliance level of the g-th test data is... It is an indicator function. N is the probability value for predicting the g-th data point as the compliance level y. left It is the number of leaf nodes that the decision tree eventually generates. It is the maximum threshold of the leaf nodes. d is the average split depth of the decision tree. max It is the maximum depth threshold of the decision tree. It is the set of all non-leaf nodes in the decision tree. Is the number of non-leaf nodes? H is the global dependency splitting complexity when splitting a non-leaf node. max It is the maximum value of the overall dependency splitting complexity for all non-leaf nodes. It is the class discriminative power of the selected feature when splitting a non-leaf node.

[0077] By performing the above operations, this solution addresses the problems in existing methods for assessing adherence to traditional Chinese medicine (TCM) medication, such as the complexity of factors influencing adherence, unclear correlations between features and adherence levels, and the inability to accurately screen core distinguishing features, leading to insufficient accuracy in adherence assessment. This solution adjusts the mixed entropy using a balance coefficient and a distribution adjustment index to obtain class discrimination, labels high-discrimination features, and accurately screens core distinguishing features sensitive to adherence levels, reducing redundant information interference. It calculates the complexity of adherence categories and feature attributes, and introduces a penalty coefficient to obtain the comprehensive complexity of adherence in subsets, making subset partitioning more aligned with clinical patterns and improving the clarity of adherence level distinctions. It determines the optimal splitting features and optimal splitting points, recursively constructing a decision tree. Finally, it constructs a total loss function that includes classification loss, structure regularization loss, and feature effectiveness loss, balancing assessment accuracy, model complexity, and feature quality to reduce false positives and false negatives, thereby improving the stability and accuracy of TCM adherence assessment results.

[0078] Example 4, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S3, the model parameter optimization is performed on the parameters of the traditional Chinese medicine adherence information assessment model based on a swarm intelligence algorithm; specifically, it includes the following steps:

[0079] Step S31: Initialize individual locations; Traditional Chinese medicine (TCM) adherence is influenced by many factors and exhibits significant individual differences. If key model parameters rely on manual setting, it is difficult to adapt to the distribution characteristics of adherence under different conditions, easily leading to assessment bias; The balance coefficient z, distribution moderating index c, penalty coefficient λ, variation influence coefficient α, inter-class difference coefficient β, and minimum data threshold Th are used in the TCM adherence information assessment model. date Maximum threshold for leaf nodes Th node and maximum depth threshold Th depth A parameter search space is constructed, and individual positions are randomly initialized within the parameter search space. Each individual position represents a set of parameter combinations. The total loss value of the Chinese medicine medication adherence information assessment model based on the parameter combinations on the test dataset is used as the fitness value of the corresponding individual position. This approach eliminates the subjectivity and limitations of manual parameter tuning, making the model parameters more closely match the distribution of real clinical adherence data and improving the stability of the assessment basis.

[0080] Step S32: Elite Grouping and Dynamic Reorganization; Traditional Chinese medicine (TCM) adherence data exhibits individual heterogeneity, behavioral fluctuations, and class imbalance. Fixed-parameter search structures are prone to getting trapped in local optima, leading to insufficient identification of patients with low or moderate adherence. All individuals are sorted in ascending order of fitness value. The top 40% of individuals with lower fitness values ​​are grouped into the elite group, and the bottom 60% are grouped into the general group. The population reorganization probability is calculated based on the current iteration number. A random number is generated that follows a uniform distribution (0, 1). If the random number is less than the population recombination probability, a dynamic recombination operation is performed. Dynamic recombination involves randomly selecting one individual from the elite population and one individual from the ordinary population to exchange their population affiliation. Dynamic recombination can break the fixed population structure, avoid premature convergence of the elite population and ineffective exploration by the ordinary population, thereby improving population interactivity and search efficiency. Wherein, ω t It represents the population recombination probability at the t-th iteration, where t is the iteration number index and T is the maximum number of iterations; effectively avoiding premature convergence of the model for typical compliance patterns and improving the ability to identify complex, marginal, and easily missed compliance samples;

[0081] Step S33: Elite Template Construction; Traditional Chinese medicine (TCM) compliance levels are influenced by multiple coupled factors, and a single parameter search direction is difficult to cover complex decision boundaries, easily resulting in weak generalization ability of the evaluation model; The three individuals with the smallest fitness values ​​are selected from the elite group to construct core templates, mutation templates, and dynamic templates respectively; the core template characterizes the core search area of ​​the elite group by averaging the positions of the two optimal individuals; the mutation template introduces differential vectors between elite individuals and superimposes dynamically decaying random perturbations to achieve mutation operations and enrich the search direction; the dynamic template randomly shifts the core template towards the current global optimal position, balancing local mining and global convergence; multi-mode collaborative search is more suitable for TCM compliance evaluation scenarios with multiple coupled factors, improving the accuracy of key parameter positioning; the formulas used are as follows:

[0082] ;

[0083] ;

[0084] ;

[0085] In the formula, , and These are the core template, the mutated template, and the dynamic template at the t-th iteration. , and These are the positions of the individuals with the smallest, second smallest, and third smallest fitness values ​​in the elite population at the t-th iteration, respectively. randn is a random vector that follows a standard normal distribution, and rand is a random number that follows a uniform distribution in [0, 1].

[0086] Step S34: Elite Group Update; Generate a random number uniformly distributed in [0, 1] for each individual position in the elite group. Based on the value range of the random number, select the corresponding strategy from three strategies to update the individual position; First strategy: Perform local fine mining centered on the core template; Second strategy: Implement elite individual mutation based on the mutation template to avoid homogenization of the elite group; Third strategy: Utilize the dynamic template to shift towards the global optimal position, balancing local mining and global convergence; The formulas used are as follows:

[0087] ;

[0088] In the formula, and These are the positions of the m-th individual in the elite group at the (t+1)-th and t-th iterations, respectively. It is the mining depth factor in the t-th iteration. , is the random number corresponding to the position of the m-th individual in the elite group at the t-th iteration, and ub and lb are the upper and lower bounds of the parameter search space, respectively;

[0089] Step S35: Update the general population; a large number of parameter combinations converge slowly, which will slow down the overall optimization efficiency and make it difficult to meet the needs of real-time, batch compliance assessment in clinical practice; combine elite guidance with random perturbation to update the individual positions in the general population; improve parameter optimization efficiency while ensuring assessment accuracy; the formula used is as follows:

[0090] ;

[0091] In the formula, and These are the positions of the u-th individual in the ordinary population at the (t+1)-th and t-th iterations, respectively;

[0092] Step S36: Determine the optimal parameter combination; update the fitness values ​​of all individual locations, and determine whether there are any individual locations whose fitness values ​​are lower than the preset fitness threshold. If the optimal parameter combination exists, the parameter optimization process ends. Otherwise, it is determined whether the maximum number of iterations has been reached. If it has been reached, the process returns to step S31 to reinitialize the individual position and start a new round of search. If it has not been reached, the iteration count is incremented by 1, and the process returns to step S32 to continue iterative optimization.

[0093] By performing the above operations, this solution addresses the problems of existing methods for assessing adherence to traditional Chinese medicine (TCM) medication, such as significant individual patient differences, complex clinical data distribution, and the difficulty of adapting traditional parameter optimization methods to the real clinical data distribution, leading to weak adherence identification capabilities and poor stability of assessment results. This solution constructs a parameter search space, dividing the population into elite and general groups, and dynamically recombines the data based on population recombination probability to enhance the global search capability of parameter optimization and improve the identification coverage of various adherence patterns. It constructs core templates, variant templates, and dynamic templates to form multi-pattern collaborative optimization, which better reflects the real clinical data distribution and improves the search accuracy of key assessment parameters. Based on the template settings, three strategies are used to update the individual positions in the elite group, balancing local fine-tuning with global optimal guidance to improve adaptability to different patient individuals. Finally, elite guidance is combined with random perturbation to update the individual positions in the general group, determining the optimal parameter combination, accelerating parameter optimization efficiency, improving practicality while ensuring assessment accuracy, and significantly enhancing the stability of assessment results.

[0094] Example 5, see Figure 1 This embodiment is based on the above embodiment. In step S4, the assessment of Chinese medicine adherence information involves collecting real-time patient data on Chinese medicine adherence, preprocessing it, and inputting it into a Chinese medicine adherence information assessment model constructed based on the optimal parameter combination to obtain the real-time patient's adherence level and generate an assessment report.

[0095] Example 6, see Figure 2 Based on the above embodiments, this embodiment provides a traditional Chinese medicine (TCM) medication adherence information assessment system, including a data acquisition module, a TCM medication adherence information assessment model construction module, a model parameter optimization module, and a TCM medication adherence information assessment module.

[0096] The data acquisition module collects historical data on patients' adherence to traditional Chinese medicine and their corresponding adherence levels, performs preprocessing, and sends the data to the traditional Chinese medicine adherence information assessment model construction module.

[0097] The traditional Chinese medicine (TCM) medication adherence information assessment model construction module calculates and adjusts the mixed entropy using a balance coefficient and a distribution adjustment index to obtain the class discrimination, labels high-discrimination features, calculates the compliance class complexity and feature attribute complexity, introduces a penalty coefficient to obtain the comprehensive compliance complexity, determines the optimal splitting feature and the optimal splitting point, recursively constructs a decision tree, constructs a total loss function including classification loss, structure regularization loss, and feature effectiveness loss, and sends the data to the model parameter optimization module.

[0098] The model parameter optimization module constructs a parameter search space, divides the elite group and the ordinary group, performs dynamic recombination according to the population recombination probability, constructs core templates, mutation templates and dynamic templates respectively, sets three strategies based on the templates, updates the position of individuals in the elite group, combines elite guidance with random perturbation to update the position of individuals in the ordinary group, determines the optimal parameter combination, and sends the data to the traditional Chinese medicine adherence information evaluation module.

[0099] The TCM medication adherence information assessment module constructs a TCM medication adherence information assessment model based on the optimal parameter combination, obtains the real-time patient's corresponding adherence level, and generates an assessment report.

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

[0101] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.

[0102] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.

Claims

1. A method for assessing adherence information in traditional Chinese medicine, characterized in that: The method includes the following steps: Step S1: Data collection; Collect historical data on patients' adherence to traditional Chinese medicine and their corresponding adherence levels, and perform preprocessing. Step S2: Construction of a Traditional Chinese Medicine (TCM) Adherence Information Assessment Model; Calculate the adjusted mixture entropy using the balance coefficient and distribution adjustment index to obtain the class discrimination, label high-discrimination features, calculate the adherence category complexity and feature attribute complexity, introduce a penalty coefficient to obtain the comprehensive adherence complexity, determine the optimal splitting feature and optimal splitting point, recursively construct a decision tree, and construct a total loss function that includes classification loss, structure regularization loss, and feature effectiveness loss; Step S3: Model parameter optimization; Construct a parameter search space, divide the elite group and the ordinary group, perform dynamic recombination according to the population recombination probability, construct core template, mutation template and dynamic template respectively, set three strategies based on the templates, update the position of individuals in the elite group, combine elite guidance with random perturbation to update the position of individuals in the ordinary group, and determine the optimal parameter combination. Step S4: Assessment of Traditional Chinese Medicine (TCM) Adherence Information; Based on the optimal parameter combination, construct a TCM adherence information assessment model to obtain the real-time adherence level of patients and generate an assessment report.

2. The method for assessing adherence to traditional Chinese medicine as described in claim 1, characterized in that: In step S2, the construction of the traditional Chinese medicine adherence information assessment model specifically includes the following steps: Step S21: Discrimination feature labeling; Based on the training dataset, calculate the adjusted mixture entropy of each feature using the balance coefficient and the distribution adjustment index, calculate the class discrimination of the feature based on the adjusted mixture entropy, set the discrimination threshold, label the features with class discrimination not lower than the discrimination threshold as high discrimination features, and create a root node containing the entire training dataset. Step S22: Evaluation of the complexity of subset partitioning; Step S23: Optimal split selection; Step S24: Recursively generate the decision tree; Repeat steps S22 to S23 for the newly generated nodes, select the optimal splitting feature and the optimal splitting point for each node in turn, and generate new nodes in a recursive manner to build the decision tree. When the dataset corresponding to a node meets any stopping condition, the node stops splitting and becomes a leaf node. The constructed decision tree is used as a model for evaluating the compliance information of traditional Chinese medicine. Step S25: Loss function construction; combine the classification loss term, structure regularization loss term, and feature validity loss term to construct the total loss function.

3. The method for assessing adherence to traditional Chinese medicine as described in claim 2, characterized in that: In step S22, the subset partitioning complexity evaluation is performed by taking each high-discriminative feature in the dataset corresponding to the current node as a split point, traversing all possible values ​​of the feature as a split point, and using a binary partitioning rule to divide the dataset into two non-overlapping subsets. For each feature-split point combination, the compliance category complexity and feature attribute complexity of each subset are calculated, and a penalty coefficient is introduced to obtain the comprehensive compliance complexity of each subset.

4. The method for assessing adherence to traditional Chinese medicine as described in claim 2, characterized in that: In step S23, the optimal split selection is based on the overall compliance split complexity of the two subsets. The overall compliance split complexity corresponding to the current feature-split point combination is calculated, each high-discrimination feature and all its possible split points are traversed, and the feature-split point combination with the smallest overall compliance split complexity is selected. This combination is determined as the optimal split feature and optimal split point for the current node. Based on this optimal split feature and optimal split point, the dataset of the current node is divided into two subsets, and a new node is created for each subset and connected to the parent node through an edge.

5. The method for assessing adherence to traditional Chinese medicine as described in claim 1, characterized in that: In step S3, the model parameter optimization is performed on the parameters of the traditional Chinese medicine adherence information assessment model based on a swarm intelligence algorithm; specifically, it includes the following steps: Step S31: Initialize individual positions; construct a parameter search space, randomly initialize individual positions within the parameter search space, use each individual position to represent a set of parameter combinations, and use the total loss value of the Chinese medicine administration compliance information evaluation model established based on the parameter combinations on the test dataset as the fitness value of the corresponding individual position. Step S32: Elite segmentation and dynamic reorganization; Step S33: Elite Template Construction; Step S34: Elite Group Update; Generate a random number for the position of each individual in the elite group, and select the corresponding strategy from three strategies to update the individual position based on the value range of the random number; Step S35: Update the general population; combine elite guidance with random perturbation to update the position of individuals in the general population; Step S36: Determine the optimal parameter combination; update the fitness values ​​of all individual positions, and determine whether there are any individual positions whose fitness values ​​are lower than the preset fitness threshold. If so, the parameter combination corresponding to that individual position is the optimal parameter combination, and the parameter optimization process ends; otherwise, determine whether the maximum number of iterations has been reached. If it has been reached, return to step S31 to reinitialize the individual positions and start a new round of search; if it has not been reached, increment the iteration count by 1 and return to step S32 to continue iterative optimization.

6. The method for assessing adherence to traditional Chinese medicine as described in claim 5, characterized in that: In step S32, the elite division and dynamic recombination involves arranging all individuals in ascending order of fitness value, classifying the top 40% of individuals with lower fitness values ​​into the elite group, and classifying the bottom 60% into the ordinary group. The population recombination probability is calculated based on the current iteration number, and a random number is generated. If the random number is less than the population recombination probability, the dynamic recombination operation is performed.

7. The method for assessing adherence to traditional Chinese medicine as described in claim 5, characterized in that: In step S33, the elite template construction involves selecting the three individuals with the lowest fitness values ​​from the elite population and constructing the core template, the mutation template, and the dynamic template, respectively.

8. The method for assessing adherence to traditional Chinese medicine as described in claim 1, characterized in that: In step S1, the data collection involves collecting historical patients' Chinese medicine (TCM) adherence information and their corresponding adherence levels, and then preprocessing the data. The TCM adherence information includes patient basic characteristic data, TCM prescription characteristic data, patient medication behavior characteristic data, and environmental intervention characteristic data. The adherence levels include high adherence, medium adherence, and low adherence, and the adherence levels are used as data labels. The preprocessing includes data cleaning, data encoding, data normalization, and dataset construction to obtain training and test datasets.

9. The method for assessing adherence to traditional Chinese medicine as described in claim 1, characterized in that: In step S4, the assessment of TCM medication adherence information involves collecting real-time TCM medication adherence information data from patients, preprocessing it, and then inputting it into a TCM medication adherence information assessment model constructed based on the optimal parameter combination to obtain the real-time patient's corresponding adherence level and generate an assessment report.

10. A system for assessing adherence to traditional Chinese medicine (TCM) medication, used to implement the method for assessing adherence to TCM medication as described in any one of claims 1-9, characterized in that: It includes a data acquisition module, a traditional Chinese medicine (TCM) medication adherence information assessment model construction module, a model parameter optimization module, and a TCM medication adherence information assessment module; The data acquisition module collects historical data on patients' adherence to traditional Chinese medicine and their corresponding adherence levels, performs preprocessing, and sends the data to the traditional Chinese medicine adherence information assessment model construction module. The traditional Chinese medicine (TCM) medication adherence information assessment model construction module calculates and adjusts the mixed entropy using a balance coefficient and a distribution adjustment index to obtain the class discrimination, labels high-discrimination features, calculates the compliance class complexity and feature attribute complexity, introduces a penalty coefficient to obtain the comprehensive compliance complexity, determines the optimal splitting feature and the optimal splitting point, recursively constructs a decision tree, constructs a total loss function including classification loss, structure regularization loss, and feature effectiveness loss, and sends the data to the model parameter optimization module. The model parameter optimization module constructs a parameter search space, divides the elite group and the ordinary group, performs dynamic recombination according to the population recombination probability, constructs core templates, mutation templates and dynamic templates respectively, sets three strategies based on the templates, updates the position of individuals in the elite group, combines elite guidance with random perturbation to update the position of individuals in the ordinary group, determines the optimal parameter combination, and sends the data to the traditional Chinese medicine adherence information evaluation module. The TCM medication adherence information assessment module constructs a TCM medication adherence information assessment model based on the optimal parameter combination, obtains the real-time patient's corresponding adherence level, and generates an assessment report.