A dynamic load balancing method and system for a cryptographic service platform
By constructing a multi-dimensional fusion dataset of national cryptographic standards and a multi-objective convergence optimization model, a node-interface two-layer weight mapping is generated, which solves the load balancing and security problems of the government national cryptographic service platform, realizes dynamic load scheduling and security verification, and improves the utilization rate of computing resources and the level of security protection of the platform.
Patent Information
- Application Number
- CN202611218106.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2046-08-12
AI Technical Summary
The existing government cryptography service platform has problems such as severe load differentiation of node computing power, lagging weight allocation after hardware timing performance drift, mixed encrypted traffic of multi-tenants and security risks in terms of load balancing. The traditional scheduling mechanism lacks the ability to perceive the entire link non-intrusively, and it is difficult to realize tenant identity verification, anti-tampering verification and quota isolation control.
A multi-dimensional fusion dataset of national cryptographic standards is constructed. Through hardware timing monitoring and tenant quota isolation management, a node-interface two-layer weight mapping is generated. The weight allocation scheme is iteratively solved by combining a multi-objective convergence optimization model. Before request distribution, SM2 bidirectional signature verification and hash integrity verification are performed to generate load compensation offset and update the hardware timing monitoring stream in real time.
Dynamic load balancing of heterogeneous national cryptographic computing power nodes has been achieved, which has improved the scheduling stability and security of the cryptographic service platform, ensured the success rate of scheduling requests from high-security tenants, prevented traffic over-limit and illegal requests, and optimized the utilization rate of computing power resources and the security protection of government national cryptographic business.
Smart Images

Figure CN122741522B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of national cryptographic computing power scheduling technology, specifically a dynamic load balancing method and system for a cryptographic service platform. Background Technology
[0002] Existing government cryptographic service platforms generally integrate various heterogeneous computing power nodes, including physical cryptographic machines, cloud cryptographic acceleration instances, and containerized virtual cryptography. Traditional load balancing strategies allocate encryption requests based solely on single metrics such as node CPU and memory, failing to differentiate between the processing differences of various national cryptographic interfaces (SM2 / SM3 / SM4) and lacking consideration for tenant-level quotas, real-time hardware computing power consumption, and abnormal link latency. This easily leads to problems such as severe node computing power load differentiation, obstructed scheduling of requests from high-security-level tenants, and long-term overload or idleness of some nodes. Furthermore, conventional scheduling mechanisms lack end-to-end non-intrusive awareness capabilities and cannot address root causes of problems. The load assessment benchmark is dynamically adjusted based on interface latency and error status, but weight allocation lags after hardware timing performance drifts. In addition, the security verification process before traffic distribution is separated from the scheduling logic, making it difficult to simultaneously realize tenant identity verification, anti-tampering verification and quota isolation management. In government scenarios, the mixed operation of multi-tenant encrypted traffic is prone to security risks such as quota overruns and illegal request intrusions. It is difficult to balance overall scheduling balance, business isolation and data security. Therefore, there is an urgent need for a dynamic load balancing solution for cryptographic service platforms that adapts to heterogeneous national cryptographic computing power, integrates multi-dimensional monitoring data, has hard constraints on tenant quotas and has dynamic load compensation capabilities. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention proposes a dynamic load balancing method and system for a cryptographic service platform. The method includes: constructing a multi-dimensional fusion dataset of national cryptographic standards; calculating a computing power deviation correction factor based on hardware time-series indicators, and iteratively generating a node-interface two-layer weight mapping set through a load quantization model; inputting the weight mapping set and tenant quota constraints into a multi-objective convergence optimization model to iteratively solve the weight allocation scheme; locking the scheduling strategy after the cluster computing power load range meets the standard and tenant traffic does not exceed the quota; performing SM2 bidirectional signature verification and hash integrity verification before request distribution, generating a load compensation offset, and updating the hardware time-series monitoring stream of the dataset in real time. This invention is adaptable to heterogeneous national cryptographic computing power nodes such as physical cryptographic machines and cloud cryptographic instances, balancing tenant quota isolation and cluster computing power balancing scheduling, dynamically correcting hardware load deviations, and improving the scheduling stability and national cryptographic business security processing capabilities of the cryptographic service platform.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A dynamic load balancing method for a cryptographic service platform includes:
[0006] S1: Construct a multi-dimensional fusion dataset of national cryptographic standards; the multi-dimensional fusion dataset of national cryptographic standards includes hardware timing monitoring streams of heterogeneous cryptographic computing power nodes, encrypted request ciphertext message streams of tenant national cryptographic services, and hierarchical tenant quota isolation and control metadata;
[0007] S2: Construct a national cryptographic hardware adaptation load quantization model for cryptographic computing power nodes. Based on the rated computing power nominal value in the hardware timing monitoring stream, calculate the current load deviation rate as the computing power deviation correction factor and substitute it into the national cryptographic hardware adaptation load quantization model. Iteratively solve the node smooth hierarchical scheduling weight set. After three-level decoupling and encapsulation, generate a node-interface two-layer weight mapping set.
[0008] S3: Input the two-layer weight mapping set and hierarchical tenant quota isolation and control metadata into the pre-built multi-objective convergence optimization model, iteratively correct the weight allocation value of each cryptographic computing power node to each interface, until the actual computing power load range of all cryptographic computing power nodes is lower than the preset dynamic convergence threshold and all tenant traffic does not exceed the preset quota limit, and lock the weight allocation scheme of the current node-interface.
[0009] S4: Distribute the encryption requests of each interface to the corresponding cryptographic computing power nodes according to the weight allocation scheme. Before distribution, perform two-way signature verification of SM2 certificates and request integrity hash verification. Simultaneously, collect the full-link latency and abnormal error timing data of the encryption interface in a non-intrusive manner.
[0010] S5: Generate hardware load compensation offset based on the collected encrypted interface end-link latency and abnormal error timing data, and backfill and update the hardware timing monitoring stream in real time.
[0011] Specifically, the construction of the national cryptographic multidimensional fusion dataset includes:
[0012] S1.1: Deploy a non-intrusive database synchronization agent to pull tenant configuration database unique security identifier, tenant security level label, daily quota threshold for encryption interface, and time-based rate limit within the tenant configuration database. At the same time, read the daily encryption consumption count and remaining encryption quota for each tenant through a distributed isolation cache, and integrate them into hierarchical tenant quota isolation management metadata.
[0013] S1.2: Deploy a lightweight log listening subprocess on the cryptographic computing node to capture the device's independent log partitions, extract four types of hardware timing indicators: CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency, and generate a hardware timing monitoring stream after filtering out general system process interference indicators; the cryptographic computing node includes a physical national cryptographic machine, a cloud cryptographic acceleration instance, and a containerized virtual cryptography.
[0014] S1.3: Build a national cryptographic message queue partition, and push the gateway to the national cryptographic message queue partition by encapsulating SM4 ciphertext; parse the metadata in the header of the ciphertext message, extract the tenant's unique security identifier, encrypted interface URI, message priority label, and gateway access timestamp, and generate an encrypted request ciphertext message stream;
[0015] S1.4: Align hardware timing monitoring streams, encrypted request ciphertext message streams, and hierarchical tenant quota isolation and control metadata with unified scheduling time slots as time slices to generate a national cryptographic multidimensional fusion dataset.
[0016] Specifically, the calculation process of the computing power deviation correction factor includes:
[0017] S2.1: Read the hardware timing monitoring stream to obtain the actual SM2 / SM4 computing throughput of each cryptographic computing node within a preset statistical window;
[0018] S2.2: Retrieve the rated computing power nominal value of each cryptographic computing power node pre-stored on the platform; the rated computing power nominal value is based on the benchmark performance calibration of the same model of equipment under standard national cryptographic pressure test environment;
[0019] S2.3: Calculate the ratio of the actual SM2 / SM4 computing throughput to the nominal value of the rated computing power, obtain the current load deviation rate, and use it as the computing power deviation correction factor; the computing power deviation correction factor is used to characterize the real-time deviation of the node's current computing power output relative to its baseline performance.
[0020] Specifically, the process of generating the node-interface two-layer weight mapping set includes:
[0021] S2.4: For a single cryptographic computing node, a load feature vector is constructed using the four types of hardware timing indicators and computing power deviation correction factors in the hardware timing monitoring stream. This vector is then substituted into the national cryptographic hardware adaptation load quantization model and a comprehensive load score is obtained through weighted nonlinear transformation.
[0022] S2.5: The comprehensive load score is converted into the initial dynamic weights of the nodes through reverse mapping transformation and global normalization;
[0023] S2.6: The initial dynamic weight of the node calculated in the current period is weighted and fused with the historical weight of the previous period to obtain the smoothed dynamic benchmark weight of the node, and the smoothed dynamic benchmark weight of the node is determined as the node layer scheduling weight.
[0024] S2.7: Repeat S2.4 to S2.6, traverse all cryptographic computing power nodes in the cluster, and generate a first-level weight mapping that includes the node-level scheduling weights of each node.
[0025] Specifically, the process of generating the node-interface two-layer weight mapping set further includes:
[0026] S2.8: For a single cryptographic computing node, read the list of national cryptographic interface types deployed on the cryptographic computing node and the average processing latency of SM2 / SM3 / SM4 for each interface within the historical sliding window, as recorded by the platform service registration center.
[0027] S2.9: Using the reciprocal of the average processing latency of each interface as a proportional coefficient, the node layer scheduling weight is split to generate the interface layer subdivision weight of each interface, and the sum of all interface layer subdivision weights within the same cryptographic computing power node is equal to the node layer scheduling weight, thus obtaining the second-level weight mapping.
[0028] S2.10: Based on the hardware configuration parameters of a single cryptographic computing node, query the computing power benchmark evaluation mapping table to obtain the comprehensive computing power benchmark score, calculate the ratio of the comprehensive computing power benchmark score of a single cryptographic computing node to the highest comprehensive computing power benchmark score of the cluster as the computing power correction factor, and use the computing power correction factor as the third-level weight mapping.
[0029] S2.11: Encapsulate and integrate the first-level weight mapping, the second-level weight mapping, and the third-level weight mapping according to the node-interface dimension to generate a two-layer weight mapping set for nodes and interfaces.
[0030] Specifically, the construction and solution process of the multi-objective convergent optimization model includes:
[0031] S3.1: Extract the node-level scheduling weight and the interface-level subdivision weight from the node-interface two-layer weight mapping set, construct weight ratio constraints, and limit the ratio of the number of requests allocated to each cryptographic computing power node in the same round to the ratio of the node-level scheduling weight to be constant, and the ratio of the number of requests allocated to each interface within the cryptographic computing power node to the ratio of the interface-level subdivision weight to be constant.
[0032] S3.2: Extract the remaining encryptable quota of each tenant from the hierarchical tenant quota isolation and control metadata, construct a quota upper limit hard constraint, and limit the total request consumption allocated to each tenant in this round to not exceed its remaining encryptable quota;
[0033] S3.3: With minimizing the load difference among all cryptographic computing nodes in the cluster as the primary optimization objective, the optimal weight allocation scheme is solved by an iterative strategy that combines gradient descent and heuristic search within the feasible solution space formed by the weight ratio constraint and the quota upper limit hard constraint.
[0034] Specifically, the step of ensuring that the actual computing power load range of all cryptographic computing power nodes is lower than a preset dynamic convergence threshold includes:
[0035] S3.4: After each iteration, read the weight allocation values of each cryptographic computing power node to each interface output by this iteration, combine the current comprehensive load score of each cryptographic computing power node and the computing power correction factor, accumulate the total number of requests allocated to the corresponding cryptographic computing power node according to the interface type, multiply by the average computing power consumption benchmark value per request, and calculate the predicted load value of the cryptographic computing power node after bearing the new request.
[0036] S3.5: Traverse all cryptographic computing power nodes in the cluster, extract the maximum and minimum values from the predicted load values of each cryptographic computing power node and calculate their difference, and use the difference as the actual computing power load range;
[0037] S3.6: Read the dynamic convergence threshold stored in the platform configuration center, and compare the actual computing power load range with the dynamic convergence threshold; if the actual computing power load range is less than the dynamic convergence threshold, it is determined that the iteration convergence is complete, and the weight allocation value of the current round is locked as the final weight allocation scheme; if the actual computing power load range is greater than or equal to the dynamic convergence threshold, jump to S3.3 to continue to execute the next round of iteration correction until the convergence condition is met; during the iteration process, it is synchronously verified whether the cumulative allocation request volume of each tenant on the same day exceeds the remaining encryptable quota in the hierarchical tenant quota isolation control metadata. If any tenant exceeds the preset quota limit, the allocation volume of the corresponding tenant in this round is rolled back to within the quota boundary.
[0038] Specifically, the pre-distribution process includes performing two-way signature verification of the SM2 certificate and request integrity hash verification, including:
[0039] S4.1: Extract the tenant's digital certificate and request signature value from the request to be distributed, and call the SM2 public key of this cryptographic computing node cached by the platform to verify the tenant's digital certificate and confirm the legitimacy of the tenant's identity;
[0040] S4.2: After the signature verification is successful, the plaintext payload of the request is hashed based on the hash algorithm, and the hash calculation result is compared with the hash digest value carried in the request to confirm that the request has not been tampered with during the transmission.
[0041] S4.3: The current request is deemed legitimate traffic and allowed to be distributed only if both the SM2 certificate two-way signature verification and the request integrity hash verification pass; otherwise, the illegitimate request is discarded and the audit log is recorded.
[0042] Specifically, the bypass non-intrusive acquisition encryption interface's end-to-end latency and error reporting timing data includes:
[0043] S4.4: Deploy non-intrusive probes at the network entry and exit points of cryptographic computing nodes to capture the timestamps of requests entering the node for processing and response messages leaving the node, and calculate the difference to obtain the end-to-end processing latency of the encryption interface for a single request;
[0044] S4.5: Parse the status code field in the response message header, identify and record abnormal status codes including parameter errors, internal faults, and computing power overload, as well as their occurrence times, and generate abnormal error timing data.
[0045] Specifically, the generation of hardware load compensation offset based on the collected end-to-end latency and error timing data of the encrypted interface includes:
[0046] S5.1: Receive the full-link latency and error reporting time sequence data of the encryption interface, aggregate and statistically analyze them according to the cryptographic computing power node and interface dimensions, and calculate the average processing latency and error rate of each interface of each cryptographic computing power node in the current statistical period;
[0047] S5.2: If the average processing latency of any interface exceeds the preset average processing latency threshold or the anomaly rate exceeds the preset anomaly rate threshold, a hardware load compensation offset is generated to increase the comprehensive load score of the corresponding cryptographic computing power node in the next scheduling cycle.
[0048] S5.3: Write back the generated hardware load compensation offset to the hardware timing monitoring stream of the national cryptographic multidimensional fusion dataset.
[0049] A dynamic load balancing system for a cryptographic service platform, comprising:
[0050] The data fusion module is used to collect and fuse hardware timing monitoring streams, encrypted request ciphertext message streams, and hierarchical tenant quota isolation and control metadata to generate a national cryptographic multidimensional fusion dataset.
[0051] The heterogeneous computing power quantization module has a built-in national cryptographic hardware-adaptive load quantization model, which is used to calculate the computing power deviation correction factor based on the national cryptographic multidimensional fusion dataset and generate a two-layer weight mapping set of nodes and interfaces.
[0052] The multi-objective collaborative scheduling module has a built-in multi-objective convergence optimization model, which is used to iteratively optimize the weight allocation scheme under the hard constraints of weight ratio constraints and quota upper limit, and determine convergence.
[0053] The secure distribution and awareness module is used to perform two-way signature verification of SM2 certificates and request integrity verification before the request is distributed, and to collect the full-link latency and abnormal error timing data of the encrypted interface during the distribution process.
[0054] The closed-loop feedback correction module is used to generate a hardware load compensation offset based on the end-to-end latency and abnormal error timing data of the encrypted interface, and send it back to the data fusion module to update the hardware timing monitoring stream.
[0055] Compared with the prior art, the beneficial effects of the present invention are:
[0056] 1. This invention proposes a dynamic load balancing method for a cryptographic service platform. It constructs a multi-dimensional fusion dataset of national cryptographic standards (CNMS) data, including hardware timing, encrypted messages, and tenant quotas. Based on a CNMS hardware-adaptive load quantification model, it generates a node-interface two-layer weight mapping to differentiate the processing performance differences of different CNMS interfaces. This method can accurately quantify the real-time load of heterogeneous computing power nodes such as physical cryptographic machines, cloud cryptographic instances, and virtual cryptographic nodes, overcoming the shortcomings of traditional load balancing schemes that rely solely on a single hardware indicator to evaluate computing power and ignore the performance losses specific to CNMS operations. By using a multi-objective convergence optimization model to set tenant-level quotas as hard constraints, and iteratively solving for weights with minimizing the cluster load range as the core objective, it can effectively balance the computing power occupancy of each node, avoiding idle or overloaded computing power. Simultaneously, it prioritizes the scheduling success rate of high-security-level government tenants, achieving multi-tenant encrypted traffic isolation and control, and preventing the problem of single-tenant traffic exceeding limits and crowding out other tenants' computing power resources.
[0057] 2. This invention proposes a dynamic load balancing method for a cryptographic service platform. Before request distribution, it performs SM2 bidirectional signature verification and hash integrity checks to intercept unauthorized tampering and identity forgery requests at the source, thus improving the security audit capabilities of government cryptographic services. By utilizing a non-intrusive bypass probe to collect end-to-end latency and abnormal timing data, it generates a load compensation offset and updates the hardware timing monitoring stream in real time. This allows for timely correction of load assessment deviations caused by hardware performance drift and interface failures, continuously optimizing scheduling weights to adapt to real-time business conditions. The overall solution integrates balanced computing power scheduling, tenant quota isolation, transmission security verification, and dynamic load compensation, improving the utilization rate of computing resources, scheduling stability, and overall security protection level of government cryptographic services on the cryptographic service platform. Attached Figure Description
[0058] Figure 1 This is a schematic diagram of a dynamic load balancing method for a cryptographic service platform according to the present invention;
[0059] Figure 2 This is a flowchart illustrating the principle of a dynamic load balancing method for a cryptographic service platform according to the present invention.
[0060] Figure 3 This is a diagram of the dynamic load balancing system architecture of a cryptographic service platform according to the present invention. Detailed Implementation
[0061] Example 1:
[0062] Please see Figure 1 and Figure 2 The present invention provides an embodiment of a dynamic load balancing method for a cryptographic service platform, the method comprising steps S1 to S5, including the following steps:
[0063] S1: Construct a multi-dimensional fusion dataset of national cryptographic standards; the multi-dimensional fusion dataset of national cryptographic standards includes hardware timing monitoring streams of heterogeneous cryptographic computing power nodes, encrypted request ciphertext message streams of tenant national cryptographic services, and hierarchical tenant quota isolation and control metadata;
[0064] Furthermore, this embodiment uses an integrated government cryptography service platform as the implementation scenario. This platform provides commercial cryptographic infrastructure services to all municipal government departments, offices, sub-districts, and public institutions as tenants, and offers six categories of standard cryptographic interface services based on the national cryptographic standards SM2 / SM3 / SM4: digital signature, data encryption, decryption, certificate verification, key negotiation, and timestamp issuance. The platform's backend cryptographic cluster is deployed with three types of heterogeneous cryptographic computing power nodes: physical national cryptographic machines, cloud cryptographic acceleration instances, and containerized virtual cryptography. These three types of devices have varying hardware computing power, IO throughput, and... There are significant differences in the concurrency processing limits, which is a typical heterogeneous cluster scheduling scenario. The platform has more than 200 tenants, which are divided into three levels: ordinary, enterprise, and government core. The daily password call quota limits allocated to different levels of tenants are vastly different. The quota for core government tenants is more than ten times that of ordinary tenants. At the same time, all tenants generate uninterrupted password business request traffic in real time. Traditional fixed-weight round-robin and minimum connection number scheduling methods will have multiple problems such as high computing power instances being idle, low computing power password machines being overloaded, high-priority government requests being blocked by ordinary business requests, and tenant quota exceeding the limit without interception.
[0065] The construction of the national cryptographic multidimensional fusion dataset includes:
[0066] S1.1: Deploy a non-intrusive database synchronization agent to pull tenant configuration database unique security identifier, tenant security level label, daily quota threshold for encryption interface, and time-based rate limit within the tenant configuration database. At the same time, read the daily encryption consumption count and remaining encryption quota for each tenant through a distributed isolation cache, and integrate them into hierarchical tenant quota isolation management metadata.
[0067] Furthermore, the platform's built-in non-intrusive database synchronization agent is a non-intrusive background resident process deployed within the platform's management gateway service. It is independently allocated fixed CPU cores and memory resources and will not preempt the computing resources of the password service instance. The agent component uses a dual mode of timed polling combined with event triggering to read tenant data. The polling period is set to 2 seconds. It also connects to the database change trigger. When data changes such as tenant package level adjustment, quota expansion, tenant addition and cancellation, package expiration, etc. occur, the database change trigger will actively push the change event to the agent component's built-in message channel. Tenant configuration information can be updated in real time without waiting for the polling period, ensuring the timeliness of quota data.
[0068] Furthermore, the proxy component first establishes a read-only connection to the platform's relational database. Within this database, a separate tenant configuration information table is created. This table contains a unique index based on the tenant's unique security identifier. The index field includes the tenant's globally unique code, which serves as a unified identity identifier for all tenants across the platform. Each record in the tenant configuration information table fully stores the tenant's security level label, daily limit threshold for encrypted interfaces, and time-based rate limiting limits, among other supporting fields. When the proxy component reads the tenant configuration information table, it performs a pre-processing data validity check, filtering out invalid tenant records that are canceled, have expired plans, or are frozen in status. Only valid tenant data in a normal service state is retained, preventing invalid data from consuming computing resources.
[0069] Furthermore, after extracting the static configuration fields of the database tenants, the proxy component switches to connect to the platform's distributed isolated cache cluster. The distributed isolated cache adopts a sharded deployment mode, storing tenant dynamic quota data in shards according to the tenant's unique security identifier hash. Each cache key strictly corresponds to a single tenant identity identifier, and the key stores structured cache data, which is split into five independent data segments: the daily encrypted consumption count, the remaining encryptable quota, the peak call value of the previous hour, the timestamp of the most recent quota consumption, and the quota over-limit flag. The proxy component uses batch read commands to pull the cache quota data of all currently valid tenants at once, reducing the number of cache network interactions and reducing IO overhead.
[0070] Furthermore, after obtaining the static tenant configuration fields and dynamic cache quota data, the proxy component performs a data fusion and assembly operation. Using the tenant's unique security identifier as the unique primary key, it binds and concatenates the database's static tenant security level label, daily quota threshold for encrypted interfaces, time-based rate limiting upper limit, remaining dynamic encrypted quota in the cache, and the daily encrypted consumption count. This generates standardized hierarchical tenant quota isolation and control metadata records. Each record is uniformly encapsulated in a structured text format, with a current data collection timestamp appended to the end of each record for data time-series alignment and expired data removal. After assembly, the proxy component... The parameter records are validated a second time. If abnormal data such as negative remaining encryptable quota, consumption count exceeding the daily quota threshold, or empty tenant security level label is found, the system automatically reads the previous normal quota record for that tenant and temporarily replaces it. At the same time, it pushes the abnormal data log to the platform's operation and maintenance alarm module, recording the abnormal tenant code, abnormal fields, and collection time, so that operation and maintenance personnel can troubleshoot tenant quota calculation logic faults. All validated hierarchical tenant quota isolation and control metadata records are uniformly pushed to the platform's global data aggregation bus, waiting to be merged with the other two types of datasets to generate a national cryptographic multidimensional fusion dataset.
[0071] S1.2: Deploy a lightweight log listening subprocess on the cryptographic computing node to capture the device's independent log partitions, extract four types of hardware timing indicators: CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency, and generate a hardware timing monitoring stream after filtering out general system process interference indicators; the cryptographic computing node includes a physical national cryptographic machine, a cloud cryptographic acceleration instance, and a containerized virtual cryptography.
[0072] Furthermore, the lightweight log listening subprocess adopts a distributed node deployment architecture. Each heterogeneous cryptographic computing power node in the cryptographic cluster deploys the lightweight log listening subprocess locally. The lightweight log listening subprocess only has the ability to read log files, perform preliminary filtering of log lines, and mark basic fields. Complex log parsing and indicator structured operations are uniformly handled by the platform log collector, reducing the local resource consumption of the instance. The local operation logs of the three types of heterogeneous cryptographic computing power nodes are stored in their respective independent log directories. The physical national cryptographic machine hardware has an independent log storage partition built in, the cloud cryptographic acceleration instance relies on the persistent log disk of the cloud host, and the containerized virtual cryptography uses container log mount volume to store the operation logs. All three types of log files adopt a rolling splitting mechanism. When the size of a single file reaches 100MB or the writing time of a single file reaches 24 hours, a new log file is automatically generated to prevent reading from being too large due to a single log file.
[0073] Furthermore, the lightweight log listening subprocess adopts a file handle listening mechanism to continuously monitor three types of change events in the log directory: file addition, file content appending, and log file scrolling switching. Once a new log content is detected, the incremental log content is immediately read line by line, without repeatedly reading previously processed historical log lines. After each raw log is read, the lightweight log listening subprocess automatically adds three pre-marks: the identity identifier of the current cryptographic computing node, the node hardware type label, and the log local generation timestamp. Then, the marked raw logs are pushed in batches to the dedicated message queue partition of the platform log collector. Logs of cryptographic computing nodes with different hardware types are pushed to independent partitions to achieve hardware type isolation of log data.
[0074] Furthermore, the platform log collector continuously consumes the incremental log data stream of the corresponding partition. Before parsing the core indicators, it performs a dirty data filtering step to filter out abnormal log entries containing device fault errors, connection drops, empty log lines, garbled characters, and invalid indicator values. Only indicator logs output under normal operating conditions are retained. The abnormal logs generated by the filtering are uniformly archived to the fault log repository, and device anomaly warnings are issued simultaneously. After the log filtering is completed, the core indicator extraction process is entered, which extracts four raw indicator data: CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency. The four raw indicators are bound with the pre-attached cryptographic computing node identity, hardware type, and log timestamp to form a single raw hardware time-series indicator. All raw entries are temporarily stored in the platform log collector's local high-speed memory buffer.
[0075] The generation process of the hardware timing monitoring stream includes:
[0076] S1.2.1: Based on the operation log, the standard log template format predefined by the cryptographic service platform is called, and the single log record is parsed one by one by field positioning and extraction method to separate four types of core hardware timing indicators: CPU hardware acceleration utilization percentage, encrypted memory buffer utilization percentage, national cryptographic dedicated network port throughput value, and key disk read / write latency in milliseconds.
[0077] Furthermore, the platform pre-defines independent standard log template formats for the three types of heterogeneous cryptographic computing nodes. These template files are persistently stored in the platform's management service configuration center. The templates feature a fixed segmented text structure, with each performance metric corresponding to a fixed start and end separator within the template. This enables precise field location and allows for rapid extraction of metric values without complex regular expression matching, reducing parsing computation overhead. The physical national cryptographic machine template, the cloud cryptographic acceleration instance template, and the containerized virtual cryptographic template are adapted to the log text structures output by the corresponding device manufacturers, avoiding parsing failures caused by inconsistent log field positions across different devices.
[0078] Furthermore, after the platform log collector reads a single marked raw log record, it first matches and retrieves the corresponding device standard log template based on the cryptographic computing node hardware type tag attached to the log. After the device standard log template is loaded, it traverses the log text sequentially according to the field separation order set in the template. It locates the text fragment corresponding to each core hardware timing indicator through the delimiter, extracts the string content corresponding to the indicator value, and then completes the unified conversion from string to standard numerical format. The CPU hardware acceleration utilization rate and encrypted memory buffer utilization are uniformly converted to a percentage numerical format, the throughput of the national cryptographic dedicated network port is uniformly aligned to the standard unit of data transmission per second, and the key disk read / write latency is uniformly converted to a millisecond unit value.
[0079] Furthermore, after all four hardware timing metrics for a single log entry are extracted, the validity of the metric values is verified. The reasonable range for CPU hardware acceleration utilization and encrypted memory buffer utilization is 0 to 100. If the extracted values exceed this range, they are directly identified as transient abnormal metrics, and the corresponding metric data for this log entry is discarded. At the same time, the cryptographic computing node identifier and the abnormal log time are recorded. Negative values are not allowed for the throughput of the national cryptographic dedicated network interface and the key disk read / write latency. Negative values are also identified as invalid data and are marked and not included in the load balancing process. The four types of core hardware timing metric values that pass the verification are temporarily cached, waiting to be combined with the cryptographic computing node identifier and timestamp to generate standardized structured records. In the event of a brief interruption in the log or missing metrics, the system will not directly discard all metrics of the cryptographic computing node. Instead, it will read the previous valid and complete metric data of the cryptographic computing node as a temporary filling value to ensure that there are no gaps in cryptographic computing node metrics in the circular data buffer and to ensure that the load balancing calculation process continues to run without interruption.
[0080] S1.2.2: Using the identity identifier of the cryptographic computing node corresponding to the log record as the primary key, match and bind the name identifier of the cryptographic computing node corresponding to the primary key with the log record timestamp, and structurally combine the extracted four types of core hardware timing indicators, cryptographic computing node name identifier, and log record timestamp to generate standardized hardware timing monitoring flow structured records. The hardware timing monitoring flow structured records are then uniformly stored in the pre-set circular data buffer of the cryptographic service platform to complete data caching.
[0081] Furthermore, the system assigns a globally unique cryptographic computing node identity identifier to each cryptographic computing node within the cluster. This identifier serves as the core primary key for identifying a single device across the entire chain. The platform service registry stores static mapping relationships between cryptographic computing node identity identifiers and cryptographic computing node name identifiers, hardware models, CPU generations, memory configurations, deployment locations, and lists of supported national cryptographic interfaces. After parsing logs to obtain the cryptographic computing node identity identifier primary key, the platform log collector queries the service registry mapping table in real time to match and obtain the corresponding cryptographic computing node name identifier. The cryptographic computing node name identifier is a device name that is readable by operations and maintenance personnel and is used for log display, operations and maintenance alarms, and monitoring panel visualization scenarios.
[0082] Furthermore, the four core hardware timing metrics that have been verified—CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency—are matched with the obtained cryptographic computing node name identifier, log record timestamp, cryptographic computing node identity primary key, and cryptographic computing node hardware type tag. All fields are encapsulated in a fixed order to generate a unified format hardware timing monitoring stream structured record. All structured records adopt a time-ordered structure, and each record has an independent timing tag to distinguish cryptographic computing node load data from different collection periods.
[0083] Furthermore, the platform pre-deploys an independent memory-based circular data buffer. This buffer has a fixed storage capacity limit and an automatic data expiration and eviction rule. The buffer only retains the structured records of the hardware time-series monitoring stream within the most recent fixed time period. Historical records exceeding the time limit are automatically overwritten and cleaned up, eliminating the need for persistent storage to disk. High-speed memory read and write operations meet the low-latency requirements of real-time load computing. The circular data buffer uses sharded and partitioned storage, dividing the storage into independent partitions according to the hardware type of the cryptographic computing nodes. The structured records of the three types of heterogeneous cryptographic computing nodes are stored separately. When the national cryptographic hardware adapts to the load quantization model, data can be read on demand by partition, reducing the data traversal range and improving reading efficiency. When writing structured records to the circular data buffer, a batch write mechanism is used. A write operation is performed uniformly after a certain number of records are accumulated, reducing the performance loss caused by lock contention in the circular data buffer. After the write is completed, the circular data buffer returns a write success receipt. The platform log collector will only clear the processed log raw data in local memory after receiving the receipt to prevent data loss.
[0084] S1.3: Build a national cryptographic message queue partition, and push the gateway to the national cryptographic message queue partition by encapsulating SM4 ciphertext; parse the metadata in the header of the ciphertext message, extract the tenant's unique security identifier, encrypted interface URI, message priority label, and gateway access timestamp, and generate an encrypted request ciphertext message stream;
[0085] Furthermore, the platform adopts a distributed message queue as the carrier for the flow of business request messages across the entire platform. A dedicated top-level topic is set up for encrypted request ciphertext messages. Within the top-level topic, multiple independent partitions are divided according to the government region to which the tenant belongs. The message queue consumption component uses multiple consumption threads to subscribe to all partitions in parallel. The number of consumption threads corresponds one-to-one with the number of partitions, ensuring that messages are consumed in real time without delay and preventing request messages from accumulating and blocking gateway traffic distribution. After the platform gateway layer receives each password business request initiated by the tenant, it performs basic encapsulation on the original request message, appending four types of fixed metadata to the message header: the precise timestamp of the request arriving at the gateway, the tenant's unique security identifier, the encrypted interface URI, and the message priority tag. The complete original business message body is stored in the message payload in SM4 ciphertext form. After encapsulation, the gateway pushes the entire encapsulated message to the corresponding partition of the dedicated message queue topic, completing the message uplink.
[0086] Furthermore, after the message queue consumption component starts, it continuously monitors for new message messages in the topic partition. Each message message arrives at the partition, and the consumption thread immediately pulls the message. The pulling process uses a batch pulling mode, pulling multiple consecutive messages at a time to reduce network interactions. After pulling, message integrity verification is performed first, checking whether the message header metadata is complete, whether the message payload is truncated, and whether the message signature verification flag is normal. If abnormal messages such as incomplete messages, missing metadata, or garbled characters are found, the message is discarded, and the tenant to which the abnormal message belongs, the message arrival timestamp, and the abnormality type are recorded and pushed to the illegal traffic log database for auditing. Complete and error-free original messages retain the complete header metadata and payload body, and are uniformly aggregated into a time-sequential encrypted request ciphertext message stream. The message stream is strictly arranged in ascending order according to the request arrival timestamp at the gateway, ensuring accurate timing logic when prioritizing message parsing and extraction tasks, and preventing time-sequence errors such as later requests being parsed first.
[0087] Furthermore, the consumption component sets up a temporary memory cache queue for messages, with a maximum length. When the platform's instantaneous traffic peak is too high, causing the message consumption speed to lag behind the gateway's push speed, the cache queue temporarily stores messages to be parsed, and simultaneously pushes a traffic peak warning, triggering the rate-limiting buffer logic of gradient iterative traffic allocation. Messages in the temporary memory cache queue are set with an automatic expiration time. Messages that have not been parsed after the expiration time are directly discarded to avoid accumulating expired and invalid requests that occupy memory resources. Expired and discarded messages are also logged synchronously for use in platform traffic peak capacity assessment and tenant business access pattern analysis.
[0088] S1.4: Align hardware timing monitoring streams, encrypted request ciphertext message streams, and hierarchical tenant quota isolation and control metadata with unified scheduling time slots as time slices to generate a national cryptographic multidimensional fusion dataset.
[0089] Furthermore, the platform's global data aggregation bus serves as the central hub for the unified integration of the three types of data. The bus connects to the hierarchical tenant quota isolation and control metadata data stream, the hardware timing monitoring structured record data stream, and the encrypted request ciphertext message stream. The bus has three independent data receiving channels, allowing the three types of data to flow in in parallel without interference. Each channel has an independent temporary data buffer window, using a unified scheduling time slot as the time slice to align the collection timing windows of the three types of data. The three types of data collected within the same balanced scheduling cycle are classified and merged into a complete national cryptographic multidimensional fusion data unit, distinguishing data units from different scheduling cycles to avoid cross-cycle data mixing that could cause load calculation deviations.
[0090] Furthermore, the platform's global data aggregation bus performs global data cleaning and verification before integration, verifying the integrity of three types of data in sequence: First, it verifies whether the hierarchical tenant quota isolation and control metadata covers all currently active online tenants. If there are missing quota records for active tenants, the data gap is marked, and the S1.1 database synchronization agent is called to retrieve the missing tenant quota data to supplement it. Second, it verifies whether the hardware timing monitoring stream output by the ring data buffer covers all normal online heterogeneous cryptographic computing power nodes in the cluster, removing the indicator records of cryptographic computing power nodes that are offline due to faults or under maintenance, and only retaining the valid cryptographic computing power node indicators that can normally carry business requests. Finally, it verifies the timing continuity of the encrypted request ciphertext message stream, removing expired, incomplete, or illegally discarded residual messages, and only retaining legal and complete business request messages to be scheduled.
[0091] Furthermore, after all verification, completion, and filtering operations are completed, the platform's global data aggregation bus packages and encapsulates the three sets of hierarchical tenant quota isolation and control metadata set, hardware time-series monitoring stream structured record set, and encrypted request ciphertext message stream set within the same scheduling time slot. It also adds five types of global statistical tags: unique number of the current scheduling cycle, data aggregation completion timestamp, total number of online cryptographic computing power nodes in the cluster, total number of active tenants, and total number of pending requests. After encapsulation, a complete standardized national cryptographic multidimensional fusion dataset is generated.
[0092] S2: Construct a national cryptographic hardware adaptation load quantization model for cryptographic computing power nodes. Based on the rated computing power nominal value in the hardware timing monitoring stream, calculate the current load deviation rate as the computing power deviation correction factor and substitute it into the national cryptographic hardware adaptation load quantization model. Iteratively solve the node smooth hierarchical scheduling weight set. After three-level decoupling and encapsulation, generate a node-interface two-layer weight mapping set.
[0093] Furthermore, the national cryptographic hardware adaptation load quantization model is a multi-input single-output computation model built on weighted nonlinear transformation. It does not contain network layers or learnable parameters that need to be pre-trained. All weight coefficients are pre-calibrated and stored by the platform configuration center according to the government cryptographic operation scenario. The input layer of the national cryptographic hardware-adapted load quantization model receives a five-dimensional load feature vector, which consists of CPU hardware acceleration utilization, encrypted memory buffer usage, national cryptographic dedicated network port throughput, key disk read / write latency, and computing power deviation correction factor. The hidden layer consists of five parallel independent weighting units, each connected to a single dimension input of the five-dimensional load feature vector. Each weighting unit is configured with a corresponding adjustable weight coefficient: CPU hardware acceleration utilization corresponds to the first weighting unit and the first weight coefficient; encrypted memory buffer usage corresponds to the second weighting unit and the second weight coefficient; national cryptographic dedicated network port throughput corresponds to the third weighting unit and the third weight coefficient; key disk read / write latency corresponds to the fourth weighting unit and the fourth weight coefficient; and computing power deviation correction factor corresponds to the fifth weighting unit and the fifth weight coefficient. The output layer is a summation and aggregation node, which performs an accumulation operation on the outputs of the five weighting units to generate a comprehensive load score. The first weight coefficient, the second weight coefficient, the third weight coefficient, the fourth weight coefficient, and the fifth weight coefficient are all stored in the platform's global configuration center. In this embodiment, the five sets of weight coefficients pre-calibrated for the government cryptography operation scenario are 0.30, 0.20, 0.15, 0.20, and 0.15 respectively, and the sum of the five sets of weight coefficients is 1.
[0094] Furthermore, when the national cryptographic hardware adaptation load quantization model performs a single calculation, it first uses the CPU hardware acceleration utilization rate and the encrypted memory buffer utilization rate as their original percentage values in the calculation. Then, it normalizes the throughput of the national cryptographic dedicated network port before using it in the calculation. The normalization method is to read the rated maximum throughput value of the national cryptographic dedicated network port of the corresponding model of the cryptographic computing node, divide the current national cryptographic dedicated network port throughput value by the rated maximum throughput value, and obtain the normalized network port utilization rate in the range of 0 to 1. The normalized network port utilization rate is then used as the input value of the third weighting unit, ensuring that the lower the network port utilization rate, the greater the contribution of this dimension to the overall load score. Similarly, the key disk read / write latency is normalized before using it in the calculation. The normalization method is to read the rated upper limit value of the key disk read / write latency of the corresponding model of the cryptographic computing node, divide the current key disk read / write latency value by the rated upper limit value, and obtain the normalized disk latency rate in the range of 0 to 1. This normalized disk latency rate is then used as the input value of the fourth weighting unit. The computing power deviation correction factor is directly used in the calculation based on its calculated ratio. The national cryptographic hardware adaptation load quantization model sums the output values of the five weighted units to obtain the comprehensive load score of the cryptographic computing power node.
[0095] The calculation process of the computing power deviation correction factor includes:
[0096] S2.1: Read the hardware timing monitoring stream to obtain the actual SM2 / SM4 computing throughput of each cryptographic computing node within a preset statistical window;
[0097] Furthermore, when the national cryptographic hardware adaptation load quantization model initiates a single scheduling cycle calculation, it first sends a data read request to the circular data buffer. The request parameters carry the current scheduling cycle time interval and a list of all online valid cryptographic computing power nodes in the cluster. After receiving the read request, the circular data buffer searches for the latest hardware time-series monitoring stream structured record in the corresponding time interval according to the list of cryptographic computing power node identities, retrieving only the most recently collected indicator data for the current cycle. After the buffer completes the search, it returns the complete structured records of all valid cryptographic computing power nodes in batches.
[0098] Furthermore, the national cryptographic hardware adaptation load quantization model reading interface parses the internal fields of each record one by one, and separates the original data of four independent dimensions from the hardware timing monitoring stream structured record: CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency. At the same time, it matches the preset SM2 / SM4 computing performance counters according to the cryptographic computing node hardware type label in the record.
[0099] Furthermore, the SM2 / SM4 computing performance counter counts the number of SM2 signature verification operations and SM4 encryption / decryption operations performed by the cryptographic computing node within a preset statistical window. The number of SM2 signature verification operations and SM4 encryption / decryption operations are multiplied by their respective single-operation data block base lengths, summed, and then divided by the duration of the preset statistical window to obtain the actual SM2 / SM4 computing throughput of the cryptographic computing node within the preset statistical window. In this embodiment, the preset statistical window duration is set to 30 seconds, the single-operation data block base length corresponding to the SM2 signature verification operation is set to 256 bytes, and the single-operation data block base length corresponding to the SM4 encryption / decryption operation is set to 1024 bytes.
[0100] S2.2: Retrieve the rated computing power nominal value of each cryptographic computing power node pre-stored on the platform; the rated computing power nominal value is based on the benchmark performance calibration of the same model of equipment under standard national cryptographic pressure test environment;
[0101] Furthermore, the platform pre-stores the rated computing power of each cryptographic computing node in the configuration center database. The rated computing power is based on the benchmark performance of the SM2 / SM4 computing throughput of the same model of equipment under the standard national cryptographic stress test environment. The physical national cryptographic machine is equipped with a dedicated cryptographic chip and high-end multi-channel memory, and its rated computing power is in the highest range. The containerized virtual cryptographic machine shares the low-specification memory of the host machine, and its rated computing power is in the lowest range.
[0102] S2.3: Calculate the ratio of the actual SM2 / SM4 computing throughput to the nominal value of the rated computing power, obtain the current load deviation rate, and use it as the computing power deviation correction factor; the computing power deviation correction factor is used to characterize the real-time deviation of the node's current computing power output relative to its baseline performance.
[0103] Furthermore, the actual SM2 / SM4 throughput of a single cryptographic computing node is divided by the node's rated computing power to calculate the current load deviation rate, which is the computing power deviation correction factor. If the actual throughput is close to the rated value, the computing power deviation correction factor approaches 1, indicating that the current computing power output of the cryptographic computing node is consistent with the baseline performance. If the actual throughput is significantly lower than the rated value, the computing power deviation correction factor is less than 1, indicating that the current computing power output of the cryptographic computing node is lower than the baseline performance, and there is performance degradation or resource contention. If the actual throughput is higher than the rated value, the computing power deviation correction factor is greater than 1, indicating that the current computing power output of the cryptographic computing node is better than the baseline performance, and there is overclocking or acceleration.
[0104] The process of generating the node-interface two-layer weight mapping set includes:
[0105] S2.4: For a single cryptographic computing node, a load feature vector is constructed using the four types of hardware timing indicators and computing power deviation correction factors in the hardware timing monitoring stream. This vector is then substituted into the national cryptographic hardware adaptation load quantization model and a comprehensive load score is obtained through weighted nonlinear transformation.
[0106] Furthermore, the national cryptographic hardware adaptation load quantization model reads four types of hardware timing indicators for a single cryptographic computing node: CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency. Combined with the node's computing power deviation correction factor, a five-dimensional load feature vector is constructed. The platform's pre-set four-dimensional hardware indicator weight coefficients and the computing power deviation correction factor's exclusive weights are then used to perform a weighted nonlinear transformation on the five-dimensional feature vector. The transformation formula is: The comprehensive load score S satisfies: ,in, , , , , The platform is pre-set with adjustable weight coefficients. The lower the computing power deviation correction factor, the more severe the computing power attenuation of the node relative to the benchmark performance. Improve the overall load score. Indicates CPU hardware acceleration utilization. Indicates the usage of the encrypted memory buffer. This represents the normalized throughput value of the dedicated national cryptographic network port. Indicates the disk read / write latency of the key. This represents the computing power deviation correction factor, which enables nodes with performance degradation to obtain a higher load score, thereby being assigned fewer requests in subsequent scheduling.
[0107] Furthermore, the national cryptographic hardware adaptation load quantization model initiates a data read request to the global configuration center, matching the weight coefficient template corresponding to the current business scenario. In this embodiment, the business scenario is government cryptographic operation, so a dedicated coefficient template for government cryptographic operation is retrieved. Operation and maintenance personnel can modify the weight template parameters of any scenario in the global configuration center through the operation and maintenance visual configuration backend. The modified weight values are stored in the global configuration center storage medium in real time. When the national cryptographic hardware adaptation load quantization model reads weight data in the next round, it directly loads the updated parameters without restarting the platform scheduling service. After a single cryptographic computing node completes the weighted nonlinear transformation, a comprehensive load score is generated. The higher the score, the heavier the comprehensive load of the cryptographic computing node, the less remaining computing resources, and the less suitable it is to allocate more business requests.
[0108] S2.5: The comprehensive load score is converted into the initial dynamic weights of the nodes through reverse mapping transformation and global normalization;
[0109] Furthermore, the comprehensive load score of all cryptographic computing nodes is read, and the reverse mapping transformation logic is executed. The reciprocal of the comprehensive load score is used to obtain the load inversion factor for each node. The magnitude of the load inversion factor is inversely related to the level of the comprehensive load score. Security constraint parameters stored in the platform configuration center are retrieved to confirm three types of fixed parameters: the upper limit threshold of the load inversion factor, the high load judgment threshold, and the lower limit threshold of the load inversion factor. The upper limit threshold of the load inversion factor is set to 10. This value is based on the fact that when the comprehensive load score of a node approaches zero, directly performing the reciprocal operation will result in an infinity-like value, causing a single idle node to occupy all the scheduling weight of the cluster, preventing other normally loaded nodes from receiving traffic allocation. Therefore, setting the upper limit threshold to 10 limits the scheduling weight of completely idle nodes to a reasonable range. The high load judgment threshold is set to 80. This value is based on the fact that the value range of the comprehensive load score of a node is 0 to 100. When the score reaches 80, it indicates that the CPU hardware of the node... The overall load factors, including acceleration utilization, encrypted memory buffer usage, and key disk read / write latency, are all at a high level. The remaining available computing power is less than 20% of the rated capacity. Continuing to allocate new requests to it will significantly increase the risk of service timeouts or downtime. Therefore, 80 is set as the high load threshold. The lower limit of the load reversal factor is set at 0.01. The reason for this setting is that when the overall load score of a node reaches or exceeds the high load threshold of 80, the scheduling weight of the node needs to be compressed to an extremely low level but not reduced to zero. This is to prevent the node from being unable to recover traffic in time when the load suddenly drops after it is completely out of the scheduling field of view. A weight value of 0.01 can ensure that the node can still receive a very small number of requests for load probing under extremely high load conditions, without threatening the safe operation of the node.
[0110] Furthermore, a numerical security judgment is performed on the node's comprehensive load score: if the node's comprehensive load score is less than 0.01, the instance is determined to be in a completely idle and load-free running state, and the node's load inversion factor is directly assigned to the upper limit threshold of 10, without performing the reciprocal operation; if the node's comprehensive load score is greater than or equal to the high load judgment threshold of 80, the instance's running load is determined to be close to the hardware computing power capacity limit, and the node's load inversion factor is directly assigned to the lower limit threshold of 0.01, without performing the reciprocal operation; if the node's comprehensive load score is greater than or equal to 0.01 and less than 80, the instance is determined to be in the normal load range, and the built-in reciprocal operation logic of the reverse mapping transformation is executed, using the current node's comprehensive load score to complete the reciprocal calculation, and the calculated result is the original load inversion factor of the instance; all cryptographic computing power nodes in the cluster are traversed in a loop, and the judgment and numerical conversion are performed on each node in turn. After the load inversion factor calculation of each node is completed, the current node's identity identifier is bound and recorded with the calculated load inversion factor. After all nodes have been calculated, all bound records are integrated to generate a complete load inversion factor list.
[0111] Furthermore, the load inversion factors of all cryptographic computing power nodes in the cluster are summed to obtain the global inversion factor sum. Then, the load inversion factor of each cryptographic computing power node is divided by the global inversion factor sum to obtain the initial dynamic weight of each cryptographic computing power node. The initial dynamic weight of the node naturally satisfies the constraint that all weights in the cluster are summed to a unified baseline value. The weight value directly corresponds to the request allocation ratio of the corresponding cryptographic computing power node under the current load state.
[0112] S2.6: The initial dynamic weight of the node calculated in the current period is weighted and fused with the historical weight of the previous period to obtain the smoothed dynamic benchmark weight of the node, and the smoothed dynamic benchmark weight of the node is determined as the node layer scheduling weight.
[0113] Furthermore, two types of weight data sources are read respectively. The first type of data source is the initial dynamic weight of each cryptographic computing node calculated in the current period, which is stored in the temporary storage area of the model's local memory. The second type of data source is the historical dynamic baseline weight of each cryptographic computing node in the previous period stored in the distributed memory cache. The distributed memory cache only retains the historical weight data of the most recent scheduling period. After the calculation of each scheduling period is completed, the system automatically writes the smoothed node dynamic baseline weight generated in the current period into the distributed memory cache, overwriting the historical data stored in the previous period.
[0114] Furthermore, the weight fusion ratio parameter stored in the platform configuration center is retrieved. The weight fusion ratio parameter includes two items: the new weight ratio of the current period and the historical weight ratio of the previous period. The sum of the two parameters is equal to 1. In this embodiment, the new weight ratio of the current period is set to 0.35 and the historical weight ratio of the previous period is set to 0.65.
[0115] Furthermore, using a single cryptographic computing node as the matching unit, the initial dynamic weight of the current period node and the historical dynamic benchmark weight of the same node in the previous period are matched based on the identity of the cryptographic computing node. The two sets of weight values are weighted and superimposed according to the weight fusion ratio parameter. The calculation method of the weighted superposition process is as follows: multiply the initial dynamic weight of the current period node by the proportion of the new weight in the current period (0.35), multiply the historical dynamic benchmark weight of the same node in the previous period by the proportion of the historical weight in the previous period (0.65), and add the two products to generate the smoothed node dynamic benchmark weight corresponding to the cryptographic computing node.
[0116] Furthermore, after completing the weighted fusion calculation of the smoothed dynamic benchmark weight of a single cryptographic computing node, an interval verification is performed on the weight value. The verification standard is that the smoothed dynamic benchmark weight value must be greater than zero. If the verification finds that the smoothed dynamic benchmark weight value of a certain cryptographic computing node is equal to zero or negative, the smoothed dynamic benchmark weight of that node is forcibly corrected to a preset minimum positive number, which is set to 0.001.
[0117] Furthermore, the entire cluster of cryptographic computing power nodes is iterated through, and the smoothed node dynamic baseline weight calculation and interval verification are completed for each node. All verified cryptographic computing power node identity identifiers and corresponding smoothed node dynamic baseline weight binding records are integrated, and the smoothed node dynamic baseline weight of each cryptographic computing power node is directly determined as the node-level scheduling weight of that cryptographic computing power node.
[0118] S2.7: Repeat S2.4 to S2.6, traverse all cryptographic computing power nodes in the cluster, and generate a first-level weight mapping that includes the scheduling weights of each node's node layer;
[0119] Furthermore, the system binds a node-level scheduling weight tag to each cryptographic computing power node individually. The tag is issued along with the cryptographic computing power node's identity identifier and serves as the top-level proportional constraint benchmark in the multi-constraint traffic allocation logic. The node-level scheduling weights of all cryptographic computing power nodes in the cluster together constitute the cluster's global node scheduling ratio system. The node-level scheduling weights are synchronously and persistently written to the platform service registry center. The gateway distribution service reads the latest node-level scheduling weight data from the registry center in real time, and automatically updates the registry center's weight configuration after each round of iteration and optimization. At the same time, the node-level scheduling weights are synchronously pushed to the platform's monitoring and visualization module, and the operation and maintenance panel displays the current node-level scheduling weight value change curve of each cryptographic computing power node in real time.
[0120] S2.8: For a single cryptographic computing node, read the list of national cryptographic interface types deployed on the cryptographic computing node and the average processing latency of SM2 / SM3 / SM4 for each interface within the historical sliding window, as recorded by the platform service registration center.
[0121] Furthermore, the platform service registration center is accessed using the identity of a single cryptographic computing node as the search condition. After receiving the search request, the service registration center queries the locally stored cryptographic computing node configuration ledger based on the identity of the cryptographic computing node. The configuration ledger records all national cryptographic interface types deployed by the cryptographic computing node. After the query is completed, a list of national cryptographic interface types exclusive to the cryptographic computing node is returned. The list of national cryptographic interface types includes one or more of the following: digital signature interface, signature verification interface, symmetric encryption interface, asymmetric decryption interface, timestamp issuance interface, and key negotiation interface.
[0122] Furthermore, after completing the reading of the national cryptographic interface type list, the sliding time window statistics unit built into the platform service registration center is accessed using the identity identifier of the same cryptographic computing node as the search condition. The sliding time window statistics unit maintains the average processing latency of SM2 signature verification, SM3 hashing, and SM4 encryption / decryption for each national cryptographic interface according to the interface type. The sliding time window statistics unit has a sliding time window duration parameter, which is uniformly configured in the platform configuration center. In this embodiment, the sliding time window duration parameter is set to 300 seconds. The sliding time window statistics unit processes all requests falling within the current sliding time window. The time record performs a filtering operation. The filtering rule is as follows: calculate the arithmetic mean and standard deviation of the processing time of all requests for the same interface within the current sliding time window. Records with processing times greater than the arithmetic mean plus three times the standard deviation are judged as extreme timeout failure records and removed from the subsequent average processing latency calculation. After the sliding time window statistics unit completes the filtering operation, it takes the arithmetic mean of the remaining valid processing times to generate the average processing latency of the interface within the current sliding time window. The sliding time window statistics unit performs the above calculation one by one according to the interface type to generate the average processing latency of SM2 signature verification, SM3 hash average processing latency, and SM4 encryption and decryption average processing latency for various national cryptographic interfaces.
[0123] It should be noted that the sliding time window statistics unit returns the average processing latency data of various national cryptographic interfaces to the national cryptographic hardware adaptation load quantization model. The national cryptographic hardware adaptation load quantization model uses the identity of the cryptographic computing node as the matching primary key to associate and bind the list of national cryptographic interface types read from the service registration center with the average processing latency data of various interfaces returned by the sliding time window statistics unit. For interfaces recorded in the list of national cryptographic interface types but for which the sliding time window statistics unit has not yet collected sufficient effective time consumption data, the average processing latency of the interface is set to the default average processing latency of the interface type stored in the platform configuration center. The value of the default average processing latency is based on the historical average time consumption of the interface type under the standard stress test environment of the same model of equipment. In this embodiment, the default average processing latency of the digital signature interface is set to 15 milliseconds, the default average processing latency of the signature verification interface is set to 8 milliseconds, the default average processing latency of the symmetric encryption interface is set to 5 milliseconds, the default average processing latency of the asymmetric decryption interface is set to 20 milliseconds, the default average processing latency of the timestamp issuance interface is set to 3 milliseconds, and the default average processing latency of the key negotiation interface is set to 10 milliseconds. After the national cryptographic hardware adaptation load quantization model completes the association and binding, a node interface latency mapping table is generated. The table uses the identity of the cryptographic computing power node as the primary key and the names of each interface in the national cryptographic interface type list and their corresponding average processing latency as key-value pairs. The node interface latency mapping table is used to split the node layer scheduling weight by interface.
[0124] S2.9: Using the reciprocal of the average processing latency of each interface as a proportional coefficient, the node layer scheduling weight is split to generate the interface layer subdivision weight of each interface. The sum of all interface layer subdivision weights within the same cryptographic computing power node is equal to the node layer scheduling weight, thus obtaining the second-level weight mapping.
[0125] Furthermore, the three sets of basic computing data of a single cryptographic computing node are integrated. The first set of data is the node-level scheduling weight of the cryptographic computing node, the second set of data is the list of national cryptographic interface types deployed by the cryptographic computing node, and the third set of data is the average processing latency of SM2 signature verification, SM3 hash, or SM4 encryption and decryption corresponding to each type of interface recorded in the node interface latency mapping table.
[0126] Furthermore, for each type of national cryptographic interface in the current cryptographic computing node deployment list, the average processing latency value corresponding to that interface is read, and the reciprocal operation is performed on the average processing latency to generate the reverse benchmark value for that interface. The reverse benchmark values of all interfaces of the current cryptographic computing node are summed to obtain the total reverse benchmark sum of the node interfaces for that cryptographic computing node. The reverse benchmark value of a single type of interface is divided by the total reverse benchmark sum of the node interfaces to calculate the allocation ratio corresponding to that interface. The node layer scheduling weight of the cryptographic computing node is multiplied by the allocation ratio of that interface to calculate the interface layer subdivision weight specific to that interface. For example, if the average processing latency of the digital signature interface is 15 milliseconds, its reverse benchmark value is 1 / 15; if the average processing latency of the symmetric encryption interface is 5 milliseconds, its reverse benchmark value is 1 / 5.
[0127] Furthermore, for each type of interface in the current cryptographic computing node deployment list, reverse baseline value calculation, allocation ratio calculation, and interface layer subdivision weight calculation are performed sequentially until all interfaces of the node have generated corresponding interface layer subdivision weights. The interface layer subdivision weights of all interfaces within the current cryptographic computing node are summed one by one, and the summation result is kept exactly equal to the node layer scheduling weight of the cryptographic computing node. The identity of the current cryptographic computing node, the name of each interface of the node, and the corresponding interface layer subdivision weight of each interface are bound and recorded to generate a single node interface subdivision weight record. The entire cluster of cryptographic computing nodes is traversed in a loop, and the calculation of the interface layer subdivision weight of each interface within each cryptographic computing node is completed on each node. After the traversal is completed, all node interface subdivision weight records are integrated to generate a second-level weight mapping with the cryptographic computing node identity as the primary key and each interface name and its corresponding interface layer subdivision weight as key-value pairs.
[0128] S2.10: Based on the hardware configuration parameters of a single cryptographic computing node, query the computing power benchmark evaluation mapping table to obtain the comprehensive computing power benchmark score, calculate the ratio of the comprehensive computing power benchmark score of a single cryptographic computing node to the highest comprehensive computing power benchmark score of the cluster as the computing power correction factor, and use the computing power correction factor as the third-level weight mapping.
[0129] Furthermore, the platform configuration center pre-stores a computing power benchmark evaluation mapping table. This table has a two-dimensional table structure, with row indices representing the CPU model generation and column indices representing the number of memory channels configured. Each cell in the table stores the comprehensive computing power benchmark score for the corresponding combination of CPU model generation and memory channel configuration. The table data is calibrated based on a commercial cryptographic operation standard stress test environment. The calibration method involves running SM2 signature verification and SM4 encryption / decryption operations under a standard stress test environment, using the number of standard cryptographic operations completed per second as the comprehensive computing power benchmark score.
[0130] Furthermore, the specific values stored in the computing power benchmark evaluation mapping table include: when the CPU model generation is fourth or fifth generation and the number of memory channels is 1, the comprehensive computing power benchmark score is set to 1000; when the CPU model generation is fourth or fifth generation and the number of memory channels is 2, the comprehensive computing power benchmark score is set to 1800; when the CPU model generation is fourth or fifth generation and the number of memory channels is 4, the comprehensive computing power benchmark score is set to 3200; when the CPU model generation is sixth or seventh generation and the number of memory channels is 1, the comprehensive computing power benchmark score is set to 2200; when the CPU model generation is sixth or seventh generation and the number of memory channels is 1, the comprehensive computing power benchmark score is set to 2200. When the CPU generation is 2, the overall computing power benchmark score is set to 4000; when the CPU generation is 6th or 7th generation and the number of memory channels is 4, the overall computing power benchmark score is set to 6800; when the CPU generation is 8th generation or above and the number of memory channels is 1, the overall computing power benchmark score is set to 3500; when the CPU generation is 8th generation or above and the number of memory channels is 2, the overall computing power benchmark score is set to 6000; when the CPU generation is 8th generation or above and the number of memory channels is 4, the overall computing power benchmark score is set to 10000; when equipped with a hardware cryptographic acceleration chip, the overall computing power benchmark score is multiplied by 1.8 based on the above values.
[0131] Furthermore, the system reads the hardware configuration ledger of each cryptographic computing node stored in the platform service registry. This ledger fully records the CPU model and generation information, the number of memory channels, and whether a hardware cryptographic acceleration chip is installed on the cryptographic computing node. The system uses the CPU model and generation, the number of memory channels, and the hardware cryptographic acceleration chip identifier from the hardware configuration ledger as joint query conditions to retrieve the computing power benchmark evaluation mapping table and obtain the unique comprehensive computing power benchmark score for that cryptographic computing node. If any cryptographic computing node's hardware configuration ledger information is missing, and the CPU model and generation or the number of memory channels cannot be provided, the system automatically sets the comprehensive computing power benchmark score of that cryptographic computing node to the lowest score in the computing power benchmark evaluation mapping table, i.e., a comprehensive computing power benchmark score of 1000 for a CPU model of generation 4 or 5, one memory channel, and no hardware cryptographic acceleration chip. The entire cluster of cryptographic computing nodes is traversed, and the comprehensive computing power benchmark score of each node is retrieved one by one. After the retrieval of all nodes is completed, all the retrieved comprehensive computing power benchmark scores are traversed, and the maximum value is selected as the highest comprehensive computing power benchmark score of the entire cluster. Taking a single cryptographic computing node as the processing unit, the comprehensive computing power benchmark score of the cryptographic computing node itself is divided by the highest comprehensive computing power benchmark score of the entire cluster, and the result of the division operation is used as the computing power correction factor of the cryptographic computing node.
[0132] Furthermore, the system binds the current cryptographic computing power node's identity identifier with its computing power correction factor, generating a single node computing power correction factor record; it iterates through all cryptographic computing power nodes in the cluster, calculating and binding the computing power correction factor for each node; after the iteration is complete, it integrates all node computing power correction factor records to generate a third-level weighted mapping with the cryptographic computing power node's identity identifier as the primary key and the computing power correction factor as the value.
[0133] S2.11: Encapsulate and integrate the first-level weight mapping, the second-level weight mapping, and the third-level weight mapping according to the node-interface dimension to generate a two-layer weight mapping set for nodes and interfaces.
[0134] Furthermore, after completing the calculation of all three types of weight data—node-level scheduling weight, interface-level subdivision weight of each interface, and computing power correction factor—the three types of data are bound and encapsulated one-to-one according to the cryptographic computing power node identity identifier. Each layered weight record uniformly includes four core data items: cryptographic computing power node identity identifier, node-level scheduling weight, full interface subdivision weight list, and computing power correction factor. The timestamp of the current weight generation cycle and the auxiliary fields of the highest comprehensive computing power benchmark score of the cluster are added. All cryptographic computing power node layered weight records are summarized and packaged to generate a complete node-interface two-layer weight mapping set.
[0135] S3: Input the two-layer weight mapping set and hierarchical tenant quota isolation and control metadata into the pre-built multi-objective convergence optimization model, iteratively correct the weight allocation value of each cryptographic computing power node to each interface, until the actual computing power load range of all cryptographic computing power nodes is lower than the preset dynamic convergence threshold and all tenant traffic does not exceed the preset quota limit, and lock the weight allocation scheme of the current node-interface.
[0136] The construction and solution process of the multi-objective convergent optimization model includes:
[0137] S3.1: Extract the node-level scheduling weight and the interface-level subdivision weight from the node-interface two-layer weight mapping set, construct weight ratio constraints, and limit the ratio of the number of requests allocated to each cryptographic computing power node in the same round to the ratio of the node-level scheduling weight to be constant, and the ratio of the number of requests allocated to each interface within the cryptographic computing power node to the ratio of the interface-level subdivision weight to be constant.
[0138] Furthermore, the two-layer weight mapping set of nodes and interfaces is read, and the node-level scheduling weights corresponding to all effective cryptographic computing power nodes in the cluster and the interface-level subdivision weights of all interfaces within each cryptographic computing power node are extracted in batches. Based on the extracted node-level scheduling weights and interface-level subdivision weights, a globally unified weight ratio constraint is constructed. The weight ratio constraint consists of two nested rules: cluster node-level constraints and node-interface-level constraints. The cluster node-level constraints follow the constant ratio logic of the same distribution round, and the ratio of the total number of requests allocated to any two cryptographic computing power nodes in the same round of traffic allocation is completely consistent with the ratio of the node-level scheduling weights corresponding to the two cryptographic computing power nodes. The node-interface-level constraints follow the constant ratio logic within the same cryptographic computing power node, and the ratio of the number of requests allocated to different national cryptographic interfaces within a single cryptographic computing power node is consistent with the ratio of the interface-level subdivision weights of the corresponding interfaces. The constructed two-layer nested weight ratio constraint is then solidified and stored in the iterative computing memory.
[0139] S3.2: Extract the remaining encryptable quota of each tenant from the hierarchical tenant quota isolation and control metadata, construct a quota upper limit hard constraint, and limit the total request consumption allocated to each tenant in this round to not exceed its remaining encryptable quota;
[0140] Furthermore, the complete record set of metadata for hierarchical tenant quota isolation and control is read, and two dynamic values are extracted for each online tenant: the daily encrypted consumption count and the remaining encryptable quota. Combined with the tenant's unique security identifier within the encrypted request ciphertext message stream, a quota mapping table is established that corresponds one-to-one between tenants and quota values. Based on the quota mapping table, a global quota upper limit hard constraint is constructed, covering all tenants on the platform and distinguishing independent quota upper limits for different tenants, ensuring no interference between them. The core rule of the quota upper limit hard constraint is that the total call volume of a tenant within a single day's time window cannot exceed its single-day quota threshold. The total call volume is composed of the daily consumed count and the estimated consumption of new requests to be allocated in this round. Before iteratively optimizing the allocation of traffic, a tenant quota pre-verification is performed on each request to be allocated. If the current consumed count plus the number of requests to be allocated for a tenant reaches or exceeds the single-day quota threshold, the excess request of that tenant is directly blocked.
[0141] S3.3: With minimizing the load difference among all cryptographic computing nodes in the cluster as the primary optimization objective and maximizing the request scheduling success rate of high-security tenants as the secondary optimization objective, the optimal weight allocation scheme is solved by an iterative strategy that combines gradient descent and heuristic search within the feasible solution space formed by the weight ratio constraint and the quota upper limit hard constraint.
[0142] Furthermore, two types of pre-built constraints are loaded synchronously: a weight ratio constraint and a quota upper limit hard constraint. These two constraints together serve as the scheduling hard boundary for the traffic allocation ratio adjustment operation. The unified core objective of iterative optimization is to minimize the numerical difference between the comprehensive load scores of all cryptographic computing power nodes in the cluster. By adjusting the traffic allocation ratio, fewer new business requests are allocated to high-load cryptographic computing power nodes, and more new business requests are allocated to low-load and idle cryptographic computing power nodes. At the same time, maximizing the request scheduling success rate of high-security tenants is a secondary optimization objective. Within the feasible solution space formed by the weight ratio constraint and the quota upper limit hard constraint, an iterative strategy combining gradient descent and heuristic search is used to solve for the optimal weight allocation scheme. Gradient descent and heuristic search are existing technologies in this field and are not inventive solutions of this application, and will not be described in detail here.
[0143] The process of ensuring that the actual computing power load range of all cryptographic computing power nodes is lower than a preset dynamic convergence threshold includes:
[0144] S3.4: After each iteration, read the weight allocation values of each cryptographic computing power node to each interface output by this iteration, combine the current comprehensive load score of each cryptographic computing power node and the computing power correction factor, accumulate the total number of requests allocated to the corresponding cryptographic computing power node according to the interface type, multiply by the average computing power consumption benchmark value per request, and calculate the predicted load value of the cryptographic computing power node after bearing the new request.
[0145] It should be noted that after each iteration completes the fine-tuning of the weight allocation value, the cryptographic computing power node load prediction and simulation process is initiated. The simulation does not actually distribute business requests, but only performs simulated computing power consumption calculations based on the current allocation ratio, the real-time load of the cryptographic computing power nodes, and the computing power benchmark. This process predicts in advance the load changes of each cryptographic computing power node in the cluster after the allocation plan is implemented in this round. The simulation process traverses all valid cryptographic computing power nodes in the cluster one by one, reads the latest node comprehensive load score, computing power correction factor, and the estimated total amount of various interface requests allocated to the cryptographic computing power node in this iteration for that cryptographic computing power node, and combines the average computing power consumption benchmark value of a single request for different national cryptographic interfaces to calculate the overall resource consumption increase of the cryptographic computing power node after carrying all the new requests in this round. This is then added to the current original load score to generate the predicted load value of the cryptographic computing power node after carrying the new requests.
[0146] S3.5: Traverse all cryptographic computing power nodes in the cluster, extract the maximum and minimum values from the predicted load values of each cryptographic computing power node and calculate their difference, and use the difference as the actual computing power load range;
[0147] Furthermore, all records in the total list of predicted loads for cryptographic computing nodes across the entire cluster are traversed one by one, and the predicted load value contained in each record is extracted. After completing the traversal of all values, the highest and lowest values of the global predicted load are selected. The actual computing load range of the cluster is calculated by subtracting the lowest value of the global predicted load from the highest value of the global predicted load. The actual computing load range can intuitively reflect the degree of polarization of the cluster load after the temporary allocation scheme of this iteration is implemented.
[0148] S3.6: Read the dynamic convergence threshold stored in the platform configuration center, and compare the actual computing power load range with the dynamic convergence threshold; if the actual computing power load range is less than the dynamic convergence threshold, it is determined that the iteration convergence is complete, and the weight allocation value of the current round is locked as the final weight allocation scheme; if the actual computing power load range is greater than or equal to the dynamic convergence threshold, jump to S3.3 to continue to execute the next round of iteration correction until the convergence condition is met; during the iteration process, it is synchronously verified whether the cumulative allocation request volume of each tenant on the same day exceeds the remaining encryptable quota in the hierarchical tenant quota isolation management metadata. If any tenant exceeds the preset quota limit, the allocation volume of that tenant in this round is rolled back to within the quota boundary.
[0149] Furthermore, the dynamic convergence threshold parameter stored in the global configuration center is retrieved. In this embodiment, the dynamic convergence threshold is set to 5. The operation and maintenance personnel can flexibly adjust the value of this parameter according to the type of business carried by the platform. The calculated actual computing power load range is compared with the dynamic convergence threshold. If the actual computing power load range is less than the dynamic convergence threshold, it is determined that the iterative convergence is complete, and the current weight allocation value is locked as the final weight allocation scheme. If the actual computing power load range is greater than or equal to the dynamic convergence threshold, the process jumps back to S3.3 to continue the next round of iterative correction. During the iterative correction process, it is simultaneously verified whether the cumulative allocation request volume of each tenant on the same day exceeds the remaining encryptable quota corresponding to the tenant in the hierarchical tenant quota isolation management metadata. Taking a single allocation request as the verification unit, the unique security identifier of the tenant carried in the allocation request is extracted, and the unique security identifier of the tenant is used as the verification unit. The system retrieves the remaining encryptable quota value from the hierarchical tenant quota isolation management metadata based on the search criteria. It then compares the sum of the cumulative number of all requests allocated to the tenant in the current round plus the current request's consumption with the remaining encryptable quota value. If the sum is less than or equal to the remaining encryptable quota value, the request is allowed to continue participating in traffic allocation. If the sum is greater than the remaining encryptable quota value, the tenant is determined to have exceeded the preset quota limit. The allocation request volume for the tenant in this round is rolled back to the boundary of the difference between the remaining encryptable quota value and the number already allocated in this round. The excess requests are temporarily stored in the quota waiting queue and will participate in allocation again after the quota is reset in the next scheduling cycle. The global configuration center synchronously sets the maximum iteration round limit security constraint parameter, with a unified default configuration value of 50 across the entire platform, to prevent infinite loops in the iteration process under extreme business scenarios.
[0150] Furthermore, after convergence, according to the final determined traffic allocation ratio of each cryptographic computing node, requests to be distributed are taken from each priority queue. For each cryptographic computing node, its node-level scheduling weight is multiplied by the platform's preset concurrent throughput threshold as the upper limit of the concurrent distribution rate of that cryptographic computing node. After the distribution operation is rate-limited, the requests to be distributed are distributed to the network receiving queue of the corresponding cryptographic computing node. In this embodiment, the concurrent throughput threshold is set to 1000, which represents the maximum number of requests that a single cryptographic computing node is allowed to receive within a unit time window.
[0151] Furthermore, the system reads the global traffic allocation ratio, which is divided into three dimensions: priority stratification, the overall proportion of cryptographic computing power nodes, and the proportion of internal interface subdivisions within cryptographic computing power nodes. It reads the pending requests stored in the priority buffer queue in a fixed order from highest to lowest priority, prioritizing the complete reading and processing of all pending requests in the current high-priority queue. After reading a single pending request, it retrieves the hierarchical tenant quota isolation management metadata, matches the remaining encryptable quota corresponding to the tenant's unique security identifier carried in the request, and performs quota verification. It retrieves the concurrent throughput threshold parameters stored in the platform's global configuration center, using the node-level scheduling weight and concurrent throughput threshold of a single cryptographic computing power node as two conversion benchmarks to independently calculate the exclusive concurrent distribution rate limit for each cryptographic computing power node. It then initiates the distribution rate limiting control logic, with a built-in distribution rate counter continuously counting the cumulative number of requests forwarded to a single cryptographic computing power node per unit time. When the concurrent distribution rate limit is reached, forwarding is paused, and distribution operations resume after the counter value falls below the limit.
[0152] S4: Distribute the encryption requests of each interface to the corresponding cryptographic computing power nodes according to the weight allocation scheme. Before distribution, perform two-way signature verification of SM2 certificates and request integrity hash verification. Simultaneously, collect the full-link latency and abnormal error timing data of the encryption interface in a non-intrusive manner.
[0153] The pre-distribution process includes performing two-way signature verification of the SM2 certificate and request integrity hash verification, including:
[0154] S4.1: Extract the tenant's digital certificate and request signature value from the request to be distributed, and call the SM2 public key of this cryptographic computing node cached by the platform to verify the tenant's digital certificate and confirm the legitimacy of the tenant's identity;
[0155] Furthermore, before the converged business requests are distributed to the target cryptographic computing power nodes, the platform's built-in unified identity authentication interface is invoked to extract two core identity verification fields from the metadata area of the header of the request message to be distributed: the tenant's digital certificate serial number and the complete signature value of this business request. The certificate serial number is used as an index to retrieve the platform's local distributed cache. The cache preloads the public key digital certificates of all normal online tenants and sets up a timed automatic update mechanism to synchronize the certificate revocation list and certificate validity information. After the corresponding tenant's public key certificate is retrieved and matched, the identity authentication interface extracts the original text of the complete request message as the original text of the signature verification, calls the national cryptographic SM2 signature verification operation logic, and uses the tenant's public key in the cache to complete the integrity and legality dual verification of the request signature value. During the verification process, the current validity status of the digital certificate is checked simultaneously.
[0156] S4.2: After the signature verification is successful, the plaintext payload of the request is hashed based on the hash algorithm, and the hash calculation result is compared with the hash digest value carried in the request to confirm that the request has not been tampered with during the transmission.
[0157] Furthermore, after the SM2 certificate verification is successful, the plaintext payload of the request is extracted. Based on the platform's pre-built SM3 hash algorithm, the plaintext payload of the request is hashed to generate a real-time hash digest value. The real-time hash digest value is calculated and compared bit by bit with the original hash digest value carried in the request. If the two are completely consistent, it is determined that the request has not been tampered with during transmission; if the comparison is inconsistent, it is determined that the request has been tampered with, marked as illegal traffic, and discarded. The SM3 hash algorithm is prior art in this field and is not an inventive solution of this application, so it will not be described in detail here.
[0158] S4.3: The current request is deemed legitimate traffic and allowed to be distributed only if both the SM2 certificate two-way signature verification and the request integrity hash verification pass; otherwise, the illegitimate request is discarded and the audit log is recorded.
[0159] Furthermore, in five scenarios—unable to retrieve the corresponding public key certificate from the cache, signature verification operation failure, certificate expiration, certificate being listed for revocation, and hash comparison inconsistency—verification is deemed unsuccessful, marked as illegal traffic, and directly discarded. The source address and reason for failure of the illegal traffic are recorded simultaneously. While discarding illegal traffic, a complete audit log recording process is initiated. The logs fully retain multi-dimensional audit fields, including the source IP address of the illegal request client, the precise timestamp of the request reaching the gateway, the tenant's digital certificate serial number, the detailed reasons for the illegal failure, the requested access interface address, and the original request message digest. Audit logs are stored hierarchically, with high-risk illegal traffic such as certificate forgery and signature tampering separately archived in a high-risk security log library and simultaneously pushed in real-time to trigger security risk warnings. The platform is configured with an illegal traffic frequency statistics mechanism; if a large number of illegal requests continuously occur from the same source address within a short period, a temporary access blocking blacklist is automatically set for that IP address.
[0160] The bypass non-intrusive acquisition of encrypted interface full-link latency and abnormal error timing data includes:
[0161] S4.4: Deploy non-intrusive probes at the network entry and exit points of cryptographic computing nodes to capture the timestamps of requests entering the node for processing and response messages leaving the node, and calculate the difference to obtain the end-to-end processing latency of the encryption interface for a single request;
[0162] Furthermore, the platform pre-installs non-intrusive operation probes, which are deployed in bypass monitoring mode at the network entry and exit points of each cryptographic computing node. This requires no modification to the cryptographic machine's business program code and does not occupy business computing resources. After a legitimate request is distributed to the cryptographic computing node's network receiving queue, the cryptographic computing node's service program reads the queue request and starts cryptographic operation processing. The probe captures the start timestamp of the request entering the cryptographic computing node's processing in real time, accurately recording the time with microsecond-level precision. When the cryptographic computing node completes cryptographic operations such as signing, encryption, and verification to generate a business response message and outputs it outward, the probe synchronously captures the processing end timestamp. The difference between the end timestamp and the start timestamp is calculated to obtain the end-to-end processing latency of the encryption interface corresponding to a single request.
[0163] S4.5: Parse the status code field in the response message header, identify and record abnormal status codes including parameter errors, internal faults, and computing power overload, as well as their occurrence times, and generate abnormal error timing data.
[0164] Furthermore, the probe synchronously parses the response message header to return status codes, distinguishing four types of status identifiers: normal success status codes, parameter error business status codes, internal fault abnormal status codes of cryptographic computing power nodes, and computing power overload rate limiting status codes. After the probe completes the collection of the end-to-end processing latency and status code data for a single request, it immediately encapsulates it into a single interface operation status record, binding the corresponding cryptographic computing power node identity identifier, access interface type, tenant unique security identifier, and request time sequence tag, and pushes it in batches to the temporary receiving channel. The probe adopts a batch reporting mechanism, accumulating a certain number of status records for unified push, reducing the number of network reporting interactions.
[0165] S5: Generate hardware load compensation offset based on the collected encrypted interface end-link latency and abnormal error timing data, and backfill and update the hardware timing monitoring stream in real time.
[0166] The hardware load compensation offset is generated based on the collected end-to-end latency and error timing data of the encrypted interface, including:
[0167] S5.1: Receive the full-link latency and error reporting time sequence data of the encryption interface, aggregate and statistically analyze them according to the cryptographic computing power node and interface dimensions, and calculate the average processing latency and error rate of each interface of each cryptographic computing power node in the current statistical period;
[0168] Furthermore, it receives and aggregates the end-to-end latency and error timing data of all cryptographic computing nodes and all national cryptographic interfaces in the entire cluster, and groups them according to cryptographic computing node identity and interface type to statistically analyze four types of operational statistics indicators within a single period: average request processing latency, percentage of abnormal requests, number of concurrent requests to interfaces, and fluctuation range of request processing latency.
[0169] S5.2: If the average processing latency of any interface exceeds the preset average processing latency threshold or the anomaly rate exceeds the preset anomaly rate threshold, a positive hardware load compensation offset is generated to increase the overall load score of the node in the next scheduling cycle.
[0170] Furthermore, the platform configuration center stores the preset average processing latency threshold and preset anomaly rate threshold corresponding to each type of national cryptographic interface. In this embodiment, the preset average processing latency threshold for the digital signature interface is set to 25 milliseconds, the preset average processing latency threshold for the signature verification interface is set to 15 milliseconds, the preset average processing latency threshold for the symmetric encryption interface is set to 10 milliseconds, the preset average processing latency threshold for the asymmetric decryption interface is set to 35 milliseconds, the preset average processing latency threshold for the timestamp issuance interface is set to 8 milliseconds, the preset average processing latency threshold for the key negotiation interface is set to 18 milliseconds, and the preset anomaly rate threshold for each type of national cryptographic interface is set to 5%.
[0171] Furthermore, the average processing latency of each interface of each cryptographic computing node within the current statistical period is compared with the corresponding preset average processing latency threshold, and the anomaly rate of each interface of each cryptographic computing node within the current statistical period is compared with the corresponding preset anomaly rate threshold. If the average processing latency of a certain interface of a certain cryptographic computing node within the current statistical period exceeds the preset average processing latency threshold corresponding to that interface type, or if the anomaly rate of that interface within the current statistical period exceeds the preset anomaly rate threshold by 5%, then the interface is determined to be in an overload state, and a positive hardware load compensation offset is generated.
[0172] Furthermore, the specific value of the positive hardware load compensation offset is calculated as follows: read the comprehensive load score of the cryptographic computing node at the current moment, multiply the current node's comprehensive load score by the positive compensation coefficient to obtain the positive hardware load compensation offset. In this embodiment, the positive compensation coefficient is set to 0.08. In the next scheduling cycle, the comprehensive load score of the cryptographic computing node is updated to the sum of the current node's comprehensive load score and the positive hardware load compensation offset.
[0173] Furthermore, if the average processing latency of any interface of any cryptographic computing node in the current statistical period does not exceed the preset average processing latency threshold corresponding to that interface type, and the anomaly rate of that interface in the current statistical period does not exceed the preset anomaly rate threshold of 5%, then the interface is determined to be in a light-load state, and a negative hardware load compensation offset is generated. The specific value of the negative hardware load compensation offset is calculated as follows: read the comprehensive load score of the cryptographic computing node at the current moment, multiply the current comprehensive load score by the negative compensation coefficient to obtain the negative hardware load compensation offset. In this embodiment, the negative compensation coefficient is set to 0.03. In the next scheduling period, the comprehensive load score of the cryptographic computing node is updated to the current node comprehensive load score minus the absolute value of the negative hardware load compensation offset.
[0174] Furthermore, in each scheduling cycle, the positive or negative hardware load compensation offsets generated by each cryptographic computing node are pushed in batches to the circular data buffer. The circular data buffer uses the cryptographic computing node's identity as the primary key and writes the hardware load compensation offsets into the structured record of the cryptographic computing node's hardware timing monitoring stream, which serves as the correction input for the node's comprehensive load score calculation in the next scheduling cycle.
[0175] S5.3: Write back the generated hardware load compensation offset to the hardware timing monitoring stream of the national cryptographic multidimensional fusion dataset.
[0176] Furthermore, the hardware load compensation offset is bound to the identity of the cryptographic computing node and pushed in batches to the circular data buffer of the S1 storage hardware timing monitoring stream structured record. After receiving the offset data, the buffer performs numerical correction and refresh on the corresponding cryptographic computing node hardware timing monitoring stream record that is currently stored. The refreshed standardized hardware timing monitoring stream directly participates in the next round of S2 China cryptographic hardware adaptation load quantization model calculation. The corrected indicators can accurately reflect the real business processing load of the cryptographic computing node, making up for the deficiency that relying solely on the four hardware indicators of CPU, memory, network, and disk cannot reflect the differences in the computation time of cryptographic business interfaces.
[0177] Example 2:
[0178] Please see Figure 3 Another embodiment of the present invention provides: a dynamic load balancing system for a cryptographic service platform, comprising:
[0179] Data fusion module 10 includes a non-intrusive database synchronization agent, a log collector, a message queue consumption component, and a circular data buffer. The non-intrusive database synchronization agent reads the platform's relational database and distributed isolation cache, extracting tenant unique security identifiers, tenant security level tags, daily quota thresholds for encryption interfaces, time-based rate limiting limits, daily encryption consumption counts, and remaining encryption quotas to generate hierarchical tenant quota isolation and management metadata. The log collector monitors the operation logs of various heterogeneous cryptographic computing nodes, parses and extracts four types of hardware time-series indicators: CPU hardware acceleration utilization, encryption memory buffer utilization, national cryptographic dedicated network interface throughput, and key disk read / write latency, and stores them in a structured manner. The message queue consumption component subscribes to national cryptographic message queue partitions, collects the tenant unique security identifier, encryption interface URI, message priority tag, and gateway access timestamp in the message header, generates encrypted request ciphertext message streams, and generates a national cryptographic multidimensional fusion dataset. The circular data buffer uniformly caches standardized hardware time-series monitoring streams, providing real-time raw input datasets for the calculation of national cryptographic hardware adaptation load quantization models.
[0180] The heterogeneous computing power quantization module 20 has a built-in national cryptographic hardware adaptation load quantization model. It is used to calculate the computing power deviation correction factor based on the national cryptographic multidimensional fusion dataset and generate a two-layer weight mapping set for nodes and interfaces. It retrieves four types of hardware timing indicators of cryptographic computing power nodes in the ring data buffer, calculates the basic load characterization value by combining the preset four-dimensional hardware indicator weight coefficients, matches the rated computing power nominal value to calculate the computing power deviation correction factor, and substitutes it into the model to obtain the comprehensive load score of each cryptographic computing power node. It generates node-level scheduling weights through reverse mapping transformation, global normalization, and periodic weighted smoothing. Then, it splits the interface-level subdivision weights based on the average processing latency of the national cryptographic interface, calculates the computing power correction factor by combining the comprehensive computing power benchmark score of the cryptographic computing power node, and integrates and outputs the node-level scheduling weights, interface-level subdivision weights, and computing power correction factors to form a two-layer weight mapping set for nodes and interfaces, providing a dynamic scheduling weight basis for traffic allocation.
[0181] The multi-objective collaborative scheduling module 30 has a built-in multi-objective convergence optimization model, which is used to iteratively optimize the weight allocation scheme under the hard constraints of weight ratio constraints and quota upper limits, and determine convergence. It parses the encrypted request ciphertext message stream to extract feature tuples such as the tenant's unique security identifier, encrypted interface URI, and message priority label. It constructs weight ratio constraints and quota upper limit hard constraints with node-level scheduling weights, interface-level subdivided weights, and hierarchical tenant quota isolation and control metadata. It fine-tunes the weight allocation value round by round with the goal of balancing the cluster load, infers the predicted load value of the cryptographic computing power nodes after adding a new request, and compares the actual computing power load range with the preset dynamic convergence threshold to determine the convergence status. After convergence, it combines the cryptographic computing power node concurrent throughput threshold to limit the distribution rate and divides the priority queue to complete the pre-allocation scheduling of business requests.
[0182] The security distribution and awareness module 40 has a built-in unified identity authentication interface and a non-intrusive probe. Before distribution, it retrieves the tenant's SM2 public key to perform two-way verification of the request digital certificate and signature, and performs request integrity verification based on the SM3 hash algorithm. It filters out illegal traffic with invalid certificates, abnormal signatures, and inconsistent hash comparisons and retains abnormal records. For legitimate traffic, it distributes it to the corresponding cryptographic computing power nodes according to the weighted distribution scheme. The probe synchronously collects the interface's full-link processing latency, return status code, and abnormal error timing data, etc., to complete the secure distribution of legitimate business traffic and real-time collection of interface operation status data.
[0183] The feedback correction module 50 operates according to the closed-loop feedback mechanism. It receives the end-to-end latency and abnormal error timing data output by the security distribution and perception module 40, aggregates and statistically averages the processing latency and error rate according to the cryptographic computing power node and interface dimensions, generates hardware load compensation offset, and sends the updated cryptographic computing power node load statistics back to the circular data buffer to refresh the hardware timing monitoring stream. This provides an updated data source for the next round of load weight calculation and traffic iteration optimization, forming a complete load balancing scheduling closed loop.
[0184] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention 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 changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the present invention. All of these variations are within the protection scope of the present invention.
Claims
1. A dynamic load balancing method for a cryptographic service platform, characterized in that, include: S1: Construct a multi-dimensional fusion dataset based on national cryptographic standards; The national cryptographic multidimensional fusion dataset includes hardware timing monitoring streams of heterogeneous cryptographic computing power nodes, encrypted request ciphertext message streams of tenant national cryptographic services, and hierarchical tenant quota isolation and control metadata. S2: Construct a national cryptographic hardware adaptation load quantization model for cryptographic computing power nodes. Based on the rated computing power nominal value in the hardware timing monitoring stream, calculate the current load deviation rate as the computing power deviation correction factor and substitute it into the national cryptographic hardware adaptation load quantization model. Iteratively solve the node smooth hierarchical scheduling weight set. After three-level decoupling and encapsulation, generate a node-interface two-layer weight mapping set. S3: Input the two-layer weight mapping set and hierarchical tenant quota isolation and control metadata into the pre-built multi-objective convergence optimization model, iteratively correct the weight allocation value of each cryptographic computing power node to each interface, until the actual computing power load range of all cryptographic computing power nodes is lower than the preset dynamic convergence threshold and all tenant traffic does not exceed the preset quota limit, and lock the weight allocation scheme of the current node-interface. S4: Distribute the encryption requests of each interface to the corresponding cryptographic computing power nodes according to the weight allocation scheme. Before distribution, perform two-way signature verification of SM2 certificates and request integrity hash verification. Simultaneously, collect the full-link latency and abnormal error timing data of the encryption interface in a non-intrusive manner. S5: Generate hardware load compensation offset based on the collected encrypted interface full-link latency and abnormal error timing data, and backfill and update the hardware timing monitoring stream in real time; The calculation process of the computing power deviation correction factor includes: S2.1: Read the hardware timing monitoring stream to obtain the actual SM2 / SM4 computing throughput of each cryptographic computing node within a preset statistical window; S2.2: Retrieve the rated computing power nominal value of each cryptographic computing power node pre-stored on the platform; the rated computing power nominal value is based on the benchmark performance calibration of the same model of equipment under standard national cryptographic pressure test environment; S2.3: Calculate the ratio of the actual SM2 / SM4 computing throughput to the nominal value of the rated computing power, obtain the current load deviation rate, and use it as the computing power deviation correction factor; the computing power deviation correction factor is used to characterize the real-time deviation of the node's current computing power output relative to its baseline performance; The construction and solution process of the multi-objective convergent optimization model includes: S3.1: Extract the node-level scheduling weight and the interface-level subdivision weight from the node-interface two-layer weight mapping set, construct weight ratio constraints, and limit the ratio of the number of requests allocated to each cryptographic computing power node in the same round to the ratio of the node-level scheduling weight to be constant, and the ratio of the number of requests allocated to each interface within the cryptographic computing power node to the ratio of the interface-level subdivision weight to be constant. S3.2: Extract the remaining encryptable quota of each tenant from the hierarchical tenant quota isolation and control metadata, construct a quota upper limit hard constraint, and limit the total request consumption allocated to each tenant in this round to not exceed its remaining encryptable quota; S3.3: With minimizing the load difference among all cryptographic computing nodes in the cluster as the primary optimization objective, the optimal weight allocation scheme is solved by an iterative strategy that combines gradient descent and heuristic search within the feasible solution space formed by the weight ratio constraint and the quota upper limit hard constraint.
2. The dynamic load balancing method for a cryptographic service platform as described in claim 1, characterized in that, The construction of the national cryptographic multidimensional fusion dataset includes: S1.1: Deploy a non-intrusive database synchronization agent to pull tenant configuration database unique security identifier, tenant security level label, daily quota threshold for encryption interface, and time-based rate limit within the tenant configuration database. At the same time, read the daily encryption consumption count and remaining encryption quota for each tenant through a distributed isolation cache, and integrate them into hierarchical tenant quota isolation management metadata. S1.2: Deploy a lightweight log listening subprocess on the cryptographic computing node to capture the device's independent log partitions, extract four types of hardware timing indicators: CPU hardware acceleration utilization, encrypted memory buffer utilization, national cryptographic dedicated network port throughput, and key disk read / write latency, and generate a hardware timing monitoring stream after filtering out general system process interference indicators; the cryptographic computing node includes a physical national cryptographic machine, a cloud cryptographic acceleration instance, and a containerized virtual cryptography. S1.3: Build a national cryptographic message queue partition, and push the gateway to the national cryptographic message queue partition by encapsulating SM4 ciphertext; parse the metadata in the header of the ciphertext message, extract the tenant's unique security identifier, encrypted interface URI, message priority label, and gateway access timestamp, and generate an encrypted request ciphertext message stream; S1.4: Align hardware timing monitoring streams, encrypted request ciphertext message streams, and hierarchical tenant quota isolation and control metadata with unified scheduling time slots as time slices to generate a national cryptographic multidimensional fusion dataset.
3. The dynamic load balancing method for a cryptographic service platform as described in claim 2, characterized in that, The process of generating the node-interface two-layer weight mapping set includes: S2.4: For a single cryptographic computing node, a load feature vector is constructed using the four types of hardware timing indicators and computing power deviation correction factors in the hardware timing monitoring stream. This vector is then substituted into the national cryptographic hardware adaptation load quantization model and a comprehensive load score is obtained through weighted nonlinear transformation. S2.5: The comprehensive load score is converted into the initial dynamic weights of the nodes through reverse mapping transformation and global normalization; S2.6: The initial dynamic weight of the node calculated in the current period is weighted and fused with the historical weight of the previous period to obtain the smoothed dynamic benchmark weight of the node, and the smoothed dynamic benchmark weight of the node is determined as the node layer scheduling weight. S2.7: Repeat S2.4 to S2.6, traverse all cryptographic computing power nodes in the cluster, and generate a first-level weight mapping that includes the node-level scheduling weights of each node.
4. The dynamic load balancing method for a cryptographic service platform as described in claim 3, characterized in that, The process of generating the node-interface two-layer weight mapping set also includes: S2.8: For a single cryptographic computing node, read the list of national cryptographic interface types deployed on the cryptographic computing node and the average processing latency of SM2 / SM3 / SM4 for each interface within the historical sliding window, as recorded by the platform service registration center. S2.9: Using the reciprocal of the average processing latency of each interface as a proportional coefficient, the node layer scheduling weight is split to generate the interface layer subdivision weight of each interface, and the sum of all interface layer subdivision weights within the same cryptographic computing power node is equal to the node layer scheduling weight, thus obtaining the second-level weight mapping. S2.10: Based on the hardware configuration parameters of a single cryptographic computing node, query the computing power benchmark evaluation mapping table to obtain the comprehensive computing power benchmark score, calculate the ratio of the comprehensive computing power benchmark score of a single cryptographic computing node to the highest comprehensive computing power benchmark score of the cluster as the computing power correction factor, and use the computing power correction factor as the third-level weight mapping. S2.11: Encapsulate and integrate the first-level weight mapping, the second-level weight mapping, and the third-level weight mapping according to the node-interface dimension to generate a two-layer weight mapping set for nodes and interfaces.
5. The dynamic load balancing method for a cryptographic service platform as described in claim 4, characterized in that, The process of ensuring that the actual computing power load range of all cryptographic computing power nodes is lower than a preset dynamic convergence threshold includes: S3.4: After each iteration, read the weight allocation values of each cryptographic computing power node to each interface output by this iteration, combine the current comprehensive load score of each cryptographic computing power node and the computing power correction factor, accumulate the total number of requests allocated to the corresponding cryptographic computing power node according to the interface type, multiply by the average computing power consumption benchmark value per request, and calculate the predicted load value of the cryptographic computing power node after bearing the new request. S3.5: Traverse all cryptographic computing power nodes in the cluster, extract the maximum and minimum values from the predicted load values of each cryptographic computing power node and calculate their difference, and use the difference as the actual computing power load range; S3.6: Read the dynamic convergence threshold stored in the platform configuration center, and compare the actual computing power load range with the dynamic convergence threshold; if the actual computing power load range is less than the dynamic convergence threshold, it is determined that the iteration convergence is complete, and the weight allocation value of the current round is locked as the final weight allocation scheme; if the actual computing power load range is greater than or equal to the dynamic convergence threshold, jump to S3.3 to continue to execute the next round of iteration correction until the convergence condition is met; during the iteration process, it is synchronously verified whether the cumulative allocation request volume of each tenant on the same day exceeds the remaining encryptable quota in the hierarchical tenant quota isolation control metadata. If any tenant exceeds the preset quota limit, the allocation volume of the corresponding tenant in this round is rolled back to within the quota boundary.
6. The dynamic load balancing method for a cryptographic service platform as described in claim 5, characterized in that, The pre-distribution process includes performing two-way signature verification of the SM2 certificate and request integrity hash verification, including: S4.1: Extract the tenant's digital certificate and request signature value from the request to be distributed, and call the SM2 public key of this cryptographic computing node cached by the platform to verify the tenant's digital certificate and confirm the legitimacy of the tenant's identity; S4.2: After the signature verification is successful, the plaintext payload of the request is hashed based on the hash algorithm, and the hash calculation result is compared with the hash digest value carried in the request to confirm that the request has not been tampered with during the transmission. S4.3: The current request is deemed legitimate traffic and allowed to be distributed only if both the SM2 certificate two-way signature verification and the request integrity hash verification pass; otherwise, the illegitimate request is discarded and the audit log is recorded.
7. The dynamic load balancing method for a cryptographic service platform as described in claim 6, characterized in that, The bypass non-intrusive acquisition of encrypted interface full-link latency and abnormal error timing data includes: S4.4: Deploy non-intrusive probes at the network entry and exit points of cryptographic computing nodes to capture the timestamps of requests entering the node for processing and response messages leaving the node, and calculate the difference to obtain the end-to-end processing latency of the encryption interface for a single request; S4.5: Parse the status code field in the response message header, identify and record abnormal status codes including parameter errors, internal faults, and computing power overload, as well as their occurrence times, and generate abnormal error timing data.
8. The dynamic load balancing method for a cryptographic service platform as described in claim 7, characterized in that, The hardware load compensation offset is generated based on the collected end-to-end latency and error timing data of the encrypted interface, including: S5.1: Receive the full-link latency and error reporting time sequence data of the encryption interface, aggregate and statistically analyze them according to the cryptographic computing power node and interface dimensions, and calculate the average processing latency and error rate of each interface of each cryptographic computing power node in the current statistical period; S5.2: If the average processing latency of any interface exceeds the preset average processing latency threshold or the anomaly rate exceeds the preset anomaly rate threshold, a hardware load compensation offset is generated to increase the comprehensive load score of the corresponding cryptographic computing power node in the next scheduling cycle. S5.3: Write back the generated hardware load compensation offset to the hardware timing monitoring stream of the national cryptographic multidimensional fusion dataset.
9. A dynamic load balancing system for a cryptographic service platform, used to implement the dynamic load balancing method for a cryptographic service platform as described in any one of claims 1-8, characterized in that, include: The data fusion module is used to collect and fuse hardware timing monitoring streams, encrypted request ciphertext message streams, and hierarchical tenant quota isolation and control metadata to generate a national cryptographic multidimensional fusion dataset. The heterogeneous computing power quantization module has a built-in national cryptographic hardware-adaptive load quantization model, which is used to calculate the computing power deviation correction factor based on the national cryptographic multidimensional fusion dataset and generate a two-layer weight mapping set of nodes and interfaces. The multi-objective collaborative scheduling module has a built-in multi-objective convergence optimization model, which is used to iteratively optimize the weight allocation scheme under the hard constraints of weight ratio constraints and quota upper limit, and determine convergence. The secure distribution and awareness module is used to perform two-way signature verification of SM2 certificates and request integrity verification before the request is distributed, and to collect the full-link latency and abnormal error timing data of the encrypted interface during the distribution process. The closed-loop feedback correction module is used to generate a hardware load compensation offset based on the end-to-end latency and abnormal error timing data of the encrypted interface, and send it back to the data fusion module to update the hardware timing monitoring stream.
Citation Information
Patent Citations
Flow load balancing algorithm for multi-node encryption device driven by control machine
CN121924080A
Server computing power scheduling method and system based on load awareness
CN122240322A
