Medical health skill determination and review method and system based on four independent rule bases

CN122903850APending Publication Date: 2026-10-13AIHUI BAOLI (GUANGZHOU) DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611407149.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]本发明提供了一种基于四类独立规则库的医疗健康Skill确定性审核方法及系统,以解决现有技术中存在的医疗健康Skill多类别规则审核结果难以保持确定性且审核依据难以追溯的问题

Benefits of technology

(1)本发明通过对医疗健康Skill的候选响应文本和会话上下文进行事实提取与标准化,形成包含事实类别的审核事实集,并根据所述事实类别生成规则检索条件,分别从临床用药、医疗伦理、隐私保护和交互安全四类独立规则库中获取候选规则。由于不同类别的审核事实分别对应各自的规则检索范围,能够减少无关规则参与后续判断,使候选规则与当前审核内容保持对应关系,并降低不同类别规则在统一检索过程中的相互干扰。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903850A_ABST
    Figure CN122903850A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of medical health information auditing, and discloses a medical health Skill certainty auditing method and system based on four types of independent rule bases. The method comprises the following steps: obtaining a medical health Skill candidate response text, a conversation context, a subject role and an authorized range to form an auditing fact set; generating a rule retrieval condition according to the fact category, querying four types of independent rule bases of clinical medication, medical ethics, privacy protection and interaction safety which are pre-constructed to obtain four types of candidate rule sets; comparing the auditing fact set, the subject role and the authorized range with applicable conditions to generate four types of auditing records; arranging and merging output actions according to a preset action priority to generate comprehensive auditing actions; and controlling the sending state and the text content of the candidate response text according to the comprehensive auditing actions to generate a medical health Skill certainty auditing result. The present application can realize the certainty processing and the auditing result tracing of multi-category rule auditing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical and health information review technology, and in particular to a deterministic review method and system for medical and health skills based on four independent rule bases. Background Technology

[0002] Currently, healthcare skills are increasingly being applied in scenarios such as health consultations, medication instructions, follow-up interactions, and health information services. The candidate response text generated by healthcare skills may simultaneously contain disease and medication information, subject behavior information, sensitive personal information, and risky interaction statements. Therefore, before sending candidate response texts, it is necessary to conduct multi-dimensional review based on the session context, subject role, and authorization scope. As the number of candidate response texts and review rules increases, the related review process increasingly involves big data analysis, placing higher demands on the accuracy of rule invocation, the consistency of review results, and the traceability of the review process.

[0003] In a current technology, clinical medication rules, medical ethics rules, privacy protection rules, and interaction security rules are typically stored in a single rule base. These rules are then invoked using a unified text classification or retrieval result to review candidate response texts. However, the objects and judgment conditions described by different rule categories differ significantly. Clinical medication rules primarily concern diseases, drugs, dosages, and special populations; medical ethics rules mainly concern subject roles, behavior types, and scope of responsibilities; privacy protection rules primarily concern sensitive information types, authorization scope, and information recipients; and interaction security rules mainly concern interaction scenarios, risk statements, and security prompts. When these rules are stored and invoked in a mixed manner, the same textual fact in a candidate response text may trigger rules from multiple categories simultaneously, and some unrelated rules may also be invoked together in the review process, causing interference between the applicable conditions of different rule categories. Furthermore, existing review methods typically select rules based on a single category label or execute different category rules sequentially in a fixed order. When candidate response texts simultaneously involve medication risks, boundaries of responsibility, sensitive information, and interactive expressions, a single category label is insufficient to cover all review content. When different rules generate different review actions such as blocking transmission, manual review, sensitive information masking, risk expression replacement, or supplementary safety prompts, without a fixed action ordering and merging method, the same candidate response text may produce different review results due to differences in the rule invocation scope or execution order. In another existing technology, an artificial intelligence model is used to perform a comprehensive review of candidate response texts and determine the review conclusion based on the model output. If this review method does not establish condition comparison records, rule-hitting records, and output action records corresponding to specific review rules, it is difficult to locate the rule source and judgment process corresponding to the review conclusion; when model parameters, inference configurations, or session contexts change, the same candidate response text may generate different review results.

[0004] Existing technologies suffer from the problem that it is difficult to maintain certainty in the review results of multiple categories of medical and health skills and that the basis for review is difficult to trace. Summary of the Invention

[0005] This invention provides a deterministic review method and system for medical and health skills based on four independent rule bases, in order to solve the problems in the prior art where it is difficult to maintain the determinism of the review results of multiple rule categories for medical and health skills and the review basis is difficult to trace.

[0006] Firstly, to address the aforementioned technical problems, this invention provides a deterministic verification method for healthcare skills based on four independent rule bases, comprising: Obtain the candidate response text, session context, subject role, and authorization scope of the Medical and Health Skill; extract facts from the candidate response text and the session context to obtain text facts; standardize and classify the text facts to obtain an audit fact set containing fact categories. Based on the fact categories, rule retrieval conditions are generated, and the four pre-built independent rule bases for clinical drug use, medical ethics, privacy protection, and interaction security are queried according to the rule retrieval conditions to obtain four candidate rule sets; The audit fact set, the subject role, and the scope of authorization are compared with the applicable conditions in the four candidate rule sets to obtain the condition comparison results. The hit rules corresponding to each of the independent rule bases are determined based on the condition comparison results. The output actions are extracted from the hit rules. The four types of audit records are generated based on the hit rules, the condition comparison results, and the output actions. The output actions are arranged according to a preset action priority to obtain an action sequence. The output actions are then merged according to the action sequence to generate a comprehensive review action. Based on the comprehensive review action, control the sending status and text content of the candidate response text to generate a deterministic review result for the Medical and Health Skill.

[0007] Secondly, the present invention provides a medical and health skill deterministic review system based on four independent rule bases, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.

[0008] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention extracts and standardizes facts from candidate response texts and conversation contexts of the medical and health skills to form a set of audit facts containing fact categories. Based on these fact categories, rule retrieval conditions are generated, and candidate rules are obtained from four independent rule bases: clinical drug use, medical ethics, privacy protection, and interaction security. Since different categories of audit facts correspond to their respective rule retrieval scopes, irrelevant rules are reduced from participating in subsequent judgments, ensuring that candidate rules maintain a correspondence with the current audit content and reducing mutual interference between different categories of rules during the unified retrieval process.

[0009] (2) This invention determines the hit rules corresponding to each independent rule base by comparing the review fact set, subject role, and authorization scope with the applicable conditions in the four candidate rule sets, and generates four types of review records respectively. This method enables the clinical drug use, medical ethics, privacy protection, and interaction security rules to form review conclusions independently based on their respective conditions, avoiding the omission of other categories of risks when reviewing based on only a single category label, thereby enabling the candidate response text of the medical and health skill to be independently reviewed by the four categories of rules: clinical drug use, medical ethics, privacy protection, and interaction security.

[0010] (3) This invention sorts the output actions in four types of audit records according to preset action priorities, and merges output actions such as blocking transmission, manual review, sensitive information masking, risk statement replacement, security prompt supplementation, and allowing transmission to generate comprehensive audit actions, thereby controlling the transmission status and text content of candidate response texts. Since the same type of audit actions adopt a fixed sorting and merging method, the same audit facts and rule version numbers can correspond to consistent processing results. At the same time, the audit record is formed by combining rule identifier, rule version number, and hit information, which facilitates the review and traceability of the deterministic audit results of medical and health skills. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of the medical and health skill deterministic review method based on four independent rule bases provided in the first embodiment of the present invention. Detailed Implementation

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

[0013] Reference Figure 1 The first embodiment of the present invention provides a deterministic verification method for medical and health skills based on four independent rule bases, including the following steps: S1. Obtain the candidate response text, session context, subject role, and authorization scope of the Medical and Health Skill. Extract facts from the candidate response text and the session context to obtain text facts. Standardize and classify the text facts to obtain a set of audit facts containing fact categories. S2, Generate rule retrieval conditions based on the fact category, and query the four pre-built independent rule bases of clinical drug use, medical ethics, privacy protection and interaction security according to the rule retrieval conditions to obtain four candidate rule sets; S3, compare the audit fact set, the subject role and the authorization scope with the applicable conditions in the four candidate rule sets respectively to obtain the condition comparison results, determine the hit rules corresponding to each of the independent rule bases according to the condition comparison results, extract the output action from the hit rules, and generate four types of audit records according to the hit rules, the condition comparison results and the output actions; S4, Arrange the output actions according to the preset action priority to obtain an action sequence, and merge the output actions according to the action sequence to generate a comprehensive review action; S5, based on the comprehensive review action, control the sending status and text content of the candidate response text, and generate a deterministic review result for the medical and health skill.

[0014] In step S1, the candidate response text of the medical and health skill, the session context, the subject role and the scope of authorization are obtained. Facts are extracted from the candidate response text and the session context to obtain text facts. The text facts are standardized and classified to obtain a set of audit facts containing fact categories.

[0015] Specifically, fact extraction is performed on the candidate response text and the session context to obtain textual facts. These textual facts are then standardized and categorized to obtain a set of audit facts containing fact categories, including: The candidate response text and the session context are compared with pre-built medical terminology, ethical behavior, sensitive pattern, and interaction word lists, respectively, and the matching text fragments, fact values, and text positions are extracted to obtain the text facts; The standardization method is determined according to the data type of the fact value. The standardization method includes term mapping according to a pre-built term mapping table or unit conversion according to a pre-built unit conversion table. The fact value is standardized according to the standardization method, and the standardization result is associated with the corresponding text fragment and text position to obtain the standard fact. Based on the source table categories corresponding to the standard facts, the standard facts are categorized to obtain a set of audit facts that includes at least one fact category among clinical drug use, medical ethics, privacy protection, and interaction security.

[0016] In one implementation, the candidate response text is text generated by the Medical Health Skill but not yet sent, and the session context consists of user input text and historical response text preceding the candidate response text under the same session identifier. The principal role is read from the authentication record corresponding to the current session, and the authorization scope is read from the access control record corresponding to the principal role. The authorization scope includes the categories of information allowed to be accessed, the categories of operations allowed to be performed, and the interaction scenarios allowed to be participated in. The candidate response text, the session context, the principal role, and the authorization scope are associated through the same audit task identifier.

[0017] It should be noted that the medical terminology list, the ethical behavior list, the sensitive pattern list, and the interaction terminology list are pre-constructed based on a structured rule file. The structured rule file is established based on publicly available and valid pharmacopoeias, drug instructions, clinical practice guidelines, medical ethics standards, personal information protection standards, and medical and health interaction security standards at the time of rule construction.

[0018] When creating the structured rule file, record the source file name, file version, effective date, and clause location. Extract the applicable objects, triggering facts, numerical ranges, subject roles, and authorization requirements from the corresponding clauses and write them into the search terms and applicable conditions fields, respectively. Write the output action field based on the prohibition, review, information masking, expression replacement, security prompts, or permitted processing content recorded in the clauses. Write AND, OR, or NOR logic based on the parallel, alternative, or exclusion relationships between the applicable conditions. Clauses that cannot be mapped to explicit applicable conditions and output actions are not written into the structured rule file.

[0019] The medical terminology table records disease terms, drug terms, medication behaviors, and measurement expressions; the ethical behavior table records behavioral expressions and ethical behavior types in medical and health interactions; the sensitive pattern table records sensitive information types and their matching expressions; and the interaction terminology table records interaction scenarios and risk expression types. Each table entry includes matching content, standard value, data type of fact value, field type, source table category, source document identifier, and clause location.

[0020] The matching expressions in the sensitive pattern table are established based on the character composition and arrangement of the sensitive information. Fixed-length numeric information forms matching expressions based on the number of numeric characters and the position of connectors; information containing a fixed text prefix forms matching expressions based on the fixed text prefix and subsequent character types; health records form matching content based on the record name and field names. Each matching expression is associated with a sensitive information type.

[0021] The terminology mapping table is established based on the matching content and standard values ​​in each entry. Each terminology mapping record includes the original expression, the source table category, and the standard value. When the same original expression corresponds to multiple source table categories, separate terminology mapping records are established for each category.

[0022] The unit conversion table records the measurement type, original unit, target unit, and conversion factor. The target unit is consistent with the unit of measurement used in the numerical conditions of the corresponding rule, and the conversion factor is written according to the fixed dimensional relationship between the original unit and the target unit. For example, when the target unit for drug dosage is milligrams, the conversion factor for grams is 1000, and the actual value of 0.005 grams is standardized to 5 milligrams after unit conversion. The numerical values ​​only represent the unit conversion process.

[0023] During the fact extraction process, the candidate response text and the session context are traversed separately. The text character sequence is compared with the matching content in the medical terminology table, the ethical behavior table, and the interaction word table. Pattern comparison is also performed based on the matching expressions in the sensitive pattern table. When a comparison is successful, the corresponding text fragment, fact value, data type, field type, source table category, and text position of the fact value are extracted to form the text fact.

[0024] The text position includes the source text identifier, the starting character position, and the ending character position. The first character position of each text segment is recorded as 1, and subsequent character positions are incremented according to the character order. When multiple entries in the same source table category cover the same character range, the text segment with more characters is retained; when the number of characters is the same, the text fact that appears earlier in the list of table entry identifiers is retained. When the same text segment matches different source table categories, the corresponding text facts are retained respectively.

[0025] When the data type of the fact value is a terminology type, the terminology mapping table is queried according to the fact value and the source table category, and the queried standard value is determined as the standardization result. When the data type of the fact value is a measurement type, the numerical value and the original unit are extracted from the fact value, the unit conversion table is queried according to the measurement type and the original unit, the numerical value is converted into a numerical value under the target unit, and the converted numerical value is combined with the target unit to form the standardization result.

[0026] The standardized results are correlated with the original text fragments, field types, source text identifiers, text locations, and source table categories to obtain standard facts. When the source table category is a medical terminology table, the corresponding standard facts are labeled as clinical drug use; when the source table category is an ethical behavior table, the corresponding standard facts are labeled as medical ethics; when the source table category is a sensitive pattern table, the corresponding standard facts are labeled as privacy protection; and when the source table category is an interactive thesaurus, the corresponding standard facts are labeled as interactive security.

[0027] The standardized facts with completed category labeling are arranged according to their source text identifier and starting character position to obtain the audit fact set. Each audit fact includes the standardization result, field type, original text fragment, source text identifier, text position, and fact category.

[0028] For example, the session context includes the current daily dose of 0.005 grams of warfarin, and the candidate response text includes "can discontinue warfarin independently" and "send contact number to family members." The text fragment "warfarin" forms a standard fact for the clinical drug use category with the drug identifier "warfarin"; the text fragment "0.005 grams" forms a standard fact for the clinical drug use category with the value "5 milligrams"; the text fragment "discontinue independently" forms a standard fact for the clinical drug use category with the medication behavior "discontinue independently"; the text fragment "can discontinue warfarin independently" forms a standard fact for the interaction safety category with the risk statement type "discontinuation suggestion"; and the text fragment forms a standard fact for the privacy protection category with the sensitive information type "contact number". Combining these standard facts yields the audit fact set.

[0029] In step S2, rule retrieval conditions are generated based on the fact categories, and the four pre-built independent rule bases for clinical drug use, medical ethics, privacy protection, and interaction security are queried according to the rule retrieval conditions to obtain four candidate rule sets.

[0030] The rule retrieval conditions generated based on the fact categories include: From the review facts of the clinical drug use category, at least one of disease identifier, drug identifier, and drug use behavior is extracted; from the review facts of the medical ethics category, the type of ethical behavior is extracted; from the review facts of the privacy protection category, the type of sensitive information is extracted; and from the review facts of the interaction security category, at least one of the interaction scenario and risk statement type is extracted, resulting in four types of search terms. Each of the aforementioned search item sets is determined as the rule search condition for the corresponding independent rule base.

[0031] In one implementation, standardized results are read based on the fact category and field type in the audited facts, and the field type and standardized results are combined into search terms. Disease identifiers, drug identifiers, and medication behaviors under the clinical drug use category are written into the clinical drug use search terms set; ethical behavior types under the medical ethics category are written into the medical ethics search terms set; sensitive information types under the privacy protection category are written into the privacy protection search terms set; and interaction scenarios and risk statement types under the interaction security category are written into the interaction security search terms set.

[0032] When multiple search terms with the same field type and standardized results exist within the same search term set, only one search term is retained. When an audit fact has multiple fact categories, the corresponding standardized results are written into the search term set corresponding to each fact category. If an audit fact does not exist for a certain fact category, the corresponding search term set is recorded as an empty set.

[0033] Each rule retrieval condition includes the rule base type, retrieval item type, and retrieval item value. Numerical facts, subject roles, and authorization scope are not written into the rule retrieval conditions; these are retained until the applicable condition comparison process.

[0034] Specifically, by querying four pre-built independent rule bases—clinical drug use, medical ethics, privacy protection, and interaction security—according to the aforementioned retrieval conditions, four candidate rule sets are obtained, including: Based on the search terms in each of the rule search conditions, the rule index terms in the corresponding independent rule base are retrieved to obtain four types of rule identifier sets; Based on the four rule identifier sets, rules are read from the corresponding independent rule bases, and the rules are filtered according to their effective status to obtain four initial rule sets; The four initial rule sets are deduplicated to obtain four candidate rule sets.

[0035] It should be noted that the four independent rule bases for clinical drug use, medical ethics, privacy protection, and interaction security each store the corresponding structured rules. Each rule includes its own rule base type, rule identifier, rule version number, activation status, effective time range, search terms, applicable conditions, conditional logic, risk level, and output action.

[0036] The rule identifier consists of a rule base type identifier and a unique numerical sequence number. The unique numerical sequence number is generated sequentially in the corresponding independent rule base according to the order in which the rules were created, and different rules in the same independent rule base use different unique numerical sequence numbers.

[0037] The rule version number is recorded as an integer that increments as the rule content is updated. When the source file of the rule changes, the structured rules are reconstructed based on the updated source terms, and the corresponding rule version number is added.

[0038] Four independent rule bases are established with their own rule indexes. Each rule index item includes a search term type, a search term value, a rule identifier, and a rule version number. When constructing the rule indexes, disease identifiers, drug identifiers, and medication behaviors are extracted from clinical medication rules; ethical behavior types are extracted from medical ethics rules; sensitive information types are extracted from privacy protection rules; and interaction scenarios and risk representation types are extracted from interaction security rules. When a single rule contains multiple search terms, corresponding rule index items are generated for each rule.

[0039] When querying rule index items, the search term type and value in the rule search conditions are compared with the rule index items in the corresponding independent rule base. If both the search term type and value are consistent, the corresponding rule identifier and rule version number are extracted. The query results from the same independent rule base are then aggregated to obtain the corresponding rule identifier set.

[0040] Rule records are read from the corresponding independent rule base according to the rule identifier set. When the review time is within the effective time range of the rule and the enabled status is enabled, the corresponding rule is determined to be in an effective state and retained in the initial rule set.

[0041] When the same rule is retrieved repeatedly by multiple search terms, one rule record is retained based on the rule identifier and rule version number. When the same rule identifier corresponds to multiple rule records that are in effect, they are arranged in descending order of the rule version number, and the rule record with the largest rule version number is retained, resulting in four categories of candidate rule sets.

[0042] For example, the clinical medication search itemset includes the drug identifier warfarin and the medication discontinuation behavior. The drug identifier warfarin is associated with rules C001 and C003, and the medication discontinuation behavior is associated with rules C003 and C006. After summarizing and removing duplicate rules C003, a candidate set of clinical medication rules is obtained, including rules C001, C003, and C006. The other three search itemsets are queried in the same way to obtain the corresponding independent rule bases, resulting in candidate sets of medical ethics, privacy protection, and interactive security rules.

[0043] In step S3, the audit fact set, the subject role, and the authorization scope are compared with the applicable conditions in the four candidate rule sets to obtain the condition comparison results. Based on the condition comparison results, the hit rules corresponding to each of the independent rule bases are determined, the output actions are extracted from the hit rules, and the four types of audit records are generated based on the hit rules, the condition comparison results, and the output actions.

[0044] Specifically, the audit fact set, the subject role, and the authorization scope are compared with the applicable conditions in the four candidate rule sets to obtain condition comparison results. Based on these results, the matching rules corresponding to each independent rule base are determined, including: Extract the applicable conditions and condition logic actually contained in each candidate rule from the four types of candidate rule sets. The applicable conditions include at least one of terminology conditions, numerical conditions, role conditions and permission conditions. Based on the applicable conditions actually included in each of the candidate rules, the corresponding data to be compared is extracted from the audit fact set, the subject role, and the authorization scope; If the applicable condition is a terminology condition, then the corresponding data to be compared is compared with the terminology condition for equivalence or set inclusion. If the applicable condition is a numerical condition, then the corresponding data to be compared is compared with the numerical condition for interval. If the applicable condition is a role condition, then it is determined whether the subject role belongs to the role set limited by the role condition. If the applicable condition is a permission condition, then it is determined whether the authorization scope covers the permission scope limited by the permission condition, and a single condition result is obtained. The individual condition results are combined and judged according to the AND, OR, and NOT logic recorded in the condition logic record to obtain the condition comparison result; Candidate rules that meet the condition comparison results are determined as the hit rules corresponding to each of the independent rule bases.

[0045] In one implementation, each applicable condition includes a condition identifier, a condition type, a field to be compared, a comparison method, and a condition value. The condition identifier remains unique within the corresponding candidate rule. The condition type includes terminology conditions, numerical conditions, role conditions, and permission conditions, and the condition value records standard terms or terminology sets, numerical ranges, role sets, or permission ranges, respectively.

[0046] Based on the field to be compared, standardized results of the same field type are read from the audit fact set, or the subject role and authorization scope are read from the audit task record to obtain the data to be compared. When the same field to be compared corresponds to multiple audit facts, the standardized results of each audit fact are read separately, and the corresponding source text identifier and text position are retained. If no data to be compared is read, the corresponding single condition result is recorded as not met.

[0047] When the applicable condition is a terminology condition, the data to be compared is compared with standard terms for equivalence, or it is determined whether at least one piece of data to be compared belongs to the term set recorded by the terminology condition. If the equivalence comparison results are consistent or the data to be compared belongs to the term set, the result of a single condition is satisfied; otherwise, it is not satisfied.

[0048] When the applicable condition is a numerical condition, the data to be compared is compared with the numerical range recorded by the numerical condition. The numerical condition includes measurement type, target unit, boundary value, and boundary inclusion status. If the measurement type and target unit of the data to be compared are consistent with the numerical condition, and the data to be compared is within the numerical range, the single condition result is satisfied; otherwise, it is not satisfied. When the numerical condition records only one boundary value, only the corresponding boundary comparison is performed.

[0049] When the applicable condition is a role condition, the role identifier corresponding to the main role is compared with the role set recorded in the role condition. If the role identifier belongs to the role set, the single condition result is satisfied; otherwise, it is not satisfied.

[0050] When the applicable condition is a permission condition, the information category, operation category, and interaction scenario in the permission condition are read, and it is determined whether the authorization scope includes all the content actually recorded by the permission condition. If the authorization scope includes all the content, the single condition result is satisfied; otherwise, it is not satisfied.

[0051] The conditional logic is recorded using logical expressions containing condition identifiers, AND, OR, NOT, and parentheses. When calculating the condition comparison result, the individual condition results within the parentheses are calculated first, and then combined and judged in the order of NOT, AND, and OR logic. If all individual condition results connected by AND logic are satisfied, the corresponding combined result is satisfied; if at least one of the individual condition results connected by OR logic is satisfied, the corresponding combined result is satisfied; NOT logic performs a reverse judgment on the connected individual condition results. The final result of the logical expression is the condition comparison result for the corresponding candidate rule.

[0052] Each candidate rule generates a condition comparison result. If the condition comparison result is satisfied, the corresponding candidate rule is determined as a hit rule; if the condition comparison result is not satisfied, the corresponding candidate rule is not determined as a hit rule. The condition comparison process is executed for each of the four candidate rule sets.

[0053] For example, candidate rule C003 for clinical medication use includes the terms "drug label equals warfarin" and "medication behavior equals self-discontinuation," which are connected by an AND logic. When the audit fact set includes both the drug label warfarin and the medication behavior self-discontinuation, both individual conditions are satisfied, and the condition comparison result of rule C003 is satisfied.

[0054] For example, in another review task, the main role is a health consultant, the scope of authorization does not include medication regimen adjustment, and the candidate response text includes "You can directly adjust the warfarin dosage." The candidate response text is subjected to fact extraction and standardized classification to form a medical ethics category review fact with the ethical behavior type of "providing medication adjustment advice beyond the scope of responsibility." Medical ethics candidate rule E002 includes the terminology condition that the ethical behavior type equals "providing medication adjustment advice beyond the scope of responsibility," the role condition that the main role belongs to the health consultant role set, and the authority condition that the scope of authorization covers medication regimen adjustment. The condition logic records the non-logical results of the terminology condition, the role condition, and the authority condition using AND logic. If the individual condition results of the terminology condition and the role condition are satisfied, and the individual condition result of the authority condition is not satisfied, and the individual condition result of the authority condition is satisfied after a non-logical judgment, then the condition comparison result of rule E002 is satisfied, and rule E002 is determined as the hit rule corresponding to the independent medical ethics rule base.

[0055] Among them, four types of audit records are generated based on the hit rules, the condition comparison results, and the output actions, including: Based on the condition comparison results, extract the audit facts and corresponding text positions involved in the hit rule judgment, and record the subject roles and authorization scope involved in the judgment to obtain the hit information; Extract the rule base type, rule identifier, rule version number, risk level, and output action from the hit rule. The output action includes the action type and the action parameters corresponding to the action type. According to the type of rule base to which it belongs, the rule identifier, the rule version number, the risk level, the hit information, and the output action are encapsulated into the corresponding audit record, and the hit status is recorded for the independent rule base that did not hit the rule, resulting in four types of audit records.

[0056] In one implementation, based on the condition comparison results corresponding to the hit rule, the condition identifiers involved in the judgment and the corresponding comparison data are read. When the comparison data comes from the audit fact set, the standardized results, original text fragments, source text identifiers, and text positions of the corresponding audit facts are extracted; when the comparison data comes from the subject role or authorized scope, the content of the subject role or authorized scope actually involved in the judgment is recorded to obtain the hit information.

[0057] When the conditional comparison result is formed by the absence of a certain data to be compared and through non-logical judgment, the corresponding condition identifier and absence status are recorded in the hit information, and no text position is generated.

[0058] The risk level is written when constructing the structured rules file. When a source clause specifies multiple severity levels, values ​​of 1, 2, and so on, from lowest to highest severity level, are assigned sequentially up to the corresponding number of severity levels. Higher values ​​indicate higher risk levels. If the source clause does not differentiate between severity levels, the risk level is recorded as 0. Output actions under the same action priority are ordered according to the risk level.

[0059] The output action includes action type and action parameters. Action parameters for blocking transmission include a prohibited transmission status; action parameters for manual review include a pending review status; action parameters for sensitive information masking include masked characters and target condition identifiers; action parameters for risk statement replacement include replacement text and target condition identifiers; action parameters for supplementing security prompts include prompt text and insertion position; and action parameters for allowing transmission include an allowed transmission status.

[0060] According to the type of rule base to which it belongs, the rule identifier, rule version number, risk level, hit information, and output action of each hit rule are written into the corresponding audit record. When there are multiple hit rules in the same independent rule base, the corresponding rule hit records are written into the same audit record for each rule. When there are no hit rules in an independent rule base, the audit status of the corresponding audit record is recorded as "not hit". Clinical drug use audit records, medical ethics audit records, privacy protection audit records, and interaction security audit records are combined to obtain four types of audit records.

[0061] For example, the output action of rule C003 is to block transmission, and the rule identifier, rule version number, risk level, hit information, and output action of rule C003 are written into the clinical drug use review record. The output action of rule E002 is to manually review, and the rule identifier, rule version number, risk level, hit information, and output action of rule E002 are written into the medical ethics review record. The output action of rule P004 is to mask sensitive information, and the target condition identifier corresponding to the masked characters and contact numbers is written into the privacy protection review record.

[0062] In step S4, the output actions are arranged according to a preset action priority to obtain an action sequence. The output actions are then merged according to the action sequence to generate a comprehensive review action.

[0063] The output actions are arranged according to a preset action priority to obtain an action sequence, including: The preset action priorities, from high to low, are: blocking transmission, manual review, sensitive information masking, risk description replacement, security prompt supplementation, and allowing transmission; The output actions in the four types of audit records are sorted according to the preset action priority to obtain an initial action sequence; The output actions with the same priority in the initial action sequence are sorted from high to low according to their corresponding risk levels, and the output actions with the same risk level are sorted according to a preset rule for identification order to obtain the action sequence.

[0064] In one implementation, output actions, risk levels, and rule identifiers are extracted from four types of audit records in the "hit" state to form a set of actions to be sorted. No output actions are generated for audit records that are not hit. When the set of actions to be sorted is empty, the action sequence is recorded as an empty sequence.

[0065] The priority of the actions is determined based on the relationship between the output actions and the processing status and content of the candidate response text. Blocking transmission creates a prohibited transmission state, and manual review creates a pending review state; both are listed before text modification actions. Sensitive information masking and risk description replacement modify the original character range in the candidate response text and are listed before security prompts added to the prompt text. Allowing transmission does not change the character content of the candidate response text and is listed after the other output actions.

[0066] The output actions in the set of actions to be sorted are sorted in the following order: blocking transmission, manual review, sensitive information masking, risk description replacement, security prompt supplementation, and allowing transmission. This results in an initial action sequence. For output actions with the same priority, they are sorted a second time according to their risk level from high to low. When both the action priority and risk level are the same, they are sorted a third time according to a preset rule identifier order.

[0067] The order of the rule identifiers is fixed when the rules are published. They are first arranged according to the rule base type: clinical drug use, medical ethics, privacy protection, and interaction security. Then, they are arranged in ascending order according to the unique numerical sequence number contained in the rule identifiers within the same rule base. The order of the rule identifiers is only used for sorting when both action priority and risk level are the same.

[0068] After sorting, an action sequence is obtained. Each action in the action sequence includes action type, action parameters, risk level, rule identifier, rule base type, and hit information.

[0069] The process of merging the output actions according to the action sequence to generate a comprehensive review action includes: If the action sequence includes blocking transmission or manual review, the output action that is first in the sequence will be determined as the comprehensive review action. If there is no blocking of transmission and manual review in the action sequence, then the output actions and hit information corresponding to sensitive information masking, risk statement replacement and security prompt supplementation are extracted from the four types of review records. Based on the action parameters in the output actions and the hit information, the text modification actions and the corresponding text positions are determined to obtain the text modification action set. Determine whether there is a position conflict based on the text position of each text modification action. If there is no position conflict, the set of text modification actions is determined as the initial set of execution actions. If there is a position conflict, retain the conflicting actions that are ranked first in the action sequence and retain the non-conflicting actions to obtain the initial set of execution actions. Supplementary safety prompt actions with identical content in the initial set of actions are merged to obtain the target set of actions. Arrange the text positions corresponding to the target action set from back to front to obtain the text modification sequence. Encapsulate the text modification sequence and the allow-to-send status to generate a comprehensive review action.

[0070] In one implementation, when there is a blocking action in the action sequence, the blocking action at the top of the sequence is determined as the comprehensive review action, the sending status is recorded as prohibited from sending, and the text modification sequence is recorded as an empty sequence; when there is no blocking action in the action sequence and there is manual review, the manual review action at the top of the sequence is determined as the comprehensive review action, the sending status is recorded as pending review, and the text modification sequence is recorded as an empty sequence.

[0071] When there is no blocking of transmission or manual review in the action sequence, the output actions corresponding to sensitive information masking, risk statement replacement, and security prompt supplementation are processed respectively. When the output action is sensitive information masking or risk statement replacement, the hit information is read according to the target condition identifier in the action parameters, and the start and end character positions of the source text identifier as the candidate response text identifier are extracted to form the corresponding text modification action. When the output action is security prompt supplementation, the prompt text and insertion position are read; if the specific insertion position is not recorded, the position after the last character of the candidate response text is determined as the insertion position.

[0072] When the hit information comes solely from the session context, the corresponding text location is not determined as the modification location of the candidate response text. If a sensitive information masking action or a risk statement replacement action does not have a corresponding text location in the candidate response text, it is not written into the text modification action set.

[0073] A positional conflict indicates that two sensitive information masking actions or risk statement replacement actions share a common character position within their corresponding character ranges. Text modification actions are read sequentially according to the action sequence. If the current text modification action does not conflict with any previously retained text modification actions, it is written into the initial execution action set. If a positional conflict exists, the text modification action that appears earlier in the action sequence is retained. Supplementary actions for security prompts are not included in the character range conflict determination.

[0074] The system performs a character-based comparison of the supplementary safety prompt texts. If the texts are identical, the supplementary safety prompt action that appears first in the sequence is retained. If the texts are different, the texts are arranged according to the sequence, newline characters are written between adjacent texts, and the processed texts are merged into a single supplementary safety prompt action.

[0075] The processed security prompt supplementary action is combined with the sensitive information masking action and risk statement replacement action in the initial execution action set to obtain the target execution action set.

[0076] The target action set is arranged from back to front according to the text position corresponding to each text modification action. The text position of the sensitive information masking action and the risk description replacement action is the starting character position, and the text position of the security prompt supplement action is the insertion position. When multiple text modification actions have the same text position, they are arranged according to the order in the action sequence to obtain a text modification sequence. The text modification sequence and the allow-to-send status are encapsulated to generate a comprehensive review action. When the target action set is empty, an empty text modification sequence and the allow-to-send status are encapsulated.

[0077] For example, the four types of review records each include a sensitive information masking action, a risk statement replacement action, and two security prompt supplementary actions with identical text content, and there is no blocking of transmission or manual review. When the text positions of the sensitive information masking action and the risk statement replacement action do not conflict, the two text modification actions are retained, and the security prompt supplementary actions with identical content are merged into one. After arranging the texts from back to front according to their positions, a text modification sequence is obtained, and the text modification sequence and the allow-to-send status are encapsulated into a comprehensive review action.

[0078] In step S5, the sending status and text content of the candidate response text are controlled according to the comprehensive review action to generate a deterministic review result for the medical and health skill, including: Analyze the comprehensive review action to determine the sending status and text modification sequence of the candidate response text; If the text modification sequence is not empty, then the candidate response text is subjected to sensitive information masking, risk statement replacement or security prompt supplementation according to the text modification sequence to obtain the review response text; if the text modification sequence is empty, then the candidate response text is determined as the review response text. The sending status, the review response text, and the four types of review records are encapsulated to generate a deterministic review result for the Medical and Health Skill.

[0079] In one implementation, the sending status and text modification sequence in the comprehensive review action are parsed. When the comprehensive review action is to block sending, the sending status is "sending prohibited"; when the comprehensive review action is to conduct manual review, the sending status is "pending review"; when the comprehensive review action includes a sending allowed status, the sending status is "sending allowed".

[0080] The candidate response text is copied to the text to be modified, and the text modification actions are executed sequentially from the first item to the last item according to the text modification sequence. Since the text modification sequence is arranged from back to front according to the text position, after the text modification action at the later position causes a change in text length, the text modification action at the earlier position is still executed according to the character position in the original candidate response text.

[0081] When the text modification action is to mask sensitive information, the characters from the start character position to the end character position are replaced with the masked characters specified in the action parameters. When the text modification action is to replace a risk statement, the original text segment from the start character position to the end character position is deleted, and the replacement text specified in the action parameters is written at the start character position. When the text modification action is to supplement a security prompt, the prompt text specified in the action parameters is written at the corresponding insertion position.

[0082] After all text modification actions are completed, the text to be modified is designated as the review response text. If the text modification sequence is empty, the candidate response text is not modified, and the candidate response text is designated as the review response text.

[0083] When the sending status is "Send prohibited", the status corresponding to the candidate response text is recorded as "Send prohibited"; when the sending status is "Pending review", the status corresponding to the candidate response text is recorded as "Pending review"; when the sending status is "Send allowed", the status corresponding to the review response text is recorded as "Send allowed".

[0084] The sending status, review response text, clinical drug use review record, medical ethics review record, privacy protection review record, and interaction security review record are written into the same review result record to generate a deterministic review result for the Medical and Health Skill.

[0085] For example, the candidate response text is "You can discontinue warfarin on your own" and "Send a contact number to your family." The comprehensive review actions include allowing sending, replacing risk statements, masking sensitive information, and supplementing safety tips. The original text fragment corresponding to the risk statement replacement action is "You can discontinue warfarin on your own," and the replacement text is "Please consult a professional before adjusting your warfarin dosage." The original text fragment corresponding to the sensitive information masking action is [missing text], and the supplementary safety tips action corresponds to the prompt text "If you experience any discomfort, please seek professional evaluation promptly."

[0086] Following the text position from back to front, first write the prompt text at the end of the candidate response text, then replace each numeric character with a masking character, and then replace "can discontinue warfarin on your own" with "please consult a professional before adjusting warfarin dosage" to obtain the review response text. Encapsulate the allowed sending status, the review response text, and the four types of review records to generate a deterministic review result for the Medical and Health Skill.

[0087] In summary, this invention extracts and standardizes the facts from candidate response texts and conversation contexts of the Medical and Health Skill, forming a set of audit facts encompassing clinical medication, medical ethics, privacy protection, and interaction security. Based on these fact categories, it queries four independent rule bases, compares the applicable conditions of the rules with the subject's role and authorized scope, and generates four types of audit records. Furthermore, it sorts and merges each output action according to a fixed action priority, risk level, and rule identifier order to generate a comprehensive audit action, thereby determining the sending status and text content of the candidate response text. This achieves independent auditing of multiple rule categories in the Medical and Health Skill, deterministic processing of audit actions, and structured recording of audit results.

[0088] The second embodiment of the present invention provides a medical and health skill deterministic review system based on four independent rule bases, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method described above.

[0089] It should be noted that the medical and health skill deterministic review system based on four independent rule bases provided in this embodiment of the invention is used to execute all the process steps of the medical and health skill deterministic review method based on four independent rule bases in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0090] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0091] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A deterministic verification method for healthcare skills based on four independent rule bases, characterized in that: include: Obtain the candidate response text, session context, subject role, and authorization scope of the Medical and Health Skill; extract facts from the candidate response text and the session context to obtain text facts; standardize and classify the text facts to obtain an audit fact set containing fact categories. Based on the fact categories, rule retrieval conditions are generated, and the four pre-built independent rule bases for clinical drug use, medical ethics, privacy protection, and interaction security are queried according to the rule retrieval conditions to obtain four candidate rule sets; The audit fact set, the subject role, and the scope of authorization are compared with the applicable conditions in the four candidate rule sets to obtain the condition comparison results. The hit rules corresponding to each of the independent rule bases are determined based on the condition comparison results. The output actions are extracted from the hit rules. The four types of audit records are generated based on the hit rules, the condition comparison results, and the output actions. The output actions are arranged according to a preset action priority to obtain an action sequence. The output actions are then merged according to the action sequence to generate a comprehensive review action. Based on the comprehensive review action, control the sending status and text content of the candidate response text to generate a deterministic review result for the Medical and Health Skill.

2. The deterministic verification method for medical and health skills based on four independent rule bases as described in claim 1, characterized in that, The process involves extracting facts from the candidate response text and the session context to obtain textual facts, and then standardizing and classifying these textual facts to obtain a set of audit facts containing fact categories, including: The candidate response text and the session context are compared with pre-built medical terminology, ethical behavior, sensitive pattern, and interaction word lists, respectively, and the matching text fragments, fact values, and text positions are extracted to obtain the text facts; The standardization method is determined according to the data type of the fact value. The standardization method includes term mapping according to a pre-built term mapping table or unit conversion according to a pre-built unit conversion table. The fact value is standardized according to the standardization method, and the standardization result is associated with the corresponding text fragment and text position to obtain the standard fact. Based on the source table categories corresponding to the standard facts, the standard facts are categorized to obtain a set of audit facts that includes at least one fact category among clinical drug use, medical ethics, privacy protection, and interaction security.

3. The deterministic verification method for medical and health skills based on four independent rule bases as described in claim 2, characterized in that, The step of generating rule-based retrieval conditions based on the fact categories includes: From the review facts of the clinical drug use category, at least one of disease identifier, drug identifier, and drug use behavior is extracted; from the review facts of the medical ethics category, the type of ethical behavior is extracted; from the review facts of the privacy protection category, the type of sensitive information is extracted; and from the review facts of the interaction security category, at least one of the interaction scenario and risk statement type is extracted, resulting in four types of search terms. Each of the aforementioned search item sets is determined as the rule search condition for the corresponding independent rule base.

4. The deterministic verification method for medical and health skills based on four independent rule bases as described in claim 3, characterized in that, The process involves querying four pre-built independent rule bases—clinical drug use, medical ethics, privacy protection, and interaction security—according to the aforementioned rules and search conditions, resulting in four candidate rule sets, including: Based on the search terms in each of the rule search conditions, the rule index terms in the corresponding independent rule base are retrieved to obtain four types of rule identifier sets; Based on the four rule identifier sets, rules are read from the corresponding independent rule bases, and the rules are filtered according to their effective status to obtain four initial rule sets; The four initial rule sets are deduplicated to obtain four candidate rule sets.

5. The deterministic verification method for medical and health skills based on four independent rule bases as described in claim 1, characterized in that, The step of comparing the audit fact set, the subject role, and the authorization scope with the applicable conditions in the four candidate rule sets to obtain condition comparison results, and determining the hit rules corresponding to each of the independent rule bases based on the condition comparison results, includes: Extract the applicable conditions and condition logic actually contained in each candidate rule from the four types of candidate rule sets. The applicable conditions include at least one of terminology conditions, numerical conditions, role conditions and permission conditions. Based on the applicable conditions actually included in each of the candidate rules, the corresponding data to be compared is extracted from the audit fact set, the subject role, and the authorization scope; If the applicable condition is a terminology condition, then the corresponding data to be compared is compared with the terminology condition for equivalence or set inclusion. If the applicable condition is a numerical condition, then the corresponding data to be compared is compared with the numerical condition for interval. If the applicable condition is a role condition, then it is determined whether the subject role belongs to the role set limited by the role condition. If the applicable condition is a permission condition, then it is determined whether the authorization scope covers the permission scope limited by the permission condition, and a single condition result is obtained. The individual condition results are combined and judged according to the AND, OR, and NOT logic recorded in the condition logic record to obtain the condition comparison result; Candidate rules that meet the condition comparison results are determined as the hit rules corresponding to each of the independent rule bases.

6. The deterministic verification method for healthcare skills based on four independent rule bases as described in claim 5, characterized in that, The process of generating four types of audit records based on the hit rules, the condition comparison results, and the output actions includes: Based on the condition comparison results, extract the audit facts and corresponding text positions involved in the hit rule judgment, and record the subject roles and authorization scope involved in the judgment to obtain the hit information; Extract the rule base type, rule identifier, rule version number, risk level, and output action from the hit rule. The output action includes the action type and the action parameters corresponding to the action type. According to the type of rule base to which it belongs, the rule identifier, the rule version number, the risk level, the hit information, and the output action are encapsulated into the corresponding audit record, and the hit status is recorded for the independent rule base that did not hit the rule, resulting in four types of audit records.

7. The deterministic verification method for healthcare skills based on four independent rule bases as described in claim 6, characterized in that, The process of arranging the output actions according to a preset action priority to obtain an action sequence includes: The preset action priorities, from high to low, are: blocking transmission, manual review, sensitive information masking, risk description replacement, security prompt supplementation, and allowing transmission; The output actions in the four types of audit records are sorted according to the preset action priority to obtain an initial action sequence; The output actions with the same priority in the initial action sequence are sorted from high to low according to their corresponding risk levels, and the output actions with the same risk level are sorted according to a preset rule for identification order to obtain the action sequence.

8. The deterministic verification method for medical and health skills based on four independent rule bases according to claim 7, characterized in that, The step of merging the output actions according to the action sequence to generate a comprehensive review action includes: If the action sequence includes blocking transmission or manual review, the output action that is first in the sequence will be determined as the comprehensive review action. If there is no blocking of transmission and manual review in the action sequence, then the output actions and hit information corresponding to sensitive information masking, risk statement replacement and security prompt supplementation are extracted from the four types of review records. Based on the action parameters in the output actions and the hit information, the text modification actions and the corresponding text positions are determined to obtain the text modification action set. Determine whether there is a position conflict based on the text position of each text modification action. If there is no position conflict, the set of text modification actions is determined as the initial set of execution actions. If there is a position conflict, retain the conflicting actions that are ranked first in the action sequence and retain the non-conflicting actions to obtain the initial set of execution actions. Supplementary safety prompt actions with identical content in the initial set of execution actions are merged to obtain the target set of execution actions; Arrange the text positions corresponding to the target action set from back to front to obtain the text modification sequence. Encapsulate the text modification sequence and the allow-to-send status to generate a comprehensive review action.

9. The deterministic verification method for medical and health skills based on four independent rule bases as described in claim 8, characterized in that, The step of controlling the sending status and text content of the candidate response text based on the comprehensive review action to generate a deterministic review result for the medical and health skill includes: Analyze the comprehensive review action to determine the sending status and text modification sequence of the candidate response text; If the text modification sequence is not empty, then the candidate response text is subjected to sensitive information masking, risk statement replacement or security prompt supplementation according to the text modification sequence to obtain the review response text; if the text modification sequence is empty, then the candidate response text is determined as the review response text. The sending status, the review response text, and the four types of review records are encapsulated to generate a deterministic review result for the Medical and Health Skill.

10. A medical and health skill deterministic verification system based on four independent rule bases, characterized in that: include: The fact extraction module is used to obtain the candidate response text of the medical and health skill, the session context, the subject role and the scope of authorization, and to extract and standardize the facts of the candidate response text and the session context to obtain a set of audit facts containing fact categories. The rule retrieval module is used to generate rule retrieval conditions based on the fact categories, and query four pre-built independent rule bases for clinical drug use, medical ethics, privacy protection and interaction security respectively to obtain four candidate rule sets; The condition comparison module is used to compare the audit fact set, the subject role, and the authorization scope with the applicable conditions in the four types of candidate rule sets, respectively, to obtain the condition comparison results, determine the hit rules, and generate four types of audit records; The action merging module is used to arrange and merge output actions according to preset action priorities to generate comprehensive review actions. The result generation module is used to control the sending status and text content of the candidate response text according to the comprehensive review action, and generate a deterministic review result for the medical and health skill.