Power data platform security storage system based on partition isolation and encrypted storage
Patent Information
- Application Number
- CN202611193657.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-30
AI Technical Summary
当业务侧发起此类跨安全等级分区的多源联合查询时,现有方案暴露出本质性的技术缺陷:由于传统计算引擎无法直接在密文上执行关联匹配运算,系统不得不将高敏分区内的全量加密数据批量拉取至中台计算节点的内存中进行解密,再以明文状态完成关联比对与聚合计算
[0006]与现有技术相比,本申请提供的基于分区隔离与加密存储的电力数据中台安全存储系统,其在数据入库加密阶段,同步为高敏数据的关联主键构建一套剥离业务载荷的加盐密态影子索引,使得关联匹配所需的键值信息以不可逆的密文形态独立于数据载荷而存在。当跨区联合查询到达时,系统对查询参数执行同源密态转换后,直接在密文空间内与影子索引进行交集比对,精准定位出满足关联条件的极少量目标数据行号,而非触碰全量密文。随后,仅针对命中行号对应的密文切片进行定向提取并推送至隔离沙箱内完成流式解密与业务聚合。通过这一机制,跨区查询全程无需对高敏分区进行全表解密,解密粒度从分区级细化至行级,从根本上消除了解密风暴对计算节点的资源冲击,同时将明文暴露范围压缩至受硬件隔离保护的微型沙箱内,有效封堵了内存侧信道泄露风险。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of power data security storage technology, and more specifically, to a power data middleware security storage system based on partitioned isolation and encrypted storage. Background Technology
[0002] With the deepening of the construction of new power systems, the scale of data generated by power grid operation is growing exponentially, encompassing multi-source heterogeneous information such as user electricity consumption behavior sequences, power grid topology connections, and substation and distribution transformer operation logs. To achieve unified aggregation, integrated analysis, and service sharing of this data, power companies at all levels have built data platforms as the core data foundation. However, power data has significant security sensitivity; user electricity consumption behavior can infer residents' daily lives and privacy, power grid topology involves the security of critical infrastructure, and equipment operating parameters are directly related to the stable operation of the power grid. If data of different security levels is aggregated in the platform and then accessed or leaked without authorization, it will pose serious risks to national security and social stability. Therefore, building a storage solution that balances data security and business availability within the platform architecture has become a core technological requirement in the digital transformation of the power industry.
[0003] In existing technologies, to address the secure storage issue of power data platforms, current solutions route power data of different sensitivity levels to independent logical or physical storage partitions based on data classification and grading results. They then use national cryptographic symmetric encryption algorithms to perform field-level or table-level encryption on highly sensitive data before persistent storage. This approach effectively resists unauthorized access and data theft during the static data storage phase. However, the core value of a power data platform lies in data integration and joint analysis. For example, peak summer load forecasting requires correlating the power grid topology of low-density public areas with real-time user electricity consumption sequences in high-density red areas. When the business side initiates such multi-source joint queries across security level partitions, existing solutions reveal fundamental technical flaws: because traditional computing engines cannot directly perform correlation matching operations on encrypted data, the system must batch-pull all encrypted data from the high-sensitivity partitions to the memory of the platform's computing nodes for decryption, and then complete the correlation comparison and aggregation calculations in plaintext. The root cause of this process lies in the strong coupling between computation and decryption, as well as the excessively coarse granularity of decryption. Even if the joint query only needs to hit one percent of the data rows, the system still needs to perform full table decryption on the entire high-sensitivity partition. This has a dual consequence: on the one hand, the concurrent decryption operation on massive amounts of data instantly consumes all the CPU and memory resources of the middleware computing nodes, forming a decryption storm that causes node performance to crash or even paralyze the service; on the other hand, the full amount of plaintext data is exposed in the memory space, forming a huge plaintext data pool. Once subjected to privilege escalation attacks or memory side-channel theft, the security defense carefully constructed by partition isolation and encrypted storage will instantly become useless.
[0004] Therefore, an optimized power data middleware secure storage system is desired. Summary of the Invention
[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a secure storage system for a power data middleware platform based on partitioned isolation and encrypted storage, comprising: The index and data block pre-construction module is used to classify and classify the raw power data stream and pre-construct the dense shadow index based on the preset power data classification and classification directory to obtain the salted dense shadow index and partitioned power data blocks. The partition isolation storage and mapping module is used to perform partition isolation storage and encrypted fragment mapping on partitioned power data blocks based on partition routing strategies to obtain encrypted data fragments and cross-region storage mapping metadata. The dense state transformation and matching module is used to respond to multi-source joint query requests. It performs dense state transformation on the association parameters in the query conditions to obtain the transformed association parameters, and performs dense state shadow matching on the transformed association parameters and the salted dense state shadow index in the cross-region proxy layer to obtain the intersection hit row vector. The on-demand data extraction module is used to extract ciphertext slices corresponding to the hit rows in cross-region storage mapping metadata and encrypted data shards based on the intersection hit row vectors to obtain the target accurate ciphertext stream. The streaming dynamic decryption and aggregation module is used to perform streaming dynamic decryption and business aggregation on the target precise ciphertext stream within an isolated decryption sandbox to generate power platform security analysis results.
[0006] Compared with existing technologies, the power data platform secure storage system based on partition isolation and encrypted storage provided in this application, during the data ingestion encryption stage, simultaneously constructs a salted, encrypted shadow index for the associated primary keys of highly sensitive data, stripping away the business load. This ensures that the key-value information required for association matching exists independently of the data load in an irreversible encrypted form. When a cross-regional joint query arrives, the system performs a homogeneous encrypted transformation on the query parameters and directly compares the intersection with the shadow index in the encrypted space, accurately locating a very small number of target data row numbers that meet the association conditions, rather than touching the entire encrypted text. Subsequently, only the encrypted slices corresponding to the matched row numbers are extracted and pushed to an isolated sandbox for streaming decryption and business aggregation. Through this mechanism, cross-regional queries do not require full table decryption of highly sensitive partitions throughout the entire process. The decryption granularity is refined from the partition level to the row level, fundamentally eliminating the resource impact of decryption storms on computing nodes. At the same time, the plaintext exposure range is compressed to a micro sandbox protected by hardware isolation, effectively blocking the risk of memory-side channel leakage. Attached Figure Description
[0007] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0008] Figure 1 This is a system block diagram of a secure storage system for a power data middleware platform based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 2 This is a schematic diagram of data flow in a secure storage system for a power data middleware platform based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 3 This is a block diagram of the encryption conversion and matching module in the secure storage system of the power data middleware based on partition isolation and encrypted storage according to an embodiment of this application; Figure 4 This is a block diagram of a dense spatial intersection comparison unit in a power data middleware secure storage system based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 5 This is a block diagram of the on-demand data extraction module in a power data middleware secure storage system based on partitioned isolation and encrypted storage, according to an embodiment of this application. Detailed Implementation
[0009] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0010] After a power data middle platform aggregates multi-source heterogeneous sensitive data, when the business side initiates a joint query across security level partitions, the existing partition isolation and encrypted storage architecture faces a structural contradiction of strong coupling between computation and decryption. The system is forced to perform full data decryption on high-sensitivity partitions to complete the association matching, which leads to the dual risks of computing node resource crashes and large-scale plaintext memory exposure. To solve the above problems, the technical solution of this application proposes a secure storage system for power data middle platforms based on partition isolation and encrypted storage. In the data writing stage, the system performs sensitivity identification and partition routing on the original power data stream according to the classification and grading results. At the same time, it extracts the association primary key of high-sensitivity data and performs national cryptographic hash operation in combination with global security salt value to generate a salted encrypted shadow index that is completely decoupled from the business payload, and deploys it on the cross-region proxy layer. In the partition storage stage, the high-sensitivity payload is subject to field-level national cryptographic symmetric encryption and written to disk to a physically isolated medium. Simultaneously, cross-region storage mapping metadata that records the correspondence between logical row numbers and disk physical offsets is constructed. When a cross-region joint query request arrives, the system parses the request through an abstract syntax tree. The query parameters are retrieved, and after performing a same-source salted hash transformation, they are compared with a pre-built shadow index within the ciphertext space. Only the set of logical row numbers that match are output, without touching any ciphertext data itself. Subsequently, based on the matched row numbers, the mapping metadata is retrieved to obtain the precise physical address. The target slice in the encrypted shard is read in a targeted manner and streamed through a dedicated pipeline to a temporary decryption sandbox protected by hardware-level memory isolation. Finally, within the sandbox, byte-by-byte dynamic decryption, business aggregation with low-sensitivity reference data, and desensitized encapsulation are completed, and the output is immediately triggered after the results are exported, triggering a memory overwrite and erasure in the sandbox. Through the above implementation process, this solution compresses the triggering granularity of the decryption operation from the partition level to the precise row level, enabling cross-region queries to complete the correlation and positioning within the ciphertext space throughout the entire process. Controlled decryption is only performed on a very small number of matched data at the very end, thereby eliminating decryption resource storms and plaintext leakage exposure without compromising the partition isolation security boundary.
[0011] Figure 1 This is a system block diagram of a secure storage system for a power data middleware platform based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 2 This is a schematic diagram of data flow in a secure storage system for a power data middleware platform based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 1 and Figure 2As shown, the secure storage system 100 for power data middleware based on partitioned isolation and encrypted storage according to an embodiment of this application includes: an index and data block pre-construction module 110, used to classify and classify the original power data stream and pre-construct a salted encrypted shadow index based on a preset power data classification and classification directory to obtain a salted encrypted shadow index and partitioned power data blocks; a partitioned isolation storage and mapping module 120, used to perform partitioned isolation storage and encrypted fragment mapping on the partitioned power data blocks based on a partitioned routing strategy to obtain encrypted data fragments and cross-regional storage mapping metadata; and an encrypted conversion and matching module 130, used to respond to multi-source joint queries. The system performs a cryptographic transformation on the associated parameters in the query conditions to obtain the transformed associated parameters. Then, at the cross-region proxy layer, it performs cryptographic shadow matching between the transformed associated parameters and the salted cryptographic shadow index to obtain the intersection hit row vector. The on-demand data extraction module 140 is used to extract the target precise ciphertext stream based on the mapping metadata of the cross-region storage mapping metadata and the ciphertext slices corresponding to the hit rows in the encrypted data shards. The streaming dynamic decryption and aggregation module 150 is used to perform streaming dynamic decryption and business aggregation on the target precise ciphertext stream in the isolated decryption sandbox to generate the power platform security analysis results.
[0012] In the aforementioned secure storage system 100 for power data middleware based on partitioned isolation and encrypted storage, the index and data block pre-construction module 110 is used to classify and classify the original power data stream and pre-construct a salted dense shadow index based on a preset power data classification and grading directory to obtain a salted dense shadow index and partitioned power data blocks. It is worth noting that the original power data stream here includes user power consumption sequences, power grid topology metadata, and equipment operation logs. It should be understood that since the original power data stream accessed by the power data middleware simultaneously contains multi-source heterogeneous data such as user power consumption sequences, power grid topology metadata, and equipment operation logs, and these data have significantly different levels of security sensitivity, if sensitivity differentiation and index pre-construction are not performed during the data entry stage, the system will be unable to complete the association and location within the encrypted space during subsequent cross-regional joint queries, and will have to fall back to decrypting and matching the full data of the high-sensitivity partition. Therefore, in the technical solution of this application, based on a preset power data classification and grading directory, the original power data stream is classified and graded, and a salted dense shadow index is pre-constructed to obtain a salted dense shadow index and partitioned power data blocks. This allows for the synchronous construction of sensitivity identification, partition routing, and dense index during the data entry stage. This enables subsequent cross-region queries to directly utilize the pre-constructed salted dense shadow index within the encrypted space for correlation matching, avoiding access to the encrypted data body of highly sensitive partitions and eliminating the need for full table decryption at the source.
[0013] Specifically, in this embodiment of the application, the index and data block pre-construction module is used to: perform threshold comparison and sensitivity identification on the feature fields in the original power data stream based on the security level rules in the power data classification and grading directory to obtain a marked power data stream; extract the associated primary key and perform data partitioning routing on the highly sensitive entries in the marked power data stream to obtain the associated primary key and partitioned power data blocks; and perform high-low bit concatenation and one-way hash operation on the associated primary key and the global security salt value to obtain a salted dense shadow index.
[0014] More specifically, in a concrete example of this application, firstly, a power data classification and grading directory is loaded from the central configuration center. This directory predefines security level rules for each characteristic field of the power data. Each rule includes a field identifier, a sensitivity judgment threshold, and a corresponding security level label. The module starts a streaming scanning engine, reading data tuples from the original power data stream one by one. For each data tuple, the attribute value of its characteristic field is extracted, and the attribute value is compared with the sensitivity judgment threshold of the corresponding field identifier in the power data classification and grading directory. Taking a user's electricity consumption sequence as an example, when the data tuple contains characteristic fields such as user identity, meter physical address, or real-time load power curve, its attribute value exceeds the preset privacy sensitivity threshold in the security level rules, and the module adds a high-sensitivity label to the data tuple. For data tuples in the power grid topology metadata that only contain publicly available characteristic fields such as line number and node connection relationship, their attribute values do not reach the sensitivity judgment threshold, and the module adds a low-sensitivity label to them. After all data tuples have been scanned and tagged, the module encapsulates all data tuples with sensitivity identification tags in their original time sequence and outputs them as a tagged power data stream.
[0015] Next, the module iterates through all data entries marked with high sensitivity tags in the power data stream. Using a pre-defined primary key field mapping table, it locates the unique business identifier field responsible for cross-database association in each high-sensitivity data entry, extracts the specific value of this field, and aggregates it into a set of associated primary keys. In the operational scenario of a provincial power data platform, the associated primary key is the globally unique number of the user's electricity meter. This number exists simultaneously in the high-sensitivity user electricity consumption sequence table and the low-sensitivity power grid topology node table, serving as the link for subsequent cross-regional joint queries. While extracting the associated primary keys, the module, based on the sensitivity tag attached to each data tuple in the marked power data stream, calls the partition routing engine to perform data distribution: data entries with high sensitivity tags are routed to the write queue of the high-security-level storage partition, and data entries with low sensitivity tags are routed to the write queue of the low-security-level storage partition. The two partitions are completely isolated at the physical disk level. After routing and aggregation, the data entries in each partition's write queue are aggregated and encapsulated into partition power data blocks, which, along with the associated primary keys, serve as the output of this stage.
[0016] Then, the module obtains the global security salt value, uniformly generated and distributed by the key management service, from the system security configuration center. This global security salt value is a fixed-length random binary string that remains globally unique and unpredictable throughout the entire lifecycle of the middleware system. The module reads each associated primary key in the associated primary key set one by one, places the binary representation of the associated primary key in the high-order segment of the memory register, and places the binary representation of the global security salt value in the low-order segment, performing a high-low bit concatenation operation to form an extended binary string. Further, the module uses the concatenated binary string as input and feeds iterative compression into the compression engine of the SM3 cryptographic hash function. After three stages of operation—message filling, block iterative compression, and final digest truncation—it outputs a 256-bit fixed-length irreversible ciphertext digest. The module then systematically aggregates the ciphertext digests generated from all associated primary keys after the above operations, encapsulates them, and outputs them as a salted encrypted shadow index. The above one-way hash operation is represented as:
[0017] in, This represents the i-th ciphertext index entry in the generated salted dense shadow index, which is a 256-bit fixed-length binary digest; This represents the SM3 cryptographic hash function, which accepts an input bit string of arbitrary length and outputs a fixed 256-bit digest after 64 rounds of iterative compression operations. It has one-wayness, collision resistance, and avalanche effect. This represents the i-th associated primary key extracted from the marked power data stream, which in this embodiment is the binary representation of the globally unique number of the user's electricity meter; This represents the global security salt value uniformly issued by the system security configuration center, which is a random binary string of fixed length; This indicates a bit string concatenation operation performed at the binary level, placing the associated primary key in the high-order segment and the global security salt value in the low-order segment. In the actual operation scenario of a provincial power data platform, this formula serves the purpose of: concatenation operation... By fusing the bit pattern of the original user meter number with the bit pattern of the system salt value, the same meter number generates completely different index values in different middleware instances due to different salt values. This disrupts the frequency distribution characteristics of the original key values, making it impossible for attackers to reverse engineer the index by constructing a rainbow table, even if they obtain all entries of the salted, encrypted shadow index. Furthermore, the SM3 hash function... The one-way nature of the encryption ensures that the original meter number cannot be deduced from the encrypted digest, and its avalanche effect guarantees that even if two meter numbers differ by only one bit, their corresponding salted dense-state shadow index entries will still be identical. This will also produce a completely different 256-bit output, thus ensuring that the encrypted index can achieve accurate ciphertext comparison and matching through same-source hash operation in the subsequent cross-regional query stage, and also eliminates any possibility of leakage of semantic information about the original power business data from a cryptographic perspective.
[0018] In the aforementioned secure storage system 100 for power data platform based on partition isolation and encrypted storage, the partition isolation storage and mapping module 120 is used to perform partition isolation storage and encrypted fragment mapping on partitioned power data blocks based on a partition routing strategy to obtain encrypted data fragments and cross-region storage mapping metadata. It should be understood that since the partitioned power data blocks generated after the preceding steps have been routed to the corresponding security level storage partition, but the data payload still exists in plaintext form in the partition write queue, cryptographic protection has not yet been completed. If directly persisted to disk in plaintext form, highly sensitive power data will be directly exposed if the physical storage medium suffers unauthorized physical contact or the underlying file system is maliciously mounted. Simultaneously, the subsequent on-demand decryption stage requires precise location of the encrypted fragments on the disk based on the hit row number. If the mapping relationship between logical row numbers and physical storage coordinates is not established synchronously during the encryption and disk persistence process, the system will be unable to achieve row-level precision ciphertext extraction. Therefore, in the technical solution of this application, based on a partitioned routing strategy, partitioned power data blocks are further isolated and stored in a partitioned manner, and mapped to encrypted fragments to obtain encrypted data fragments and cross-regional storage mapping metadata. This establishes a precise correspondence between logical addressing and physical addressing while completing data cryptographic protection. This ensures that highly sensitive power data receives field-level national cryptographic encryption protection during the static storage stage, while providing precise addressing capabilities from logical row numbers to physical disk offsets for subsequent on-demand data extraction. This allows the system to directly calculate the precise physical coordinates of the target encrypted fragment on the isolated medium simply by matching the intersection of row vectors, without traversing the entire encrypted data fragment.
[0019] Specifically, in this embodiment, the partitioned isolation storage and mapping module is used to: perform load parsing and field-level national cryptographic encryption on the highly sensitive business loads in the partitioned power data block to obtain a logical row number sequence and encrypted data fragments; perform physical isolation medium disk writing and offset capture on the encrypted data fragments through the underlying storage control interface to obtain a disk offset set; and perform structured tuple binding and serialization assembly of the logical row number sequence and disk offset set using the fragment global number as the association key to obtain cross-regional storage mapping metadata.
[0020] More specifically, in a concrete example of this application, firstly, the power data blocks of the high-security-level storage partition are read sequentially from the write queue. Structured payload parsing is performed on each data block, separating the fields into non-sensitive identifier fields and highly sensitive business payload fields. The non-sensitive identifier field includes the logical row number of the data tuple within the partition. The module extracts and aggregates the logical row numbers of all data tuples according to their entry sequence into a logical row number sequence. For the highly sensitive business payload fields, in the operational scenario of the provincial power data platform, this includes core data involving user privacy such as real-time load power values, cumulative electricity consumption, and meter collection timestamps. The module calls the national cryptographic SM4 symmetric encryption algorithm engine, using the partition-specific encryption key distributed by the system key management service as input. It performs block encryption operations on each field of the highly sensitive business payload field of each data tuple, outputting ciphertext blocks of equal length after 32 rounds of nonlinear iterative transformation from 128-bit plaintext blocks. The encrypted payloads of all data tuples are sliced and encapsulated according to a preset fixed byte length, outputting encrypted data fragments.
[0021] Next, a write request is initiated to the physically isolated storage medium via the underlying storage control interface. This physically isolated storage medium is an independent disk array specifically allocated to the high-security partition, physically isolated from the storage media of the low-security partition at the hardware controller level. The module uses direct I / O mode to bypass the operating system's page cache mechanism, writing each ciphertext slice in the encrypted data fragments sequentially to consecutive sectors of the disk medium. At the instant each ciphertext slice completes its write operation, the module captures the physical address of the starting sector of the disk to which the slice was actually written and the length of the storage bytes occupied by the slice through the file system's I / O completion callback interface. The starting addresses and byte lengths of all ciphertext slices are then structured and encapsulated, outputting a set of disk offsets.
[0022] Then, the module assigns a globally unique global shard number as the association key to each encrypted slice that has been written to disk. Using this global shard number as an index, it binds the logical row number at the corresponding position in the logical row number sequence with the disk start address and byte length at the corresponding position in the disk offset set in a structured tuple, forming a mapping record containing four fields: global shard number, logical row number, disk start offset, and storage byte length. Further, the module serializes and assembles all mapping records in ascending order of the global shard number, solidifying them into a compact binary table structure as cross-region storage mapping metadata and persisting it to a separate metadata management storage area. The cross-regional storage mapping metadata establishes a bidirectional index structure from logical row number to physical disk coordinates. In the actual operation scenario of the provincial power data platform, when the intersection hit row vector is received in the subsequent on-demand data extraction stage, the system can use the hit logical row number as the search key to perform a precise search in the cross-regional storage mapping metadata, directly obtain the starting sector address and byte length of the target encrypted slice on the physical isolation medium, thereby bypassing the sequential traversal of the full encrypted data fragments and realizing row-level precision disk-oriented reading.
[0023] In the aforementioned secure storage system 100 of the power data platform based on partitioned isolation and encrypted storage, the encrypted conversion and matching module 130 is used to respond to multi-source joint query requests, perform encrypted conversion on the association parameters in the query conditions to obtain the converted association parameters, and perform encrypted shadow matching on the converted association parameters and the salted encrypted shadow index at the cross-regional proxy layer to obtain the intersection hit row vector. It should be understood that since the core business value of the power data platform lies in the data fusion analysis across security level partitions, when the business side initiates a multi-source joint query request, the association parameters carried in the query conditions are business identifiers in plaintext form, while the pre-built salted encrypted shadow index in the high-sensitivity partition is an irreversible encrypted digest after salted hashing using the national cryptographic standard SM3. There is no direct numerical comparability between the plaintext association parameters and the encrypted index entries. If the system directly retrieves the encrypted index using plaintext parameters, it will not obtain any matching results and can only fall back to decrypting all encrypted data in the high-sensitivity partition before performing plaintext association matching. Therefore, in the technical solution of this application, in response to a multi-source joint query request, the association parameters in the query conditions are subjected to a cryptographic transformation to obtain the transformed association parameters. Then, at the cross-region proxy layer, the transformed association parameters are matched with the salted cryptographic shadow index to obtain the intersection hit row vector. This completely encloses the cross-region association matching operation within the ciphertext space. In this way, the target data row number set satisfying the association conditions can be accurately located without decrypting any data in the high-sensitivity partition. This allows the subsequent on-demand data extraction stage to process only a very small number of ciphertext slices corresponding to the hit rows, fundamentally avoiding the computational resource storm and memory plaintext leakage risks caused by full table decryption.
[0024] Figure 3 This is a block diagram of the encryption conversion and matching module in a power data middleware secure storage system based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 3 As shown, the secret state conversion and matching module 130 includes: a condition scanning and key-value extraction unit 131, used to scan and extract key-values from the filtering conditions and association conditions in the multi-source joint query request through an abstract syntax tree parsing engine to obtain plaintext association parameters; a homo-source secret state conversion unit 132, used to perform homo-source secret state conversion on the plaintext association parameters and the global security salt value to obtain query secret state parameters; and a secret state space intersection comparison unit 133, used to perform secret state space intersection comparison on the query secret state parameters and the salted secret state shadow index in the comparison engine of the cross-regional proxy layer to obtain the intersection hit row vector.
[0025] Specifically, the condition scanning and key-value extraction unit 131 is used to scan and extract key-values from the filtering and association conditions in the multi-source joint query request using an abstract syntax tree parsing engine to obtain plaintext association parameters. It should be understood that since the multi-source joint query request initiated by the business application layer arrives at the cross-region proxy layer in the form of a structured query statement, this query statement simultaneously mixes filtering and association conditions. Furthermore, the association conditions may contain both local field matches pointing to low-sensitivity partitions and cross-region foreign key associations pointing to high-sensitivity partitions. If the system does not perform precise parsing and classification extraction at the syntax level, it will be unable to accurately identify which association parameters require subsequent homologous encrypted conversion, thus making accurate matching impossible within the encrypted space. Therefore, in the technical solution of this application, the abstract syntax tree parsing engine is further used to scan and extract key-values from the filtering and association conditions in the multi-source joint query request to obtain plaintext association parameters. This allows for the precise extraction of the target business identifier value from the complex query statement structure, which needs to be compared with the salted encrypted shadow index of the high-sensitivity partition. This ensures that subsequent homogeneous encrypted conversion units only perform hash operations on key values that are truly involved in cross-security level partition associations, avoiding redundant conversions of irrelevant condition parameters, while also ensuring that the extracted plaintext association parameters strictly correspond to the pre-built salted encrypted shadow index in the high-sensitivity partition at the business semantic level.
[0026] More specifically, in a concrete example of this application, firstly, when the load forecasting application of the provincial power data platform initiates a multi-source joint query request that requires associating a low-sensitivity power grid topology table with a high-sensitivity user electricity consumption sequence table, the request is routed to the cross-regional proxy layer via a unified query gateway in the form of a standard structured query statement. After receiving the query statement text, the condition scanning and key-value extraction unit calls the abstract syntax tree parsing engine to perform lexical analysis on it, dividing the character stream of the query statement into a sequence of lexical units such as keyword tags, identifier tags, operator tags, and literal value tags. Then, the lexical unit sequence is subjected to syntax analysis, and an abstract syntax tree is constructed according to the syntax rules of the structured query language, consisting of query nodes, projection nodes, filter condition nodes, association condition nodes, and data source nodes. Next, starting from the root node of the abstract syntax tree, the unit scans all condition nodes in the tree layer by layer using a depth-first traversal strategy. For each condition node, its type attribute is determined: if the condition node is a filter condition type, it means that the condition only applies to row-level filtering of a single data source; the unit marks it as a local filter condition and records it but does not perform key-value extraction. If the condition node is a correlation condition type, the unit further checks the security level identifiers of the left and right tables involved in the correlation condition. When the left table belongs to a low-sensitivity partition and the right table belongs to a high-sensitivity partition, the correlation condition is determined to be a cross-security-level partition correlation condition. Then, the foreign key field identifier pointing to the high-sensitivity partition table in the cross-security-level partition correlation condition node is located, and the corresponding specific business identifier value is extracted from the right side of the correlation condition's equality expression, specifying the target user meter number set for load forecasting applications in the provincial power data platform's operational scenario. Furthermore, the unit aggregates the business identifier values extracted from all cross-security-level partition correlation condition nodes, encapsulates them into an ordered set structure according to the extraction order, and outputs them as plaintext correlation parameters for subsequent salted hash operations by the same-source encrypted conversion unit.
[0027] Specifically, the homologous encrypted state conversion unit 132 is used to perform homologous encrypted state conversion on the plaintext association parameters and the global security salt value to obtain the query encrypted state parameters. It should be understood that since the plaintext association parameters output by the precondition scanning and key-value extraction unit are the original business identifier values without any cryptographic processing, while the pre-constructed salted encrypted shadow index in the high-sensitivity partition is a 256-bit irreversible ciphertext digest generated after joint operation of the national cryptographic SM3 hash function and the global security salt value, the two are completely different in data representation space. The plaintext-form association parameters cannot be compared with the ciphertext-form index entries in any meaningful numerical manner. If the plaintext association parameters are directly sent to the encrypted state space intersection comparison unit, a completely empty result set of no match will be generated. Therefore, in the technical solution of this application, the homologous encrypted state conversion on the plaintext association parameters and the global security salt value is further performed to obtain the query encrypted state parameters, thereby converting the plaintext business identifier value on the query side to the same ciphertext representation space as the index side. This ensures that the query dense parameters and the salted dense shadow index are mathematically comparable. That is, the index entries generated for the same meter number during the data entry stage and the query conditions generated during the query stage produce completely identical 256-bit hash digest values. This allows the subsequent dense space intersection comparison unit to complete accurate association matching through simple hash equality determination.
[0028] More specifically, in a concrete example of this application, firstly, the plaintext association parameters output by the conditional scanning and key-value extraction unit are received. These plaintext association parameters are an ordered set structure containing several target user meter numbers. Simultaneously, the unit obtains a global security salt value from the system security configuration center through a secure communication channel. This global security salt value is the same numerical instance used by the index and data block pre-construction module during the data entry stage to perform salted hash operations on the associated primary key. This homogeneity is a prerequisite for ensuring consistency between the hash output on the query side and the index side. Next, each plaintext business identifier value in the plaintext association parameters is read one by one. The plaintext business identifier value is converted into a binary bit string representation according to the system's preset character encoding rules. In the memory register, the binary bit string is placed in the high-order segment, and the binary representation of the global security salt value is placed in the low-order segment. A high-low bit concatenation operation, strictly consistent with the index pre-construction stage, is performed to form an extended binary bit string to be hashed. Then, the unit inputs the concatenated binary bit string into the compression iteration engine of the SM3 cryptographic hash function. After three stages of processing—padded to multiples of 512 bits, 64 rounds of iterative compression in 512-bit groups, and finally truncation to a 256-bit digest—a fixed-length irreversible ciphertext digest is output. Further, the ciphertext digests generated from all plaintext business identifier values in the plaintext association parameters, processed by the above operations, are aggregated and encapsulated into an ordered set structure according to the original extraction order. This structure is output as the query cryptographic parameters, used by the subsequent cryptographic space intersection comparison unit to perform hash equality comparison with the salted cryptographic shadow index. The above homologous cryptographic transformation operation is expressed as:
[0029] in, This represents the k-th ciphertext query condition in the generated query encrypted parameters, which is a 256-bit fixed-length binary digest; This represents the SM3 cryptographic hash function, which is implemented using the same standard as the hash algorithm called during the index pre-construction stage of data storage, ensuring that the same input will necessarily map to the same output. This represents the k-th plaintext service identifier value extracted from the plaintext association parameters, which in this embodiment is the binary bit string representation of the target user's meter number; This indicates that the global security salt value obtained from the system security configuration center is exactly the same as the salt value used during the index pre-construction phase of the data entry stage; This indicates a binary string concatenation operation that places the plaintext business identifier value in the high-order segment and the global security salt value in the low-order segment, with the concatenation order strictly consistent with the index pre-construction stage. In the actual operation scenario of a provincial power data platform, the core significance of this formula lies in ensuring the consistency of output between the query side and the index side through triple homology constraints: firstly, the hash function... The homology ensures that the same input bit string will inevitably produce the same 256-bit output digest after the same 64 rounds of iterative compression; secondly, the global security salt value. The homology ensures that the concatenated extended bit string is completely identical to the extended bit string in the storage stage in terms of salt value; thirdly, the concatenation operation The sequential homology ensures that the arrangement of high and low bits is exactly the same as in the data entry stage, avoiding inconsistencies in the hash input bit string due to different splicing orders. Through this triple homology constraint, regardless of whether the meter number for the same target user is converted into an entry in the salted dense shadow index during the data entry stage... Or is it converted into a certain condition in the query's dense parameters during the query phase? Their 256-bit ciphertext digest values are mathematically strictly equal, thus providing a reliable basis for hash equality comparison of subsequent dense space intersection comparison units.
[0030] Specifically, the encrypted spatial intersection comparison unit 133 is used in the comparison engine of the cross-regional proxy layer to perform encrypted spatial intersection comparison between the query encrypted parameters and the salted encrypted shadow index to obtain the intersection hit row vector. It should be understood that since the query encrypted parameters output after processing by the same-source encrypted conversion unit have been converted to the same encrypted representation space as the salted encrypted shadow index, the system needs a comparison mechanism that directly completes the association matching within the encrypted space to determine which data rows in the highly sensitive partition have a business association relationship with the query conditions. If this comparison mechanism is lacking, the system still needs to fall back to decrypting the highly sensitive partition data before performing plaintext matching. Therefore, in the technical solution of this application, in the comparison engine of the cross-regional proxy layer, the encrypted spatial intersection comparison between the query encrypted parameters and the salted encrypted shadow index is performed to obtain the intersection hit row vector, thereby accurately locating the target data row number set that satisfies the association conditions without touching the encrypted data body of the highly sensitive partition. In this way, the association matching operation of cross-region joint query can be completely enclosed in the encrypted numerical space, and only the positioning result at the logical row number level is output instead of any data content, providing row-level precision addressing basis for the subsequent on-demand data extraction stage.
[0031] More specifically, in a specific example of this application, firstly, the comparison engine loads the query encrypted parameters output by the same-source encrypted conversion unit and the salted encrypted shadow index pre-built and persistently stored during the data entry stage into the isolated memory buffer of the cross-regional proxy layer. The query encrypted parameters contain several 256-bit encrypted query conditions, and the salted encrypted shadow index contains 256-bit encrypted index entries corresponding to all data rows that have been entered into the database in the high-sensitivity partition. Each encrypted index entry is attached with the logical row identifier of the data row in the high-sensitivity partition. Next, the comparison engine uses hash string equality comparison as its core matching strategy. It extracts the ciphertext query conditions from the query parameters one by one, and for each ciphertext query condition, it iterates through all ciphertext index entries in the salted shadow index, performing bit-by-bit equality checks at the 256-bit binary string level. The comparison engine determines an entry as a hit and extracts its associated logical row identifier only if the 256-bit hash value of a ciphertext query condition is completely identical to that of a ciphertext index entry. If any bit differs between the two 256-bit hash values, the comparison engine determines it as a miss and skips the entry to check the next one. Then, the comparison engine aggregates the accumulated hit logical row identifiers obtained after iterating through all ciphertext query conditions, performs a global deduplication operation on any duplicate row identifiers, ensuring that each logical row identifier is unique in the result set. Furthermore, the comparison engine sorts the deduplicated logical row identifiers in ascending numerical order and encapsulates them into a one-dimensional array structure, outputting the intersection hit row vector. The above dense space intersection comparison operation is expressed as:
[0032] in, This represents the intersection hit row vector of the output, which is a deduplicated ordered one-dimensional array containing all hit logical row identifiers; This indicates that a set union operation and global deduplication aggregation are performed on the hit results generated by each of the k-th ciphertext query conditions in the query encrypted parameters; This represents the logical row identifier attached to the i-th ciphertext index entry in the salted ciphertext shadow index. This logical row identifier has a one-to-one correspondence with the row number in the cross-area storage mapping metadata. This represents the 256-bit hash value of the i-th pre-stored ciphertext index entry in the salted encrypted shadow index; This represents the 256-bit hash value of the k-th ciphertext query condition in the query parameters. In the actual operation scenario of the provincial power data platform, this formula serves to: compare and determine the conditions. By leveraging the deterministic nature of hash functions, precise one-to-one key-value matching is achieved within the encrypted numerical space. When load forecasting applications query the electricity consumption behavior of several target users' meters, the index entries generated during the data entry phase and the query conditions generated during the query phase for the same meter number have identical 256-bit digest values due to triple homology constraints. Therefore, this equality determination can accurately hit the target row; and the operation... Ensure that when the query conditions contain multiple target meter numbers, the logical row identifiers that are independently matched by each encrypted query condition are summarized without omission and duplicates are eliminated.
[0033] Specifically, in the cross-regional joint query scenario of the power data platform, the core matching strategy adopted in the first embodiment of the dense spatial intersection comparison unit is hash string equality comparison. That is, the comparison engine checks the numerical equality of each query dense parameter with the salted dense shadow index. If a match is found, the corresponding logical row number is extracted; otherwise, it is skipped. This strategy implies a key assumption: all cross-regional joint query relationships are precise one-to-one key-value matches.
[0034] However, power system data naturally possesses a hierarchical tree structure, specifically a topological relationship of substation → feeder → distribution transformer area → user meter. When power dispatchers initiate a typical hierarchical analysis task—such as querying the electricity consumption behavior of all users under a certain substation—the query key is the substation number. The salted, dense shadow index actually stored in the high-sensitivity area is a hash digest generated based on the end-user meter number. Since the digest value of the substation number after SM3 salting hashing has no mathematically computable correlation with the digest value of any meter number under that substation after SM3 salting hashing, the avalanche effect of the hash function ensures that even if the input differs by only one bit, the output will be completely different. Therefore, the pure equality comparison of the original mechanism will return an empty result set in this scenario. Faced with this dilemma, the system had to revert to full table decryption mode, pulling all the encrypted data in the high-sensitivity area into memory for plaintext decryption before performing hierarchical matching. This not only rendered the carefully constructed encrypted index system in the preceding steps meaningless, but also reintroduced the security risks of decryption storms and plaintext leakage in memory, fundamentally violating the original design intention of on-demand decryption.
[0035] To address the aforementioned technical deficiencies, a second embodiment is proposed. More specifically, in another specific example of this application, Figure 4 This is a block diagram of a dense spatial intersection comparison unit in a power data middleware secure storage system based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 4As shown, the dense-state space intersection comparison unit 133 includes: a dense-state topology propagation matrix construction subunit 1331, used to perform recursive closure operation and homologous salted hash encoding on the ancestor path chains of each node in the salted dense-state shadow index based on the power grid topology edge relationship table to obtain the dense-state topology propagation matrix; a dual-channel dense-state matching subunit 1332, used to simultaneously input the query dense-state parameters into the precise comparison channel and the topology penetration channel, perform hash equality comparison on the salted dense-state shadow index and perform inverted index retrieval on the dense-state topology propagation matrix to obtain the precise hit row number set and the topology penetration hit row number set; and a dual-channel result fusion subunit 1333, used to perform set union operation and global deduplication aggregation on the precise hit row number set and the topology penetration hit row number set to obtain the intersection hit row vector.
[0036] Correspondingly, the dense-state topology propagation matrix construction subunit 1331 is used to perform recursive closure operations and homologous salted hash encoding on the ancestor path chains of each node in the salted dense-state shadow index based on the power grid topology edge relationship table to obtain the dense-state topology propagation matrix. It should be understood that after the power data platform completes data entry and the pre-construction of the dense-state shadow index, the salted dense-state shadow index only contains a flattened point-to-point index structure, meaning that each encrypted index entry corresponds to only one logical row identifier of a terminal leaf node. Therefore, the vertical dependency relationships between power grid equipment nodes cannot be perceived in the dense-state space. However, power system data naturally has a hierarchical tree structure, specifically a topological inclusion relationship from substation to feeder to distribution transformer area to user meter. When power dispatchers initiate hierarchical analysis tasks such as querying the electricity consumption behavior of all users under a certain substation, the query key is the substation number. The salted dense shadow index in the high-sensitivity partition is a hash digest generated based on the end user meter number. Since the digest value of the substation number after SM3 salting hashing is mathematically unrelated to the digest value of any meter number under that substation after SM3 salting hashing, the avalanche effect of the hash function ensures that even if the input differs by only one bit, the output will be completely different. Therefore, the core matching strategy based on hash string equality comparison in the first embodiment mentioned above will return an empty result set in this scenario, and the system has to fall back to the full table decryption mode. Therefore, in the technical solution of this application, based on the power grid topology edge relationship table, recursive closure operation and homologous salted hash encoding are performed on the ancestor path chains of each node in the salted dense shadow index to obtain the dense topology propagation matrix. This allows the physical hierarchy of the power grid to be pre-injected into the encrypted index system in the form of dense encoding. This enables the subsequent matching stage to perceive and utilize the hierarchical structure without exposing any plaintext topology information. When facing hierarchical penetration queries, all descendant data rows can be located at once through a single key-value retrieval, avoiding the system reverting to full table decryption mode.
[0037] In a specific example of this application, firstly, during the initialization phase of the power data platform or when the power grid topology changes, the system reads a power grid topology edge relationship table describing the hierarchical structure of the power grid from the power geographic information system. This table stores the parent-child node inclusion relationships between power grid devices in the form of a set of directed edges. In the operational scenario of the provincial power data platform, it includes multi-level directed edge records such as substation to feeder, feeder to distribution transformer area, and distribution transformer area to user meter. Next, the sub-unit performs a recursive closure operation on the power grid topology edge relationship table, backtracking along the directed edges from each leaf node to enumerate the complete path chain from the leaf node to all its ancestor nodes. In the operational scenario of the provincial power data platform, for a specific user meter, the recursive closure operation will enumerate the distribution transformer area to which the meter belongs, the feeder to which the distribution transformer area belongs, and the substation to which the feeder belongs, forming a complete ancestor path chain from the leaf to the root.
[0038] Then, the sub-unit performs a cryptographic transformation on the plaintext service identifier of each ancestor node in the path chain. Using the SM3 salted hash algorithm, which is completely identical to that used in the index construction phase of step one, it performs a high-low bit concatenation and one-way hash operation on the plaintext service identifier of the ancestor node and the global security salt value to generate the cryptographic identifier value of that ancestor node. The above cryptographic transformation operation of the ancestor node is expressed as follows:
[0039] in, Represents the first in the power grid topology tree The encrypted identifier value of each ancestor node after salted hash transformation This represents the SM3 cryptographic hash function. Indicates the first Plaintext service identifiers (such as substation numbers) of ancestor nodes. Indicates the global safety salt value. This represents the binary bit string concatenation operator. By performing a salted hash operation on the plaintext business identifier of the ancestor node that is completely identical to that used in the leaf node index construction phase, the substation number entered by the power dispatcher in the subsequent query phase can achieve an accurate numerical match with the ancestor secret identifier value pre-stored in the secret topology propagation matrix within the 256-bit hash space after being converted from the same source. Throughout the entire process, plaintext topology information such as substation number and feeder number will never be exposed outside the secret text index system.
[0040] Furthermore, after completing the dense-state encoding of the ancestor nodes, the sub-unit establishes an inverted index relationship between the transformed ancestor dense-state values and the entries of the leaf nodes in the salted dense-state shadow index. That is, the ancestor dense-state value is used as the search key, and the set of logical row numbers of all its descendant leaf nodes is used as the value. Finally, all ancestor dense-state values and their corresponding descendant row number sets are aggregated into a dense-state topology propagation matrix. The construction operation of the above inverted index structure is represented as follows:
[0041] in, The dense-state topological propagation matrix represents the state with the first... The set of logical row numbers of descendants obtained by retrieving the ancestor's secret state value as the key. This indicates the first [unit] in the power grid topology tree. The set of indices of all descendant leaf nodes of an ancestor node. This represents the logical row identifier corresponding to the i-th descendant leaf node. In the actual operation scenario of the provincial power data platform, for a certain substation node, its identifier value after dense-state encoding is... The key for the inverted index is the logical row identifier corresponding to all feeders, all distribution transformer areas, and all end-user meters under the substation. The values are aggregated into a set corresponding to the key. When subsequent queries use the substation's encrypted identifier value for retrieval, the system can retrieve all logical row identifiers of thousands of user meters under that substation at once, without needing to recursively traverse the topology tree one by one. It should be noted that this inverted index structure transforms the runtime recursive traversal of the power grid topology tree into a one-time offline construction during the pre-computation phase, thus reducing its time complexity from the online query phase to the entire... Recursively traverse each node. Full table scan reduced to only need to be executed during the online query stage. A single key-value retrieval can obtain all descendant row numbers, thereby solidifying the physical hierarchy of the power grid in the index system in the form of dense encoding. In the subsequent matching stage, the hierarchical structure can be perceived and utilized without exposing any plaintext topology information.
[0042] Correspondingly, the dual-channel dense-state matching subunit 1332 is used to simultaneously input the query dense-state parameters into the precise comparison channel and the topology penetration channel, perform hash equality comparison on the salted dense-state shadow index, and perform inverted index retrieval on the dense-state topology propagation matrix to obtain the precise hit row number set and the topology penetration hit row number set. It should be understood that after the dense-state topology propagation matrix is constructed, the core problem faced by the comparison engine of the cross-regional proxy layer is that the same set of query dense-state parameters may include both precise queries for specific end devices and hierarchical penetration queries for upper-level management nodes. The system cannot pre-determine which type of query intent it belongs to in the ciphertext space. If only the hash equality comparison strategy in the first embodiment is retained, the hierarchical penetration query will return an empty result set. If only the inverted index retrieval of the dense-state topology propagation matrix is relied upon, the precise query for specific end devices may be missed because the device number is not included in the matrix as an ancestor node. Therefore, in the technical solution of this application, the query dense state parameters are further input into both the precise comparison channel and the topology penetration channel simultaneously. A hash equality comparison is performed on the salted dense state shadow index, and a reverse index search is performed on the dense state topology propagation matrix to obtain the precise hit row number set and the topology penetration hit row number set. This simultaneously covers both precise query and hierarchical penetration query modes and avoids omissions. This ensures that regardless of whether the query object is a specific end meter, an upper-level substation, or a feeder, the system can achieve accurate positioning with full path coverage within the encrypted space. At the same time, the improved mechanism retains the ability to accurately locate specific end devices, ensuring backward compatibility.
[0043] In a specific example of this application, the comparison engine first receives query encrypted parameters output by the same-source encrypted conversion unit. In the operational scenario of a provincial power data platform, this set of query encrypted parameters may simultaneously contain encrypted query conditions generated by the same-source salted hash conversion of a specific user's meter number, and encrypted query conditions generated by the same-source salted hash conversion of a substation number. The comparison engine cannot pre-determine whether the query intent of each encrypted query condition is an exact query or a hierarchical penetration query in the encrypted space. To simultaneously cover these two query modes and avoid omissions, the comparison engine simultaneously opens two parallel matching channels for the input query encrypted parameters.
[0044] Next, Channel 1 is the exact match channel. The comparison engine performs a hash equality comparison between the query encrypted parameters and the salted encrypted shadow index. For each encrypted query condition in the query encrypted parameters, it iterates through all encrypted index entries in the salted encrypted shadow index, performing a bit-by-bit numerical equality check at the 256-bit binary string level. If a match is found, the corresponding logical row identifier is extracted and aggregated into an exact match row number set. The operation of the above exact match channel is represented as follows:
[0045] in, This indicates an exact match to the set of line numbers. This represents the logical row identifier of the i-th shadow index. This represents the i-th entry in the salted dense-state shadow index. This represents the k-th encrypted query condition in the encrypted parameters. In the actual operation scenario of a provincial power data platform, when a load forecasting application specifies a query for the electricity consumption record of a specific user's meter, the encrypted query condition generated after the meter number undergoes a homogeneous encrypted transformation is used. The salted dense shadow index entry generated for the meter number during the warehousing phase. Having identical 256-bit hash values, the equality determination condition is... Successful; the system accurately matches the logical row identifier corresponding to the meter. This channel retains the original mechanism's ability to accurately locate specific end devices, ensuring backward compatibility of the improved mechanism.
[0046] Then, channel two is the topology penetration matching channel. The comparison engine uses the same set of query dense parameters as keys and performs an inverted index search in the dense topology propagation matrix. If a match is found, it extracts the logical row identifier set of all descendant leaf nodes under that ancestor node at once, and outputs the topology penetration hit row number set. The above topology penetration matching channel operation is represented as follows:
[0047] in, This indicates that the topology has hit the set of line numbers. This represents the set of descendant row numbers retrieved from the dense-state topology propagation matrix using the k-th query dense-state parameter as the key. In the actual operation scenario of a provincial power data platform, when power dispatchers initiate a hierarchical penetration analysis task to query the electricity consumption behavior of all users under a certain substation, the encrypted query conditions generated after the substation number undergoes homogeneous dense-state transformation are used. The dense-state topology propagation matrix is used as the retrieval key. Since this matrix has already established an inverted index relationship between the dense-state identifier value of the substation and the logical row identifier set of all its descendant leaf nodes during the pre-construction stage, the system only needs to execute it once. A simple key-value retrieval can retrieve all logical row identifiers of thousands of user meters under a substation in one go, and the entire process is completed entirely in the encrypted space without any plaintext leakage. This channel allows business personnel to locate the data rows of thousands of users under a substation at once using only the encrypted value of a substation number, and the entire process is completed entirely in the encrypted space. This fundamentally solves the technical defect of the hash equality comparison strategy in the first embodiment that returns an empty result set in a hierarchical penetration query scenario.
[0048] Accordingly, the dual-channel result fusion subunit 1333 is used to perform a set-and operation and global deduplication aggregation on the exact hit row number set and the topology penetration hit row number set to obtain the intersection hit row vector. It should be understood that after the two parallel channels independently produce matching results, there exists a boundary case: a certain meter is both exactly hit by channel one (because the query condition directly contains the meter number) and, as a descendant of a certain substation, is topology-penetrated by channel two. In this case, the same logical row number will appear repeatedly in both the exact hit row number set and the topology penetration hit row number set. If it is directly passed to the subsequent on-demand decryption stage without processing, it will cause the same ciphertext fragment to be repeatedly read and decrypted, resulting in unnecessary disk I / O overhead and CPU decryption resource waste. Therefore, in the technical solution of this application, the exact hit row number set and the topology penetration hit row number set are further set-and operated and globally deduplicated to obtain the intersection hit row vector, thereby eliminating the row number redundancy generated by the dual-channel parallel matching. This ensures that regardless of whether the queried object is a specific end device or an upper-level management node, the system can accurately locate the entire path in the ciphertext space, and the output row vector has no redundancy or repetition, avoiding repeated I / O operations in the subsequent on-demand decryption stage.
[0049] In a specific example of this application, firstly, the exact match row number set is received from the exact comparison channel, and the topology penetration match row number set is received from the topology penetration channel. In the operation scenario of the provincial power data platform, when a multi-source joint query request initiated by the power dispatcher simultaneously includes the meter number of a specific user and the substation number to which the meter belongs, the exact match row number set contains the logical row identifiers of the meter directly matched by the hash equality comparison of channel one, and the topology penetration match row number set contains the set of logical row identifiers of all descendant meters under the substation matched by the inverted index retrieval of channel two. The logical row identifier of the specific meter appears in both result sets. Next, the fusion subunit performs a set union operation on the exact match row number set and the topology penetration match row number set as two input sets, merging all logical row identifiers in the two sets into the same result space. During the merging process, a global deduplication and aggregation operation is performed on the result space, retaining only one copy of the same logical row identifier that appears repeatedly in the two input sets, thus eliminating the row number redundancy caused by the parallel matching of the two channels. Then, the fusion subunit sorts all the deduplicated logical row identifiers in ascending numerical order, encapsulates them into a one-dimensional array structure, and outputs the intersection-hit row vector. The above dual-channel result fusion operation is represented as:
[0050] in, This indicates the intersection of the final output row vectors. This indicates an exact match to the set of line numbers. This indicates that the topology has hit the set of line numbers. This represents a set union operation (including implicit deduplication), ensuring that only one copy of the same logical row number is retained. In the actual operation scenario of a provincial power data platform, set union operations... Accurately compare the end-device level hit results generated by the channel. Hierarchical penetration hit results generated by topology penetration channel Lossless merging is performed, and the implicit deduplication mechanism ensures that when a user's meter is simultaneously hit by two channels, its logical row identifier will match the row vector in the final intersection. It appears only once, thus avoiding repeated disk-oriented reading and decryption operations on the same encrypted fragment during the subsequent on-demand data extraction stage.
[0051] Through this fusion, regardless of whether the query target is a specific end device or an upper-level management node, the system can achieve precise positioning with full path coverage in the encrypted space, and the output intersection hit row vectors have no redundancy or duplication, avoiding repeated I / O operations in the subsequent on-demand decryption stage. Combining the above three sub-steps of encrypted topology propagation matrix construction, dual-channel parallel matching, and dual-channel result fusion, by introducing the encrypted topology propagation matrix and dual-channel parallel matching mechanism, the system achieves computable propagation and penetrating matching of power grid hierarchical topology subordination relationships in the encrypted space without decrypting any highly sensitive data. When power dispatchers initiate cross-level joint queries involving upper-level management nodes such as substations and feeders, the system does not need to fall back to the full table decryption mode. It can locate all descendant data rows at once by simply using the inverted index retrieval of the encrypted topology propagation matrix. This compresses the operation that originally required decrypting and traversing the full amount of data in the highly sensitive area into precise, targeted extraction of a small number of rows, significantly reducing the CPU decryption load and peak memory usage of the middle platform computing nodes. Meanwhile, since the hierarchical penetration matching is completed entirely in the encrypted space, the plaintext data in the high-sensitivity area is never exposed in memory, fundamentally blocking the decryption storm and memory-side channel leakage risks reintroduced due to hierarchical query rollback, ensuring that the security boundaries of partition isolation and encrypted storage remain intact and effective when facing complex topology query scenarios.
[0052] In summary, by introducing a dense-state topology propagation matrix and a dual-channel parallel matching mechanism, the computable propagation and penetrating matching of power grid hierarchical topology relationships in the encrypted space are achieved without decrypting any highly sensitive data. Specifically, when power dispatchers initiate cross-level joint queries involving upper-level management nodes such as substations and feeders, the system does not need to fall back to full-table decryption mode; it can achieve computable propagation and penetrating matching solely through the dense-state topology propagation matrix. Inverted index retrieval can locate all descendant data rows at once, thus eliminating the need for decrypting and traversing the entire dataset in the high-sensitivity region. The operation is compressed into precise, small-scale row-level targeted extraction, significantly reducing the CPU decryption load and peak memory usage of the middleware computing nodes. Simultaneously, because the hierarchical penetration matching is completed entirely within the encrypted space, plaintext data in highly sensitive areas is never exposed to memory. This fundamentally blocks the decryption storms and memory-side channel leakage risks reintroduced due to hierarchical query rollback, ensuring that the security boundaries of partition isolation and encrypted storage remain intact and effective even in complex topology query scenarios.
[0053] In the aforementioned secure storage system 100 for power data middleware based on partitioned isolation and encrypted storage, the on-demand data extraction module 140 is used to extract on-demand data based on the mapping metadata of cross-regional storage mapping metadata and the ciphertext slices corresponding to the hit rows in the encrypted data fragments, in order to obtain the target accurate ciphertext stream. It should be understood that since the intersection hit row vector output after the encrypted space intersection comparison only contains a set of logical row identifiers that satisfy the association conditions, this set is purely logical-level location information. However, the actual ciphertext data to be extracted is distributed across different disk sectors of physically isolated storage media. There is an indirect mapping relationship between the logical row identifiers and the physical storage coordinates. The system cannot directly read the corresponding ciphertext slices from the disk based solely on the logical row identifiers. If a full sequential scan of the encrypted data fragments is used to match the hit rows one by one, a large amount of invalid disk I / O overhead will be generated. Therefore, in the technical solution of this application, based on the intersection of the hit row vectors, on-demand data extraction based on the mapping metadata is performed on the ciphertext slices corresponding to the hit rows in the cross-region storage mapping metadata and encrypted data slices to obtain the target precise ciphertext stream. This utilizes the precise mapping relationship between logical row numbers and physical disk coordinates pre-built during the data ingestion stage to achieve row-level precision ciphertext extraction. In this way, disk I / O operations can be precisely limited to a very small number of disk sectors corresponding to the hit rows, avoiding sequential traversal of the full encrypted data slices of high-sensitivity partitions, significantly reducing the bandwidth consumption and response latency of the storage subsystem, while ensuring that the ciphertext data that is not hit is never touched.
[0054] Figure 5 This is a block diagram of the on-demand data extraction module in a power data middleware secure storage system based on partitioned isolation and encrypted storage, according to an embodiment of this application. Figure 5As shown, the on-demand data extraction module 140 includes: an index retrieval and physical coordinate extraction unit 141, used to perform index retrieval and physical coordinate extraction on cross-region storage mapping metadata based on the logical row number in the intersection hit row vector to obtain a target physical block address set; a local directional reading unit 142, used to perform local directional reading on the disk sector precisely located in the encrypted data fragment based on the target physical block address set to obtain a hit ciphertext slice set; and an ordered splicing and streaming injection unit 143, used to perform ordered splicing and streaming injection on the hit ciphertext slice set in a time sequence based on a dedicated data transmission pipeline to obtain a target precise ciphertext stream.
[0055] Specifically, in a specific example of this application, firstly, the index retrieval and physical coordinate extraction unit receives the intersection hit row vector output by the dense state transformation and matching module, extracts each hit logical row identifier contained therein, and performs a primary key index lookup in the cross-region storage mapping metadata using the logical row identifier as the retrieval key. The cross-region storage mapping metadata is organized in a B+ tree index structure, and each mapping record contains four fields: fragment global number, logical row number, disk starting offset, and storage byte length. After locating the mapping record corresponding to the hit logical row identifier through index matching, the unit extracts two physical coordinate parameters, namely the disk starting offset and the storage byte length. The physical coordinate parameters obtained after retrieval of all hit logical row identifiers in the intersection hit row vector are then systematically aggregated and encapsulated as a target physical block address set.
[0056] Next, the local targeted read unit receives the target physical block address set. For each set of physical coordinate parameters, it sends a targeted read instruction to the underlying storage control interface. This instruction explicitly specifies the disk starting offset and byte length to be read. The storage controller uses direct I / O mode to bypass the operating system page cache and directly positions the disk read / write head to the specified starting sector address. It only reads the encrypted data blocks within the specified byte length range. In the operation scenario of the provincial power data platform, when the intersection hits the row vector containing the logical row identifiers of several target user meters, the local targeted read unit only extracts the encrypted electricity consumption sequence ciphertext slices corresponding to these meters from the physically isolated storage medium. The remaining tens of millions of non-hit encrypted data slices on the same disk array are completely untouched. The unit aggregates and encapsulates all the ciphertext data blocks returned by the targeted read operation into a set of hit ciphertext slices.
[0057] Finally, the ordered splicing and streaming injection unit initializes a dedicated data transmission pipeline based on zero-copy memory technology between the storage node and the downstream isolation decryption sandbox. This pipeline directly completes the address mapping of the data buffer in kernel mode without data copying between user mode and kernel mode, thereby reducing the CPU overhead in the data handling process. Further, the unit reads each discrete ciphertext slice from the set of hit ciphertext slices, arranges them in order according to the temporal sequence of their corresponding logical row identifiers, and injects the arranged ciphertext slices sequentially into the dedicated data transmission pipeline for streaming splicing. This ultimately forms a continuous, target-precise ciphertext stream that can be processed byte-by-byte by the downstream isolation decryption sandbox. This target-precise ciphertext stream contains only the ciphertext content of a very small number of target data rows specified by the intersection hit row vectors. Its data volume is reduced by several orders of magnitude compared to the full-volume encrypted data fragmentation of the high-sensitivity partition, providing a precise and lightweight input data source for the subsequent streaming dynamic decryption stage.
[0058] In the aforementioned secure storage system 100 for power data middleware based on partitioned isolation and encrypted storage, the streaming dynamic decryption and aggregation module 150 is used to perform streaming dynamic decryption and business aggregation on the target precise ciphertext stream within an isolated decryption sandbox to generate power middleware security analysis results. It should be understood that although the target precise ciphertext stream output after the on-demand data extraction stage has precisely compressed its data volume from the fully encrypted data fragments of the high-sensitivity partition to a very small number of ciphertext fragments containing only the hit rows, this data stream is still in a ciphertext state after being encrypted with the national standard SM4. It cannot directly participate in any business-level numerical calculations and statistical analyses. The system needs to restore it to plaintext before it can be associated and aggregated with reference data such as the power grid topology metadata of the low-sensitivity partition to generate meaningful business analysis results. Furthermore, if the plaintext data generated during the decryption process is exposed in the public memory space of the middleware computing nodes, it still faces the security risks of memory-side channel theft or unauthorized inter-process reading. Therefore, in the technical solution of this application, within the isolated decryption sandbox, the target precise encrypted stream is dynamically decrypted and aggregated in a streaming manner to generate the power platform security analysis results. This completely encloses the decryption and business aggregation operations within a controlled environment protected by hardware-level memory isolation, ensuring that the plaintext data does not escape the sandbox boundary throughout its entire lifecycle from generation to destruction. In this way, while releasing the business value of highly sensitive power data, the scope of plaintext exposure is strictly limited to the isolated memory area of the micro sandbox, and all plaintext traces are immediately destroyed after the results are output, thus sealing off memory leaks during the decryption stage from a physical hardware level.
[0059] Specifically, in this embodiment, the streaming dynamic decryption and aggregation module is used to: perform byte-by-byte streaming reverse permutation and restoration of the target precise ciphertext stream based on the system symmetric decryption key within a temporary decryption sandbox protected by hardware-level memory isolation to obtain a dynamic plaintext data stream; perform multi-source heterogeneous fusion and business aggregation of the dynamic plaintext data stream and the plaintext reference dataset based on logical row identifiers to obtain a business aggregation calculation intermediate state; perform desensitization review and formatted sequence encapsulation on the business aggregation calculation intermediate state to generate the power platform security analysis results, and trigger sandbox memory overwrite and erasure to eliminate plaintext residue traces.
[0060] More specifically, in a specific example of this application, firstly, a temporary decryption sandbox protected by hardware-level memory isolation is opened in the physical memory of the middle platform computing node. This sandbox achieves physical isolation from external processes through the memory encryption and access control mechanism provided by the processor. No unauthorized external process, operating system kernel module or debugging probe can read the data content in this memory area. After the sandbox is initialized, the module obtains the system symmetric decryption key from the system key management service through a secure communication channel and loads it into the key register inside the sandbox. At the same time, the output port of the dedicated data transmission pipeline is mapped to the input buffer of the sandbox, so that the target precise ciphertext stream can be continuously injected into the sandbox in a streaming manner.
[0061] Next, the national cryptographic SM4 decryption engine is activated inside the sandbox to perform byte-by-byte reverse permutation and restoration operations on the target precise ciphertext stream that continuously flows in through the pipeline. The SM4 decryption engine uses 128 bits as a block unit and performs 32 rounds of reverse nonlinear iterative transformation on each ciphertext block using the system's symmetric decryption key, which is completely symmetrical to the encryption phase, to restore the ciphertext block to the corresponding plaintext block. In the operation scenario of the provincial power data platform, the restored plaintext data contains highly sensitive business data such as the real-time load power value of the target user's electricity meter, the cumulative electricity consumption, and the electricity meter collection timestamp. After all ciphertext blocks are decrypted one by one, they are aggregated into a dynamic plaintext data stream according to the original time sequence. This dynamic plaintext data stream resides in the isolated memory area of the sandbox from the time it is generated and is not visible to the outside.
[0062] Then, within the sandbox, multi-source heterogeneous fusion and business aggregation are performed on the dynamic plaintext data stream and the plaintext reference dataset based on logical row identifiers. The plaintext reference dataset is public data such as the connection relationship of power grid topology nodes, transformer area number and power supply range stored in the low-sensitivity partition. The module performs an inner join operation on each user electricity consumption record in the dynamic plaintext data stream and the corresponding transformer area topology information in the plaintext reference dataset through logical row identifiers or business foreign keys to form a complete wide data table containing electricity consumption data and topology attribution. On this basis, specific power business statistical algorithms are executed. In the operation scenario of the provincial power data platform, the line loss rate analysis or peak-valley load distribution aggregation calculation is performed for the specified transformer area, and the calculation results are output as the intermediate state of business aggregation calculation.
[0063] Finally, the intermediate state of business aggregation calculation is subjected to de-identification review to verify whether its summary-level statistical indicators pose a risk of inferring individual user privacy characteristics. Data that passes the review is then formatted and encapsulated, structured and encoded according to the data exchange format required by the business application layer. This generates the power platform security analysis results, which are returned to the upper-layer business application that initiated the multi-source joint query request via a secure output channel. After the power platform security analysis results are output, the module immediately triggers a sandbox memory overwrite and erase command, writing random binary scrambled characters into the entire memory address space occupied by the sandbox. This byte-by-byte overwrites all traces of the dynamic plaintext data stream, the intermediate state of business aggregation calculation, and the system's symmetric decryption key remaining in memory, ensuring that no plaintext information that can be recovered by subsequent processes remains in this memory area after the sandbox is released. This achieves closed-loop security control of highly sensitive power data throughout its entire lifecycle, from decryption and calculation to destruction.
[0064] In summary, the secure storage system for power data middleware based on partition isolation and encrypted storage according to the embodiments of this application is explained. During the data ingestion and encryption phase, a salted, encrypted shadow index, stripped of business load, is simultaneously constructed for the primary keys of highly sensitive data. This ensures that the key-value information required for association matching exists independently of the data load in an irreversible encrypted form. When a cross-regional joint query arrives, the system performs a homologous encrypted transformation on the query parameters and directly compares the intersection with the shadow index within the encrypted space. This accurately locates a very small number of target data row numbers that meet the association conditions, rather than touching the entire encrypted text. Subsequently, only the encrypted slices corresponding to the matched row numbers are extracted and pushed to an isolated sandbox for streaming decryption and business aggregation. Through this mechanism, cross-regional queries do not require full table decryption of highly sensitive partitions. The decryption granularity is refined from the partition level to the row level, fundamentally eliminating the resource impact of decryption storms on computing nodes. Simultaneously, the plaintext exposure range is compressed to a micro-sandbox protected by hardware isolation, effectively blocking the risk of memory-side channel leakage.
Claims
1. A secure storage system for power data middleware based on partitioned isolation and encrypted storage, characterized in that, include: The index and data block pre-construction module is used to classify and classify the raw power data stream and pre-construct the dense shadow index based on the preset power data classification and classification directory to obtain the salted dense shadow index and partitioned power data blocks. The partition isolation storage and mapping module is used to perform partition isolation storage and encrypted fragment mapping on partitioned power data blocks based on partition routing strategies to obtain encrypted data fragments and cross-region storage mapping metadata. The dense state transformation and matching module is used to respond to multi-source joint query requests. It performs dense state transformation on the association parameters in the query conditions to obtain the transformed association parameters, and performs dense state shadow matching on the transformed association parameters and the salted dense state shadow index in the cross-region proxy layer to obtain the intersection hit row vector. The on-demand data extraction module is used to extract ciphertext slices corresponding to the hit rows in cross-region storage mapping metadata and encrypted data shards based on the intersection hit row vectors to obtain the target accurate ciphertext stream. The streaming dynamic decryption and aggregation module is used to perform streaming dynamic decryption and business aggregation on the target precise ciphertext stream within an isolated decryption sandbox to generate power platform security analysis results.
2. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 1, characterized in that, The raw power data stream contains user electricity consumption sequences, grid topology metadata, and equipment operation logs.
3. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 2, characterized in that, The index and data block pre-construction module is used for: Based on the security level rules in the power data classification and grading catalog, threshold comparison and sensitivity identification are performed on the feature fields in the original power data stream to obtain the labeled power data stream. The association primary key is extracted and the data is partitioned and routed for highly sensitive entries in the marked power data stream to obtain the association primary key and partitioned power data blocks; The associated primary key and the global security salt value are concatenated with high and low bits and a one-way hash operation is performed to obtain the salted dense shadow index.
4. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 1, characterized in that, The partition isolation storage and mapping module is used for: The highly sensitive business loads in the partitioned power data blocks are parsed and encrypted with national cryptographic standards at the field level to obtain the logical row number sequence and encrypted data fragments. Through the underlying storage control interface, encrypted data fragments are physically isolated and written to disk, and offsets are captured to obtain a set of disk offsets. Using the global partition number as the association key, the logical row number sequence and disk offset set are bound to structured tuples and serialized to obtain cross-segment storage mapping metadata.
5. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 1, characterized in that, The dense state transformation and matching module includes: The condition scanning and key-value extraction unit is used to scan and extract key-values from the filtering and association conditions in the multi-source joint query request through the abstract syntax tree parsing engine to obtain plaintext association parameters; The homologous secret state conversion unit is used to perform homologous secret state conversion on the plaintext association parameters and the global security salt value to obtain the query secret state parameters; The dense space intersection comparison unit is used in the comparison engine of the cross-region proxy layer to perform dense space intersection comparison between the query dense parameters and the salted dense shadow index to obtain the intersection hit row vector.
6. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 1, characterized in that, The on-demand data extraction module includes: The index retrieval and physical coordinate extraction unit is used to perform index retrieval and physical coordinate extraction on cross-region storage mapping metadata based on the logical row number in the intersection hit row vector to obtain the target physical block address set. The local directional reading unit is used to perform local directional reading of the disk sector that is precisely located in the encrypted data fragment based on the target physical block address set in order to obtain the set of hit ciphertext fragments. The ordered splicing and streaming injection unit is used to sequentially splice and stream inject the hit ciphertext slice set according to time based on a dedicated data transmission pipeline to obtain the target accurate ciphertext stream.
7. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 1, characterized in that, The streaming dynamic decryption and aggregation module is used for: Within a temporary decryption sandbox protected by hardware-level memory isolation, the target precise ciphertext stream is subjected to byte-by-byte reverse permutation and restoration based on the system's symmetric decryption key to obtain a dynamic plaintext data stream; Based on logical row identifiers, multi-source heterogeneous fusion and business aggregation are performed on dynamic plaintext data streams and plaintext reference datasets to obtain intermediate states for business aggregation calculation. The intermediate state of business aggregation calculation is de-identified and formatted into a sequence to generate the security analysis results of the power platform, and the sandbox memory is overwritten and erased to eliminate plaintext residues.
8. The secure storage system for power data middleware based on partitioned isolation and encrypted storage according to claim 1, characterized in that, The dense-state spatial intersection comparison unit includes: The dense-state topology propagation matrix construction sub-unit is used to perform recursive closure operation and homologous salted hash encoding on the ancestor path chain of each node in the salted dense-state shadow index based on the power grid topology edge relationship table to obtain the dense-state topology propagation matrix; The dual-channel dense-state matching subunit is used to simultaneously input the query dense-state parameters into the exact comparison channel and the topology penetration channel, perform hash equality comparison on the salted dense-state shadow index and perform inverted index retrieval on the dense-state topology propagation matrix to obtain the exact hit row number set and the topology penetration hit row number set. The dual-channel result fusion subunit is used to combine and operate on the exact hit row number set and the topology penetration hit row number set to obtain the intersection hit row vector through global deduplication aggregation.
