Role-based cross-store sub-account transaction management method and system

CN122948587APending Publication Date: 2026-10-20XIAMEN FINGERPRINT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611429208.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]随着跨店铺业务量和并发请求不断增加,上述依赖预先设定权限规则和异步日志记录的方式逐渐暴露出不足,静态访问控制通常只维护用户与角色之间的权限对应关系,难以根据请求发生时的网络环境和单笔交易金额及时调整权限判定,进行全局报表统计时,还需要同时兼顾不同店铺之间的数据隔离要求;如果直接调取各店铺的全部交易明细,会增加网络传输开销,而采用集中存储方式时,在并发查询过程中又存在非授权访问其他店铺敏感数据的风险,此外,异步日志通常独立记录操作结果,与交易对象实际发生的状态变化缺少直接关联,难以形成完整、可靠的权责审计记录

Benefits of technology

[0024]1、在基于角色的跨店铺子账号交易管理中,通过三维权限拓扑空间将子账号的访问权限进一步落实到具体店铺和具体交易操作,并结合请求发生时的网络环境、交易金额及设备状态进行动态判定,使子账号权限不再仅依赖固定的角色配置,在跨店铺业务中,可以根据实际请求环境及时识别并阻断不符合权限要求的操作,从而降低异常网络环境或非常规操作引起的资金越权处理风险,提高多店铺交易权限管理的准确性和安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
Patent Text Reader

Abstract

This invention relates to the field of information and communication technology, and discloses a role-based cross-store sub-account transaction management method and system, including: constructing a three-dimensional permission topology space for store nodes and business positions and binding dynamic constraint parameter sets; intercepting transaction request messages, extracting context parameters to calculate instantaneous risk values ​​to issue dynamic authentication tokens; constructing a virtual view projection containing tenant isolation predicates at the database access layer based on the authentication tokens, and issuing sharded isolated calculation flows for cross-store aggregate statistics; capturing state machine transition state pairs, combining cumulative hash values ​​to generate incremental chained audit hash signatures and writing them to read-only storage media. This invention overcomes the limitations of static permission configuration, has the ability to dynamically block high-risk unauthorized operations in real time, and achieves immutable and accurate traceability of rights and responsibilities while eliminating the risk of cross-database leakage of detailed data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information and communication technology, and in particular relates to a role-based cross-store sub-account transaction management method and system. Background Technology

[0002] In multi-store e-commerce operations, companies typically manage multiple independent stores in a unified manner. Sub-accounts of various business positions need to handle business such as order inquiries, fund settlements, and report statistics across stores. Existing technologies usually use a platform-independent account system or a static role-based access control method to manage sub-account permissions, and combine physical database sharding or centralized storage to save and process transaction data, while recording user operation processes through asynchronous logs.

[0003] As cross-store business volume and concurrent requests continue to increase, the aforementioned methods relying on pre-defined permission rules and asynchronous logging are gradually revealing their shortcomings. Static access control typically only maintains the permission mapping between users and roles, making it difficult to adjust permission judgments in a timely manner based on the network environment at the time of the request and the amount of a single transaction. When performing global report statistics, it is also necessary to consider the data isolation requirements between different stores. Directly retrieving all transaction details from each store would increase network transmission overhead, while using centralized storage poses a risk of unauthorized access to sensitive data of other stores during concurrent queries. In addition, asynchronous logs typically record operation results independently, lacking a direct correlation with the actual state changes of the transaction object, making it difficult to form a complete and reliable record of rights and responsibilities auditing.

[0004] Therefore, in multi-store collaborative transaction scenarios, the technical problem to be solved by this invention is how to dynamically control access based on store, account permissions, and request environment, to complete cross-store data aggregation while avoiding cross-database exposure of single transaction details, and to make audit records correspond to changes in transaction status, forming transaction traceability records that can be prevented from being tampered with. Summary of the Invention

[0005] To address the problems in the background technology, the technical solution of the present invention is as follows: A role-based cross-store sub-account transaction management method, comprising the following steps:

[0006] Step S1: For the store nodes and business positions managed by the main account, construct a three-dimensional permission topology space containing sub-account identifiers, store node identifiers and transaction permission meta-dimensions. Configure role permission vectors for sub-accounts in each store node and bind a dynamic constraint parameter set containing transaction amount limits, operation IP network segment whitelists and sensitivity level masks.

[0007] Step S2: Intercept the transaction request message of the sub-account for the target store, extract the sub-account identifier, target store identifier, operation action type and transaction payload characteristics, and combine them with the environment context parameters into the authentication engine to match and judge with the role permission vector and dynamic constraint parameter set. When the judgment is successful, issue a dynamic authentication token with a single transaction validity period.

[0008] Step S3: Based on the dynamic authentication token, construct a virtual view projection containing tenant isolation predicates at the database access layer; inject target store identifier filtering predicates and process field desensitization for single store queries; and issue sharded isolated calculation streams for cross-store aggregate statistics and merge encrypted tuples of local indicators returned by each independent database within a security sandbox.

[0009] Step S4: Capture the state machine transition state pairs of the target transaction object and calculate the transaction payload digest. Extract the cumulative hash value of the previous audit node. Concatenate the sub-account identifier, target store identifier, operation action type, state machine transition state pairs, transaction payload digest, and timestamp into an audit metadata block. Combine the cumulative hash value with a cascaded hash operation to generate an incremental chained audit hash signature and write it to a read-only storage medium.

[0010] Preferably, in step S2, the dynamic authentication token includes a time-limited lifecycle management mechanism, with its effective lifecycle configured to be 10s to 120s. After a single database transaction is committed or rolled back, it is automatically physically destroyed by the authentication engine. At the same time, the unique hash value of the destroyed dynamic authentication token is loaded into a short-term anti-replay cache blacklist. When a duplicate request carrying the same dynamic authentication token is detected, the circuit breaker is directly triggered.

[0011] Preferably, in step S3, the process of constructing a virtual view projection containing tenant isolation predicates at the database access layer includes: Step S31, the database access proxy intercepts business data query statements and parses the abstract syntax tree structure of the query statements; Step S32, the table name node and condition filter clause node in the abstract syntax tree are extracted, the target store identifier contained in the dynamic authentication token is encapsulated as a tenant strong isolation Boolean predicate, and the tenant strong isolation Boolean predicate is injected into the root logical condition branch of the abstract syntax tree; Step S33, for the target query field list in the abstract syntax tree, the sensitivity level mask is traversed and matched, and the projected field node is replaced with a preset irreversible desensitization hash transformation function or mask truncation function to reconstruct and generate a target query syntax tree with isolation constraints; Step S34, the reconstructed target query syntax tree is converted into a physical query instruction of the underlying database and sent to the storage node.

[0012] Preferably, in step S3, the field desensitization process performs hierarchical mask replacement on the query result set based on the sensitivity level mask. Specifically, this includes: when the sensitivity level mask is the highest level, the middle four characters of the buyer's mobile phone number are masked and replaced; the last four characters of the bank card number are retained and the remaining characters are masked and replaced; and the last name of the buyer's name is retained and the first name is masked and replaced. When the sensitivity level mask is the medium level, the detailed house number and building information in the buyer's contact address are truncated by masking, while retaining the provincial, municipal, and district-level administrative division text.

[0013] Preferably, in step S3, the process of distributing sharded isolated computation streams for cross-store aggregated statistics includes: Step S35, the master node parses the metrics and statistical dimensions in the multi-store cross-domain aggregated statistics request, and generates... A segmented sub-query plan targeting an independent store sub-database, in which The total number of store nodes involved in the request and The value is a positive integer greater than or equal to 2; Step S36: The master node distributes the sharded sub-query plan in parallel to the independent physical databases corresponding to each store node through the asynchronous communication channel; Step S37: The local computing unit of each store node filters and matches transaction records within the independent physical database, and calculates the number of transactions, the total transaction amount, and the total refund amount for a single store within the local computing unit, constructing an encrypted tuple containing the sample size and local statistics; Step S38: The master node receives the encrypted tuples returned by each independent physical database within the security sandbox, and in an isolated state without retrieving the original transaction details for a single transaction, performs scalar accumulation on the number of transactions, the total transaction amount, and the total refund amount for a single store in each encrypted tuple, and outputs the global total number of transactions, the global total transaction amount, and the global total refund amount.

[0014] Preferably, in step S4, the process of capturing state machine transition pairs during transaction flow includes: Step S41, the transaction control module attaches a business state monitoring aspect to the transaction context to intercept the lifecycle events of the target order entity; Step S42, the pre-transaction business state code of the target order entity before the start of the transaction is read, and the target post-transaction business state code of the transaction's intended commit stage is obtained; Step S43, the pre-transaction business state code and the target post-transaction business state code are encoded into a one-way state transition vector, the state transition vector including at least one of the following: transition from pending payment state to paid state, transition from paid state to refunded state, transition from paid state to shipped state, and transition from shipped state to completed state; Step S44, the order identifier, transaction amount, and operation reason fields in the transaction request message are extracted, and a fixed-width transaction payload digest is generated by calculating using a secure hash algorithm.

[0015] Preferably, in step S4, the process of generating the incremental chained audit hash signature includes: Step S45, according to a preset fixed-length byte encoding protocol, concatenating the cumulative hash value of the previous audit node, the unique identifier of the sub-account, the identifier of the target store, the operation action code, the state machine transition state pair, the transaction payload digest, and the nanosecond-level physical timestamp to construct a continuous byte sequence; Step S46, using a secure hash algorithm to perform hash operation on the continuous byte sequence, and outputting a fixed-length hash digest as the incremental chained audit hash signature of the current transaction; Step S47, combining the incremental chained audit hash signature, the audit metadata block of the current transaction, and the cumulative hash value of the previous audit node into an immutable audit log entry, which is written to the underlying read-only storage medium along with the transaction business data.

[0016] Preferably, step S4 further includes an integrity verification step based on incremental chained audit hash signature, specifically including: step S48, the audit verification node sequentially traverses and reads historical audit log entries in the read-only storage medium; step S49, extracts the cumulative hash value of the previous audit node recorded in the target audit log entry and the audit metadata block of the current entry, and recalculates the expected hash signature of the target audit log entry; step S410, compares whether the expected hash signature is completely consistent with the incremental chained audit hash signature stored in the target audit log entry; step S411, when the comparison result is inconsistent, locks the transaction corresponding to the current audit log entry as an abnormal tampering point, and outputs a security alarm message containing the tampered entry sequence number, the store node identifier involved, and the tampered state transition vector.

[0017] Preferably, in step S1, the three-dimensional permission topology space also includes a dynamic authorization flow and a rights and responsibilities time-limit decay mechanism, specifically including: Step S11, when the main account grants temporary cross-store collaboration permissions to a specified sub-account, a derived permission vector is generated at the intersection coordinates of the sub-account identifier and the target store node in the three-dimensional permission topology space; Step S12, a rights and responsibilities lifetime constraint containing an absolute timestamp is written into the derived permission vector; Step S13, when processing a transaction request message, the permission authentication engine compares the current environment timestamp with the absolute timestamp; Step S14, when the current environment timestamp exceeds the absolute timestamp, the authentication engine automatically erases the derived permission vector in the three-dimensional permission topology space and restores the original permission configuration of the sub-account on the target store node.

[0018] A role-based cross-store sub-account transaction management system is used to implement a role-based cross-store sub-account transaction management method, including: a permission configuration module, an interception and authentication module, a view aggregation module, and a hash auditing module;

[0019] The permission configuration module is used to build a three-dimensional permission space for store nodes and business positions, configure role permission vectors for sub-accounts and bind a dynamic constraint parameter set that includes transaction amount limits, operation IP network segment whitelists and sensitivity level masks;

[0020] The interception and authentication module, connected to the permission configuration module, is used to intercept transaction request messages, extract corresponding features, combine them with environmental context parameters, and input them into the authentication engine. The engine then determines whether to match the authentication with the role permission vector and dynamic constraint parameter set. If the determination is successful, a dynamic authentication token with an expiration date is issued.

[0021] The view aggregation module receives dynamic authentication tokens and is used to build a virtual view projection with tenant isolation predicates at the database access layer. For single-store queries, it injects filtering predicates and handles field desensitization. For cross-store aggregation statistics, it distributes sharded isolated calculation streams and merges local indicator encrypted tuples in a security sandbox.

[0022] The hash audit module connects to the data link and is used to capture state machine transition state pairs and calculate transaction payload summaries. It extracts the cumulative hash value of the previous audit node, concatenates the operation characteristics, state machine transition state pairs and timestamps into audit metadata blocks, and generates incremental chained audit hash signatures by combining the cumulative hash value and writes them to read-only storage media.

[0023] Compared with existing technologies, the role-based cross-store sub-account transaction management method and system of the present invention has the following advantages:

[0024] 1. In role-based cross-store sub-account transaction management, the access permissions of sub-accounts are further implemented to specific stores and specific transaction operations through a three-dimensional permission topology space. The network environment, transaction amount and device status at the time of the request are dynamically judged, so that the sub-account permissions no longer depend solely on fixed role configurations. In cross-store business, operations that do not meet the permission requirements can be identified and blocked in a timely manner according to the actual request environment, thereby reducing the risk of unauthorized fund processing caused by abnormal network environment or unconventional operations and improving the accuracy and security of multi-store transaction permission management.

[0025] 2. By setting tenant isolation constraints at the database access layer and having each store complete local statistics before aggregating local metrics, cross-store aggregation statistics can be completed while maintaining the isolation of transaction data between different stores. During the statistical process, there is no need to centrally retrieve the original transaction details of each store, which can reduce the network burden caused by the transmission of a large amount of detailed data across databases. At the same time, it reduces the risk of unauthorized access or leakage of sensitive transaction data during cross-store queries, so that data isolation and global report statistics can be taken into account.

[0026] 3. By establishing a chained association between the state machine transition state pairs corresponding to the transaction operation, the transaction payload summary, and the cumulative hash value of the previous audit node, each transaction operation can correspond to the actual state change of the transaction object. Once the audit record is modified or deleted without authorization, subsequent chain verification can detect data inconsistencies, thereby improving the anti-tampering capability of the audit log and providing continuous and reliable record basis for tracing the responsibility of related operations in cross-store transactions. Attached Figure Description

[0027] Figure 1 This is a flowchart of the cross-store transaction dynamic authentication and chain audit process of the present invention;

[0028] Figure 2 This is the state machine transition diagram of the transaction order lifecycle of the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0030] A role-based cross-store sub-account transaction management method includes the following steps:

[0031] Step S1: For the store nodes and business positions managed by the main account, construct a three-dimensional permission topology space containing sub-account identifiers, store node identifiers and transaction permission meta-dimensions. Configure role permission vectors for sub-accounts in each store node and bind a dynamic constraint parameter set containing transaction amount limits, operation IP network segment whitelists and sensitivity level masks.

[0032] Step S2: Intercept the transaction request message of the sub-account for the target store, extract the sub-account identifier, target store identifier, operation action type and transaction payload characteristics, and combine them with the environment context parameters into the authentication engine to match and judge with the role permission vector and dynamic constraint parameter set. When the judgment is successful, issue a dynamic authentication token with a single transaction validity period.

[0033] Step S3: Based on the dynamic authentication token, construct a virtual view projection containing tenant isolation predicates at the database access layer; inject target store identifier filtering predicates and process field desensitization for single store queries; and issue sharded isolated calculation streams for cross-store aggregate statistics and merge encrypted tuples of local indicators returned by each independent database within a security sandbox.

[0034] Step S4: Capture the state machine transition state pairs of the target transaction object and calculate the transaction payload digest. Extract the cumulative hash value of the previous audit node. Concatenate the sub-account identifier, target store identifier, operation action type, state machine transition state pairs, transaction payload digest, and timestamp into an audit metadata block. Combine the cumulative hash value with a cascaded hash operation to generate an incremental chained audit hash signature and write it to a read-only storage medium.

[0035] Preferably, in step S2, the dynamic authentication token includes a time-limited lifecycle management mechanism, with its effective lifecycle configured to be 10s to 120s. After a single database transaction is committed or rolled back, it is automatically physically destroyed by the authentication engine. At the same time, the unique hash value of the destroyed dynamic authentication token is loaded into a short-term anti-replay cache blacklist. When a duplicate request carrying the same dynamic authentication token is detected, the circuit breaker is directly triggered.

[0036] Preferably, in step S3, the process of constructing a virtual view projection containing tenant isolation predicates at the database access layer includes: Step S31, the database access proxy intercepts business data query statements and parses the abstract syntax tree structure of the query statements; Step S32, the table name node and condition filter clause node in the abstract syntax tree are extracted, the target store identifier contained in the dynamic authentication token is encapsulated as a tenant strong isolation Boolean predicate, and the tenant strong isolation Boolean predicate is injected into the root logical condition branch of the abstract syntax tree; Step S33, for the target query field list in the abstract syntax tree, the sensitivity level mask is traversed and matched, and the projected field node is replaced with a preset irreversible desensitization hash transformation function or mask truncation function to reconstruct and generate a target query syntax tree with isolation constraints; Step S34, the reconstructed target query syntax tree is converted into a physical query instruction of the underlying database and sent to the storage node.

[0037] Preferably, in step S3, the field desensitization process performs hierarchical mask replacement on the query result set based on the sensitivity level mask. Specifically, this includes: when the sensitivity level mask is the highest level, the middle four characters of the buyer's mobile phone number are masked and replaced; the last four characters of the bank card number are retained and the remaining characters are masked and replaced; and the last name of the buyer's name is retained and the first name is masked and replaced. When the sensitivity level mask is the medium level, the detailed house number and building information in the buyer's contact address are truncated by masking, while retaining the provincial, municipal, and district-level administrative division text.

[0038] Preferably, in step S3, the process of distributing sharded isolated computation streams for cross-store aggregated statistics includes: Step S35, the master node parses the metrics and statistical dimensions in the multi-store cross-domain aggregated statistics request, and generates... A segmented sub-query plan targeting an independent store sub-database, in which The total number of store nodes involved in the request and The value is a positive integer greater than or equal to 2; Step S36: The master node distributes the sharded sub-query plan in parallel to the independent physical databases corresponding to each store node through the asynchronous communication channel; Step S37: The local computing unit of each store node filters and matches transaction records within the independent physical database, and calculates the number of transactions, the total transaction amount, and the total refund amount for a single store within the local computing unit, constructing an encrypted tuple containing the sample size and local statistics; Step S38: The master node receives the encrypted tuples returned by each independent physical database within the security sandbox, and in an isolated state without retrieving the original transaction details for a single transaction, performs scalar accumulation on the number of transactions, the total transaction amount, and the total refund amount for a single store in each encrypted tuple, and outputs the global total number of transactions, the global total transaction amount, and the global total refund amount.

[0039] Preferably, in step S4, the process of capturing state machine transition pairs during transaction flow includes: Step S41, the transaction control module attaches a business state monitoring aspect to the transaction context to intercept the lifecycle events of the target order entity; Step S42, the pre-transaction business state code of the target order entity before the start of the transaction is read, and the target post-transaction business state code of the transaction's intended commit stage is obtained; Step S43, the pre-transaction business state code and the target post-transaction business state code are encoded into a one-way state transition vector, the state transition vector including at least one of the following: transition from pending payment state to paid state, transition from paid state to refunded state, transition from paid state to shipped state, and transition from shipped state to completed state; Step S44, the order identifier, transaction amount, and operation reason fields in the transaction request message are extracted, and a fixed-width transaction payload digest is generated by calculating using a secure hash algorithm.

[0040] Preferably, in step S4, the process of generating the incremental chained audit hash signature includes: Step S45, according to a preset fixed-length byte encoding protocol, concatenating the cumulative hash value of the previous audit node, the unique identifier of the sub-account, the identifier of the target store, the operation action code, the state machine transition state pair, the transaction payload digest, and the nanosecond-level physical timestamp to construct a continuous byte sequence; Step S46, using a secure hash algorithm to perform hash operation on the continuous byte sequence, and outputting a fixed-length hash digest as the incremental chained audit hash signature of the current transaction; Step S47, combining the incremental chained audit hash signature, the audit metadata block of the current transaction, and the cumulative hash value of the previous audit node into an immutable audit log entry, which is written to the underlying read-only storage medium along with the transaction business data.

[0041] Preferably, step S4 further includes an integrity verification step based on incremental chained audit hash signature, specifically including: step S48, the audit verification node sequentially traverses and reads historical audit log entries in the read-only storage medium; step S49, extracts the cumulative hash value of the previous audit node recorded in the target audit log entry and the audit metadata block of the current entry, and recalculates the expected hash signature of the target audit log entry; step S410, compares whether the expected hash signature is completely consistent with the incremental chained audit hash signature stored in the target audit log entry; step S411, when the comparison result is inconsistent, locks the transaction corresponding to the current audit log entry as an abnormal tampering point, and outputs a security alarm message containing the tampered entry sequence number, the store node identifier involved, and the tampered state transition vector.

[0042] Preferably, in step S1, the three-dimensional permission topology space also includes a dynamic authorization flow and a rights and responsibilities time-limit decay mechanism, specifically including: Step S11, when the main account grants temporary cross-store collaboration permissions to a specified sub-account, a derived permission vector is generated at the intersection coordinates of the sub-account identifier and the target store node in the three-dimensional permission topology space; Step S12, a rights and responsibilities lifetime constraint containing an absolute timestamp is written into the derived permission vector; Step S13, when processing a transaction request message, the permission authentication engine compares the current environment timestamp with the absolute timestamp; Step S14, when the current environment timestamp exceeds the absolute timestamp, the authentication engine automatically erases the derived permission vector in the three-dimensional permission topology space and restores the original permission configuration of the sub-account on the target store node.

[0043] A role-based cross-store sub-account transaction management system is used to implement a role-based cross-store sub-account transaction management method, including: a permission configuration module, an interception and authentication module, a view aggregation module, and a hash auditing module;

[0044] The permission configuration module is used to build a three-dimensional permission space for store nodes and business positions, configure role permission vectors for sub-accounts and bind a dynamic constraint parameter set that includes transaction amount limits, operation IP network segment whitelists and sensitivity level masks;

[0045] The interception and authentication module, connected to the permission configuration module, is used to intercept transaction request messages, extract corresponding features, combine them with environmental context parameters, and input them into the authentication engine. The engine then determines whether to match the authentication with the role permission vector and dynamic constraint parameter set. If the determination is successful, a dynamic authentication token with an expiration date is issued.

[0046] The view aggregation module receives dynamic authentication tokens and is used to build a virtual view projection with tenant isolation predicates at the database access layer. For single-store queries, it injects filtering predicates and handles field desensitization. For cross-store aggregation statistics, it distributes sharded isolated calculation streams and merges local indicator encrypted tuples in a security sandbox.

[0047] The hash audit module connects to the data link and is used to capture state machine transition state pairs and calculate transaction payload summaries. It extracts the cumulative hash value of the previous audit node, concatenates the operation characteristics, state machine transition state pairs and timestamps into audit metadata blocks, and generates incremental chained audit hash signatures by combining the cumulative hash value and writes them to read-only storage media.

[0048] Example 1: In a business operation system managing five independent e-commerce store nodes, the first store S1, the second store S2, the third store S3, the fourth store S4, and the fifth store S5 are managed by the same master account. The permission configuration module constructs a three-dimensional permission topology space containing sub-account identifiers (UID), store node identifiers (SID), and transaction permission meta-dimensions (Act). This three-dimensional permission topology space is maintained in system memory using a three-level nested hash index table. The sub-account unique identifier is used as the first-level hash key, the store node identifier as the second-level hash key, and the bitmap set corresponding to the transaction permission meta-dimension as the third-level value storage unit. When the master account issues temporary authorization for a specific sub-account and a specific store, the system addresses the corresponding cross-storage unit through the first-level and second-level hash keys and writes the temporary authorization information to that unit. Derived permission vectors with limit settings and absolute expiration timestamps are used for dynamic mounting and location determination of temporary permissions. The system establishes different role permission vector mappings for sub-account U101 in the finance position and sub-account U102 in the operations manager position. Specifically, sub-account U101 has order read permission ORDER_READ, refund processing permission REFUND_EXECUTE, and report export permission EXPORT_REPORT in the first store S1; order read permission ORDER_READ and refund processing permission REFUND_EXECUTE in the second store S2; and only order read permission ORDER_READ in the third store S3, fourth store S4, and fifth store S5. Its role permission vector is also bound to a dynamic constraint parameter set, including the upper limit of a single transaction amount. The threshold is 5000 yuan, the daily cumulative batch export threshold is 3 times, and the operation IP network segment whitelist is used. For the IP address 192.168.10.0 / 24 and the highest level of sensitivity mask, sub-account U102 is configured with order read permission (ORDER_READ), product edit permission (GOODS_EDIT), and aggregate view permission (AGGREGATE_VIEW) in stores S1 through S5, and a single transaction limit is bound to it. The system uses 0 yuan and medium-level sensitivity masks to achieve role permission configurations that match the responsibilities of each store node and position.

[0049] When sub-account U101 initiates an order refund request for the first store S1 via the work terminal, and the transaction amount involved in the request is... When the transaction amount is 3200 yuan, the API gateway intercepts the transaction request message and extracts the sub-account identifier U101, the target store identifier S1, the refund processing action code REFUND_EXECUTE, and the transaction payload characteristics. Simultaneously, the authentication engine obtains the request source network address IP (192.168.10.45) and the terminal device fingerprint deviation. The environment context parameter is 0.05, and matching and judgment are performed based on the role permission vector and dynamic constraint parameter set. This is because the request source network address IP is within the whitelist of the operation IP network segment. Internal, indicator function Output 1, the authentication engine uses preset weight coefficients. , , and safe release threshold Calculate the instantaneous risk value of the current request. : ,in, This is the instantaneous risk value; For the indicator function, the request source network address IP is in the whitelist of the operating IP network segment. Output 1 if the condition is met, otherwise output 0; The transaction amount involved in the current request. The maximum single transaction amount configured for sub-accounts in the target store. This represents the device fingerprint anomaly deviation, with a value ranging from 0 to 1. , and Let be the weighting coefficient, satisfying For the amount ratio item, the authentication engine sets numerical boundary protection and saturation constraints. When a sub-account has no fund operation permissions in a specific store and the single transaction amount limit is 0 yuan, the amount ratio item is locked to 1. When the single transaction amount limit is not zero but the actual requested amount exceeds the limit, the ratio of the amount to the limit is truncated and saturated to 1, keeping the amount ratio item within the range of 0 to 1. For this refund request, substituting the corresponding values ​​yields: The instantaneous risk value of 0.266 is less than or equal to the safety release threshold of 0.6, and the refund processing action code REFUND_EXECUTE is located within the allowed set of the role permission vector configured by sub-account U101 for the first store S1. Therefore, the authentication engine determines that the authentication is successful and issues a dynamic authentication token Tokentx with a single transaction validity and a validity lifespan of 60 seconds, injecting it into the transaction flow queue. In another embodiment, when sub-account U101 initiates a transaction for the first store S1 from the source network address 114.23.45.12, the transaction amount... The request was for a refund of 5500 yuan, and the device fingerprint deviation was... When the value is 0.4, the indicator function The output is 0, and the authentication engine calculates the following: The instantaneous risk value of 0.92 exceeds the security clearance threshold of 0.6, and the request amount exceeds the single transaction amount limit. The API gateway triggers circuit breaker interception, refuses to issue dynamic authentication tokens, and outputs an interception alarm message to the security audit center.

[0050] During the data access and multi-store report statistics phase, sub-account U102 initiates a request to aggregate cross-store operating indicators for stores S1 through S5. The data isolation module parses the aggregation viewing permission AGGREGATE_VIEW carried in the dynamic authentication token Tokentx and triggers a sharded isolated computation flow. The master node splits the global aggregation instruction into 5 sharded sub-query plans, which are then distributed to the independent physical databases corresponding to stores S1 through S5. The local computing units of each store node filter and match transaction records within the independent physical databases, calculate the number of transactions, the total transaction amount, and the total refund amount for a single store, and combine the sample size with the aforementioned local statistics to form an encrypted tuple. Specifically, store S1 returns 1200 transactions, 240,000 yuan, and 4500 yuan; store S2 returns 850 transactions, 170,000 yuan, and 2100 yuan; store S3 returns 640 transactions, 128,000 yuan, and 1800 yuan; and store S4 returns 9... The fifth store's S5 returned 1100 transactions, totaling 220000 yuan and 5100 yuan. After each store node's local computing unit completed the calculation of local indicators, it used a pre-distributed public key to perform addition homomorphic encryption on the number of transactions, total transaction amount, and total refund amount for a single store, respectively. The resulting ciphertext strings were then used to form local indicator encrypted tuples. The master node received the local indicator encrypted tuples returned by each independent physical database within a secure sandbox. By leveraging the ciphertext multiplication property of additive homomorphic cryptography, a ciphertext homomorphic dot product operation is performed on the ciphertext strings corresponding to the same local indicator in each sub-database. This operation corresponds to the scalar accumulation of each local indicator. Subsequently, the corresponding decryption private key is used to perform a single decryption on the aggregated ciphertext, resulting in a total of 4,700 transactions, a total transaction amount of 940,000 yuan, and a total refund amount of 16,700 yuan. During this process, each independent physical sub-database only returns encrypted tuples of local indicators, and the master node does not retrieve the original transaction details for each individual transaction.

[0051] When sub-account U101 initiates a single-store detail retrieval, the database access agent intercepts the business data query statement and parses its abstract syntax tree, extracts the table name node and condition filter clause node, then encapsulates the target store identifier in the dynamic authentication token Tokentx into a tenant strong isolation Boolean predicate and injects it into the root logical condition branch of the abstract syntax tree. For the target query field list, the database access agent processes the projected field nodes according to the highest level of sensitivity mask, masking the middle four characters of the buyer's mobile phone number, masking all characters except the last four characters of the bank card number, and masking the buyer's name to retain only the surname and mask all other characters of the given name. After completing the tenant isolation predicate injection and field desensitization, the database access agent reconstructs the target query syntax tree with isolation constraints and converts it into underlying database physical query instructions, which are then sent to the corresponding storage nodes.

[0052] When sub-account U101 completes the 3200 yuan refund transaction in the first store S1, the transaction control module captures the lifecycle events of the target order entity, reads the pre-transaction business status code STATUS_PAID, and obtains the target post-transaction business status code STATUS_REFUNDED for the intended commit stage. Based on this, it constructs the state machine transition pair PAID→REFUNDED. Simultaneously, the transaction control module extracts the order identifier ORD_20260901_0098, transaction amount 3200 yuan, and operation reason OVERSTOCK fields from the transaction request message, and calculates a fixed-width transaction payload digest using a secure hash algorithm. The audit module extracts the cumulative hash value of the previous audit node. According to the preset fixed-length byte encoding protocol, Sub-account unique identifier (UID), target store identifier (SID), operation action code (Act), state machine transition state pair Transaction payload summary and nanosecond-level physical timestamps The data is concatenated sequentially to form a continuous byte sequence corresponding to the audit metadata, and then the incremental chained audit hash signature of the current transaction is generated using the secure hash algorithm SHA-256. : ,in, The incremental chained audit hash signature generated for the current audit transaction. This is the cumulative hash value of the previous audit node. Used as a unique identifier for sub-accounts. For the target store identifier, Encode the operation action. A state transition pair is a state machine that forms the transition state from the preceding business state to the target subsequent business state. For transaction payload summary, For nanosecond-level physical timestamps The byte string concatenation operator is used in this refund transaction. The nanosecond-level physical timestamp is 1788224400000000000. The audit module will incrementally chain the audit hash signature. The audit metadata block for the current transaction and the cumulative hash value of the previous audit node. The data is combined into immutable audit log entries and written to the underlying read-only storage medium along with the transaction business data. After the transaction is committed, the authentication engine physically destroys the dynamic authentication token Tokentx and loads the unique hash value of the destroyed dynamic authentication token into the short-term anti-replay cache blacklist. During subsequent audit verification, unauthorized changes to historical audit log entries will cause the recalculated expected hash signature to be inconsistent with the stored incremental chain audit hash signature, and trigger the corresponding security alarm.

[0053] Example 2: The current test platform consists of a distributed cluster network of 8 computing servers and storage nodes. Each node is connected via a gigabit Ethernet switch and deploys independent relational database shard instances corresponding to stores S1 to S5, a central API gateway authentication service, a security sandbox, and read-only storage media. The test dataset is provided by a high-concurrency simulated transaction generator and contains 10,000 cross-store order transaction request messages simulating actual retail business. Request types include order detail queries, product attribute modifications, refund fund transfers, and cross-store multi-dimensional financial summary statistics. Source IP random drift perturbation, terminal device fingerprint deviation simulation, excessive fund transfer attempts, and unauthorized rewriting test vectors targeting historical logs and order status records are injected into the data stream. The response time for network interaction and database transaction lock waiting under typical conditions ranges from 2 to 8 seconds. Therefore, the effective lifespan of the dynamic authentication token Tokentx is set within the range of 10 to 120 seconds, with a baseline of 60 seconds. The instantaneous risk value release threshold is also considered. Set to 0.6, weight configuration adopts , , .

[0054] The test consisted of an experimental group, three functional control groups, two dynamic authentication token timeout control groups, and three load gradient experimental groups. The experimental group enabled three-dimensional permission topology space, environment context parameter matching, dynamic authentication tokens, virtual view projection, fragmented isolated computation flow, and incremental chained audit hash signatures. Control group 1 used static permission mapping and did not perform instantaneous risk value judgment or dynamic authentication token management. Control group 2 used cross-database full detail extraction and did not perform virtual view projection or fragmented isolated computation flow. Control group 3 used traditional independent asynchronous text logs and did not generate incremental chained audit hash signatures. Audit hash signatures were used. Control group 1 shortened the effective lifespan of the dynamic authentication token to 3 seconds, while control group 2 extended it to 300 seconds. Gradient test groups A, B, and C maintained the complete technical configuration and adopted operating conditions of 100 TPS without network drift, 1000 TPS with 10% perturbation, and 5000 TPS with 30% perturbation, respectively. The abnormal privilege interception rate, sensitive field leakage rate, cross-store aggregation query time, distributed network transmission load, data tampering identification and location rate, and transaction commit success rate were continuously measured for each group.

[0055] In the experimental group, the API gateway extracts the source network address, transaction amount, and device fingerprint deviation from transaction requests. The authentication engine then calculates the instantaneous risk value using role-based permission vectors and dynamic constraint parameter sets. Abnormal requests exceeding the allowance threshold are intercepted at the gateway entry point. Authentication-enabled requests obtain a dynamic authentication token and proceed to subsequent data access and auditing processes. Following this process, the experimental group achieved a 99.8% abnormal access interception rate, a 0% sensitive field leakage rate, a cross-store aggregation query time of 48.6ms, a distributed network transmission load of 4.2MB / s, a 100% data tampering identification and location rate, and a 99.6% transaction commit success rate. Control group 1, under the same transaction request and disturbance conditions, only... Using static permission mapping, the instantaneous risk value is no longer calculated based on environmental context parameters when a request occurs, and dynamic authentication tokens are not used to control single transaction access. Its abnormal privilege escalation interception rate is 71.4%, sensitive field leakage rate is 12.8%, cross-store aggregation query time is 51.2ms, distributed network transmission load is 4.5MB / s, data tampering identification and location rate is 100%, and transaction commit success rate is 99.1%. The above comparison shows that the difference between the two processes is mainly reflected in the request entry stage. Static permission mapping cannot change the authentication result of the current request based on the source network address, transaction amount, and device fingerprint deviation status, while the experimental group completes the matching and judgment based on the current environmental context parameters at the gateway entry.

[0056] In the cross-store data access test, control group 2 directly retrieved transaction details from each independent physical shard and completed the aggregation centrally. Its abnormal privilege escalation interception rate was 99.6%, sensitive field leakage rate was 18.5%, cross-store aggregation query time was 864.2ms, distributed network transmission load was 78.5MB / s, data tampering identification and location rate was 100%, and transaction commit success rate was 88.4%. In the experimental group, the master node split the cross-store aggregation request into sharded sub-queries targeting 5 store shards. The local computing unit of each store node filtered transaction records and calculated local indicators locally, returning only encrypted tuples of local indicators to the security sandbox. The master node then performed scalar accumulation on the same indicators. The single-store detail query simultaneously injected tenant isolation predicates through virtual view projection and processed query fields according to sensitivity level masks. The two data processing paths of full detail cross-database transmission and local indicator encrypted tuple return resulted in differences in query time, network transmission load, and sensitive field leakage rate.

[0057] In the audit test, control group 3 retained transaction access and data isolation processing, but replaced the incremental chained audit hash signature associated with state machine transition state pairs with independent asynchronous text logs. This group achieved an abnormal privilege escalation interception rate of 99.7%, a sensitive field leakage rate of 0%, a cross-store aggregation query time of 49.1ms, a distributed network transmission load of 4.3MB / s, a data tampering identification and location rate of 0%, and a transaction commit success rate of 99.5%. The experimental group captured state machine transition state pairs and transaction payload summaries during transaction flow and combined them with the accumulated hash value of the previous audit node to form an incremental chained audit hash signature. After unauthorized rewriting of historical logs or order status records, the recalculated signature during the audit verification process could not be consistent with the existing signature in the read-only storage medium, thus locking the corresponding abnormal tampering point. The independent asynchronous text logs of control group 3 did not have the above-mentioned cascading relationship, so unauthorized rewriting would not generate signature differences that could be compared node by node along the audit chain.

[0058] The validity period of dynamic authentication tokens was tested separately using two out-of-range control groups. Out-of-range control group 1, by shortening the effective lifespan, achieved an abnormal privilege escalation interception rate of 99.9%, a sensitive field leakage rate of 0%, a cross-store aggregation query time of 50.4ms, a distributed network transmission load of 4.4MB / s, a data tampering identification and location rate of 100%, and a transaction commit success rate of 74.8%. This success rate corresponds to 25.2% of compliant transactions being interrupted and rolled back during the commit phase due to the premature expiration of the dynamic authentication token. Out-of-range control group 2, by extending the effective lifespan of the dynamic authentication token, achieved an abnormal privilege escalation interception rate of 82.3%, a sensitive field leakage rate of 0%, and a cross-store aggregation query time of 48.9ms. The distributed network transmission load is 4.2 MB / s, the data tampering identification and location rate is 100%, the transaction commit success rate is 99.7%, and the anti-replay cache blacklist is deployed in a high-speed memory hash table and automatically evicts tokens according to the maximum number of entries and a 120-second time window. After the dynamic authentication token is destroyed, its unique hash value is written to the blacklist. Within the set effective lifespan, the blacklist retention time can cover the effective lifespan of the token. When the extended lifespan is adopted, some destroyed tokens are erased by the cache management unit after 120 seconds in the blacklist, while the absolute timestamp of the token itself is still valid, so that the intercepted token can be resubmitted after being removed from the blacklist record.

[0059] When the concurrency and disturbance intensity are further increased under the complete technical configuration, the gradient test group A achieves a 100% abnormal privilege escalation interception rate, a 0% sensitive field leakage rate, a cross-store aggregation query time of 22.4ms, a distributed network transmission load of 1.8MB / s, a 100% data tampering identification and location rate, and a 99.9% transaction commit success rate under low load conditions. After increasing the concurrency to the medium load condition of the gradient test group B, the abnormal privilege escalation interception rate reaches 99.8%, the sensitive field leakage rate is 0%, the cross-store aggregation query time is 48.6ms, the distributed network transmission load is 4.2MB / s, and the data tampering identification rate is [not specified]. With a location accuracy of 100% and a transaction commit success rate of 99.6%, under the high-load conditions of the gradient test group C, the abnormal privilege escalation interception rate was 99.4%, the sensitive field leakage rate was 0%, the cross-store aggregation query time was 112.5ms, the distributed network transmission load was 9.6MB / s, the data tampering identification and location rate was 100%, and the transaction commit success rate was 98.7%. As the concurrency and disturbance intensity increased, the cross-store aggregation query time and network transmission load increased accordingly, and the abnormal privilege escalation interception rate and transaction commit success rate decreased, while the sensitive field leakage rate and data tampering identification and location rate remained the same.

[0060] According to the above test procedures, the three-dimensional permission topology space and environment context parameters are used for dynamic matching of transaction request entry phase, virtual view projection and fragmented isolated computing flow are used to restrict the access and transmission range of cross-store detailed data, and incremental chained audit hash signature is used to form a continuous audit verification relationship after the transaction status changes; the above three parts are used to implement access control, cross-store data processing and transaction auditing respectively, and work together to complete cross-store sub-account transaction management.

[0061] Example 3: When the current main account issues a temporary cross-store collaboration permission for the third store S3 to the sub-account U101, the permission configuration module locates the intersection coordinates of the sub-account identifier U101 (UID) and the target store identifier S3 (SID) in the three-dimensional permission topology space, and generates a derived permission vector at that location; the system writes the temporary refund processing permission element REFUND_EXECUTE to the derived permission vector, and simultaneously binds the right and responsibility lifecycle constraint corresponding to the absolute timestamp 17882280000000000000. When the authentication engine obtains the abnormal deviation of the device fingerprint, the gateway collects the screen physical resolution, operating system kernel version hash value, graphics rendering pipeline features, and browser feature code sent by the terminal, and converts the above terminal environment features into a 128-bit binary feature vector; in the specific implementation, the gateway extracts the width and height integer values ​​of the screen resolution, the operating system kernel version string, the graphics rendering pipeline supplier identifier, and the browser feature code, concatenates them into the original device description text in a preset order, and then uses a secure hash algorithm to... The text is hashed to generate a 256-bit fixed-length binary hash digest. The first 128 bits are extracted as the target device fingerprint feature vector. The authentication engine performs a bit-level XOR comparison between this feature vector and the baseline device feature vector historically registered by the sub-account. After calculating the Hamming distance and dividing it by the total bit width of 128, the resulting dimensionless scalar in the range of 0 to 1 is used as the device fingerprint anomaly deviation. After the sub-account initiates a transaction request, the authentication engine reads the current physical timestamp and compares it with the absolute timestamp. If the current physical timestamp does not exceed the absolute timestamp, the source network address indication function, the transaction amount ratio, and the device fingerprint anomaly deviation are used as environmental context parameters in the instantaneous risk value calculation. If the instantaneous risk value is less than or equal to the release threshold of 0.6, a dynamic authentication token Tokentx is issued. If the current physical timestamp exceeds the absolute timestamp, the derived permission vector is erased from the three-dimensional permission topology space, restoring the permissions of sub-account U101 on the third store S3 to the original permission configuration that only includes the order read permission ORDER_READ.

[0062] After receiving a data query SQL message carrying a dynamic authentication token (Tokentx), the data access agent parses the original SQL text into an abstract syntax tree (AST) and traverses the AST nodes from top to bottom. The data isolation module extracts the FROM table name node and the WHERE condition filter clause node, reads the target store identifier from the Tokentx, generates a tenant strong isolation Boolean predicate with SID equal to the target store identifier, and then injects this tenant strong isolation Boolean predicate into the root logical condition branch of the WHERE condition filter clause using the AND logical operator. Simultaneously, the parser traverses the SELECT projection field list node and processes the target query field according to the sensitivity level mask: when matching the buyer's mobile phone number field, a mask truncation function is used to replace the middle four... When matching the bank card number field, only the last four characters are retained, and the remaining characters are fully masked and replaced. When matching the buyer's name field, the surname is retained and the given name is fully masked and replaced. After completing the tenant isolation predicate injection and field desensitization, the target query syntax tree with isolation constraints is reconstructed and generated, and converted into the underlying database physical query command and issued to the corresponding storage node. During the reconstruction of the projection field node, the data isolation module builds a string conversion encapsulation node with target data type declaration outside the corresponding projection field node for the buyer's mobile phone number, buyer's name and bank card number fields. The fixed-length placeholder characters or truncated text generated after mask replacement are explicitly converted into the fixed-length or variable-length character type preset by the underlying database table, so that the data type of the function return result is consistent with the underlying storage field definition.

[0063] When the transaction control module processes order status transition transactions, it attaches business status listeners to the pre- and post-interception aspects of the data persistence layer. Before the transaction begins, it reads the pre-business status code STATUS_PAID of the target order entity, and when the business logic is completed and the transaction is about to be committed, it reads the post-business status code STATUS_REFUNDED. Based on this, it constructs a one-way state transition vector PAID→REFUNDED. Simultaneously, the data processing unit extracts the order identifier, transaction amount, and operation reason fields from the transaction request message, and generates a 256-bit fixed-length transaction payload digest Hash using a secure hash algorithm. When the audit verification node initiates integrity verification, the verification program traverses the historical audit log entries in the read-only storage medium in timestamp order, extracts the cumulative hash value of the previous audit node of the target audit log entry and the audit metadata block of the current entry, recalculates the expected hash signature according to the predetermined cascading hash relationship in the audit chain, and compares it bit by bit with the incremental chained audit hash signature stored in the entry; if the two are inconsistent, the transaction corresponding to the current audit log entry is locked as an abnormal tampering point, and a security alarm message containing the tampered entry sequence number, the store node identifier involved, and the tampered state transition vector is output.

[0064] Example 4: This example combines Figures 1 to 2 This section explains the role-based cross-store sub-account transaction management method and system, such as... Figure 1 As shown, step S1 constructs a three-dimensional permission topology space for the store nodes and business positions managed by the main account, including sub-account identifiers, store node identifiers, and transaction permission meta-dimensions. It configures role permission vectors for sub-accounts at each store node and binds them to a dynamic constraint parameter set containing transaction amount limits, operation IP network segment whitelists, and sensitivity level masks. Step S2 intercepts transaction request messages from sub-accounts targeting the target store, extracts the sub-account identifier, target store identifier, operation action type, and transaction payload characteristics, and combines these with environmental context parameters. These are then fed into the authentication engine for matching and judgment against the role permission vectors and dynamic constraint parameter set. If the judgment is successful, a dynamic authentication token with a single transaction validity period is issued. Step S3, based on the dynamic... The authentication token constructs a virtual view projection containing tenant isolation predicates at the database access layer. For single-store queries, it injects target store identifier filtering predicates and handles field desensitization. For cross-store aggregate statistics, it distributes sharded isolated computation streams and merges the local indicator encrypted tuples returned by each independent shard within a security sandbox. Step S4 captures the state machine transition state pairs of the target transaction object and calculates the transaction payload digest. It extracts the cumulative hash value of the previous audit node and concatenates the sub-account identifier, target store identifier, operation action type, state machine transition state pairs, transaction payload digest, and timestamp into an audit metadata block. It then performs cascading hash operations with the cumulative hash value to generate an incremental chained audit hash signature and writes it to a read-only storage medium.

[0065] like Figure 2 As shown, the pending payment status serves as the preceding business status code, and migrates from the pending payment status to the paid status, which is the core node of the lifecycle. The paid status, as the core node of the lifecycle, migrates from the paid status to the refunded status, which is the target subsequent business status code, and from the paid status to the shipped status, which is the target subsequent business status code. The shipped status, as the target subsequent business status code, migrates from the shipped status to the completed status, which is the target subsequent business status code.

[0066] Example 5: When a distributed gateway cluster is deployed across multiple availability zones and handles high-concurrency transactions, the authentication engine triggers the physical destruction of the dynamic authentication token (Tokentx) after a database transaction is committed or rolled back. It extracts the unique hash value of the destroyed Tokentx and writes it to the distributed memory Bloom filter and short-term anti-replay cache blacklist. For cross-store aggregated statistics distributed in a sharded, isolated computational flow, the master node... Each independent physical database distributes a sharded sub-query plan and generates a read-only sub-credential carrying the same session identifier and corresponding shard identifier based on the dynamic authentication token. After receiving the read-only sub-credential, each independent physical database completes the query calculation locally and only returns a local indicator encrypted tuple to the security sandbox. The physical destruction of the dynamic authentication token is not triggered during sharding execution. The master node receives all the sharded sub-queries within the security sandbox. Each independent physical database returns a local metric encrypted tuple and completes global scalar accumulation. Alternatively, after triggering timeout degradation compensation and completing the global commit of the current aggregate transaction, the authentication engine of the master node uniformly physically destroys the dynamic authentication token and synchronously writes its unique hash value into the short-term anti-replay cache blacklist. Each gateway node in the cluster broadcasts the incremental record of the blacklist within a 5ms synchronization window through an asynchronous publish-subscribe channel. After the gateway intercepts a concurrent replay request packet carrying the same dynamic authentication token Tokentx, it directly compares the local Bloom filter bitmap index. When a match is found, it outputs a rejection response and discards the request payload. The cache management unit monitors the retention time of the destroyed dynamic authentication token Tokentx in the short-term anti-replay cache blacklist based on a sliding time window. When the record retention time reaches the upper limit of the effective lifespan of the dynamic authentication token Tokentx (120s), the corresponding expired entry is physically erased from the memory hash table to control the memory usage of the gateway node and ensure the response speed of high-frequency transaction interception.

[0067] During the multi-store sharded isolated computing flow distribution process in the data isolation module, if a certain independent physical database experiences communication congestion due to network jitter and the response latency exceeds the preset timeout threshold of 500ms, the master control node initiates an isolation degradation compensation process within the security sandbox. The master control node extracts the average transaction benchmark data of the timed-out store node during historical transaction periods as a temporary interpolation tuple, substitutes it into the scalar weighted merge stream, and generates a compensation control metadata block containing the timed-out store node identifier, preset timeout duration, temporary interpolation sample size, and degradation flag. During the transaction commit phase, the transaction management module inputs the compensation control metadata block, the currently returned local indicator encrypted tuple, and the cumulative hash value of the previous audit node into the cryptographic hash calculation unit to generate an incremental chained audit hash signature carrying the degradation compensation flag, and atomically writes it to the read-only storage medium. After the timed-out independent physical database resumes communication and returns the real encrypted tuple, the master control node calculates the incremental difference and appends the state check to the audit chain. In the positive entry, during the degradation compensation process, the incremental chain audit hash signature and its metadata generated by the preceding transaction are written to the read-only storage medium and maintain the physical read-only and unidirectional irreversible characteristics. The system does not overwrite or modify the already solidified historical hash signature. After the timeout independent physical database resumes communication and returns the real encrypted tuple, the master node encapsulates the previously generated compensation control metadata block identifier, the real tuple of the timeout independent physical database, and the recalculated incremental difference into state correction metadata. It extracts the cumulative hash value of the latest writing node on the current audit chain and performs cascade hash operation to generate a new independent correction audit hash entry. This entry is then appended to the read-only storage medium in chronological order. When the audit verification node performs historical integrity verification, it sequentially verifies the incremental chain audit hash signature in the historical chain and combines it with the associated marker in the state correction metadata to parse the corresponding compensation process. This allows subsequent corrections to be completed by adding audit entries, while the historical incremental chain audit hash signature already written to the read-only storage medium remains unchanged.

[0068] Example 6: When a distributed e-commerce cluster operation system is initially deployed, the system control terminal initiates a pre-parameter calibration procedure before accessing the real-time transaction stream to determine the weighting coefficients in the instantaneous risk value calculation. , , and safe release threshold The data acquisition module extracts historical transaction data for the target managed stores over 30 consecutive natural days, including a cluster of regular compliant transactions and a cluster of abnormal violations marked with unauthorized access. The parameter calibration engine traverses the weight coefficient combination space in system memory with a step size of 0.05. For each combination where the sum of the weight coefficients is 1, the source network address indicator function is set. Transaction amount ratio and device fingerprint anomaly deviation Substituting the instantaneous risk values ​​into the calculation, we obtain the instantaneous risk values ​​corresponding to each trading sample. The parameter calibration engine calculates the instantaneous risk mean of the compliant transaction sample cluster and the abnormal violation sample cluster, respectively, and calculates the algebraic difference between the two means as the inter-class dispersion index. The weight coefficient combination corresponding to this index is used as the subsequent screening object. During the calculation process, the algebraic difference between the two instantaneous risk means is divided by the sum of the instantaneous risk variances of the compliant transaction sample cluster and the abnormal violation sample cluster to construct a Fisher discriminant objective function based on the comprehensive ratio of inter-class dispersion and intra-class clustering. An intra-class variance normalization penalty term is introduced into the objective function to form a convex extremum surface under the constraint that the sum of the weight coefficients is 1. The parameter calibration engine performs a grid discrete search with a step size of 0.05 to determine the optimal weight combination that maximizes the discriminant objective function from the weight coefficient combination space. After determining the optimal weight parameters, the 99th percentile value of the instantaneous risk value distribution of the compliant transaction sample cluster is extracted and written into the system operation parameters as the safe release threshold. .

[0069] In a benchmark dataset containing 500,000 compliant transactions and 500 abnormal / violation transactions, the parameter calibration engine traverses the weight coefficient combination space and outputs the calculated result matrix in the manner described above. When the weight coefficient combination is... , , At that time, the mean instantaneous risk of the compliant transaction sample cluster was 0.15, the mean instantaneous risk of the abnormal and non-compliant sample cluster was 0.82, and the inter-class dispersion index reached an extreme value of 0.67. The authentication engine then solidified this set of weight coefficients into the operation control parameters; the parameter calibration engine then recalculated the instantaneous risk value of all compliant transaction samples according to this optimized weight combination. The calculation results are sorted in ascending order, and the risk value of 0.6 corresponding to the 99th percentile is extracted. The control terminal then writes 0.6 into the memory configuration table as the safe access threshold. The business gateway received the transaction amount Equal to the maximum amount of a single transaction The source network address IP is in the whitelist of the operating IP network segment. Internal and device fingerprint abnormal deviation When the boundary normal request is 0.05, the following relationship is obtained according to the established instantaneous risk value calculation: The calculated instantaneous risk value of 0.41 is less than the safe release threshold of 0.6, and the authentication engine maintains the normal flow sequence of the current transaction based on this.

[0070] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit of this application and the scope of protection of this invention, and all of these forms are within the protection scope of this application.

Claims

1. A role-based cross-store sub-account transaction management method, characterized in that, Includes the following steps: Step S1: For the store nodes and business positions managed by the main account, construct a three-dimensional permission topology space containing sub-account identifiers, store node identifiers and transaction permission meta-dimensions. Configure role permission vectors for sub-accounts in each store node and bind a dynamic constraint parameter set containing transaction amount limits, operation IP network segment whitelists and sensitivity level masks. Step S2: Intercept the transaction request message of the sub-account for the target store, extract the sub-account identifier, target store identifier, operation action type and transaction payload characteristics, and combine them with the environment context parameters into the authentication engine to match and judge with the role permission vector and dynamic constraint parameter set. When the judgment is successful, issue a dynamic authentication token with a single transaction validity period. Step S3: Based on the dynamic authentication token, construct a virtual view projection containing tenant isolation predicates at the database access layer; inject target store identifier filtering predicates and process field desensitization for single store queries; and issue sharded isolated calculation streams for cross-store aggregate statistics and merge encrypted tuples of local indicators returned by each independent database within a security sandbox. Step S4: Capture the state machine transition state pairs of the target transaction object and calculate the transaction payload digest. Extract the cumulative hash value of the previous audit node. Concatenate the sub-account identifier, target store identifier, operation action type, state machine transition state pairs, transaction payload digest, and timestamp into an audit metadata block. Combine the cumulative hash value with a cascaded hash operation to generate an incremental chained audit hash signature and write it to a read-only storage medium.

2. The role-based cross-store sub-account transaction management method according to claim 1, characterized in that, In step S2, the dynamic authentication token includes a time-limited lifecycle management mechanism, with its effective lifecycle configured from 10s to 120s. After a single database transaction is committed or rolled back, it is automatically physically destroyed by the authentication engine. At the same time, the unique hash value of the destroyed dynamic authentication token is loaded into the short-term anti-replay cache blacklist. When a duplicate request carrying the same dynamic authentication token is detected, the circuit breaker is triggered directly.

3. The method for cross-store sub-account transaction management based on roles according to claim 1, characterized in that, In step S3, the process of constructing a virtual view projection containing tenant isolation predicates at the database access layer includes: Step S31, the database access proxy intercepts business data query statements and parses the abstract syntax tree structure of the query statements; Step S32, the table name node and condition filter clause node in the abstract syntax tree are extracted, the target store identifier contained in the dynamic authentication token is encapsulated as a tenant strong isolation Boolean predicate, and the tenant strong isolation Boolean predicate is injected into the root logical condition branch of the abstract syntax tree; Step S33, for the target query field list in the abstract syntax tree, the sensitivity level mask is traversed and matched, and the projected field node is replaced with a preset irreversible desensitization hash transformation function or mask truncation function to reconstruct and generate a target query syntax tree with isolation constraints; Step S34, the reconstructed target query syntax tree is converted into the underlying database physical query instruction and sent to the storage node.

4. The role-based cross-store sub-account transaction management method according to claim 1, characterized in that, In step S3, the field desensitization process performs hierarchical mask replacement on the query result set based on the sensitivity level mask. Specifically, when the sensitivity level mask is the highest level, the middle four characters of the buyer's mobile phone number are masked and replaced; the last four characters of the bank card number are retained and the rest of the characters are masked and replaced; and the surname of the buyer's name is retained and the given name is masked and replaced. When the sensitivity level mask is medium level, the detailed house number and building information in the buyer's contact address are masked and truncated, while retaining the provincial, municipal, and district administrative division text.

5. The method for managing cross-store sub-account transactions based on roles according to claim 1, characterized in that, In step S3, the process of distributing sharded isolated computation streams for cross-store aggregated statistics includes: Step S35, the master node parses the metrics and statistical dimensions in the multi-store cross-domain aggregated statistics request, and generates... A segmented sub-query plan targeting an independent store sub-database, in which The total number of store nodes involved in the request and The value is a positive integer greater than or equal to 2; Step S36: The master node distributes the sharded sub-query plan in parallel to the independent physical databases corresponding to each store node through the asynchronous communication channel; Step S37: The local computing unit of each store node filters and matches transaction records within the independent physical database, and calculates the number of transactions, the total transaction amount, and the total refund amount for a single store within the local computing unit, constructing an encrypted tuple containing the sample size and local statistics; Step S38: The master node receives the encrypted tuples returned by each independent physical database within the security sandbox, and in an isolated state without retrieving the original transaction details for a single transaction, performs scalar accumulation on the number of transactions, the total transaction amount, and the total refund amount for a single store in each encrypted tuple, and outputs the global total number of transactions, the global total transaction amount, and the global total refund amount.

6. The role-based cross-store sub-account transaction management method according to claim 1, characterized in that, In step S4, the process of capturing state machine transition pairs during transaction flow includes: Step S41, the transaction control module attaches a business state monitoring aspect to the transaction context to intercept the lifecycle events of the target order entity; Step S42, the pre-transaction business state code of the target order entity before the start of the transaction is read, and the target post-transaction business state code of the transaction's intended commit stage is obtained; Step S43, the pre-transaction business state code and the target post-transaction business state code are encoded into a one-way state transition vector, which includes at least one of the following: transition from pending payment state to paid state, transition from paid state to refunded state, transition from paid state to shipped state, and transition from shipped state to completed state; Step S44, the order identifier, transaction amount, and operation reason fields in the transaction request message are extracted, and a fixed-width transaction payload digest is generated by calculating using a secure hash algorithm.

7. The role-based cross-store sub-account transaction management method according to claim 1, characterized in that, In step S4, the process of generating the incremental chained audit hash signature includes: Step S45, according to a preset fixed-length byte encoding protocol, concatenating the cumulative hash value of the previous audit node, the unique identifier of the sub-account, the identifier of the target store, the operation action code, the state machine transition state pair, the transaction payload digest, and the nanosecond-level physical timestamp to construct a continuous byte sequence; Step S46, using a secure hash algorithm to perform hash operation on the continuous byte sequence, and outputting a fixed-length hash digest as the incremental chained audit hash signature of the current transaction; Step S47, combining the incremental chained audit hash signature, the audit metadata block of the current transaction, and the cumulative hash value of the previous audit node into an immutable audit log entry, which is written to the underlying read-only storage medium along with the transaction business data.

8. The role-based cross-store sub-account transaction management method according to claim 1, characterized in that, Step S4 also includes an integrity verification step based on incremental chained audit hash signatures, specifically including: Step S48, the audit verification node reads the historical audit log entries in the read-only storage medium in chronological order; Step S49, extracts the cumulative hash value of the previous audit node recorded in the target audit log entry and the audit metadata block of the current entry, and recalculates the expected hash signature of the target audit log entry; Step S410, compares whether the expected hash signature is completely consistent with the incremental chained audit hash signature stored in the target audit log entry; Step S411, when the comparison result is inconsistent, locks the transaction corresponding to the current audit log entry as an abnormal tampering point, and outputs a security alarm message containing the tampered entry sequence number, the store node identifier involved, and the tampered state transition vector.

9. A role-based cross-store sub-account transaction management method according to claim 1, characterized in that, In step S1, the three-dimensional permission topology space also includes a dynamic authorization flow and a rights and responsibilities time-limit decay mechanism, specifically including: Step S11, when the main account grants temporary cross-store collaboration permissions to a specified sub-account, a derived permission vector is generated at the intersection coordinates of the sub-account identifier and the target store node in the three-dimensional permission topology space; Step S12, a rights and responsibilities lifetime constraint containing an absolute timestamp is written into the derived permission vector; Step S13, when processing a transaction request message, the permission authentication engine compares the current environment timestamp with the absolute timestamp; Step S14, when the current environment timestamp exceeds the absolute timestamp, the authentication engine automatically erases the derived permission vector in the three-dimensional permission topology space and restores the original permission configuration of the sub-account on the target store node.

10. A role-based cross-store sub-account transaction management system, used to implement the role-based cross-store sub-account transaction management method of claim 1, characterized in that, include: The module includes a permission configuration module, an interception and authentication module, a view aggregation module, and a hash auditing module. The permission configuration module is used to build a three-dimensional permission space for store nodes and business positions, configure role permission vectors for sub-accounts and bind a dynamic constraint parameter set that includes transaction amount limits, operation IP network segment whitelists and sensitivity level masks; The interception and authentication module, connected to the permission configuration module, is used to intercept transaction request messages, extract corresponding features, combine them with environmental context parameters, and input them into the authentication engine. The engine then determines whether the authentication is successful by matching the role permission vector and dynamic constraint parameter set. If the determination is successful, a dynamic authentication token with an expiration date is issued. The view aggregation module receives dynamic authentication tokens and is used to build a virtual view projection with tenant isolation predicates at the database access layer. For single-store queries, it injects filtering predicates and handles field desensitization. For cross-store aggregation statistics, it distributes sharded isolated calculation streams and merges local indicator encrypted tuples in a security sandbox. The hash audit module connects to the data link and is used to capture state machine transition state pairs and calculate transaction payload summaries. It extracts the cumulative hash value of the previous audit node, concatenates the operation characteristics, state machine transition state pairs and timestamps into audit metadata blocks, and generates incremental chained audit hash signatures by combining the cumulative hash value and writes them to read-only storage media.