34、区块链技术在攻击检测与电子投票系统中的应用

区块链技术在攻击检测与电子投票系统中的应用

一、区块链在攻击检测中的应用

金融机构由于存储着高价值信息,极易遭受网络攻击。黑客通过售卖窃取的银行凭证和敏感金融数据可获利颇丰,银行数字足迹的扩大也增加了遭受攻击的风险。分析银行数据集的目标是找出针对银行和其他企业的DDoS攻击证据。

(一)LSTM模型相关

在检测过程中,LSTM(长短期记忆网络)模型发挥了重要作用。在每个第n个时间步,存在一个独特的频率范围,其中呈现准周期特征。LSTM模块的输出可以用数学公式表示为:
[h_n = o_n \times \tanh(c_n)]
其中,(h_n) 是第n个时间步LSTM单元的输出,它从 (c_n) 开始收集之前时间步提取的特征。通过依赖连接,时间准周期特征的长期和短期记忆被训练到单元状态 (c_n)((n = 1,2,\cdots,N))中。

然而,神经网络存在过拟合问题。过拟合指网络能很好地拟合训练数据,但在测试数据上表现不佳,说明它尚未学会泛化到新场景。这会影响神经网络的最佳性能,LSTM也可能出现这种情况。为避免梯度扩展和消失,常采用早期停止操作和权重限制。使用Dropout时,某些LSTM单元的输出会在每次迭代中随机归零,只有部分输出值用于误差计算,其余在误差反向传播时才被考虑。在LSTM网络训练中,通常会对网络参数施加约束,合适的超参数值如下:
|参数|取值|
| ---- | ---- |
|最大训练轮数|100|
|最小训练轮数|27|
|梯度阈值|1|
|学习率|0.001|
|第一层隐藏单元数|200|
|第二层隐藏单元数|225|

相关推荐

[Web3] 基础第7篇: 说透比特币的基本框架与原理

08 年的金融危机,中心金融,美元崩塌会导致全球经济崩溃,全球的国家为美国的经济买单;比特币全球流通性,资产去中心化发行,强调去中心化性和全球性,不会因为局部经济崩塌而崩溃,比特币崩溃全球经济才会崩溃;数字来取代传统金融,提高资产主权和全球性经济问题。比特币是第一个区块项目,也是目前为止去中心化程度最高,市值,受欢迎程度最高公链和数字货币,甚至已经成为全球各国央行的储备货币。Bitcoin 具备银行功能:产币的方式传统银行是中心化的,比特币产币是去中心化的,人人都可以参与的。

OxYGC 575

[Web3] 基础第2篇: 区块链发展史与区块特性

区块链的结构*图:区块链的链式结构示意,多个区块依次相连*由很多区块组成一个链式结构,区块与区块直接可以通过某种特殊的方式链接起来区块链里面的真实结构*图:区块之间通过哈希互相连接,当前区块记录上一区块的哈希*由很多区块组成一个链式结构,区块与区块直接可以通过区块 hash 互相连接起来,当前区块里面有上一个区块 hash, 这两个 Hash 是相等,若不相等,说明区块链发生了分叉。这里补充一个直观的理解:把每个区块想象成账本的一页,页眉都抄录了上一页的指纹(哈希)。

OxYGC 71

从建模到调参:基于Simulink的两轮差速机器人轨迹跟踪PID控制全流程解析

本文详细解析了基于Simulink的两轮差速机器人轨迹跟踪PID控制全流程,涵盖运动学建模、仿真环境搭建、PID控制器设计与实现等关键环节。通过Simulink仿真和可视化调试技巧,帮助开发者掌握移动机器人运动控制的核心技术,提升轨迹跟踪精度与性能优化能力。

weixin_28717683的博客 244

避坑指南:ANSYS流固耦合计算中System Coupling数据传递设置与常见报错解决

本文深入解析ANSYS Workbench中System Coupling模块在双向流固耦合(FSI)计算中的应用,详细讲解数据传递机制、典型报错解决方案及高阶调试技巧。通过实际案例展示如何优化耦合步长、处理大变形问题,并提升并行计算效率,帮助工程师有效规避常见技术陷阱。

weixin_29213525的博客 731

Ubuntu24.04下Librenms的完整安装与配置指南

本文提供了在Ubuntu 24.04 LTS系统上完整安装与配置LibreNMS网络监控系统的详细指南。内容涵盖系统环境准备、依赖安装、源码获取、PHP/数据库/Nginx配置、Composer安装、网页向导设置以及设备添加与日常使用,帮助用户快速部署一套功能强大的开源网络监控解决方案。

tgb3456789的博客 1140

Marvell车载以太网交换机芯片88Q5050

Marvell推出了四款车载用交换机芯片,88Q5050,88Q5050, 88Q5072和88Q6113。其中88Q5030有5 Port用于通信,88Q5050有8 Port用于通信,5072与6113有11 Port用于通信。由于项目中用到了88Q5050,所以本文中只涉及到88Q5050的内容。本文是对使用88Q5050的梳理和总结。

zhuwade的博客 2万+

ZYNQ平台AXI DMA传输避坑指南:如何快速定位‘errors:200‘等中断故障

本文详细解析了ZYNQ平台AXI DMA传输中常见的'errors:200'等中断故障,提供了从寄存器解析到压力测试的完整解决方案。通过深入分析XILINX_DMA中断机制、错误分类及五步排查法,帮助开发者快速定位并解决DMA传输问题,提升系统稳定性与性能。

weixin_29159613的博客 441

科研绘图系列:R语言绘制极坐标饼图(pie plot)

科研绘图系列:R语言极坐标饼图(pie plot)

专注生信领域 1054

上线之前多一道闸:业务审核系统的接入定义、双轨状态机与可靠生效闭环

运营后台“保存即生效”,让价格、库存、人群等配置每次修改都相当于一次无评审的上线。本文以至尊会员降价活动为例,系统拆解业务审核系统:用带业务语义的操作编码、规则化审核人与候选人快照、完整的生效回调契约做好接入定义;把业务改造为提交待生效,以不可变快照、字段级差异和唯一约束加幂等号防误配防重复;用审批轨与执行轨双轨状态机、链路式重新提交和以事件为准的审核链路理清状态;最后以发件箱、幂等键、超时先查后试、乐观锁与对账闭合生效环节,并结合两个可运行的Java程序,给出五种生效策略的事故率实测对比。

曾经“等你生日那天”都遥远得像未来,如今却可欢愉的挥手说“下个十年见” 6万+

融合Retinex理论与Transformer的YOLOv8低光照目标检测增强方法【YOLOv8】

图像分解:将输入图像分解为光照成分和反射成分。光照估计:估计光照图以消除暗光区域。图像重建:将光照增强后的反射图像重建成最终图像。Retinexformer通过在Transformer中引入Retinex的图像增强思路,使得低光照图像的细节能够得到充分保留。本文提出了一种基于Retinexformer的低光照增强方法,用于改进YOLOv8模型在夜间和低光照环境下的目标检测性能。

博客 1931

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

上一篇: 16、打造独立交互的 watchOS 应用:CarFinder 进阶指南
下一篇: 35、基于区块链技术的电子投票与实时嵌入式控制系统
github5actions
博客等级 码龄1天 0粉丝 1824原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值