Construction method of delegated proof of stake consensus mechanism based on support vector machine

CN117278266BActive Publication Date: 2026-10-16YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311190274.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2026-10-16
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

但DPoS仍然存在一些不足之处,首先由于没有快速剔除恶意节点,加长了投票周期,时间效率变低;其次,恶意节点可能会通过合谋等方式破坏整个系统,影响系统安全性

Benefits of technology

[0051] This invention overcomes the shortcomings of existing delegated proof-of-stake consensus mechanisms in that they cannot promptly eliminate malicious nodes. It provides a delegated proof-of-stake consensus mechanism based on support vector machines, which quickly identifies and promptly eliminates malicious nodes that engage in malicious behavior during the consensus process through the support vector machine algorithm, thereby improving the security of the delegated proof-of-stake consensus mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117278266B_ABST
    Figure CN117278266B_ABST
Patent Text Reader

Abstract

The application provides a kind of construction method of proof of stake consensus mechanism based on support vector machine;Including step one, user initiates voting;Step two, divide candidate nodes;Step three, screening validator node;Step four, construct and train support vector machine model;Step five, eliminate malicious node;Step six, the block of validator node is out.This method of the application proposes consensus mechanism, the node that exists in consensus process and commits malpractice is quickly identified by support vector machine algorithm and timely eliminates malicious node, improves the security of proof of stake consensus mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of blockchain technology, and in particular relates to a method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines. Background Technology

[0002] As one of the core technologies of blockchain, consensus algorithms have significant advantages. One of these advantages is their ability to effectively achieve consensus among nodes on the validity of block data in decentralized systems, especially when decision-making power is highly decentralized, yet still achieve efficient consensus. Based on the permissions and control scope of participants, blockchains can be divided into public blockchains, consortium blockchains, and private blockchains. Currently, the mainstream consensus algorithms for public blockchains are Proof-of-Work (PoW), Proof-of-Stake (PoS), and Delegated Proof-of-Stake (DPoS).

[0003] Proof-of-Work (PoW) uses hash power to compete for the right to record transactions, but this can easily lead to wasted electricity and concentrated computing power. Proof-of-Stake (PoS) solves the problem of PoW's high computing power consumption, but the accumulation of stake can lead to excessive wealth disparity among nodes. Delegated Proof-of-Stake (DPoS), on the other hand, is similar to a joint-stock company, where voting is based on the shares held by shareholders, and the nodes with the most votes become witness nodes and take turns recording transactions. Compared to PoW and PoS, DPoS significantly reduces the number of nodes involved in verification and recording, thus improving transaction processing speed and throughput. However, DPoS still has some shortcomings. First, the lack of rapid removal of malicious nodes lengthens the voting cycle, reducing time efficiency. Second, malicious nodes may collude to disrupt the entire system, affecting system security. Finally, if nodes gain more benefits by controlling voting rights, it will affect the balance among nodes. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines, so as to improve the system's security, stability and efficiency.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by this invention is a method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines, comprising the following steps:

[0006] S1. Users initiate a vote;

[0007] S2, Divide candidate nodes;

[0008] S3, Filter verifier nodes;

[0009] S4. Construct and train the support vector machine model;

[0010] S5. Remove malicious nodes;

[0011] S6, the validator node produces a block.

[0012] Furthermore, S4 specifically includes the following steps:

[0013] S41. Divide the hyperplane;

[0014] S42. Determine the maximum classification margin;

[0015] S43. Obtain the optimal nonlinear classification function;

[0016] S44. Train and evaluate the support vector machine model.

[0017] Furthermore, S41 specifically involves: first, representing the sample set D as D = {(x i y i ), i = 1, 2, ..., m; y i = (-1, +1)}, where x i Let y represent the i-th input sample. i Let m represent the class value corresponding to the i-th input sample, and m be the number of samples; the separating hyperplane (ω, b) is:

[0018] (ω, b) = ω T x+b

[0019] Among them, ω=(ω1,ω2,...,ω m ) is the normal vector, ω T Let ω be the transpose of ω; b is the displacement term; x is the input sample point; the distance γ from the sample point to the hyperplane is:

[0020]

[0021] The distance γ from each point in the sample set to the hyperplane i Greater than or equal to the distance from the support vector x0 to the hyperplane

[0022]

[0023] Furthermore, S42 specifically includes:

[0024] Let ω T x+b=c, c∈R, where ω=(ω1,ω2,...,ω m Let (ω, b) be the normal vector, b be the displacement term, and c be an intermediate parameter, where c ≠ 0; perform a scaling transformation on (ω, b) such that |ω Tx+b|=1; Transform the inequality in S41 as:

[0025]

[0026] The margin between two different support vectors is defined as follows: Introducing a nonnegative relaxation factor ξ i Transform the classification hyperplane into y i (ω T x i +b)≥1-ξ i The reciprocal of the maximum classification interval is: Among them, the support vector machine penalty factor C > 0 transforms the linearly inseparable support vector machine into:

[0027]

[0028] Wherein, the objective function is The constraint is y i (ω T x i +b)≥1-ξ i i = 1, 2, ..., m, ξ i ≥0, i=1,2,...,m, where x i Let y represent the i-th input sample. i This represents the category value corresponding to the i-th input sample.

[0029] Furthermore, S43 specifically involves: firstly, establishing a high-dimensional linear classification model based on the Lagrange function:

[0030]

[0031] Where L(w, b, ξ, α, γ) is the Lagrange function; α i γ i Let α be the Lagrange multiplier for the i-th input sample. * If the solution is the optimal Lagrange multiplier solution of the high-dimensional linear classification model, then... Calculate the optimal weight vector ω based on the optimal Lagrange multiplier solution. * and optimal bias b * The formula is as follows:

[0032]

[0033]

[0034] in It is a kernel function used to calculate the inner product between support vectors, and to calculate the optimal weight vector ω. * and optimal bias b *Substitute into the plane f(x)=ω T x+b yields the optimal classification hyperplane (ω). * ·x)+b * =0, determining the support vector machine classification model f(x):

[0035]

[0036] The kernel function maps the input vector x from the original space to a higher-dimensional space:

[0037]

[0038] Kernel function Using a linear kernel function, f(x) is transformed into:

[0039]

[0040] in, It is an over-order function; It is a linear kernel function; the final output value of f(x) is +1 or -1. If the output value is +1, it indicates that there is malicious behavior and the malicious node needs to be removed; if the output value is -1, it belongs to a normal node, thus determining the type of x.

[0041] Furthermore, S44 specifically includes:

[0042] S441. First, data preparation is performed. Data is selected from the XBlock-EOS historical transaction dataset of commercial distributed blockchain. The strings are converted to integers, and five features are selected as evaluation indicators for node malicious behavior: whether the node is active, whether the node produces uncle blocks, whether the node has forked, whether the node provides invalid blocks, and the total number of blocks produced in this period. Then, the data is split to obtain: training set features x_train, training set labels x_test, test set features y_train, and test set labels y_test. The support vector machine model is initialized, and the model is trained using the training set. After finding the best splitting hyperplane based on the training data, the training is completed.

[0043] S442. Evaluate the model: Calculate the accuracy on the training set and the test set respectively; after completing the training and evaluation of the model, mark malicious nodes according to the output results of the model; apply the model to new unknown nodes and classify and predict them.

[0044] Furthermore, S5 specifically involves calling a cycle switching code block before packaging each block in the source code to check if the current block is the first block of the new cycle. If it is the first block, a new round of election is triggered; otherwise, the kickoutValidator code block is called to monitor and detect malicious behavior based on the trained support vector machine model, and the nodes that need to be removed are added to the needKickoutValidators list. Finally, it is ensured that the number of witness nodes is greater than the safe number before calling the DposContext.KickoutCandidate code block to remove the nodes.

[0045] Furthermore, S6 specifically includes:

[0046] S61. The validator node signs the prepared block using its own private key;

[0047] S62. Broadcast the signed block to the entire network;

[0048] S63. Other nodes receive the blocks broadcast by the validator nodes and perform consensus confirmation.

[0049] S64. When the number of formula confirmations obtained by a validator node reaches the threshold, the node is added to the blockchain and becomes the latest block.

[0050] The beneficial effects of this invention are:

[0051] This invention overcomes the shortcomings of existing delegated proof-of-stake consensus mechanisms in that they cannot promptly eliminate malicious nodes. It provides a delegated proof-of-stake consensus mechanism based on support vector machines, which quickly identifies and promptly eliminates malicious nodes that engage in malicious behavior during the consensus process through the support vector machine algorithm, thereby improving the security of the delegated proof-of-stake consensus mechanism. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a flowchart illustrating a specific implementation of the delegated proof-of-stake consensus mechanism based on support vector machines according to the present invention.

[0054] Figure 2 This is a comparison chart of the block generation time of the method in this embodiment and the prior art. Detailed Implementation

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] Example 1

[0057] This embodiment provides a method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines (SVMs). The delegated proof-of-stake mechanism mainly includes two steps: the election process of consensus nodes and the consensus-reaching process among nodes. During the consensus-reaching process, a trained SVM model is used to determine whether a node is acting maliciously, and nodes exhibiting malicious behavior are marked and subsequently removed. The delegated proof-of-stake consensus mechanism constructed in this embodiment quickly identifies and removes malicious nodes exhibiting malicious behavior during the consensus process using the SVM algorithm, thereby improving the security of the delegated proof-of-stake consensus mechanism. See also... Figure 1 The consensus mechanism construction method provided in this embodiment specifically includes:

[0058] S101, User initiates a vote;

[0059] In the delegated proof-of-stake consensus mechanism, user-initiated voting is an important stage used to select validator nodes (also known as supernodes), thereby influencing and determining the network's governance methods, including key aspects such as decision-making, rule-making, and resource allocation.

[0060] S102, Identify candidate nodes;

[0061] In this embodiment, there are 101 candidate representative nodes for the user to choose from; these candidate nodes may participate voluntarily or be nominated as candidate nodes through some mechanism (e.g., self-nomination). The user can select the node they wish to support from the list of candidate nodes.

[0062] In the delegated proof-of-stake consensus mechanism provided in this embodiment, users can delegate their stake to candidate nodes, meaning they authorize the node to participate in the network's consensus process and decision-making on their behalf. The amount of stake delegated typically determines the candidate node's weight and its chances of winning the election. Users can choose the node to delegate to based on their judgment and trust, and can change their delegation at any time.

[0063] S103, Filter the verifier node;

[0064] Once users delegate their stake, they can vote during a specific election cycle to select candidate nodes they trust. Voting may involve electing one or more representative nodes, depending on the network's rules and settings. Users can evaluate candidate nodes based on factors such as their contributions, reputation, technical capabilities, and governance vision, and vote for the node they deem most suitable.

[0065] After the voting period ends, the system counts the votes received. Based on the voting results, the top 21 candidate nodes with the highest stake become validator nodes, responsible for the network's consensus process and transaction verification. Since the number of supernodes depends on the network's settings, the number of supernodes is usually fixed; vote counts and election results are typically verified and confirmed through consensus rules on the blockchain network.

[0066] S104, Divide the hyperplane

[0067] First, the sample set D is represented as D = {(x i y i ), i = 1, 2, ..., m; y i = (-1, +1)}, where x i Let y represent the i-th input sample. i Let represent the category value corresponding to the i-th input sample, and m be the number of samples. The Support Vector Machine (SVM) model is based on the training sample set D, which solves for the separating hyperplane that correctly classifies the training sample set and has the largest geometric margin, thereby achieving the classification purpose. The separating hyperplane is then:

[0068] (ω, b) = ω T x+b

[0069] Let this hyperplane be labeled (ω, b). Then, in (ω, b), ω = (ω1, ω2, ..., ωb). m ) is the normal vector, ω T Let ω be the transpose of ω, which determines the direction of the hyperplane; b is the displacement term, which determines the distance between the hyperplane and the source point; and x is the input sample point. Then the distance γ from the sample point to the hyperplane is:

[0070]

[0071] When the hyperplane (ω, b) can correctly classify the sample points, the distance γ from each point in the sample set to the hyperplane is... i All are greater than or equal to the distance from the support vector x0 to the hyperplane. but

[0072]

[0073] S105. Determine the maximum classification interval;

[0074] Let ω T x+b=c, c∈R, where ω=(ω1,ω2,...,ω m Let (ω, b) be the normal vector, b be the displacement term, and c be a constant. Since the support vectors are not on the separating hyperplane, c ≠ 0; therefore, a scaling transformation is performed on (ω, b) such that |ω| = 0. T x + b| = 1. Then the transformed inequality is:

[0075]

[0076] The final margin between two different support vectors is represented as follows: In practical engineering applications, samples are often not linearly separable in high-dimensional space. Therefore, this embodiment introduces slack variables into the samples to obtain new constraints. This is achieved by introducing a non-negative slack factor ξ. i Let i = 1, 2, ..., m, to allow for the existence of misclassified samples. Then the classification hyperplane becomes y i (ω T x i +b)≥1-ξ i , i = 1, 2, ..., m; ξ i ≥0; at this point, the reciprocal of the maximum classification margin is Where C > 0, is the support vector machine penalty factor. Thus, the linearly inseparable support vector machine becomes the following convex quadratic programming problem.

[0077]

[0078] Where the objective function is The constraint is y i (ω T x i +b)≥1-ξ i i = 1, 2, ..., m, ξ i ≥0, i=1,2,...,m.

[0079] S106: Obtain the optimal nonlinear classification function;

[0080] After constructing the optimal classification hyperplane in the feature space, the Support Vector Machine (SVM) transforms the input vectors into a linear classification problem in a high-dimensional feature space by using an appropriate kernel function and the inner product operation of the feature vectors, thus avoiding complex high-dimensional computations. The optimal classification hyperplane is then solved within this space. To solve the aforementioned convex quadratic programming problem, a Lagrangian function L(w, b, ξ, α, γ) is introduced.

[0081]

[0082] Where αi γ i Let x be the Lagrange multiplier for the i-th input sample. i Let y represent the i-th input sample. i α represents the category value corresponding to the i-th input sample. i ≥0, γ i ≥0 indicates a non-negative Lagrange multiplier. The optimal solution is determined by the saddle point of the Lagrange function, yielding the optimal solution as follows: Then calculate the optimal weight vector ω * and optimal bias b * They are respectively: in y is the optimal Lagrange multiplier obtained by solving the dual problem. i It is the training sample x i Category label (+1 or -1), x i It is the feature vector of the training sample; It is a kernel function used to calculate the inner product between support vectors. The hyperplane is known to be f(x) = ω. T x+b, substitute into the optimal weight vector ω * and optimal bias b * Obtain the optimal classification hyperplane (ω) * ·x)+b * =0, thus obtaining the SVM classification function:

[0083]

[0084] Among them are Kernel function Mapping the input vector x of f(x) from the original space to the high-dimensional space H, we have:

[0085]

[0086] Kernel function Using a linear kernel function The optimal nonlinear classification function f(x) is then obtained as follows:

[0087]

[0088] The kernel function used is a linear kernel function, i.e. Used to calculate the inner product between support vectors, where sgn(·) is the order-shifting function, x i Let y represent the i-th input sample. i α represents the category value corresponding to the i-th input sample. i Let f(x) be the Lagrange multiplier for sample i. The final classification function f(x) outputs either +1 or -1, determining which class x belongs to.

[0089] S107, Train the support vector machine model;

[0090] First, data preparation was performed. Data was selected from the XBlock-EOS historical transaction dataset of the EOS project. Strings were converted to integers, and five features were selected as evaluation indicators for malicious behavior: node activity, whether a node produced uncle blocks, whether a node forked, whether a node provided invalid blocks, and the total number of blocks produced in the current period. Then, the data was split into x_train, x_test, y_train, and y_test, representing the training set features, training set labels, test set features, and test set labels, respectively, used for training data and evaluating model performance.

[0091] The SVM classifier is initialized, and the optimal separating hyperplane is found based on the training data to separate data of different categories. The model is trained using a training set, with the goal of finding an optimal separating hyperplane to maximize the margin in the dataset and minimize classification error. When applying Support Vector Machines to malicious node identification, since malicious node identification is a linearly inseparable binary classification problem, this embodiment selects a linear kernel function to construct a nonlinear Support Vector Machine. After determining the kernel function used by the classifier, the important parameters in the objective function of the Support Vector Machine are searched using training samples to find the optimal result. The purpose of parameter optimization is to enable the classifier to accurately classify unknown samples. This paper mainly uses a linear kernel function as the kernel function. Therefore, the parameter that needs to be optimized is the penalty factor C. If C is infinite, the soft-margin classifier will degenerate into a basic hard-margin classifier, meaning that no sample can be misclassified. A large value of C will increase the computational cost of the optimization problem; therefore, under the condition of satisfying classification accuracy, a small value of C should be selected to construct the classifier.

[0092] Finally, the model was evaluated by calculating the accuracy on both the training and test sets. The training set accuracy (training prediction) was 0.971, and the test set accuracy (test data prediction) was 0.985. The `predict()` function was used to predict the class of the `x_train` samples, returning the training set accuracy (training data accuracy) and the test set accuracy (testing data accuracy) as 0.985. After building and evaluating the model, malicious nodes can be labeled based on its output. This model can then be applied to new, unknown nodes for classification and prediction.

[0093] S108, Remove malicious nodes;

[0094] Based on a trained support vector machine (SVM) model to monitor and detect malicious behavior, a code block attempting to switch cycles is called before packaging each block in the source code. This checks if the current block is the first block of the new cycle; if so, a new round of election is triggered. If not, the `kickoutValidator()` code block is called. Based on the trained SVM model, malicious behavior is monitored and detected. If nodes needing removal are found, they are added to the `needKickoutValidators` list. At the end, if the `needKickoutValidators` list is not zero, the number of validator nodes is first ensured to be greater than the safe limit before calling the `DposContext.KickoutCandidate()` code block to remove nodes. The election process mainly accomplishes three things: removing validator nodes exhibiting malicious behavior based on the SVM model's detection results; selecting the 21 candidates with the highest votes as validators up to the last block's production; and shuffling the validator block production order; and ensuring the secure and stable operation of the network.

[0095] S109, The validator node produces a block;

[0096] According to the established rotation mechanism, each selected validator node takes turns serving as a block-producing validator in a specific order. Typically, the time period for each validator node to serve is called a round. When it's a validator's turn to produce a block, they prepare the necessary data, including creating a new block, adding transactions, and calculating the block's hash value. The validator node signs the prepared block using its private key, ensuring the block's integrity and authenticity. The signed block is then broadcast throughout the network so that other nodes can receive it. Upon receiving the block broadcast by the validator node, other nodes perform consensus confirmation. They verify the block's signature and content to ensure its validity and compliance. Once a validator node's block receives sufficient consensus confirmation, it is added to the blockchain, becoming the latest block. At this point, the validator has completed its block-producing task. Over time, the rotation continues, with different candidate validators taking turns serving as block producers. This ensures the decentralization and fairness of the proof-of-stake mechanism.

[0097] Example 2

[0098] To better illustrate the technical effects of this invention, specific examples were used to verify its experimental performance. During the simulation, 1600 nodes were simulated using the EOS historical transaction dataset. 70% of the data was used as the training set, and the remaining 30% was tested. The classification accuracy of the training set was 97.1%, and the classification accuracy of the test set reached 98.5%, with no overfitting. The results of the witness node malicious behavior assessment are shown in Table 1. It can be seen that the trained model can accurately determine whether a node has malicious behavior. Compared to the traditional DPoS consensus mechanism, the SVM-based malicious node identification model can quickly determine whether a node is malicious and promptly remove malicious nodes, greatly reducing the probability of malicious nodes among the consensus nodes.

[0099] Table 1. Assessment Results of Witness Node Misconduct

[0100]

[0101] Example 3

[0102] This embodiment simulates and compares the block generation times of two consensus algorithms, and the results are as follows: Figure 2 As shown, as the number of blocks increases from 0 to 2000, the advantage of the SVM-DPoS consensus algorithm over the traditional DPOS consensus algorithm in reducing block generation time becomes more pronounced. When the number of blocks increases to 2000, the block generation time of the SVM-DPOS consensus algorithm drops to 1 second, saving 60% of the time compared to the DPOS consensus algorithm under the same conditions, and can better cope with the increasing transaction volume.

[0103] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0104] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines, characterized in that, Includes the following steps: S1. Users initiate a vote; S2, Divide candidate nodes; S3, Filter verifier nodes; S4. Construct and train the support vector machine model; S5. Remove malicious nodes; S6, the validator node produces a block; S4 specifically includes the following steps: S41. Divide the hyperplane; S42. Determine the maximum classification margin; S43. Obtain the optimal nonlinear classification function; S44. Train and evaluate the support vector machine model; Specifically, S44 is: S441. First, data preparation is performed. Data is selected from the XBlock-EOS historical transaction dataset of commercial distributed blockchain. The strings are converted into integers, and five features are selected as evaluation indicators for node malicious behavior: whether the node is active, whether the node produces uncle blocks, whether the node has forked, whether the node provides invalid blocks, and the total number of blocks produced in this period. Then, the data is segmented to obtain: training set features, training set labels, test set features, and test set labels. The support vector machine model is initialized, and the model is trained using the training set. After finding the best splitting hyperplane based on the training data, the training is completed. S442. Evaluate the model: Calculate the accuracy on the training set and the test set respectively; after completing the training and evaluation of the model, mark malicious nodes according to the output results of the model; apply the model to new unknown nodes, classify and predict them; Specifically, S5 involves calling a cycle switching code block before packaging each block in the source code. This checks if the current block is the first block of the new cycle. If it is, a new round of election is triggered. If it is not, the kickoutValidator code block is called. Based on the trained support vector machine model, malicious behavior is monitored and detected. Nodes that need to be removed are added to the needKickoutValidators list. Finally, the witness nodes are ensured to be greater than the safe number before the DposContext.KickoutCandidate code block is called to remove nodes.

2. The method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines according to claim 1, characterized in that, Specifically, S41 involves: first, configuring the sample set... Represented as ,in Representing the One input sample, Representing the The category values ​​corresponding to each input sample Given the sample size; divide the hyperplane for: in, It is the normal vector. for Transpose of; For displacement terms, Input sample points; distance from the sample points to the hyperplane for: Distance from each point in the sample set to the hyperplane Greater than or equal to support vectors Distance to the hyperplane :

3. The method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines according to claim 2, characterized in that, Specifically, S42 is as follows: set up ,in It is the normal vector. For displacement terms, For intermediate parameters, ;right Perform a scaling transformation to make Transform the inequalities in S41 into: The margin between two different support vectors is defined as follows: Introducing a non-negative relaxation factor Transform the classification hyperplane into The reciprocal of the maximum classification interval is: Among them, the support vector machine penalty factor Transform the linearly inseparable support vector machine into: Wherein, the objective function is The constraint is y i (ω T x i +b)≥1-ξ i i = 1, 2, ..., m, ξ i ≥0, i=1,2,...,m, where Representing the One input sample, Representing the The category value corresponding to each input sample.

4. The method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines according to claim 3, characterized in that, Specifically, S43 involves: firstly establishing a high-dimensional linear classification model based on the Lagrange function. in; It is a Lagrange function; For the first Lagrange multipliers for each input sample If the solution is the optimal Lagrange multiplier solution of the high-dimensional linear classification model, then... Calculate the optimal weight vector based on the optimal Lagrange multiplier solution. and optimal bias The formula is as follows: in It is a kernel function used to calculate the inner product between support vectors, thus optimizing the optimal weight vector. and optimal bias Substitute into plane Obtain the optimal classification hyperplane Determine the support vector machine classification model : The kernel function will Input vector Mapping from the original space to a higher-dimensional space: Kernel function Using a linear kernel function, then Transform into: in, It is an over-order function; It is a linear kernel function; ultimately The output value is either +1 or -1. If the output value is +1, it indicates malicious behavior, and the node is considered malicious and needs to be removed. If the output value is -1, it indicates a normal node, thus determining... Category of belonging.

5. The method for constructing a delegated proof-of-stake consensus mechanism based on support vector machines according to claim 1, characterized in that, Specifically, S6 is: S61. The validator node signs the prepared block using its own private key; S62. Broadcast the signed block to the entire network; S63. Other nodes receive the blocks broadcast by the validator nodes and perform consensus confirmation. S64. When the consensus confirmation obtained by the validator node reaches the threshold, the node is added to the blockchain and becomes the latest block.