如何移植ftp服务器到arm板子?
很多厂家提供的sdk,一般都不自带ftp服务器功能,
需要要发人员自己移植ftp服务器程序。
本文手把手教大家如何移植ftp server到arm板子。

环境
sdk:复旦微
Buildroot 2018.02.3
1. 解压
$ mkdir ~/vsftpd
$ cp vsftpd-3.0.2.tar.gz ~/vsftpd
$ cd ~/vsftpd $ tar xzf vsftpd-3.0.2.tar.gz
$ cd vsftpd-3.0.2/
软件包获取方法:件文末。
2. 配置工具链
修改Makefile文件:
CC = arm-linux-gnueabihf-gcc

根据自己的平台的工具链
3. 设置交叉编译环境&编译
peng@ubuntu:~/vsftpd/vsftpd-3.0.2$ make
arm-linux-gnueabihf-gcc -c main.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c utility.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c prelogin.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ftpcmdio.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c postlogin.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c privsock.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c tunables.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ftpdataio.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c secbuf.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ls.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c postprivparent.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c logging.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c str.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c netstr.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c sysstr.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c strlist.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c banner.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c filestr.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c parseconf.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c secutil.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ascii.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c oneprocess.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c twoprocess.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c privops.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c standalone.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c hash.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c tcpwrap.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ipaddrparse.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c access.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c features.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c readwrite.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c opts.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ssl.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c sslslave.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ptracesandbox.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c ftppolicy.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c sysutil.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c sysdeputil.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -c seccompsandbox.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
arm-linux-gnueabihf-gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o seccompsandbox.o -Wl,-s -fPIE -pie -Wl,-z,relro -Wl,-z,now `./vsf_findlibs.sh`
make 后,当前目录下会生成两个文件:vsftpd 和 vsftpd.conf,这两个文件是我们要用的。
4. 复制文件
将生成的 vsftpd 复制到目标板 /usr/sbin 目录,vsftpd.conf 复制到目标板 /etc 目录,并添加 vsftpd 为可执行:
- 复制执行文件到目标板
vsftpd拷贝到板子usr/sbin
- 添加可执行权限
chmod +x /usr/sbin/vsftpd
- 复制配置文件到目标板
vsftpd.conf 拷贝到板子/etc/
5. 配置
在目标板上创建一个本地用户ftp,并设置密码123456:
$ adduser ftp
Changing password for root
New password:
Retype password:
Password for ftpadmin changed by root
使用 vi 打开 vsftpd.conf 文件,并进行配置,如下配置可实现正常上传下载功能,(这段可以随便改)
用户:ftp
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
file_open_mode=0777
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to 6902 FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YESftp_username=ftp #登录用户
secure_chroot_dir=/mnt/ #
6. 打开vsftp
配置完之后,在目标板上打开vsftp,命令:
# /usr/sbin/vsftpd &
注意,后面还有一个 &,表示该服务放到后台运行。
7. 设置开机自启动
如果要让 vsftpd 开机启动,可以创建下面文件S70vsftpd,
然后将该文件添加到/etc/init.d/目录下。
#! /bin/shset -eDESC="vsftpd"
NAME=vsftpd
DAEMON=/usr/sbin/$NAMEcase "$1" instart)printf "Starting $DESC: "start-stop-daemon -S -b -x $NAMEecho "OK";;stop)printf "Stopping $DESC: "start-stop-daemon -K -x $NAMEecho "OK";;restart|force-reload)echo "Restarting $DESC: "$0 stopsleep 1$0 startecho "";;*)echo "Usage: $0 {start|stop|restart|force-reload}" >&2exit 1;;
esacexit 0
开启vsftpd:
/etc/init.d/S70vsftpd restart
重启vsftpd:
/etc/init.d/S70vsftpd restart
8. 客户端测试
下面以pc为例:
C:\Users\ricks>ftp
ftp> open 192.168.31.45
连接到 192.168.31.45。
220 Welcome to EC20 FTP service.
200 Always in UTF8 mode.
用户(192.168.31.45:(none)): root
331 Please specify the password.
密码:
230 Login successful.
- 显示文件列表
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
123
226 Directory send OK.
ftp: 收到 5 字节,用时 0.00秒 1.25千字节/秒。
- 下载文件
ftp> get 123
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for 123 (8 bytes).
226 Transfer complete.
ftp: 收到 8 字节,用时 0.00秒 8.00千字节/秒。
- 退出
ftp> quit
221 Goodbye.
后台回复:tools
相关文章:
如何移植ftp服务器到arm板子?
很多厂家提供的sdk,一般都不自带ftp服务器功能, 需要要发人员自己移植ftp服务器程序。 本文手把手教大家如何移植ftp server到arm板子。 环境 sdk:复旦微 Buildroot 2018.02.31. 解压 $ mkdir ~/vsftpd $ cp vsftpd-3.0.2.tar.gz ~/vs…...
深度学习 Pytorch 神经网络的损失函数
本节开始将以分类神经网络为例,展示神经网络的学习和训练过程。在介绍PyTorch的基本工具AutoGrad库时,我们系统地介绍过数学中的优化问题和优化思想,我们介绍了最小二乘法以及梯度下降法这两个入门级优化算法的具体操作,并使用Aut…...
Node.js 的底层原理
Node.js 的底层原理 1. 事件驱动和非阻塞 I/O Node.js 基于 Chrome V8 引擎,使用 JavaScript 作为开发语言。它采用事件驱动和非阻塞 I/O 模型,使其轻量且高效。通过 libuv 库实现跨平台的异步 I/O,包括文件操作、网络请求等。 2. 单线程事…...
C++ 中用于控制输出格式的操纵符——setw 、setfill、setprecision、fixed
目录 四种操纵符简要介绍 setprecision基本用法 setfill的基本用法 fixed的基本用法 setw基本用法 以下是一些常见的用法和示例: 1. 设置字段宽度和填充字符 2. 设置字段宽度和对齐方式 3. 设置字段宽度和精度 4. 设置字段宽度和填充字符,结合…...
996引擎 - NPC-添加NPC引擎自带形象
996引擎 - NPC-添加NPC引擎自带形象 截图参考添加NPC参考资料截图参考 添加NPC 编辑NPC表:Envir\DATA\cfg_npclist.xls 1.1. 需要临时隐藏NPC时可以在id前加 // 1.2. 如果NPC朝向不对,可以调整dir 列。(按8方向,上是0顺时针数。我这里给的4) 1.3. 形象代码:NPC代码、怪物…...
深度研究新范式:通过Ollama和DeepSeek R1实现自动化研究
引言 在信息时代,海量数据的产生与传播速度前所未有地加快,这既为研究者提供了丰富的资源,也带来了信息筛选与处理的巨大挑战。 传统研究方法往往依赖于研究者的个人知识库、文献检索技能以及时间投入,但面对指数级增长的数据量…...
Golang 并发机制-1:Golang并发特性概述
并发是现代软件开发中的一个基本概念,它使程序能够同时执行多个任务,从而提高效率和响应能力。在本文中,我们将探讨并发性在现代软件开发中的重要性,并深入研究Go处理并发任务的独特方法。 并发的重要性 增强性能 并发在提高软…...
(一)QT的简介与环境配置WIN11
目录 一、QT的概述 二、QT的下载 三、简单编程 常用快捷键 一、QT的概述 简介 Qt(发音:[kjuːt],类似“cute”)是一个跨平台的开发库,主要用于开发图形用户界面(GUI)应用程序,…...
代码随想录算法训练营第34天| 动态规划:01背包理论基础(二维和一维)、416. 分割等和子集
模板: 今日学习的文章链接和视频链接自己看到题目的第一想法看完代码随想录之后的想法 自己实现过程中遇到哪些困难 今日收获,记录一下自己的学习时长 动态规划:01背包理论基础 题目链接:46. 携带研究材料(第六期模拟…...
OpenEuler学习笔记(十四):在OpenEuler上搭建.NET运行环境
一、在OpenEuler上搭建.NET运行环境 基于包管理器安装 添加Microsoft软件源:运行命令sudo rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm,将Microsoft软件源添加到系统中,以便后续能够从该源安装.…...
高级编码参数
1.跳帧机制 参考资料:frameskipping-hotedgevideo 跳帧机制用于优化视频质量和编码效率。它通过选择性地跳过某些帧并使用参考帧来预测和重建视频内容,从而减少编码所需的比特率,同时保持较高的视频质量。在视频编码过程中,如果…...
gradio 合集
知识点 1:基本 Chatbot 创建 import gradio as gr 定义历史记录 history [gr.ChatMessage(role“assistant”, content“How can I help you?”), gr.ChatMessage(role“user”, content“What is the weather today?”)] 使用历史记录创建 Chatbot 组件 ch…...
Python NumPy(5):广播、迭代
1 NumPy 广播(Broadcast) 广播(Broadcast)是 numpy 对不同形状(shape)的数组进行数值计算的方式, 对数组的算术运算通常在相应的元素上进行。如果两个数组 a 和 b 形状相同,即满足 a.shape b.shape,那么 a*b 的结果就是 a 与 b 数组对应位相…...
基于 AWS SageMaker 对 DeepSeek-R1-Distilled-Llama-8B 模型的精调与实践
在当今人工智能蓬勃发展的时代,语言模型的性能优化和定制化成为研究与应用的关键方向。本文聚焦于 AWS SageMaker 平台上对 DeepSeek-R1-Distilled-Llama-8B 模型的精调实践,详细探讨这一过程中的技术细节、操作步骤以及实践价值。 一、实验背景与目标 …...
git push到远程仓库时无法推送大文件
一、错误 remote: Error: Deny by project hooks setting ‘default’: size of the file ‘scientific_calculator’, is 164 MiB, which has exceeded the limited size (100 MiB) in commit ‘4c91b7e3a04b8034892414d649860bf12416b614’. 二、原因 本地提交过大文件&am…...
算法随笔_30: 去除重复字母
上一篇:算法随笔_29:最大宽度坡_方法3-CSDN博客 题目描述如下: 给你一个字符串 s ,请你去除字符串中重复的字母,使得每个字母只出现一次。需保证 返回结果的字典序最小(要求不能打乱其他字符的相对位置)。 示例 1: …...
【Rust自学】15.1. 使用Box<T>智能指针来指向堆内存上的数据
喜欢的话别忘了点赞、收藏加关注哦,对接下来的教程有兴趣的可以关注专栏。谢谢喵!(・ω・) 15.1.1. Box<T> box<T>可以被简单地理解为装箱,它是最简单的智能指针,允许你在堆内存上存储数据&am…...
简单的SQL语句的快速复习
语法的执行顺序 select 4 字段列表 from 1 表名列表 where 2 条件列表 group by 3 分组前过滤 having 分组后过滤 order by 5 排序字段列表 limit 6 分页参数 聚合函数 count 统计数量 max 最大值 min 最小值 avg 平均 sum 总和 分组查询使…...
Hive:复杂数据类型之Map函数
Map函数 是Hive里面的一种复杂数据类型, 用于存储键值对集合。Map中的键和值可以是基础类型或复合类型,这使得Map在处理需要关联存储信息的数据时非常有用。 定义map时,需声明2个属性: key 和 value , map中是 key value 组成一个元素 key-value, key必须为原始类…...
Matlab实现TCN-BiLSTM时间卷积神经网络结合双向长短期记忆神经网络多特征分类预测(附模型研究报告)
Matlab实现TCN-BiLSTM时间卷积神经网络结合双向长短期记忆神经网络多特征分类预测(附模型研究报告) 目录 Matlab实现TCN-BiLSTM时间卷积神经网络结合双向长短期记忆神经网络多特征分类预测(附模型研究报告)分类效果基本描述程序设…...
Midjourney中的强变化、弱变化、局部重绘的本质区别以及其有多逆天的功能
开篇 Midjourney中有3个图片“微调”,它们分别为: 强变化;弱变化;局部重绘; 在Discord里分别都是用命令唤出的,但如今随着AI技术的发达在类似AI可人一类的纯图形化界面中,我们发觉这样的逆天…...
NLP深度学习 DAY4:Word2Vec详解:两种模式(CBOW与Skip-gram)
用稀疏向量表示文本,即所谓的词袋模型在 NLP 有着悠久的历史。正如上文中介绍的,早在 2001年就开始使用密集向量表示词或词嵌入。Mikolov等人在2013年提出的创新技术是通过去除隐藏层,逼近目标,进而使这些单词嵌入的训练更加高效。…...
【Linux】 冯诺依曼体系与计算机系统架构全解
Linux相关知识点可以通过点击以下链接进行学习一起加油!初识指令指令进阶权限管理yum包管理与vim编辑器GCC/G编译器make与Makefile自动化构建GDB调试器与Git版本控制工具Linux下进度条 冯诺依曼体系是现代计算机设计的基石,其统一存储和顺序执行理念推动…...
LLM - 大模型 ScallingLaws 的设计 100B 预训练方案(PLM) 教程(5)
欢迎关注我的CSDN:https://spike.blog.csdn.net/ 本文地址:https://spike.blog.csdn.net/article/details/145356022 免责声明:本文来源于个人知识与公开资料,仅用于学术交流,欢迎讨论,不支持转载。 Scaling Laws (缩放法则) 是大模型领域中,用于描述 模型性能(Loss) 与…...
【最后203篇系列】005 -QTV200 Online
说明 借着春节休假,把这部分完工,然后2025年将正式的把量化研究的成果进行产品化输出。 首先,我会将策略的执行从脚本挪到服务。做法是将策略的逻辑放在微服务里,作为一个接口,而由sniffer来触发策略执行。我想这样策…...
Midjourney基础-常用修饰词+权重的用法大全
用好修饰词很关键 Midjourney要用除了掌握好提示词的写法,按照上一篇《做Midjourney最好图文教程-提示词公式以及高级参数讲解》画面主体 场景氛围 主体行为 构图方式 艺术风格 图像质量。 要画出有质感的内容我们必须要掌握好“修饰词”,这些修饰…...
Deepseek的RL算法GRPO解读
在本文中,我们将深入探讨Deepseek采用的策略优化方法GRPO,并顺带介绍一些强化学习(Reinforcement Learning, RL)的基础知识,包括PPO等关键概念。 策略函数(policy) 在强化学习中, a…...
神经网络和深度学习
应用 类型 为什么近几年飞速发展 数据增长,算力增长,算法革新 逻辑回归 向量化 浅层神经网络(Shallow neural network) 单条训练数据前向传播计算表达式 batch训练数据前向传播计算表达式 反向传播计算表达式 参数随机初始化 不能全部设为0 原因是同一…...
步进电机加减速公式推导
运动控制梯形速度曲线相关算法请参考下面系列文章 PLC运动控制基础系列之梯形速度曲线_三菱运动控制模块梯形加减速-CSDN博客文章浏览阅读3.1k次,点赞3次,收藏7次。本文是关于PLC运动控制的基础教程,重点介绍了梯形速度曲线的概念、计算和应用。讨论了梯形加减速在启动和停…...
python学opencv|读取图像(四十八)使用cv2.bitwise_xor()函数实现图像按位异或运算
【0】基础定义 按位与运算:两个等长度二进制数上下对齐,全1取1,其余取0。 按位或运算:两个等长度二进制数上下对齐,有1取1,其余取0。 按位取反运算:一个二进制数,0变1,1变0。 按…...
