A traditional Chinese medicinal material database management method, system, storage medium and equipment terminal

CN122412488BActive Publication Date: 2026-10-23GUIZHOU JIANYI MEASUREMENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610886345.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-23
Estimated Expiration
2046-06-18

AI Technical Summary

Technical Problem

中药材数据库的管理模式多以静态化存储为主,通过对采集到的特征数据进行格式规整、分类存储,实现数据的查询与调用,但其在数据与道地性相关要素的关联管理上缺乏针对性设计,未充分考虑中药材特征数据的动态属性与道地性认定标准的关联性,难以满足精准鉴别与可靠溯源的实际需求

Benefits of technology

1.通过对中药材特征数据序列实施多层级的动态关联分析,有效提升了道地性鉴别的精确性,传统方法依赖于静态阈值比对,难以区分因环境变化引起的自然波动与非道地产区的本质差异,本方案利用关联约束规则进行初步筛查,聚焦于特征间的内在关系而非孤立数值,进而提取动态波动模式、特征间关联模式及环境因子数据进行融合分析,通过识别不稳定特征群组及其协同性突变节点,并结合环境时序变化进行溯源推断,从数据关联网络、时间动态变化及外部环境耦合多个维度构建了综合诊断逻辑,从而能够更准确地判定数据异常的根本原因是可接受的产区环境胁迫还是指示非道地性的生长条件,解决了传统数据库管理方法在鉴别精准度上的不足。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122412488B_ABST
    Figure CN122412488B_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicinal material database management method and system, a storage medium and an equipment terminal, and particularly relates to the technical field of traditional Chinese medicinal material database management, and is used for solving the problems that the existing traditional Chinese medicinal material database is difficult to distinguish the natural fluctuation of characteristic data and the difference of non-native producing areas and the dynamic updating of the genuineness standard; the characteristic data sequence and the genuineness standard data set are acquired, the preliminary judgment is made by using the correlation constraint rule, the dynamic fluctuation mode, the producing area environmental factor data and the correlation mode among characteristics are extracted when the rule is violated, the variation of the correlation mode among characteristics is analyzed to identify the unstable characteristic group, the initial driving factor type causing the violation is inferred by combining the key abnormal fluctuation node in the dynamic fluctuation mode and the change of the environmental factor sequence, the genuineness standard data set is adaptively updated or the non-native producing area traceability identification is added for the characteristic data sequence according to the driving factor type, and the accuracy of genuineness identification and traceability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Chinese medicinal herb database management technology, and more specifically, to a Chinese medicinal herb database management method, system, storage medium, and device terminal. Background Technology

[0002] The identification of the origin and traceability of traditional Chinese medicinal materials (TCM) are crucial for ensuring their quality and the healthy development of the industry. This relies heavily on the effective management and application of TCM characteristic data. Current TCM databases primarily store characteristic data such as active ingredients and minerals, and link them to production areas and testing information, providing foundational data for the construction of origin identification models and traceability queries. However, the management model of TCM databases is mostly static, formatting and classifying the collected characteristic data for querying and retrieval. This approach lacks targeted design in the management of the correlation between data and origin-related elements, failing to fully consider the dynamic attributes of TCM characteristic data and the correlation with origin identification standards, thus failing to meet the actual needs of accurate identification and reliable traceability.

[0003] The existing database of Chinese medicinal materials lacks a collaborative management mechanism for dynamic characteristic data and authenticity standards. It cannot effectively distinguish between the natural fluctuations of characteristic data and the differences between non-authentic producing areas, and it is difficult to adapt to the updates of authenticity standards. As a result, the accuracy of authenticity identification results is insufficient, and the rationality and timeliness of authenticity traceability cannot be guaranteed. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method, system, storage medium and device terminal for managing a database of Chinese medicinal materials to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for managing a database of traditional Chinese medicinal materials, comprising: S1. Obtain the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data at multiple time points and their corresponding production area identifiers. S2. Extract the association constraint rules between key features defined based on historical data from the locality standard dataset, and determine whether the feature data in the feature data sequence violates the association constraint rules. S3. When the association constraint rules are violated, extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier; S4. Extract the correlation data between multiple key features in the feature data sequence to form the correlation pattern between features; S5. Analyze the variation of the correlation pattern between features relative to the historical baseline to identify unstable feature pairs. Combine the abnormal fluctuation nodes of unstable feature pairs in the dynamic fluctuation pattern with the corresponding changes in the environmental factor data of the production area to infer the initial driving factors that lead to the violation of the correlation constraint rules. S6. Update the locality standard dataset based on the initial driving factors or add traceability identifiers for non-local producing areas.

[0006] Furthermore, S1 includes: Feature data containing multiple time points was obtained by querying the detection database; The production area identifier is obtained by querying the production area information database; Feature data is correlated and matched with production area identifiers based on time points to generate feature data sequences; Read the pre-built locality standard dataset from the standard rule base.

[0007] Furthermore, S2 includes: Read the association constraint rules that record the associated feature pairs and their numerical ranges from the locality standard dataset; Extract feature data corresponding to the associated feature pairs from the feature data sequence; The actual relationship value is calculated based on the feature data corresponding to the acquired and associated features; The actual relation values ​​are compared with the numerical ranges recorded in the association constraint rules to determine whether the feature data violates the association constraint rules.

[0008] Furthermore, S3 includes: The values ​​of each feature at multiple time points are separated from the feature data sequence to form time series data; To construct dynamic fluctuation patterns by calculating the changing trends and fluctuation amplitudes of characteristics based on time series data; Based on the production area identification, query the environmental database to obtain environmental factor data associated with the production area identification at the corresponding time point as the production area environmental factor data.

[0009] Furthermore, S4 includes: Identify multiple key features to be analyzed from the feature data sequence; For each time point, feature data values ​​corresponding to multiple key features are extracted to form a feature vector; Calculate the correlation coefficient between every two key features based on the feature vectors at all time points; A correlation coefficient matrix is ​​constructed from all the calculated correlation coefficients, and the correlation coefficient matrix is ​​used as the association pattern between features.

[0010] Furthermore, S5 includes: The correlation patterns between features are compared with historical benchmarks, and feature pairs whose correlation coefficient changes exceed the preset tolerance range are identified as candidate unstable feature pairs. Analyze the connections between candidate unstable feature pairs and aggregate multiple candidate unstable feature pairs that share the same key feature into an unstable feature group; For each unstable feature group, the common time point in the dynamic fluctuation mode where all features in the group undergo coordinated mutations is identified as the key abnormal fluctuation node. Extract the environmental factor sequences most relevant to the physiological characteristics of unstable characteristic groups within a preset time period before and after key abnormal fluctuation nodes from the environmental factor data of the production area; By combining the composition of unstable feature groups, the temporal characteristics of key abnormal fluctuation nodes, and the mutation patterns of environmental factor sequences, we can infer the type of initial driving factor that leads to the violation of the association constraint rules.

[0011] Furthermore, S6 includes: In response to the initial driving factor being determined to originate from environmental stress in the production area, data of unstable feature groups near key abnormal fluctuation nodes are included in the locality standard dataset, and the association constraint rules are recalculated accordingly. In response to the initial driving factor being determined to originate from non-authentic growth conditions, a non-authentic production area traceability identifier containing production area identification and unstable characteristic group information is generated and stored in association with the characteristic data sequence.

[0012] On the other hand, the present invention provides a database management system for traditional Chinese medicinal materials, comprising: The standard acquisition module is used to acquire the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data at multiple time points and their corresponding production area identifiers. The rule extraction module is used to extract the association constraint rules between key features defined based on historical data from the locality standard dataset, and to determine whether the feature data in the feature data sequence violates the association constraint rules. The environment extraction module is used to extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier when the association constraint rules are violated. The association construction module is used to extract the association relationship data between multiple key features in the feature data sequence to form the association pattern between features. The factor inference module is used to analyze the variation of the correlation pattern between features relative to the historical baseline to identify unstable feature pairs. By combining the abnormal fluctuation nodes of unstable feature pairs in the dynamic fluctuation pattern and the corresponding changes in the environmental factor data of the production area, the initial driving factors that lead to the violation of the correlation constraint rules are inferred. The source update module is used to update the locality standard dataset or add source identifiers for non-local producing areas based on the initial driving factors.

[0013] On the other hand, the present invention provides a storage medium on which programs or instructions are stored, and when the programs or instructions are executed by a processor, a method for managing a database of traditional Chinese medicine materials is implemented.

[0014] On the other hand, the present invention provides a device terminal, which includes: a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, a method for managing a database of traditional Chinese medicine materials is implemented.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. By implementing multi-level dynamic correlation analysis on the characteristic data sequences of Chinese medicinal materials, the accuracy of authenticity identification is effectively improved. Traditional methods rely on static threshold comparison, which makes it difficult to distinguish between natural fluctuations caused by environmental changes and the essential differences between non-authentic producing areas. This solution uses correlation constraint rules for preliminary screening, focusing on the intrinsic relationship between features rather than isolated values. Then, it extracts dynamic fluctuation patterns, correlation patterns between features, and environmental factor data for fusion analysis. By identifying unstable feature groups and their synergistic mutation nodes, and combining them with environmental time-series changes for source inference, a comprehensive diagnostic logic is constructed from multiple dimensions such as data correlation network, time dynamic changes, and external environment coupling. This enables a more accurate determination of whether the root cause of data anomalies is acceptable environmental stress in the producing area or indicates non-authentic growth conditions, thus solving the shortcomings of traditional database management methods in terms of identification accuracy.

[0016] 2. A data-driven adaptive update mechanism for the authenticity standard and a problem data identification mechanism have been established, enhancing the intelligence of database management and the reliability of traceability. Traditional database standard updates are lagging and rely on manual intervention, failing to adapt to dynamic data changes. This solution directly translates in-depth analysis conclusions into management actions: when the natural fluctuations are determined to be caused by environmental stress, the relevant data is automatically included in the historical set and the association constraint rules are recalculated, enabling the standard to evolve dynamically with real-world data; when the factors are determined to be non-authentic factors, a traceability identifier containing specific abnormal characteristics is automatically generated and associated with the data. This not only achieves the co-evolution of the authenticity identification standard and real-time monitoring data, but also provides a clear traceability management record for each batch of medicinal materials, thereby ensuring the rationality and timeliness of traceability conclusions from a mechanism perspective. Attached Figure Description

[0017] Figure 1 This is a flowchart of a method for managing a database of traditional Chinese medicinal materials according to the present invention; Figure 2 This is a schematic diagram of the structure of a Chinese medicinal herb database management system according to the present invention. Detailed Implementation

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

[0019] Example 1: Figure 1 This invention provides a method for managing a database of traditional Chinese medicinal materials, comprising: S1. Obtain the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data at multiple time points and their corresponding production area identifiers. S2. Extract the association constraint rules between key features defined based on historical data from the locality standard dataset, and determine whether the feature data in the feature data sequence violates the association constraint rules. S3. When the association constraint rules are violated, extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier; S4. Extract the correlation data between multiple key features in the feature data sequence to form the correlation pattern between features; S5. Analyze the variation of the correlation pattern between features relative to the historical baseline to identify unstable feature pairs. Combine the abnormal fluctuation nodes of unstable feature pairs in the dynamic fluctuation pattern with the corresponding changes in the environmental factor data of the production area to infer the initial driving factors that lead to the violation of the correlation constraint rules. S6. Update the locality standard dataset based on the initial driving factors or add traceability identifiers for non-local producing areas.

[0020] S1. Obtain the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data from multiple time points and their corresponding production area identifiers. The specific implementation is as follows: The system retrieves feature data containing multiple time points from the testing database. This database is a structured database storing testing results for traditional Chinese medicine (TCM) materials. Each record corresponds to a single test of a specific batch of TCM samples. A single test record contains multiple feature data points, which are numerical results obtained through physicochemical testing and analysis of the TCM sample, such as the content of active ingredients and minerals. Active ingredient content may include, for example, the content of chlorogenic acid, catalpol, or salvianolic acid B. Mineral content may include, for example, the content of calcium, magnesium, or zinc. Each test record contains a unique test number and the sample collection time. The collection time records the specific date or date and time the sample was collected, identifying the time attribute of the feature data. The system completes the query by submitting a structured query statement to the testing database. The structured query statement includes the name of the desired TCM variety as a filter condition. The testing database returns all test records that meet the conditions. Each test record contains a test number, collection time, and multiple feature data points.

[0021] The origin identification is retrieved from the origin information database. This database is a relational database storing information about the origins of Chinese medicinal herbs. Each record in the database is associated with a specific planting or harvesting area. Records in the origin information database contain an origin identification field, a code that uniquely identifies a specific origin. The origin identification may consist of a combination of a provincial-level administrative division code, a county-level administrative division code, and a geographic location code. Records in the origin information database also contain association keys that link to test records in the testing database. These association keys are test numbers or other identifiers that can establish a connection with the test records. A structured query is submitted to the origin information database, using the association keys from the test records retrieved from the testing database as query conditions. The origin information database returns the origin identification field content of the records matching the association keys.

[0022] Feature data is correlated and matched with production area identifiers based on time points to generate a feature data sequence. The correlation and matching process is completed by a data processing program. The data processing program reads multiple test records obtained from the testing database. Each test record contains a collection time point, a test number, and multiple feature data. Simultaneously, the data processing program reads the production area identifiers corresponding to each test number from the production area information database. Using the collection time point as a reference, the data processing program combines multiple feature data points at the same collection time point with the corresponding production area identifier to form a data unit. Each data unit contains the collection time point, the production area identifier, and all feature data detected at that time point. When multiple data units exist at different collection time points, the data processing program arranges these data units into an ordered list according to the chronological order of the collection time points. This ordered list constitutes the feature data sequence. The feature data sequence records the changes in feature data of medicinal herbs from the same source at multiple different time points and their corresponding fixed production area identifiers.

[0023] The system reads a pre-built standard dataset of authenticity from the standard rule base. The standard rule base is a dedicated database or file storage system that stores the standards for determining the authenticity of various Chinese medicinal materials. The authenticity standard dataset is a set of standard data and rules pre-built and stored in the standard rule base for a specific variety of Chinese medicinal material. The reading operation is completed by specifying the name of the Chinese medicinal material variety and calling the data access interface of the standard rule base or executing the corresponding data reading command. The obtained authenticity standard dataset contains a historical authentic medicinal material association pattern benchmark and association constraint rules between key features defined based on historical data. The historical authentic medicinal material association pattern benchmark is a reference model established based on historically accumulated and verified authentic medicinal material feature data. It is established through statistical analysis of the association relationships between multiple key features in the authentic medicinal material feature data. The historical authentic medicinal material association pattern benchmark is represented as a correlation coefficient matrix or a set of parameters describing the strength of the association between features. The association constraint rules between key features defined based on historical data are a quantitative description of the stable relationships between specific feature pairs in the historical authentic medicinal material feature data. A single association constraint rule explicitly defines a pair of associated features consisting of two or more key features and specifies a numerical range for each pair. This numerical range is determined by statistically analyzing the distribution of the actual relationship values ​​corresponding to the associated feature pairs in historical data on authentic medicinal materials, selecting a specific percentile interval from the distribution, such as the interval from the 5th percentile to the 95th percentile. The actual relationship value is a numerical value calculated from the feature data that characterizes the relationship between the associated feature pairs; it is the ratio or difference of the content of two features, or a value obtained after other mathematical transformations. The obtained authenticity standard dataset provides a benchmark and basis for subsequent judgment and analysis steps. The entire acquisition process ensures that the feature data sequence and the authenticity standard dataset are completely and accurately extracted and prepared for use in subsequent steps.

[0024] S2. Extract association constraint rules between key features defined based on historical data from the locality standard dataset, and determine whether the feature data in the feature data sequence violates the association constraint rules. The specific implementation is as follows: This process retrieves association constraint rules containing associated feature pairs and their numerical ranges from the authenticity standard dataset. The authenticity standard dataset is stored in the standard rule library. The retrieval operation is achieved by calling the standard rule library's application programming interface (API) or executing a data query command, specifying the name of the medicinal herb variety in the query command to obtain the corresponding authenticity standard dataset. The authenticity standard dataset contains one or more association constraint rules. Each association constraint rule is a structured data record. Each association constraint rule contains associated feature pairs and numerical ranges. The associated feature pairs explicitly list the names of two or more key features. Key features are specific detection indicators in the characteristic data of medicinal herb varieties. For example, an association constraint rule might list the names of the key features chlorogenic acid content and the key feature catalpol content. The numerical range is the allowed range of values ​​for the associated feature pairs. The lower and upper limits of the numerical range are determined by analyzing the statistical distribution of the actual relationship values ​​corresponding to the associated feature pairs in historical authentic medicinal herb characteristic data. The actual relationship value is a numerical value calculated based on the characteristic data, representing the relationship between the associated feature pairs. The specific method for determining the numerical range includes collecting historical characteristic data of authentic medicinal materials. For each historical data set, based on the key feature names included in the correlation features, the corresponding feature values ​​are extracted from the feature data. Then, the actual correlation value corresponding to this historical data is calculated according to a preset correlation calculation formula. After obtaining all historical actual correlation values, these values ​​are sorted. The value corresponding to the 5th percentile of the sorted sequence is taken as the lower limit of the numerical range, and the value corresponding to the 95th percentile of the sorted sequence is taken as the upper limit of the numerical range, thus forming a numerical range. The selection of the 5th and 95th percentiles is to cover the main distribution range of historical data and allow for natural fluctuations. The read operation loads all the correlation constraint rules stored in the authenticity standard dataset into the computer memory.

[0025] The feature data corresponding to the associated feature pairs is obtained from the feature data sequence. The feature data sequence is generated in the preceding steps. The feature data sequence contains multiple data units arranged in chronological order. Each data unit contains the collection time point, production area identifier, and multiple feature data obtained from the collection time point. Multiple feature data are organized in key-value pairs, where the key is the feature name and the value is the corresponding feature value. The acquisition process is performed independently for each association constraint rule read from the authenticity standard dataset. For the currently processed association constraint rule, the program parses the associated feature pairs contained in the association constraint rule to obtain the names of all key features listed in the associated feature pairs. The program traverses each data unit in the feature data sequence. When traversing a single data unit, the program searches for matching feature names in the multiple feature data stored in the data unit based on the key feature names and extracts the feature values ​​corresponding to the feature names. For example, if the associated feature pair contains the key features chlorogenic acid content and the key feature catalpol content, then the program searches for feature data with the feature name "chlorogenic acid content" in the data unit to obtain the feature value, denoted as value A; and simultaneously searches for feature data with the feature name "catalpol content" to obtain the feature value, denoted as value B. Values ​​A and B are the feature data corresponding to the associated feature pair at the acquisition time point. The program performs search and extraction operations on each data unit in the feature data sequence, thereby obtaining a set of feature data corresponding to the associated feature pair for each acquisition time point.

[0026] The actual relationship value is calculated based on the feature data corresponding to the acquired associated feature pairs. The calculation process is performed separately for each association constraint rule and each data acquisition point. For a given association constraint rule and a data acquisition point, the input parameter is the feature data corresponding to the associated feature pair of the association constraint rule, obtained from the data unit corresponding to the data acquisition point. The mathematical relationship used to calculate the actual relationship value is specified by the implicit definition of the association constraint rule or by additionally stored metadata. One mathematical relationship is a ratio relationship. Under a ratio relationship, the actual relationship value is equal to the ratio of the two feature values ​​extracted from the feature data. For example, if the feature data corresponding to the associated feature pair obtained from the data unit are value A and value B, and the rule specifies calculating the ratio A / B, then the actual relationship value is equal to the quotient obtained by dividing value A by value B. Another mathematical relationship is a difference relationship. Under a difference relationship, the actual relationship value is equal to the difference between two feature values, such as value A minus value B. To ensure correct calculation, it is necessary to confirm that the feature values ​​involved in the calculation are comparable or have been standardized before performing the calculation. For example, when calculating the ratio, value A and value B are required to have the same unit of measurement. If the units of the original feature data are inconsistent, they need to be converted according to the unit conversion relationship, for example, converting milligrams per gram to grams per kilogram, to unify the units before calculation. The calculation is implemented in the computer program through arithmetic operations. The program reads values ​​A and B, performs division or subtraction according to the specified mathematical relationship, and stores the calculation result as the actual relational value. The actual relational value is a floating-point number or an integer.

[0027] The actual relation value is compared with the numerical range recorded in the association constraint rules to determine whether the feature data violates the association constraint rules. The comparison and judgment process is performed for each association constraint rule and each acquisition time point in the feature data sequence. Input parameters include the actual relation value at the acquisition time point, and the lower limit and upper limit of the numerical range read from the association constraint rules. The comparison logic determines whether the actual relation value falls within the closed interval defined by the numerical range. Let the lower limit of the numerical range be L, the upper limit be U, and the actual relation value be R. The judgment condition is: if R is greater than or equal to L and less than or equal to U, then the feature data does not violate the association constraint rules at the acquisition time point; if R is less than L or greater than U, then the feature data violates the association constraint rules at the acquisition time point. The program executes the logical judgment in the computer, generating a Boolean judgment result for each acquisition time point. The feature data sequence contains multiple time points; the overall judgment of whether the feature data sequence violates the association constraint rules is based on a synthesis of the individual judgment results of all time points. A comprehensive judgment is made by calculating the violation ratio. A violation ratio threshold is set. The program counts the number of individual results identified as violating association constraint rules across all data collection time points, and calculates the violation ratio as the proportion of these violations to the total number of data points. If the violation ratio is greater than or equal to a violation ratio threshold, the feature data sequence is ultimately determined to violate the association constraint rules; otherwise, it is determined not to violate them. The entire comparison and judgment process is executed automatically by the program, and the output is the final conclusion regarding whether the feature data sequence violates the association constraint rules.

[0028] The violation rate threshold is set based on actual monitoring needs and data analysis objectives. This threshold measures the tolerable proportion of occasional abnormal data. If the proportion of abnormal data consistently exceeds this limit, it indicates a systemic deviation. For example, for long-term monitoring scenarios with high stability requirements, the threshold can be set to 10%; for routine screening scenarios that allow for some natural fluctuations, the threshold can be set to 30% or 40%. The specific threshold value is pre-configured during system deployment and can be adjusted later based on management experience.

[0029] S3. When the association constraint rules are violated, extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier. The specific implementation is as follows: The feature data sequence is used to extract the values ​​of each feature at multiple time points to form time series data. The feature data sequence is a data structure generated in the preceding steps. It contains multiple data units arranged in order of collection time points. Each data unit contains the collection time point, production area identifier, and multiple feature data points detected at that time point. These feature data points are organized as key-value pairs corresponding to feature names and values. The separation operation is performed by the data processing program. The data processing program parses the feature data sequence, identifying all unique feature names. For example, identified feature names include chlorogenic acid content and catalpol content. For each identified feature name, the data processing program initializes an empty list to store the time series data corresponding to that feature name. The data processing program sequentially traverses each data unit in the feature data sequence. For each traversed data unit, the program reads the collection time point and searches for a matching feature name among the multiple feature data points contained in the data unit, based on the currently being processed feature name. When a matching feature name is found, the data processing program extracts the corresponding feature value. The data processing program pairs the extracted feature values ​​with the data unit's acquisition time point and appends the paired data to the list corresponding to the feature name. After traversing all data units in the feature data sequence, the list corresponding to each feature name stores a series of value pairs arranged in chronological order of acquisition time points. Each value pair contains an acquisition time point and a feature value. This list constitutes the time series data corresponding to the feature name.

[0030] Dynamic fluctuation patterns are constructed by calculating the changing trends and fluctuation amplitudes of features based on time series data. The process of constructing dynamic fluctuation patterns is performed independently for each feature's time series data. The input parameter is the feature's time series data. The goal of calculating the changing trend is to quantify the overall direction and rate of change of the feature value over time. The method for calculating the changing trend is to calculate the slope of a linear regression. The data collection time points are converted into continuous values ​​counted from the starting point. The earliest data collection time point is denoted as time point 1, and subsequent data collection time points are denoted as time point 2 and time point 3, respectively. Let the converted time point value be X, and the feature value corresponding to time point value X be Y.

[0031] The formula for calculating the slope K is: K = [n∑(XY) - ∑X∑Y] / [n∑(X 2 )-(∑X) 2]; where n is the total number of time points, and ∑ represents the summation operation. The calculated slope K is the quantified value of the trend. A positive slope indicates that the characteristic value is trending upward over time, while a negative slope indicates a downward trend. The absolute value of the slope indicates the strength of the trend. The goal of calculating the volatility is to quantify the dispersion of the characteristic value around its average level or trend line. The method for calculating the volatility is to calculate the standard deviation. First, calculate the average value Yp of all characteristic values ​​in the time series. The formula for calculating the standard deviation S is: The calculated standard deviation S is the quantified value of the fluctuation amplitude. A larger standard deviation indicates more drastic fluctuations in the feature value. Another method for calculating the fluctuation amplitude is to calculate the coefficient of variation, which equals the standard deviation divided by the mean. The dynamic fluctuation pattern is a structured data object. It stores the calculated trend value and fluctuation amplitude value for each feature. For example, for the feature chlorogenic acid content, the dynamic fluctuation pattern records the trend value as the slope K1 and the fluctuation amplitude value as the standard deviation Sa. For the feature catalpol content, the dynamic fluctuation pattern records the trend value as the slope K2 and the fluctuation amplitude value as the standard deviation Sb. The data processing program performs calculations on all identified features and summarizes the results to form a complete dynamic fluctuation pattern.

[0032] The system queries the environmental database based on the production area identifier to obtain the environmental factor data associated with the production area identifier at the corresponding time point. The environmental database is an external database that stores geographic environment and meteorological observation data. Records in the environmental database include geolocation codes, observation time points, and observed environmental factor values. A geolocation code is a code used to uniquely identify a geographic area. A mapping relationship needs to be established between the production area identifier and the geolocation code. A mapping table is configured during system initialization. The mapping table associates each production area identifier with one or more corresponding geolocation codes. For example, production area identifier A01 maps to geolocation code G1001. The query operation is performed by the data processing program. The data processing program reads the production area identifiers contained in the feature data sequence. The data processing program converts the production area identifiers into corresponding geolocation codes according to the mapping table. The data processing program traverses each data unit in the feature data sequence and obtains the collection time point for each data unit. For each collection time point, the data processing program initiates a query to the environmental database. The query request includes the converted geolocation code and the collection time point. The query request requests the environmental factor observation values ​​for the area represented by the specified geolocation code at the specified collection time point or within a time window. A time window is defined as the date of the data collection point. The environmental database receives a query request and returns matching records. Environmental factor observations include daily average temperature and daily cumulative precipitation. For example, for a given collection point, the daily average temperature might be 25 degrees Celsius and the daily cumulative precipitation 10 millimeters. The data processing program extracts the environmental factor observations from the returned records. The program pairs the collection points with the acquired environmental factor observations. After iterating through all collection points, the program obtains a series of time-sorted environmental data pairs. Each environmental data pair contains a collection point and a set of environmental factor observations at that point. This series of environmental data pairs constitutes the environmental factor data for the production area.

[0033] S4. Extract the correlation data between multiple key features in the feature data sequence to form a feature correlation pattern. Specifically, this involves determining the multiple key features to be analyzed from the feature data sequence. The feature data sequence is a data structure generated in the previous steps. It contains multiple data units arranged in chronological order of collection time points. Each data unit contains the collection time point, production area identifier, and multiple feature data obtained at the collection time point. These multiple feature data correspond to various detection indicators. The method for determining the multiple key features to be analyzed is based on information contained in the authenticity standard dataset or by filtering according to a pre-configured list of key features. The authenticity standard dataset contains correlation constraint rules between key features defined based on historical data. The correlation constraint rules explicitly list the names of the key features involved in the constraint. During implementation, the data processing program parses all correlation constraint rules in the authenticity standard dataset, collects the unique key feature names mentioned in all correlation constraint rules, and determines the set of collected key feature names as the multiple key features to be analyzed. For example, if the association constraint rule involves key features such as chlorogenic acid content, catalpol content, and salvianolic acid B content, then the identified key features include chlorogenic acid content, catalpol content, and salvianolic acid B content. If a pre-configured list of key features is used, this list lists the generally recognized important feature names. The data processing program matches and selects multiple key features from all feature names in the feature data sequence based on the key feature list.

[0034] For each data acquisition time point, feature data values ​​corresponding to multiple key features are extracted to form a feature vector. The acquisition time point is the acquisition time point of the data unit in the feature data sequence. The extraction operation is performed by the data processing program. The data processing program traverses each data unit in the feature data sequence. For the currently traversed data unit, the data processing program reads the acquisition time point of the data unit. Based on the determined multiple key features, the data processing program processes each key feature sequentially in a fixed order. For the currently processed key feature, the data processing program searches for a feature name that is completely identical to the key feature name among the multiple feature data contained in the data unit. When a completely identical feature name is found, the data processing program extracts the feature data value corresponding to that feature name. If no completely identical feature name is found, the feature data value of that key feature at the current acquisition time point is recorded as a missing value. For missing values, the corresponding time point is deleted. If the feature vector constructed for a data acquisition time point contains any missing value, the feature vector is discarded and not used in subsequent calculations. The data processing program arranges the feature data values ​​corresponding to each successfully extracted key feature into an ordered array according to a fixed order of several key features. This ordered array is the feature vector at the current acquisition time point. For example, the determined key features are, in order, chlorogenic acid content, catalpol content, and salvianolic acid B content. For a certain acquisition time point, the feature data values ​​extracted from the data unit are chlorogenic acid content of 5.2 mg / g, catalpol content of 2.1 mg / g, and salvianolic acid B content of 8.7 mg / g. The resulting feature vector is an ordered array containing three values, namely [5.2, 2.1, 8.7]. The data processing program performs the above extraction and array construction operations on each data unit in the feature data sequence, generating a corresponding feature vector for each acquisition time point. The set of feature vectors corresponding to all acquisition time points that were not discarded constitutes the basic dataset for subsequent calculations.

[0035] The correlation coefficient between every two key features is calculated based on the feature vectors from all time points. The correlation coefficient is a statistic that measures the strength and direction of the linear relationship between two variables. The input parameter is the set of feature vectors from all the aforementioned data collection time points. Let there be m key features and u available data collection time points. The calculation is performed on all possible pairs of key features. For any two distinct key features, denoted as feature p and feature q, the data sequences for feature p and feature q are extracted from the u feature vectors. Specifically, from each feature vector, based on the index of feature p in the sequence of key features, the value at that position is extracted, resulting in a sequence of u observations for feature p. The same method is used to obtain a sequence of u observations for feature q. The Pearson correlation coefficient between feature p and feature q is calculated. The formula for calculating the Pearson correlation coefficient rpq is: Where pi and qi are the observed values ​​of features p and q at the i-th time point, respectively, and pavg and qavg are the arithmetic mean of the observed value sequences of features p and q, respectively. The calculated correlation coefficient rpq ranges from -1 to +1. +1 indicates perfect positive correlation, -1 indicates perfect negative correlation, and 0 indicates no linear correlation. The data processing program iterates through the data according to this formula to calculate the correlation coefficient between every two different key features. For the case with m key features, a total of m(m-1) / 2 correlation coefficients need to be calculated.

[0036] A correlation coefficient matrix is ​​constructed from all calculated correlation coefficients, serving as the association pattern between features. The correlation coefficient matrix is ​​a square matrix whose row and column order perfectly matches the previously determined order of the key features. If the number of key features is m, then the correlation coefficient matrix is ​​an m-row, m-column matrix. The matrix construction rules are as follows: elements on the diagonal (i.e., positions with the same row and column indices) represent the correlation coefficient between a feature and itself. The correlation coefficient between a feature and itself is always 1. Therefore, the program sets the value of all diagonal elements to 1. For off-diagonal elements (i.e., positions with row index i and column index j where i ≠ j), this position needs to be filled with the correlation coefficient between key feature i and key feature j. Since the correlation coefficient rij = rji, the matrix is ​​symmetric. The program simultaneously fills the previously calculated correlation coefficient values ​​between key feature i and key feature j into the i-th row, j-th column and the j-th row, i-th column positions of the matrix. For example, the determined order of key features might be: index 1 corresponds to chlorogenic acid content, index 2 corresponds to catalpol content, and index 3 corresponds to salvianolic acid B content. Assuming the calculated correlation coefficient between chlorogenic acid content and catalpol content is 0.85, the program will fill in 0.85 in the first row and second column of the matrix, and also in the second row and first column. After filling in all positions, the complete correlation coefficient matrix is ​​obtained. This correlation coefficient matrix encapsulates the linear correlation strength information between all key features in a structured form. The program stores this correlation coefficient matrix as a specific data object, which is the feature association pattern. The feature association pattern serves as the basic data model for analysis and comparison in subsequent steps.

[0037] S5. Analyze the variation of the correlation patterns between features relative to the historical baseline to identify unstable feature pairs. Combine the abnormal fluctuation nodes of unstable feature pairs in the dynamic fluctuation pattern with the corresponding changes in the environmental factor data of the production area to infer the initial driving factors that lead to the violation of the correlation constraint rules. The specific implementation is as follows: The correlation patterns between features are compared with historical benchmarks to identify feature pairs whose correlation coefficient changes exceed a preset tolerance interval as candidate unstable feature pairs. The correlation patterns between features are data objects represented as correlation coefficient matrices. The historical benchmark is a reference to historical correlation patterns of authentic medicinal herbs stored in the authenticity standard dataset. The comparison operation is performed on the correlation coefficient values ​​at the same key feature positions in the two matrices. For each pair of key features, the current correlation coefficient is read from the correlation pattern matrix, and the corresponding historical correlation coefficient is read from the historical benchmark matrix. The difference between the current correlation coefficient and the historical correlation coefficient is calculated to obtain the change in correlation coefficient. The preset tolerance interval is a threshold range used to determine whether the change in correlation coefficient is significant. The preset tolerance interval is set based on the stability analysis of the historical benchmark. Specifically, it is set by analyzing the natural fluctuations of correlation coefficients in a large amount of historical authentic medicinal herb data and calculating the standard deviation of the historical correlation coefficient changes. The lower limit of the preset tolerance interval is set to -2 multiplied by this standard deviation, and the upper limit is set to +2 multiplied by this standard deviation. If the calculated change in correlation coefficient is less than -2 times the standard deviation or greater than +2 times the standard deviation, then the key feature pair is determined to be a candidate unstable feature pair. The data processing program iterates through all possible key feature pairs, performs the above calculations and judgments, and outputs the set of all pairs marked as candidate unstable feature pairs.

[0038] The analysis examines the connections between candidate unstable feature pairs, aggregating multiple candidate unstable feature pairs sharing the same key feature into an unstable feature group. A candidate unstable feature pair represents a direct association between two key features. A connection refers to an indirect network of associations formed by different candidate unstable feature pairs through shared key features. The analysis begins by constructing a graph structure. Each key feature is considered a node in the graph. Each candidate unstable feature pair is considered an edge connecting two nodes. The data processing program traverses all candidate unstable feature pairs, constructing this graph. The program then searches for connected subgraphs or highly connected clusters within this graph. A specific aggregation method is to identify the set of edges sharing nodes. The program examines each key feature node, identifying all candidate unstable feature pairs with that node as an endpoint. If the number of candidate unstable feature pairs associated with a key feature node is greater than or equal to a preset aggregation threshold, then all key feature nodes involved in all these associated candidate unstable feature pairs are merged into a set. This set is called an unstable feature group. For example, if the key feature chlorogenic acid content forms candidate unstable feature pairs with the key features catalpol content and salvianolic acid B content, and the key features catalpol content and salvianolic acid B content also form candidate unstable feature pairs, then the key features chlorogenic acid content, catalpol content, and salvianolic acid B content are aggregated into an unstable feature group. The program outputs all identified unstable feature groups.

[0039] The aggregation threshold is used to aggregate candidate unstable feature pairs into unstable feature groups. This threshold is set to an integer, such as 2. When the number of candidate unstable feature pairs associated with a key feature node reaches or exceeds this integer, all key features involved in these associated feature pairs are merged into a single group. The size of the threshold integer determines the looseness of the aggregation of the groups; for example, setting it to 3 will result in more tightly connected groups.

[0040] For each unstable feature group, the common time point where all features within the group experience coordinated mutations is identified as the key anomalous fluctuation node in the dynamic fluctuation model. The dynamic fluctuation model is a data object containing the trend values ​​and fluctuation amplitude values ​​of each feature. Coordinated mutation refers to the simultaneous occurrence of significant and consistent numerical mutations in the time series data of multiple features within the group at the same time point or within a very short time window. The localization process is as follows: For each key feature in the unstable feature group, the values ​​of that feature at all collection time points are extracted from its feature data sequence to form a complete time series for that feature. Mutation point detection is performed on the time series of each feature. A sliding window t-test is used for mutation point detection. A sliding window length is set, for example, three time points. Starting from the second time point of the time series, the mean of the data within the window is compared with the data value at the previous time point, and the t-statistic is calculated. A confidence level is set, and the corresponding critical value is obtained by looking up the t-distribution table, for example, setting the confidence level to 95% and obtaining the corresponding critical value from the table. If the absolute value of the calculated t-statistic is greater than the critical value obtained from the table, then that time point is determined to be a potential mutation point for that feature. Detection is performed independently on all features to obtain a set of potential mutation points for each feature. Next, the intersection or densely occurring time regions of potential mutation points for all features within the group are searched. The program examines each data collection time point and counts how many feature sets of potential mutation points are included at that time point. If the statistical count reaches or exceeds a coordination threshold, then that data collection time point is determined to be a common time point where all features within the group experience coordinated mutations. This common time point is the key anomalous fluctuation node. The program outputs one or more key anomalous fluctuation nodes for each unstable feature group.

[0041] The coordination threshold is used to determine if all features within an unstable feature group have undergone coordinated mutations. The coordination threshold is set as a specific proportion of the total number of features in the group, such as 70%. When a point in time is included in the set of potential mutation points of features within the group that reach or exceed this proportion, that point is determined to be a common point in time. The specific proportion of the coordination threshold can be adjusted according to the required strictness of coordination; for example, it can be set to 80% when high synchronization is required.

[0042] This process extracts the environmental factor sequences most relevant to the physiological characteristics of unstable characteristic groups within a preset time period before and after key anomaly fluctuation nodes from the production area environmental factor data. The production area environmental factor data consists of a series of environmental data pairs ordered by time. A key anomaly fluctuation node is a specific point in time. The preset time period is a time length parameter used to define the window range for data extraction; for example, the preset time period is set to 3 days before and after the key anomaly fluctuation node. The extraction process first determines the time window. For each key anomaly fluctuation node, the start time of the time window is defined as the node time minus the preset time period length, and the end time of the time window is defined as the node time plus the preset time period length. The program searches the production area environmental factor data for all environmental data pairs whose observation time points fall within this time window. The environmental factors most relevant to the physiological characteristics of unstable characteristic groups are those environmental factors known to have a significant impact on the synthesis or accumulation of medicinal components represented by the key characteristics within the group. This correlation is predefined based on publicly available knowledge of plant physiology or Chinese medicinal herb cultivation. The program determines the correlation according to a pre-configured mapping table. The mapping table lists the names of environmental factors highly correlated with different categories of key medicinal characteristics. For example, for feature groups related to secondary metabolites, the mapping table indicates that the most relevant environmental factors may include sunshine duration and diurnal temperature range. The program queries the mapping table based on the category of key features within the unstable feature group to determine the names of the target environmental factors to be extracted, such as sunshine duration and diurnal temperature range. The program extracts the observations corresponding to the target environmental factor names from environmental data pairs falling within a time window and sorts them according to the observation time points to form an environmental factor sequence. For example, for a key anomalous fluctuation node, it extracts the daily sunshine duration sequence for the three days before and after it.

[0043] By combining the composition of unstable feature groups, the temporal characteristics of key anomalous fluctuation nodes, and the mutation patterns of environmental factor sequences, the type of initial driving factor leading to the violation of association constraint rules is inferred. The composition of unstable feature groups reveals which key feature internal correlation networks have experienced systematic disturbances. The temporal characteristics of key anomalous fluctuation nodes include their position on the overall time axis and the overall trend of feature values ​​before and after the key anomalous fluctuation nodes. The mutation patterns of environmental factor sequences refer to whether there are anomalous changes in the extracted environmental factor sequences near the key anomalous fluctuation nodes that are synchronized with feature mutations. The comprehensive inference is based on pre-defined rule logic. The rule logic maps observed pattern combinations to possible cause types. For example, the following inference rule is set: If the key features contained in the unstable feature group involve multiple types of metabolites, and the key anomalous fluctuation node highly coincides with a significant and persistent adverse weather event node in the environmental factor sequence, such as the environmental factor sequence showing several consecutive days of no sunshine or daily cumulative precipitation significantly exceeding the historical average, then the type of initial driving factor is inferred to be environmental stress in the production area. If the key features of an unstable feature group are concentrated in a few specific types of components, and the environmental factor sequences near key anomalous fluctuation nodes do not show an anomalous patterns synchronized with feature changes, but the trend of feature value changes shows a long-term and unidirectional shift, then the type of initial driving factor is inferred to be non-native growth conditions. The program performs pattern matching on each unstable feature group and its associated data according to these preset rules, and finally outputs a judgment conclusion about the type of initial driving factor, such as environmental stress in the production area or non-native growth conditions.

[0044] S6. Update the authenticity standard dataset based on the initial driving factors or add traceability identifiers for non-authentic producing areas. The specific implementation is as follows: In response to the initial driving factor being determined to originate from environmental stress in the production area, data from unstable feature groups near key anomalous fluctuation nodes are included in the locality standard dataset, and the association constraint rules are recalculated accordingly. The type of the initial driving factor is a conclusion inferred in the preceding steps. Unstable feature groups and key anomalous fluctuation nodes are data objects identified and located in the preceding steps. Data near key anomalous fluctuation nodes refers to the feature data corresponding to the collection time points covered by a specific time window extending before and after the time point of the key anomalous fluctuation node. The length of this specific time window is pre-set according to the growth cycle characteristics of the analyzed Chinese medicinal materials or the typical duration of environmental stress; for example, the time window length can be set to 7 days before and after the key anomalous fluctuation node. The inclusion operation is performed by the data processing program. The data processing program first extracts all data units whose timestamps fall within the specific time window from the feature data sequence. Then, based on the composition of the unstable feature groups, the data processing program filters out the feature data values ​​corresponding to each key feature within the unstable feature groups from these data units. The data processing program then merges the selected feature data values ​​with the historical authentic medicinal herb feature data stored in the authenticity standard dataset. Specifically, this merging process involves appending these new data points as new samples to the end of the historical dataset. The historical dataset serves as the foundational data pool for constructing and updating association constraint rules. After data inclusion, the association constraint rules need to be recalculated. This recalculation is performed for each association constraint rule in the authenticity standard dataset. Each association constraint rule defines a pair of related features and its numerical range. The recalculation process involves extracting the feature data values ​​of the key features involved in the association feature pair from all historical samples and newly included samples in the updated historical dataset. For each sample, the actual relationship value is calculated according to the definition of the association feature pair, for example, calculating the ratio of the contents of the two features. This yields a new sequence of actual relationship values. Based on this new sequence of actual relationship values, statistical calculations are re-performed to determine the new numerical range. The same statistical methods used in the initial rule construction are employed, such as calculating the 5th percentile of the new actual relationship value sequence as the lower limit of the new numerical range and the 95th percentile as the upper limit of the new numerical range. The data processing program replaces the original numerical ranges in the association constraint rule records with the newly calculated lower and upper limits of the numerical range, thus updating the rule. The data processing program performs this update operation on all association constraint rules, ultimately achieving the iteration and optimization of the locality standard dataset.

[0045] In response to the initial driving factor being determined to originate from non-authentic growing conditions, a non-authentic growing area traceability identifier is generated, containing the production area identifier and unstable characteristic group information, and stored in association with the characteristic data sequence. The type of the initial driving factor is a conclusion inferred in the preceding steps. The production area identifier comes from the characteristic data sequence. The unstable characteristic group information includes a list of names of all key characteristics contained in the unstable characteristic group. The specific method for generating the non-authentic growing area traceability identifier is to construct a structured data record. This data record contains an identifier type code, production area identifier, unstable characteristic group information, a list of associated constraint rule identifiers, and a timestamp field. The identifier type code uses a fixed string to indicate that this is a non-authentic growing area traceability identifier; for example, the identifier type code can be set to the string NON_GENUINE. The production area identifier field directly copies the production area identifier string from the characteristic data sequence. The unstable characteristic group information field stores the names of all key characteristics within the unstable characteristic group in the form of an array or string, such as chlorogenic acid content, catalpol content, and salvianolic acid B content. The list of associated constraint rule identifiers field lists the unique numbers of all associated constraint rules determined to be violated in this analysis. The unique identifier for the association constraint rule comes from the locality standard dataset. The timestamp field records the date and time this identifier was generated. After generating this data record, it needs to be associated with the feature data sequence. This association is achieved by creating an index. A unique primary key is assigned to each feature data sequence record in the database or file system storing the feature data sequences. A unique identifier is also assigned to each generated non-local origin traceability identifier data record. The data processing program creates an association mapping table, which contains at least two columns: one is the feature data sequence primary key, and the other is the non-local origin traceability identifier. Adding a record to this association mapping table associates the current feature data sequence with its corresponding non-local origin traceability identifier. Alternatively, the non-local origin traceability identifier data record can be stored as a separate field or an additional document directly embedded in the feature data sequence's metadata. After the association is completed, subsequent queries or calls to the feature data sequence can retrieve the associated non-local origin traceability identifier through database queries or reading metadata. The entire process employs different data management strategies depending on the type of initial driving factor.

[0046] Example 2: Figure 2 A schematic diagram of the structure of a traditional Chinese medicine database management system according to the present invention is provided. The traditional Chinese medicine database management system includes: The standard acquisition module is used to acquire the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data at multiple time points and their corresponding production area identifiers. The rule extraction module is used to extract the association constraint rules between key features defined based on historical data from the locality standard dataset, and to determine whether the feature data in the feature data sequence violates the association constraint rules. The environment extraction module is used to extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier when the association constraint rules are violated. The association construction module is used to extract the association relationship data between multiple key features in the feature data sequence to form the association pattern between features. The factor inference module is used to analyze the variation of the correlation pattern between features relative to the historical baseline to identify unstable feature pairs. By combining the abnormal fluctuation nodes of unstable feature pairs in the dynamic fluctuation pattern and the corresponding changes in the environmental factor data of the production area, the initial driving factors that lead to the violation of the correlation constraint rules are inferred. The source update module is used to update the locality standard dataset or add source identifiers for non-local producing areas based on the initial driving factors.

[0047] Example 3: A storage medium storing programs or instructions, which, when executed by a processor, implement a method for managing a database of traditional Chinese medicine materials.

[0048] Example 4: A device terminal, comprising: a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement a method for managing a database of traditional Chinese medicine materials.

[0049] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.

[0050] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0051] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. Computer-readable storage media can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0052] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0053] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0054] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0055] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0056] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0057] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0058] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for managing a database of traditional Chinese medicinal materials, characterized in that, include: S1. Obtain the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data at multiple time points and their corresponding production area identifiers. S2. Extract the association constraint rules between key features defined based on historical data from the locality standard dataset, and determine whether the feature data in the feature data sequence violates the association constraint rules. S3. When the association constraint rules are violated, extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier; S4. Extract the correlation data between multiple key features in the feature data sequence to form the correlation pattern between features; S5. Analyze the variation of the correlation patterns between features relative to historical benchmarks to identify unstable feature pairs. Combine this with the abnormal fluctuation nodes of unstable feature pairs in dynamic fluctuation patterns and the corresponding changes in regional environmental factor data to infer the initial driving factors leading to violations of correlation constraint rules, including: The correlation patterns between features are compared with historical benchmarks, and feature pairs whose correlation coefficient changes exceed the preset tolerance range are identified as candidate unstable feature pairs. Analyze the connections between candidate unstable feature pairs and aggregate multiple candidate unstable feature pairs that share the same key feature into an unstable feature group; For each unstable feature group, the common time point in the dynamic fluctuation mode where all features in the group undergo coordinated mutations is identified as the key abnormal fluctuation node. Extract the environmental factor sequences most relevant to the physiological characteristics of unstable characteristic groups within a preset time period before and after key abnormal fluctuation nodes from the environmental factor data of the production area; By combining the composition of unstable feature groups, the temporal characteristics of key abnormal fluctuation nodes, and the mutation patterns of environmental factor sequences, we can infer the type of initial driving factor that leads to the violation of the association constraint rules. S6. Update the locality standard dataset based on the initial driving factors or add traceability identifiers for non-local producing areas.

2. The method for managing a database of traditional Chinese medicinal materials according to claim 1, characterized in that, S1 includes: Feature data containing multiple time points was obtained by querying the detection database; The production area identifier is obtained by querying the production area information database; Feature data is correlated and matched with production area identifiers based on time points to generate feature data sequences; Read the pre-built locality standard dataset from the standard rule base.

3. The method for managing a database of traditional Chinese medicinal materials according to claim 1, characterized in that, S2 include: Read the association constraint rules that record the associated feature pairs and their numerical ranges from the locality standard dataset; Extract feature data corresponding to the associated feature pairs from the feature data sequence; The actual relationship value is calculated based on the feature data corresponding to the acquired and associated features; The actual relation values ​​are compared with the numerical ranges recorded in the association constraint rules to determine whether the feature data violates the association constraint rules.

4. The method for managing a database of traditional Chinese medicinal materials according to claim 1, characterized in that, S3 includes: The values ​​of each feature at multiple time points are separated from the feature data sequence to form time series data; To construct dynamic fluctuation patterns by calculating the changing trends and fluctuation amplitudes of characteristics based on time series data; Based on the production area identification, query the environmental database to obtain environmental factor data associated with the production area identification at the corresponding time point as the production area environmental factor data.

5. The method for managing a database of traditional Chinese medicinal materials according to claim 1, characterized in that, S4 includes: Identify multiple key features to be analyzed from the feature data sequence; For each time point, feature data values ​​corresponding to multiple key features are extracted to form a feature vector; Calculate the correlation coefficient between every two key features based on the feature vectors at all time points; A correlation coefficient matrix is ​​constructed from all the calculated correlation coefficients, and the correlation coefficient matrix is ​​used as the association pattern between features.

6. The method for managing a database of traditional Chinese medicinal materials according to claim 1, characterized in that, S6 include: In response to the initial driving factor being determined to originate from environmental stress in the production area, data of unstable feature groups near key abnormal fluctuation nodes are included in the locality standard dataset, and the association constraint rules are recalculated accordingly. In response to the initial driving factor being determined to originate from non-authentic growth conditions, a non-authentic production area traceability identifier containing production area identification and unstable characteristic group information is generated and stored in association with the characteristic data sequence.

7. A database management system for traditional Chinese medicinal materials, used to implement the database management method for traditional Chinese medicinal materials as described in any one of claims 1-6, characterized in that, include: The standard acquisition module is used to acquire the characteristic data sequence and the authenticity standard dataset of Chinese medicinal materials. The characteristic data sequence includes characteristic data at multiple time points and their corresponding production area identifiers. The rule extraction module is used to extract the association constraint rules between key features defined based on historical data from the locality standard dataset, and to determine whether the feature data in the feature data sequence violates the association constraint rules. The environment extraction module is used to extract the dynamic fluctuation pattern of the feature data sequence and the environmental factor data of the production area corresponding to the production area identifier when the association constraint rules are violated. The association construction module is used to extract the association relationship data between multiple key features in the feature data sequence to form the association pattern between features. The factor inference module is used to analyze the variation of the correlation pattern between features relative to the historical baseline to identify unstable feature pairs. By combining the abnormal fluctuation nodes of unstable feature pairs in the dynamic fluctuation pattern and the corresponding changes in the environmental factor data of the production area, the initial driving factors that lead to the violation of the correlation constraint rules are inferred. The source update module is used to update the locality standard dataset or add source identifiers for non-local producing areas based on the initial driving factors.

8. A storage medium, characterized in that, A program or instruction is stored on a storage medium, and when the program or instruction is executed by a processor, it implements a Chinese medicinal material database management method as described in any one of claims 1-6.

9. A device terminal, characterized in that, The device terminal includes: a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the Chinese medicinal materials database management method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Traditional Chinese medicine quality detection method and system

    CN120404616A

  • Gastrodia elata production whole-process tracing quality control method

    CN121352634A