Robotic facing ai model trusted execution and security control method and system

CN122904296APending Publication Date: 2026-10-13SHEN ZHEN SKYSI WISDOM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611406820.X
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

然而,上述方案缺少针对模型内部执行结构的细粒度安全管理机制,未结合模型执行图、算子依赖关系及推理路径的安全风险属性进行安全划分,难以实现模型安全属性与执行语义之间的有效关联,也无法针对关键推理路径实施差异化保护

Benefits of technology

本发明通过解析AI模型执行图,并将模型划分为具有独立可信属性的安全执行分块,并建立分块级密钥管理与授权绑定,使密码保护对象与实际模型执行对象相一致,可针对不同推理路径实施差异化保护,避免了整体加解密带来的高昂开销与防护盲区,减少了不同生命周期阶段的保护空隙。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122904296A_ABST
    Figure CN122904296A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence, and discloses a robot-oriented AI model trusted execution and security control method and system; comprising: analyzing an AI model execution graph, dividing a plurality of model security blocks and generating block metadata; performing authentication encryption and integrity root construction on each block, obtaining a loaded block set through ciphertext direct loading and trusted loading; calculating and verifying the budget based on real-time task constraints, calculating the priority combining multi-dimensional security attributes, and dynamically selecting the to-be-verified block; performing integrity re-verification and updating the dynamic trusted state; constructing a trusted state matrix to determine the gating condition, obtaining the output instruction and safety response after gating; the application can implement continuous integrity maintenance for the long-term running model in the accelerator without violating the real-time control delay requirement of the robot, avoid breaking the task deadline while maintaining the continuous detection capability, balance the real-time performance and security of the system, and significantly reduce the dependence on additional redundant computing power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method and system for trusted execution and safety control of AI models for robots. Background Technology

[0002] With the development of artificial intelligence technology, intelligent robot systems based on deep learning models are gradually being applied to scenarios such as industrial manufacturing, service robots, intelligent mobile platforms, and autonomous decision-making in complex environments. Robot systems typically rely on visual perception models, language understanding models, motion planning models, and control decision-making models to complete environmental perception, task planning, and action execution. These artificial intelligence models contain a large number of high-value parameters and complex computational structures, and face security risks such as model leakage, parameter tampering, illegal replacement, and uncontrollable operating status during storage, transmission, loading, and operation.

[0003] In existing technologies, the protection of artificial intelligence models typically targets the complete model file or the overall operating environment, employing methods such as model encryption, access control, and trusted execution environments. However, these solutions lack fine-grained security management mechanisms for the model's internal execution structure. They fail to classify security risks based on the model's execution graph, operator dependencies, and inference paths, making it difficult to effectively correlate model security attributes with execution semantics and to implement differentiated protection for critical inference paths. Furthermore, existing integrity verification technologies often employ fixed-period or high-frequency hash verification. Robotic intelligent systems have stringent real-time requirements; fixed-period integrity verification consumes significant computational resources, impacting the response time of inference tasks. Reducing the verification frequency may lead to undetected model anomalies. Existing mechanisms struggle to balance continuous trusted maintenance with real-time inference performance. Moreover, existing security solutions typically only handle model anomalies by issuing alarms, logging, or halting operation. There is a lack of effective correlation between the security state and the robot's control output, making it impossible to dynamically adjust the robot's physical behavior based on the model's trusted state. This makes it difficult to ensure the safe operation of robots with autonomous movement and physical interaction capabilities in unstructured environments.

[0004] In view of this, the present invention proposes a method and system for trusted execution and safety control of AI models for robots to solve the above problems. Summary of the Invention

[0005] To overcome the aforementioned deficiencies of the prior art and achieve the above objectives, the present invention provides the following technical solution: A method for trusted execution and safety control of AI models for robots, including: The execution graph of the AI ​​model is analyzed, and the AI ​​model is divided into multiple model security blocks. Each model security block contains the corresponding model plaintext block and block metadata. Authentication encryption and integrity root construction are performed on each model security block to obtain the model ciphertext security package; the model ciphertext security package is decrypted and integrity verified to obtain the set of loaded model security blocks; Obtain the real-time task constraint parameters of the robot in the current running cycle and calculate the verification budget; obtain the multi-dimensional safety attribute parameters of each loaded model safety block and calculate the verification priority; based on the verification budget and verification priority, select the model safety block to be verified from the set of loaded model safety blocks and form a set of blocks to be verified. Perform integrity verification on the set of blocks to be verified, and update the dynamic trust status of each loaded model security block based on the verification results; Construct the model's trusted state matrix and determine the gating condition variables. Based on the gating condition variables and the model's trusted state matrix, obtain the gating output command and security response results.

[0006] Furthermore, the method for obtaining the set of loaded model security blocks is as follows: Obtain the model identifier and model version of the AI ​​model and combine them with the block metadata to derive an independent model block key for each model security block; perform authentication encryption based on the model block key to obtain the ciphertext block and authentication tag of each model security block; Calculate the digest of each ciphertext block and construct the ciphertext Merkle tree to obtain the ciphertext Merkle integrity root; calculate the digest of each model plaintext block and construct the plaintext Merkle tree to obtain the plaintext Merkle integrity root. The encrypted blocks, authentication tags, encrypted Merkle integrity roots, and plaintext Merkle integrity roots are assembled into a model encrypted security packet and sent to the security processing area. Trusted loading verification is then performed. After successful verification, each model security block is stored in a preset protected area, resulting in a set of loaded model security blocks.

[0007] Furthermore, the method for deriving an independent model block key for each model security block is as follows: Extract the block identifier from the block metadata. Key Era The block key for the model is derived using the following formula:

[0008] in, The model block key for the k-th model security block. Derived function for key. For model identification, For model version, This is the master key for the model.

[0009] Furthermore, the method for calculating the verification budget is as follows: Real-time task constraint parameters include the current task time window. Worst execution time of the current task System overhead and real-time margin The verification budget is calculated using the following formula:

[0010] in, For the current running cycle The verification budget.

[0011] Furthermore, the method for calculating the verification priority is as follows: Multidimensional security attribute parameters include basic risk level The urgency of the current situation is not yet verified. Current inference path dependency weights Block history failure frequency Dynamic weighting of robot task risks The verification priority is calculated using the following formula:

[0012] in, For the first The verification priority of each loaded model security block. , , , , Each has its own preset weighting coefficient.

[0013] Furthermore, the method for constructing the set of blocks to be verified is as follows: Obtain the current unverified time of each loaded model security block and assemble an overdue block set; According to the verification priority from high to low, select the loaded model security blocks from the overdue block set to form the first verification set; obtain the verification generation value of each loaded model security block in the first verification set and sum them to obtain the first total generation value; construct the overdue verification set based on the first total generation value and the verification budget. Subtract the value of the first general agent from the verification budget to obtain the remaining verification budget; According to the verification priority from high to low, the second verification set is selected from the loaded model security blocks (excluding the overdue block set) in the loaded model security block set; and the second total generation value is calculated. Based on the second total generation value and the remaining verification budget, a supplementary verification set is constructed. The overdue verification set and the supplementary verification set are merged to obtain the block set to be verified.

[0014] Furthermore, the method for updating the dynamic trusted state of each loaded model security block is as follows: Read the actual memory content of each security block of the model to be verified and calculate the actual digest value, and compare the actual digest value with the preset expected digest value; If the comparison is consistent, the verification is deemed successful, and the dynamic trusted state is updated to the trusted execution state. If the comparison is inconsistent, the re-verification is deemed to have failed. The anomaly level of the security block of the model to be verified is identified. If the anomaly level is less than the preset risk threshold, the dynamic trusted state is updated to the local failure state. If the anomaly level is greater than or equal to the preset risk threshold, the dynamic trust status will be updated to the model distrust status. For each loaded model security block in the loaded model security block set that has not been selected to the untested block set, if it belongs to the overdue block set, the dynamic trust status will be updated to risk observation status; otherwise, the original dynamic trust status will be maintained.

[0015] Furthermore, the method for determining the gating condition variables is as follows: Based on the dynamic trusted state of each loaded model security block, the overall system evaluation state is determined according to preset rules. The overall system evaluation state includes trusted execution evaluation state, risk observation evaluation state, local failure evaluation state, and model trust failure evaluation state. Obtain the loaded model safety blocks that the current inference path depends on, and assemble the current path-dependent block set; Determine whether the dynamic trusted state of each loaded model security block in the current path dependency block set is a trusted execution state; If the judgment result is yes, and the overall system assessment status is either a trusted execution assessment status or a risk observation assessment status, then the gated condition variable is determined to be a trusted output condition; otherwise, the gated condition variable is determined to be an untrusted output condition.

[0016] Furthermore, the method for obtaining the output instruction after gating is as follows: When the gating condition variable is a reliable output condition, the original inference output of the AI ​​model is determined as the gating output instruction; When the gated condition variable is an untrusted output condition, determine whether there is a pre-verified security alternative strategy; If it exists, a safe alternative output instruction is generated based on the safe alternative strategy, and the safe alternative output instruction is determined as the gating output instruction; If it does not exist, a blocking instruction is generated and the blocking instruction is determined as the output instruction after gating.

[0017] A trusted execution and safety control system for AI models for robots, comprising: The security block module is used to parse the execution graph of the AI ​​model and divide the AI ​​model into multiple model security blocks. Each model security block contains the corresponding model plaintext block and block metadata. The trusted loading module is used to perform authentication encryption and integrity root construction on each model security block to obtain the model ciphertext security package; and to decrypt and verify the integrity of the model ciphertext security package to obtain the set of loaded model security blocks. The verification scheduling module is used to obtain the real-time task constraint parameters of the robot in the current running cycle and calculate the verification budget; obtain the multi-dimensional safety attribute parameters of each loaded model safety block and calculate the verification priority; and select the model safety block to be verified from the set of loaded model safety blocks based on the verification budget and verification priority to form a set of blocks to be verified. The integrity verification module is used to perform integrity verification on the set of blocks to be verified, and update the dynamic trust status of each loaded model security block based on the verification results. The output gating module is used to construct the model's trusted state matrix and determine the gating condition variables. Based on the gating condition variables and the model's trusted state matrix, it obtains the gating output command and the security response result. The technical effects and advantages of the AI ​​model trusted execution and safety control method and system for robots proposed in this invention are as follows: This invention analyzes the execution graph of an AI model and divides the model into secure execution blocks with independent and trustworthy attributes. It also establishes block-level key management and authorization binding, ensuring that the object of cryptographic protection is consistent with the actual object of model execution. This allows for differentiated protection for different inference paths, avoiding the high overhead and blind spots of overall encryption and decryption, and reducing protection gaps at different lifecycle stages.

[0018] This invention incorporates the remaining time budget of a robot's real-time task into the security verification scheduling. It dynamically determines the scope and object of integrity verification based on the current real-time deadline, the risk level of each block, and the verification cost. It can continuously maintain the integrity of models running in the accelerator for a long time without violating the robot's real-time control latency requirements. It maintains continuous detection capabilities while avoiding exceeding the task deadline, thus balancing system real-time performance and security, and significantly reducing the reliance on additional redundant computing power.

[0019] This invention establishes a direct mapping relationship between the model's trustworthy state, output decisions, and robot control authority. It sends the model's trustworthy state to the safety controller through a hardware security channel independent of the main control operating system. It can not only identify AI model anomalies, but also limit the robot's execution speed, torque, range of motion, or safely shut down the robot based on the degree of trust degradation, thereby improving the robot's operational safety in unstructured environments.

[0020] This invention takes model security blocks as the unified control object, and connects the complete protection chain of model execution graph security blocks, hierarchical key protection, ciphertext direct loading, dual integrity verification, real-time deadline constraint verification, trusted output gating and robot physical security response. It enables the cryptographic state, integrity state, inference execution permission and robot physical movement permission of the model blocks to change collaboratively according to preset rules, thus meeting the comprehensive requirements of embodied intelligent robots for security, real-time performance and reliability. Attached Figure Description

[0021] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system module block diagram of the present invention; Figure 3 A flowchart for generating real-time budget constraint dynamic integrity verification is provided for this invention. Figure 4 This is a flowchart illustrating the trusted state-driven robot output gated state of the present invention. Detailed Implementation

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

[0023] In one embodiment, a method for trusted execution and safety control of AI models for robots is disclosed, such as... Figure 1 As shown, the method includes: The execution graph of the AI ​​model is analyzed, and the AI ​​model is divided into multiple model security blocks. Each model security block contains the corresponding model plaintext block and block metadata.

[0024] Specifically, before deploying the AI ​​model, the original model file of the AI ​​model to be deployed is first obtained, and the execution graph of the AI ​​model is parsed. The execution graph includes the operator topology, data flow, inter-layer connection relationship, inference path of each branch, and weight tensor range (weight address start position and length) corresponding to each operator node of the AI ​​model.

[0025] Based on semantic analysis of the execution graph, the dependencies, weight tensor ranges, and inference paths of each operator node in the model are extracted, and the immutable content of the AI ​​model is divided into multiple model security blocks with independent trust attributes. Each model security block contains the corresponding model plaintext block and the block metadata generated for that model security block.

[0026] In one embodiment of the present invention, immutable content includes model weights, fixed network structure, fixed execution graph, and fixed execution parameters; while dynamic running data such as input data, output data, temporary activation values, and KV cache are stored separately and not included in the model security block to avoid unnecessary integrity verification overhead.

[0027] Among them, plaintext block refers to the original plaintext data block obtained by dividing the immutable content of the AI ​​model (including model weights, fixed network structure, fixed execution graph and fixed execution parameters, etc.) according to the semantics of the execution graph. Each plaintext block is mapped one-to-one with the corresponding model security block. It is the input plaintext data for the subsequent execution authentication encryption to generate ciphertext blocks. Its content exists in plaintext form at the model security encapsulation end before encryption, and is transmitted and stored in ciphertext form after encryption.

[0028] The immutable content of the AI ​​model is divided into multiple model security blocks with independent trust attributes, taking into account the following factors during the division: Operator dependency: Divide consecutive operator nodes with close data dependencies into the same block, or divide them into independent blocks according to operator boundaries; Weight tensor range: Each model security block corresponds to a continuous range of weight addresses, which facilitates independent encryption and integrity verification; Reasoning path: For example, dividing relatively independent modules such as visual perception path, motion planning path, and control decision path into different blocks; Safety risk attributes: Identify key operators (such as the end-effector control strategy layer) that have a significant impact on the robot's safe output and classify them into high-risk blocks; classify ordinary feature extraction layers into low-risk blocks.

[0029] For each model security block, generate block metadata; the block metadata includes at least: Block identifier: Used to uniquely identify the safe block of this model; Basic risk level: A static safety attribute predefined based on the position, functional importance, and impact on robot safety output of the safety block in the model execution diagram; Estimated integrity verification cost (i.e. verification cost): Estimated computational overhead required to perform an integrity re-verification on the security block of the model; Maximum allowed unverified time ( The maximum time threshold for which the security blocks of this model can not be verified for integrity during operation is obtained based on experience. Key epoch: The global version identifier of the AI ​​model. The key epoch is consistent and the same across all model security blocks of the same AI model, and does not change depending on the block. In a further embodiment, the block metadata may also include: execution node identifier, weight address range, execution dependencies, etc.

[0030] Authentication encryption and integrity root construction are performed on each model security block to obtain the model ciphertext security package; the model ciphertext security package is decrypted and integrity verified to obtain the set of loaded model security blocks.

[0031] The method for obtaining the set of loaded model security blocks is as follows: obtain the model identifier and model version of the AI ​​model and combine them with the block metadata to derive an independent model block key for each model security block; perform authentication encryption based on the model block key to obtain the ciphertext block and authentication tag of each model security block; Calculate the digest of each ciphertext block and construct the ciphertext Merkle tree to obtain the ciphertext Merkle integrity root; calculate the digest of each model plaintext block and construct the plaintext Merkle tree to obtain the plaintext Merkle integrity root. The encrypted blocks, authentication tags, encrypted Merkle integrity roots, and plaintext Merkle integrity roots are assembled into a model encrypted security packet and sent to the security processing area. Trusted loading verification is then performed. After successful verification, each model security block is stored in a preset protected area to obtain a set of loaded model security blocks. The method for deriving an independent model block key for each model security block is as follows: extract the block identifier from the block metadata. Key Era The block key for the model is derived using the following formula:

[0032] in, The model block key for the k-th model security block. Derived function for key. For model identification, For model version, This is the master key for the model.

[0033] Specifically, this step is mainly used to establish the binding relationship between the model execution structure and security authorization, realizing direct encrypted loading of the model and trusted loading within the accelerator; first, the model master key is generated. In this embodiment, a cryptographically secure pseudo-random number generator (CSPRNG) can be used to generate the model master key. According to the model master key Combined with model identifiers Model version Block identifiers for each model's security blocks and key epoch Independent model block keys are derived for each model security block using key derivation functions (KDF). Specifically, for the k-th model security block, the following formula is derived:

[0034] Where || represents a join operation, k is the total number of secure blocks in the model; key epoch. These are global parameters at the model level. All model security blocks share the same key epoch to support key updates, device deprivation, and rollback prevention.

[0035] Using the model block key corresponding to each model security block Authentication and encryption are performed on the plaintext blocks of the models corresponding to each model security block; specifically, associated authentication data is constructed. With non-repeating nonce Authentication encryption algorithm is used. Using model block keys For each model security block, the corresponding plaintext block is... Perform authentication encryption and output the ciphertext blocks of each model's secure blocks. and certification labels The expression is: .

[0036] Calculate the digest for each ciphertext block and construct the ciphertext Merkle tree to obtain the ciphertext Merkle integrity root. Specifically: for each ciphertext block... The process involves calculating cryptographic hash digests (such as SHA-256) for each ciphertext block to obtain the hash value of the leaf node. Then, the hash values ​​of two adjacent leaf nodes are concatenated in order and the hash is calculated again to obtain the hash of the parent node of the previous layer. If the number of nodes in the current layer is odd, the last node is copied and concatenated with its own hash. This pairwise hash reduction process is repeated to build upwards layer by layer until it is finally reduced to a single node. The final reduced single node is the Merkle integrity root of the ciphertext, which is used to verify whether each ciphertext block has been tampered with during the transmission and storage of the model ciphertext secure packet.

[0037] The digests of each model's plaintext block are calculated separately, and a plaintext Merkle tree is constructed to obtain the plaintext Merkle integrity root. Specifically: before authentication encryption, a cryptographic hash digest is calculated for each model's plaintext block to obtain the hash value of the leaf node corresponding to each plaintext block; the hash values ​​of the leaf nodes of two adjacent plaintext blocks are concatenated in order and the hash is calculated again to obtain the hash of the parent node of the previous level; if the number of nodes in the current level is odd, the last node is copied and its hash is concatenated with its own; the above pairwise hash reduction process is repeated to build upwards layer by layer until it is finally reduced to a single node; the final reduced single node is the plaintext Merkle integrity root; it is used to verify whether bit flips, out-of-bounds writes, or partial replacements have occurred in the running memory of each model's plaintext block after decryption within the accelerator's secure processing area.

[0038] The encrypted blocks, authentication tags, encrypted Merkle integrity roots, and plaintext Merkle integrity roots are assembled into a model encrypted security packet. The model encrypted security packet is forwarded to the secure processing area of ​​the artificial intelligence accelerator by the robot's main control processor. During this process, the main control processor only performs encrypted forwarding, and the model plaintext and model key do not enter the main control processor's ordinary memory.

[0039] The trusted load verification is performed in a block-level manner by the secure processing area. The trusted load verification includes the following steps, executed sequentially: Ciphertext state integrity verification: Verify the authentication tag and the ciphertext Merkle integrity root to confirm that the ciphertext blocks have not been tampered with during transmission and storage. Model block key decryption and authentication decryption: Decrypt the model block key and use the model block key to authenticate and decrypt the ciphertext blocks; Plaintext runtime integrity verification: Verify the integrity of plaintext blocks in runtime memory using plaintext Merkle integrity roots; After successful verification, each model security block is stored in a preset protected area, resulting in a set of loaded model security blocks.

[0040] This approach effectively addresses the issues of coarse-grained model protection, easy plaintext leakage, and blind spots in single-point integrity verification in existing technologies through the synergy of hierarchical key derivation, dual Merkle integrity root construction, and direct ciphertext loading mechanism. This enhances the confidentiality and tamper resistance of the model throughout its entire lifecycle of transmission, storage, and operation.

[0041] Obtain the real-time task constraint parameters of the robot in the current running cycle and calculate the verification budget; obtain the multi-dimensional safety attribute parameters of each loaded model safety block and calculate the verification priority; based on the verification budget and verification priority, select the model safety block to be verified from the set of loaded model safety blocks and form a set of blocks to be verified.

[0042] The method for constructing the set of blocks to be verified is as follows: obtain the current unverified time of each loaded model security block, and construct the set of overdue blocks; According to the verification priority from high to low, select the loaded model security blocks from the overdue block set to form the first verification set; obtain the verification generation value of each loaded model security block in the first verification set and sum them to obtain the first total generation value; construct the overdue verification set based on the first total generation value and the verification budget. Subtract the value of the first general agent from the verification budget to obtain the remaining verification budget; According to the verification priority from high to low, the second verification set is selected from the loaded model security blocks (excluding the overdue block set) in the loaded model security block set; and the second total generation value is calculated. Based on the second total generation value and the remaining verification budget, a supplementary verification set is constructed. The overdue verification set and the supplementary verification set are merged to obtain the block set to be verified.

[0043] Specifically, such as Figure 3 As shown, within the current running cycle of the robot performing the AI ​​inference task, the real-time task constraint parameters of the current running cycle are obtained; and the real-time task constraint parameters include the current task time window, the worst execution time of the current inference task, system overhead, and real-time margin. Based on the real-time task constraint parameters, the verification budget for the current runtime period t is calculated using the following formula. :

[0044] in, For the task time window, This represents the worst-case execution time for the current inference task. System overhead (i.e., the time required for other fixed operations that the system must complete within the current runtime, excluding the AI ​​inference task itself). Real-time margin (i.e., pre-reserved safety buffer time); verification budget. This indicates the remaining time available for integrity verification within the current running cycle. If it is 0, the regular integrity verification is skipped to avoid exceeding the robot's real-time task deadline.

[0045] Retrieve the multidimensional security attribute parameters of each loaded model security block. The multidimensional security attribute parameters include: Basic risk level : Block metadata from each loaded model security block; The time urgency is currently unverified. Based on the current unverified time of each loaded model security block. With maximum allowed unverified time The calculation is as follows: ; Current inference path dependency weights Based on the execution path activated by the current inference task, determine whether the i-th loaded model safety block is located on the execution path; if it is, assign a higher path dependency weight (e.g., set to 1 or preset a high weight based on expert experience); if it is not, assign a lower path dependency weight (e.g., set to 0 or preset a low weight based on expert experience). Block historical failure frequency : Reflects the number or frequency of anomalies detected in the past operation of the loaded model security block. For example, obtain the number of times the i-th loaded model security block was judged as a failure in integrity re-verification within a preset historical time window and the total number of times the i-th loaded model security block was verified within a preset historical time window. Divide the number of failures by the total number of verifications to obtain the corresponding block historical failure frequency. Dynamic weighting of robot task risks The risk score is determined based on the robot's physical operating state parameters, including current speed, torque, load, and human-machine distance. If the physical operating state parameters are input into a preset risk scoring function, the corresponding risk score is obtained. The risk score is used as the corresponding dynamic weight of the task risk. The risk scoring function is a normalized mapping function pre-built based on an expert rule base or historical data statistical model. It is used to map the physical operating state parameters to a risk score in the range of [0,1]. This is a technical means that can be conventionally preset by those skilled in the art, and will not be described in detail here. Based on the multidimensional security attribute parameters, the verification priority of each loaded model security block is calculated using the following formula. :

[0046] Among them, α, β, γ, δ, and ε are their respective preset weight coefficients, which are pre-set according to the safety level requirements of the robot application scenario, real-time performance constraints, and the experience of experts in this field, and are used to adjust the relative importance of the five dimensions. For example, in high-risk collaborative scenarios, physical safety can be prioritized, and the dynamic weight coefficient ε of robot task risk can be set to the highest.

[0047] Based on the verification budget and verification priority, security blocks of the model to be verified are selected from the set of loaded model security blocks to form a set of blocks to be verified; specifically including: First, obtain the current unverified time of each loaded model security block, and form an overdue block set by the loaded model security blocks whose current unverified time has exceeded (i.e., is greater than) the maximum allowed unverified time; Phase 1: Following the verification priority from highest to lowest, sequentially select loaded model security blocks from the overdue block set to form the first verification set; obtain the verification cost value of each loaded model security block in the first verification set and sum them to obtain the first total cost value; determine if the first total cost value exceeds the verification budget: if it does not exceed (i.e., less than or equal to), then the first verification set is determined as the overdue verification set; if it exceeds (i.e., greater than), remove the loaded model security block with the lowest verification priority from the first verification set until the first total cost value does not exceed the verification budget, and then determine the first verification set after removal as the overdue verification set; subtract the first total cost value corresponding to the overdue verification set from the verification budget to obtain the remaining verification budget; Phase Two: Following the order of verification priority from highest to lowest, sequentially select from the loaded model security blocks (excluding the expired block set) to form the second verification set; obtain the verification cost value of each loaded model security block in the second verification set and sum them to obtain the second total cost value; determine whether the second total cost value exceeds the remaining verification budget: if it does not exceed, the second verification set is designated as a supplementary verification set; if it does exceed, remove the loaded model security block with the lowest verification priority from the second verification set until the second total cost value does not exceed the remaining verification budget, and then designate the removed second verification set as a supplementary verification set. The overdue verification set and the supplementary verification set are merged to obtain the block set to be verified.

[0048] In this way, by introducing the robot's real-time task constraint parameters into the integrity verification schedule, and using the verification budget as a hard constraint and the verification priority calculated by multi-dimensional security attributes as the scheduling basis, the safety blocks of the model to be verified are dynamically selected. This solves the resource conflict problem between existing fixed-period or high-frequency integrity verification and the strict deadline of the robot's real-time inference task. Thus, while maintaining the model's continuous detection capability, the deadline of the robot's real-time task is avoided, thus balancing the real-time performance and security of the robot's intelligent system.

[0049] Perform integrity verification on the set of blocks to be verified, and update the dynamic trust status of each loaded model security block based on the verification results.

[0050] The method for updating the dynamic trusted state of each loaded model security block is as follows: read the actual content of the running memory of each model security block to be verified and calculate the actual digest value, and compare the actual digest value with the preset expected digest value. If the comparison is consistent, the verification is deemed successful, and the dynamic trusted state is updated to the trusted execution state. If the comparison is inconsistent, the re-verification is deemed to have failed. The anomaly level of the security block of the model to be verified is identified. If the anomaly level is less than the preset risk threshold, the dynamic trusted state is updated to the local failure state. If the anomaly level is greater than or equal to the preset risk threshold, the dynamic trust status will be updated to the model distrust status. For each loaded model security block in the loaded model security block set that has not been selected to the untested block set, if it belongs to the overdue block set, the dynamic trust status will be updated to risk observation status; otherwise, the original dynamic trust status will be maintained.

[0051] Specifically, for each security block of the model to be verified in the set of blocks to be verified, the actual content of its running memory in the protected area is read and the actual digest is calculated. The actual content of the running memory is the plaintext model data currently actually stored in the protected area for each security block of the model to be verified, including weight parameters and network structure data. When calculating the actual digest value, according to the hash algorithm used when constructing the plaintext Merkle integrity root, all or the memory content specified by the weight address range of the security block of the model to be verified in the protected area is read, and the hash operation is performed to obtain the actual digest value. The actual digest value is compared with the preset expected digest value. Here, the preset expected digest value is the benchmark verification value pre-calculated and stored in the plaintext Merkle integrity tree by performing hash operation on each plaintext block of the model during the model security encapsulation stage. This is a conventional integrity verification benchmark setting method in this field and will not be described in detail here.

[0052] If the comparison is consistent, that is, the actual digest value is exactly the same as the expected digest value, it indicates that the actual content of the security block of the model to be verified in the running memory has not been tampered with. Then the verification is deemed to have passed, the dynamic trusted state of the security block of the model to be verified is updated to the trusted execution state, and its last verification timestamp is updated. If the comparison is inconsistent, the re-verification is deemed a failure, and the anomaly level of the security block of the model to be verified is identified. The anomaly level is determined based on the basic risk level of the security block of the model to be verified, such as directly using the basic risk level as the corresponding anomaly level. If the anomaly level is less than the preset risk threshold, its dynamic trust status is updated to a partial failure state, and the safety block of the model to be verified is marked as isolated. If the anomaly level is greater than or equal to the preset risk threshold, its dynamic trust status is updated to a model failure state, and an anomaly event is triggered. The preset risk threshold is determined by expert experience based on the basic risk level distribution of the model safety block and the safety level requirements of the robot application scenario.

[0053] For each loaded model security block in the loaded model security block set that has not been selected to the unverified block set: if it belongs to the overdue block set (i.e., the current unverified time has exceeded the maximum allowed unverified time but has not been verified due to insufficient budget), then its dynamic trust status is updated to risk observation status.

[0054] If it does not belong to the overdue block set, its original dynamic trust state remains unchanged.

[0055] In this way, by performing block-level integrity re-verification on the set of blocks to be verified, and making differentiated state determinations based on the re-verification results and the basic risk level, the problem of coarse-grained model anomaly detection and only overall failure determination in the existing technology can be effectively solved. This provides fine-grained block-level state inputs for subsequent trusted gating and physical security response, and realizes refined closed-loop management of the model's trusted state.

[0056] Construct the model's trusted state matrix and determine the gating condition variables. Based on the gating condition variables and the model's trusted state matrix, obtain the gating output command and security response results.

[0057] The method for determining the gating condition variables is as follows: based on the dynamic trusted state of each loaded model security block, the overall system evaluation state is determined according to preset rules; the overall system evaluation state includes trusted execution evaluation state, risk observation evaluation state, local failure evaluation state, and model trust failure evaluation state. Obtain the loaded model safety blocks that the current inference path depends on, and assemble the current path-dependent block set; Determine whether the dynamic trusted state of each loaded model security block in the current path dependency block set is a trusted execution state; If the judgment result is yes, and the overall system assessment status is either a trusted execution assessment status or a risk observation assessment status, then the gated condition variable is determined to be a trusted output condition; otherwise, the gated condition variable is determined to be an untrusted output condition. The method for obtaining the gating output instruction is as follows: when the output condition is reliable, the original inference output of the AI ​​model is determined as the gating output instruction; When the output condition is untrusted, determine whether there is a pre-verified security alternative strategy; If it exists, a safe alternative output instruction is generated based on the safe alternative strategy, and the safe alternative output instruction is determined as the gating output instruction; If it does not exist, a blocking instruction is generated and the blocking instruction is determined as the output instruction after gating.

[0058] Specifically, such as Figure 4 As shown, a model trust state matrix containing multiple levels of states is constructed based on the updated dynamic trust state of each model security block. The model trust state matrix is ​​used to record the independent dynamic trust state of each loaded model security block, and its states include at least: trusted execution state, risk observation state, local failure state, and model distrust state. In a further embodiment, the model trust state matrix also includes an unauthorized state and a loading verification state, wherein each model security block is in an unauthorized state before being loaded, and transitions from the unauthorized state to the loading verification state after the trusted loading verification is completed.

[0059] Based on the dynamic trust states of each loaded model security block in the model trust state matrix, the overall system evaluation state is determined according to preset rules, whereby the overall system evaluation state includes: Trusted Execution Evaluation Status: When all loaded model security blocks are in a trusted execution state and none of them have exceeded the maximum allowed unverified time; Risk observation assessment status: When there is at least one loaded model security block in the dynamic trust status of the risk observation status, and there is no loaded model security block in the dynamic trust status of the partial failure status or the model trust status. Local failure assessment status: When there is at least one loaded model security block in the dynamic trust state, it is a local failure state, and when there is no loaded model security block in the dynamic trust state, it is a model untrust state. Model Distrust Assessment Status: When at least one loaded model security block has a dynamic trusted status of model distrust status, or when the model master key is found to be invalid or the plaintext Merkle integrity root is tampered with.

[0060] Obtain the loaded model safety blocks that the current inference path depends on, and construct the current path-dependent block set; specifically, determine the currently active inference branch path based on the input data of the current inference task and the operator topology and data flow in the model execution graph; then, based on the execution node identifier, execution dependency relationship and weight address range in the block metadata of each model safety block, filter out the model safety blocks located on the currently active inference branch path, and construct the selected model safety blocks into the current path-dependent block set.

[0061] Determine whether the dynamic trusted state of each loaded model security block in the current path dependency block set is a trusted execution state, and whether the current unverified time of each model security block does not exceed the maximum allowed unverified time. If the judgment result is yes, and the overall system evaluation status is either a trusted execution evaluation status or a risk observation evaluation status, then the gated condition variable is determined to be a trusted output condition; otherwise, the gated condition variable is determined to be an untrusted output condition.

[0062] Based on the gated condition variables, the inference output of the AI ​​model is gated to obtain the gated output instruction: When the gating condition variable is a reliable output condition, the original inference output of the AI ​​model is determined as the gating output instruction; When the gating condition variable is an untrusted output condition, determine if there is a pre-verified security alternative strategy: If a pre-verified security alternative strategy exists, a security alternative output instruction is generated based on the security alternative strategy, and the security alternative output instruction is determined as the gating output instruction. If no pre-verified security alternative strategy exists, a blocking instruction is generated and identified as the gating output instruction. The pre-verified safety alternative strategy is a pre-configured and integrity-verified backup control strategy that does not rely on the current AI model's inference results when the AI ​​model's inference output is blocked or unreliable. It is used to reduce operational risks while ensuring the robot's basic functions, and includes, but is not limited to, at least one of the following: Basic safety strategy: Pre-configured conservative motion control strategies, such as fixed trajectory tracking, controlled deceleration, or maintaining the current posture, without relying on real-time inference from AI models; Historical trusted output reuse: Reuse secure inference outputs from the previous runtime cycle that have been verified for integrity and are still valid; Degraded operation mode: Switch the robot from high-level AI autonomous decision-making mode to low-level rule control mode or manual remote control mode; Pre-set emergency safety actions: such as emergency braking trajectory, safe position return command, or zero torque hold command.

[0063] The pre-verified security alternative strategy has undergone integrity verification and is stored in a trusted storage area before deployment to ensure that it has not been tampered with. It can be directly invoked when the gating condition variable is an untrusted output condition, serving as a security alternative to the original inference output.

[0064] The model's trusted state matrix is ​​sent to the robot safety controller via a hardware-secure communication channel independent of the main control operating system. The robot safety controller parses the overall system assessment state and executes the corresponding physical safety response based on the overall system assessment state. When the overall system evaluation status is a trusted execution evaluation status, the robot will output instructions after performing gating normally. When the overall system assessment status is risk observation assessment status, the robot's execution speed, torque, and range of motion are limited. When the overall system assessment state is a partial failure assessment state, the execution functions associated with the model safety block that is in a partial failure state are isolated, and the robot is controlled to switch to the preset basic safety strategy. When the overall system evaluation status is a model confidence failure evaluation status, the robot is triggered to shut down safely, and all memory caches and key materials in the safe processing area are safely erased, and state rollback is prohibited. When the model master key is detected to be invalid or the plaintext Merkle integrity root is tampered with, regardless of the overall system evaluation status, the robot will be directly triggered to shut down safely, and all memory caches and key materials in the secure processing area will be safely erased, and state rollback will be prohibited.

[0065] By constructing a direct mapping relationship between the model's trusted state and the robot's physical control authority, and transmitting the trusted state to the robot's safety controller via a hardware secure communication channel independent of the main control operating system, this approach solves the problem that existing technologies can only issue alarms or stop the robot after detecting model anomalies, and lack effective linkage with the robot's physical output behavior. This significantly reduces the robot's physical safety risks caused by AI model anomalies and improves the robot's operational safety in unstructured environments.

[0066] In one embodiment, a trusted execution and safety control system for AI models for robots is also disclosed, such as... Figure 2 As shown, the system includes: The security block module is used to parse the execution graph of the AI ​​model and divide the AI ​​model into multiple model security blocks. Each model security block contains the corresponding model plaintext block and block metadata. The trusted loading module is used to perform authentication encryption and integrity root construction on each model security block to obtain the model ciphertext security package; and to decrypt and verify the integrity of the model ciphertext security package to obtain the set of loaded model security blocks. The verification scheduling module is used to obtain the real-time task constraint parameters of the robot in the current running cycle and calculate the verification budget; obtain the multi-dimensional safety attribute parameters of each loaded model safety block and calculate the verification priority; and select the model safety block to be verified from the set of loaded model safety blocks based on the verification budget and verification priority to form a set of blocks to be verified. The integrity verification module is used to perform integrity verification on the set of blocks to be verified, and update the dynamic trust status of each loaded model security block based on the verification results. The output gating module is used to construct the model's trusted state matrix and determine the gating condition variables. Based on the gating condition variables and the model's trusted state matrix, it obtains the gating output command and the security response result. The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0067] All formulas in this manual are dimensionless and calculated numerically. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

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

Claims

1. A method for trusted execution and safety control of AI models for robots, characterized in that, The methods include: The execution graph of the AI ​​model is analyzed, and the AI ​​model is divided into multiple model security blocks. Each model security block contains the corresponding model plaintext block and block metadata. Authentication encryption and integrity root construction are performed on each model security block to obtain the model ciphertext security packet; Decrypt and verify the integrity of the encrypted security packet of the model to obtain a set of loaded model security blocks; Obtain the real-time task constraint parameters of the robot in the current running cycle and calculate the verification budget; obtain the multi-dimensional safety attribute parameters of each loaded model safety block and calculate the verification priority; Based on the verification budget and verification priority, select the model security blocks to be verified from the set of loaded model security blocks and form a set of blocks to be verified. Perform integrity verification on the set of blocks to be verified, and update the dynamic trust status of each loaded model security block based on the verification results; Construct the model's trusted state matrix and determine the gating condition variables. Based on the gating condition variables and the model's trusted state matrix, obtain the gating output command and security response results.

2. The method according to claim 1, characterized in that, The method to obtain the set of safe blocks of the loaded model is as follows: Obtain the model identifier and model version of the AI ​​model and combine them with the block metadata to derive an independent model block key for each model security block; perform authentication encryption based on the model block key to obtain the ciphertext block and authentication tag of each model security block; Calculate the digest of each ciphertext block and construct the ciphertext Merkle tree to obtain the ciphertext Merkle integrity root; Calculate the digest of the plaintext blocks in each model and construct the plaintext Merkle tree to obtain the plaintext Merkle integrity root; The encrypted blocks, authentication tags, encrypted Merkle integrity roots, and plaintext Merkle integrity roots are assembled into a model encrypted security packet and sent to the security processing area. Trusted loading verification is then performed. After successful verification, each model security block is stored in a preset protected area, resulting in a set of loaded model security blocks.

3. The method according to claim 2, characterized in that, The method for deriving an independent model block key for each model security block is as follows: Extract the block identifier from the block metadata. Key Era The block key for the model is derived using the following formula: in, The model block key for the k-th model security block. Derived function for key. For model identification, For model version, This is the master key for the model.

4. The method according to claim 3, characterized in that, The method for calculating the verification budget is as follows: Real-time task constraint parameters include the current task time window. Worst execution time of the current task System overhead and real-time margin ; Calculate the verification budget using the following formula: in, For the current running cycle The verification budget.

5. The method according to claim 4, characterized in that, The method for calculating the verification priority is as follows: Multidimensional security attribute parameters include basic risk level The urgency of the current situation is not yet verified. Current inference path dependency weights Block history failure frequency Dynamic weighting of robot task risks The verification priority is calculated using the following formula: in, For the first The verification priority of each loaded model security block. , , , , Each has its own preset weighting coefficient.

6. The method according to claim 5, characterized in that, The method for constructing the set of blocks to be verified is as follows: Obtain the current unverified time of each loaded model security block and assemble an overdue block set; According to the verification priority from high to low, select the loaded model security blocks from the overdue block set to form the first verification set; obtain the verification generation value of each loaded model security block in the first verification set and sum them to obtain the first total generation value; construct the overdue verification set based on the first total generation value and the verification budget. Subtract the value of the first general agent from the verification budget to obtain the remaining verification budget; According to the verification priority from high to low, the second set to be verified is selected sequentially from the set of loaded model security blocks excluding the set of expired blocks. The value of the second general agent is calculated, and a supplementary verification set is constructed based on the value of the second general agent and the remaining verification budget. The overdue verification set and the supplementary verification set are merged to obtain the block set to be verified.

7. The method according to claim 6, characterized in that, The method for updating the dynamic trusted state of each loaded model security block is as follows: Read the actual memory content of each security block of the model to be verified and calculate the actual digest value, and compare the actual digest value with the preset expected digest value; If the comparison is consistent, the verification is deemed successful, and the dynamic trusted state is updated to the trusted execution state. If the comparison is inconsistent, the re-verification is deemed to have failed. The anomaly level of the security block of the model to be verified is identified. If the anomaly level is less than the preset risk threshold, the dynamic trusted state is updated to the local failure state. If the anomaly level is greater than or equal to the preset risk threshold, the dynamic trust status will be updated to the model distrust status. For each loaded model security block in the loaded model security block set that has not been selected to the untested block set, if it belongs to the overdue block set, the dynamic trust status will be updated to the risk observation status. Otherwise, maintain the original dynamic and reliable state.

8. The method according to claim 7, characterized in that, The method for determining the gating condition variable is as follows: Based on the dynamic trusted state of each loaded model security block, the overall system evaluation state is determined according to preset rules. The overall system evaluation state includes trusted execution evaluation state, risk observation evaluation state, local failure evaluation state, and model trust failure evaluation state. Obtain the loaded model safety blocks that the current inference path depends on, and assemble the current path-dependent block set; Determine whether the dynamic trusted state of each loaded model security block in the current path dependency block set is a trusted execution state; If the judgment result is yes, and the overall system assessment status is either a trusted execution assessment status or a risk observation assessment status, then the gated condition variable is determined to be a trusted output condition; otherwise, the gated condition variable is determined to be an untrusted output condition.

9. The method according to claim 8, characterized in that, The method for outputting instructions after obtaining gating control is as follows: When the gating condition variable is a reliable output condition, the original inference output of the AI ​​model is determined as the gating output instruction; When the gated condition variable is an untrusted output condition, determine whether there is a pre-verified security alternative strategy; If it exists, a safe alternative output instruction is generated based on the safe alternative strategy, and the safe alternative output instruction is determined as the gating output instruction; If it does not exist, a blocking instruction is generated and the blocking instruction is determined as the output instruction after gating.

10. A trusted execution and safety control system for AI models for robots, comprising the method described in any one of claims 1-9, characterized in that the system include: The security block module is used to parse the execution graph of the AI ​​model and divide the AI ​​model into multiple model security blocks. Each model security block contains the corresponding model plaintext block and block metadata. The trusted loading module is used to perform authentication encryption and integrity root construction on each model security block to obtain the model ciphertext security package; Decrypt and verify the integrity of the encrypted security packet of the model to obtain a set of loaded model security blocks; The verification scheduling module is used to obtain the real-time task constraint parameters of the robot in the current running cycle, calculate the verification budget, obtain the multi-dimensional safety attribute parameters of each loaded model safety block, and calculate the verification priority. Based on the verification budget and verification priority, select the model security blocks to be verified from the set of loaded model security blocks and form a set of blocks to be verified. The integrity verification module is used to perform integrity verification on the set of blocks to be verified, and update the dynamic trust status of each loaded model security block based on the verification results. The output gating module is used to construct the model's trusted state matrix and determine the gating condition variables. Based on the gating condition variables and the model's trusted state matrix, it obtains the gating output command and security response results.