A large model data mining method and system based on confidential computing

CN122885889APending Publication Date: 2026-10-09HUIYUN ZHICE TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611128820.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0003]然而,上述现有技术在实际应用中暴露出不容忽视的安全缺陷

Benefits of technology

[0043]综上所述,本申请提供的一种基于机密计算的大模型数据挖掘方法通过构建从内存加密状态实时感知到加密模式动态切换的闭环机制,能够有效克服现有可信执行环境在面对内存总线中间人攻击时完全失明的技术缺陷。首先,基于内存访问轨迹记录数组计算写入确定性度量值与跨页密文关联熵,并结合探针页主动验证生成的攻击证明标志进行加权融合,用以实现对确定性加密安全属性衰减和物理层监听行为的运行时精准检测,从根本上解决现有方案无法感知攻击启动与演进过程的问题。其次,根据攻击置信度分数动态计算目标安全等级,并在超过阈值时将静态确定性加密切换为依赖物理地址、时间片及密钥联合计算的动态随机数加密模式,可以达到破坏攻击者构建明文-密文确定性映射链条的效果,同时避免永久性高开销保护对正常数据挖掘性能的不利影响。最后,通过对初始安全状态度量值、目标安全等级及切换后加密策略参数进行哈希扩展与硬件签名,能够生成可验证的更新安全状态度量值及远程证明报告,用以实现加密策略变更后信任链的无缝延续,确保异构加速器间的安全协同,从而为大模型数据挖掘提供一种具备攻击感知、策略自适应与信任连续性的硬件级内存安全防护方案。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885889A_ABST
    Figure CN122885889A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of big model data mining methods and systems based on confidential computing, method includes: in the trusted execution environment inside initialization memory access trajectory record array, by calculating the write certainty measure value of each physical memory page and cross-page ciphertext association entropy, obtain space-time feature set;Challenge random number is written to pre-defined memory probe page and compared with the hamming distance of benchmark ciphertext, generate attack proof mark;Weighted fusion is carried out to space-time feature set and attack proof mark, and attack confidence score is calculated;When determining that there is attack, according to target security level, certainty memory encryption mode is switched to dynamic random number dependent encryption mode;Finally, based on initial security state measure value, target security level and the parameter of encryption strategy after switching, hash extension calculation is carried out, and update security state measure value is generated and the synchronous update of remote proof is completed, to realize the runtime perception and adaptive encryption protection of man-in-the-middle attack in memory bus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer security technology and artificial intelligence technology, specifically to a method and system for mining large model data based on confidential computing. Background Technology

[0002] With the number of parameters in large language models exceeding hundreds of billions and the demand for privacy-preserving data in data mining tasks increasing daily, how to complete efficient data mining without disclosing sensitive user queries and model intellectual property has become a key challenge in the field of artificial intelligence security. To address this challenge, confidential computing solutions based on Trusted Execution Environments (TEEs) have received widespread attention in recent years. By encapsulating the large model inference process within a hardware-level isolated area of ​​the CPU or GPU, combined with runtime memory encryption and remote authentication mechanisms, model parameters and user inputs during the data mining process exist in encrypted form throughout the entire computation, thus achieving the core security goal of "data usable but invisible." Current mainstream TEE solutions, such as Intel TDX and AMD SEV-SNP, all employ deterministic AES-XTS memory encryption and have been gradually deployed in scenarios such as secure large model inference and encrypted data mining.

[0003] However, the aforementioned existing technologies have revealed significant security flaws in practical applications. For example, the TEE.Fail physical side-channel attack disclosed at the end of 2025 revealed a coupling between the inherent characteristics of deterministic encryption and the lack of integrity protection mechanisms in the DDR5 memory architecture. Attackers, by inserting low-cost hardware probes into the memory bus to capture ciphertext changes, can construct a deterministic mapping from plaintext to ciphertext, thereby recovering the private key used for remote verification within the TEE, leading to the complete collapse of the entire trust system. More seriously, such memory bus man-in-the-middle attacks are highly covert and continuously evolve during runtime. Existing TEE solutions use statically configured memory encryption modes, lacking the ability to detect real-time decay of memory encryption security attributes, and are unable to dynamically adjust encryption parameters or trigger protection upgrades when attack signs are detected. Once an attacker initiates active eavesdropping on the physical layer of the memory bus during system operation, traditional security models become completely blind, and sensitive user inputs, intermediate model results, and even large model parameters in data mining tasks face the enormous risk of being gradually recovered and stolen. Summary of the Invention

[0004] Based on this, the purpose of this invention is to provide a large-scale data mining method and system based on confidential computing that can perceive the security status of deterministic memory encryption in real time and dynamically respond to physical layer memory bus attacks.

[0005] The objective of this invention is achieved through the following solution:

[0006] In a first aspect, the present invention provides a method for mining large model data based on confidential computing, comprising the following steps:

[0007] S1: Initialize a memory access trajectory record array inside the Trusted Execution Environment (TEE), calculate the write deterministic metric value of each physical memory page and the cross-page ciphertext association entropy between each physical memory page based on the memory access trajectory record array, and obtain a set of spatiotemporal features characterizing the memory encryption state;

[0008] S2: By writing a challenge random number to a predefined memory probe page and reading the ciphertext response of the memory probe page, the ciphertext response is compared with the baseline ciphertext set using Hamming distance to generate an attack proof flag used to identify whether there is abnormal eavesdropping behavior on the memory bus.

[0009] S3: Weigh and fuse the write deterministic metric and cross-page ciphertext association entropy in the spatiotemporal feature set with the attack proof flag to calculate the attack confidence score, and compare the attack confidence score with the preset attack judgment threshold to obtain the attack detection judgment result.

[0010] S4: Calculate the target security level based on the attack detection judgment result and the preset current security level. When the target security level exceeds the preset level threshold, send an encryption mode switching instruction to the memory controller to switch the deterministic memory encryption mode to the dynamic random number dependent encryption mode and generate the set of encryption policy parameters after the switch.

[0011] S5: Based on the deterministic metric value of the spatiotemporal feature set, the target security level, and the set of encryption policy parameters after the switch, perform hash expansion calculation to generate an updated security state metric value. Use the TEE hardware key to sign the updated security state metric value to generate an updated remote proof report. Send the updated remote proof report to the remote verifier to complete the trust state synchronization. Update the current security level according to the updated security state metric value.

[0012] In one embodiment, S1 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0013] S11: Within the Trusted Execution Environment (TEE), allocate a fixed-length circular buffer as a memory access trajectory record array for each physical memory page, and initialize each circular buffer with an empty cursor to generate a blank trajectory record array instance.

[0014] S12: Based on the trajectory recording array instance, according to the preset acquisition window length, read the written encrypted data and corresponding write timestamps recorded in each physical memory page within the window duration, filter the repeated occurrence patterns in the written encrypted data of each physical memory page, and generate the original write record sequence of the physical page.

[0015] S13: Perform sliding window scanning on the original write record sequence, calculate the probability of repeated occurrence of ciphertext values ​​at the same physical page address within each window and their joint distribution statistics, and generate a write deterministic metric for physical memory pages; at the same time, calculate the conditional probability distribution of ciphertext values ​​between different physical pages and their mutual information, and generate cross-page ciphertext association entropy; combine the write deterministic metric and the cross-page ciphertext association entropy into the same feature vector structure to generate a spatiotemporal feature set representing the memory encryption state.

[0016] In one embodiment, S2 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0017] S21: Inside the Trusted Execution Environment (TEE), a set of random number vectors is extracted from the hardware random number generator. Each element in the random number vector is written sequentially to a fixed offset address of each predefined memory probe page to generate a probe page challenge filling record.

[0018] S22: Based on the probe page challenge filling record, read back the ciphertext value presented after writing from the same fixed offset address of each memory probe page, calculate the bit-by-bit Hamming distance between the read-back ciphertext value and the benchmark ciphertext set extracted from the spatiotemporal feature set, and select the ciphertext deviation degree of each physical page that meets the preset deviation range based on the Hamming distance, and generate the ciphertext deviation distance score of each memory probe page.

[0019] S23: Perform weighted aggregation processing on the encrypted deviation distance scores of each memory probe page, and determine the anomalies of the encrypted deviation distance scores of each probe page according to the preset deviation tolerance threshold. Mark the memory probe pages with scores lower than the preset deviation tolerance threshold as abnormal, and mark the memory probe pages with scores higher than the threshold as normal. Summarize the location coordinates and abnormal score values ​​of all abnormal probe pages into an abnormal location package, and generate an attack proof flag to identify whether there is abnormal listening behavior on the memory bus.

[0020] In one embodiment, S3 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0021] S31: Based on the spatiotemporal feature set and attack proof flags, the three dimensions of detection indicators are weighted and configured: the deviation between the write deterministic metric and the normal deterministic baseline, the difference between the cross-page ciphertext association entropy and the normal statistical baseline, and the abnormal marking of the attack proof flag. The weighted values ​​of each dimension indicator are summed to generate an attack confidence score.

[0022] S32: Compare the attack confidence score with the preset attack judgment threshold. If the attack confidence score is greater than the preset attack judgment threshold, the current detection result is judged as a memory bus man-in-the-middle attack and a truth value attack detection judgment result is generated. Otherwise, the current detection result is judged as no attack and a false value attack detection judgment result is generated.

[0023] In one embodiment, the formula for calculating the attack confidence score of a large model data mining method based on confidential computing provided by the present invention is as follows:

[0024]

[0025] in, For attack confidence score, , , For preset weighting coefficients and satisfying , where n is the total number of physical memory pages. This is the write determinism metric for the i-th physical page. For cross-page ciphertext association entropy, This represents the statistical mean of the cross-page ciphertext association entropy under normal conditions. The standard deviation of the cross-page ciphertext association entropy under normal conditions. This represents the duration of the current attack detection period. The length of the baseline monitoring period. The time decay coefficient, This represents the number of probe pages that were marked as abnormal. This represents the total number of probe pages.

[0026] In one embodiment, S4 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0027] S41: Based on the attack detection judgment result and the preset current security level, if the attack detection judgment result is true, then according to the extent by which the attack confidence score exceeds the preset attack judgment threshold, combined with the preset level improvement step size and the preset maximum security level constraint, calculate the security level level to be improved and generate the target security level.

[0028] S42: Based on the target security level, determine the relationship between the target security level and the preset security level threshold. If the target security level does not exceed the preset security level threshold, keep the configuration parameters of the current AES-XTS deterministic memory encryption mode unchanged. If the target security level exceeds the preset security level threshold, send a security mode switching instruction to the memory controller, expand the calculation formula of the encryption tweak from relying solely on the physical address to relying on the physical address, the current time slice slot, and the nonce derived key for joint calculation, and output the expanded encryption parameter pair, which includes the time slice slot length and the nonce derived key.

[0029] S43: Based on the extended encryption parameter pair, the time slice slot length and nonce derived key are added as new encryption configuration fields to replace the original static tweak configuration parameters in the memory encryption control block, generating the set of encryption policy parameters after the switch.

[0030] In one embodiment, S5 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0031] S51: The deterministic metric value of the spatiotemporal feature set is used as the basic hash input block for the hash expansion operation, the target security level is used as the first concatenated expansion field, and the set of encryption policy parameters after switching is serialized into a linear byte string and used as the second concatenated expansion field. The basic hash input block, the first concatenated expansion field and the second concatenated expansion field are concatenated to form the expansion input message sequence.

[0032] S52: Call the SHA-256 hash compression function to perform one-way mapping calculation on the extended input message sequence, compress the input message sequence into a fixed-length digest value, and use the fixed-length digest value as a new platform configuration register metric value to generate an updated security state metric value;

[0033] S53: Based on the updated security state metric, the hardware fusion key of the Trusted Execution Environment (TEE) is used to perform asymmetric signing on the updated security state metric. The signed updated security state metric, together with the identifier of the switching operation type, is encapsulated into a proof report data packet to generate an updated remote proof report.

[0034] S54: Send the updated remote proof report to the remote verifier, who verifies the validity of the signature and the consistency of the metric with the expected policy rules. After the verification is successful, trigger the security state register update operation in the Trusted Execution Environment (TEE), write the updated security state metric into the current security level parameter, and update the current security level based on the updated security state metric.

[0035] Secondly, this invention provides a large-scale model data mining system based on confidential computing, which is configured with the following modules:

[0036] The memory spatiotemporal feature extraction module is used to initialize a memory access trajectory record array inside the Trusted Execution Environment (TEE), calculate the write deterministic metric value of each physical memory page and the cross-page ciphertext association entropy between each physical memory page based on the memory access trajectory record array, and obtain a set of spatiotemporal features characterizing the memory encryption state.

[0037] The bus eavesdropping behavior detection module is used to write challenge random numbers to predefined memory probe pages and read the ciphertext response of the memory probe pages. The ciphertext response is compared with the Hamming distance of the benchmark ciphertext set to generate an attack proof flag to identify whether there is abnormal eavesdropping behavior on the memory bus.

[0038] The attack confidence determination module is used to perform weighted fusion of the write deterministic metric and cross-page ciphertext association entropy in the spatiotemporal feature set with the attack proof flag, calculate the attack confidence score, and compare the attack confidence score with the preset attack determination threshold to obtain the attack detection determination result.

[0039] The encryption mode dynamic switching module is used to calculate the target security level based on the attack detection judgment result and the preset current security level. When the target security level exceeds the preset level threshold, it sends an encryption mode switching instruction to the memory controller to switch the deterministic memory encryption mode to the dynamic random number dependent encryption mode and generate the set of encryption policy parameters after the switch.

[0040] The remote proof state synchronization module is used to perform hash expansion calculations based on the deterministic metric value of the spatiotemporal feature set, the target security level, and the set of encryption policy parameters after the switch, generate an updated security state metric value, sign the updated security state metric value using the TEE hardware key to generate an updated remote proof report, and send the updated remote proof report to the remote verifier to complete the trust state synchronization, and update the current security level according to the updated security state metric value.

[0041] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above-mentioned methods for large model data mining based on confidential computing.

[0042] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for large model data mining based on confidential computing.

[0043] In summary, the large-scale data mining method based on confidential computing provided in this application effectively overcomes the technical deficiency of existing trusted execution environments being completely blind to man-in-the-middle attacks on the memory bus by constructing a closed-loop mechanism that detects the memory encryption state in real time and dynamically switches encryption modes. First, it calculates the write deterministic metric and cross-page ciphertext association entropy based on the memory access trajectory record array, and performs a weighted fusion with the attack proof flag generated by the probe page's active verification. This enables accurate runtime detection of deterministic encryption security attribute decay and physical layer eavesdropping behavior, fundamentally solving the problem that existing solutions cannot detect the attack initiation and evolution process. Second, it dynamically calculates the target security level based on the attack confidence score, and switches the static deterministic encryption to a dynamic random number encryption mode that relies on the joint calculation of physical address, time slice, and key when the threshold is exceeded. This disrupts the attacker's plaintext-ciphertext deterministic mapping chain while avoiding the adverse effects of permanent high-overhead protection on normal data mining performance. Finally, by hashing and hardware signing the initial security state metric, target security level, and encryption policy parameters after the switch, verifiable updated security state metric and remote proof report can be generated to achieve seamless continuation of the trust chain after the encryption policy change, ensuring secure collaboration between heterogeneous accelerators. This provides a hardware-level memory security protection solution for large model data mining with attack awareness, policy adaptation, and trust continuity.

[0044] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

[0045] Figure 1 A flowchart illustrating a large-model data mining method based on confidential computing, provided for an embodiment of this application;

[0046] Figure 2 This is a schematic diagram of the structure of a large model data mining system based on confidential computing, provided as another embodiment of this application. Detailed Implementation

[0047] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0049] In one embodiment, such as Figure 1 As shown, a large-scale model data mining method based on confidential computing is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0050] S1: Initialize a memory access trajectory record array inside the Trusted Execution Environment (TEE), calculate the write deterministic metric value of each physical memory page and the cross-page ciphertext association entropy between each physical memory page based on the memory access trajectory record array, and obtain a set of spatiotemporal features characterizing the memory encryption state.

[0051] Specifically, after the large-scale model dense-state data mining task is started and the TEE completes hardware initialization and remote initial verification, the memory access trajectory recording array is initialized and configured within the isolated memory space of the trusted execution environment. This process avoids read / write intervention from untrusted operating systems and upper-layer applications, ensuring the confidentiality and integrity of the data acquisition. The memory access trajectory recording array is a structured multidimensional array specifically used for real-time acquisition and storage of raw runtime data such as read / write timing, write frequency, ciphertext change magnitude, and inter-page access relationships of each physical memory page during large-scale model inference and data mining. The array storage area is independently divided within the TEE encrypted memory region and is protected throughout the process using a runtime memory encryption mechanism to prevent plaintext data leakage.

[0052] Based on the initialized memory access trajectory record array, the system performs traversal statistics and quantitative calculations on all memory pages of the system's DDR5 physical memory. It calculates the write determinism metric for each independent physical memory page and the cross-page ciphertext association entropy between any two physical memory pages. The write determinism metric quantifies the degree of fixed mapping between a single memory page write operation and the ciphertext output in traditional AES-XTS deterministic encryption mode. A higher metric value indicates stronger determinism in the memory page encryption mapping, but also a higher risk of being monitored by memory bus probes and having the plaintext-ciphertext mapping restored. The cross-page ciphertext association entropy characterizes the randomness of ciphertext changes between different physical memory pages. A lower association entropy value indicates stronger regularity in ciphertext changes between pages, making it easier for attackers to crack the encryption logic through bus side-channel data analysis. The system summarizes and integrates the calculated write determinism metrics for all physical memory pages and the cross-page ciphertext association entropies corresponding to all pairwise combinations of memory pages to construct a spatiotemporal feature set that comprehensively characterizes the current memory encryption security status. This set includes spatial dimension page-level deterministic features and temporal dimension access trajectory association features of memory encryption.

[0053] S2: By writing a challenge random number to a predefined memory probe page and reading the ciphertext response of the memory probe page, the ciphertext response is compared with the baseline ciphertext set using Hamming distance to generate an attack proof flag used to identify whether there is abnormal eavesdropping behavior on the memory bus.

[0054] Specifically, based on the memory resource configuration rules of the trusted execution environment, the system divides independent memory probe resource areas and sets up several memory probe pages. These memory probe pages do not participate in the data storage and computation tasks of large-scale model data mining; they are only used to execute the memory bus's operational status detection process. Data read and write operations on the probe pages have independent hardware permissions. Following preset detection timing rules, the system continuously writes challenge random numbers generated through a hardware true random number mechanism to each memory probe page. After completing the data writing operation, it immediately reads the encrypted response data fed back from the memory bus transmission link, completely capturing the encrypted execution results formed during data transmission.

[0055] Furthermore, the system pre-stores a baseline ciphertext set in a secure, fixed storage area within the trusted execution environment. This baseline ciphertext set consists of standard ciphertext data under normal transmission conditions, serving as a standard for data comparison during normal operation. The system retrieves the real-time acquired ciphertext response data and the corresponding data within the baseline ciphertext set, performing a bit-by-bit comparison using Hamming distance calculations to quantify the degree of difference between the two sets of data. Based on the calculation results of the data difference degree, the system determines whether external eavesdropping occurs on the memory bus link. Based on the determination result, a corresponding attack proof flag is generated, and the flag status objectively identifies the real-time operational security status of the memory bus transmission link.

[0056] S3: The write deterministic metric and cross-page ciphertext association entropy in the spatiotemporal feature set are weighted and fused with the attack proof flag to calculate the attack confidence score. The attack confidence score is then compared with the preset attack judgment threshold to obtain the attack detection judgment result.

[0057] Specifically, the system retrieves the write deterministic metric value and cross-page ciphertext association entropy collected within the spatiotemporal feature set, and simultaneously retrieves the currently generated attack proof flag. This completes the normalization preprocessing operation for the three types of security data, eliminating dimensional differences between different dimensions and ensuring that multi-source data can participate in unified computation. Based on preset weight allocation rules and the ability of different data dimensions to represent abnormal attack behavior, the system configures corresponding fixed weight parameters for each dimension. These weight parameters are iteratively generated based on the attack and defense characteristics of the confidential computing environment, adapting to the detection and analysis requirements of memory bus attacks. The system couples the normalized data of each dimension with the corresponding weight parameters, integrating multi-dimensional security features through a weighted fusion calculation method, and outputs an attack confidence score representing the attack risk level of the current environment. The system retrieves locally fixed attack judgment threshold rules, matches and compares the real-time calculated attack confidence score with the threshold rules, classifies the risk level of the current environment based on the matching results, and outputs standardized attack detection and judgment results. The entire computation process is completed automatically by the system. By using multi-dimensional data fusion, it avoids the judgment bias of a single detection dimension, improves the stability and accuracy of physical layer abnormal attack behavior identification, and achieves objective quantitative judgment of memory encryption security risks.

[0058] S4: Calculate the target security level based on the attack detection judgment result and the preset current security level. When the target security level exceeds the preset level threshold, send an encryption mode switching instruction to the memory controller to switch the deterministic memory encryption mode to the dynamic random number dependent encryption mode and generate the set of encryption policy parameters after the switch.

[0059] Specifically, the system pre-stores hierarchical security level operation rules, with each security level corresponding to different strengths of memory encryption operation strategies and security protection mechanisms. The system defaults to loading the encryption operation mode corresponding to the basic security level. The system retrieves real-time generated attack detection and judgment results, combines them with the device's current operating security level parameters, and calculates the target security level adapted to the current risk scenario through a security level iterative calculation mechanism, achieving dynamic matching between the security level and the environmental risk state. The system retrieves preset level threshold judgment rules to verify the level hierarchy of the target security level. If the target security level meets the switching conditions, the system sends a standardized mode switching command to the hardware memory controller, terminating the device's current deterministic memory encryption mode and starting a dynamic random number dependent encryption mode to complete the memory encryption operation. The dynamic random number dependent encryption mode breaks the fixed plaintext-ciphertext mapping relationship by introducing a random perturbation mechanism, adapting to the protection requirements of physical layer eavesdropping attacks. After the encryption mode switch is completed, the system automatically iteratively updates various core parameters of encryption operation according to the operating requirements of the target security level, integrating all updated parameters to form a complete set of encryption strategy parameters, ensuring that the encryption operation mechanism is adapted to the current security protection requirements. If the target security level does not meet the switching conditions, the system will maintain the current encryption mode and security level to ensure the efficiency of routine data mining tasks.

[0060] S5: Based on the deterministic metric value of the spatiotemporal feature set, the target security level, and the set of encryption policy parameters after the switch, perform hash expansion calculation to generate an updated security state metric value. Use the TEE hardware key to sign the updated security state metric value to generate an updated remote proof report. Send the updated remote proof report to the remote verifier to complete the trust state synchronization. Update the current security level according to the updated security state metric value.

[0061] Specifically, the system retrieves the deterministic metric value recorded in the spatiotemporal feature set, the target security level parameters completed in the current iteration, and the encryption strategy parameter set generated after mode switching. These three core security parameters are structurally concatenated, and a multi-parameter fusion hash calculation is performed through a hash expansion operation mechanism to generate an updated security state metric value that is unique and tamper-proof. This metric value objectively represents the overall security operation status of the device. The system calls the hardware security key built into the Trusted Execution Environment (TEE). This hardware key is embedded within the hardware security architecture and can only be accessed through authorized instructions within the TEE. The system performs a digital signature operation on the updated security state metric value using the hardware key, generating a remote proof report with integrity and authenticity verification validity. This replaces the traditional fixed-key signature mechanism, avoiding trust system failure caused by key leakage. The system pushes the remote proof report to the remote verifier via an encrypted transmission link, completing real-time synchronization between the security status of the local confidential computing environment and the remote verification system, ensuring the effectiveness of remote trust authentication. Based on the security operation standards corresponding to the updated security status metric, the system iteratively updates the current security level configuration of the equipment, completes the closed-loop operation process of single risk detection, strategy adjustment, and status synchronization, and continuously maintains the safe and stable operation of the dense computing environment during the large model data mining process.

[0062] In summary, the large-scale data mining method based on confidential computing provided in this application effectively overcomes the technical deficiency of existing trusted execution environments being completely blind to man-in-the-middle attacks on the memory bus by constructing a closed-loop mechanism that detects the memory encryption state in real time and dynamically switches encryption modes. First, it calculates the write deterministic metric and cross-page ciphertext association entropy based on the memory access trajectory record array, and performs a weighted fusion with the attack proof flag generated by the probe page's active verification. This enables accurate runtime detection of deterministic encryption security attribute decay and physical layer eavesdropping behavior, fundamentally solving the problem that existing solutions cannot detect the attack initiation and evolution process. Second, it dynamically calculates the target security level based on the attack confidence score, and switches the static deterministic encryption to a dynamic random number encryption mode that relies on the joint calculation of physical address, time slice, and key when the threshold is exceeded. This disrupts the attacker's plaintext-ciphertext deterministic mapping chain while avoiding the adverse effects of permanent high-overhead protection on normal data mining performance. Finally, by hashing and hardware signing the initial security state metric, target security level, and encryption policy parameters after the switch, verifiable updated security state metric and remote proof report can be generated to achieve seamless continuation of the trust chain after the encryption policy change, ensuring secure collaboration between heterogeneous accelerators. This provides a hardware-level memory security protection solution for large model data mining with attack awareness, policy adaptation, and trust continuity.

[0063] In one embodiment, S1 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0064] S11: Within the Trusted Execution Environment (TEE), allocate a fixed-length circular buffer as a memory access trajectory record array for each physical memory page, and initialize each circular buffer with an empty cursor to generate a blank trajectory record array instance.

[0065] Specifically, the system performs memory data structure configuration operations within the hardware-isolated runtime space of the trusted execution environment. The system allocates storage resources to each physical memory page within the monitoring coverage area, and independently configures a fixed-length circular buffer for each physical memory page. All configured circular buffers collectively form a memory access trajectory record array. The system establishes a unique mapping relationship between physical memory pages and circular buffers. The runtime data of a single physical memory page is stored only within its dedicated circular buffer. The buffer data corresponding to different physical memory pages are independent of each other, with no data overlap or read / write interference. The system performs a global initialization operation on all circular buffers, resetting the write cursor state of all buffers. After initialization, all write cursors are in an empty state, with no historical offset positions or data record identifiers retained.

[0066] After completing the initialization process, the system generates a complete array instance of blank trajectory records. The system defines the valid data storage range of the buffer using a specific calculation formula, unifying data entry rules. The corresponding calculation formula is:

[0067]

[0068] In the parameters of the formula, This represents the effective storage range of the circular buffer. This represents the fixed configuration length of the circular buffer. This represents the current offset position of the cursor written to the buffer. Based on this operational logic, the system standardizes the storage format and addressing method of all memory page trajectory data, regulates the recording carrier form of memory read / write behavior during large-scale model data mining, and provides a unified structured data foundation for time-series data acquisition, data filtering, and feature quantization operations, ensuring the orderliness and consistency of the full memory trajectory data acquisition process.

[0069] S12: Based on the trajectory recording array instance, according to the preset acquisition window length, read the encrypted data of each physical memory page recorded within the window duration and the corresponding write timestamp, filter the repeated occurrence patterns in the encrypted data of each physical memory page, and generate the original write record sequence of the physical page.

[0070] Specifically, the system retrieves an array of blank trajectory records as the data acquisition carrier. The system defines the data acquisition interval according to a preset acquisition window duration parameter. The system traverses the circular buffers corresponding to all physical memory pages, batch-reading all written encrypted data generated by each physical memory page within a single acquisition window duration, while simultaneously reading the write timestamp information corresponding to each piece of encrypted data. The system aggregates the encrypted data and timestamp-related data of the same physical memory page within a single window, forming a single-page time-series dataset. The system performs pattern filtering operations on the time-series datasets of each physical memory page. The system matches the repeated encrypted data combination structure in the time-series data, retains continuous data sequences with repetitive characteristics, and removes invalid data units that appear only once, generating the original write record sequence corresponding to each physical memory page one by one. The system completes the accurate determination of repetitive patterns through an original time-series filtering formula. The corresponding calculation formula is:

[0071]

[0072] In the parameters of the formula, The value represents the data repetition pattern identifier, and W represents the preset data acquisition window range. The table contains the encrypted data of the current time-series node. The encrypted data represents historical time-series nodes, and δ represents the data matching discrimination function. The system filters and purifies the original data based on the formula calculation results, retaining valid time-series data that reflects the memory encryption write pattern, and eliminating the interference of random invalid data on statistical calculations, thus providing accurate raw data support for the calculation of deterministic metrics and correlation entropy.

[0073] S13: Perform sliding window scanning on the original write record sequence, calculate the probability of repeated occurrence of ciphertext values ​​at the same physical page address within each window and their joint distribution statistics, and generate a write deterministic metric for physical memory pages; at the same time, calculate the conditional probability distribution of ciphertext values ​​between different physical pages and their mutual information, and generate cross-page ciphertext association entropy; combine the write deterministic metric and the cross-page ciphertext association entropy into the same feature vector structure to generate a spatiotemporal feature set representing the memory encryption state.

[0074] Specifically, the system retrieves the original write record sequences corresponding to each physical memory page. The system performs a full-domain sliding window scan on all sequences, iteratively traversing the ciphertext data within each sliding window. It calculates the probability of repeated occurrences of ciphertext data corresponding to the same physical page address within a single window, and combines the multi-window statistical results to calculate the joint distribution statistic of the ciphertext data distribution. By integrating these two types of statistical indicators, it generates the write determinism metric for the corresponding physical memory page. Simultaneously, the system extracts time-series ciphertext data from different physical memory pages, calculates the conditional probability distribution of cross-page ciphertext data, and solves for the mutual information between page data based on the distribution results. The integrated calculation results yield the cross-page ciphertext association entropy between each pair of physical memory pages. The system uses two sets of original quantization formulas to complete the standardization calculations of the corresponding indicators. The formulas for calculating the write determinism metric and the cross-page ciphertext association entropy are as follows:

[0075]

[0076]

[0077] in, This represents writing a deterministic metric. This represents the probability of ciphertext being repeated. Represents the joint distribution statistic. and Represents a fixed weighting coefficient; Represents the entropy of cross-page ciphertext association. This represents the amount of information exchanged between pages. Represents the conditional probability distribution value. and Represents a fixed weight coefficient. The system collects the write deterministic metric values ​​of all physical pages and the cross-page ciphertext association entropy between all pages, encapsulates them uniformly within a standardized feature vector structure, and integrates them to form a complete set of spatiotemporal features of the memory encryption state.

[0078] In one embodiment, S2 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0079] S21: Inside the Trusted Execution Environment (TEE), a set of random number vectors is extracted from the hardware random number generator. Each element in the random number vector is written sequentially to a fixed offset address of each predefined memory probe page to generate a probe page challenge filling record.

[0080] Specifically, after the system completes the initialization configuration of the internal security detection process of the trusted execution environment, it calls the hardware random number generator to perform random data extraction. The hardware random number generator generates irregular random data based on the hardware physical entropy source. The system extracts a fixed-dimensional random number vector from the generated random data. The random number vector consists of multiple independent data elements, each with independent attributes. The system retrieves a preset list of memory probe page resources and determines the fixed offset write address corresponding to all memory probe pages that have completed the predefined configuration. The fixed offset address is a dedicated detection storage location within the probe page, used only to carry challenge detection data and not involved in regular memory read / write operations.

[0081] Furthermore, the system iterates through all data elements contained in the random number vector, writing each individual data element sequentially to a fixed offset address of each memory probe page according to their corresponding order. After completing the write operation for all data elements, the system collects the probe page address information, written data information, and write timing information corresponding to this write operation, integrates them to generate a complete probe page challenge filling record, and stores it in the secure storage area of ​​the trusted execution environment. The system performs random number write validity verification using a dedicated formula, the corresponding calculation formula being:

[0082]

[0083] In the parameters of the formula, This represents the valid validation value for the fill operation in this challenge. This represents the i-th data element contained in the random number vector. This represents the fixed offset address corresponding to the i-th memory probe page, H represents the address and data matching verification function, and n represents the total number of data elements in the random number vector. This formula is used to standardize the write verification process of challenge data, ensuring the standardization and traceability of each probe page data filling operation.

[0084] S22: Based on the probe page challenge filling record, read back the ciphertext value presented after writing from the same fixed offset address of each memory probe page, calculate the bit-by-bit Hamming distance between the read-back ciphertext value and the benchmark ciphertext set extracted from the spatiotemporal feature set, and select the ciphertext deviation degree of each physical page that meets the preset deviation range based on the Hamming distance, and generate the ciphertext deviation distance score of each memory probe page.

[0085] Specifically, the system retrieves probe page challenge filling records from local storage. Based on the address mapping relationships recorded in the records, it locates the fixed offset address corresponding to each memory probe page and performs a ciphertext data readback operation. The system collects the real-time ciphertext values ​​generated at each fixed offset address after data writing is completed, and aggregates all real-time ciphertext values ​​to form a probe page real-time ciphertext dataset. The system retrieves the previously constructed spatiotemporal feature set of memory encryption states and extracts a standardized baseline ciphertext set from within the set. The baseline ciphertext set corresponds to the standard ciphertext data of each probe page under a scenario without abnormal transmission. The system performs a bit-by-bit comparison operation between the real-time ciphertext dataset and the corresponding data within the baseline ciphertext set, quantifies the degree of bit difference between the two sets of data using the Hamming distance algorithm, and obtains the initial distance calculation result corresponding to each memory probe page.

[0086] Furthermore, the system filters the initial calculation results based on preset deviation range rules, retaining valid calculation data that meets the judgment criteria and eliminating invalid interference data. The system completes the quantitative rating of the degree of ciphertext deviation through a dedicated scoring formula, the corresponding calculation formula being:

[0087]

[0088] In the parameters of the formula, The ciphertext deviation distance score represents the single probe page. The result of the Hamming distance calculation representing the real-time ciphertext and the reference ciphertext. The fixed bit length representing the ciphertext data is used by the system to convert the degree of bit difference into a standardized scoring index, thereby achieving a unified quantification of the degree of ciphertext anomaly across different probe pages.

[0089] S23: Perform weighted aggregation processing on the encrypted deviation distance scores of each memory probe page, and determine the anomalies of the encrypted deviation distance scores of each probe page according to the preset deviation tolerance threshold. Mark the memory probe pages with scores lower than the preset deviation tolerance threshold as abnormal, and mark the memory probe pages with scores higher than the threshold as normal. Summarize the location coordinates and abnormal score values ​​of all abnormal probe pages into an abnormal location package, and generate an attack proof flag to identify whether there is abnormal listening behavior on the memory bus.

[0090] Specifically, the system collects the encrypted deviation distance scores corresponding to all memory probe pages, initiates the multi-probe data aggregation operation process, and assigns corresponding aggregation weights to memory probe pages at different locations according to preset weight configuration rules. The weight configuration is tailored to the anomaly detection sensitivity at different transmission locations on the memory bus. The system performs coupled operations on the scores of each probe page and their corresponding weights to complete the weighted aggregation processing of all score data, obtaining the overall deviation aggregation result of this detection process. The system retrieves the locally fixed deviation tolerance threshold and compares the independent encrypted deviation distance score of each probe page with the threshold one by one. Memory probe pages whose scores do not reach the deviation tolerance threshold are marked as abnormal, while memory probe pages whose scores reach or exceed the deviation tolerance threshold are marked as normal.

[0091] The system collects all memory probe pages in an abnormal state, gathers their spatial coordinates and corresponding anomaly scores, encapsulates the data according to a standardized data structure, and generates an anomaly location package containing information on the anomaly location and its severity. The system then uses a proprietary formula to perform the final verification of the attack behavior. The corresponding formula is as follows:

[0092]

[0093] In the parameters of the formula, This represents the final generated attack proof flag. This represents the corresponding score for the anomaly probe page. The aggregate weight represents the number of abnormal probe pages, and m represents the total number of abnormal probe pages. This represents the anomaly detection activation function. The system relies on this formula to integrate and determine anomaly data from multiple sources, and finally generates an attack proof flag that can identify the state of memory bus eavesdropping behavior.

[0094] In one embodiment, S3 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0095] S31: Based on the spatiotemporal feature set and attack proof flags, weighted coefficients are configured for three dimensions of detection indicators: the deviation between the written deterministic metric and the normal deterministic baseline, the difference between the cross-page ciphertext association entropy and the normal statistical baseline, and the abnormal marking of the attack proof flag. The weighted values ​​of each dimension indicator are summed to generate an attack confidence score.

[0096] Specifically, after completing the memory spatiotemporal feature extraction and probe page anomaly marking process, the system retrieves the memory encryption state spatiotemporal feature set and the finally generated attack proof flag, establishing three core detection indicators for attack state assessment. The system performs difference calculations between the write deterministic metric and a preset deterministic baseline under normal device operation, quantifying the overall deviation level of memory page write features. The system performs difference calculations between the cross-page ciphertext association entropy and a preset statistical baseline under normal device operation, quantifying the fluctuation level of inter-page ciphertext association features. The system synchronously reads the global anomaly marking information corresponding to the attack proof flag and statistically analyzes the probe page anomaly distribution. The system configures corresponding fixed weighting coefficients for each of the three detection indicators, and the sum of all weighting coefficients remains a fixed constant, achieving balanced constraint control of multi-dimensional indicators. The system completes unified calculation of multi-indicator data through a preset fusion calculation formula to obtain a standardized attack confidence score. The calculation formula for the attack confidence score is:

[0097]

[0098] in, For attack confidence score, , , For preset weighting coefficients and satisfying , where n is the total number of physical memory pages. This is the write determinism metric for the i-th physical page. For cross-page ciphertext association entropy, This represents the statistical mean of the cross-page ciphertext association entropy under normal conditions. The standard deviation of the cross-page ciphertext association entropy under normal conditions. This represents the duration of the current attack detection period. The length of the baseline monitoring period. The time decay coefficient, The number of probe pages marked as abnormal. This represents the total number of probe pages. The system uses this formula to perform a weighted summation of three types of data: single-page feature deviation, cross-page entropy fluctuation, and probe anomaly percentage, outputting a numerical result that objectively quantifies the degree of memory bus attack risk.

[0099] S32: Compare the attack confidence score with the preset attack judgment threshold. If the attack confidence score is greater than the preset attack judgment threshold, the current detection result is judged as a memory bus man-in-the-middle attack and a truth value attack detection judgment result is generated. Otherwise, the current detection result is judged as no attack and a false value attack detection judgment result is generated.

[0100] Specifically, after quantifying the attack confidence score, the system retrieves the preset attack judgment threshold stored internally within the trusted execution environment and initiates the numerical comparison and judgment process. The preset attack judgment threshold is a fixed judgment standard established based on the security operation rules of the confidential computing environment, used to distinguish between the normal operating state and the abnormal operating state of the memory bus under attack. The system performs a full-domain numerical comparison between the real-time generated attack confidence score and the preset attack judgment threshold, establishing a binary attack state judgment logic. If the attack confidence score is greater than the preset attack judgment threshold, the system determines that a man-in-the-middle attack exists on the current memory bus and simultaneously generates a truth-based attack detection judgment result. This result is used to characterize the confidential computing environment as being at risk of attack.

[0101] Furthermore, when the attack confidence score is less than or equal to a preset attack judgment threshold, the system determines that there is no man-in-the-middle eavesdropping attack on the current memory bus and simultaneously generates a false attack detection judgment result. This result is used to characterize that the confidential computing environment is in a secure operating state. After completing a single judgment process, the system correlates and stores the attack confidence value, threshold comparison relationship, and final judgment result to form time-series attack detection log data. The log data is used to support subsequent security level iterations, encryption mode switching, and remote proof status update processes, ensuring the linkage and traceability of the overall security protection mechanism, realizing automated, quantitative, and accurate judgment of physical layer attacks on the memory bus, avoiding the judgment bias problem caused by single feature detection, and improving the dynamic security detection capability of large-model dense data mining environments.

[0102] In one embodiment, S4 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0103] S41: Based on the attack detection judgment result and the preset current security level, if the attack detection judgment result is true, then according to the extent by which the attack confidence score exceeds the preset attack judgment threshold, combined with the preset level improvement step size and the preset maximum security level constraint, calculate the security level to be improved and generate the target security level.

[0104] Specifically, the system retrieves the attack detection and judgment results from local storage and the current security level parameters of the device, and performs quantitative calculation of the target security level based on preset security level iteration rules. The system identifies and matches the state of the attack detection and judgment results. When the judgment result is a true value indicating the existence of an attack, the system reads the real-time attack confidence score and the preset attack judgment threshold, and calculates the extent to which the attack confidence score exceeds the attack judgment threshold. This value objectively reflects the risk intensity level of the memory bus attack. The system retrieves the pre-stored security level improvement step size parameters and the highest security level constraint conditions. Based on the current security level, it matches the corresponding level improvement range with the risk exceedance range, and simultaneously performs upper limit verification on the iteration results through the highest security level constraint to avoid exceeding the security level configuration limits. The system completes standardized calculations using a dedicated security level iteration formula. The corresponding calculation formula is:

[0105]

[0106] In the formula, This represents the final target security level. This represents the current security level of the system. This represents the step size for increasing the preset security level. This represents the real-time attack confidence score. This represents the preset attack detection threshold. This represents the level constraint correction coefficient. The system performs level calibration based on the formula calculation results, directly defining the calculation results that do not exceed the maximum security level constraint as the target security level, and calibrating the calculation results that exceed the maximum security level constraint to the preset maximum security level, thereby generating a standardized target security level adapted to the current attack risk scenario.

[0107] S42: Based on the target security level, determine the relationship between the target security level and the preset security level threshold. If the target security level does not exceed the preset security level threshold, keep the configuration parameters of the current AES-XTS deterministic memory encryption mode unchanged. If the target security level exceeds the preset security level threshold, send a security mode switching instruction to the memory controller, expand the calculation formula of the encryption tweak from relying solely on the physical address to relying on the physical address, the current time slice slot, and the nonce derived key for joint calculation, and output the expanded encryption parameter pair, which includes the time slice slot length and the nonce derived key.

[0108] Specifically, after the system calculates and generates the target security level, it retrieves the system's preset level threshold, performs a numerical comparison of the two types of level parameters, and executes differentiated memory encryption mode configuration logic based on the comparison results. If the target security level does not reach the preset level threshold, the system maintains the current AES-XTS deterministic memory encryption mode, retains all static configuration parameters within the memory encryption control block, and continues to use fixed rules to calculate and generate encryption perturbation variables, ensuring the efficiency of encryption operations and the stability of system operation in typical data mining scenarios. If the target security level reaches or exceeds the preset level threshold, the system triggers an encryption mode switching mechanism, sends a standardized security mode switching command to the hardware memory controller, and iteratively updates the traditional encryption perturbation variable calculation logic.

[0109] Furthermore, the system expands the calculation basis of the encryption perturbation variable in multiple dimensions, abandoning the calculation method that relies solely on the physical address, and constructs a new calculation logic that integrates multiple parameters. The corresponding calculation formula for the encryption perturbation variable is as follows: . In the formula, Represents the encrypted perturbation variable. Represents physical memory address, This represents the time slice slot currently in operation of the system. The nonce-derived key represents the encryption operation function, and F represents the preset nonlinear mapping operation function. The system relies on a brand-new computational logic to complete the encryption operation and synchronously output the expanded standardized encryption parameter pairs. The parameter pairs include two core configuration parameters: time slice slot length and nonce-derived key, providing basic parameter support for encryption strategy updates.

[0110] S43: Based on the extended encryption parameter pair, the time slice slot length and nonce derived key are added as new encryption configuration fields to replace the original static tweak configuration parameters in the memory encryption control block, generating the set of encryption policy parameters after the switch.

[0111] Specifically, the system acquires the extended encryption parameter pair output after mode switching, parses the time slice slot length parameter and nonce derived key parameter contained in the parameter pair, defines these two types of parameters as entirely new memory encryption configuration fields, and participates in the entire process operation and control of memory encryption in the TEE environment. The system locates the memory encryption control block inside the hardware memory controller, reads the pre-stored static encryption perturbation configuration parameters inside the control block, clears the original static parameter configuration of a single physical address mapping, and writes the two new types of encryption configuration fields into the corresponding configuration range of the memory encryption control block, completing the full-coverage replacement update of the old and new encryption parameters.

[0112] The system standardizes and aggregates encryption strategies through parameter integration formulas; the corresponding calculation formula is as follows: . In the formula, This represents the final set of encryption policy parameters. This represents the basic encryption configuration parameters that are retained. This represents the time slice slot length parameter. This represents the nonce-derived key parameter. After the system completes parameter replacement and aggregation, it forms a new set of encryption strategy parameters adapted to high-risk security levels. The entire parameter set can support the stable operation of dynamic random perturbation encryption mode, completely changing the static parameter configuration of traditional deterministic encryption. It enables the memory encryption strategy to dynamically and adaptively adjust according to the attack risk level, effectively avoiding the risk of ciphertext leakage caused by physical layer eavesdropping attacks, and ensuring the memory transmission security of large model encrypted data mining process.

[0113] In one embodiment, S5 of the large model data mining method based on confidential computing provided by the present invention specifically includes the following steps:

[0114] S51: The deterministic metric value of the spatiotemporal feature set is used as the basic hash input block for the hash expansion operation. The target security level is used as the first concatenated expansion field. The set of encryption policy parameters after switching is serialized into a linear byte string and used as the second concatenated expansion field. The basic hash input block, the first concatenated expansion field and the second concatenated expansion field are concatenated to form the expanded input message sequence.

[0115] Specifically, the system retrieves all write deterministic metrics stored within the spatiotemporal feature set of the encrypted state in memory. This feature data is then uniformly collected and organized to form the basic hash input block for the hash expansion operation, serving as the core data source for subsequent hash operations. The system reads the target security level determined by the security level iteration process and defines this level parameter as the first concatenated expansion field of the hash operation, thus associating the security state level parameter with the basic feature data. The system retrieves the encryption strategy parameter set generated after the encryption mode switch is completed, performs parameter serialization processing, converts the structured encryption strategy parameter set into a continuous linear byte string structure, unifies the byte arrangement rules and data storage format, and defines the processed linear byte string as the second concatenated expansion field of the hash operation.

[0116] Furthermore, the system sequentially performs ordered concatenation operations on the basic hash input block, the first concatenated extended field, and the second concatenated extended field according to a fixed data concatenation priority, forming a complete extended input message sequence. The system standardizes the overall concatenation logic through a sequence integration formula, the corresponding calculation formula being:

[0117]

[0118] In the formula, This represents the final generated extended input message sequence. This represents the underlying hash input block consisting of written deterministic metric values. The first cascaded extended field representing the target security level. This represents the second concatenated extended byte string generated by serializing the set of encryption strategy parameters; the symbol indicates ordered concatenation operations. The system uses this fixed operation rule to unify the input data structure, ensuring the orderly fusion of multi-dimensional security parameters.

[0119] S52: Call the SHA-256 hash compression function to perform one-way mapping calculation on the extended input message sequence, compress the input message sequence into a fixed-length digest value, and use the fixed-length digest value as a new platform configuration register metric value to generate an updated security state metric value.

[0120] Specifically, after generating the extended input message sequence, the system calls the SHA-256 hash compression function to perform a one-way mapping operation on the complete message sequence. The hash compression function processes the input data according to a fixed grouping compression iteration rule, performing full data traversal and compression processing on the variable-length extended input message sequence, and outputting a hash digest value of fixed length. The system replaces the stored data in the original platform configuration register of the device with the generated fixed-length digest value, completing the update and overwrite of the platform configuration register metric value. The updated register metric value is defined as the updated security status metric value, realizing a unique numerical representation of the device's current encrypted operating status and security protection level.

[0121] Furthermore, the system completes the standardized definition of the safe state through a state metric generation formula, the corresponding calculation formula being: . In the formula, This represents the final generated updated security state metric. Represents the SHA-256 hash compression mapping operation. Represents an extended input message sequence. This represents the initial baseline metric value of the platform configuration register, with the symbol indicating an XOR calibration operation. The system relies on this operation logic to eliminate the fixed deviation of the digest value and, combined with the device's initial security baseline state, completes the metric value calibration. This ensures that updated security status metrics can objectively and completely map the real-time operating status of memory encryption policies, security levels, and memory characteristics, achieving quantifiable, verifiable, and traceable recording of the security status.

[0122] S53: Based on the updated security state metric, the hardware fusion key of the Trusted Execution Environment (TEE) is used to perform asymmetric signing on the updated security state metric. The signed updated security state metric, together with the identifier of the switching operation type, is encapsulated into a proof report data packet to generate an updated remote proof report.

[0123] Specifically, after generating the updated security state metric, the system invokes the hardware fused key built into the Trusted Execution Environment (TEE). This hardware fused key is embedded within the TEE hardware security architecture and only supports authorized instructions within the TEE; external processes and the system kernel cannot read or tamper with the key data. Relying on the asymmetric encryption mechanism of the hardware fused key, the system performs standardized asymmetric signature operations on the updated security state metric. The encrypted signature processing of the metric is completed through the private key, generating signature data carrying a hardware trusted identifier. The system retrieves the operation type code corresponding to this encryption mode switch, generating a standardized switch operation type identifier to record the behavioral attributes of this security policy adjustment. The system encapsulates the signed updated security state metric and the switch operation type identifier, performs structured integration according to the remote proof data packet format, and generates an updated remote proof report with integrity verification and behavior tracing capabilities. The system completes data standardization integration through a report encapsulation formula, the corresponding calculation formula being:

[0124]

[0125] In the formula, This represents the final generated updated remote proof report. This represents the asymmetric signature operation corresponding to the hardware fused key. This represents updating the security status metric. This represents the operation type identifier for switching encryption modes. The system uses this formula to bind and encapsulate the signature data with the operation identifier, ensuring the integrity and traceability of the remote proof report data.

[0126] S54: Send the updated remote proof report to the remote verifier, who verifies the validity of the signature and the consistency of the metric with the expected policy rules. After the verification is successful, trigger the security state register update operation in the Trusted Execution Environment (TEE), write the updated security state metric into the current security level parameter, and update the current security level based on the updated security state metric.

[0127] Specifically, after the system completes the generation of the updated remote verification report, it pushes the report data to the preset remote verification device via an encrypted trusted transmission link. Upon receiving the report data, the remote verification device initiates a two-layer verification process. The remote verification device retrieves the pre-stored TEE hardware public key information to verify the validity of the signature data within the report. Simultaneously, it retrieves the preset security policy rule base to verify the consistency between the updated security state metric carried in the report and the standard policy rules. When both layers of verification have completed parameter matching and the verification results are both valid, the remote verification device issues a state update command, triggering the update operation of the internal security state register of the trusted execution environment.

[0128] After receiving the update command, the system writes the updated security status metric value to the corresponding security level parameter storage address in the security status register, overwriting the original security level parameter data of the device. The system completes the security level synchronization calibration through the security level iterative update formula, the corresponding calculation formula being: . In the formula, This represents the current security level after the final update is complete. Represents the security state mapping matching function. This represents updating the security status metric. This represents the system's preset security level matching rules. Based on this operational logic, the system completes precise iterations of the security level, achieving real-time synchronization between the security status of the local confidential computing environment and the remote verification system, thus completing a closed-loop dynamic security protection update process for the large-scale model confidential data mining environment.

[0129] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0130] Based on the same inventive concept, this application also provides a large model data mining system based on confidential computing for implementing the aforementioned method for large model data mining based on confidential computing. The solution provided by this system is similar to the implementation described in the above method. Therefore, the specific limitations of one or more embodiments of the large model data mining system based on confidential computing provided below can be found in the limitations of the large model data mining method based on confidential computing described above, and will not be repeated here.

[0131] Preferably, such as Figure 2 As shown, the present invention provides a large model data mining system 600 based on confidential computing, which is configured with the following modules:

[0132] The memory spatiotemporal feature extraction module 610 is used to initialize a memory access trajectory record array inside the Trusted Execution Environment (TEE), calculate the write deterministic metric value of each physical memory page and the cross-page ciphertext association entropy between each physical memory page based on the memory access trajectory record array, and obtain a set of spatiotemporal features characterizing the memory encryption state.

[0133] The bus eavesdropping behavior detection module 620 is used to write a challenge random number to a predefined memory probe page and read the ciphertext response of the memory probe page, compare the ciphertext response with the benchmark ciphertext set by Hamming distance, and generate an attack proof flag to identify whether there is abnormal eavesdropping behavior on the memory bus.

[0134] The attack confidence determination module 630 is used to perform weighted fusion of the write deterministic metric value and cross-page ciphertext association entropy in the spatiotemporal feature set with the attack proof flag, calculate the attack confidence score, and compare the attack confidence score with the preset attack determination threshold to obtain the attack detection determination result.

[0135] The encryption mode dynamic switching module 640 is used to calculate the target security level based on the attack detection judgment result and the preset current security level. When the target security level exceeds the preset level threshold, it sends an encryption mode switching instruction to the memory controller to switch the deterministic memory encryption mode to the dynamic random number dependent encryption mode and generate the set of encryption policy parameters after the switch.

[0136] The remote proof state synchronization module 650 is used to perform hash expansion calculation based on the deterministic metric value of the spatiotemporal feature set, the target security level, and the set of encryption policy parameters after the switch, generate an updated security state metric value, sign the updated security state metric value using the TEE hardware key to generate an updated remote proof report, and send the updated remote proof report to the remote verifier to complete the trust state synchronization, and update the current security level according to the updated security state metric value.

[0137] In one embodiment, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method for large model data mining based on confidential computing.

[0138] In one embodiment, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for mining large model data based on confidential computation.

[0139] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0140] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0141] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for mining large-scale model data based on confidential computing, characterized in that, Includes the following steps: S1: Initialize a memory access trajectory record array inside the Trusted Execution Environment (TEE), calculate the write deterministic metric value of each physical memory page and the cross-page ciphertext association entropy between each physical memory page based on the memory access trajectory record array, and obtain a set of spatiotemporal features characterizing the memory encryption state; S2: By writing a challenge random number to a predefined memory probe page and reading the ciphertext response of the memory probe page, the ciphertext response is compared with the Hamming distance of the benchmark ciphertext set to generate an attack proof flag used to identify whether there is abnormal eavesdropping behavior on the memory bus. S3: The write deterministic metric and cross-page ciphertext association entropy in the spatiotemporal feature set are weighted and fused with the attack proof flag to calculate the attack confidence score, and the attack confidence score is compared with the preset attack judgment threshold to obtain the attack detection judgment result; S4: Calculate the target security level based on the attack detection judgment result and the preset current security level. When the target security level exceeds the preset level threshold, send an encryption mode switching instruction to the memory controller to switch the deterministic memory encryption mode to the dynamic random number dependent encryption mode and generate the set of encryption strategy parameters after the switch. S5: Perform hash expansion calculation based on the deterministic metric value of the spatiotemporal feature set, the target security level, and the switched encryption policy parameter set to generate an updated security state metric value. Sign the updated security state metric value using the TEE hardware key to generate an updated remote proof report. Send the updated remote proof report to the remote verifier to complete the trust state synchronization. Update the current security level according to the updated security state metric value.

2. The method according to claim 1, characterized in that, S1 includes: S11: Within the Trusted Execution Environment (TEE), allocate a fixed-length circular buffer as a memory access trajectory record array for each physical memory page, and initialize each circular buffer with an empty cursor to generate a blank trajectory record array instance; S12: Based on the trajectory recording array instance, according to the preset acquisition window length, read the written encrypted data and corresponding write timestamps recorded by each physical memory page within the window duration, filter the repeated occurrence patterns in the written encrypted data of each physical memory page one by one, and generate the original write record sequence of the physical page. S13: Perform sliding window scanning on the original write record sequence, calculate the probability of repeated occurrence of ciphertext values ​​at the same physical page address within each window and their joint distribution statistics, and generate the write deterministic metric of the physical memory page; at the same time, calculate the conditional probability distribution of ciphertext values ​​between different physical pages and their mutual information, and generate cross-page ciphertext association entropy; combine the write deterministic metric and the cross-page ciphertext association entropy into the same feature vector structure to generate a spatiotemporal feature set representing the memory encryption state.

3. The method according to claim 1, characterized in that, S2 includes: S21: Inside the Trusted Execution Environment (TEE), a set of random number vectors is extracted from the hardware random number generator, and each element in the random number vector is sequentially written to the fixed offset address of each predefined memory probe page to generate a probe page challenge filling record. S22: Based on the probe page challenge filling record, read back the ciphertext value presented after writing from the same fixed offset address of each memory probe page, calculate the bitwise Hamming distance between the read-back ciphertext value and the reference ciphertext set extracted from the spatiotemporal feature set, and select the ciphertext deviation degree of physical pages that meet the preset deviation range from each physical page according to the Hamming distance, and generate the ciphertext deviation distance score of each memory probe page. S23: Perform weighted aggregation processing on the ciphertext deviation distance scores of each memory probe page, determine the anomalies of the ciphertext deviation distance scores of each probe page according to a preset deviation tolerance threshold, mark memory probe pages with scores lower than the preset deviation tolerance threshold as abnormal, mark memory probe pages with scores higher than the threshold as normal, and summarize and encapsulate the position coordinates and abnormal score values ​​of all abnormal probe pages into an abnormal location package to generate an attack proof flag used to identify whether there is abnormal eavesdropping behavior on the memory bus.

4. The method according to claim 1, characterized in that, The attack detection and judgment results include truth-based attack detection and judgment results and false-based attack detection and judgment results. S3 includes: S31: Based on the spatiotemporal feature set and the attack proof flag, the three dimensions of detection indicators are weighted and configured: the deviation between the write deterministic metric and the normal deterministic baseline, the difference between the cross-page ciphertext association entropy and the normal statistical baseline, and the abnormal label of the attack proof flag. The weighted values ​​of each dimension indicator are summed to generate an attack confidence score. S32: Compare the attack confidence score with a preset attack judgment threshold. If the attack confidence score is greater than the preset attack judgment threshold, the current detection result is determined to be a memory bus man-in-the-middle attack and a truth value attack detection judgment result is generated. Otherwise, the current detection result is determined to be no attack and a false value attack detection judgment result is generated.

5. The method according to claim 4, characterized in that, The formula for calculating the attack confidence score is as follows: in, For attack confidence score, , , For preset weighting coefficients and satisfying , where n is the total number of physical memory pages. This is the write determinism metric for the i-th physical page. The entropy of the cross-page ciphertext association, This represents the statistical mean of the cross-page ciphertext association entropy under normal conditions. The standard deviation of the cross-page ciphertext association entropy under normal conditions. This represents the duration of the current attack detection period. The length of the baseline monitoring period. The time decay coefficient, The number of probe pages marked as abnormal. This represents the total number of probe pages.

6. The method according to claim 1, characterized in that, S4 includes: S41: Based on the attack detection judgment result and the preset current security level, if the attack detection judgment result is true, then according to the extent by which the attack confidence score exceeds the preset attack judgment threshold, combined with the preset level improvement step size and the preset maximum security level constraint, calculate the security level level to be improved and generate the target security level. S42: Based on the target security level, determine the relationship between the target security level and the preset level threshold. If the target security level does not exceed the preset level threshold, keep the configuration parameters of the current AES-XTS deterministic memory encryption mode unchanged. If the target security level exceeds the preset level threshold, send a security mode switching instruction to the memory controller, expand the calculation formula of the encryption tweak from relying solely on the physical address to relying on the physical address, the current time slice slot, and the nonce derived key for joint calculation, and output the expanded encryption parameter pair, which includes the time slice slot length and the nonce derived key. S43: Based on the extended encryption parameter pair, the time slice slot length and the nonce derived key are used as new encryption configuration fields to replace the original static tweak configuration parameters in the memory encryption control block, and a set of encryption strategy parameters after switching is generated.

7. The method according to any one of claims 1-6, characterized in that, S5 includes: S51: The deterministic metric value of the spatiotemporal feature set is used as the basic hash input block for hash expansion operation, the target security level is used as the first concatenated expansion field, and the set of encryption policy parameters after switching is serialized into a linear byte string and used as the second concatenated expansion field. The basic hash input block, the first concatenated expansion field and the second concatenated expansion field are concatenated to form the expansion input message sequence. S52: Call the SHA-256 hash compression function to perform one-way mapping calculation on the extended input message sequence, compress the input message sequence into a fixed-length digest value, and use the fixed-length digest value as a new platform configuration register metric value to generate an updated security state metric value; S53: Based on the updated security state metric, the updated security state metric is asymmetrically signed using the hardware fusion key of the Trusted Execution Environment (TEE). The signed updated security state metric, together with the type identifier of this switching operation, is encapsulated into a proof report data packet to generate an updated remote proof report. S54: The updated remote proof report is sent to the remote verifier, who verifies the validity of the signature and the consistency of the metric with the expected policy rules. After the verification is passed, the security state register update operation in the Trusted Execution Environment (TEE) is triggered, the updated security state metric is written into the current security level parameter, and the current security level is updated according to the updated security state metric.

8. A large-scale model data mining system based on confidential computing, characterized in that, The system includes: The memory spatiotemporal feature extraction module is used to initialize a memory access trajectory record array inside the Trusted Execution Environment (TEE), calculate the write deterministic metric value of each physical memory page and the cross-page ciphertext association entropy between each physical memory page based on the memory access trajectory record array, and obtain a set of spatiotemporal features characterizing the memory encryption state. The bus eavesdropping behavior detection module is used to write a challenge random number to a predefined memory probe page and read the ciphertext response of the memory probe page, compare the ciphertext response with a reference ciphertext set using Hamming distance, and generate an attack proof flag to identify whether there is abnormal eavesdropping behavior on the memory bus. The attack confidence determination module is used to perform weighted fusion of the write deterministic metric and cross-page ciphertext association entropy in the spatiotemporal feature set with the attack proof flag, calculate the attack confidence score, and compare the attack confidence score with a preset attack determination threshold to obtain the attack detection determination result. The encryption mode dynamic switching module is used to calculate the target security level based on the attack detection judgment result and the preset current security level. When the target security level exceeds the preset level threshold, it sends an encryption mode switching instruction to the memory controller to switch the deterministic memory encryption mode to the dynamic random number dependent encryption mode and generate the encryption strategy parameter set after the switch. The remote proof state synchronization module is used to perform hash expansion calculation based on the deterministic metric value of the spatiotemporal feature set, the target security level, and the switched encryption policy parameter set to generate an updated security state metric value. The module then signs the updated security state metric value using a TEE hardware key to generate an updated remote proof report, sends the updated remote proof report to the remote verifier to complete the trust state synchronization, and updates the current security level based on the updated security state metric value.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.