Multi-level parallel certificateless identity authentication intelligent contract virtual machine
Through multi-level parallelized identity authentication smart contract virtual machines, heterogeneous computing units work together, the performance bottlenecks and insufficient resource utilization problems in certificate-free identity authentication are solved, and efficient, stable and secure identity authentication is achieved.
Patent Information
- Application Number
- CN202510546837.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-12
AI Technical Summary
In the scenario of large-scale certificate-free identity authentication, traditional smart contract virtual machines have performance bottlenecks and insufficient resource utilization, and cannot fully utilize the parallel computing capabilities of heterogeneous platforms.
Multi-level parallelized certificate-free identity authentication smart contract virtual machine is adopted, and through identity authentication contract preprocessing, WASM virtual machine execution and heterogeneous parallel acceleration subsystem, the identity authentication task is decomposed into multi-level parallel execution, and heterogeneous computing units such as CPU, GPU, and FPGA work together to achieve efficient parallel computing.
It achieves acceleration effects of several times or even ten times, ensures the stability and security of the system, and improves the response speed and reliability in high concurrency scenarios.
Smart Images

Figure CN120474750A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to blockchain technology, and in particular to smart contract virtual machine technology for identity authentication. Background Art
[0002] Smart contracts, as self-executing programs on the blockchain, enable automated and trusted execution of business logic without third-party intervention. However, traditional smart contract virtual machines, such as the Ethereum Virtual Machine (EVM), are designed for versatility. This often leads to computational bottlenecks, resource waste, and high latency when handling complex computing tasks or high-concurrency requests.
[0003] Traditional identity authentication systems typically rely on Public Key Infrastructure (PKI), using digital certificates issued by centralized Certificate Authorities (CAs) to verify user identities. This model presents centralization risks, complex certificate management, single points of failure, and potential privacy breaches. In recent years, the certificate model has gradually exposed its inability to cope with high-concurrency and real-time identity authentication requirements in distributed networks. Consequently, certificate-less identity authentication (CIA) has emerged. By utilizing a distributed trust model and blockchain technology to implement identity authentication, it avoids the management drawbacks of centralized CAs, reduces certificate maintenance costs, and significantly improves system security and scalability.
[0004] Distributed identity authentication requires the computation of numerous cryptographic algorithms, such as the Elliptic Curve Public Key Algorithm SM2, the Hash Algorithm SM3, and the Block Cipher Algorithm SM4, all of which are state-encrypted algorithms. This requires high computational complexity. Heterogeneous computing technology integrates different types of computing units, such as CPUs, GPUs, and FPGAs, to achieve high-performance, energy-efficient parallel computing by leveraging the strengths of each hardware. Typically, the CPU serves as the control center, responsible for task allocation, data scheduling, and logical analysis, while GPUs, PGAs, and other accelerators serve as execution units to handle parallel, computationally intensive tasks.
[0005] In addition, the Cryptography Co-Processor (CCP) and Deep Computing Unit (DCU), as dedicated hardware accelerators, also belong to the accelerators of heterogeneous computing platforms. As a hardware module dedicated to efficiently executing cryptographic operations such as encryption, decryption, signing, and hashing, the CCP is typically integrated into the CPU's internal bus as an auxiliary unit to the main processor (CPU). As a heterogeneous acceleration processor designed for high-performance computing (HPC), the DCU is typically used as a CPU coprocessor or standalone computing card, such as a general-purpose graphics processing unit (GPGPU) accelerator card based on the high-speed serial computer interconnect (PCIe) standard.
[0006] The current parallel design has limitations in task decomposition and resource utilization, and the parallel level is single, which cannot fully utilize the parallel capabilities of each computing unit in the heterogeneous platform. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a smart contract virtual machine solution that can fully utilize the advantages of dedicated hardware acceleration and realize the collaboration of heterogeneous computing tasks, in order to address the performance bottlenecks and insufficient resource utilization problems in large-scale certificateless identity authentication scenarios.
[0008] The technical solution adopted by the present invention to solve the above technical problems is a multi-level parallel certificateless identity authentication smart contract virtual machine, including:
[0009] Identity authentication contract preprocessing subsystem:
[0010] Obtain the identity authentication contract to be processed in the blockchain in real time through the network interface, then parse the identity authentication contract to obtain the instruction set for generating the control flow graph, divide the instruction set into basic blocks, identify the instructions of the intensive operators in the basic blocks and mark them;
[0011] WASM virtual machine execution subsystem:
[0012] A multi-threaded WASM instance manager is configured in the main process. Each basic block is evenly divided into task slices and assigned to each thread. The WASM instance on each thread receives the task slices, parses the compute-intensive operator tags within the task slices, directly executes the task slices that do not contain compute-intensive operator tags within the WASM instance, and caches the execution results. The task slices containing compute-intensive operator tags are placed in the compute-intensive task slice collection. The compute-intensive task slice collection is forwarded to the heterogeneous parallel acceleration subsystem by calling the heterogeneous acceleration interface, and waits for the execution results returned by the heterogeneous parallel acceleration subsystem.
[0013] Finally, the execution results of each WASM instance are integrated to complete the identity authentication, and the identity authentication results are written into the blockchain distributed ledger;
[0014] Heterogeneous parallel acceleration subsystem:
[0015] The set of compute-intensive task slices forwarded by the WASM instance is passed into the task buffer pool; the compute-intensive task slices are further divided into several subtasks, and the subtasks are assigned to the corresponding acceleration units through the mapping function; the acceleration units include the cryptographic coprocessor CCP and the deep computing unit DCU; after receiving the subtasks, each acceleration unit performs parallel data processing based on the internal pipeline and parallel processing architecture. After the calculation is completed, the subtask execution results are written into the result buffer pool, and the execution results are returned to the calling WASM instance through the data exchange interface.
[0016] Furthermore, the acceleration unit also includes a multi-core CPU.
[0017] The mapping function Φ is specifically expressed as:
[0018]
[0019] in, is the kth basic block B k Task slice B assigned to the j-th thread k,j The rth subtask divided; C th1 is the preset low computation threshold, C th2 is the preset large computational threshold.
[0020] The beneficial effect of the present invention is that when processing large-scale distributed identity authentication tasks, it can achieve several times or even more than ten times the acceleration effect compared to traditional serial or single-layer parallel solutions, while ensuring the stability and security of the system, thereby realizing efficient, stable and secure identity authentication. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To facilitate understanding of the present invention, the following describes each module and the multi-level parallel collaborative algorithm with reference to the accompanying drawings:
[0022] Figure 1 : Schematic diagram of the overall system architecture. DETAILED DESCRIPTION
[0023] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0024] 1. System overall architecture and data flow
[0025] like Figure 1 As shown in the figure, the system includes an identity authentication contract preprocessing subsystem, a WASM virtual machine execution subsystem, and a heterogeneous parallel acceleration subsystem.
[0026] (1) Identity Authentication Contract Preprocessing Subsystem
[0027] The system obtains the identity authentication contract to be processed in the blockchain in real time through the network interface. It then performs lexical and syntactic analysis on the instructions of the identity authentication contract, generates the intermediate code and the instruction set for generating the control flow graph (CFG), divides the instruction set into basic blocks, identifies and marks the instructions containing computationally intensive operators such as SM2, SM3, and SM4 in the basic blocks, and generates task description information corresponding to the basic blocks. The task description information is stored in the preprocessing buffer pool for subsequent WASM virtual machine calls.
[0028] (2) WASM (WebAssembly) virtual machine execution subsystem
[0029] A multi-threaded WASM instance manager is configured in the main process, where each thread runs an independent WASM instance. The multi-threaded WASM instance manager generates a task scheduling sequence based on the received task descriptions. It evenly divides the basic blocks in the task scheduling sequence into task slices based on the total number of WASM instances and dispatches them to each WASM instance. Each WASM instance then receives a task slice and parses its internal compute-intensive operator tags. Task slices that do not contain compute-intensive operator tags are executed directly within the WASM instance and the execution results are cached. Task slices that contain compute-intensive operator tags are placed into a collection of compute-intensive task slices. The collection of compute-intensive task slices is forwarded to the heterogeneous parallel acceleration subsystem by calling the heterogeneous acceleration interface, awaiting the results returned from the heterogeneous parallel acceleration subsystem. Each WASM instance has a built-in continuous memory module to ensure the physical continuity of task data in memory and improve cache hit rates. Finally, the results from each WASM instance are integrated to complete the identity authentication calculation and write the identity authentication results to the blockchain distributed ledger.
[0030] (3) Heterogeneous parallel acceleration subsystem
[0031] The heterogeneous parallel acceleration subsystem transfers the compute-intensive task slices forwarded from the WASM instance into the task buffer pool; the compute-intensive task slices are further divided into several subtasks, and the subtasks are assigned to the corresponding acceleration units through the mapping function Φ; the acceleration units include CCPs, DCUs and multi-core CPUs; after receiving the subtasks, the acceleration units perform parallel data processing based on the internal pipeline and parallel processing architecture; after the calculation is completed, the subtask results are written to the result buffer pool and returned to the calling WASM instance through the data exchange interface.
[0032] Specifically, the identity authentication contract preprocessing subsystem includes a parser module, a CFG construction and basic block partitioning module, a hotspot block detection and computational estimation module, and a task description generation and data packaging module;
[0033] Parser module: performs lexical and syntactic analysis on the bytecode of the identity authentication smart contract and extracts the instruction sequence {I}.
[0034] CFG construction and basic block division module: Use graph theory algorithm to construct control flow graph CFG and divide the instruction sequence into basic blocks {B1, B2, ..., B k ,…,B m}, and record the jump relationship between basic blocks.
[0035] Computational estimation module: statistics of each basic block B k Whether each instruction is a computationally intensive operator, and mark the computationally intensive operator.
[0036] Task description generation and data packaging module: Outputs the task description information of each basic block according to each basic block and the corresponding tag, including the basic block ID, computationally intensive operator tag and data storage address, providing a basis for subsequent allocation.
[0037] Specifically, the WASM virtual machine execution module has a multi-threaded WASM instance manager in the main process, which mainly includes:
[0038] Multi-thread pool manager: Dynamically allocates available WASM threads to the task dispatcher based on the number of identity authentication contracts currently being processed and system resources to ensure full utilization of resources.
[0039] Task dispatch module: According to the task description information output by the pre-processing module, each basic block B is evenly distributed. k Evenly distribute to n WASM threads to obtain n task shards; the distribution function is recorded as Γ: B k →{1, 2, …, j, …, n}, where j is the thread number and n is the total number of threads.
[0040] Local execution engine and continuous memory management module: Each WASM thread has a built-in parser to pre-arrange instructions for the assigned task slices, parse the compute-intensive operator tags of each instruction in the task slices, forward task slices containing compute-intensive operators through heterogeneous acceleration interfaces, and call local functions for non-compute-intensive task slices. It controls the storage of task data in the form of continuous arrays in memory, ensuring the order and data locality of basic blocks, thereby improving cache efficiency.
[0041] Native functions are functions provided by the WASM virtual machine's host environment, allowing WASM smart contracts to interact with external systems. These functions are not defined within the WASM module but are injected by the virtual machine runtime for contract calls. The Software Development Kit (SDK) provides developers with the tools to call these functions.
[0042] Heterogeneous acceleration interface: forwards task slices marked with compute-intensive operators.
[0043] Specifically, the heterogeneous parallel acceleration module is the core acceleration unit of this system, including:
[0044] Task buffer pool: stores compute-intensive task slices from each WASM instance; it is classified by task type, for example, by SM2, SM3, SM4, or other vector operators.
[0045] Acceleration unit allocator: further divides the task slice into subtasks, and calculates the amount of computation C(t) recorded in the subtask and the preset threshold C th1 、C th2 , the mapping function Φ is called to select the acceleration unit, and the mapping result determines whether the subtask will be dispatched to CCP, DCU or multi-core CPU.
[0046] Acceleration unit:
[0047] (1) Cryptographic Coprocessor CCP
[0048] The CCP is integrated into the CPU's internal bus and primarily provides hardware-level acceleration for the SM2, SM3, and SM4 algorithms. Its design uses a customized instruction set to implement pipelined parallel computing for specific cryptographic algorithms.
[0049] For subtasks with low computational load, the degree of parallelism is recorded as P CCP ;
[0050] Its acceleration function satisfies:
[0051] S CCP =f CCP (V, P CCP ),
[0052] Where V represents the data vector to be processed, P CCP is the number of internal parallel processing units, and the actual speedup ratio increases approximately linearly.
[0053] (2) Depth Computing Unit (DCU)
[0054] The DCU is based on a GPGPU architecture and uses the Heterogeneous Computing Portable Interface (HIP) driver to connect to the host system via the PCIe bus. In addition to supporting SM2 signature verification and SM3 hashing, it also supports parallel computing of other vector operators. Its internal multi-core and multi-threaded architecture can simultaneously schedule thousands of parallel computing threads.
[0055] For medium and large computational quantum tasks, the degree of parallelism is denoted as d;
[0056] Its parallel computing capabilities are:
[0057] S DCU =α·d
[0058] Where d is the number of available GPU stream processing cores, reflecting the degree of parallelism, and α is the average computing efficiency per core. Through dynamic load balancing, DCU can achieve efficient processing of large-scale computing tasks.
[0059] (3)CPU
[0060] CPU computing engine: For subtasks with large computational complexity or spare computing resources, multi-core CPUs perform parallel computing. The degree of parallelism is denoted as p, and the computing speed is denoted as S. CPU .
[0061] Result buffer pool: stores the sub-results processed by each acceleration unit and returns them to the calling WASM thread through the data exchange interface.
[0062] 2. Multi-level parallel collaborative algorithm
[0063] The implementation is mainly divided into three key steps, each of which is based on mathematical models to ensure the accuracy and efficiency of task decomposition, allocation, parallel execution and result integration.
[0064] 1. Task decomposition and labeling
[0065] (1) Preliminary task decomposition:
[0066] In the identity authentication contract preprocessing subsystem, the contract compilation result generates an instruction sequence I = {I}. Using the basic block partitioning algorithm, the basic block set is determined according to the control flow jump point and the instruction sequence is divided into a basic block set B = {B1, B2, ..., B k ,...,B m};
[0067] (2) Computationally intensive marking:
[0068] In the identity authentication contract preprocessing subsystem, for each basic block B kFor each instruction I in its task slice, the function χ is used to determine whether the instruction is a computationally intensive operator. When X(I)=1, the instruction I is marked as a computationally intensive operator, otherwise, it is a non-computationally intensive operator.
[0069] (3) Task Slicing
[0070] In the WASM virtual execution subsystem, basic block B k Task slice B in the jth thread k,j Contains a set of instructions s k Represents task shard B k,j The first instruction in the instruction sequence, e k Represents task shard B k,j The serial number of the last instruction in the instruction sequence, s k +l indicates task shard B k,j The number of the l+1th instruction in the instruction sequence; variable l=0,...,(e k -s k );
[0071] when This instruction will be included Task shard B k,j Put in the computation-intensive block set A, and then define the computation-intensive block set A:
[0072]
[0073] (4) Subtask Division
[0074] In the heterogeneous parallel acceleration subsystem, each task slice B k,j The computational cost C is:
[0075]
[0076] Where c is the computational estimation function of a single instruction; according to the preset subtask maximum threshold C max , B k,j Split into l k,j computationally intensive subtasks The rth computationally intensive subtask is denoted as satisfy:
[0077]
[0078] 2. Tasks are assigned to a multi-level structure
[0079] 2.1 Three-layer structure division:
[0080] Layer 1 (L1): Identity authentication contract preprocessing layer. This layer uses multi-threaded preprocessing to obtain the identity authentication smart contract as the total task T. After preprocessing, T is decomposed into m basic tasks corresponding to the basic items. Where m is the number of basic blocks generated by preprocessing, U is the union, and the task corresponding to each basic block Can be executed in parallel in subsequent levels, (1) Indicates the first layer decomposition; theoretically, the parallelism of this layer can be expressed as N L1 =m.
[0081] Layer 2 (L2): WASM virtual machine execution layer. This layer is responsible for dispatching the basic blocks generated by preprocessing to multiple WASM threads for parallel execution. At the same time, the non-computationally intensive basic blocks are processed by traditional CPUs in the local WASM instance, and the computationally intensive basic blocks are forwarded to the next layer. Let the number of parallel instances within the virtual machine be n, (2) Indicates the second-level decomposition, then theoretically the parallelism of this layer can be expressed as N L2 =n.
[0082] Layer 3 (L3): Heterogeneous parallel acceleration layer. Basic blocks for computationally intensive operators such as SM2 signature verification and SM3 hashing are executed simultaneously by heterogeneous acceleration units. Assume that in this layer, the number of parallel units provided by CCP is c, the number of parallel units provided by DCU is d, and the number of CPU standby parallel units is p. (3) Indicates the decomposition of the third layer, then the total parallelism of this layer is N L3 =c+d+p.
[0083] The theoretical total parallelism of the overall system can be approximately expressed as:
[0084] N total =N L1 ×N L2 ×N L3 ,
[0085] where N L1 is the number of task blocks that can be executed independently and in parallel in the preprocessing layer, N L2 N is the number of threads inside the WASM virtual machine. L3 is the total number of parallel units in the heterogeneous acceleration layer.
[0086] 2.2 Task Assignment
[0087] (1) First-level allocation: Divide all the instruction sets {I} of the identity authentication task into m basic blocks, and divide the basic block set B = {B1, ..., B k ,...,B m}As a collection of independent tasks and sorted according to preset rules to form a task queue (1) Indicates the first level of division;
[0088] (2) Layer 2 allocation: Queue T (1) Medium basic block B k Evenly distribute to n WASM virtual machine threads, and record the distribution function as Γ:T (1) →{1, 2, ..., n}, that is, Γ: {B1, ..., B k ,...,B m}→{1, 2, ..., j, ..., n},. Each thread j executes task slice B k,j gather
[0089] (3) Level 3 allocation: In thread j, the computationally intensive block set A(B k,j ) in task shard B k,j Divided into l k,j A collection of subtasks Use mapping function Φ to transform each task Dispatched to the corresponding acceleration unit, satisfying Among them C th1 with C th2 is the preset computational threshold.
[0090] According to the output of Φ, the computationally intensive subtask will be placed in the task buffer of the corresponding acceleration unit and wait for processing.
[0091] 3. Parallel execution and result integration
[0092] To accurately and quantitatively describe the parallel synergy effect of each layer, the total computing task in the identity authentication smart contract is T, and the task subsets at each layer after decomposition are:
[0093] and
[0094] in Task shard B for the kth basic block on the jth thread of the WASM virtual machine k,j In each task shard In the above example, there is a set of computationally intensive operator tasks. This set will be further dispatched to the parallel units of the heterogeneous acceleration layer for processing, and its mapping function is recorded as:
[0095]
[0096] For each subtask Assuming the computational effort is C(t), the execution time on the corresponding acceleration unit can be estimated as
[0097]
[0098] Among them S Φ(t) The calculation speed of the allocated acceleration unit.
[0099] (1) Accelerated execution model:
[0100] For each computationally intensive subtask t assigned to an acceleration unit U∈{CCP, DCU, CPU}, its execution time T exec for:
[0101]
[0102] Among them S U is the average computing speed of the acceleration unit U.
[0103] (2) Inter-layer coordination time:
[0104] The overall execution time is subject to the slowest WASM thread, and the total time for virtual machine authentication processing is T total for:
[0105]
[0106] Among them, B j is the set of basic blocks allocated to the jth WASM thread, T local ((B k,j ) is task shard B k Non-accelerated execution time, T comm T is the data transmission and result integration time, L1 is the cumulative time consumed by the preprocessing layer and the WASM virtual machine layer, T L2 The cumulative time consumed by the WASM virtual machine layer.
[0107] (3) Results integration:
[0108] After obtaining the result returned by the acceleration unit, each WASM thread merges it according to the predefined integration function Ψ to form a basic block B k Final execution result R(B k ):
[0109]
[0110] The integration function Ψ can be simply an addition, or a weighted summation based on the task dependencies. R represents the execution result. Indicates B k The set of all computationally intensive operator tasks Each subtask The execution result, R local (B k ) represents basic block Bk All task shards B k,j Execute the results locally, that is, the results of the non-accelerated part.
[0111] Finally, the system outputs the authentication execution result
[0112] The above gives a complete mathematical model of task decomposition, parallel allocation, accelerated execution and result integration, and can continuously calibrate each threshold C through actual testing of hardware parameters. th1 、C th2 And the speed S of each acceleration unit Φ(t) , thereby achieving the optimal multi-level parallelization synergy effect.
[0113] 4. Performance evaluation and optimization parameters
[0114] Based on the above mathematical model, the system acceleration ratio S can be defined as:
[0115]
[0116] Where T serial is the serial execution time of all tasks. By fitting the experimental data, the parallelism N of each layer can be obtained. L1 、N L2 、N L3 The actual value of N L1 The number of basic blocks generated for preprocessing, N L2 N is the number of WASM virtual machine threads. L3 is the total number of parallel units of CCP, DCU and CPU acceleration unit in the heterogeneous acceleration subsystem, so according to the total parallelism N total =N L1 ×N L2 ×N L3 And the proportion of parallel accelerable tasks ρ, we can get the approximate system speedup ratio S:
[0117]
[0118] When ρ is large and the parallelism of each layer is sufficient, the overall speedup ratio will be close to N total Continuously adjust the threshold C in the mapping function Φ th1 、C th2 and task decomposition strategies within each module to achieve optimal overall system performance.
[0119] 5. Summary
[0120] This invention decomposes the identity authentication task in smart contracts into three levels: pre-processing, WASM execution, and heterogeneous acceleration, and establishes a mathematical task allocation and coordination model to achieve efficient parallel processing of the entire system. The key lies in:
[0121] (1) Multi-level task decomposition and model building: By dividing the basic blocks of the smart contract instruction sequence, detecting hot spots, and marking computationally intensive tasks, a hierarchical task decomposition model from the preprocessing layer to the acceleration layer is constructed, and mapping functions are used to achieve efficient distribution of tasks between different layers.
[0122] (2) Collaborative computing of heterogeneous acceleration units: Dedicated CCPs are used to accelerate cryptographic algorithms such as SM2, SM3, and SM4, while DCUs are used to parallelize large-scale vector operations. Furthermore, with the addition of CPU backup computing, a high-parallelism, low-latency computing acceleration system is formed.
[0123] (3) Parallel algorithm description and performance evaluation: By introducing the parallelism calculation formula, acceleration ratio evaluation model and task allocation mapping, the overall parallel execution performance of the system is accurately described, providing a theoretical basis for system parameter tuning.
[0124] (4) Security and scalability of certificateless authentication mode: By automatically executing the authentication logic through smart contracts and combining the blockchain distributed ledger to record the authentication data, it not only avoids the security risks of centralized CA, but also greatly improves the response speed and reliability of the system in high-concurrency scenarios.
[0125] 3. Implementation of Certificateless Identity Authentication
[0126] Based on the above multi-level parallel system, the embodiment adopts a certificate-free mode in the identity authentication process, no longer relying on traditional CA institutions, but using the blockchain distributed ledger to record the relevant data of each identity authentication. The specific steps are:
[0127] (1) The client generates an authentication request, which includes the necessary identity information and signature data;
[0128] (2) The pre-compiled authentication logic in the smart contract is executed through the above multi-level parallelization, decomposing the operations such as SM2 signature verification, SM3 hashing, and SM4 encryption into computationally intensive subtasks t and dispatching them to CCP and DCU for parallel execution;
[0129] (3) After efficient calculation of Φ(t) by each acceleration unit, the system writes the authentication result into the distributed ledger through the blockchain to achieve decentralized identity authentication.
[0130] In the model, the authentication process can be regarded as a balanced distribution of multiple groups of parallel tasks to L WASM threads for parallel processing. The task in the WASM thread is parsed into subtasks t for acceleration, and the overall execution time of the system is T auth Limited by the slowest branch, theoretically:
[0131]
[0132] Among them, C(t) is the computational cost of subtask t, S Φ(t) is the speedup ratio of the acceleration unit Φ(t) executing subtask t, T comm This is the data transmission and result integration time. After optimization, this value can be reduced to the microsecond level, ensuring that the overall authentication response time meets high concurrency requirements.
[0133] 4. Implementation and Expansion
[0134] The above solution is not only applicable to blockchain identity authentication systems but can also be extended to other scenarios requiring large-scale parallel acceleration, such as financial transaction processing, IoT data authentication, and supply chain management. In a preferred implementation, the number of WASM virtual machine threads, the acceleration unit task allocation rules, and the threshold setting of the mapping function Φ can be adjusted according to actual application requirements, thereby achieving flexible deployment of cross-platform, high-concurrency, and large-scale identity authentication tasks.
[0135] In addition, the present invention can also be combined with other security mechanisms such as zero-knowledge proof and distributed key management to further improve the certificateless identity authentication system and realize an end-to-end high-security and high-performance parallel computing platform.
Claims
1. Multi-level parallel certificateless identity authentication smart contract virtual machine, characterized by: include: Identity authentication contract preprocessing subsystem: Obtain the identity authentication contract to be processed in the blockchain in real time through the network interface, then parse the identity authentication contract to obtain the instruction set for generating the control flow graph, divide the instruction set into basic blocks, identify the instructions of the intensive operators in the basic blocks and mark them; WASM virtual machine execution subsystem: A multi-threaded WASM instance manager is configured in the main process to evenly divide each basic block into task slices and assign them to each thread. The WASM instance on each thread receives the task slices, parses the compute-intensive operator tags within the task slices, executes the task slices that do not contain compute-intensive operator tags directly within the WASM instance, and caches the execution results. Task slices that contain compute-intensive operator tags are placed in the compute-intensive task slice set. By calling the heterogeneous acceleration interface, the computing-intensive task slice set is forwarded to the heterogeneous parallel acceleration subsystem, and the execution result returned by the heterogeneous parallel acceleration subsystem is received. Finally, the execution results of each WASM instance are integrated to complete the identity authentication, and the identity authentication results are written into the blockchain distributed ledger; Heterogeneous parallel acceleration subsystem: Transfer the computationally intensive task shards forwarded by the WASM instance into the task buffer pool; The computationally intensive task slice is further divided into several subtasks, and the subtasks are assigned to the corresponding acceleration units through the mapping function; The acceleration units include a cryptographic coprocessor (CCP) and a deep computing unit (DCU). After receiving a subtask, each acceleration unit performs parallel data processing based on the internal pipeline and parallel processing architecture. After the calculation is completed, the subtask execution result is written into the result buffer pool and the execution result is returned to the calling WASM instance through the data exchange interface.
2. The multi-level parallel certificateless identity authentication smart contract virtual machine according to claim 1, characterized in that: The acceleration unit also includes a multi-core CPU.
3. The multi-level parallel certificateless identity authentication smart contract virtual machine according to claim 1, wherein the mapping function Φ is specifically expressed as: in, is the kth basic block B k Task slice B assigned to the j-th thread k,j The rth subtask divided; C th1 is the preset low computation threshold, C th2 is the preset large computation threshold.
4. The multi-level parallel certificateless identity authentication smart contract virtual machine according to claim 3 is characterized in that the specific method of further dividing the computationally intensive task into a plurality of subtasks is as follows: Calculate each task slice B k,j The amount of calculation C(B k,j )for: in, c is a single instruction The computational estimation function of task shard B k,j Contains a set of instructions s k Represents task shard B k,j The first instruction in the instruction sequence, e k Represents task shard B k,j The serial number of the last instruction in the instruction sequence, s k +l indicates task shard B k,j The number of the l+1th instruction in the instruction sequence; variable l=0,...,(e k -s k ); According to the preset subtask maximum threshold C max , B k,j Split into l k,j Subtasks satisfy 5. The multi-level parallel certificateless identity authentication smart contract virtual machine according to claim 3 is characterized in that after each WASM thread in the WASM virtual machine execution subsystem obtains the execution result returned by the acceleration unit, it is merged according to the predefined integration function Ψ to form a basic block B k Final execution result R(B k ): R represents the execution result, Represents a subtask The execution result, R local (B k ) represents basic block B k The local execution results of the task slices that do not contain the computationally intensive operator mark, that is, the execution results of the non-accelerated part; Final identity authentication execution result B is the set of all basic blocks B obtained by dividing the authentication instruction set.
6. The multi-level parallel certificateless identity authentication smart contract virtual machine as described in claim 5 is characterized in that the integration function Ψ is addition, or a weighted sum based on subtask dependencies.
7. The multi-level parallel certificateless identity authentication smart contract virtual machine according to claim 4, wherein the total time for the virtual machine to perform identity authentication processing is T total for: in, B j is the set of basic blocks allocated to the jth WASM thread, T local ((B k,j ) is task shard B k Non-accelerated execution time, T comm T is the data transmission and result integration time, L1 is the cumulative time consumed by the preprocessing layer and the WASM virtual machine layer, T L2 The cumulative time consumed by the WASM virtual machine layer; Among them, T exec For subtasks In the assigned acceleration unit The execution time of For the acceleration unit calculation speed.