A traditional chinese medicine conditioning scheme optimization method and system
By identifying and verifying the conflicting terms in the rule texts of the TCM treatment plan database, the problem of lack of conflict detection in the existing system is solved, enabling the system to improve its self-improvement and the accuracy of treatment suggestions, and reducing the burden on doctors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2026-03-27
AI Technical Summary
Existing TCM health conditioning assistance systems lack effective conflict verification and reconciliation mechanisms when processing parallel generated conditioning suggestions, resulting in contradictory output suggestions, increasing the burden on doctors, and hindering the system's self-improvement due to user adaptive behavior masking system defects.
By scanning the rule texts in the TCM treatment plan database, extracting the functional terms, and querying the opposing terms based on the preset TCM functional term relationship table, it is determined whether there is a logical contradiction between the rule texts, identifies potential logically contradictory rule pairs, conducts simulation verification in an offline environment, outputs a treatment suggestion report, confirms conflicts and records logs.
It effectively avoids the output of contradictory suggestions, reduces the workload of doctors, improves the accuracy and practicality of system suggestions, ensures that the system can improve and optimize itself, and provides accurate health feedback of the rule base.
Smart Images

Figure CN121051235B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of traditional Chinese medicine regimen optimization, and particularly relates to a traditional Chinese medicine regimen optimization method and system. BACKGROUND
[0002] Currently, a traditional Chinese medicine health regimen auxiliary system has been widely deployed in community health service center networks, and its core is a modularized traditional Chinese medicine regimen. The architecture of the regimen usually decomposes complex regimen logic into multiple independent rule modules, each of which is responsible for processing a specific type of physical indication, such as a “spleen and stomach module” for addressing digestive system problems, a “spirit module” for handling sleep disorders, and a “lung and defense module” for coping with skin conditions. When a health report containing multiple physical indications is input into the system, the data processing flow is set to query all related rule modules in parallel. Each module will independently generate corresponding regimen recommendations based on the information related to itself in the input data.
[0003] In order to better adapt to the physical characteristics and common problems of different regional populations, front-line practitioners can supplement temporary “empirical rules” to the system. For example, a doctor supplements an empirical rule in the “spirit module”, which recommends using a food material with cooling properties for diet therapy when detecting a combination of “tongue tip red, irritability, and sleep difficulty” indications. Another doctor supplements another empirical rule in the same “spirit module”, which recommends using a medicinal material with warming properties for regimen when detecting “fear of cold, cold extremities, and frequent nocturia” indications. These two rules with opposite properties are reasonable in their respective independent scenarios, so they are added to the rule library of the same “spirit module” in sequence, forming a potential logical contradiction.
[0004] When the system receives a new patient who has both “heart fire” indications due to long-term night work and “yang deficiency” signs due to weak physical constitution, and the health report submitted by the patient contains descriptions of both “irritability, sleep difficulty” and “fear of cold, cold extremities”. When the system processes data, the symptom information simultaneously triggers the two empirical rules supplemented by different doctors. Therefore, these two completely contradictory instructions are presented in the final generated report at the same time. However, there is no mechanism in the health report generation process to check or reconcile potential logical conflicts that may exist between regimen recommendations.
[0005] To circumvent this contradiction, the first-line medical staff group consciously simplifies or splits complex composite symptoms when entering patient information into the system. For example, only "irritability, difficulty falling asleep" is filled in this time, and "chills, cold limbs" is separately entered in the next visit. This artificial disassembly of single and one-sided information ensures that each system interaction can obtain an output that does not produce contradictions and can be directly used.
[0006] Due to the long-term "pretreatment" of the doctor group, there are almost no records of rule conflicts in the system log. All data processing processes are successfully completed without triggering any conflict alerts. The system maintenance team concludes that the existing rule base has good internal logic consistency and the system runs stably. Ultimately, the system cannot achieve a closed-loop self-improvement dilemma through its own data feedback mechanism.
[0007] The prior art needs to be improved in view of the above problems. SUMMARY
[0008] The present application discloses a traditional Chinese medicine conditioning scheme optimization method and system, aiming to solve the technical problems that the existing traditional Chinese medicine health conditioning auxiliary system lacks effective conflict checking and reconciliation mechanism when processing and generating conditioning suggestions in parallel, resulting in output of contradictory suggestions, increasing the burden of doctors, and due to user adaptive behavior, system defects are covered up, hindering system self-improvement.
[0009] The technical scheme of the present application is as follows:
[0010] In a first aspect, the present application discloses a traditional Chinese medicine conditioning scheme optimization method, comprising the following steps:
[0011] Scanning the rule text in each rule module in the traditional Chinese medicine conditioning scheme database, extracting a first action word in the first rule text, wherein the action word is a core word in the traditional Chinese medicine conditioning scheme that reflects the effect of the action;
[0012] Based on a preset traditional Chinese medicine action word relationship table, querying the opposite word corresponding to the first action word, the traditional Chinese medicine action word relationship table records various types of conventional action words and opposite words whose actions are opposite;
[0013] Scanning all rule texts in the rule module to which the first action word belongs, extracting a second action word in the second rule text;
[0014] Judging whether the second action word and the opposite word of the first action word are the same;
[0015] If they are the same, mark the first rule text and the second rule text as a pair of logically opposite rules, and write the pair of logically opposite rules into a rule conflict log table and prompt;
[0016] If not, continue to scan other rule texts to extract new second action words.
[0017] By the technical solution, potential logical opposition in the TCM conditioning scheme rule library can be actively identified, system output contradictions caused by rule conflicts can be avoided, the accuracy and reliability of system suggestions are improved, and problems caused by lack of conflict detection mechanism in existing systems are effectively solved.
[0018] In some embodiments, the TCM conditioning scheme optimization method disclosed in the present application further includes the following steps:
[0019] The trigger condition of each rule of the logical opposition rule is analyzed, and a virtual patient data packet is generated according to the trigger condition, the virtual patient data packet having necessary indications for triggering each rule at the same time;
[0020] The virtual patient data packet is verified in an offline environment simulation, and a conditioning suggestion report is output;
[0021] It is judged whether the conditioning suggestion report contains conditioning suggestions in the first rule text and the second rule text at the same time;
[0022] If yes, it is confirmed that the logical opposition rule pair has actual logical conflict, an alarm information is issued, and all analysis and verification information is written into the rule conflict log table;
[0023] If not, it is considered that the logical opposition rule pair does not have actual logical conflict, and the related information is deleted in the rule conflict log table.
[0024] By the technical solution, the identified potential logical opposition rule pair can be verified in an actual scene simulation, so as to distinguish the rule pair that really has conflict from the rule pair that is only surface opposition, avoid false positives, and further improve the accuracy and practicality of conflict identification.
[0025] In some embodiments, the trigger condition of each rule includes the indication item required for the activation of the corresponding rule and the logical relationship thereof, and the step of generating a virtual patient data packet according to the trigger condition includes:
[0026] The trigger indication set of the first rule is obtained, the trigger indication set of the second rule is obtained, and a new indication set is generated by merging, the new indication set having necessary indications for triggering each rule at the same time.
[0027] By the technical solution, the generation mode of the virtual patient data packet can be determined, and it is ensured that it can trigger mutually opposed rules at the same time, thereby providing accurate input data for subsequent offline simulation verification.
[0028] In some embodiments, the TCM regimen optimization method disclosed in the present application, the step of performing offline environment simulation verification on the virtual patient data package and outputting a regimen recommendation report comprises:
[0029] inputting the virtual patient data package into an independent rule verification sandbox, the rule verification sandbox comprising a simulation regimen consistent with the processing logic of the TCM regimen in the TCM regimen database, and outputting the regimen recommendation report according to the virtual patient data package and the simulation regimen.
[0030] Through the technical solution, an independent and controlled simulation verification environment can be provided to ensure the accuracy and repeatability of the conflict verification process and avoid affecting the actual running system.
[0031] In some embodiments, the indication items include basic indications and composite indications, and before the step of merging to generate a new indication set, the method further comprises:
[0032] detecting whether the indication set to be synthesized contains positive and negative forms of the same composite indication, if yes, determining that the logical opposite rule pair has an actual logical conflict, and if not, continuing to merge to generate a new indication set.
[0033] Through the technical solution, it can be determined in advance whether the rule conflict is caused by the logical contradiction of the indications before generating the virtual patient data package, thereby avoiding the generation of impossible virtual patient data and improving the verification efficiency.
[0034] In some embodiments, after the step of determining that the logical opposite rule pair has an actual logical conflict, the method further comprises:
[0035] stopping the generation of a new indication set;
[0036] triggering a rule conflict alert, the rule conflict alert comprising information of the logical opposite rule pair and the name of the composite indication causing the conflict;
[0037] writing the rule conflict alert into the rule conflict log and sending a notification.
[0038] Through the technical solution, the conflict caused by the contradiction of the indications can be responded to immediately and alarmed explicitly, and relevant personnel can be notified in a timely manner to handle, thereby further improving the early warning capability of the system for conflicts.
[0039] In some embodiments, the action vocabulary comprises a main action vocabulary and an auxiliary action vocabulary, and the opposite vocabulary comprises a main opposite vocabulary and an auxiliary opposite vocabulary.
[0040] The step of determining whether the second action vocabulary is the same as the opposite vocabulary of the first action vocabulary comprises:
[0041] determining whether the main opposite words of the second main action words are the same as the main opposite words of the first main action words;
[0042] If yes, the indication items of the trigger conditions of the first rule text and the second rule text and their logical relationships are extracted respectively and converted into standardized indication sets respectively;
[0043] The intersection and the union of the two standardized indication sets are calculated to obtain an overlap index;
[0044] The overlap index is compared with a preset co-occurrence threshold value, if the overlap index is lower than the co-occurrence threshold value, it is determined that the first rule text and the second rule text are low-risk conflicts, and an internal audit log is written; if the overlap index is higher than the co-occurrence threshold value, it is determined that the first rule text and the second rule text are high-risk conflicts, and it is determined to be a logical opposite rule pair.
[0045] Through the technical scheme, more detailed risk classification of rule conflicts can be performed, high-risk and low-risk conflicts are distinguished, so that the system can take different processing strategies according to the severity of the conflicts, and the fine level of conflict management is improved.
[0046] In some embodiments, the calculation method of the overlap index is that the size of the intersection is divided by the size of the union to obtain the overlap index.
[0047] Through the technical scheme, the calculation method of the overlap index is clarified, and the objectivity and quantifiability of the conflict risk assessment are ensured.
[0048] The starting condition of the TCM conditioning scheme optimization method disclosed in the application is that it is started regularly or when a new supplementary rule text is stored in the TCM conditioning scheme database, and the supplementary rule text is an empirical rule entered by a first-line doctor.
[0049] Through the technical scheme, it can be ensured that the system performs comprehensive checking on the rule library at critical moments (such as when a new empirical rule is added) or regularly, discovers and handles potential conflicts in time, and maintains the health and consistency of the rule library.
[0050] In a second aspect, the application also discloses a TCM conditioning scheme optimization system applying the TCM conditioning scheme optimization method, which comprises:
[0051] A rule scanning module is configured to scan rule texts in rule modules in a TCM conditioning scheme database and extract first action words and second action words;
[0052] An opposite query module is configured to query opposite words corresponding to the first action words in a preset TCM action word relationship table;
[0053] An opposite recognition module is configured to determine whether the opposite words of the second action words and the first action words are the same, and if so, mark the first rule text and the second rule text as a logical opposite rule pair, and write the logical opposite rule pair into a rule conflict log table and give a prompt, and if not, continue to scan other rule texts to extract new second action words.
[0054] By the technical solution, a system entity for implementing the above-mentioned traditional Chinese conditioning scheme optimization method is provided, and complex method steps are modularized, facilitating system construction, deployment and maintenance.
[0055] In some embodiments, the traditional Chinese conditioning scheme optimization system disclosed in the present application further comprises:
[0056] A virtual design synthesis module is configured to analyze the trigger condition of each rule in the logical opposite rule pair, and generate a virtual patient data packet according to the trigger condition, the virtual patient data packet having necessary indications for triggering each rule at the same time.
[0057] A conflict verification module is configured to perform offline environment simulation verification on the virtual patient data packet, output a conditioning suggestion report, and determine whether the conditioning suggestion report contains conditioning suggestions in the first rule text and the second rule text at the same time, if so, confirm that the logical opposite rule pair has an actual logical conflict, issue an alarm information, and write all analysis and verification information into the rule conflict log table, and if not, consider that the logical opposite rule pair does not have an actual logical conflict, and delete related information in the rule conflict log table.
[0058] By the technical solution, a function module for actual conflict verification is provided for the system, so that the system can not only identify potential conflicts, but also confirm the authenticity through simulation verification, thereby providing more reliable conflict management capabilities.
[0059] Advantages
[0060] The traditional Chinese conditioning scheme optimization method and system disclosed in the present application scans rule texts in a traditional Chinese conditioning scheme database, extracts action words therein, and queries corresponding opposite words based on a preset traditional Chinese action word relationship table, and then determines whether there is a logical opposite in action words between different rule texts. Once a potential logical opposite rule pair is identified, the system will mark it and write it into a rule conflict log table. This mechanism directly addresses the pain point that existing traditional Chinese health conditioning auxiliary systems lack conflict checking and reconciliation mechanisms when processing conditioning suggestions in parallel.
[0061] The technical scheme of the present application can actively identify the "action words" and "opposite words" at the rule level, and can discover potential logical opposites within the rule library before actual patient data processing, thereby fundamentally solving the problem that the existing system cannot warn of conflicts at the rule level, avoiding outputting contradictory suggestions to doctors, thereby reducing the workload of doctors and improving the accuracy and practicality of system suggestions. In addition, by actively identifying and recording rule conflicts, the method of the present application breaks the vicious cycle of "system defects being covered up" formed by user adaptive behavior in the prior art, so that the system can truly reflect the health status of the rule library, providing an accurate data basis for subsequent rule optimization and system improvement, and promoting the self-evolution and continuous improvement of the system. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 A flowchart of a traditional Chinese medicine regimen optimization method provided by the present application.
[0063] Figure 2 A framework diagram of a traditional Chinese medicine regimen optimization system provided by the present application. DETAILED DESCRIPTION
[0064] The technical scheme of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0065] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", etc. are only used for differentiation, and cannot be understood as indicating or implying relative importance.
[0066] Please refer to Figure 1 The present application provides a traditional Chinese medicine regimen optimization method, comprising the steps of:
[0067] S100: scanning the rule texts in each rule module in the traditional Chinese medicine regimen database, and extracting a first action word in the first rule text, wherein the action word is a core word in the traditional Chinese medicine regimen that reflects the action effect;
[0068] S200: Query the opposite word corresponding to the first action word based on the preset Chinese medicine action word relationship table, which records various conventional action words and their opposite words;
[0069] S300: Scan all rule texts in the rule module to which the first action word belongs, and extract a second action word in a second rule text;
[0070] S400: Determine whether the second action word is the same as the opposite word of the first action word;
[0071] S500: If the same, mark the first rule text and the second rule text as a logical opposite rule pair, write the logical opposite rule pair into a rule conflict log table, and prompt;
[0072] S600: If not the same, continue to scan other rule texts to extract a new second action word.
[0073] The present application can actively identify and mark potential rule conflicts by introducing scanning of rule texts and extraction of action words in traditional Chinese medicine conditioning schemes, querying opposite words based on a preset Chinese medicine action word relationship table, and determining whether there is a logical opposite between different rule texts in the same rule module. Thus, it can effectively avoid contradictory conditioning recommendations output due to the lack of conflict detection mechanism in the prior art, reduce the artificial judgment burden of doctors, and break the vicious cycle of hiding system underlying defects due to user adaptive behavior, providing a data foundation and technical support for the continuous optimization of traditional Chinese medicine conditioning schemes.
[0074] The method provided by the present application is generally applied to a traditional Chinese medicine health conditioning auxiliary system, which is configured to store and process a large amount of traditional Chinese medicine conditioning scheme data. The traditional Chinese medicine conditioning scheme database is a structured data storage set containing various traditional Chinese medicine conditioning schemes and related rules. The rule module refers to a logical unit in the database for organizing and classifying rules, such as a "spleen and stomach module", a "spirit module", or a "lung defense module", etc. Each rule module contains a plurality of rule texts inside, which are the textual descriptions of specific traditional Chinese medicine conditioning suggestions or judgment logic. The action vocabulary refers to the core vocabulary in the traditional Chinese medicine conditioning scheme that embodies the effect, such as "clearing heat", "warming yang", "tonifying qi", "activating blood", etc. These words directly reflect the nature and purpose of the conditioning scheme. The traditional Chinese medicine action vocabulary relationship table is a pre-set and maintainable data structure, which records various conventional action vocabularies and their opposite vocabularies, such as the opposite vocabulary of "clearing heat" is "warming heat", and the opposite vocabulary of "tonifying qi" is "draining qi". This table can be pre-recorded and continuously revised by experts in the field of traditional Chinese medicine according to classical theories, and does not depend on the data generated during system operation. The rule conflict log table is a data table for recording detected rule conflict information, which can include the identification of conflicting rules, conflict types, discovery time, etc., and can be used for subsequent conflict processing and system optimization.
[0075] The method provided by the present application can include the following steps in its specific implementation:
[0076] First, scan the rule texts in each rule module in the traditional Chinese medicine conditioning scheme database, and extract the first action vocabulary in the first rule text. Specifically, the scanning of the database can be achieved by traversing all rule modules in the database. For example, the file system scanning method can be used to read the rule files stored in a specific directory one by one; or if the rules are stored in a relational database, SQL queries can be executed to obtain all rule texts. Among them, the first rule text can be the first rule text in the database during the first scanning. After obtaining the first rule text, the first action vocabulary needs to be extracted therefrom. For example, a list of action vocabularies can be defined in advance, and then these core vocabularies can be found and identified in the first rule text by string matching or regular expression matching. As another implementation, natural language processing techniques can also be used to perform semantic analysis on the rule text, so as to identify the key verbs or noun phrases expressing conditioning effects as action vocabularies.
[0077] Secondly, based on the preset Chinese medicine action word relationship table, the opposite word corresponding to the first action word is queried. For example, the relationship table can be a simple key-value pair mapping, where the key is the action word and the value is the opposite word. When the first action word is extracted, it can be directly looked up in the mapping table to obtain the corresponding opposite word. As a preferred embodiment, the relationship table can also be a more complex ontology knowledge base, which not only contains the opposite relationship of the word, but also contains the hierarchical relationship, synonym relationship, etc. of the word, and the opposite word is determined through semantic reasoning.
[0078] Then, all rule texts in the rule module to which the first action word belongs are scanned, and a second action word is extracted from a second rule text. The scanning range of this step is limited within the same rule module as the first rule text, because usually the rules within the same module are more likely to cause direct logical conflicts. For example, the system can maintain an index of modules and rule texts, and when the module to which the first rule text belongs is determined, all other rule texts under the module can be quickly located and traversed. During the traversal, the above-mentioned operation of extracting action words is repeated for each rule text, thereby obtaining the second action word.
[0079] Then, it is judged whether the second action word is the same as the opposite word of the first action word. This judgment can be realized by directly comparing the string values of the two words. For example, if the opposite word of the first action word is "warm", and the second action word is extracted as "warm", it is judged as the same.
[0080] Finally, according to the judgment result, corresponding processing is carried out. If the judgment result is the same, the first rule text and the second rule text are marked as a logical opposite rule pair, and the logical opposite rule pair is written into a rule conflict log table and prompted. For example, a new record can be added in the rule conflict log table, which contains the identification of the first rule text, the identification of the second rule text and the detected opposite word. At the same time, prompt information can be sent to the system administrator or the relevant doctor through the system interface pop-up window, sending email or short message, etc. If the judgment result is not the same, the other rule texts are scanned to extract new second action words. This means that the system will continue to find other potential conflict rules in the current rule module until all rule texts are traversed.
[0081] The method provided by the present application works in its entirety by actively and systematically identifying potential rule logic conflicts in the traditional Chinese medicine regimen database, thereby improving the reliability and accuracy of the system. Specifically, the method first conducts a comprehensive scan of the rule texts in the traditional Chinese medicine regimen database to ensure that all rules, especially those empirical rules supplemented by frontline doctors, are included in the detection range. By extracting the core action words from the first rule text, the system can identify the main regimen direction or effect embodied by the rule. Subsequently, based on the pre-set traditional Chinese medicine action word relationship table, the system can intelligently query the opposite words corresponding to the action words, which provides a clear reference standard for subsequent conflict judgment.
[0082] In order to focus on the most likely conflict scenarios, the system limits the scanning range to the same rule module as the first rule text belongs to and extracts the second action word from it. This focusing strategy helps improve detection efficiency because rules within the same module often deal with similar symptoms or indications, so it is easier to have mutually contradictory regimen recommendations. The key is that the system will judge whether the extracted second action word is the same as the opposite word of the first action word. It is through this precise word opposition judgment that the system can identify those rule texts that fundamentally conflict in the regimen direction.
[0083] Once the second action word is identified as the same as the opposite word of the first action word, the system will immediately mark this pair of rule texts as a logically opposite rule pair and write their detailed information into the rule conflict log table, while sending a prompt to the relevant personnel. In this way, the present application can effectively solve the problem of contradictory regimen recommendations output by existing systems due to the lack of conflict detection mechanisms. For example, when a patient simultaneously shows signs of "excessive heart fire" and "yang deficiency and cold stagnation", the existing system may output both "cooling" and "warming" recommendations, making it difficult for doctors to judge. However, by pre-identifying "cooling" and "warming" as opposite words, the present application can timely discover and mark rule texts containing these opposite action words, thereby avoiding such contradictory output in actual application.
[0084] In addition, the present application can also break the vicious cycle in existing systems where doctors artificially simplify patient data to avoid contradictory output, resulting in the masking of rule conflicts. Through active and automated conflict detection, even if the doctor inputs complete data containing complex symptoms, the system can timely discover and record potential conflicts, thereby providing real and accurate rule base health feedback for the system maintenance team. This enables the system to improve itself through its own data feedback mechanism, reallocating resources originally used to develop conflict intelligent recognition and reconciliation functions to optimize core logic defects, ultimately improving the overall quality and practicality of traditional Chinese medicine regimen.
[0085] The method provided in the present application has the core innovation of constructing an active and intelligent TCM regimen rule conflict identification mechanism. Compared with the existing technology, which generally directly collects the regimen suggestions output by all independent modules in text and does not include any mechanism for checking or reconciling potential logical conflicts between the suggestions, the present application realizes the transition from passive acceptance to active discovery.
[0086] The TCM regimen optimization method described above further includes the steps of:
[0087] Analyzing the trigger condition of each rule of the logically opposite rules, and generating a virtual patient data packet according to the trigger condition, wherein the virtual patient data packet has necessary indications that can trigger each rule at the same time;
[0088] Performing offline environment simulation verification on the virtual patient data packet, and outputting a regimen suggestion report;
[0089] Determining whether the regimen suggestion report contains regimen suggestions in the first rule text and the second rule text at the same time;
[0090] If yes, it is confirmed that there is an actual logical conflict in the logically opposite rule pair, an alarm information is issued, and all analysis and verification information is written into the rule conflict log table;
[0091] If no, it is considered that there is no actual logical conflict in the logically opposite rule pair, and the related information in the rule conflict log table is deleted.
[0092] Specifically, after identifying the potential logically opposite rule pair, each rule in the logically opposite rule pair needs to be analyzed in depth to obtain the trigger condition required for its activation. The trigger condition usually includes a series of indication items and their logical relationships, such as "fever and thirst" or "fear of cold or lack of strength". After these trigger conditions are analyzed, a virtual patient data packet is constructed. The virtual patient data packet is designed to contain necessary indications that can satisfy the trigger conditions of all rules in the logically opposite rule pair at the same time. For example, if the trigger condition of one rule is "elevated body temperature" and the trigger condition of another rule is "fine and slow pulse", the virtual patient data packet will be constructed to contain the indications of "elevated body temperature" and "fine and slow pulse" at the same time.
[0093] Subsequently, the virtual patient data package is input to an independent offline environment for simulation verification. The offline environment is usually a rule verification sandbox, which contains simulation conditioning schemes consistent with the processing logic in the traditional Chinese conditioning scheme database. By inputting the virtual patient data package into the sandbox, the system will output a conditioning recommendation report according to the processing logic of the simulation conditioning scheme. The report will reflect which specific conditioning recommendations the system will give under the conditions of the virtual patient data package.
[0094] Further, the system will analyze the conditioning recommendation report to determine whether it contains conditioning recommendations from both the first rule text and the second rule text. For example, if the first rule text recommends "clearing heat and detoxifying" and the second rule text recommends "warming yang and dispelling cold", the system will check whether both of these opposing conditioning recommendations appear in the report. If the report contains both of these opposing conditioning recommendations, it can be confirmed that the logical opposite rule pair actually has a logical conflict, at which point the system will issue an alarm message and write all relevant analysis and verification information, including the virtual patient data package, the simulation verification result, and the conflict confirmation information, into the rule conflict log table in detail. Conversely, if the conditioning recommendation report does not contain conditioning recommendations from both rule texts, it can be considered that the logical opposite rule pair does not have a logical conflict in actual application, at which point the relevant information about the rule pair in the rule conflict log table will be deleted to avoid false positives.
[0095] The scheme of the present application effectively solves the "false positive" problem caused by identifying rule conflicts based only on the opposite relationship of action words by introducing a virtual patient data package and an offline environment simulation verification mechanism. Specifically, after initially identifying potential logically opposite rule pairs, instead of immediately marking them as actual conflicts, the system further analyzes the triggering conditions of each rule and constructs a virtual patient data package that can simultaneously satisfy these triggering conditions. It is precisely because the virtual patient data package is carefully designed to simulate a scenario that can simultaneously activate all potential conflicting rules that the subsequent offline simulation verification can truly reflect the behavior of these rules in actual application. By inputting the virtual patient data package into an independent rule verification sandbox for simulation, the system can observe whether these rules are actually triggered and produce mutually contradictory conditioning recommendations under certain conditions, where the rule verification sandbox is an independent "rule verification sandbox" environment deployed based on container technology (such as Docker containers). The sandbox runs a conditioning system simulator that is completely consistent with the core data processing logic of the production environment. This verification method based on actual triggering conditions and simulation results can filter out rule pairs that are opposite in action words but do not conflict in actual application due to mutually exclusive triggering conditions, thereby ensuring that the identified conflicts are real.
[0096] By the technical solution, the accuracy and reliability of rule conflict identification in the TCM conditioning scheme can be significantly improved. Compared with the preliminary identification relying only on the opposite action words, the mechanism of introducing virtual patient data packets and offline simulation verification enables the system to judge the rule conflict from the behavior level rather than only the semantic level, thereby effectively reducing the number of "false positive" conflict reports. This not only reduces the burden of manual review and intervention, avoids unnecessary processing of non-actual conflicts, but also ensures the logical consistency and safety of the final output conditioning scheme, and improves the practical value and efficiency of the entire TCM conditioning scheme optimization method.
[0097] In some preferred embodiments, the following is described by a specific example. Assume that there are two rule texts in the TCM conditioning scheme database:
[0098] The first rule text: if the patient shows "fever, thirst, tongue red with yellow fur", it is recommended to "clear heat and detoxify".
[0099] The second rule text: if the patient shows "fear of cold, fatigue, tongue pale with white fur", it is recommended to "warm yang and dispel cold".
[0100] According to the above first rule text and the second rule text, the system will first identify that "clear heat and detoxify" and "warm yang and dispel cold" are opposite words in terms of action words, and thus mark the two rules as a potential logical opposite rule pair.
[0101] However, in order to verify whether this is an actual logical conflict, the method of the present application will further perform the following steps:
[0102] First, the trigger conditions of the first rule text are analyzed as "fever, thirst, tongue red with yellow fur", and the trigger conditions of the second rule text are analyzed as "fear of cold, fatigue, tongue pale with white fur".
[0103] Next, the system will attempt to generate a virtual patient data packet that needs to contain the necessary indications that can trigger both rules. For example, the system will attempt to construct a virtual patient data packet that has both "fever, thirst, tongue red with yellow fur" and "fear of cold, fatigue, tongue pale with white fur" indications.
[0104] Subsequently, the virtual patient data packet is input to an independent rule verification sandbox for offline simulation verification. In the simulation process, the sandbox will process the virtual patient data packet according to its internal simulation conditioning scheme processing logic and output a conditioning recommendation report.
[0105] Finally, the system will determine whether the conditioning recommendation report contains both "clear heat and detoxify" and "warm yang and dispel cold" conflicting conditioning recommendations.
[0106] If both suggestions appear in the report, it is confirmed that there is an actual logical conflict, the system will issue an alarm and record.
[0107] But in this example, since the indications of “fever” and “aversion to cold”, “red tongue with yellow fur” and “pale tongue with white fur” are usually mutually exclusive in clinical practice, it is difficult for a patient to have these indications at the same time. Therefore, in actual simulation verification, the system may not be able to generate a virtual patient data packet that can trigger both rules at the same time, or even if it is generated, it may only trigger one of the rules during simulation processing, or it may not be able to give a clear suggestion due to the contradiction of the indications. In this case, the conditioning suggestion report will not contain the suggestions of “clearing heat and detoxifying” and “warming yang and dispelling cold” at the same time. Therefore, the system will determine that there is no actual logical conflict for the pair of logically opposite rules, and delete the relevant information from the rule conflict log table, thereby avoiding false alarms for non-actual conflicts.
[0108] Specifically, the trigger condition of each rule includes the necessary indication items and their logical relationships required for the activation of the corresponding rule. The step of generating a virtual patient data packet according to the trigger condition includes: obtaining a trigger indication set of the first rule, and obtaining a trigger indication set of the second rule, and merging to generate a new indication set, which has the necessary indications for triggering each rule at the same time.
[0109] Specifically, before generating the virtual patient data packet, the trigger condition of each rule in the pair of logically opposite rules needs to be analyzed. These trigger conditions are usually composed of a series of indication items and their logical relationships (such as “and”, “or”, “not”), and these indication items are necessary for activating the corresponding rule. In order to ensure that the generated virtual patient data packet can trigger both rules in the pair of logically opposite rules, the trigger indication set of the first rule and the trigger indication set of the second rule need to be obtained. These two indication sets are then merged to generate a new indication set. This new indication set is designed to contain all the necessary indications, so as to ensure that when the virtual patient data packet is constructed based on this set, it can simultaneously satisfy the trigger conditions of the first rule and the second rule. For example, if the trigger condition of the first rule is “tense pulse and red tongue”, and the trigger condition of the second rule is “slippery pulse and yellow fur”, the merged indication set will contain “tense pulse”, “red tongue”, “slippery pulse”, “yellow fur”, etc. to ensure that the virtual patient data packet can trigger both rules at the same time.
[0110] The scheme of the present application ensures that the generated new indication set can meet the trigger conditions of the two rules in the logically opposite rule pair by acquiring and merging the trigger indication set of the first rule and the trigger indication set of the second rule. Thus, the virtual patient data package constructed based on the new indication set can simulate a clinical scenario that activates the two rules at the same time. This mechanism is the basis for subsequent offline environment simulation verification, which enables the system to accurately test whether the two logically opposite rules will be triggered and produce conflicting recommendations under certain conditions in a controlled environment.
[0111] Through the above technical scheme, the virtual patient data package generated can have high pertinence and effectiveness, accurately simulating clinical indications that can trigger a logically opposite rule pair at the same time. This greatly improves the accuracy and reliability of subsequent conflict verification, avoids false positives due to the virtual patient data package failing to trigger both rules at the same time, and thus makes the identification of rule conflicts more accurate, providing a solid data foundation for the optimization of TCM regimen.
[0112] Specifically, the step of performing offline environment simulation verification on the virtual patient data package and outputting a regimen recommendation report includes:
[0113] The virtual patient data package is input into an independent rule verification sandbox. The independent rule verification sandbox can be understood as an isolated and controlled test environment, which aims to simulate the real TCM regimen running environment without causing any impact on the actual database or system.
[0114] The rule verification sandbox includes a simulation regimen. The simulation regimen is a copy or logical implementation of the real TCM regimen, which is designed to accurately reproduce the processing logic of the TCM regimen in the TCM regimen database. This means that the simulation regimen running in the sandbox has a consistent behavior pattern with the actual running regimen in terms of processing patient data and generating regimen recommendations.
[0115] Thus, according to the virtual patient data package and the simulation regimen, the regimen recommendation report can be output. The report will reflect the regimen recommendations generated for the specific virtual patient data package in the simulation environment, thereby providing a basis for subsequent conflict judgment.
[0116] By the technical solution, the potential rule conflict can be verified in a controlled and risk-free environment. The use of the independent rule verification sandbox effectively avoids the data pollution or system instability problems that may be caused by testing in the actual running environment. At the same time, the consistency of the simulation conditioning scheme and the processing logic of the traditional Chinese medicine conditioning scheme in the database ensures the accuracy and reliability of the verification result, so that the identified actual logic conflict has high authenticity. This significantly improves the safety, accuracy and efficiency of the traditional Chinese medicine conditioning scheme optimization process, and provides a solid foundation for subsequent rule revision and system optimization.
[0117] In actual operation, if the to-be-synthesized indication set contains the positive form and the negative form of the same composite indication, for example, "fever" and "no fever", the generated virtual patient data package may not effectively simulate the actual conflict scenario, and even cover up the potential deep logic conflict between the rules, thereby affecting the accuracy and efficiency of subsequent conflict verification.
[0118] In this regard, the present application further proposes that the indication item includes a basic indication and a composite indication, and before the step of merging to generate a new indication set, the following steps are further included:
[0119] Detecting whether the to-be-synthesized indication set contains the positive form and the negative form of the same composite indication, if yes, judging that the logic opposite rules have actual logic conflict, if not, continuing to merge to generate a new indication set.
[0120] Specifically, the indication item can be understood as each index or symptom used to judge the state of the patient in TCM diagnosis. Among them, the basic indication refers to those indivisible, most basic symptoms or signs, such as "stringy slippery pulse", "red tongue" and the like. The composite indication refers to an indication combined by multiple basic indications or having more complex semantics, such as "internal accumulation of damp-heat", "deficiency of both qi and blood" and the like. These composite indications usually have positive and negative forms, such as "damp-heat" and "no damp-heat", "qi deficiency" and "not qi deficiency". Before merging to generate a new indication set, the system will perform a pre-detection on the trigger indication set of the first rule and the trigger indication set of the second rule. The detection aims to identify whether a certain composite indication exists, whose positive and negative forms appear in the indication set to be synthesized at the same time. For example, if the trigger condition of the first rule requires "damp-heat", and the trigger condition of the second rule requires "no damp-heat", the system will identify that the composite indication "damp-heat" exists in both positive and negative forms. If the detection result shows that the indication set to be synthesized contains both the positive and negative forms of the same composite indication, it is directly judged that the logical opposite rules actually exist in conflict. This means that the two rules have irreconcilable contradictions at the most basic trigger condition level, and there is no need to further generate a virtual patient data package for simulation verification to confirm the conflict. If the detection result shows that there is no such contradiction, the step of merging to generate a new indication set is continued.
[0121] The scheme of the present application can earlier and more accurately identify the deep logical conflicts between rules by introducing a pre-detection mechanism before merging the indication sets. It is because of the strict cross-checking of the indication items in the trigger conditions, especially the positive and negative forms of the composite indications, before generating a virtual patient data package that the system can avoid generating a virtual patient data package that is logically self-contradictory. This pre-judgment mechanism ensures that the subsequent offline environment simulation verification is carried out on a logically consistent and meaningful basis, thereby improving the efficiency and reliability of the entire conflict detection process.
[0122] Through the above technical scheme, the present application can effectively avoid the generation of invalid or misleading virtual patient data packages caused by merging trigger conditions containing contradictory composite indications. The scheme enables the system to discover the fundamental logical conflicts between rules at an earlier stage, thereby significantly improving the accuracy and efficiency of the TCM conditioning scheme optimization method in identifying and handling rule conflicts.
[0123] In some preferred embodiments, the following is described by a specific example. Assume that there are two rules:
[0124] The first rule text: when the patient shows "yellow and greasy tongue fur" and "stringy slippery pulse", "clearing heat and promoting diuresis" is recommended.
[0125] The second rule text: when the patient shows "thin and white fur on the tongue" and "fine and slow pulse", it is recommended to "warm yang and dispel cold".
[0126] Among them, "furred tongue" can be defined as a composite indicator, and its positive form is "yellow and greasy fur on the tongue", and its negative form is "thin and white fur on the tongue".
[0127] Before generating the virtual patient data package, the system obtains the trigger indicator set of the first rule (including "yellow and greasy fur on the tongue" and "fine and smooth pulse") and the trigger indicator set of the second rule (including "thin and white fur on the tongue" and "fine and slow pulse"). At this time, the system will detect the indicator set to be synthesized. Since "yellow and greasy fur on the tongue" and "thin and white fur on the tongue" are the positive form and the negative form of the composite indicator "furred tongue", the system will immediately determine that the two rules have actual logical conflicts. In this case, there is no need to continue to merge the indicator set or generate a virtual patient data package for offline simulation verification, and the system can directly issue an alarm information indicating that there is a fundamental contradiction between the first rule text and the second rule text based on the "furred tongue" indicator. This makes the identification of rule conflicts more rapid and accurate.
[0128] The present application further proposes that after the step of determining that the logically opposite rule pair has actual logical conflicts, the system further comprises:
[0129] stopping generating a new indicator set;
[0130] triggering a rule conflict alarm, wherein the rule conflict alarm includes information of the logically opposite rule pair and the name of the composite indicator causing the conflict;
[0131] writing the rule conflict alarm into the rule conflict log and sending a notification.
[0132] Specifically, stopping generating a new indicator set means that once it is detected that the same composite indicator has a positive form and a negative form in the indicator set to be synthesized, it is confirmed that there is an irreconcilable logical conflict, and the system will immediately stop the subsequent indicator set merging operation. This is intended to avoid unnecessary processing or verification based on an inherently contradictory indicator set, thereby saving computing resources and preventing further logical errors.
[0133] Among them, triggering a rule conflict alarm means that the system will immediately generate and activate an alarm information after confirming the actual logical conflict. The rule conflict alarm is designed to include key conflict information, such as the specific identification of the logically opposite rule pair involved in the conflict and the name of the composite indicator causing the conflict. For example, if "body heat" and "body cold" are opposite composite indicators, and they both appear in the indicator set to be synthesized, the alarm will explicitly indicate these two rules and the conflicting indicator "body heat / body cold".
[0134] In practical applications, writing the rule conflict alert into the rule conflict log and sending a notification means that the generated rule conflict alert information is stored persistently in the rule conflict log table, so as to facilitate subsequent auditing, analysis and problem tracing. At the same time, the system also sends a notification to the preset recipient (for example, a rule administrator, a system maintainer or a relevant doctor), so as to ensure that the conflict information can be timely conveyed to the personnel who need to handle, so that they can intervene quickly and solve the rule conflict.
[0135] The scheme of the present application can effectively prevent the system from continuing to run in the presence of a fundamental logical error by immediately suspending the subsequent indication set generation process after detecting an irresolvable logical conflict, thereby improving the processing efficiency and the accuracy of the results. At the same time, by triggering a rule conflict alert containing detailed conflict information and writing it into the rule conflict log and sending a notification, the nature of the conflict, the rules involved and the specific indications that caused the conflict can be clearly recorded and timely conveyed.
[0136] Through the above technical scheme, the present application can significantly improve the conflict processing efficiency and accuracy of the traditional Chinese conditioning scheme optimization method. Compared with merely judging the existence of a conflict, the present application effectively avoids resource waste and potential error spread by immediately suspending unnecessary subsequent processing. In addition, by generating a detailed rule conflict alert and timely notifying relevant personnel, the present application ensures rapid response and effective management of key logical conflicts, greatly improving the robustness and reliability of the rule base, thereby providing safer and more reliable protection for the formulation of traditional Chinese conditioning schemes.
[0137] In some preferred embodiments, the following is described by a specific example. Suppose there are two rule texts in the traditional Chinese conditioning scheme database, the first rule text stipulates that "if a patient shows red tongue with yellow fur and rapid pulse, the conditioning suggestion is to clear heat and detoxify", where "clear heat" is the first action word. The second rule text stipulates that "if a patient shows pale tongue with white fur and slow pulse, the conditioning suggestion is to warm yang and dispel cold", where "warm yang" is the second action word, and "warm yang" and "clear heat" are opposite words in the preset traditional Chinese action word relationship table.
[0138] According to the above method, the system first identifies that the two rule texts are a pair of logically opposite rules. Further, when analyzing the trigger conditions and attempting to merge to generate a virtual patient data packet, it is assumed that the trigger indication set of the first rule contains "red tongue with yellow fur" and "rapid pulse", and the trigger indication set of the second rule contains "pale tongue with white fur" and "slow pulse". Before merging to generate a new indication set, the system detects that "red tongue with yellow fur" and "pale tongue with white fur" are two indication items that are semantically opposite composite indications (for example, can be defined as the positive form and the negative form of "heat image").
[0139] At this time, according to the scheme of the present application, the system will immediately determine that the logical opposite rule pair actually has a logical conflict. Subsequently, the system will suspend the generation of a new indication set, and no longer attempt to construct a virtual patient data packet that simultaneously satisfies both “red tongue with yellow fur” and “pale tongue with white fur”, because this is logically contradictory. At the same time, the system will trigger a rule conflict alert, which will explicitly indicate the rule pair involved in the conflict (i.e., the “clear heat and detoxify” rule and the “warm yang and dispel cold” rule), as well as the composite indication name that caused the conflict (e.g., “tongue appearance heat and cold opposition”). This alert information will be written into the rule conflict log table, and automatically sent to the rule administrator, so that they can promptly review and correct the two mutually contradictory rules, thereby maintaining the logical consistency of the rule library.
[0140] The step of determining whether the second action word is the same as the first action word according to the present application further comprises:
[0141] The action word comprises a main action word and an auxiliary action word, and the opposite word comprises a main opposite word and an auxiliary opposite word;
[0142] determining whether the second main action word is the same as the first main action word;
[0143] If so, the indication items and their logical relationships of the trigger conditions of the first rule text and the second rule text are extracted respectively and converted into standardized indication sets respectively;
[0144] The intersection and union of the two standardized indication sets are calculated to obtain an overlap index;
[0145] The overlap index is compared with a preset co-occurrence threshold value, if the overlap index is lower than the co-occurrence threshold value, it is determined that the first rule text and the second rule text are low-risk conflicts, and written into the internal audit log; if the overlap index is higher than the co-occurrence threshold value, it is determined that the first rule text and the second rule text are high-risk conflicts, and it is determined as a logical opposite rule pair.
[0146] Specifically, the action word can be further subdivided into a main action word and an auxiliary action word. Among them, the main action word refers to the word in the traditional Chinese conditioning scheme that embodies the core treatment purpose or the main action effect, such as “clearing heat”, “tonifying qi”, “activating blood” and the like. The auxiliary action word refers to the word that assists or modifies the main action, or embodies the secondary action effect, such as “detoxification”, “invigorating the spleen”, “resolving stasis” and the like. Correspondingly, the opposite word is also subdivided into a main opposite word and an auxiliary opposite word, which correspond to the opposite relationship of the main action word and the auxiliary action word respectively. This subdivision helps to more accurately identify the opposite relationship between rules, especially at the level of the main action word.
[0147] After determining whether the main opposite words of the second main action words and the first main action words are the same, if there is an opposite relationship of the main action words, further, the triggering conditions of the two rules need to be analyzed in depth. Specifically, the indications in the triggering conditions of the first rule text and the second rule text and their logical relationships are extracted and converted into a standardized indication set. The standardized indication set refers to the unified processing of indication items that may exist in different rules but have the same meaning and different expression methods, and the conversion of their logical relationships (such as "and", "or", "not") into a form that can be processed by set operations, so as to facilitate subsequent quantitative comparison.
[0148] Subsequently, by calculating the intersection and union of the two standardized indication sets, an overlap index can be obtained. The overlap index quantifies the similarity or co-occurrence possibility of the triggering conditions of the two rules.
[0149] For example, the overlap index can be obtained by dividing the size of the intersection by the size of the union, and its value is between 0 and 1. The larger the value, the higher the overlap degree of the triggering conditions, that is, the two rules are more likely to be triggered at the same time under the same patient indications.
[0150] Finally, the obtained overlap index is compared with a preset co-occurrence threshold. The co-occurrence threshold can be set according to actual application requirements and expert experience. If the overlap index is lower than the co-occurrence threshold, it is determined that the first rule text and the second rule text are low-risk conflicts. This means that although they have an opposite relationship in the main action words, due to the low overlap degree of their triggering conditions, the possibility of being triggered at the same time and causing conflicts in actual application is small. Such low-risk conflict information will be written into the internal audit log for subsequent review or optimization, but usually will not immediately trigger an alarm. On the contrary, if the overlap index is higher than or equal to the co-occurrence threshold, it is determined that the first rule text and the second rule text are high-risk conflicts, and they are judged as a pair of logically opposite rules. This means that the two rules not only have an opposite relationship in the main action words, but also have a high overlap in the triggering conditions, and it is very likely that they will be triggered at the same time and cause actual conflicts in actual application, so further verification or manual intervention is needed.
[0151] By the technical solution, the accuracy and efficiency of rule conflict identification in the TCM conditioning scheme can be significantly improved. Compared with the traditional method that only relies on the direct opposition of action words, the present scheme can more finely identify and distinguish conflicts of different risk levels, avoiding unnecessary in-depth verification of low-risk conflicts, thereby optimizing resource utilization. Specifically, by introducing the distinction between primary action words and secondary action words, the judgment of opposition relationship is more accurate; and by calculating the overlap index of the trigger conditions, the actual occurrence probability of the conflict can be quantitatively evaluated, effectively avoiding false positives due to theoretical opposition. Thus, the system can more intelligently identify high-risk logical opposite rule pairs that need attention and submit them to subsequent offline environment simulation verification, thereby ensuring that the final conditioning scheme database has higher internal consistency and reliability.
[0152] In some preferred embodiments, the following is described by a specific example.
[0153] Suppose there are two rules in the TCM conditioning scheme database:
[0154] The first rule text: if the patient shows "fever, thirst, red tongue with yellow fur", it is recommended to "clear heat and detoxify".
[0155] The second rule text: if the patient shows "fear of cold, cold limbs, pale tongue with white fur", it is recommended to "warm yang and dispel cold".
[0156] First, the system scans the first rule text and extracts the first action word as "clear heat and detoxify". According to the preset TCM action word relationship table, it is found that the primary opposite word of "clear heat" is "warm yang".
[0157] Next, the system scans the second rule text and extracts the second action word as "warm yang and dispel cold". It is determined whether the second primary action word "warm yang" is the same as the primary opposite word "warm yang" of the first primary action word "clear heat". In this example, they are the same.
[0158] Since there is an opposition in the primary action words, the system will further extract the trigger conditions of the two rules.
[0159] The trigger condition indicator of the first rule text is: {fever, thirst, red tongue with yellow fur}.
[0160] The trigger condition indicator of the second rule text is: {fear of cold, cold limbs, pale tongue with white fur}.
[0161] These indicators are converted into standardized indicator sets.
[0162] The intersection of the two standardized indicator sets is calculated: {} (empty set), as there is no common indicator.
[0163] The union of the two sets of normalized indications is computed: {fever, thirst, red tongue with yellow fur, aversion to cold, cold limbs, pale tongue with white fur}.
[0164] The overlap index = intersection size / union size = 0 / 6 = 0.
[0165] Suppose the preset co-occurrence threshold is 0.3. Since the calculated overlap index 0 is lower than the co-occurrence threshold 0.3, the system determines that the first rule text and the second rule text are low-risk conflicts, and writes their information to the internal audit log. This indicates that although "clearing heat" and "warming yang" are theoretically opposite, since their trigger conditions are completely non-overlapping, it is almost impossible for them to appear simultaneously in actual patient treatment, so their conflict risk is low, and there is no need to immediately perform complex offline simulation verification.
[0166] Let's take another example.
[0167] Third rule text: if the patient shows "abdominal distension, loss of appetite, thick and greasy tongue fur", then "spleen-strengthening and food-digesting" is recommended.
[0168] Fourth rule text: if the patient shows "abdominal distension, loss of appetite, dry mouth", then "yin-nourishing and dryness-moistening" is recommended.
[0169] Suppose "spleen-strengthening" and "yin-nourishing" are defined as main opposite words in certain specific contexts.
[0170] The first action word of the third rule text is extracted as "spleen-strengthening and food-digesting".
[0171] The second action word of the fourth rule text is extracted as "yin-nourishing and dryness-moistening".
[0172] Determine whether the second main action word "yin-nourishing" and the first main action word "spleen-strengthening" are the same as the main opposite words. Suppose they are defined as the same.
[0173] Extract the trigger condition indication items:
[0174] Third rule text: {abdominal distension, loss of appetite, thick and greasy tongue fur}.
[0175] Fourth rule text: {abdominal distension, loss of appetite, dry mouth}.
[0176] The intersection of the sets of normalized indications: {abdominal distension, loss of appetite}.
[0177] The union of the sets of normalized indications: {abdominal distension, loss of appetite, thick and greasy tongue fur, dry mouth}.
[0178] The overlap index = intersection size / union size = 2 / 4 = 0.5.
[0179] If the preset co-occurrence threshold is still 0.3. Since the overlap index 0.5 is higher than the co-occurrence threshold 0.3, the system determines that the third rule text and the fourth rule text are high-risk conflicts, and judges them as a logical opposite rule pair. This means that the two rules not only have opposite main action words, but also have highly overlapping trigger conditions, which are likely to be triggered at the same time and cause actual conflicts in actual application, and therefore need further verification or manual intervention.
[0180] Specifically, after the trigger conditions of the first rule text and the second rule text are parsed and converted into standardized indication sets, intersection and union operations need to be performed on the two standardized indication sets. The intersection refers to the set of indication items commonly contained in the two sets, and its size is the number of common indication items. The union refers to the set of all indication items in the two sets, and its size is the total number of all non-repeated indication items. By dividing the size of the intersection by the size of the union, a value between 0 and 1, i.e. the overlap index, can be obtained. The overlap index quantitatively reflects the degree of overlap between the trigger conditions of the two rules.
[0181] Through the above technical solution, the calculation of the overlap index becomes standardized and accurate, so that the degree of overlap between the trigger conditions of the first rule text and the second rule text can be more accurately quantified.
[0182] The present application further proposes a starting condition for the TCM regimen optimization method to ensure the timeliness and effectiveness of rule conflict detection.
[0183] The starting condition for the TCM regimen optimization method is to start periodically or when a new supplementary rule text is stored in the TCM regimen database, the supplementary rule text being an empirical rule entered by a frontline doctor.
[0184] Specifically, the "periodic start" can be understood as automatically executing the optimization method according to a preset time interval, for example, it can be set to automatically run at a specific time point every day, every week or every month. This starting mode aims to ensure continuous monitoring of the existing rule library, so as to timely discover and handle potential logical conflicts. The "start when a new supplementary rule text is stored in the TCM regimen database" means that when the TCM regimen database is updated, especially when a new rule text is added, the system will immediately trigger the optimization process. The "supplementary rule text" specifically refers to rules entered by frontline doctors based on their clinical practice experience. These empirical rules are crucial for enriching and perfecting the regimen, but they may also introduce potential conflicts with existing rules due to their individualization or specific situational nature.
[0185] By the technical solution, the maintenance efficiency of the traditional Chinese medicine conditioning scheme database and the accuracy of the rules can be improved. The regular starting mechanism guarantees the continuous quality control of the rule library and reduces the accumulation risk of potential conflicts. The instant starting of the newly entered supplementary rule text ensures the logical consistency of the rule library in the dynamic updating process. Especially for the experience rules entered by the front-line doctors, the conflicts introduced by the experience rules can be found and solved in time, so that the conditioning suggestion errors or inconsistencies caused by rule conflicts can be avoided, and the clinical application safety and effectiveness of the traditional Chinese medicine conditioning scheme are improved.
[0186] For reference Figure 2 The embodiment of the application further discloses a traditional Chinese medicine conditioning scheme optimization system applying the traditional Chinese medicine conditioning scheme optimization method, comprising:
[0187] A rule scanning module 11 is configured to scan rule texts in each rule module in the traditional Chinese medicine conditioning scheme database and extract first action words and second action words.
[0188] A contrary query module 12 is configured to query a contrary word corresponding to the first action word in a preset traditional Chinese medicine action word relationship table.
[0189] A contrary identification module 13 is configured to judge whether the second action word is the same as the contrary word of the first action word. If yes, the first rule text and the second rule text are marked as a logical contrary rule pair, and the logical contrary rule pair is written into a rule conflict log table and prompted. If not, the other rule texts are continuously scanned to extract new second action words.
[0190] The system aims to solve the contradictory conditioning suggestion output problem caused by the lack of conflict detection mechanism when the traditional Chinese medicine health conditioning auxiliary system processes the patient health report, and avoid the dilemma that the system underlying defects are covered up due to user adaptive behavior. By decoupling the functions of the traditional Chinese medicine conditioning scheme optimization method into the rule scanning module 11, the contrary query module 12 and the contrary identification module 13, the system can actively and automatically scan the rule texts in the traditional Chinese medicine conditioning scheme database, accurately extract the action words, and intelligently identify the potential logical contrary rule pair based on the preset word relationship table. Therefore, the system can find and mark the conflicts existing in the rule library in time, so as to provide early warning before generating the conditioning suggestion report, effectively improve the accuracy and reliability of the conditioning scheme, reduce the artificial judgment burden of the doctors, and provide real data feedback for the continuous optimization of the system itself.
[0191] The specific steps and principles of the traditional Chinese regimen optimization method have been described in the above embodiments, and will not be repeated here. It should be emphasized that the traditional Chinese regimen optimization system provided by the present application, through its modular design, visualizes the above method steps into operable system components.
[0192] Specifically, the rule scanning module 11 is configured to perform scanning on the rule texts in each rule module in the traditional Chinese regimen database and extract the first action vocabulary and the second action vocabulary therefrom. This module can be a separate software service deployed on a server, which initiates the scanning task periodically or on demand. For example, it can use file I / O operations to read the rule texts stored in the file system, or interact with the database through a database connector to execute a query statement to obtain rule data. When extracting the action vocabulary, the rule scanning module 11 can integrate a lexical analyzer or a rule-based pattern matching engine to identify the core vocabulary in the predefined action vocabulary list. As another implementation, the rule scanning module 11 can also be a hardware acceleration unit dedicated to efficiently processing text scanning and vocabulary identification tasks.
[0193] The opposite query module 12 is configured to query the opposite vocabulary corresponding to the first action vocabulary based on the preset traditional Chinese action vocabulary relationship table. This module can be a separate microservice that receives the first action vocabulary through an API interface and returns its opposite vocabulary. For example, the traditional Chinese action vocabulary relationship table can be stored in an in-memory database to enable fast querying; alternatively, it can also be an external knowledge graph service, and the opposite query module 12 obtains the opposite vocabulary by calling the interface thereof. In some embodiments, the opposite query module 12 can be a simple lookup table implementation that uses data structures such as hash maps for efficient retrieval.
[0194] The opposite identification module 13 is configured to determine whether the second action vocabulary is the same as the opposite vocabulary of the first action vocabulary, and to perform corresponding marking and recording according to the determination result. This module can be a core business logic processing unit that receives inputs from the rule scanning module 11 and the opposite query module 12 and performs logical determination. For example, it can be a Java or Python program running on an application server that uses string comparison algorithms to determine whether the vocabularies are the same. If it is determined to be the same, the opposite identification module 13 will be responsible for generating the marking information of the logical opposite rule pair and storing these information in the rule conflict log table through message queues or direct writing. At the same time, the module can also trigger a notification mechanism, such as sending a prompt message to relevant personnel through an email service or an instant messaging interface. As an implementation, the opposite identification module 13 can also be a component based on a rule engine, and the preset conflict determination rules are loaded into the engine, which automatically triggers the marking and prompting operations when the conditions are met.
[0195] The core innovation of the traditional Chinese medicine regimen optimization system provided in the present application is that the traditional Chinese medicine regimen optimization method is embodied as a set of operable and modular system architecture, thereby fundamentally solving the rule conflict problem commonly existing in the prior art.
[0196] Compared with the system in the prior art which only directly collects the regimen suggestions output by independent modules in text form and does not include any conflict checking or reconciliation mechanism, the present system introduces the rule scanning module 11, the opposite query module 12 and the opposite identification module 13, thereby realizing the change from passive acceptance to active discovery of rule conflicts. For example, in the traditional system, when the patient data simultaneously triggers two opposite suggestions of “clearing heat” and “warming and tonifying”, the system directly outputs contradictory information, increasing the burden of doctors. However, the present system can identify these rules through the rule scanning module 11, determine their opposite relationship through the opposite query module 12, and pre-mark them as a pair of logically opposite rules at the system level through the opposite identification module 13, thereby avoiding the direct presentation of contradictory suggestions in actual application.
[0197] Furthermore, in the prior art, doctors artificially simplify patient data to avoid contradictory output, resulting in almost no rule conflict records in the system log, thereby concealing the underlying defects of the system. The present system breaks this vicious cycle through its active modular conflict identification mechanism. Whether or not the doctors simplify the input data, as long as there are logically opposite rules in the rule library, the rule scanning module 11, the opposite query module 12 and the opposite identification module 13 can work cooperatively to identify and write them into the rule conflict log table, thereby providing the system maintenance team with real and accurate feedback on the health of the rule library. Thus, the present system can realize self-improvement through its own data feedback mechanism, re-invest resources into the optimization work of core logical defects, and ultimately improve the overall quality and practicality of traditional Chinese medicine regimen.
[0198] The traditional Chinese medicine regimen optimization system described above further comprises:
[0199] The virtual design and synthesis module is configured to analyze the triggering conditions of each rule in the pair of logically opposite rules, and generate a virtual patient data packet according to the triggering conditions, wherein the virtual patient data packet has necessary indications for simultaneously triggering each rule.
[0200] The conflict verification module performs offline environment simulation verification on the virtual patient data package and outputs a conditioning suggestion report. It is determined whether the conditioning suggestion report contains conditioning suggestions in the first rule text and the second rule text. If yes, it is confirmed that the logical opposite rule pair actually has a logical conflict, an alarm information is issued, and all analysis and verification information is written into the rule conflict log table. If not, it is considered that the logical opposite rule pair does not actually have a logical conflict, and the related information is deleted in the rule conflict log table.
[0201] Specifically, the virtual design synthesis module is configured to receive the logical opposite rule pair marked by the opposite identification module 13. The module deeply analyzes the trigger conditions of each rule in the logical opposite rule pair. The trigger condition usually includes specific indication items and their logical relationships required to activate the rule, such as "yellow and greasy tongue fur and slippery pulse". The goal of the virtual design synthesis module is to construct a virtual patient data package that can simultaneously satisfy the trigger conditions of all rules in the logical opposite rule pair. This means that the virtual patient data package will contain all the necessary indications to ensure that all rules in the logical opposite rule pair can be activated in a simulated environment.
[0202] Further, the conflict verification module receives the virtual patient data package generated by the virtual design synthesis module. The module inputs the virtual patient data package into an independent offline simulation environment, such as a rule verification sandbox, which simulates the processing logic of the conditioning scheme in the TCM conditioning scheme database. Based on the virtual patient data package and the simulated conditioning scheme, the sandbox outputs a conditioning suggestion report. Then, the conflict verification module checks the conditioning suggestion report to determine whether it contains the conditioning suggestions suggested by the first rule text and the second rule text in the logical opposite rule pair. If both suggestions appear in the report, it indicates that the logical opposite rule pair actually has a logical conflict, and the system will issue an alarm information and record all related analysis and verification information in detail in the rule conflict log table. Conversely, if the conditioning suggestion report does not contain both suggestions, it is considered that the logical opposite rule pair does not actually have a logical conflict, and the system will delete the related preliminary marking information in the rule conflict log table to avoid false positives.
[0203] The scheme of the present application effectively solves the problem that false positives may be caused by identifying potential conflicts only by lexical oppositions by introducing a virtual design synthesis module and a conflict verification module. Specifically, the virtual design synthesis module analyzes the trigger conditions of pairs of logical opposition rules and generates a virtual patient data packet that can trigger these rules simultaneously, ensuring the effectiveness of subsequent verification. Because this data packet contains the necessary indications to activate all relevant rules simultaneously, it enables the simulation verification link to truly reflect the behavior of these rules in a specific context. Subsequently, the conflict verification module uses this virtual patient data packet to perform simulation verification in an offline environment, directly observing whether the conditioning recommendation report contains opposing recommendations.
[0204] Through the above technical solutions, the present application can perform deep-level actual conflict verification on the initially identified pairs of logical opposition rules, significantly reducing the false positive rate. Instead of relying solely on the opposition of action words to determine conflicts, the system verifies whether the rules will produce contradictory conditioning recommendations in actual application by simulating real patient situations. This improves the overall efficiency and intelligence level of the traditional Chinese conditioning scheme optimization system. In addition, by automating offline simulation verification, the workload of manual review is reduced, ensuring the internal logical consistency and safety of the conditioning scheme.
[0205] The above only describes embodiments of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A traditional Chinese medicine regimen optimization method, characterized in that, The method comprises the steps of: scanning the rule texts in each rule module in the traditional Chinese conditioning scheme database, and extracting a first action word from the first rule text, wherein the action word is a core word in the traditional Chinese conditioning scheme that reflects the effect of the action; based on a preset traditional Chinese action word relationship table, querying the opposite word corresponding to the first action word, and the traditional Chinese action word relationship table records various types of conventional action words and their opposite words; scanning all rule texts in the rule module to which the first action word belongs, and extracting a second action word from the second rule text; determining whether the second action word is the same as the opposite word of the first action word; if they are the same, marking the first rule text and the second rule text as a logical opposite rule pair, writing the logical opposite rule pair into a rule conflict log table, and prompting; if they are not the same, continue scanning other rule texts to extract a new second action word; The method further comprises the steps of: analyzing the trigger conditions of each rule in the logical opposite rule pair, and generating a virtual patient data packet according to the trigger conditions, wherein the virtual patient data packet has necessary indications for triggering each rule at the same time; offline environment simulation verification is performed on the virtual patient data packet, and a conditioning suggestion report is output; determining whether the conditioning suggestion report contains the conditioning suggestions in the first rule text and the second rule text at the same time; if yes, confirming that the logical opposite rule pair has an actual logical conflict, issuing an alarm information, and writing all analysis and verification information into the rule conflict log table; if no, considering that the logical opposite rule pair does not have an actual logical conflict, and deleting the related information in the rule conflict log table.
2. The traditional Chinese medicine regimen optimization method of claim 1, wherein, The trigger conditions of each rule include the indication items required for the activation of the corresponding rule and the logical relationship thereof, and the step of generating a virtual patient data packet according to the trigger conditions comprises: obtaining a trigger indication set of the first rule, obtaining a trigger indication set of the second rule, and merging to generate a new indication set, wherein the new indication set has necessary indications for triggering each rule at the same time.
3. The traditional Chinese medicine regimen optimization method of claim 1, wherein, The step of performing offline environment simulation verification on the virtual patient data packet and outputting a conditioning suggestion report comprises: inputting the virtual patient data packet into an independent rule verification sandbox, wherein the rule verification sandbox comprises a simulation conditioning scheme, the simulation conditioning scheme is consistent with the processing logic of the traditional Chinese conditioning scheme in the traditional Chinese conditioning scheme database, and the conditioning suggestion report is output according to the virtual patient data packet and the simulation conditioning scheme.
4. The traditional Chinese medicine regimen optimization method of claim 2, wherein, The indication items include basic indications and composite indications, and before the step of merging to generate a new indication set, the method further comprises the steps of: determining whether the indication set to be synthesized contains the positive form and the negative form of the same composite indication, if yes, determining that the logical opposite rule pair has an actual logical conflict, and if no, continuing to merge to generate a new indication set.
5. The traditional Chinese medicine regimen optimization method of claim 4, wherein, After the step of determining that the logical opposite rule pair has an actual logical conflict, the method further comprises the steps of: stopping generating a new indication set; triggering a rule conflict alarm, wherein the rule conflict alarm includes the information of the logical opposite rule pair and the name of the composite indication causing the conflict; write the rule conflict alert into the rule conflict log table and send a notification.
6. The traditional Chinese medicine regimen optimization method of claim 1, wherein, the action words include main action words and auxiliary action words, and the opposite words include main opposite words and auxiliary opposite words; the step of judging whether the second action words are the same as the opposite words of the first action words comprises: judging whether the second main action words are the same as the main opposite words of the first main action words; if yes, extracting the indicative items of the trigger conditions of the first rule text and the second rule text respectively and their logical relations, and converting them into standardized indicative sets respectively; calculating the intersection and union of the two standardized indicative sets to obtain an overlap index; comparing the overlap index with a preset co-occurrence threshold value, if the overlap index is lower than the co-occurrence threshold value, determining that the first rule text and the second rule text are low-risk conflicts, and writing into the internal audit log, if the overlap index is higher than the co-occurrence threshold value, determining that the first rule text and the second rule text are high-risk conflicts, and determining that they are a pair of logically opposite rules.
7. The traditional Chinese medicine regimen optimization method of claim 6, wherein, the calculation method of the overlap index is that the size of the intersection is divided by the size of the union to obtain the overlap index.
8. The traditional Chinese medicine regimen optimization method of any one of claims 1-7, wherein, the starting condition of the traditional Chinese conditioning scheme optimization method is to start regularly or when a new supplementary rule text is stored in the traditional Chinese conditioning scheme database, the supplementary rule text is an experiential rule input by a first-line doctor.
9. A traditional Chinese medicine regimen optimization system, applying the traditional Chinese medicine regimen optimization method of any one of claims 1-8, characterized in that, comprises: a rule scanning module for scanning rule texts in each rule module in the traditional Chinese conditioning scheme database to extract first action words and second action words; an opposite query module for querying opposite words corresponding to the first action words in a preset traditional Chinese action word relationship table; an opposite identification module for judging whether the second action words are the same as the opposite words of the first action words; if yes, marking the first rule text and the second rule text as a pair of logically opposite rules, writing the pair of logically opposite rules into a rule conflict log table and prompting, if not, continue to scan other rule texts to extract new second action words; further comprising the steps of: analyzing the trigger conditions of each rule in the pair of logically opposite rules, generating a virtual patient data packet according to the trigger conditions, the virtual patient data packet having necessary indicative items for triggering each rule at the same time; performing offline environment simulation verification on the virtual patient data packet to output a conditioning suggestion report; judging whether the conditioning suggestion report contains conditioning suggestions in the first rule text and the second rule text at the same time; if yes, confirming that the pair of logically opposite rules has actual logical conflicts, issuing an alarm information, and writing all analysis and verification information into the rule conflict log table; if not, considering that the pair of logically opposite rules does not have actual logical conflicts, deleting related information in the rule conflict log table.
Citation Information
Patent Citations
Online medical prescription medicine intelligent inspection method and device, equipment and storage medium
CN113674858A
Intelligent traditional Chinese medicine syndrome differentiation treatment method and system and storage medium
CN117542483A