Cryptographic resource scheduling method based on quantum key consumption prediction

By generating a closed-loop number for emergency control requests, completing the control closed-loop cryptographic event chain, and performing resource consumption calculations, a quantum key consumption package is generated to retain an identifier for the closed-loop bound resources. This solves the problem of discontinuous control closed loops in hydropower monitoring scenarios and improves the continuity of the emergency control process and the efficiency of resource utilization.

CN122640128APending Publication Date: 2026-08-25NANJING NANZI DIGITAL SECURITY TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611096808.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing technologies in hydropower monitoring scenarios fail to identify the subsequent feedback, verification, and confirmation stages of emergency control requests as a cryptographic resource chain within the same control loop. This results in the control loop being split into two discontinuous segments, affecting the continuity of the emergency control process and the efficiency of resource utilization.

Method used

By generating closed-loop numbers for emergency control requests, completing the control closed-loop cryptographic event chain, performing resource consumption calculations, generating quantum key consumption packages, reserving identifiers for closed-loop bound resources, and generating a continuous echo scheduling instruction set, the continuity of cryptographic operations for all nodes within the closed loop is ensured.

Benefits of technology

It achieves continuous retention and orderly scheduling of cryptographic resources throughout the entire chain from instruction issuance to end-point confirmation, ensuring the continuity of the emergency control process and the efficiency of resource utilization, and avoiding the problem of subsequent response links being re-queued.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122640128A_ABST
    Figure CN122640128A_ABST
Patent Text Reader

Abstract

The present disclosure provides a cryptographic resource scheduling method based on quantum key consumption prediction, which comprises receiving a control class cryptographic service request, generating a closed loop number for an emergency control request and calculating a closed loop attribution time window, forming a control closed loop cryptographic event chain; determining the quantum random number and key material consumption required by each node and each cryptographic resource consumption parameter, summarizing according to the same closed loop number and adding the subsequent reply margin at the time of summarizing, querying the supply quota of the candidate device group in each cryptographic resource dimension, accounting for the coverage of the candidate device group, generating a closed loop resource reservation result; generating a continuous reply scheduling instruction set; calling the corresponding cryptographic service according to each node type to sequentially complete the cryptographic operation of each node in the control closed loop cryptographic event chain, releasing the closed loop resource reservation identifier and outputting the control closed loop cryptographic resource scheduling result, which expands the scheduling object from a single instruction to a complete closed loop, ensuring the continuity of the emergency control process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of cryptographic resource scheduling technology, and in particular to a cryptographic resource scheduling method based on quantum key consumption prediction. Background Technology

[0002] In hydropower monitoring scenarios, emergency control requests sent from the central control zone to the hydropower station zone are not isolated messages. Instead, they form a continuous control loop consisting of control command issuance, station-side response feedback, equipment status feedback, central control zone status verification, and, if necessary, reconfirmation. Before the previous control action is fully closed, the subsequent response feedback or status verification triggers new requirements for signature verification, encryption / decryption, authentication tag verification, session key derivation, and certificate status verification. While existing technical solutions prioritize critical control commands and limit the use of quantum key resources for non-real-time services such as batch certificate queries and log retransmissions, their scheduling remains at the control command level. They fail to recognize the subsequent necessary feedback, verification, and confirmation stages as part of the same control loop cryptographic resource chain. This results in the front-end control command having already acquired cryptographic resources, while the subsequent response is re-queued as a regular request during scheduling, entering a resource-constrained state, thus splitting the control loop into two discontinuous segments. This defect cannot be solved by simply increasing the priority of control commands, because what really needs to be prioritized is the complete control loop rather than a single call point.

[0003] Therefore, there is an urgent need for a cryptographic resource scheduling method based on quantum key consumption prediction, which can extend the scheduling object from a single instruction to a complete closed loop, reserve resources in advance for all nodes in the closed loop, and ensure the continuity of the emergency control process. Summary of the Invention

[0004] In view of this, in order to solve the problems caused by the existing technology, this application provides a cryptographic resource scheduling method based on quantum key consumption prediction.

[0005] In a first aspect, this disclosure provides a cryptographic resource scheduling method based on quantum key consumption prediction, the method comprising: S1. Receive control-type cryptographic service requests, generate a closed-loop number for emergency control requests and calculate the closed-loop attribution time window, and use the closed-loop number and the closed-loop attribution time window as indexes to complete each node in the control closed-loop cryptographic event chain to form a control closed-loop cryptographic event chain. S2. Perform cryptographic operation parsing and resource consumption calculation on each node in the control closed-loop cryptographic event chain, determine the quantum random number and key material consumption amount required for each node, as well as various cryptographic resource consumption parameters, summarize according to the same closed-loop number, and add the subsequent echo margin based on the closed-loop position of each node during the summary, and generate a closed-loop quantum key consumption package carrying the closed-loop number and various expected cryptographic resource consumption parameters. S3. Based on the closed-loop quantum key consumption package, query the supply quota of the candidate device group in each cryptographic resource dimension, calculate the coverage of the candidate device group to the resource requirements in the closed-loop quantum key consumption package, bind the closed-loop resource reservation identifier and the reservation quota of each cryptographic resource to the closed-loop number according to the coverage, and generate the closed-loop resource reservation result. S4. Generate a continuous callback scheduling instruction set based on the closed-loop resource reservation result; S5. Execute the continuous echo scheduling instruction set, call the corresponding cryptographic service according to each node type to complete the cryptographic operation of each node in the control closed loop cryptographic event chain in sequence, release the closed loop resource reservation flag and output the control closed loop cryptographic resource scheduling result.

[0006] Optionally, S1 includes: Receive control-type cryptographic service requests, standardize the requests to fill in missing fields, and generate a standardized control request record containing request attribute fields and five dimensions of information for calculating emergency control identification values; The five dimensions of information are extracted from the standardized control request record and weighted and fused to generate an emergency control identification value. Requests whose emergency control identification values ​​reach a preset threshold are determined to be emergency control requests. For records that have been identified as emergency control requests, a closed-loop number is generated based on the control object, device object, business system identifier, and link tracing identifier carried in the record, and the time window for the aggregation of subsequent response feedback, device status feedback, centralized control side verification, and reconfirmation nodes is calculated. Using the closed-loop number, the time window of ownership, the controlled object, and the equipment object as indexes, and following the actual business sequence of the emergency control process of the hydropower monitoring system, each node in the control closed-loop cryptographic event chain is completed in sequence to form a complete control closed-loop cryptographic event chain.

[0007] Optionally, the five dimensions of information include control object level, service path urgency, control time urgency, business type matching degree, and device object operation correlation degree.

[0008] Optionally, S2 includes: The password protection domain reads the control closed-loop password event chain, parses each node in sequence according to the node order, registers the specific password operation to be performed by each node according to the node type and password operation type fields, and reads the condition trigger node identifier of each node to generate a list of node password operations arranged by closed-loop number, node order and password operation type and carrying the condition trigger node identifier of each node. The cryptographic protection domain takes each node cryptographic operation in the node cryptographic operation list as the accounting object, determines the quantum random number and key material consumption of the corresponding node and the various cryptographic resource consumption parameters of the node, and associates the condition trigger node identifier of the node to generate a node resource consumption record. According to the same closed-loop number, the resource consumption records of the nodes are summarized, the quantum random number and key material consumption of each node are accumulated, and the subsequent echo margin is added according to the position of each node in the closed loop to generate a closed-loop resource summary record. Based on the closed-loop resource summary record, the closed-loop number, control object, device object, node order, number of nodes, cryptographic operation type of each node, expected cryptographic resource consumption parameters after closed-loop summary, and condition trigger node identifier are written into the closed-loop quantum key consumption package.

[0009] Optionally, the subsequent echoing margin is determined based on the position of each node in the closed loop, with nodes positioned further back receiving a larger echoing margin.

[0010] Optionally, S3 includes: The unified access domain reads the closed-loop quantum key consumption packet, queries the server cryptographic machine equipment group information that can undertake the closed-loop cryptographic task according to the business alignment relationship between the central control side zone 1 and the hydropower station zone 1, summarizes the equipment group information that meets the conditions, and performs a comprehensive scoring and ranking of each equipment group to form a closed-loop resource candidate record. The cryptographic protection domain reads the closed-loop resource candidate record, combines it with the resource requirements carried in the closed-loop quantum key consumption package, calculates the coverage of the candidate device group's supply quota in each cryptographic resource dimension to the various cryptographic resources required for the complete closed loop, and generates the closed-loop resource coverage result. Based on the closed-loop resource coverage result, a closed-loop resource retention identifier is generated. The closed-loop number, closed-loop retention strategy parameters, and various cryptographic resource retention quotas of the same control closed loop are bound together to generate a closed-loop resource retention identifier record. Read the closed-loop resource retention identifier record and determine whether the closed loop should enter the full closed-loop retention mode or the minimum closed-loop guarantee mode. In the minimum closed-loop guarantee mode, prioritize the release of the retention qualification required for control command issuance and first round response transmission. The retention mode determination result, the closed-loop resource retention identifier record, and the closed-loop resource coverage result are merged to generate the closed-loop resource retention result.

[0011] Optionally, S4 includes: The cryptographic application service platform reads the closed-loop resource retention result, expands each node item by item according to the node order of the control closed-loop cryptographic event chain, and fills in the various scheduling parameters required for the closed-loop node scheduling base table and the corresponding node guarantee status for each node according to the retention mode in the closed-loop resource retention result and the resource coverage of each node, thereby generating the closed-loop node scheduling base table.

[0012] Taking each node in the closed-loop node scheduling base table as an object, and combining the node order, node guarantee status, remaining retention period and required cryptographic service type, the execution priority value of each node is calculated by weighted summation of each factor, and a node execution priority value table is generated. Based on the three dimensions of node execution priority, node order, and node dependency, the nodes in the closed loop are comprehensively sorted to generate a continuous callback node scheduling sequence. The resource usage of non-control cryptographic tasks arriving at the same time is compared with the scheduling sequence of the continuous echo node to determine whether the non-control cryptographic tasks are crowding out the closed-loop reserved resources. If they are not crowding out, they are allowed to enter the regular execution queue. If they are crowding out, they are written into the postponement queue to generate a task disposal list containing the postponement list of non-control cryptographic tasks. The continuous echo node scheduling sequence, the node execution priority value table, and the task handling list are merged to generate a complete continuous echo scheduling instruction set.

[0013] Optionally, S5 includes: The cryptographic application service platform reads the continuous echo scheduling instruction set, verifies whether the closed-loop resource reservation identifier in the instruction set is within the validity period, and if valid, generates a closed-loop execution task order in sequence according to the scheduling instructions of each node. The password protection domain calls various password services and password operation capabilities required by the closed loop in the order of the nodes in the closed loop execution task list according to the node type of each node. After all the password operations of each node are completed, the execution record of that node is generated. After receiving the execution records of each node, the data operation and maintenance domain summarizes the node execution-related parameters of each node according to the closed loop number. Nodes marked as condition-triggered but not actually triggered are considered to be in a condition-exempt state and are directly identified as meeting the completion conditions. The domain verifies whether each node has reached the predetermined completion state, generates a closed loop completion verification record, and calculates the closed loop completion verification value. When the closed-loop completion verification value reaches the preset closed-loop completion threshold, the closed-loop resource retention flag is released, the unconsumed resource quota is returned to the corresponding resource pool, and the non-control-type cryptographic task postponement list is read and its normal scheduling is restored item by item. The resource release and delayed service recovery records, the closed-loop completion verification records, and the execution records of each node are merged to form a control closed-loop cryptographic resource scheduling result based on quantum key consumption prediction.

[0014] In a second aspect, this disclosure provides an electronic device including a memory and at least one processor, the memory storing a computer program, and the processor executing the computer program to implement the method of the first aspect described above.

[0015] Thirdly, this disclosure provides a computer storage medium storing a computer program that, when executed, implements the method described in the first aspect.

[0016] The beneficial effects of the present invention are as follows: Compared with the prior art, the present invention has the following advantages: By generating closed-loop numbers for emergency control requests and completing the cryptographic event chain of the control closed loop, the scheduling object is expanded from a single instruction to a complete closed loop. Resource consumption is calculated for each node, and a quantum key consumption package is generated based on the closed loop to achieve overall resource prediction. Then, a resource reservation identifier is bound to the closed loop, and a continuous echo scheduling instruction set is generated to complete the cryptographic operations of all nodes within the closed loop in sequence. The reserved resources are released only after the closed loop completes the verification and meets the standards. This solves the problem in the existing technology where resources are reserved only for control instructions, which leads to the requeuing of subsequent echo links and the interruption of the closed loop. It realizes the continuous retention and orderly scheduling of cryptographic resources in the entire chain from instruction issuance to final confirmation, ensuring that all nodes within the closed loop share the same reserved resources. While ensuring the exclusivity of emergency control resources, unconsumed resources are recovered in a timely manner, which significantly improves the continuity of cryptographic services and resource utilization efficiency in hydropower monitoring scenarios. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0018] Figure 1 A flowchart of a cryptographic resource scheduling method based on quantum key consumption prediction provided in an embodiment of this disclosure is shown. Figure 2 A flowchart illustrating the closed-loop execution, verification, and resource release process provided in an embodiment of this disclosure is shown.

[0019] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0020] The present disclosure will be further described below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solutions of the present disclosure more clearly, and should not be used to limit the scope of protection of the present disclosure.

[0021] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0022] Figure 1 A flowchart of the cryptographic resource scheduling method based on quantum key consumption prediction provided in this disclosure is shown below. Figure 1 As shown, the process may include the following steps: S1: Receive control-type cryptographic service requests, generate a closed-loop number for emergency control requests and calculate the closed-loop attribution time window, and use the closed-loop number and the closed-loop attribution time window as indexes to complete each node in the control closed-loop cryptographic event chain, forming a control closed-loop cryptographic event chain.

[0023] S1.1: Receive a control-type cryptographic service request, standardize the request to complete missing fields, and generate a standardized control request record containing request attribute fields and five dimensions of information for calculating emergency control identification values.

[0024] The cryptographic application service platform receives raw cryptographic service requests submitted by the centralized control side's Zone 1 business systems via the SDK adapter through a unified service entry point. The platform first reads four basic fields from the request: service path, business system identifier, request identifier, and tracing identifier. Then, based on the service path, it determines whether the request belongs to a signature service, encryption service, key management service, or data transmission protection service.

[0025] For requests lacking a link tracing identifier, the middleware generates a new link tracing identifier according to the preset identifier generation rules and fills it back into the request record; for requests lacking a request identifier but which can be uniquely identified by the business system identifier, control object, device object and request time, the middleware generates a temporary request identifier and fills it into the corresponding field.

[0026] After the above standardization process, the different formats submitted by different SDKs are uniformly converted into standardized control request records. These records contain request attribute fields, including at least the following complete fields: service path, business type, business system identifier, control object, device object, request identifier, tracing identifier, request time, request body type, and password operation type. They also contain five dimensions for calculating emergency control identification values, including at least the control object level, service path urgency, control time urgency, business type matching degree, and device object operation correlation degree. This ensures that subsequent emergency control identification no longer directly relies on the original message fields, but is judged on a unified data structure, improving the accuracy of identification and the robustness of the process.

[0027] S1.2: Extract the five-dimensional information from the standardized control request record, perform weighted fusion calculation, generate an emergency control identification value, and determine the request that the emergency control identification value reaches a preset threshold as an emergency control request.

[0028] After obtaining the standardized control request record, the system extracts information from five dimensions of the record, weights and fuses these five factors, and comprehensively calculates an emergency control identification value. Among them, the control object level, service path urgency, and business type matching degree are positively correlated with the emergency identification value, that is, the more critical the control object, the more urgent the service path, and the more the business type matches the emergency control characteristics, the higher the identification value. The urgency of control time is reflected in the fact that the shorter the remaining response time, the higher the urgency, and the higher the correlation between the device object operation, the higher the identification value.

[0029] Through the comprehensive scoring of the above multi-factor analysis, the system obtains the emergency control identification value for the request. If the identification value reaches a preset threshold (e.g., 0.75 to 0.85, with adjustments made starting from a conservative value), the request is classified as an emergency control request such as gate opening adjustment, unit active power regulation, protection setting switching, or remote control of the plant / station. If the identification value is below the threshold, it is treated as a regular cryptographic service request and sent to the regular dispatch channel for processing. This avoids the system relying solely on the rough dimension of whether it is an encrypted request, and accurately identifies the truly urgent control services that need to be retained in a closed loop.

[0030] S1.3: For a record that has been determined to be an emergency control request, generate a closed-loop number based on the control object, device object, business system identifier and link tracing identifier carried in the record, and calculate the time window for the aggregation of subsequent response feedback, device status feedback, centralized control side verification and reconfirmation nodes allowed by the closed loop.

[0031] For records that have been identified as emergency control requests, the system generates a globally unique closed-loop number based on the four fields carried in the request: control object, device object, business system identifier, and link tracing identifier. This number is used to identify that the emergency control request and all subsequent echo nodes belong to the same control closed loop.

[0032] Subsequently, the system calculates the time window for aggregating subsequent response feedback, device status feedback, centralized control side verification, and reconfirmation nodes within the closed loop. The higher the control object level, the more stable the aggregating window should be to ensure that high-priority control flows are not prematurely truncated; the higher the current control congestion level, i.e., when multiple urgent control requests are being processed simultaneously, the more appropriately the aggregating window should shrink to avoid unrelated requests being incorrectly incorporated into the same closed loop. The aggregating time window is calculated using the following formula: ; in, Indicates the time window for closed-loop attribution; This represents the basic closed-loop window, with a value ranging from 8 to 15 seconds. This indicates the controllable object's level rating, with a value ranging from 1 to 5. This represents the baseline value for the controlled object level, ranging from 3 to 4. This indicates the expected number of closed-loop points, with a value ranging from 4 to 5; This indicates the current level of congestion, with a value ranging from 0 to 1. This represents the baseline value for congestion, ranging from 0.4 to 0.6. This represents the amplification factor for the controlled object level, with a value range of 0.2 to 0.4. This represents the amplification factor for the number of nodes, with a value ranging from 0.15 to 0.35. This represents the crowding contraction coefficient, ranging from 0.3 to 0.6. The formula indicates that the numerator... and The base window is enlarged based on the control object level and the number of nodes; the higher the control object level or the more nodes, the longer the window. (The denominator is missing from the original text.) The window is shortened based on the current control congestion level; the higher the congestion level, the shorter the window. This design avoids the emergency control loop being too short, causing the response node to be unable to reach within the window and thus being discarded, and also avoids the window being too long, causing different control actions to be incorrectly merged into the same closed loop.

[0033] Calculated closed-loop attribution time window Together with the closed-loop number, the controlled object, and the equipment object, it serves as the time constraint basis for subsequently completing the closed-loop points.

[0034] S1.4: Using the closed-loop number, the time window of ownership, the controlled object, and the equipment object as indexes, and in accordance with the actual business sequence of the emergency control process of the hydropower monitoring system, complete each node in the control closed-loop cryptographic event chain in sequence to form a complete control closed-loop cryptographic event chain.

[0035] The closed-loop number and closed-loop attribution time window generated in section 1.3 Using four dimensions—control objects, equipment objects, and control targets—as indexes, and following the actual business sequence of the emergency control process in the hydropower monitoring system, each node in the control closed-loop cryptographic event chain is sequentially completed. This includes the control command issuance node, the station-side response feedback node, the equipment status feedback node, the central control-side status verification node, and the necessary reconfirmation node, forming a complete control closed-loop cryptographic event chain. Specifically, the control command issuance node is bound to signature requirements, encryption requirements, authentication tag generation requirements, and session key derivation requirements; the station-side response feedback node is bound to signature verification requirements, decryption requirements, authentication tag verification requirements, and response result confirmation requirements; the equipment status feedback node is bound to data encryption requirements, integrity protection requirements, and feedback signature verification requirements; the central control-side status verification node is bound to verification signature requirements and status consistency confirmation requirements; and the necessary reconfirmation node is bound to closed-loop archiving signature requirements and necessary certificate status verification requirements.

[0036] It is important to note that if an emergency control operation does not require a second confirmation step, the node is marked as a condition-triggered node. During the resource prediction phase, the node's position and minimum release verification field are retained. This minimum release verification field includes at least the node number and node type, used to identify whether the node was actually triggered during the execution phase and to verify whether the node meets the release conditions during resource release. The node's password operation is only executed when the trigger condition is actually met. If the condition is never triggered throughout the closed-loop process, the node is called a condition-exempt node. The system only performs the closed-loop resource release verification and does not perform any additional password operations. Furthermore, the resources reserved but not consumed by this node will be returned to the resource pool during closed-loop resource release.

[0037] The final control closed-loop cryptographic event chain contains complete information such as closed-loop number, node order, node type, cryptographic operation type, ownership window, and condition trigger node marker. A single control command is expanded into a complete node sequence from command issuance to response feedback, status feedback, verification confirmation, and reconfirmation. This provides a clear structured node input for the subsequent step S2 to calculate the closed-loop quantum key consumption packet, fundamentally avoiding the problem of subsequent response nodes being treated as ordinary requests and re-queued.

[0038] S2: Perform cryptographic operation parsing and resource consumption calculation on each node in the control closed-loop cryptographic event chain, determine the quantum random number and key material consumption amount required by each node, as well as various cryptographic resource consumption parameters, summarize them according to the same closed-loop number, and add the subsequent echo margin based on the closed-loop position of each node during the summary, and generate a closed-loop quantum key consumption package carrying the closed-loop number and various expected cryptographic resource consumption parameters.

[0039] S2.1: The password protection domain reads the control closed-loop password event chain, parses each node in sequence according to the node order, registers the specific password operation to be performed by each node according to the node type and password operation type fields, and reads the condition trigger node identifier of each node to generate a list of node password operations arranged by closed-loop number, node order and password operation type and carrying the condition trigger node identifier of each node.

[0040] The password protection domain reads the control closed-loop password event chain output by S1, and parses the control command issuing node, the station-side response feedback node, the equipment status feedback node, the central control-side status verification node, and the necessary reconfirmation node in sequence according to the node order. For each parsed node, the password protection domain registers the specific password operation to be performed by the node according to its node type and password operation type fields, and reads the condition trigger node flag of the node.

[0041] In specific implementation, the control command issuing node registers and performs signature, encryption, authentication tag generation, and session key derivation operations; the site-side response return node registers and performs signature verification, decryption, authentication tag verification, and response result confirmation operations; the equipment status return node registers and performs data encryption, integrity protection, and return signature verification operations; the central control side status review node and necessary reconfirmation node register and review signature verification, closed-loop archiving signature, and resource release verification operations. If a node is marked as a condition-triggered node, its node number and node type are retained, but its resource status is marked as condition-triggered, indicating that the corresponding cryptographic operation will only be executed when the condition is met; during the resource accounting phase, resource calculation is performed based on complete node operations to ensure sufficient resources under any triggering condition.

[0042] After the above analysis and registration, the password protection domain generates a list of node password operations arranged by closed-loop number, node order and password operation type, and carrying the node trigger markers for each node condition. This list clarifies the specific types of password operations that each node needs to perform, providing a direct basis for subsequent calculation of resource consumption for each node.

[0043] S2.2: The cryptographic protection domain takes each node cryptographic operation in the node cryptographic operation list as the accounting object, determines the quantum random number and key material consumption of the corresponding node and the various cryptographic resource consumption parameters of the node, and associates the condition trigger node identifier of the node to generate a node resource consumption record.

[0044] The cryptographic protection domain takes each node cryptographic operation in the node cryptographic operation list as the accounting object, and determines the length of the quantum random number, the number of times the quantum key material is referenced, the number of times the session key is derived, the number of times the server cryptographic machine is called, the number of times the post-quantum cryptographic capability is called, and the number of times the necessary certificate status is verified for each node. It also associates the corresponding condition trigger node tag with the node to generate a node resource consumption record.

[0045] For nodes protected by authentication and encryption, the system records the random number consumption, authentication tag overhead, key derivation consumption, and encryption / decryption operation consumption separately. For signature verification nodes, the system records the number of signatures, verifications, and post-quantum signature capability calls by the server cryptographic machine separately. For nodes requiring certificate status confirmation, the system only records the number of certificate status verifications when the identity status is nearing expiration, the certificate status has changed, or strong confirmation is required for closed-loop archiving. The estimated quantum random number and key material consumption for each node is calculated by comprehensively considering multiple factors, including the length of the business data to be protected, the length of the additional authentication data, encapsulation redundancy, the number of random numbers, the number of session key derivation seeds, and the node's cryptographic resource pressure coefficient. This consumption is calculated using the following formula: ; in, This represents the expected quantum random number and key material consumption at the i-th closed loop point, in bytes. This represents the number of random numbers required for the i-th node, typically ranging from 1 to 3; This represents the number of session key derivation seeds required for the i-th node, typically ranging from 1 to 2. This represents the node's cryptographic resource pressure coefficient, with a value ranging from 0 to 1. It is determined by whether the preceding node in the same closed loop has already triggered a retry and whether there is a need for reconfirmation. The pressure amplification factor ranges from 0.2 to 0.5. Constant 12 represents the base length of a single quantum random number request, and constant 32 represents the base length of a single session key derivation seed; both values ​​are in bytes. These values ​​are based on the cryptographic algorithm standard used in this embodiment, and can be replaced with corresponding fixed lengths depending on the actual algorithm used in implementation. It should be noted that all statistics regarding the number of cryptographic machine calls in this article refer to the number of calls made by the server's cryptographic machine.

[0046] The formula first converts the sum of the protected data length and the additional authentication data length from bits to bytes, then multiplies it by an encapsulation redundancy factor to cover the additional overhead of the message header and identification field. Next, it adds the fixed costs of random number requests and key derivation seeds, and finally amplifies the cost appropriately based on the node pressure coefficient; the higher the pressure, the higher the cost. This formula calculates the cost for each node. After the value is obtained, the system records it together with the node number, node type, and various cryptographic resource consumption parameters of the node, including the number of session key derivations, the number of server cryptographic machine calls, the number of post-quantum cryptography capability calls, and the number of certificate status verifications, to form a node resource consumption record, providing a fine-grained data source for subsequent closed-loop aggregation.

[0047] S2.3: Summarize the resource consumption records of the nodes according to the same closed loop number, accumulate the quantum random number and key material consumption of each node, and add the subsequent echo margin according to the position of each node in the closed loop to generate a closed loop resource summary record.

[0048] The system summarizes all node resource consumption records generated in S2.2 according to the same closed-loop number. During the summarization process, the system not only accumulates the quantum random number consumption of each node, but also adds a subsequent echo reserve based on each node's position in the closed loop. This subsequent echo reserve is determined by the node's position in the closed loop; nodes further back in the loop receive a larger echo reserve, ensuring that response feedback, device status feedback, and centralized control side status verification after control commands are issued are not underestimated during the resource accounting stage. For nodes triggered by conditions, the system uniformly uses their complete node resource consumption, calculated in S2.2, during resource summarization. The resources are aggregated to ensure sufficient cryptographic resources for the closed loop under any triggering conditions; if a node is not actually triggered during the execution phase, its reserved unconsumed resources will be returned to the resource pool when the closed loop resources are released. The closed loop resource aggregate is calculated using the following formula: ; in, This represents the total consumption of the predicted quantum random numbers and key materials for the closed loop, in bytes. This indicates the number of closed-loop nodes, typically 4 to 5; This represents the resource consumption calculated by sub-step S2.2 for the i-th closed node. All closed nodes, including condition trigger nodes, are summarized according to their complete resource consumption during the aggregation phase. Incorporate and summarize to ensure that the closed loop has sufficient cryptographic resources under any triggering conditions; This represents the margin coefficient for subsequent callbacks, with a value ranging from 0.04 to 0.12. It is used to ensure that later callback nodes have an appropriate margin. This represents the basic retention space for the closed loop, and it is recommended to use 48 to 96 bytes to cover the basic random overhead of the closed loop number, resource release verification, and archive signature. This represents a baseline value for the number of nodes; a value of 4 to 6 is recommended. This represents the closed-loop complexity amplification factor, with a value ranging from 0.2 to 0.4.

[0049] This formula performs a sequentially weighted aggregation of all node consumption, with later nodes receiving a higher weight. This reserves more resource margin for subsequent callback nodes and also incorporates a closed-loop level base reserve, ensuring that the resource package covers the entire callback process rather than just the first control command. Condition-triggered nodes are aggregated based on their total consumption. Include all data in the summary, regardless of whether it is triggered or not, to ensure sufficient resources in the worst-case scenario.

[0050] After the aggregation is completed, the system generates a closed-loop resource aggregation record containing the above aggregation results.

[0051] S2.4: Based on the closed-loop resource summary record, write the closed-loop number, control object, device object, node order, number of nodes, cryptographic operation type of each node, expected cryptographic resource consumption parameters after closed-loop summary, and condition trigger node identifier into the closed-loop quantum key consumption package.

[0052] Based on the closed-loop resource summary record output in S2.3, the system writes the closed-loop number, controlled object, device object, node order, number of nodes, cryptographic operation type of each node, condition trigger node identifier, and various expected cryptographic resource consumption parameters after the closed-loop summary into the closed-loop quantum key consumption package. These expected cryptographic resource consumption parameters include the expected total consumption of quantum random numbers, the expected total number of session key derivations, the expected total number of server cryptographic machine calls, the expected total number of subsequent quantum cryptographic capability calls, and the total number of necessary certificate status checks. This consumption package transforms the control closed-loop cryptographic event chain identified in step S1 into a quantifiable resource requirement description, which is used by the unified access domain to query device group status, the cryptographic protection domain to generate resource reservation identifiers, and the data operation and maintenance domain to record the closed-loop resource accounting process.

[0053] For control loops lacking a reconfirmation step, the consumption package still retains the minimum release verification field of the reconfirmation node; for control loops requiring strong confirmation, the consumption package incorporates the reconfirmation node into the complete resource requirement. The encapsulated closed-loop quantum key consumption package will be directly referenced in step S3, so that subsequent resource retention operations are no longer based on the resource consumption of a single control command, but on the predicted resource consumption of the complete control loop, fundamentally ensuring the resource continuity of the complete closed loop.

[0054] S3: Based on the closed-loop quantum key consumption package, query the supply quota of the candidate device group in each cryptographic resource dimension, calculate the coverage of the candidate device group for each resource requirement in the closed-loop quantum key consumption package, bind the closed-loop resource reservation identifier and the reservation quota of each cryptographic resource to the closed-loop number according to the coverage, and generate the closed-loop resource reservation result.

[0055] S3.1: The unified access domain reads the closed-loop quantum key consumption packet, queries the server cryptographic machine equipment group information that can undertake the closed-loop cryptographic task according to the business alignment relationship between the central control side zone 1 and the hydropower station zone 1, summarizes the equipment group information that meets the conditions, and performs a comprehensive scoring and ranking of each equipment group to form a closed-loop resource candidate record.

[0056] The unified access domain reads the closed-loop quantum key consumption packet output by S2. Based on the business alignment between the centralized control zone 1 and the hydropower station zone 1, it queries the information of server cryptographic machine equipment groups capable of undertaking the closed-loop cryptographic task, including equipment online status, equipment response latency, equipment load, available key status, certificate status, and service availability. For the centralized control zone 1, priority is given to querying equipment groups capable of undertaking command issuance, signing, encryption, and session key derivation operations; for the hydropower station zone 1, priority is given to querying equipment groups capable of undertaking station-side response feedback, equipment status feedback, signature verification, decryption, and authentication tag verification operations.

[0057] The system first aggregates information on all eligible device groups, forming a closed-loop resource candidate record that includes device group number, number of available devices, average response latency, highest device load, available key status, certificate status, and available service type. Based on this, the candidate device groups are ranked and scored comprehensively. The scoring rules are as follows: online status, key availability, and certificate validity serve as basic admission criteria; only device groups that simultaneously meet all three conditions proceed to the next scoring stage. Beyond admission criteria, lower load rates, lower response latency, and lower recent call failure rates result in higher comprehensive scores for device groups. Device groups with excessively high load rates or abnormally high failure rates have significantly lower comprehensive scores. The system then arranges each device group according to its comprehensive score from highest to lowest, forming an ordered closed-loop resource candidate record for subsequent steps to select the best option.

[0058] S3.2: The cryptographic protection domain reads the closed-loop resource candidate record, and, in conjunction with the resource requirements carried in the closed-loop quantum key consumption package, calculates the coverage of the candidate device group's supply quota in each cryptographic resource dimension to the various cryptographic resources required for the complete closed loop, and generates a closed-loop resource coverage result.

[0059] The cryptographic protection domain reads the closed-loop resource candidate records output by S3.1, and combines them with the resource requirements carried in the closed-loop quantum key consumption package. It then calculates the coverage of the candidate device group's supply quota in each cryptographic resource dimension to the various cryptographic resources required for the complete closed loop, and generates the closed-loop resource coverage result.

[0060] For the candidate equipment group list, the system checks the coverage of each resource in descending order of comprehensive score. If the available capacity of a resource is significantly lower than the capacity required for loop closure, the candidate equipment group cannot independently undertake the complete loop closure, but it can still be reserved as a minimum loop closure guarantee or a backup resource. To comprehensively measure the coverage capability of the candidate equipment group for the complete loop closure, the system uses a soft minimum approach to approximate the weakest link among multiple resources, avoiding the situation where sufficient resources of one type mask the insufficiency of other types. The complete loop coverage coefficient is calculated using the following formula: ; in, Indicates the closed-loop complete coverage coefficient; This indicates the amount of quantum random number resources that the candidate device group can provide, in bytes. This represents the amount of quantum random number resources required for the closed loop, in bytes. Indicates the number of times a session key can be derived; Indicates the number of session key derivations required to close the loop; Indicates the number of available server cryptographic machine calls; This indicates the number of server cryptographic machine calls required to close the loop; Indicates the number of times post-quantum cryptographic capabilities can be invoked; This represents the number of times the post-quantum cryptographic capabilities need to be invoked to close the loop. Indicates the number of certificate status verifications that can be performed; Indicates the number of certificate status verifications required for closed-loop operation; This indicates the reservation percentage of the same equipment group that has been occupied by other control loops, with a value ranging from 0 to 1; This represents the soft minimum convergence coefficient, with a value ranging from 4 to 8; This represents the occupancy penalty coefficient, ranging from 0.6 to 1.2. Each resource ratio in this formula is truncated to its minimum value to ensure that when the supply of a resource exceeds the closed-loop demand, the excess will not have an additional negative or positive impact on the coverage coefficient, thus preventing the excess supply of a single resource from masking the insufficiency of other resources. By summing by negative powers and then taking the reciprocal of the negative power, the resource with the lowest ratio of supply to demand dominates the overall coverage coefficient, thus approximating the weakest link among the resources. Simultaneously, multiplying by... Penalize occupied device groups; the higher the occupancy rate, the lower the coverage coefficient. If a closed loop does not require certificate status verification, then... and At the same time, setting it to the number 1 makes the ratio of this item 1. After being truncated to the minimum value, it is still 1, and after being raised to a negative power, it is still 1, which has no effect on the coverage coefficient.

[0061] After the calculation is completed, the closed-loop resource coverage results output by the system include the closed-loop number, the candidate device group number, and the complete coverage coefficient. The coverage of quantum random numbers, key derivation, server cryptographic machine calls, post-quantum capabilities, and certificate status verification provides a quantitative basis for the subsequent generation of resource reservation identifiers.

[0062] S3.3: Generate a closed-loop resource retention identifier based on the closed-loop resource coverage result, bind the closed-loop number, closed-loop retention strategy parameters, and various cryptographic resource retention quotas of the same control closed loop, and generate a closed-loop resource retention identifier record.

[0063] The system generates a closed-loop resource retention identifier based on the closed-loop resource coverage result output by S3.2. This identifier binds the closed-loop number, closed-loop retention policy parameters (including candidate device group priority, key derivation relationship and retention validity period) and the retention quota of each cryptographic resource within the same control closed loop.

[0064] If the current reserved quota can cover the password requirements of all nodes for control command issuance, site-side response feedback, equipment status feedback, centralized control-side status verification, and necessary reconfirmation, then the closed loop is bound with the full resource quota; otherwise, the closed loop is bound with the minimum guaranteed resource quota. The retention period should cover the closed loop ownership time window calculated in step S1. In addition, a small amount of release verification time is reserved to avoid releasing resources prematurely before the last verification node of the closed loop has been completed.

[0065] The actual amount of resources retained is a moderate increase in compensation when coverage decreases, while also increasing the release of verification margin for longer closed-loop windows. The actual amount retained is calculated using the following formula: ; in, This represents the actual amount of quantum random number resources reserved in this closed loop, in bytes. This represents the amount of quantum random number resources required for the closed loop, in bytes. Indicates the closed-loop complete coverage coefficient; This represents the closed-loop basic reserve amount, in bytes. Its value is consistent with the closed-loop basic reserve amount in step S2.3. Here, it is used to amplify the release verification margin to cover the additional release verification overhead under a longer closed-loop window. Indicates the time window for closed-loop attribution; This represents the basic closed-loop window; a value of 8 to 15 seconds is recommended. This represents the coverage insufficiency compensation coefficient, with a value ranging from 0.12 to 0.24; This indicates the magnification factor for insufficient coverage, with a value ranging from 1.2 to 1.8; This represents the window magnification factor, ranging from 0.15 to 0.35. If the calculated value... Exceeding the limit of quantum random number resources available from the candidate device group corresponding to this closed loop. Then As the upper limit of the actual retention amount in this closed loop, that is The first term of the formula appropriately increases the retention limit when the complete coverage of the closed loop decreases, and the coverage coefficient... The lower The larger the value, the more compensation; the second item increases the release of verification margin for longer closed-loop windows, and the longer the window, the more additional resources are reserved.

[0066] The output closed-loop resource reservation identifier record includes the closed-loop resource reservation identifier, closed-loop number, device group priority, key derivation relationship identifier, and reserved quantum random amount. The system retains the number of session key derivations, the number of server cryptographic machine calls, the number of post-quantum calls, the certificate status verification eligibility, and the retention period, enabling subsequent control command issuance, site-side response feedback, equipment status feedback, and status verification to continuously reference the retained resources under the same closed-loop number.

[0067] S3.4: Read the closed-loop resource retention identifier record, determine whether the closed loop should enter the full closed-loop retention mode or the minimum closed-loop guarantee mode, and in the minimum closed-loop guarantee mode, prioritize the release of the retention qualification required for control command issuance and first round response return.

[0068] Read the closed-loop resource retention flag record output by S3.3 and determine whether the closed loop should enter the full closed-loop retention mode or the minimum closed-loop guarantee mode.

[0069] If the credit limit is retained If the corresponding number of session key derivations, server cryptographic machine calls, post-quantum cryptography capability calls, and certificate status verification qualifications can cover the cryptographic requirements of all nodes, including control command issuance, site-side response feedback, equipment status feedback, central control-side status verification, and necessary reconfirmation, then the system enters the complete closed-loop retention mode; otherwise, it enters the minimum closed-loop guarantee mode.

[0070] In the minimum closed-loop protection mode, the system must not simply reject emergency control requests. Instead, it should prioritize releasing the reserved privileges required for issuing control commands and transmitting the first round of responses, ensuring that the most critical control commands can be issued and receive initial response confirmation. Simultaneously, it should protect subsequent nodes as much as possible based on the actual reserved quota and generate a list of restricted non-control tasks. This list includes password file protection tasks that need to be frozen or postponed, permission file integrity protection tasks, log retransmission tasks, batch certificate query tasks, non-real-time data collection reprotection tasks, and general audit-related cryptographic tasks.

[0071] The output retention mode determination result includes the closed-loop number, retention mode, range of guaranteed nodes, range of nodes to be supplemented, restricted task type, restricted duration condition, and recovery determination condition, providing mode constraints for the generation of subsequent scheduling instructions.

[0072] S3.5: Merge the retention mode determination result, the closed-loop resource retention identifier record, and the closed-loop resource coverage result to generate the closed-loop resource retention result.

[0073] The retention mode determination result output by S3.4, the closed-loop resource retention identifier record output by S3.3, and the closed-loop resource coverage result output by S3.2 are merged to generate a closed-loop resource retention result that can be directly referenced by S4.

[0074] The results include the closed-loop number, controlled object, device object, reservation mode, closed-loop resource reservation identifier, candidate device group priority, key derivation relationship identifier, and reserved quantum randomness value. The following parameters are retained: number of session key derivations, number of server cryptographic machine calls, number of times post-quantum cryptographic capabilities are retained, qualification for necessary certificate status verification, scope of protected nodes, scope of nodes to be supplemented, list of restrictions on non-control tasks, retention validity period, and resource release conditions.

[0075] For the complete closed-loop retention mode, the closed-loop resource retention result is marked as complete and executable; for the minimum closed-loop guarantee mode, the closed-loop resource retention result is marked as minimum guarantee and executable, and subsequent steps are required to continuously monitor the status verification and reconfirm the availability of the required resources when performing continuous echo scheduling. Once the resources are replenished, the nodes to be replenished should be included in the guarantee scope in a timely manner.

[0076] The closed-loop resource retention result unifies and solidifies the candidate resources, coverage coefficients, retention identifiers, and retention modes formed in step S3 into a structured output, providing direct input for step S4 to generate a continuous echo scheduling instruction set. This ensures at the resource level that the control instruction body and all subsequent echo nodes can share the retained resources under the same closed-loop number, completely avoiding the problem of control instructions obtaining resources and subsequent echo nodes requeuing.

[0077] S4: Generate a continuous echo scheduling instruction set based on the closed-loop resource reservation result.

[0078] S4.1: The cryptographic application service platform reads the closed-loop resource retention result, expands each node item by item according to the node order of the control closed-loop cryptographic event chain, and fills in the various scheduling parameters required for the closed-loop node scheduling base table and the corresponding node guarantee status for each node according to the retention mode in the closed-loop resource retention result and the resource coverage of each node, thereby generating the closed-loop node scheduling base table.

[0079] The cryptographic application service platform reads the closed-loop resource retention result output in step S3. According to the node order of the control closed-loop cryptographic event chain, it expands the control command issuing node, the site-side response feedback node, the equipment status feedback node, the central control side status verification node, and the necessary reconfirmation node item by item. Based on the retention mode in the closed-loop resource retention result and the resource coverage of each node, it fills in the various scheduling parameters required by the closed-loop node scheduling base table and the corresponding node guarantee status for each node.

[0080] In specific implementation, for the complete closed-loop retention mode, all nodes are marked as guaranteed nodes, indicating that the cryptographic resources required by these nodes have been fully reserved in step S3; for the minimum closed-loop retention mode, the control command issuing node and the first round of station-side response return node are at least marked as guaranteed nodes, and the remaining subsequent nodes are marked as guaranteed nodes or nodes to be supplemented according to the actual retention quota and resource coverage. Among them, the nodes marked as nodes to be supplemented indicate that the cryptographic resources required by them have not been fully in place, and the availability of resources needs to be continuously monitored and supplemented in a timely manner during the subsequent scheduling process.

[0081] The final output closed-loop node scheduling base table includes the closed-loop number, node sequence number, node type, cryptographic service type, device group priority, key derivation relationship identifier, node guarantee status, and node release condition, providing structured basic data for subsequent calculation of node execution priority values.

[0082] S4.2: Taking each node in the closed-loop node scheduling base table as the object, and combining the node order, node guarantee status, remaining retention period and required cryptographic service type, calculate the execution priority value of each node by weighted summation of each factor, and generate a node execution priority value table.

[0083] Taking each node in the closed-loop node scheduling base table as an object, and combining the node order, node guarantee status, remaining retention period and required cryptographic service type, the execution priority value of each node is calculated comprehensively.

[0084] Priority calculation follows a clear set of principles. Node order serves as a fundamental reference factor; nodes issuing control commands start first to ensure timely issuance of emergency control commands, but subsequent response nodes are not excessively downgraded due to their later order, ensuring the continuity of the entire closed loop. When a node is in a state awaiting replenishment, its priority in resource replenishment is higher than that of already guaranteed nodes, ensuring that the resources awaiting replenishment are replenished as quickly as possible; however, when generating the execution order, the actual availability of resources is still the premise, to avoid blocking the execution of guaranteed nodes due to resource unavailability. The shorter the remaining time before the expiration of the retention period, the higher the priority value, preventing closed loop nodes from interrupting execution due to resource expiration. The more times a node requires cryptographic service calls, the higher the priority value is, to ensure that the execution of complex nodes is not excessively delayed by simple nodes. In the minimum closed loop guarantee mode, the overall priority value of each node is higher than that in the full closed loop retention mode, to ensure that response nodes in the degradation mode can obtain scheduling opportunities more quickly. The above principles comprehensively calculate the node execution priority value by weighting and summing the various factors. The weight of the pending status and the remaining validity period is higher than the node order weight, ensuring that the priority of closed-loop continuity is higher than the simple first-come, first-served order.

[0085] Different node types have different priorities in cryptographic services. Control command issuing nodes prioritize the availability of signature, encryption, and session key derivation services; site-side response return nodes prioritize the availability of signature verification, decryption, and authentication tag verification services; device status return nodes prioritize the availability of data integrity protection and return signature verification services; and centralized control-side status review and necessary reconfirmation nodes prioritize the availability of review and signature verification services, closed-loop archiving signature services, and resource release verification services. If a node is a node awaiting replenishment, the system does not directly cancel it. Instead, it assigns a higher replenishment priority value based on the retention period and the status of the resources to be replenished, prompting the system to prioritize replenishing the required resources and avoiding long-term stagnation in the later stages of the response chain.

[0086] After the calculation is completed, the system outputs a node execution priority value table, which transforms the requirement that nodes within the closed loop must continuously undertake tasks into sortable numerical indicators.

[0087] S4.3: Based on the three dimensions of node execution priority, node order, and node dependency, the nodes in the closed loop are comprehensively sorted to generate a continuous echo node scheduling sequence.

[0088] The system sorts the nodes in the closed loop according to three dimensions: node execution priority, node order, and node dependency.

[0089] Node dependencies follow strict business logic constraints: the control command issuing node must precede the site-side response feedback node, because a response feedback will only occur after the command is issued; the site-side response feedback node must precede the equipment status feedback node, because the equipment status usually changes and is feedback only after the site confirms the response; the equipment status feedback node must precede the central control-side status verification node, because the verification operation needs to be based on the feedback information of the equipment status; the necessary reconfirmation node must precede closed-loop archiving and resource release, because reconfirmation is the last confirmation step before the closed loop is closed.

[0090] If a node already has reserved resources, the corresponding entry in the scheduling sequence is generated according to the node's execution priority and the original node order. If a node is in a pending replenishment state, its node position is retained in the scheduling sequence, and a replenishment trigger condition is attached. Once the resources are replenished, execution can proceed according to the sequence position. This continuous echo node scheduling sequence contains a structured sequence of closed-loop number, node sequence number, preceding node, succeeding node, target service path, target device group priority, key derivation relationship identifier, and execution trigger condition, ensuring that each node within the closed loop executes sequentially according to the correct business order and resource priority.

[0091] S4.4: Compare the resource usage of non-control cryptographic tasks arriving at the same time with the continuous echo node scheduling sequence to determine whether the non-control cryptographic tasks are crowding out the closed-loop reserved resources. If they are not crowding out, they are allowed to enter the regular execution queue. If they are crowding out, they are written into the postponement queue to generate a task disposal list containing the postponement list of non-control cryptographic tasks.

[0092] The system compares the resource usage of non-control cryptographic tasks arriving at the same time, including password file protection tasks, permission file integrity protection tasks, log retransmission tasks, batch certificate query tasks, general audit cryptographic tasks, and non-real-time data acquisition re-protection tasks, with the continuous echo node scheduling sequence output by S4.3. The system comprehensively evaluates the resource usage of non-control cryptographic tasks in terms of quantum random number increments, session key derivation counts, server cryptographic machine call counts, and certificate status verification counts.

[0093] The specific judgment logic is as follows: If the expected usage of any type of resource by a non-control cryptographic task does not exceed the available reserve of the current non-closed-loop reserved resources, it is determined that the closed-loop reserved resources will not be occupied, and the task is allowed to enter the regular execution queue for normal execution. If the expected usage of any type of resource by a non-control cryptographic task is close to or exceeds the available reserve, or if the risk of being occupied is further amplified when the current closed-loop replenishment pressure is high, it is determined that the closed-loop reserved resources will be occupied, and the task will be written into the ordinary deferred queue to wait for the closed-loop execution to be completed before being scheduled. If a non-control cryptographic task only uses resources in the non-closed-loop reserved resource pool, and its execution will not affect the resource availability of any closed-loop node, it is allowed to enter the regular execution queue for normal execution.

[0094] The judgment mechanism delays the assessment based on whether the resources reserved in the closed loop are actually being squeezed. This ensures the resource needs of the emergency control closed loop are met while allowing non-control tasks that do not affect the closed loop to be executed normally to the greatest extent possible.

[0095] S4.5: Merge the continuous echo node scheduling sequence, the node execution priority value table, and the task handling list to generate a complete continuous echo scheduling instruction set.

[0096] The cryptographic application service platform merges the continuous echo node scheduling sequence output by S4.3, the node execution priority value table output by S4.2, and the non-control task handling list output by S4.4 to generate a complete continuous echo scheduling instruction set.

[0097] This instruction set includes closed-loop numbering, closed-loop resource reservation identifiers, control instruction issuance node scheduling instructions, site-side response feedback node scheduling instructions, equipment status feedback node scheduling instructions, central control-side status verification node scheduling instructions, necessary reconfirmation node scheduling instructions, target service path, equipment group priority, key derivation relationship identifier, authentication tag verification path, node triggering conditions, pending node conditions, non-control task postponement list, non-control task permitted list, and resource release preconditions. Specifically, the control instruction issuance node scheduling instructions point to signature service, encryption service, and key management service; the site-side response feedback node scheduling instructions point to signature verification service, decryption service, authentication tag verification service, and response result confirmation service; the equipment status feedback node scheduling instructions point to data encryption service, integrity protection service, and feedback signature verification service; and the central control-side status verification node and necessary reconfirmation node scheduling instructions point to verification signature service, status consistency confirmation service, closed-loop archiving signature service, and resource release verification service.

[0098] After encapsulation, this continuous echo scheduling instruction set is directly referenced in step S5 for actually invoking the server's cryptographic machine, key management service, post-quantum cryptography capabilities, and necessary certificate status verification capabilities. By transforming the closed-loop resource reservation result into an executable scheduling instruction set, step S4 ensures that subsequent actual execution can continuously complete all cryptographic operations—control instruction issuance, response feedback, status feedback, status verification, and reconfirmation—according to the same closed-loop number, the same resource reservation identifier, and the same key derivation relationship, thus ensuring the integrity and continuity of the closed loop from a scheduling perspective.

[0099] S5: Execute the continuous echo scheduling instruction set, call the corresponding cryptographic service according to each node type to complete the cryptographic operation of each node in the control closed loop cryptographic event chain in sequence, release the closed loop resource reservation flag and output the control closed loop cryptographic resource scheduling result.

[0100] S5.1: The cryptographic application service platform reads the continuous echo scheduling instruction set, verifies whether the closed-loop resource reservation identifier in the instruction set is within the validity period, and if valid, generates a closed-loop execution task order in sequence according to the scheduling instructions of each node.

[0101] Figure 2 A flowchart illustrating the closed-loop execution, verification, and resource release process provided in this embodiment is shown, as follows: Figure 2 As shown, the cryptographic application service platform reads the continuous echo scheduling instruction set output in step S4 and verifies whether the closed-loop resource reservation identifier is still valid, i.e., whether the current time has not exceeded the reservation validity period set in step S3. If the identifier is valid, a closed-loop execution task order is generated sequentially according to the scheduling instructions of each node; if the identifier has expired, the resource re-reservation process is triggered, and the process returns to step S3 to reacquire the reserved resources.

[0102] The task sheet lists the corresponding cryptographic service path, equipment group priority, key derivation relationship identifier, authentication tag verification path, and resource deduction method for each of the following nodes in order: control command issuance node, site-side response feedback node, equipment status feedback node, central control-side status verification node, and necessary reconfirmation node. For nodes marked as pending replenishment under the minimum closed-loop guarantee mode, the task sheet retains their node position and marks the replenishment trigger condition. That is, the system continuously monitors whether there are any new available resources in the resource pool, and once the resources are replenished, the node is automatically included in the execution sequence.

[0103] Once the task list is generated, the system enters the actual cryptographic operation and execution phase, executing each item in the order of the nodes in the task list.

[0104] S5.2: The password protection domain calls the various password services and password operation capabilities required by the closed loop in the order of the nodes in the closed loop execution task list according to the node type of each node. After all the password operations of each node are completed, the execution record of that node is generated.

[0105] The cryptographic protection domain calls the various cryptographic services and cryptographic computation capabilities required by the closed loop in the order of the nodes in the closed-loop execution task list, according to the node type of each node.

[0106] The control command issuing node completes signing, encryption, authentication tag generation, and session key derivation operations to ensure the control commands are credible, confidential, and integrity protected during transmission. The site-side response return node completes signature verification, decryption, authentication tag verification, and response result confirmation operations to ensure the commands received by the site have not been tampered with and the response results are authentic and reliable. The device status return node completes data encryption, integrity protection, and return signature verification operations to ensure the device status information is not stolen or tampered with during return. The central control side status verification node and necessary reconfirmation nodes complete verification signature verification, status consistency confirmation, closed-loop archiving signature, and resource release verification operations to ensure the central control side can make accurate verification judgments based on the actual device status. After all cryptographic operations of each node are completed, the system immediately generates an execution record for that node, recording the closed-loop number, node sequence number, cryptographic service type, actual quantum random number consumption, actual session key derivation count, actual server cryptographic machine call count, execution result, and abnormal rollback flag.

[0107] To quantify the actual performance satisfaction of each node, the system uniformly converts the key resources actually obtained by the node, the waiting time, and the execution results into a dimensionless satisfaction index, calculated using the following formula: ; in, This indicates the execution satisfaction level of the i-th closed loop node; This represents the amount of quantum random number resources actually obtained by the i-th node, in bytes; This represents the smoothing constant for quantum random numbers; a value of 32 to 64 bytes is recommended. This represents the number of session key derivations actually obtained by the i-th node; This represents the key derivation smoothing constant; a value of 1 to 2 is recommended. This represents the actual number of times the server's cryptographic machine was invoked by the i-th node; This represents the smoothing constant for server cryptographic machine calls; a value of 1 to 2 is recommended. This indicates the actual execution time of the node, in seconds; This represents the smoothing constant for the waiting time; a value of 3 to 6 seconds is recommended. This represents the coefficient of the node execution result. It is 1 when the execution is successful, 0.6 to 0.8 when the execution is rolled back, and 0 when the execution fails. , , , This represents the sensitivity coefficient, with a value ranging from 0.8 to 1.3.

[0108] The formula consists of four fractions, representing the degree of satisfaction of quantum random number resources, key derivation resources, server cryptographic machine call resources, and the impact of waiting time on the satisfaction level. The numerator of each fraction represents the actual amount obtained, and the denominator is the sum of the actual amount obtained and the smoothing constant. This ensures that the more abundant the resources, the closer the fraction value is to 1; the scarcer the resources, the closer the fraction value is to 0. Finally, the formula is multiplied by the execution result coefficient. Upon successful execution, the product of all fractions is fully preserved; during rollback, appropriate reductions are made; and upon failure, the satisfaction level is directly set to 0. The result calculated using this formula... The value is output as part of the node execution record and is used in the subsequent sub-step S5.3 to summarize the overall completion status of the closed loop, so that the system can confirm whether each closed loop node has truly obtained continuous cryptographic resources, rather than just confirming that the first control command has been executed.

[0109] S5.3: After receiving the execution records of each node, the data operation and maintenance domain summarizes the node execution-related parameters of each node according to the closed loop number. Nodes marked as condition-triggered but not actually triggered are regarded as condition-exempt states and directly identified as meeting the completion conditions. The domain verifies whether each node has reached the predetermined completion state, generates a closed loop completion verification record, and calculates the closed loop completion verification value.

[0110] After receiving the execution records of each node output by S5.2, the data operation and maintenance domain summarizes the relevant parameters of each node's execution according to the closed-loop number, including business events, cryptographic operation results, quantum random number consumption, session key derivation times, server cryptographic machine call times, resource retention status, and abnormal rollback flags. It also verifies whether the control command issuing node, the site-side response feedback node, the equipment status feedback node, the central control side status verification node, and the necessary reconfirmation node have all reached the predetermined completion status.

[0111] For nodes marked as conditionally triggered but not actually triggered, the system treats them as conditionally exempt and directly recognizes them as meeting the completion conditions, without waiting for the cryptographic operation execution record of that node. If there are still nodes to be supplemented in the closed loop, the system continues to keep the closed loop resource reservation mark valid and maintains the non-control cryptographic task postponement state, waiting for the resources to be supplemented before continuing execution; if all nodes have met the completion conditions, including those marked as conditionally exempt, then a closed loop completion verification record is generated and the closed loop completion verification value is calculated.

[0112] To comprehensively quantify the completion quality of the entire closed loop, the system uses the following formula to calculate the closed loop completion verification value: ; in, This represents the verification value upon completion of the closed-loop operation; it is dimensionless. This indicates the number of closed-loop nodes, typically taken as 4 to 5. This represents the weight of the i-th node, with a value ranging from 0.8 to 1.2. Higher values ​​can be used for the control command issuing node and the station-side response feedback node to reflect their key role in the closed loop. This indicates the satisfaction level of the execution of the i-th node, which is calculated by sub-step S5.2; Indicates the number of times the closed-loop system has been abnormally rolled back; This represents the smoothing constant for abnormal rollback; a value of 1 to 2 is recommended. This indicates the number of non-exempt nodes, that is, the number of nodes remaining after excluding those that were marked as condition-exempt nodes because the condition was triggered but did not actually trigger. This represents the smoothing constant for nodes to be supplemented; a value of 1 to 2 is recommended. This represents the anomaly penalty coefficient, with a value ranging from 0.8 to 1.2. This represents the penalty coefficient to be supplemented, with a value ranging from 0.8 to 1.2.

[0113] The first term of the formula is the weighted average of the satisfaction levels of each node, reflecting the overall execution quality of the closed loop. The second term penalizes abnormal rollbacks; the more abnormal rollbacks, the lower the completion verification value. The third term penalizes nodes awaiting replacement; the more nodes awaiting replacement, the lower the completion verification value. A closed-loop completion threshold of 0.88 to 0.95 is recommended, with 0.92 preferred for emergency water and electricity control scenarios. The calculated closed-loop completion verification value... When the threshold is reached, it indicates that the overall execution quality of the closed loop meets the requirements, and the resource release phase can begin; if If the threshold is not reached, it indicates that there are many anomalies or issues to be addressed during the closed-loop execution process, requiring the resource reservation state to be maintained and corresponding remedial measures to be triggered.

[0114] S5.4: When the closed-loop completion verification value reaches the preset closed-loop completion threshold, release the closed-loop resource reservation flag, return the unconsumed resource quota to the corresponding resource pool, and read the list of delayed non-control cryptographic tasks to restore their normal scheduling item by item.

[0115] When the closed-loop completion verification value calculated by S5.3 When the preset closed-loop completion threshold is reached, the cryptographic application service platform releases the closed-loop resource reservation flag and returns the unconsumed quantum random access quota, session key derivation count, server cryptographic machine call qualification, post-quantum cryptographic capability quota, and necessary certificate status verification qualification to the corresponding resource pool for use by other closed loops or ordinary tasks.

[0116] Simultaneously, the middleware platform reads the list of delayed non-control cryptographic tasks and restores their regular scheduling item by item according to the original arrival order and resource consumption of password file protection tasks, permission file integrity protection tasks, log retransmission tasks, batch certificate query tasks, and ordinary audit cryptographic tasks. During restoration, the system still needs to determine whether the available resources in the current resource pool are sufficient to support the execution of each delayed task. If resources are sufficient, all tasks are restored; if resources are still scarce, tasks with lower resource consumption are restored first, while larger tasks are postponed to the next scheduling cycle.

[0117] If the closed loop completes the verification value If the threshold is not reached, only the partial resources of completed nodes are released. Unused reserved quotas for completed nodes are immediately returned to the resource pool, but the closed-loop resource reservation flag remains valid. Resources required by nodes awaiting replacement are not released until all nodes awaiting replacement have completed execution and the closed-loop completion verification value reaches the threshold, at which point a full resource release operation is performed. This prevents resources from being wasted due to prolonged retention after the closed-loop is completed, while ensuring that low-priority services are restored in an orderly manner without disrupting the continuity of the control loop.

[0118] S5.5: Merge the resource release and delayed service recovery records, the closed-loop completion verification records, and the execution records of each node to form a control closed-loop cryptographic resource scheduling result based on quantum key consumption prediction.

[0119] The data operations and maintenance domain merges the resource release and delayed service recovery records output by S5.4, the closed-loop completion verification records output by S5.3, and the execution records of each node output by S5.2. This data is then reported to the cryptographic monitoring system via the log adapter, forming a control closed-loop cryptographic resource scheduling result based on quantum key consumption prediction. This result includes the closed-loop number, controlled object, device object, node completion sequence, cryptographic service execution results of each node, actual total quantum random number consumption, actual total number of session key derivations, actual total number of server cryptographic machine calls, closed-loop resource reservation flag release status, low-priority service recovery status, abnormal rollback records, and closed-loop completion status. The system only confirms and outputs the control closed-loop cryptographic resource scheduling result when all four conditions are met: all cryptographic nodes within the closed loop have completed, the closed-loop resource reservation flag has been released, delayed services have been restored and scheduled, and the closed-loop completion status has been reported.

[0120] At this point, the entire process of the cryptographic resource scheduling method based on quantum key consumption prediction has been completed. The scheduling object has been upgraded from a single control command to a complete control loop that includes command issuance, response feedback, status feedback, status verification, and reconfirmation. The entire chain, from resource prediction, resource reservation, scheduling command generation to actual execution, ensures that the front-end control command and the subsequent feedback link share the reserved resources under the same closed loop number. Ultimately, this solves the engineering problem of the control command obtaining cryptographic resources in the emergency control closed loop, while the subsequent feedback link is cut off by the resource-constrained state.

[0121] According to embodiments of this disclosure, an electronic device is also provided, which may include a processor, a communications interface, a memory, and a communication bus, wherein the processor, the communications interface, and the memory communicate with each other via the communication bus. The processor can invoke logical instructions stored in the memory to execute the methods provided in the above embodiments.

[0122] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0123] On the other hand, this disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.

Claims

1. A cryptographic resource scheduling method based on quantum key consumption prediction, characterized in that, The method includes: S1. Receive control-type cryptographic service requests, generate a closed-loop number for emergency control requests and calculate the closed-loop attribution time window, and use the closed-loop number and the closed-loop attribution time window as indexes to complete each node in the control closed-loop cryptographic event chain to form a control closed-loop cryptographic event chain. S2. Perform cryptographic operation parsing and resource consumption calculation on each node in the control closed-loop cryptographic event chain, determine the quantum random number and key material consumption amount required for each node, as well as various cryptographic resource consumption parameters, summarize according to the same closed-loop number, and add the subsequent echoing margin based on the closed-loop position of each node during the summary, and generate a closed-loop quantum key consumption package carrying the closed-loop number and various expected cryptographic resource consumption parameters. S3. Based on the closed-loop quantum key consumption package, query the supply quota of the candidate device group in each cryptographic resource dimension, calculate the coverage of the candidate device group to the resource requirements in the closed-loop quantum key consumption package, bind the closed-loop resource reservation identifier and the reservation quota of each cryptographic resource to the closed-loop number according to the coverage, and generate the closed-loop resource reservation result. S4. Generate a continuous callback scheduling instruction set based on the closed-loop resource reservation result; S5. Execute the continuous echo scheduling instruction set, call the corresponding cryptographic service according to each node type to complete the cryptographic operation of each node in the control closed loop cryptographic event chain in sequence, release the closed loop resource reservation flag and output the control closed loop cryptographic resource scheduling result.

2. The method according to claim 1, characterized in that, S1 includes: Receive control-type cryptographic service requests, standardize the requests to fill in missing fields, and generate a standardized control request record containing request attribute fields and five dimensions of information for calculating emergency control identification values; The five dimensions of information are extracted from the standardized control request record and weighted and fused to generate an emergency control identification value. Requests whose emergency control identification values ​​reach a preset threshold are determined to be emergency control requests. For records that have been identified as emergency control requests, a closed-loop number is generated based on the control object, device object, business system identifier, and link tracing identifier carried in the record, and the time window for the aggregation of subsequent response feedback, device status feedback, centralized control side verification, and reconfirmation nodes is calculated. Using the closed-loop number, the time window of ownership, the controlled object, and the equipment object as indexes, and following the actual business sequence of the emergency control process of the hydropower monitoring system, each node in the control closed-loop cryptographic event chain is completed in sequence to form a complete control closed-loop cryptographic event chain.

3. The method according to claim 2, characterized in that, The five dimensions of information include control object level, service path urgency, control time urgency, business type matching degree, and device object operation correlation degree.

4. The method according to claim 1, characterized in that, S2 includes: The password protection domain reads the control closed-loop password event chain, parses each node in sequence according to the node order, registers the specific password operation to be performed by each node according to the node type and password operation type fields, and reads the condition trigger node identifier of each node to generate a list of node password operations arranged by closed-loop number, node order and password operation type and carrying the condition trigger node identifier of each node. The cryptographic protection domain takes each node cryptographic operation in the node cryptographic operation list as the accounting object, determines the quantum random number and key material consumption of the corresponding node and the various cryptographic resource consumption parameters of the node, and associates the condition trigger node identifier of the node to generate a node resource consumption record. According to the same closed-loop number, the resource consumption records of the nodes are summarized, the quantum random number and key material consumption of each node are accumulated, and the subsequent echo margin is added according to the position of each node in the closed loop to generate a closed-loop resource summary record. Based on the closed-loop resource summary record, the closed-loop number, control object, device object, node order, number of nodes, cryptographic operation type of each node, expected cryptographic resource consumption parameters after closed-loop summary, and condition trigger node identifier are written into the closed-loop quantum key consumption package.

5. The method according to claim 4, characterized in that, The subsequent echo reply margin is determined based on the position of each node in the closed loop, with a larger echo reply margin allocated to nodes that are further back in the loop.

6. The method according to claim 1, characterized in that, S3 includes: The unified access domain reads the closed-loop quantum key consumption packet, queries the server cryptographic machine equipment group information that can undertake the closed-loop cryptographic task according to the business alignment relationship between the central control side zone 1 and the hydropower station zone 1, summarizes the equipment group information that meets the conditions, and performs a comprehensive scoring and ranking of each equipment group to form a closed-loop resource candidate record. The cryptographic protection domain reads the closed-loop resource candidate record, combines it with the resource requirements carried in the closed-loop quantum key consumption package, calculates the coverage of the candidate device group's supply quota in each cryptographic resource dimension to the various cryptographic resources required for the complete closed loop, and generates the closed-loop resource coverage result. Based on the closed-loop resource coverage result, a closed-loop resource retention identifier is generated. The closed-loop number, closed-loop retention strategy parameters, and various cryptographic resource retention quotas of the same control closed loop are bound together to generate a closed-loop resource retention identifier record. Read the closed-loop resource retention identifier record and determine whether the closed loop should enter the full closed-loop retention mode or the minimum closed-loop guarantee mode. In the minimum closed-loop guarantee mode, prioritize the release of the retention qualification required for control command issuance and first round response transmission. The retention mode determination result, the closed-loop resource retention identifier record, and the closed-loop resource coverage result are merged to generate the closed-loop resource retention result.

7. The method according to claim 1, characterized in that, S4 includes: The cryptographic application service platform reads the closed-loop resource retention result, expands each node item by item according to the node order of the control closed-loop cryptographic event chain, and fills in the various scheduling parameters required for the closed-loop node scheduling base table and the corresponding node guarantee status for each node according to the retention mode in the closed-loop resource retention result and the resource coverage of each node, thereby generating the closed-loop node scheduling base table. Taking each node in the closed-loop node scheduling base table as an object, and combining the node order, node guarantee status, remaining retention period and required cryptographic service type, the execution priority value of each node is calculated by weighted summation of each factor, and a node execution priority value table is generated. Based on the three dimensions of node execution priority, node order, and node dependency, the nodes in the closed loop are comprehensively sorted to generate a continuous callback node scheduling sequence. The resource usage of non-control cryptographic tasks arriving at the same time is compared with the scheduling sequence of the continuous echo node to determine whether the non-control cryptographic tasks are crowding out the closed-loop reserved resources. If they are not crowding out, they are allowed to enter the regular execution queue. If they are crowding out, they are written into the postponement queue to generate a task disposal list containing the postponement list of non-control cryptographic tasks. The continuous echo node scheduling sequence, the node execution priority value table, and the task handling list are merged to generate a complete continuous echo scheduling instruction set.

8. The method according to claim 1, characterized in that, S5 includes: The cryptographic application service platform reads the continuous echo scheduling instruction set, verifies whether the closed-loop resource reservation identifier in the instruction set is within the validity period, and if valid, generates a closed-loop execution task order in sequence according to the scheduling instructions of each node. The password protection domain calls various password services and password operation capabilities required by the closed loop in the order of the nodes in the closed loop execution task list according to the node type of each node. After all the password operations of each node are completed, the execution record of that node is generated. After receiving the execution records of each node, the data operation and maintenance domain summarizes the node execution-related parameters of each node according to the closed loop number. Nodes marked as condition-triggered but not actually triggered are considered to be in a condition-exempt state and are directly identified as meeting the completion conditions. The domain verifies whether each node has reached the predetermined completion state, generates a closed loop completion verification record, and calculates the closed loop completion verification value. When the closed-loop completion verification value reaches the preset closed-loop completion threshold, the closed-loop resource retention flag is released, the unconsumed resource quota is returned to the corresponding resource pool, and the non-control-type cryptographic task postponement list is read and its normal scheduling is restored item by item. The resource release and delayed service recovery records, the closed-loop completion verification records, and the execution records of each node are merged to form a control closed-loop cryptographic resource scheduling result based on quantum key consumption prediction.

9. An electronic device, characterized in that, The electronic device includes a memory and at least one processor, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1-8.

10. A computer storage medium, characterized in that, It stores a computer program, which, when executed, performs the method according to any one of claims 1-8.