A cryptographic acceleration system, method, storage medium, and computing device based on a heterogeneous dual-active scheduling architecture.
The encryption acceleration system, based on a heterogeneous dual-active scheduling architecture, solves the bandwidth bottleneck and security deficiencies of encryption chips in high-concurrency scenarios, achieving high throughput, high availability, and deterministic latency encryption acceleration, and is suitable for platform porting with various interface types.
Patent Information
- Application Number
- CN202611630305.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-21
- Publication Date
- 2026-11-17
AI Technical Summary
Existing encryption chips suffer from bandwidth bottlenecks and insufficient security in high-concurrency scenarios, making it difficult to simultaneously meet the requirements of high throughput, high availability, and deterministic latency. Furthermore, traditional solutions have uncontrollable attack surfaces and uncertain latency.
An encryption acceleration system based on a heterogeneous dual-active scheduling architecture is adopted. Through dual-path SPI interface modules, dual-active scheduling modules, encryption engine modules, adaptive QoS policies, side-channel defense units, and load balancing units, the system achieves adaptive reassembly and distribution of data streams, dynamically adjusts timing and power consumption characteristics, and ensures seamless switching and high availability of the system under fault conditions.
It achieves a synergistic optimal architecture for security, performance, and reliability, improving system throughput and availability, reducing attack surface uncertainty, ensuring deterministic latency and physical security, and is suitable for platform porting with various interface types.
Smart Images

Figure CN123123040A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of embedded information security technology, and in particular relates to an encryption acceleration system, method, storage medium and computing device based on a heterogeneous dual-active scheduling architecture. Background Technology
[0002] With the rapid development of the Internet of Things (IoT) and the Industrial Internet, embedded devices are increasingly widely used in key fields such as power, finance, and automotive, placing stringent demands on the real-time performance and security of data transmission. As a core component ensuring data confidentiality, encryption chips have long faced a theoretical dilemma in their architecture design: the "impossible triangle."
[0003] First, while using a single SPI interface maintains inherent security advantages such as a simple protocol stack, small attack surface, and zero startup wait time, it suffers from bandwidth bottlenecks in high-concurrency scenarios and lacks effective link redundancy mechanisms. If the interface is interrupted due to physical interference, it will directly lead to service paralysis, making it difficult to meet high availability requirements. Second, while switching to high-speed interfaces such as PCIe or USB increases transmission speed, the massive protocol stack introduces an uncontrollable attack surface and uncertain latency. Furthermore, relying on complex driver enumeration and DMA (Direct Memory Access) mechanisms makes it vulnerable to firmware hijacking and side-channel attacks, violating the original design intent of a security chip.
[0004] Existing technologies attempt to address these issues by increasing the SPI clock frequency or simply adding more interfaces. However, the former is limited by signal integrity and electromagnetic compatibility, limiting its improvement potential; the latter lacks comprehensive consideration of inter-channel service coordination, physical characteristic leakage under fault conditions, and real-time assurance for hybrid critical services. Therefore, how to build a unified architecture that simultaneously achieves high throughput, high availability, deterministic latency, and physical security while maintaining the simplicity and security of the SPI protocol is a pressing technical challenge in this field. Summary of the Invention
[0005] The purpose of this invention is to overcome the aforementioned "impossible triangle" dilemma and provide an encryption acceleration system, method, storage medium, and computing device based on a heterogeneous dual-active scheduling architecture. By introducing a business semantic awareness and dynamic physical indistinguishability mechanism under a minimal protocol framework, it achieves a leap from "passive response based on link load" to "active orchestration based on business semantics" and has protocol-independent general scheduling capabilities.
[0006] To achieve the above objectives, the present invention employs the following technical solution:
[0007] In a first aspect, the present invention provides an encryption acceleration system based on a heterogeneous dual-active scheduling architecture, comprising:
[0008] The dual-SPI interface module includes a first SPI interface unit and a second SPI interface unit, which are used to connect to an external master control device to obtain data packets with service priority tags sent by the external master control device and real-time link communication parameters of the two SPI interfaces.
[0009] The dual-active scheduling module is connected to the first SPI interface unit and the second SPI interface unit, and is used to adaptively reassemble and distribute the data stream according to the service priority tag of the data packet and the real-time link communication parameters.
[0010] The encryption engine module, connected to the dual-active scheduling module, is used to perform parallel encryption or decryption operations on the scheduled data stream.
[0011] Optionally, the dual-active scheduling module is configured as follows:
[0012] The adaptive QoS policy unit is used to parse the service priority label of the data packet and dynamically adjust the distribution weight of the data stream in combination with the real-time link communication parameters of the two SPI interfaces.
[0013] The side-channel defense unit is used to perform equalization masking on the runtime timing and power consumption characteristics of the normally operating SPI interface;
[0014] The load balancing unit is used to split the data stream to the two SPI interfaces for concurrent transmission based on the distribution weight of the adaptive QoS policy unit when both SPI interfaces are normal.
[0015] The fault switching unit is used to seamlessly migrate the service traffic of the abnormal SPI interface to another normal SPI interface when communication is abnormal on either SPI interface, and to trigger the self-healing detection mechanism of the abnormal SPI interface.
[0016] Optionally, the dual-active scheduling module adaptively reassembles and distributes the data stream based on the service priority label of the data packet and the real-time link communication parameters. The implementation process is as follows:
[0017] Real-time link communication parameters of the first SPI interface unit and the second SPI interface unit are collected in real time. The link communication parameters include bandwidth utilization, bit error rate, latency and jitter variance.
[0018] Calculate the combined load index of the two SPI interfaces and generate dynamic scheduling weights by combining the service priority tags of data packets;
[0019] If both SPI interfaces are idle or lightly loaded, the data stream is split sequentially according to the scheduling weight and assigned a sequence number to form a data packet, which is then transmitted in parallel to the encryption engine module through the first SPI interface unit and the second SPI interface unit for processing.
[0020] If the overall load index of any SPI interface exceeds the preset threshold and there are high-priority services, the high-priority services will be forcibly assigned to another SPI interface.
[0021] If the bit error rate of any SPI interface exceeds the set threshold or communication is interrupted, it is determined to be a faulty SPI interface. The data packets of the faulty SPI interface are then migrated to the normal SPI interface. At the same time, the side channel defense unit is triggered to dynamically adjust the timing jitter parameters of the normal SPI interface to keep the power consumption characteristics before and after the switch. The dynamic adjustment refers to the side channel defense unit dynamically modifying the clock phase, chip select interval and idle padding data of the normal SPI interface.
[0022] Optionally, if the overall load index of the SPI interface rises to the secondary warning threshold, the fault pre-migration preparation will be initiated in advance, and the data packets to be transmitted will be pre-written into the redundant backup storage area according to the sequence number.
[0023] Optionally, after migrating the data packets of the faulty SPI interface to the normal SPI interface, the faulty SPI interface is marked as offline and awaiting inspection, and the built-in self-healing detection unit periodically sends probe frames to monitor the recovery status of the faulty SPI interface.
[0024] Optionally, the encryption engine module is internally configured with a task scheduling controller, a DMA controller, and N parallel encryption cores;
[0025] The task scheduling controller is used to parse the DMA descriptor chain issued by the dual-active scheduling module, split the task into subtasks and distribute them to idle encryption cores according to the real-time load status of each encryption core; at the same time, it is responsible for the reorganization of the results and state aggregation after multi-core parallel processing to ensure the correct output timing.
[0026] The DMA controller autonomously completes data transfer based on the subtask descriptor, directly sending plaintext into the designated encryption core and directly writing ciphertext back to the output area; the DMA controller has a built-in ping-pong buffer to achieve overlap between data prefetching and encryption calculation pipelines, and feeds back pressure signal to the task scheduling controller when the buffer is full to prevent overflow.
[0027] Optionally, the system integrates a redundant backup storage area to temporarily store unprocessed data packets. After the faulty SPI interface is restored, a retransmission request is initiated to the external master control device through the normal SPI interface to complete the missing frames in the temporarily stored data packets. The redundant backup storage area is then released after the sequence number is verified and aligned with the state machine.
[0028] Optionally, the dual-active scheduling module converts the timing control logic of the SPI interface into a protocol frame format suitable for the UART or I2C interface through a reconfigurable protocol mapping table, thereby achieving universal scheduling across interface types.
[0029] Secondly, the present invention provides an encryption acceleration method based on a heterogeneous dual-active scheduling architecture, implemented based on the aforementioned encryption acceleration system based on a heterogeneous dual-active scheduling architecture, the method comprising:
[0030] The system is powered on and initialized, establishing a dual-channel SPI communication connection between the system and the external master control device, establishing a dual-channel heartbeat detection mechanism, and completing two-way authentication and session key negotiation;
[0031] The dual-active scheduling module starts real-time monitoring. When a data encryption request is detected, it parses the service priority label of the data packet and obtains the real-time link communication parameters of the two SPI interfaces.
[0032] The dual-active scheduling module calculates the comprehensive load index of the two SPI interfaces based on the link communication parameters, and generates dynamic scheduling weights by combining the service priority tags of the data packets.
[0033] If both SPI interfaces are idle or lightly loaded, the data stream is split sequentially according to the scheduling weight and assigned a sequence number to form a data packet, which is then transmitted in parallel to the encryption engine module through the first SPI interface unit and the second SPI interface unit for processing.
[0034] If the overall load index of any SPI interface exceeds the preset threshold and there are high-priority services, the high-priority services will be forcibly assigned to another SPI interface.
[0035] If the bit error rate of any SPI interface exceeds the set threshold or communication is interrupted, it is determined to be a faulty SPI interface. The data packets of the faulty SPI interface are then migrated to the normal SPI interface. At the same time, the side channel defense unit is triggered to dynamically adjust the timing jitter parameters of the normal SPI interface to keep the power consumption characteristics before and after the switchover continuous.
[0036] Optionally, after the faulty SPI interface is restored, the dual-active scheduling module controls the system to enter synchronization mode, obtains incremental data from the normal SPI interface for state machine alignment, and then re-adds the system to the dual-active scheduling queue after alignment is completed.
[0037] Thirdly, the present invention provides a computer-readable storage medium for storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform any of the methods described above for the encryption acceleration method based on a heterogeneous dual-active scheduling architecture.
[0038] Fourthly, the present invention provides a computing device comprising one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the methods in the above-described cryptographic acceleration methods based on heterogeneous dual-active scheduling architecture.
[0039] Compared with the prior art, the present invention has the following significant advantages:
[0040] 1. This invention is the first in the field of embedded encryption to propose and implement a synergistic optimal architecture that integrates security, performance, and reliability. Compared to PCIe / USB solutions, it retains the fundamental advantages of the SPI protocol: small attack surface, fast startup, low power consumption, and independent IP controllability. Compared to traditional single-channel SPI solutions, it utilizes dual-channel concurrency to nearly double the effective throughput, and improves system availability to an industrial-grade standard of 99.999% through a millisecond-level fault self-healing mechanism. This invention integrates dual-channel interface control, service-aware scheduling, dynamic physical defense, and a multi-core encryption engine into a single chip, reducing PCB routing complexity and improving system anti-interference capabilities and overall integration.
[0041] 2. The scheduling algorithm in this invention is no longer limited to simple link load statistics. Instead, it performs deterministic low-latency orchestration of key messages such as key negotiation and real-time control by parsing service priority tags, ensuring deterministic service quality of mixed critical services in congestion scenarios and filling the technical gap of high-quality service scheduling under the simplified SPI protocol.
[0042] 3. This invention deeply couples side-channel defense with fault-switching mechanisms. Through power balancing and random timing masking techniques, it ensures that the chip exhibits consistent physical characteristics in all operating states, including dual-active, degraded, and recovery. Attackers cannot deduce the current redundancy state of the system through power consumption or electromagnetic analysis, completely eliminating the leakage channel of bypass information at the physical layer, enabling the chip to achieve a new level of "transparent and trustworthy" security in the physical dimension.
[0043] 4. The dual-active scheduling module of this invention is essentially a pure logic scheduling kernel decoupled from the underlying physical protocol. Through simple configuration of the reconfigurable protocol mapping table, the same dual-active scheduling strategy can be applied to multiple interfaces such as UART and I2C, greatly reducing the cost of multi-platform porting and laying a solid architectural foundation for building an independent, controllable, highly available, and secure SoC ecosystem. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the communication architecture of the dual-channel SPI dual-active encryption acceleration system provided by the present invention;
[0045] Figure 2This is a schematic diagram of the encryption acceleration method based on a heterogeneous dual-active scheduling architecture provided by the present invention. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0047] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0048] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0049] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0050] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0051] It should be emphasized here that the step markers mentioned below are not a limitation on the order of the steps, but should be understood as meaning that the steps can be executed in the order mentioned in the embodiments, or in a different order than in the embodiments, or several steps can be executed simultaneously.
[0052] Example 1
[0053] This embodiment 1 provides an encryption acceleration system based on a heterogeneous dual-active scheduling architecture. An external master control device (such as an ARM Cortex-M4 processor) is connected to the encryption acceleration system via two physically isolated SPI signal lines: a first SPI interface (SPI1) and a second SPI interface (SPI2). The external master control device tags the plaintext data to be encrypted with a service priority label and sends it through the first SPI interface (SPI1) and the second SPI interface (SPI2). Upon receiving the data, the encryption acceleration system, based on the heterogeneous dual-active scheduling architecture, uses a dual-active scheduling module to adaptively reassemble and distribute the data according to the service priority label and real-time link communication parameters. Compared to a single-path SPI scheme, this architecture maintains protocol simplicity while effectively doubling throughput. Compared to PCIe / USB schemes, it avoids the attack surface and uncertain latency introduced by complex protocol stacks, making it particularly suitable for scenarios such as vehicle-mounted T-BOXs and power terminals that are sensitive to both security and real-time performance.
[0054] See Figure 1 The encryption acceleration system based on a heterogeneous dual-active scheduling architecture provided in this embodiment includes:
[0055] The dual-SPI interface module includes a first SPI interface unit and a second SPI interface unit, used to connect to an external master control device. The external master control device connects to the first SPI interface unit and the second SPI interface unit respectively through two SPI signal lines, forming a physically isolated dual-channel communication link. In this embodiment, the dual-SPI interface module acquires data packets with service priority tags sent by the external master control device and real-time link communication parameters of the two SPI interfaces.
[0056] The dual-active scheduling module, connected to the first SPI interface unit and the second SPI interface unit, is used to adaptively reassemble and distribute the data stream according to the service priority tag of the data packet and the real-time link communication parameters.
[0057] The encryption engine module, connected to the dual-active scheduling module, adopts a heterogeneous multi-core architecture and is used to perform parallel encryption or decryption operations on the scheduled data stream.
[0058] In this embodiment, the dual-active scheduling module constitutes a lightweight data path orchestration layer that is independent of the underlying physical protocol, and integrates a microcode-configurable scheduling coprocessor.
[0059] The dual-active scheduling module is built-in:
[0060] The adaptive QoS policy unit is used to parse the service priority label of the data packet and, in combination with the real-time link communication parameters of the two SPI interfaces, dynamically adjust the distribution weight of the data stream, thereby realizing the evolution from link layer load balancing to application layer semantic-aware scheduling.
[0061] The side-channel defense unit is used to perform equalization masking on the runtime timing and power consumption characteristics of the SPI interface under all working states, including concurrent transmission of two SPI interfaces, single-channel fault switching, and recovery synchronization. This ensures that the external physical leakage characteristics of the system do not change with the internal data flow distribution state and interface redundancy state, so as to resist physical attacks based on timing analysis and power consumption analysis while ensuring the consistency and integrity of data packet order.
[0062] The load balancing unit is used to split the data stream to the two SPI interfaces for concurrent transmission when both SPI interfaces are normal, in combination with the distribution weight of the adaptive QoS policy unit.
[0063] The fault switching unit is used to seamlessly migrate the service traffic of any SPI interface to another normal SPI interface when communication on any SPI interface is abnormal, and to trigger the self-healing detection mechanism of the abnormal SPI interface.
[0064] In this embodiment, the dual-active scheduling module adaptively reassembles and distributes the data stream based on the service priority label and real-time link communication parameters. The specific implementation process is as follows:
[0065] Real-time link communication parameters of the first SPI interface unit and the second SPI interface unit are collected in real time, including bandwidth utilization, bit error rate, latency and jitter variance.
[0066] Calculate the combined load index of the two SPI interfaces and generate dynamic scheduling weights by combining the service priority tags of data packets;
[0067] If both SPI interfaces are idle or lightly loaded, the data stream is split sequentially according to the scheduling weight, and a sequence number is assigned to form a data packet. The data packets are then transmitted in parallel to the encryption engine module through the first SPI interface unit and the second SPI interface unit for processing.
[0068] If the overall load index of any SPI interface exceeds the preset threshold and there are high-priority services, weight-based load balancing will be triggered. If the overall load index of the SPI interface continues to rise after load balancing and reaches the secondary warning threshold, fault pre-migration preparation will be initiated in advance, and the data packets to be transmitted will be pre-written into the redundant backup storage area according to the sequence number. Among them, weight-based load balancing refers to priority-based queues or weight calculation based on the overall load index.
[0069] If the bit error rate of any SPI interface exceeds a set threshold or communication is interrupted, it is identified as a faulty SPI interface. Data packets from the faulty SPI interface are immediately migrated to the normal SPI interface. Simultaneously, the side-channel defense unit is triggered to dynamically adjust the timing jitter parameters of the normal SPI interface, ensuring continuous power consumption characteristics before and after the switch. The faulty SPI interface is marked as offline and awaiting inspection, and a built-in self-healing detection unit periodically sends probe frames to monitor its recovery. The core of this adjustment is the dynamic modification of the clock phase, chip select interval, and idle padding data of the normal SPI interface by the side-channel defense unit.
[0070] It should be noted that the key to calculating the combined load index of the two SPI interfaces lies in comparing the actual amount of data transmitted with the theoretical maximum bandwidth using normalization. Since SPI is a master-slave architecture and its rate is determined by the master clock (SCK), the effective throughput of each channel needs to be calculated separately.
[0071] Assuming the statistical period T = 1 second,
[0072] SPI1: SCK=10MHz, transmitted 750,000 bytes, effective rate = 6 Mbps.
[0073] Load factor = 6 / 10 = 60%
[0074] SPI2: SCK=8MHz, transmitted 480,000 bytes, effective rate = 3.84 Mbps.
[0075] Load factor = 3.84 / 8 = 48%
[0076] Overall load index (equal weight) = (60%+48%) / 2=54%.
[0077] It should be noted that in dual (or multi) SPI load balancing scenarios, "weight" usually refers to the traffic allocation ratio (i.e., how much data goes through SPI1 and how much goes through SPI2) or the scheduling priority score (which determines which data packet is sent to which link first).
[0078] The variable involved is Service Priority (PP), which determines the "prestige" of a data packet. High-priority services require lower latency and higher reliability.
[0079] Overall Load Index (LL): Reflects the current level of congestion on the SPI link.
[0080] Weight (WW): The bridge connecting business and links.
[0081] In this embodiment, the encryption engine module contains multiple parallel hardware encryption cores. Zero-copy task distribution is achieved through a hardware mailbox or DMA descriptor chain and a dual-active scheduling module, avoiding insufficient internal processing power due to increased interface bandwidth. It should be noted that the types of encryption algorithms supported by the hardware encryption cores are determined by the hardware configuration of the encryption chip (e.g., it can support one or more standard or custom algorithms such as AES, SM4, ChaCha20, and DES).
[0082] The encryption engine module is also configured with:
[0083] Task scheduling controller: It is responsible for parsing the DMA descriptor chain issued by the dual-active scheduling module, splitting large tasks into sub-tasks according to the real-time load status of each hardware encryption core, and distributing them to idle encryption cores through hardware mailboxes; at the same time, it is responsible for the reorganization and state aggregation of the results after multi-core parallel processing to ensure the correct output timing.
[0084] DMA controller: It autonomously completes data transfer based on subtask descriptors, sending plaintext directly to the designated hardware encryption core and writing ciphertext directly back to the output area, without CPU intervention or secondary copying between cores. The built-in ping-pong buffer enables the overlap of data prefetching and encryption calculation pipelines, and feeds back pressure signal to the task scheduler controller when the buffer is full to prevent overflow.
[0085] It should be noted that the coordination mechanism between the task scheduler and the DMA controller is independent of the specific encryption algorithm. It only distributes tasks to the corresponding hardware encryption core based on the algorithm identifier field in the descriptor chain, thereby ensuring compatibility with all encryption protocols supported by the encryption chip.
[0086] In this embodiment, the system also integrates a redundant backup storage area, which is used to temporarily store unprocessed data packets during interface switching or QoS degradation. After the faulty SPI interface is restored, a retransmission request is initiated to the external master control device through the normal SPI interface to complete the missing frames in the temporarily stored data packets. The redundant backup storage area is released after the sequence number is verified and aligned with the state machine, thereby ensuring data integrity and service continuity.
[0087] In one embodiment, the dual-active scheduling module converts the timing control logic of the SPI interface into a protocol frame format suitable for the UART or I2C interface through a reconfigurable protocol mapping table, thereby achieving universal scheduling across interface types.
[0088] The encryption acceleration system based on a heterogeneous dual-active scheduling architecture provided in this embodiment adopts a heterogeneous SoC architecture. The dual-SPI interface module includes a first SPI interface unit and a second SPI interface unit, responsible for physical layer signal transmission and reception. The dual-active scheduling module, as the core control unit, includes an adaptive QoS policy unit, a side-channel defense unit, a load balancing unit, and a fault-switching unit. The side-channel defense unit ensures consistent power consumption and electromagnetic characteristics of the chip in single-channel operation, dual-channel concurrency, and fault-switching states through dual-channel power balancing circuitry and random timing jitter injection, preventing attackers from inferring service load and interface status through physical probes. When the SPI1 interface rate reaches its limit or a high-priority service is detected, the dual-active scheduling module automatically routes subsequent data packets to SPI2 according to QoS weights, achieving service-aware load balancing. The encryption engine module includes four parallel SM4 encryption cores, achieving zero-copy task distribution through a hardware mailbox and the dual-active scheduling module.
[0089] Example 2
[0090] This embodiment 2 provides an encryption acceleration method based on a heterogeneous dual-active scheduling architecture, and is implemented based on the encryption acceleration system based on the heterogeneous dual-active scheduling architecture of the above embodiment, as follows: Figure 2 As shown, the method includes:
[0091] Step S1: The system is powered on and initialized. A dual-channel SPI communication connection is established between the encryption acceleration system based on the heterogeneous dual-active scheduling architecture and the external master control device. A dual-channel heartbeat detection mechanism is established, and bidirectional authentication and session key negotiation are completed.
[0092] Step S2: The dual-active scheduling module starts real-time monitoring. When a data encryption request is detected, it parses the service priority tag of the data packet and obtains the real-time link communication parameters of the two SPI interfaces. Assume that the current load of the first SPI interface SPI1 is 90% and the jitter variance is increasing, and the load of the second SPI interface SPI2 is 30%.
[0093] Step S3: If both SPI interfaces are idle or lightly loaded, the dual-active scheduling module will split the data stream in sequence and assign a sequence number to form data packets according to the distribution weight determined by the adaptive QoS policy. These data packets will be transmitted in parallel to the encryption engine module through the first SPI interface unit and the second SPI interface unit for processing. At the same time, the side channel defense module will apply timing jitter and power equalization masks to the dual transmission.
[0094] If the overall load index of any SPI interface exceeds a preset threshold and there are high-priority services, a weighted load balancing is triggered, prioritizing the allocation of high-priority services to lightly loaded interfaces. For example, in this embodiment, if a newly arrived data packet is found to contain a high-priority key negotiation message, and the jitter variance of the first SPI interface SPI1 exceeds the standard, the message is forcibly allocated to the second SPI interface SPI2. At the same time, low-priority log data is buffered to a redundant backup storage area and transmitted after the load on the first SPI interface SPI1 decreases.
[0095] Step S4: If any SPI interface suddenly disconnects or fails, the dual-active scheduling module immediately migrates the communication task of the failed SPI interface to another normal SPI interface. At the same time, it triggers the side channel defense unit to dynamically adjust the timing jitter parameters of the normal SPI interface, so that the power consumption characteristics before and after the switch remain continuous, and avoids the fault switching event itself becoming a source of side channel leakage.
[0096] Step S5: After the faulty SPI interface is restored, the dual-active scheduling module obtains the lost sequence number of the faulty SPI interface through the normal SPI interface and requests the external master control device to retransmit the missing frame; after completing the data completion and state machine alignment, the dual-active weight is gradually restored to avoid instantaneous traffic surges.
[0097] In step S3 of this embodiment, the data flow splitting adopts the weighted fair queue algorithm. The weight value of the weighted fair queue is determined by the service priority label and the link quality feedback to ensure that the effective load difference between the two interfaces does not exceed 15%.
[0098] In step S5 of this embodiment, after the faulty SPI interface is restored, the dual-active scheduling module controls it to enter the synchronization mode, obtains incremental data from the normal SPI interface for state machine alignment, and re-adds it to the dual-active scheduling queue after the alignment is completed.
[0099] Example 3
[0100] This embodiment 3 provides a computer-readable storage medium for storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform the encryption acceleration method based on a heterogeneous dual-active scheduling architecture provided in the above embodiments.
[0101] Example 4
[0102] This embodiment 4 provides a computing device, including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the cryptographic acceleration method based on the heterogeneous dual-active scheduling architecture provided in the above embodiments.
[0103] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0104] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0105] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0106] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An encryption acceleration system based on a heterogeneous dual-active scheduling architecture, characterized in that, The application relates to a dual-active scheduling method and device for a dual-channel SPI interface. The application comprises: a dual-channel SPI interface module, comprising a first SPI interface unit and a second SPI interface unit, used for connecting an external host device, acquiring a data packet with a service priority label sent by the external host device and real-time link communication parameters of the two-channel SPI interface; a dual-active scheduling module connected with the first SPI interface unit and the second SPI interface unit, used for adaptively recombining and distributing a data stream according to the service priority label of the data packet and the real-time link communication parameters; 2. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 1, characterized in that, an encryption engine module connected with the dual-active scheduling module, used for performing parallel encryption or decryption operation on the scheduled data stream. The dual-active scheduling module is configured with: an adaptive QoS policy unit used for analyzing the service priority label of the data packet and dynamically adjusting the distribution weight of the data stream in combination with the real-time link communication parameters of the two-channel SPI interface; a side channel defense unit used for balancing and masking the running time sequence and power consumption characteristics of the normally running SPI interface; a load balancing unit used for splitting the data stream to the two-channel SPI interface for concurrent transmission based on the distribution weight of the adaptive QoS policy unit when the two-channel SPI interface is normal; 3. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 2, characterized in that, a fault switching unit used for seamlessly migrating the service flow of the abnormal SPI interface to the other normal SPI interface and triggering the self-recovery detection mechanism of the abnormal SPI interface when any SPI interface is abnormal. The dual-active scheduling module adaptively recombines and distributes the data stream according to the service priority label of the data packet and the real-time link communication parameters, and the implementation process is as follows: real-time acquisition of the real-time link communication parameters of the first SPI interface unit and the second SPI interface unit, wherein the link communication parameters include bandwidth occupation rate, error code rate, delay time and jitter variance; calculation of the comprehensive load index of the two-channel SPI interface and generation of a dynamic scheduling weight in combination with the service priority label of the data packet; if the two-channel SPI interface is idle or lightly loaded, the data stream is sequentially split and assigned with a serial number to form a data packet according to the scheduling weight, and the data packet is transmitted to the encryption engine module for processing in parallel through the first SPI interface unit and the second SPI interface unit; if the comprehensive load index of any SPI interface exceeds a preset threshold value and there is high-priority service, the high-priority service is forced to be distributed to the other SPI interface; 4. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 3, characterized in that, if the error code rate of any SPI interface exceeds a set threshold value or the communication is interrupted, the SPI interface is determined to be faulty, the data packet of the faulty SPI interface is migrated to the normal SPI interface, and the time sequence jitter parameter of the normal SPI interface is dynamically adjusted by the side channel defense unit to keep the power consumption characteristics continuous before and after switching; the dynamic adjustment refers to dynamically modifying the clock phase, chip selection interval and idle filling data of the normal SPI interface by the side channel defense unit. if the comprehensive load index of the SPI interface rises to a secondary early warning threshold value, the fault pre-migration preparation is started in advance, and the data packet to be transmitted is pre-written into a redundant backup storage area according to the serial number.
5. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 3, characterized in that, After the data packet of the faulty SPI interface is migrated to the normal SPI interface, the faulty SPI interface is marked as offline for inspection, and a self-healing detection unit periodically sends a probe frame to monitor the recovery of the faulty SPI interface.
6. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 1, wherein, The encryption engine module is internally configured with a task scheduling controller, a DMA controller, and N parallel encryption cores. The task scheduling controller is configured to parse a DMA descriptor chain issued by a dual-active scheduling module, split tasks into subtasks according to the real-time load state of each encryption core, and distribute the subtasks to idle encryption cores; the task scheduling controller is also responsible for recombining and aggregating the results after multi-core parallel processing, to ensure correct output timing. The DMA controller autonomously completes data transfer according to the subtask descriptor, directly sends plaintext to a designated encryption core, and directly writes ciphertext back to an output area; the DMA controller internally has a ping-pong buffer area to implement data prefetching and encryption calculation pipeline overlap, and feeds back a back pressure signal to the task scheduling controller when the buffer area is full to prevent overflow.
7. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 1, characterized in that, The system internally integrates a redundant backup storage area for temporarily storing data packets that are not completed, and after the faulty SPI interface recovers, initiates a retransmission request to the external host device through the normal SPI interface to complete the missing frames in the temporarily stored data packets, and releases the redundant backup storage area after sequence number verification and state machine alignment.
8. The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to claim 1, characterized in that, The dual-active scheduling module converts the timing control logic of the SPI interface into a protocol frame format suitable for UART or I2C interfaces through a reconfigurable protocol mapping table, to realize general scheduling across different interface types.
9. A cryptographic acceleration method based on a heterogeneous dual-active scheduling architecture, characterized in that, The encryption acceleration system based on the heterogeneous dual-active scheduling architecture according to any one of claims 1 to 8, the method comprising: System power-on initialization, establishing dual-path SPI communication connection between the system and the external host device, establishing a dual-channel heartbeat detection mechanism, completing bidirectional identity authentication and session key negotiation; The dual-active scheduling module starts real-time monitoring, and when a data encryption request is detected, parses the service priority label of the data packet, and obtains the real-time link communication parameters of the two SPI interfaces; The dual-active scheduling module calculates the comprehensive load index of the two SPI interfaces based on the link communication parameters, and generates a dynamic scheduling weight based on the service priority label of the data packet; If both SPI interfaces are idle or lightly loaded, the data stream is split and assigned a sequence number according to the scheduling weight to form a data packet, which is then transmitted in parallel to the encryption engine module through the first SPI interface unit and the second SPI interface unit; If the comprehensive load index of any SPI interface exceeds a preset threshold and there is high-priority service, the high-priority service is forcibly assigned to the other SPI interface; If the bit error rate of any SPI interface exceeds a set threshold or the communication is interrupted, the faulty SPI interface is determined, the data packet of the faulty SPI interface is migrated to the normal SPI interface, and the side channel defense unit is triggered to dynamically adjust the timing jitter parameters of the normal SPI interface, so that the power consumption characteristics before and after switching remain continuous.
10. The encryption acceleration method based on the heterogeneous dual-active scheduling architecture according to claim 9, characterized in that, After the fault SPI interface is recovered, the dual-active scheduling module is controlled to enter a synchronization mode, to obtain incremental data from a normal SPI interface for state machine alignment, and after the alignment is completed, to rejoin a dual-active scheduling queue.
11. A computer-readable storage medium storing one or more programs, wherein the one or more programs comprise instructions executable by one or more computers to perform all the operations of the method of claim 1. The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any of the methods of encryption acceleration based on a heterogeneous dual-active scheduling architecture according to claim 9 or 10.
12. A computing device, comprising: Comprising, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs include instructions for performing any of the methods of encryption acceleration based on a heterogeneous dual-active scheduling architecture according to claim 9 or 10.
