A medical artificial intelligence output safety fence method

By identifying and securely handling out-of-bounds outputs from medical AI, combined with a field-by-field fault mechanism and audit logs, the security and traceability issues of medical AI outputs are resolved, enabling effective control and processing of out-of-bounds content.

CN123179198APending Publication Date: 2026-11-27KAONTER MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611250906.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify and handle out-of-bounds content in medical AI outputs, and cannot trace the original content processing process when handling anomalies, leading to output risks and unreliability.

Method used

By identifying out-of-bounds content generated by medical AI, diagnostic downgrading, erasure, or blocking is performed, and verification is conducted before and after security processing. A field-by-field fault safety mechanism is set up, and audit logs are recorded to ensure the reliability and traceability of the output.

Benefits of technology

It reduces the risk of directly outputting out-of-bounds content, ensures the effectiveness of secure processing, avoids overall failure caused by local anomalies, and enables traceability of the output process, facilitating subsequent manual review and anomaly analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179198A_ABST
    Figure CN123179198A_ABST
Patent Text Reader

Abstract

The application discloses a medical artificial intelligence output safety guardrail method, comprising: analyzing a to-be-output result of medical artificial intelligence, determining a target field and to-be-detected text; performing out-of-bound identification on the to-be-detected text, identifying a certain diagnosis and / or medical order and generating a risk record; performing diagnosis degradation, erasure or blocking according to the risk record, and checking a processing result, performing upgrade erasure on content which is not substantially changed; when the target field processing is abnormal, performing safety degradation on the field, and keeping the processing result of other fields; merging the processing results of the fields and performing export re-inspection, again safely processing residual out-of-bound content, and forming a final safe output result; generating an audit record and storing the audit record in association with the final safe output result. Through the out-of-bound identification, safety disposal, fault safety degradation, export re-inspection and audit record, the application realizes programmed safety control of out-of-bound content, and improves the safety and traceability of medical artificial intelligence output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical artificial intelligence technology, and in particular to a method for outputting safety barriers using medical artificial intelligence. Background Technology

[0002] With the development of artificial intelligence technology, medical AI, built upon large language models and machine learning models, is increasingly being applied to scenarios such as medical data analysis, risk assessment, and decision support. Medical AI can generate analytical results based on a patient's physiological parameters, examination results, and historical medical data, and provide explanations, risk warnings, or supplementary suggestions in natural language.

[0003] Because medical settings have high security requirements for output content, the content generated by medical AI usually needs to be limited to the scope of auxiliary analysis. However, in practical applications, medical AI may directly express the model analysis results as a deterministic disease diagnosis, or it may generate instructions for medication administration, discontinuation of medication, dosage adjustment, or other medical treatment-related instructions, thus creating the risk of outputs exceeding their scope.

[0004] Existing technologies typically use methods such as prompt word constraints, keyword filtering, or adding disclaimers to limit the output of medical artificial intelligence, but these methods are difficult to cover out-of-bounds content in different contexts and with different forms of expression.

[0005] At the same time, when the security processing procedure itself malfunctions, it may cause the original content that has not been properly processed to be output directly. Furthermore, there is a lack of effective means to trace what security rules the original content has undergone and how the final output result is formed.

[0006] Therefore, it is necessary to provide a safety barrier method for medical AI output to reliably identify and securely process the content generated by medical AI, thereby improving the security and traceability of medical AI output. Summary of the Invention

[0007] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a method for safety guardrails for medical artificial intelligence output, which realizes programmatic safety control of intrusive content and improves the safety and traceability of medical artificial intelligence output.

[0008] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0009] A method for outputting safety barriers using medical artificial intelligence includes:

[0010] S1. Obtain the output result generated by medical artificial intelligence, parse the output result, and determine the target field and the corresponding text to be detected that need to be processed for security.

[0011] S2. Perform boundary crossing detection on the text to be detected, identify the definitive diagnostic content and / or medical order content, and generate a risk record;

[0012] S3. Based on the risk record, perform diagnostic downgrade, erasure or blocking processing on the out-of-bounds content, and verify the results of the text before and after the security processing. If the out-of-bounds content has not changed substantially after processing, perform upgrade erasure on it.

[0013] S4. Perform security processing on each target field separately. If any target field's security processing fails, perform security degradation on that target field and maintain the processing results of other target fields.

[0014] S5. Merge the processing results of each target field, perform an exit check on the resulting user-visible text, and perform security processing again on any remaining out-of-bounds content to form the final secure output result.

[0015] S6. Generate audit records based on the safety barrier execution process, and associate and store the audit records with the final safety output results.

[0016] According to one aspect of the present invention, in step S1, target fields requiring security processing are selected from the output results according to a preset set of descriptive fields;

[0017] When the target field is a string, the corresponding string will be used as the text to be detected.

[0018] When the target field is a list or tuple, the string elements are treated as the text to be detected, while the original values ​​of the non-string elements are preserved.

[0019] According to one aspect of the present invention, step S1 includes:

[0020] Load pre-established security rules, which include at least triggering conditions, risk assessment conditions, and security handling actions;

[0021] Register and verify the risk assessors and safety executors referenced in each safety rule;

[0022] When the risk assessor or safety actuator fails to function properly, the situation will be identified as an abnormal safety barrier configuration.

[0023] According to one aspect of the present invention, in step S2, the definitive diagnostic content in the text to be detected is identified based on diagnostic trigger words, assertion tone, disease or pathological state object, patient subject and sentence structure.

[0024] Identify medical orders that constitute medical treatment based on information about the medical action, drug or treatment recipient, route of administration, dosage or rate, and the nature of the instructions in the text.

[0025] According to one aspect of the present invention, in step S2, diagnostic rules and medical order rules are executed on each text to be detected. When the same text to be detected hits multiple security rules at the same time, corresponding risk records are generated respectively.

[0026] The risk record includes at least the target field, the corresponding security rule, the risk type, the original text or the location of the original text, and the security handling method.

[0027] According to one aspect of the present invention, in step S3, a diagnostic downgrade is performed on the definitive diagnostic content, converting the definitive diagnostic expression into a descriptive, probabilistic, or referential expression; and the medical order content is subjected to sentence erasure or safe replacement.

[0028] Content that cannot be restored to a safe output state through local processing is blocked, restricting it from entering the user's visible output.

[0029] According to one aspect of the present invention, in step S3, the security-processed text is compared with the corresponding original text;

[0030] If the text after security processing does not substantially change from the original text, it is determined that the corresponding security processing has not taken effect, and the corresponding out-of-bounds content is replaced with preset security placeholder information, while the corresponding upgrade processing status is recorded.

[0031] According to one aspect of the present invention, in step S4, independent exception handling boundaries are set for each target field;

[0032] When any target field encounters an anomaly during rule execution, text parsing, risk assessment, security processing, text recombination, or result writing back, only the target field that encountered the anomaly will be replaced with the security-degraded content, while the processing results of other target fields that have completed security processing will be preserved.

[0033] According to one aspect of the present invention, in step S5, an initial exit security scan is performed on the merged user-visible text;

[0034] When residual out-of-bounds content is detected, the residual out-of-bounds content is neutralized or securely replaced again, and an exit security scan is performed again; if residual out-of-bounds content that cannot be reliably eliminated still exists after the second scan, the corresponding smallest text unit is hidden or replaced with secure placeholder information.

[0035] According to one aspect of the present invention, in step S6, the actual security rule hit, rule version, target field, risk type, security action, original text, processing result and abnormal information are recorded, and a chain audit structure is used to associate the continuously generated audit records.

[0036] When the corresponding medical AI decision is updated, the original audit record is retained and the new audit record is added.

[0037] The beneficial effects of implementing this invention are as follows:

[0038] Firstly, by identifying out-of-bounds content generated by medical AI, and implementing diagnostic downgrading, erasure, or blocking for different risky content such as definitive diagnoses, medical treatments, or medical orders, the risk of out-of-bounds content being directly output can be reduced.

[0039] Secondly, by performing substantive changes to the text before and after security processing and performing upgrade processing on content that has not actually eliminated risks, the risky content is avoided from being output as is due to abnormal rule execution or rewriting failure.

[0040] Third, by handling fault safety on a field-by-field basis, when an anomaly occurs in a single field, only the corresponding field is downgraded in terms of safety, and residual risks are further addressed in conjunction with exit re-inspection, so as to avoid the failure of the overall safety barrier due to local anomalies.

[0041] Fourth, by recording security rules, original text, processing results, and abnormal information, and establishing corresponding audit relationships, the recording and traceability of the safe processing process of medical artificial intelligence output can be realized, which facilitates subsequent manual review and abnormal analysis. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is an overall flowchart of the medical artificial intelligence output safety railing method of the present invention;

[0044] Figure 2 This is a flowchart of the boundary crossing identification process of the present invention;

[0045] Figure 3 This is a flowchart illustrating the safety procedures of this invention.

[0046] Figure 4 This is a flowchart of the field-by-field fault safety handling process of the present invention;

[0047] Figure 5 This is a flowchart illustrating the export re-inspection and audit traceability process of this invention. Detailed Implementation

[0048] 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.

[0049] This embodiment provides a method for a safety barrier for medical artificial intelligence output. After the medical artificial intelligence generates analysis results but before the results are officially provided to the user, it performs procedural safety processing on the content that may constitute a definitive diagnosis, medical treatment instructions, or medication orders. When a local anomaly occurs in the safety barrier itself, the abnormal content is downgraded to prevent unprotected out-of-bounds content from being directly output.

[0050] The medical artificial intelligence described in this embodiment can be a medical AI system built based on a large language model, machine learning model, deep learning model, rule model, or a multi-model collaborative architecture. The medical AI generates output results based on the patient's physiological parameters, examination results, historical medical data, and model analysis results. These output results may include structured information such as status, risk level, and confidence level, as well as natural language descriptive information such as reasoning explanations, causal analysis, result summaries, explanatory information, suggestions, and conclusions.

[0051] In this embodiment, a safety barrier is set on the exit side of the medical AI output link. After the medical AI generates the output result, it first sends the output result to the safety barrier, which then performs output parsing, boundary violation identification, security handling, field downgrading, exit re-inspection, and auditing in sequence. After completing the above processing, the final medical AI output result is formed.

[0052] Figure 1 This illustration shows a flowchart of a method for outputting safety barriers using medical artificial intelligence, as described in this embodiment. Figure 1 As shown, the method in this embodiment includes the following steps:

[0053] Step S1: Output parsing.

[0054] This step involves parsing the output results generated by medical AI, identifying the descriptive fields that require security processing, and establishing the corresponding security rule execution environment. Specifically, it includes the following sub-steps.

[0055] Step S11: Field filtering.

[0056] Obtain the output results generated by medical artificial intelligence and parse the output results into decision objects with multiple fields.

[0057] The decision object to be processed can include strings, numbers, booleans, enumerations, lists, tuples, or other data types.

[0058] This embodiment primarily focuses on security processing for narrative fields that perform natural language information expression functions; for non-narrative structured fields such as status values, risk levels, model scores, or confidence levels, the original content is maintained in the absence of other anomalies.

[0059] To determine the fields that require security processing, a pre-defined set of narrative fields is established. This set may include one or more of the following: reasoning explanation fields, reason fields, recommendation fields, note fields, summary fields, narrative fields, explanation fields, suggestion fields, and conclusion fields.

[0060] In this embodiment of the invention, the actual set of fields existing in the current decision object to be processed is assumed to be: .

[0061] in, , ,... These represent different fields in the decision object to be processed; let the pre-defined set of descriptive fields be: .

[0062] From field collection The filter is also part of the description field set. The fields are combined to form the target field set: .

[0063] in, , ,..., These represent the target fields for which safety barrier processing needs to be performed. Each target field belongs to the current decision object to be processed and falls within the scope of the preset descriptive fields.

[0064] Using the above method, even if different medical AI models have different data structures and field names, they can all be uniformly processed by the same security guard simply by including the fields that perform natural language output functions into the corresponding narrative field set.

[0065] Step S12: Text parsing.

[0066] For each target field determined in step S11, the corresponding text to be detected is determined according to the data type of the field.

[0067] When the target field's value is a string, the entire string is treated as the text to be detected; when the field value is a list or tuple, each string element is treated as the text to be detected, while the non-string elements retain their original values; other field types that do not contain natural language information may not be included in the text security processing flow.

[0068] Furthermore, longer target fields can be divided into text units according to periods, semicolons, newlines, or other preset text delimiters, and the original punctuation or line break information between each text unit can be saved so that they can be recombined in the original order after subsequent security processing.

[0069] Preferably, before implementing security processing, a processing copy is generated based on the decision object to be processed, and subsequent security guardrail processing is performed in this copy, while the original decision object generated by medical artificial intelligence is retained so that the security-processed text can be compared and audited with the original text later.

[0070] Step S13: Rule assembly.

[0071] Load the pre-established security rules and establish the rule execution environment corresponding to this output based on the loaded security rules.

[0072] In this embodiment of the invention, the set of security rules is set as follows: .in, , ,..., These represent different safety rules. Each safety rule includes at least the triggering conditions, risk assessment conditions, and safety handling actions.

[0073] Among them, the triggering condition is used to initially identify potentially risky content from the text to be detected; the risk judgment condition is used to further determine whether it actually constitutes a breach of boundaries based on the text context and the corresponding medical semantics; and the safety handling action is used to specify the corresponding handling such as diagnosis downgrading, medical order erasure, or blocking after the risk is confirmed.

[0074] For example, when a drug name or treatment action appears in the text to be detected, the corresponding medical order rule can be triggered. However, this does not directly determine that the text constitutes a medical order. It is still necessary to further combine the action semantics, the target patient and its context to determine whether it has the nature of an instruction.

[0075] After the rules are loaded, the risk assessors and security executors referenced by each security rule are registered and verified. If a rule's referenced assessor or executor is missing or cannot be invoked normally, this situation is identified as an abnormal security fence configuration, and the rule lacking actual execution capability will not continue to run as a normal rule.

[0076] At the same time, the version of the security rule corresponding to this security processing is recorded, so that the specific security rule corresponding to a certain medical artificial intelligence output can be determined based on the audit record in the future.

[0077] Step S1 converts the raw output of medical AI into target fields and text to be detected that can be processed independently by the safety barrier, and completes the establishment of the safety rule execution environment.

[0078] Step S2: Boundary Crossing Detection

[0079] This step is used to perform a security assessment on the text to be detected obtained in step S1, in order to identify definitive diagnostic content and medical treatment or medical orders. Combined with... Figure 2 As shown, this step specifically includes the following sub-steps:

[0080] Step S21: Diagnostic identification.

[0081] In this embodiment of the invention, it is necessary to determine whether a deterministic diagnostic assertion exists for each text to be detected.

[0082] Deterministic diagnostic content mainly refers to medical artificial intelligence using natural language to directly interpret a disease, syndrome, pathological state, or other clinical condition as a confirmed diagnosis for the current patient.

[0083] Diagnostic boundary violation identification can make a comprehensive judgment based on diagnostic trigger words, assertion tone, disease or pathological state object, patient subject, and sentence structure.

[0084] For example, when the text to be detected contains expressions with a definitive meaning such as "confirmed as", "diagnosed as", "clear diagnosis", "can be determined as", or "conforms to a certain disease diagnosis", and the expression directly refers to the current patient, it can be identified as out-of-bounds content of the definitive diagnosis category.

[0085] For content that only describes abnormal parameters, clinical phenomena, risk trends, or the possibility of a certain disease, further judgment is made on whether security processing is required based on whether the corresponding text has the nature of a final diagnosis.

[0086] Preferably, for content with a clear and definitive diagnostic meaning but which cannot be reliably proven by the context to belong to a non-diagnostic context, a more conservative approach is adopted to allow it to enter the subsequent safety handling process, rather than allowing it to pass directly through a broad contextual exemption, thereby reducing the possibility of missing a true diagnostic assertion.

[0087] Step S22: Doctor's order identification.

[0088] For each text to be tested, determine whether it contains an instruction that requires specific medical actions to be performed on the current patient.

[0089] The medical procedures may include drug administration, drug discontinuation, drug dosage adjustment, drug replacement, infusion, adjustment of route of administration, adjustment of mechanical ventilation, intubation, extubation, blood transfusion, anticoagulation, blood purification, and other treatment or treatment procedures.

[0090] In this embodiment, medical order recognition can be determined by comprehensively considering medical action words, drug or treatment target, route of administration, dosage or rate information, and whether the text has an imperative or operational instruction nature.

[0091] In this regard, specifying the dosage is not a necessary condition for the establishment of a medical order.

[0092] For example, even if the text does not give a specific dosage, but clearly states "administer a certain drug", "discontinue a certain drug", "add a certain treatment", or "adjust a certain device parameter", it can still be judged as out-of-bounds content of medical orders when it is aimed at the current patient and has an actual execution target.

[0093] For certain medical actions that may represent both medical history and medical instructions, further judgment can be made by considering the context.

[0094] For example, "the patient received mechanical ventilation yesterday" is a medical fact that has already occurred, while "immediately implement mechanical ventilation" has a clear directive nature. The former can be treated as a normal clinical fact description, while the latter should be included in the safety management procedure.

[0095] However, medical history descriptions are not a uniform exemption condition for the entire text unit. When a text unit contains both a description of past treatments and a new medical instruction, the new medical instruction will still be identified to prevent a single historical description from causing the actual medical order in the same text to be approved simultaneously.

[0096] Step S23: Risk Recording.

[0097] This sub-step is used to structure and organize the out-of-bounds identification results obtained from sub-steps S21 and S22.

[0098] Suppose that the set of detection units formed after text segmentation of a certain target field is: .in, , ,..., These represent different detection units arranged in the order of the original text.

[0099] For each testing unit, diagnostic rules and medical order rules are executed separately. When the same testing unit hits multiple rules simultaneously, corresponding risk records can be generated for each rule, without stopping other risk checks simply because the first rule was hit.

[0100] After all tests are completed, a risk record set is generated: .in, , ,..., These represent different risk records obtained from the detection.

[0101] Each risk record should include at least its target field, corresponding security rule, risk type, original text or location of original text, and corresponding security handling method.

[0102] This allows the natural language content generated by medical artificial intelligence to be converted into risk records that can be directly processed by subsequent safe execution procedures.

[0103] Step S3: Safety procedures.

[0104] This step is used to perform differentiated security processing on the out-of-bounds content based on the risk type obtained in step S2, and further check whether the security processing is truly effective. Combined with... Figure 3 As shown, this step specifically includes the following sub-steps:

[0105] Step S31: Risk classification.

[0106] Determine the appropriate safety procedures based on the type of risk content and the available clinical information that can be retained.

[0107] In this embodiment of the invention, at least three processing methods are included: diagnostic downgrading, medical order erasure, and blocking.

[0108] For definitive diagnostic content, if the abnormal phenomena or parameter information described therein still have clinical reference value, but the way they are expressed has an excessively strong diagnostic certainty, then the diagnosis should be downgraded.

[0109] For medical treatments or medical orders, since the relevant text usually directly contains actionable treatment procedures, it is preferable to use whole-sentence erasure or whole-sentence safe replacement.

[0110] For content that cannot be restored to a safe output state through local processing, blocking is used to restrict the content from entering the end-user visible output.

[0111] By using differentiated processing, we avoid simply deleting all risky texts in a uniform manner, thus striking a balance between security and the preservation of effective information.

[0112] Step S32: Content processing.

[0113] For texts that require diagnostic downgrading, the original definitive diagnostic language is converted into descriptive, probabilistic, or referential expressions.

[0114] For example, the content that directly establishes the disease can be transformed into "the current parameter performance suggests the possibility of corresponding abnormalities", "the current data pattern is related to this type of clinical situation", or "the specific diagnosis needs to be further determined in conjunction with other clinical data".

[0115] After processing, the abnormal phenomena or clinical correlation information discovered by the model are retained, while the meaning of medical artificial intelligence making a final disease diagnosis on its own is removed.

[0116] Diagnostic downgrades are preferably performed by deterministic procedures, such as using preset conversion templates or deterministic text conversion rules, rather than calling generative models to freely generate new expressions, in order to improve the reproducibility of safe processing results.

[0117] For out-of-bounds content such as medical orders, the target text unit containing specific medical actions will be completely erased or replaced with safety prompt text that does not have the nature of an operation instruction.

[0118] The reason for using whole-sentence processing is that a medical order usually consists of multiple semantic components such as action, target, drug, dosage, and route of administration. Modifying only one word may not completely eliminate the execution meaning of the whole sentence.

[0119] The erased original text can be saved in the audit log for manual review, but it will no longer be displayed as text output for normal users.

[0120] For content that triggers blocking, the corresponding field will be set to an unoutputable state. The corresponding content can be cleared or replaced with security information indicating that the current content cannot form a normal auxiliary conclusion.

[0121] Step S33: Result verification.

[0122] The processing result obtained in step S32 is substantially changed and verified.

[0123] In this embodiment of the invention, let the original text that is determined to be out of bounds be... The text after security processing is Under normal circumstances, the following should be met: .

[0124] In other words, when the security rules have confirmed that the original text has a risk of going out of bounds, the text after security processing must have an actual difference from the original risky text.

[0125] If it appears This indicates that although the corresponding security rule has been successfully triggered, the security executor has not actually changed the original text, meaning that a security rewrite has occurred without modification.

[0126] In this case, the original text is no longer allowed to be output. Instead, the regular security processing is upgraded to a more stringent erasure process, which replaces the corresponding risky text with preset security placeholder information and records this upgrade process.

[0127] This verification mechanism is used to address the issue that the risk assessment capability and the coverage of the rewritten template may not be entirely consistent.

[0128] For example, the risk assessor may be able to identify a newly added deterministic diagnostic sentence pattern that the existing rewriting template has not yet covered. Without verifying the results before and after processing, a situation may arise where "the risk rule has been hit, but the original text has not been changed."

[0129] Therefore, through comparison and This ensures that once a security rule is actually triggered, the corresponding risk content must be substantially modified or further eliminated, forming a closed loop from risk assessment and security handling to verification of the effectiveness of the handling.

[0130] Step S4: Field downgrade.

[0131] To prevent a security processing anomaly in a single target field from causing the entire medical AI output to revert to its unprocessed, original state, in conjunction with... Figure 4 As shown, this embodiment sets independent exception handling boundaries for each target field.

[0132] Let the target field set determined in step S1 be: For each target field Then, execute steps S2 and S3 respectively.

[0133] When the target field completes security processing normally, the resulting field will be... Write the decision object to be output.

[0134] If an anomaly occurs in the target field during rule execution, text parsing, risk assessment, security processing, text recombination, or result write-back, its original field will not be restored. And generate the corresponding security degradation field. .

[0135] in, This indicates the downgraded content that occurs after a security barrier anomaly occurs in the target field.

[0136] For example, the abnormal field can be replaced with a security prompt that does not contain the original risk information, such as "The current field has an abnormal security processing status, and the relevant content has been hidden and is awaiting manual review".

[0137] When the original field is a list or tuple, it can be replaced with a data structure of the same type that includes security warning text to maintain the consistency of the output data structure.

[0138] When an anomaly occurs in a field, only that field is subjected to security degradation, while other fields that have already undergone security processing retain their corresponding processed content.

[0139] For example, the output of medical AI includes three fields: analysis summary, cause description, and suggestion. If the diagnostic expression in the analysis summary has been downgraded and the cause description has been checked normally, but the suggestion field encounters an anomaly when the safety guardrail is executed, only the suggestion field will be replaced with the downgraded content; the first two fields will not be restored to their original state before the safety processing.

[0140] Therefore, the local processing anomalies of the safety barrier itself are limited to a single field, preventing an anomaly in one field from causing the entire unprocessed original medical AI output to be released again.

[0141] Step S5: Export re-inspection.

[0142] This step is used to merge the processing results of each target field and to check again for any residual out-of-bounds content before the medical AI results are officially output. Combined with... Figure 5 As shown, this step specifically includes the following sub-steps:

[0143] Step S51: Merge results.

[0144] The fields that successfully completed security processing in step S3 and the fields that completed security degradation in step S4 are rewritten into the decision object to be output, forming the corresponding security guardrail result object.

[0145] The security guardrail result object may include at least the current security rule version, the triggered security rule, the field that has been security rewritten, the field that has been downgraded, the blocking status, and whether manual review is required.

[0146] For fields that have completed security processing normally, the processed text is retained; for fields that have undergone security degradation, the placeholder information after the security degradation is retained; for fields that trigger blocking conditions, their access to normal user-visible output is restricted.

[0147] Based on the processing status of each field, it can be further determined whether to trigger manual review. For example, when the diagnosis or medical order content in the original output of medical AI has been actually modified, or when a field-level security processing anomaly occurs, a manual review flag can be set, allowing the corresponding output to be further verified by humans.

[0148] Step S52: Initial re-inspection.

[0149] This step performs the first exit security scan on all user-visible text generated after the results are merged.

[0150] In this embodiment of the invention, the text to be output before completion, i.e. after security processing, is denoted as... .right Re-examine whether definitive diagnoses, medical treatment instructions, medication orders, or other content that is not allowed to be directly output still exist.

[0151] When no residual out-of-bounds content is found, The text is identified as having passed export security checks; if residual out-of-bounds content is still detected, the location of the corresponding risky text and the corresponding risk type are determined, and further processing is initiated.

[0152] By rescanning the finally visible text, risky content that may remain due to rule combinations, text reassembly, or other reasons during the security processing of the preceding fields can be discovered.

[0153] Step S53: Residue treatment.

[0154] The residual out-of-bounds content identified in step S52 is neutralized or safely replaced again to form a new text to be output. .

[0155] Then again Perform an exit security scan. When When there is no longer any out-of-bounds content, it will This text has been selected as the final secure text.

[0156] If out-of-bounds content that cannot be reliably eliminated still exists after a second scan, the system will not continue to rely on repeated rewriting, but will instead hide the smallest text unit that poses a risk of residual content.

[0157] The smallest text unit can be a single sentence or a single line of text. Only text units that still contain out-of-bounds content are replaced with safe placeholder information, while other text that has passed the security check is retained.

[0158] Thus, export re-inspection forms a processing chain of "initial scan - residue treatment - re-scan - residue concealment".

[0159] The result verification in step S3 is used to ensure that the risk text of a single rule that has been hit has actually changed, while the exit re-inspection in step S5 is used to ensure that after all fields have been processed, there is no unprocessed out-of-bounds content in the overall text that the final user actually obtains.

[0160] Furthermore, for medical AI with tool access capabilities, permission restrictions can be set on the tool access side to complement the aforementioned text guardrail.

[0161] For example, medical AI should only be allowed to call read-only or computational tools such as data reading, parameter querying, and calculation analysis, and should not be allowed to directly call tools with database writing, medical order issuance, treatment execution, or medical device control capabilities, in order to reduce the possibility of medical AI bypassing the output safety barrier through other execution paths.

[0162] Step S6: Audit Log.

[0163] After the export re-inspection is completed, this step establishes corresponding audit records based on the execution process of this safety barrier.

[0164] For each security rule that is actually triggered, record the corresponding security rule identifier, rule version, target field, risk type, and security action executed.

[0165] For content that has undergone diagnostic downgrade processing, both the original text and the processed text are recorded; for content that has undergone medical order erasure, the original text and the corresponding erasure status are recorded; for cases in step S3 where rewriting idling triggers upgrade erasure, upgrade processing markers are further recorded.

[0166] For cases where field security degradation occurs in step S4, record the abnormal field, abnormal type, abnormal information, and the security degradation method used.

[0167] Based on the audit information mentioned above, the original output text of medical artificial intelligence, the actual security rules that were triggered, and the security processing procedures that were followed can be determined from the final output results.

[0168] Furthermore, a chain-like audit structure can be used to associate continuously generated audit records.

[0169] Suppose the continuously generated audit records are: .in, This represents the i-th audit record.

[0170] For the i-th audit record, chain hash of the previous audit record is used. Current decision content hash and metadata of the current audit log By combining the results, we obtain: .

[0171] Then combine the data Perform the preset hash operation to obtain the current chain hash: .

[0172] in, It may include one or more of the following: patient identifier, model identifier, model version, medical AI result generation time, and audit record time.

[0173] The first audit record can use a preset initial value as the hash of its previous chain.

[0174] When the same medical AI decision is subsequently updated, the original audit record is not overwritten. Instead, a new content hash is generated based on the updated decision content, and new audit records are added.

[0175] Therefore, different historical versions of the same decision can be preserved in the audit chain.

[0176] During integrity verification, the chain hash is recalculated sequentially based on the data saved in each audit record.

[0177] When a historical audit record is deleted, modified, or its order is changed, the chain relationship of its subsequent records will change, thereby enabling the detection of corresponding audit data anomalies.

[0178] Finally, the security output result obtained in step S5, the security guardrail result object, and the audit record generated in step S6 are associated and stored, and the medical artificial intelligence result after security processing is provided to the user terminal or subsequent read-only business modules.

[0179] This completes the processing of a medical AI-powered safety barrier.

[0180] In summary, this embodiment performs field filtering, text parsing, and rule assembly on the original output of medical artificial intelligence in step S1; performs deterministic diagnosis identification, medical order identification, and risk recording in step S2; classifies and handles different out-of-bounds risks and verifies whether the processing results are truly effective in step S3; limits the impact of local anomalies by using a field-by-field fault safety mechanism in step S4; merges the processing results in step S5 and further eliminates residual risks through two-level exit re-inspection; and finally, saves the safety rules, original text, processing results, anomaly information, and audit chain information in step S6, thereby establishing a complete processing and traceability link from the original output of medical artificial intelligence to the final safe output.

[0181] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for outputting safety railings using medical artificial intelligence, characterized in that, include: S1. Obtain the output result generated by medical artificial intelligence, parse the output result, and determine the target field and the corresponding text to be detected that need to be processed for security. S2. Perform boundary crossing detection on the text to be detected, identify the definitive diagnostic content and / or medical order content, and generate a risk record; S3. Based on the risk record, perform diagnostic downgrade, erasure or blocking processing on the out-of-bounds content, and verify the results of the text before and after the security processing. If the out-of-bounds content has not changed substantially after processing, perform upgrade erasure on it. S4. Perform security processing on each target field separately. If any target field's security processing fails, perform security degradation on that target field and maintain the processing results of other target fields. S5. Merge the processing results of each target field, perform an exit check on the resulting user-visible text, and perform security processing again on any remaining out-of-bounds content to form the final secure output result. S6. Generate audit records based on the safety barrier execution process, and associate and store the audit records with the final safety output results.

2. The medical artificial intelligence output safety barrier method according to claim 1, characterized in that, In step S1, target fields that need to be processed for security purposes are selected from the output results according to a preset set of descriptive fields. When the target field is a string, the corresponding string will be used as the text to be detected. When the target field is a list or tuple, the string elements are treated as the text to be detected, while the original values ​​of the non-string elements are preserved.

3. The medical artificial intelligence output safety barrier method according to claim 2, characterized in that, Step S1 includes: Load pre-established security rules, which include at least triggering conditions, risk assessment conditions, and security handling actions; Register and verify the risk assessors and safety executors referenced in each safety rule; When the risk assessor or safety actuator fails to function properly, the situation will be identified as an abnormal safety barrier configuration.

4. The medical artificial intelligence output safety barrier method according to claim 1, characterized in that, In step S2, the definitive diagnostic content in the text to be tested is identified based on diagnostic trigger words, assertion tone, disease or pathological state object, patient subject and sentence structure. Identify medical orders that constitute medical treatment based on information about the medical action, drug or treatment recipient, route of administration, dosage or rate, and the nature of the instructions in the text.

5. The medical artificial intelligence output safety barrier method according to claim 4, characterized in that, In step S2, diagnostic rules and medical order rules are executed on each text to be detected. When the same text to be detected hits multiple security rules at the same time, corresponding risk records are generated respectively. The risk record includes at least the target field, the corresponding security rule, the risk type, the original text or the location of the original text, and the security handling method.

6. The medical artificial intelligence output safety barrier method according to claim 1, characterized in that, In step S3, diagnostic downgrading is performed on definitive diagnostic content, converting the definitive diagnostic expression into a descriptive, probabilistic, or referential expression; sentence erasure or safe replacement is performed on medical order content. Content that cannot be restored to a safe output state through local processing is blocked, restricting it from entering the user's visible output.

7. The medical artificial intelligence output safety barrier method according to claim 6, characterized in that, In step S3, the security-processed text is compared with the corresponding original text; If the text after security processing does not substantially change from the original text, it is determined that the corresponding security processing has not taken effect, and the corresponding out-of-bounds content is replaced with preset security placeholder information, while the corresponding upgrade processing status is recorded.

8. The medical artificial intelligence output safety barrier method according to claim 1, characterized in that, In step S4, independent exception handling boundaries are set for each target field; When any target field encounters an anomaly during rule execution, text parsing, risk assessment, security processing, text recombination, or result writing back, only the target field that encountered the anomaly will be replaced with the security-degraded content, while the processing results of other target fields that have completed security processing will be preserved.

9. The method for outputting safety barriers using medical artificial intelligence according to claim 1, characterized in that, In step S5, an initial exit security scan is performed on the merged user-visible text; When residual out-of-bounds content is detected, the residual out-of-bounds content is neutralized or securely replaced again, and an exit security scan is performed again; if residual out-of-bounds content that cannot be reliably eliminated still exists after the second scan, the corresponding smallest text unit is hidden or replaced with secure placeholder information.

10. The medical artificial intelligence output safety barrier method according to claim 1, characterized in that, In step S6, the actual security rules, rule versions, target fields, risk types, security actions, original text, processing results, and exception information that are hit are recorded, and a chain-like audit structure is used to associate the continuously generated audit records. When the corresponding medical AI decision is updated, the original audit record is retained and the new audit record is added.