此文将讨论acg.watch网站的定位,运营模式,以及潜在应用等。
This article will discuss the positioning, operating mode, and potential applications of the acg.watch website.
自从18年第一次尝试建站以来,追求流媒体播放服务一直是我所追求的目标。
从2018年三月,我第一次通过腾讯云Win Server 2012实现了对摇曳露营第3集的发布,从而使其能够在网页上访问。到2018年9月,基于video.js,我第一次搭建了一个视频网站,使用华为云对象存储以及mysql数据库进行集中管理,并将其发布在video.yimian.xyz。2018年11月,配合树莓派3B以及一个红外摄像头,我通过推流实现了对宿舍的24小时监控。2019年2月,我购买了acg.watch这个域名,并将视频站转移至此。此后,我站视频被爬多次,由于华为云存储巨额的流量费用,我觉定暂时停止公开提供服务。2019年11月,在英国,我重构了视频站,不再使用华为云存储这个烧钱的服务,转而寻求onedrive存储方案。此外,新的视频站不再拥有后端,而是使用file-cache机制通过分析onedrive的视频目录自动生成数据集。2020年8月,随着ushio用户系统竣工,视频站开始支持为用户提供个性化服务,包括跨设备播放记录同步等。2021年1月,确定acg.watch的发展方向为多功能在线播放器,此外网站还将提供番剧搜寻功能。同时,考虑到版权问题,我之前私藏的所有视频全部转为私有,只有认证过的朋友们才有权限观看。
Acg.Watch视频站拥有三个发展定位:
网站将持续开发,欢迎大家常来踩踩呀(:з」∠)
Since the first attempt to build a website in 18 years, the pursuit of streaming media playback services has always been my goal.
From March 2018, I realized the release of the third episode of Sway Camp through Tencent Cloud Win Server 2012 for the first time, so that it can be accessed on the web. By September 2018, based on video.js, I built a video website for the first time, used Huawei Cloud object storage and mysql database for centralized management, and published it on video.yimian.xyz. In November 2018, with the Raspberry Pi 3B and an infrared camera, I realized 24-hour monitoring of the dormitory through push streaming. In February 2019, I purchased the domain name acg.watch and transferred the video site to it. Since then, my site’s video has been crawled many times. Due to the huge traffic cost of Huawei Cloud storage, I feel that I will temporarily stop publicly providing services. In November 2019, in the United Kingdom, I restructured the video site and stopped using Huawei Cloud Storage, a money-burning service, and turned to onedrive storage solutions. In addition, the new video station no longer has a backend, but uses the file-cache mechanism to automatically generate a data set by analyzing onedrive’s video catalog. In August 2020, with the completion of the ushio user system, the video station began to provide users with personalized services, including cross-device playback and recording synchronization. In January 2021, the development direction of acg.watch is determined as a multifunctional online player, and the website will also provide a fan drama search function. At the same time, taking into account the copyright issue, all the videos that I have privately collected before are all turned into private ones, and only authenticated friends can watch them.
Acg.Watch video station has three development positions:
The website will continue to be developed, and you are welcome to step on it often_(:з」∠)_
]]>Ushio V2ray 使用方法。
Ushio V2ray Instruction..
本服务仅向以学术研究为目的学生提供!
本服务非盈利,但可能会根据您的使用情况收取少许费用,来平摊服务器的费用!
在开始安装软件前,请先前往https://v2ray.yimian.xyz/使用手机号进行账户注册。
如确有使用需求,请在注册后将您的学生身份证明和注册手机号发送至i@iotcat.me,在我检查过您的需求合法性后将赋予您使用权限!
本文包含Win10,安卓,IOS/Ipad OS的软件安装方法,请根据相应流程进行安装。
如果您有任何疑惑,请在下方评论中提出!
下载
Windows_v2rayN-Core.zip
的压缩文件。解压
将下载的压缩文件解压到C盘根目录,如下图
如果提示需要管理员权限,请一律选是
配置
请打开C盘中刚才解压的文件夹,找到名为V2ray
或V2rayN.exe
的程序,双击打开。如下图。
找到右下角任务栏,找到下图中的图标,双击打开
选中窗口上方的订阅,点击订阅设置如下图
打开https://v2ray.yimian.xyz并登录,待出现二维码后点击Copy。如下图
回到订阅设置的窗口,将刚才复制的内容粘贴到地址URL框中,勾选启用,点击确定。如下图
点击主窗口上方的参数设置如下图
此时,主窗口中会多出一个或几个服务器,如下图
关闭主窗口,右键右下角状态栏中的V2ray,选择服务器->Vmess-Los_Angeles(….。如下图
右键右下角状态栏中的V2ray,选择Http代理->…(PAC模式)。如下图
验证
下载安装软件
配置
验证
Before installing the software, please go to https://v2ray.yimian.xyz/ to register with your mobile phone number.
This article contains software installation methods for Win10, Android, IOS/Ipad OS, please install according to the corresponding process.
download
Windows_v2rayN-Core.zip
The compressed file.Unzip
Decompress the downloaded compressed file to the root directory of drive C, as shown below
If you are prompted to require administrative permissions, please select all yes
Configuration
Please open the folder just unzipped in the C drive, find the program named V2ray
or V2rayN.exe
, and double-click to open it. As shown below.
Find the taskbar in the lower right corner, find the icon in the figure below, double-click to open
Select Subscription at the top of the window, and click Subscription Settings as shown below
Open https://v2ray.yimian.xyz and log in. After the QR code appears, click Copy. As shown below
Go back to the subscription settings window, paste the content you just copied into the Address URL box, check Enable, and click OK. As shown below
Click Parameter Settings at the top of the main window as shown below
At this time, there will be one or more servers in the main window, as shown below
Close the main window, right-click V2ray in the status bar at the bottom right corner, and select Server->Vmess-Los_Angeles(….. As shown below
Right-click V2ray in the status bar at the bottom right corner, and select Http Proxy->…(PAC Mode). As shown below
verification
Download and install software
Configuration
verification
本文将讨论wiot项目下一步的发展目标与实施方法。
This article will discuss the next development goals and implementation methods of the Wiot project.
wiot,一个基于NodeJS的分布式物联网操作系统。
本项目旨在帮助不熟悉固件编程的网络开发者实现出自己的物联网应用。
在开发传统的物联网程序时,我们需要一次又一次的编写,烧录,调试每一个开发板,以某种方式将其相连结,以提供某种服务。这样的方式非常繁琐,开发成本和门槛都比较高。此外,古老的C和C++语言缺少成熟的依赖管理工具,以至于我们在编写开发板时难以像开发python或nodeJS程序一样轻松便捷。
本项目试图提供一种方法,将烧录,调试开发板的流程自动化,并将逻辑编写的步骤移动到远程计算机的NodeJS界面上。通过此方式,我们进而得以将分布式物联网节点的功能进行集中化管理。此外,借助NodeJS成熟的依赖管理器npm,使得物联网应用的开发更加便捷高效。
至此,下到每一个物联网节点,上到各种类型的数据库、用户终端,都可以在同一个nodeJS界面上配置、操作。开发者将能够专注于物联网逻辑的开发,实现出更加丰富多彩的物联网应用。
第一轮开发完成于2019.5,详见这篇博客
实现了对D1 MINI开发板对nodeJS的pin口映射,并支持诸如ota等一系列功能。
待进行,计划当做FYP项目
在设计物联网系统时,我一直有一个愿景。历史必然性。打造手足。
wiot的目标是提供一套
系统架构在分类上分为静态的环境和动态的用户。实现上分为模块,服务和程序。
类似于计算机操作系统中的驱动,模块负责将物理层面上的各种功能,比如led照明,抽象为操作系统层面的标准接口。
服务是运行在边缘的docker中的守护进程。开发者通过调用模块,实现编写服务,实现各种各样的标准功能。
程序是由用户定义的一套自定义逻辑,用于打造自定义场景。结合地理围栏公共服务LIS,调用环境服务提供的标准接口。
通过提供标准化的单片机固件以及自动化的烧录工具,wiot将各开发板的pin口功能进行抽象,整理,并映射为可调用的NodeJS接口。
如上图所示,wiot架构主要包含三部分:Node节点,wiot Cloud Module云模块,wiot cli命令行程序。其中,Node节点为烧录好wiot固件的NodeMCU单片机,他们通过IEEE 802.11 WiFi进行分布式通信,并于某个节点接入路由器以连接wiot云模块。用户在自己的PC上使用NodeJS调用wiot依赖编写物联网程序。完成后,用户使用wiot cli对开发好的程序进行检查、测试和部署。被部署的物联网程序将运行在wiot云模块上,并可使用nodeJS的接口与其它云服务或数据库进行交互。
Node节点使用的是NodeMCU开发板(基于ESP8266的扩展板)。在使用wiot-cli烧录wiot固件后,NodeMCU将成为wiot节点。
wiot节点有四种模式:master模式、slave模式、bridge模式和debug模式。此模式只能在烧录固件时配置。master模式和bridge模式下,nodeMCU将同时开启STA和AP模式。slave模式下则只开启STA模式。master需要有稳定且无限制的电源供电,其功率较大(包含RSA, 协议转换等),不适合低功耗场景。bridge与slave则可以灵活调整功率,可用于低功耗场景。
debug模式下节点工作在STA和AP模式,用户可以使用手机等设备连接到此节点,并打开根目录网页。网页上将实时显示此节点当前所处位置的各种信息,比如收到各其它节点的信号强度等,适用于挑选部署场景。
wiot节点支持低功耗(Low Power)状态。但此状态仅能在slave模式和bridge下开启。此状态可通过wiot api或者wiot-cli进行开启或关闭。低功耗状态由esp8266睡眠功能实现。此状态下可由干电池供电工作数年[1]。
wiot节点使用分布式组网。在路由器信号较强的地方,master节点将接入路由器WiFi网络,并桥接。在路由器信号不强的地方,每一个节点都会找到信号最强的另一个上游的master或bridge节点,并桥接(slave除外)。
如上图,两个距离路由器近的master节点自动接入到路由器wifi。下游的其它节点分别连接至信号最强的上游节点。
wiot节点支持使用射频指纹识别[2]来实现下游通信认证。此方法使用esp8266的RSSI函数以及scan返回参数。在下游设备试图接入网络时,上游设备将搜集指纹信息并向服务器汇报。服务器将指纹与数据库存储的先前版本进行比对,并作出是否允许入网的决策。
云模块充当wiot的云部分,提供云的功能。云模块能够守护运行run-time状态下的wiot程序。此外,云模块还能够提供测试,部署等功能。云模块使用Docker进行虚拟化。
即wiot-cli。是wiot在开发者终端上提供的操作工具集。通过wiot-cli,开发者可以实现对wiot程序的测试,部署,恢复等功能。此外,wiot-cli也支持一系列debug等常用功能。详见下方wiot-cli命令
。
npm i -g wiot-cli
指令安装wiot命令行工具wiot init my-wiot-proj
在当前目录新建并配置一个wiot项目文件夹,项目名称为my-wiot-proj。此时,会提示用户填写此项目的一些信息,比如项目描述,作者信息,路由器WiFi账户密码,wiot云模块地址,项目主脚本等。wiot node init my-first-node [--type=<master|slave|bridge|debug>]
。这将自动配置并将wiot固件烧录到nodeMCU开发板,并将其命名为my-first-node。type为可选参数,可设置为master
或slave
或bridge
或debug
,默认为master
。wiot status
查看是否所有节点均已在线。如果没有,使用指令wiot log
配合grep
工具查找日志定位问题。index.js
)开始编写你的wiot程序。wiot check
检查你wiot程序的逻辑问题。wiot test
将挂起云模块中正在运行的程序,并运行当前项目文件夹中的程序。此时,所有控制台输出将显示在你的命令行窗口。使用Ctrl+C
终止当前测试并恢复云模块先前的程序。wiot push
将本地的wiot程序部署到云端。默认使用wiot官方wiot云模块。你也可以部署自己的wiot云服务,方法如下:
安装docker并运行指令docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot
。
wiot help [command]
查看帮助wiot clone <host:user/project>
将项目从云模块克隆到本地wiot pull
使用远程代码覆盖本地代码wiot push
将当前文件夹wiot程序部署到云模块wiot node ls
显示当前所有节点wiot map [nodeID]
显示某节点的连接路径wiot log [nodeID] [--head=<number>|--tail=<number>]
查看某节点的日志wiot stop
停止wiot服务wiot start
开启wiot服务wiot restart
重启wiot服务wiot reload
在不重置flash变量情况下重启wiot服务wiot init <name>
新建并初始化wiot项目文件夹wiot node init <node-name> [--type=<master|slave|bridge|debug>]
配置并烧录nodeMCU开发板wiot check
检查当前文件夹项目逻辑问题。wiot test
将挂起云模块中正在运行的程序,并运行当前项目文件夹中的程序。此时,所有控制台输出将显示在你的命令行窗口。使用Ctrl+C
终止当前测试并恢复云模块先前的程序。wiot status [nodeID]
显示当前项目或节点状态信息wiot debug start
终止当前云端程序并进入debug模式wiot debug set <nodeID> <pinID> <0-255>
debug模式下设置某个节点pin的PWM输出值wiot debug reset <nodeID>
debug模式下重置某个节点的数据存储,并重连wiot debug get <nodeID> <pinID>
debug模式下获取某个节点pin的PWM值wiot debug sleep <nodeID> <pinID> <HIGH|LOW>
debug模式下设置某节点轻度休眠,直到被某pin的高或低电平唤醒wiot debug dsleep <nodeID> <millisecond>
debug模式下设置某节点深度休眠多少毫秒wiot debug reconnect [nodeID]
debug模式下重新组网或断开重连某个节点wiot debug setphymode <nodeID> <b|g|n>
debug模式下配置节点WiFi协议为802.11b|g|nwiot module search [keyword]
本地和联网搜索可用module类型wiot module install <moduleName|path>
安装并配置某个模块wiot module remove <moduleId>
卸载模块wiot module ls
显示所有已安装模块wiot search [keyword]
本地和联网搜索可用程序wiot install <programName|path>
安装并配置某个程序wiot remove <programID>
卸载某个程序wiot ls
显示所有程序1 | | |
待设计,请参考一轮开发wiot文档
Wiot, a distributed IoT operating system based on NodeJS.
This project aims to help web developers who are not familiar with firmware programming to implement their own IoT applications.
When developing traditional Internet of Things programs, we need to write, burn, and debug each development board again and again, and connect them in a certain way to provide a certain service. This method is very cumbersome, and the development cost and threshold are relatively high. In addition, the ancient C and C++ languages lack mature dependency management tools, so that it is difficult for us to write development boards as easy and convenient as developing python or nodeJS programs.
This project is trying to provide a method to automate the process of burning and debugging the development board, and move the steps of logic writing to the NodeJS interface of the remote computer. In this way, we are able to centrally manage the functions of distributed IoT nodes. In addition, with NodeJS’s mature dependency manager npm, the development of IoT applications is more convenient and efficient.
So far, down to every IoT node, up to various types of databases and user terminals, all can be configured and operated on the same nodeJS interface. Developers will be able to focus on the development of IoT logic and realize more colorful IoT applications.
The first round of development was completed in May 2019, please refer to this blog
Realize the pin port mapping of D1 MINI development board to nodeJS, and support a series of functions such as ota.
To be carried out, plan as FYP project
By providing standardized microcontroller firmware and automated burning tools, wiot abstracts, organizes, and maps the pin port functions of each development board into a callable NodeJS interface.
As shown in the figure above, the wiot architecture mainly consists of three parts: Node node, wiot Cloud Module, and wiot cli command line program. Among them, the Node node is the NodeMCU microcontroller with the wiot firmware burned. They use IEEE 802.11 WiFi for distributed communication, and connect to a router at a node to connect to the wiot cloud module. Users use NodeJS to call Wiot on their own PCs and rely on writing IoT programs. After completion, the user uses wiot cli to check, test and deploy the developed program. The deployed IoT program will run on the wiot cloud module, and can use the nodeJS interface to interact with other cloud services or databases.
Node node uses NodeMCU development board (expansion board based on ESP8266). After using wiot-cli to burn the wiot firmware, NodeMCU will become a wiot node.
Wiot nodes have four modes: master mode, slave mode, bridge mode and debug mode. This mode can only be configured when burning firmware. In master mode and bridge mode, nodeMCU will enable STA and AP mode at the same time. In slave mode, only STA mode is enabled. The master needs to have a stable and unlimited power supply, which has a large power and is not suitable for low power consumption scenarios. Bridge and slave can flexibly adjust power, which can be used in low power consumption scenarios.
In debug mode, the node works in STA and AP mode. Users can use mobile phones and other devices to connect to this node and open the root directory webpage. The web page will display various information about the current location of this node in real time, such as the signal strength received from other nodes, which is suitable for deployment scenarios.
Wiot nodes support Low Power state. But this state can only be opened in slave mode and bridge. This state can be turned on or off through wiot api or wiot-cli. The low power consumption state is realized by the sleep function of esp8266. In this state, it can be powered by dry batteries for several years [1].
Wiot nodes use distributed networking. Where the router signal is strong, the master node will access the router WiFi network and bridge it. Where the router signal is not strong, each node will find another upstream master or bridge node with the strongest signal and bridge it (except slave).
As shown in the figure above, the two master nodes close to the router are automatically connected to the router wifi. The other downstream nodes are respectively connected to the upstream node with the strongest signal.
Wiot nodes support the use of RF Fingerprint Recognition[2] to achieve downstream communication authentication. This method uses the RSSI function of esp8266 and scan return parameters. When the downstream device attempts to access the network, the upstream device will collect fingerprint information and report to the server. The server compares the fingerprint with the previous version stored in the database and makes a decision whether to allow access to the network.
The cloud module acts as the cloud part of Wiot and provides cloud functions. The cloud module can guard the wiot program running in the run-time state. In addition, the cloud module can also provide functions such as testing and deployment. The cloud module uses Docker for virtualization.
That is wiot-cli. It is a set of operation tools provided by Wiot on the developer terminal. Through wiot-cli, developers can implement functions such as testing, deploying, and restoring wiot programs. In addition, wiot-cli also supports a series of common functions such as debug. See the wiot-cli command
below for details.
npm i -g wiot-cli
through the command line to install the wiot command line toolwiot init my-wiot-proj
to create and configure a wiot project folder in the current directory, the project name is my-wiot-proj. At this point, the user will be prompted to fill in some information about this project, such as project description, author information, WiFi account password, wiot cloud module address, project main script, etc.wiot node init my-first-node [--type=<master|slave|bridge|debug>]
. This will automatically configure and burn the Wiot firmware to the nodeMCU development board and name it my-first-node. type is an optional parameter, which can be set to master
or slave
or bridge
or debug
, and the default is master
.wiot status
in the project folder to see if all nodes are online. If not, use the command wiot log
with the grep
tool to find the log location problem.index.js
).wiot check
to check the logic of your wiot program.wiot test
to suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use Ctrl+C
to terminate the current test and restore the previous program of the cloud module.wiot push
to deploy the local wiot program to the cloud.Install docker and run the command docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot
.
wiot help [command]
view helpwiot clone <host:user/project>
to clone the project from the cloud module to the localwiot pull
uses remote code to overwrite local codewiot push
deploys the current folder wiot program to the cloud modulewiot ls
shows all current nodeswiot map [nodeID]
shows the connection path of a nodewiot log [nodeID] [--head=<number>|--tail=<number>]
view the log of a nodewiot stop
stop wiot servicewiot start
to start wiot servicewiot restart
restart wiot servicewiot reload
restarts the wiot service without resetting the flash variablewiot init <name>
creates and initializes the wiot project folderwiot node init <node-name> [--type=<master|slave|bridge|debug>]
configure and burn nodeMCU development boardwiot check
checks the current folder project logic problem.wiot test
will suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use Ctrl+C
to terminate the current test and restore the previous program of the cloud module.wiot status [nodeID]
displays current project or node status informationwiot debug start
terminates the current cloud program and enters debug modewiot debug set <nodeID> <pinID> <0-255>
Set the PWM output value of a node pin in debug modewiot debug reset <nodeID>
debug mode, reset the data storage of a node and reconnectwiot debug get <nodeID> <pinID>
get the PWM value of a node pin in debug modewiot debug sleep <nodeID> <pinID> <HIGH|LOW>
debug mode to set a node to lightly sleep until it is awakened by a pin’s high or low levelwiot debug dsleep <nodeID> <millisecond>
set how many milliseconds a node deeply sleeps in debug modewiot debug reconnect [nodeID]
debug mode, reconnect to the network or disconnect and reconnect to a node]]>To be designed, please refer to One-round development wiot document
我的GRE备考从8.21正式开始,8.28首考(成绩未提交),预计于9月底完成,目标155+170W3.5,总过程历时一个月半。本文阐述了在我的GRE备考过程中,提炼出的矛盾与方法论的汇总。
My GRE preparation started from 8.21, and the first test was 8.28 (scores not submitted). It is expected to be completed by the end of September. The goal is 155+170W3.5. The total process lasts one and a half months. This article explains the contradictions and methodologies that were extracted during my GRE preparation process.
我备考GRE的主要目的是,借助GRE的备考过程,有效提升英语词汇量与论文阅读水平(速度)。于此同时,此次备考过程也将成为Tomato Proj的有效试验,为今后实现有序和谐的生活节奏提供经验参考。此外,申请一些美国学校则也需要提供GRE成绩。
由于暑假投入大量时间,准备申研材料,学习积累专业知识,准备FYP,我只留下了1个月左右的时间准备GRE。因此,时间不足的问题需要由方法论的精进来弥补。
GRE数学的关键对于我们经理过理科高考的人来说,通过一定量的练习回顾,将期望调节到170左右,是比较轻松的。但是这并不意味着就可以对GRE数学掉以轻心。在备考GRE数学时,除了提高期望外,更加重要的是如何缩小方差。考虑到GRE数学在设计上时间较为紧张,只有35分钟,而且有可能会遇到一些很难的题,或者看不懂的题,这时就要果断跳过,及时止损。因此,在数学的备考过程中,需要形成一套判断是否跳过的判断机制,且判断耗时越少越好。
在数学的备考过程中,除了减小方差,也要有效提高期望。与高考不同的是,GRE数学的语言是英语,且还有一系列的逻辑陷阱。因此,要提高GRE数学的期望,需要对以下三点进行”程序化”处理,提炼出相应方法论。
尽管GRE数学的考试时间是否有限,但并不排除有时间会剩下的可能性。因此,可以注意锻炼一套有利于利用剩余时间差错的机制。比如,合理规划使用演草纸等。
通过这几天的训练,我发现了一个现象,及如果最开始看文章没有看懂,那么后面做题基本靠蒙。因此,GRE阅读一定要先将文章看懂。要实现这一点,可以通过提炼句子的s3版本,通过居间关系连接词对下一句内容进行预判,以此递归。
在有限的时间内把文章看懂。。
先把3000刷熟,再把托福词汇刷过。。然后再看看。刷单词时一定要批量(比如以500词为一组),多变。一天过好几遍,闪现就行,几天后就会见效。
把题目抽象成公式处理。。
My main purpose of preparing for the GRE is to effectively improve my English vocabulary and paper reading level (speed) with the help of the GRE preparation process. At the same time, this test preparation process will also become an effective test of Tomato Proj, providing an experience reference for the realization of an orderly and harmonious life rhythm in the future. In addition, GRE scores are also required to apply to some American schools.
Since I invested a lot of time during the summer vacation, preparing application materials, learning and accumulating professional knowledge, and preparing for FYP, I only left about 1 month to prepare for GRE. Therefore, the problem of insufficient time needs to be compensated by methodological refinement.
The key to GRE mathematics is relatively easy for our managers who have passed the science college entrance examination to adjust their expectations to about 170 through a certain amount of exercise review. But this does not mean that GRE math can be taken lightly. When preparing for the GRE math test, in addition to raising expectations, it is more important to reduce variance. Considering that GRE mathematics is relatively tight in design time, only 35 minutes, and there may be some difficult or unintelligible questions, then you must skip it decisively and stop the loss in time. Therefore, in the preparation process of mathematics, it is necessary to form a judging mechanism for judging whether to skip, and the less time-consuming judgment, the better.
In the preparation process of mathematics, in addition to reducing variance, we must also effectively raise expectations. Unlike the college entrance examination, the language of GRE math is English, and there are a series of logical traps. Therefore, in order to increase the expectation of GRE mathematics, the following three points need to be “programmed” to refine the corresponding methodology.
Although the time for the GRE math test is limited, it does not rule out the possibility that time will be left. Therefore, you can pay attention to exercise a set of mechanisms that are conducive to using the remaining time error. For example, rationally plan the use of cursive paper.
Through the training of the past few days, I have discovered a phenomenon, and if I did not understand the article at the beginning, then I basically rely on misunderstanding to do the questions later. Therefore, GRE reading must first understand the article. To achieve this, the s3 version of the sentence can be refined, and the content of the next sentence can be pre-judged through the intermediate relational connectives, so as to recurse.
Read the article in a limited time. .
First brush 3000, and then brush the TOEFL vocabulary. . Then look again. When scanning words, be sure to batch (for example, 500 words as a group), changeable. Pass it several times a day, just flash, and it will be effective in a few days.
Abstract the topic into formula processing. .
]]>为了准备2021硕士申请,我对一些喜欢的项目做了一些调查,并汇总在这里。
To prepare for my master’s application in 2021, I did some research on some of my favorite projects and summarized them here.
排名来源:QS2020, USNews2020, 上海交大2019,csrank.global.2010-2020
四个排名代表四种视角(QS->英国,USNews->美国,上海交大->中国,csrank->cs专业贡献)
以下信息部分摘自互联网,可能有错误!!
QS
: 9USNews
: 20上海交大
: 23csrank
: 73
申请模式:
两个志愿,录取时可以看到你的第二志愿。一年只能提交一次申请。
£33,250
条件
案例
£32,500
条件
QS
: 8USNews
: 21上海交大
: 15csrank
: 50
申请模式:
可以申请多次。申请由授课老师处理,不同院系不互通。
£28,530
条件
案例
£30,400
条件
QS
: 20USNews
: 28上海交大
: 31csrank
: 33
-
条件
案例
-
条件
QS
: 14USNews
: 23上海交大
: 13csrank
: 7 (参考清华8)
$56,550
条件
案例
$58,586
条件
QS
: 48USNews
: 82上海交大
: 95csrank
: 1
$50,100
条件
案例
QS
: 18USNews
: 7上海交大
: 8csrank
: 15
条件
QS
: 11USNews
: 34上海交大
: 67csrank
: 16
S$5,350.00
条件
条件
条件
QS
: 11USNews
: 43上海交大
: 73csrank
: 53
S$58,000.00
条件
S$3,350.00
条件
QS
: 29USNews
: 18上海交大
: 24csrank
: 18
12-24
月40
万/年条件
QS
: 6USNews
: 25上海交大
: 19csrank
: 10
条件
20-30
万
QS
: 18USNews
: 45上海交大
: 78csrank
: 28
20-30
万条件
Ranking Source:QS2020, USNews2020, ARWU2019,csrank.global.2010-2020
The four rankings represent four perspectives (QS->UK,USNews->US,ARWU->China,csrank->cs Industry)
The following information section is taken from the Internet and may contain errors!!
QS
: 9USNews
: 20ARWU
: 23csrank
: 73
Application mode:
Two choices. You can see your second choice when you are admitted.Applications can only be submitted once a year.
£33,250
Condition
Case
£32,500
Condition
QS
: 8USNews
: 21ARWU
: 15csrank
: 50
Apply Method:
You can apply multiple times.The application is handled by the instructor and is not interchangeable between different departments.
£28,530
Condition
Case
£30,400
Condition
QS
: 20USNews
: 28ARWU
: 31csrank
: 33
-
Condition
Case
-
Condition
QS
: 14USNews
: 23ARWU
: 13csrank
: 7
$56,550
Case
$58,586
Condition
QS
: 48USNews
: 82ARWU
: 95csrank
: 1
$50,100
Condition
Case
QS
: 18USNews
: 7ARWU
: 8csrank
: 15
Condition
QS
: 11USNews
: 34ARWU
: 67csrank
: 16
S$5,350.00
Condition
Condition
Condition
QS
: 11USNews
: 43ARWU
: 73csrank
: 53
S$58,000.00
Condition
S$3,350.00
Condition
QS
: 29USNews
: 18ARWU
: 24csrank
: 18
12-24
months400,000 RMB
/yearCondition
QS
: 6USNews
: 25ARWU
: 19csrank
: 10
Condition
QS
: 18USNews
: 45ARWU
: 78csrank
: 28
Condition
将blog从Typecho迁移到了Hexo。
Migrated blog from Typecho to Hexo.
]]>拜读了毛主席的实践论和矛盾论,第一次系统地接触了辩证唯物论这一方法论,深感其强大与自然。综合我自己先前的所经所悟,提炼出认知派生这一观点。
After reading Chairman Mao’s theory of practice and contradiction, it was the first time to systematically come into contact with the methodology of dialectical materialism, and I deeply felt its power and nature. Combining my own previous experience and understanding, I refined the view of cognitive derivation.
从巴甫洛夫的狗铃实验[1],到上世纪50年代费斯汀格的认知失调理论[2],再到1971年津巴多教授主导的斯坦福监狱实验[3],这一系列打破预期的心理学生理学实验,一步一步揭示出,人们心理的作用形式,似乎并非大多数人所认为的那样。实际上,这看似重大的心理学发现,其实早在两个世纪前,便已被马克思,恩格斯等人从社会学角度提出,并完善成为理论。后经列宁,斯大林等人通过实践进行完善。传入国内后,被毛泽东所集大成,结合了中国传统文化的底蕴,发展成为唯物辩证法的毛泽东思想。这一论理的形成,源自于这些人对自己所观察到的社会现象以及自己基于论理所实践的社会运动的归纳总结。而这一论理,又指导了中国共产党建国,扎实地完成国内资本原始积累地奇迹。
辩证唯物论是一套自洽的方法论,它能够有效地指导我们生活实践,从实践中总结论理,再将论理运用于实践的过程。而这一循环的高效运转,正是人类进化出认知的终极意义。
方法论是一种十分有效而重要的工具,它为人们提供了一套范式(习惯),帮助人们更有效地践行“社会实践->认识->论理->社会实践”这一模式。
[1] 巴甫洛夫 - 维基百科
[2] 認知失調 - 维基百科
[3] 斯坦福监狱实验 - 维基百科
From Pavlov’s dog bell experiment[1] to Festinger’s cognitive dissonance theory in the 1950s[2], to the Stanford prison experiment led by Professor Zimbardo in 1971[3], this A series of psychology students’ physical experiments that broke expectations reveals step by step that the role of people’s psychology does not seem to be what most people think. In fact, this seemingly important psychological discovery was actually put forward by Marx, Engels and others from a sociological point of view two centuries ago and perfected it into a theory. Later, Lenin, Stalin and others improved it through practice. After being introduced to China, it was collected by Mao Zedong, combined with the heritage of Chinese traditional culture, and developed into Mao Zedong’s thought of materialist dialectics. The formation of this theory stems from these people’s summary of the social phenomena they observe and the social movements they practice based on the theory. And this reasoning guided the founding of the Communist Party of China and solidly completed the miracle of domestic capital accumulation.
Dialectical materialism is a set of self-consistent methodology, which can effectively guide our life practice, conclude the theory from practice, and then apply the theory to the process of practice. The efficient operation of this cycle is precisely the ultimate meaning of human cognition.
Methodology is a very effective and important tool. It provides people with a set of paradigms (habits) to help people practice the model of “social practice -> knowledge -> theory -> social practice” more effectively.
[1] 巴甫洛夫 - 维基百科
[2] 認知失調 - 维基百科
[3] 斯坦福监狱实验 - 维基百科
分享一下改进版炸鸡块做法哦~
Share the improved version of fried chicken nuggets~
之前去欧洲旅游办签证,由于没有三个月的银行流水,不得已购买了旅行支票作为资金证明。可是到了欧洲才发现旅行支票很难使用,如果不了解行情会被骗收15%-20%的手续费。这篇Blog记录了我们发现的兑换旅行支票的坑和Tips!
Before I went to Europe for a tourist visa, I had to buy a traveler’s cheque as a proof of funds because I did not have a three-month bank flow. However, when I arrived in Europe, I found that traveler’s cheques were difficult to use. If I didn’t understand the market, I would be defrauded of 15%-20% handling fees. This blog records the pits and Tips we found in redeeming traveler’s checks!
[scode type=”info”]经验一: 尽可能不使用旅行支票[/scode]
[scode type=”info”]经验二: 旅支兑换最低手续费在4%左右[/scode]
若不想看经历,可直接调至文末兑换旅行支票的Tips处哦!
圣诞假和室友一行四人一起DIY游欧洲,去了意大利和奥地利两个国家,共5个城市。由于英国的银行卡还没有使用到三个月,无法通过打印流水来办签证,我们选择了另一种方法—购买American Express的欧元的旅行支票。殊不知啊,兑换和使用旅行支票真真是一个大坑。
最开始据旅行支票的官网上所说,欧洲很多城市的店铺里都能直接使用旅行支票,照这样来说,旅游时花掉它肯定比回英国后把它换回英镑划算的多(换回英镑的过程需要损失8%)。然鹅,出发前我们通过看他人的游记发现,欧洲现在很多店都无法直接花旅行支票(按我们后来实际旅行情况来看,只在威尼斯的好几家店看到了旅行支票的标识),于是我们决定去了就在机场红色标识的Change那里将它们全数换成欧元。
可到了第一站罗马找到了红色的Change后(如图),却发现700欧元只能给我们590多欧元。这可真的亏的不是一丁半点儿。我对象现场查到了American Express的电话,打过去发现人家现在在意大利没有设点,不过对方建议去银行换,说是可以毫无亏损(注意这也是个坑,,,)。由于有两人已经换了,为了止损,我们决定先不换剩下两人的700欧旅行支票,留着去银行换。
到了第三天,我们去了梵蒂冈那块儿玩,顺便去了附近American Express工作人员推荐的银行,还给中国银行打电话,结果均被告知不接受旅支。这可咋整?
这时刚好发现梵蒂冈周围有一堆change,于是又去问了问报价。其中有一家本来只报590多的,听见我们说另一家给了610多的价,说他们能给我们一个student discount,然后还算了算,报了个640。这下可好,我们开始发现这里面的门道了:其实哪有什么折扣,不过想找个借口吸引你罢了。这些change都是盈利性质的,你把旅支给了他们,他们再通过自己的途径卖给别的地方的American Express,中间可能有一点税收,但只要他们以比扣掉税收低的价格从你这里买下,他就一定能赚(一般还赚不少),不过是多赚点少赚点的区别罢了。而且当地有好几家change,我们主要发现了红色change标识的一家和蓝色的一家。若这家嫌你要求高不接受,那钱就让别家赚了呗。
所以这种时候,我们要想拿到高点的报价,就要掐准人家能接受的度(真的逼太狠了断了人家财路那就没辙了呀),然后通过让他们产生危机意识而提高报价。可以先问个几家,看他们一般会给多少,然后跟他说,别家给我了一个多少的价格。接下来这人可能就会开始打电话给上面的看能给个什么更高的价,叭叭一堆后给你一个略高一点的价格哈哈,你如果不太满意,可以再去找一家问问(不过要注意,如果是同一家的不同店面,要稍微注意点,毕竟他们上面的人可能是一个,说不定就记住你了)。一般来说,大致估估,如果说税可能是百分之二或三,那你起码还是得让人赚个20或30磅(当然你想试试再砍砍也可以,但可能难度会更大)。
于是我们最后两笔分别换的是640欧和645欧(645欧换了一家用类似方法换到的)。
以上就是所有关于旅支兑换的一些个人经历和小tips啦,当然这只是结合我们的个人体会总结的一些东西,还是要结合具体情况分析了。出去游玩肯定主要还是想多走走看看感受下,所以在经济条件允许的状况下也不建议大家在这件事上浪费太多时间,只要你自己觉得差不多能接受就行了。最后,还是想说,去意大利玩能不用旅行支票就还是别用了,毕竟真的挺麻烦还处处是坑!
[scode type=”info”]Experience One: Do not use traveler’s checks if possible[/scode]
[scode type=”info”]Experience Two: The minimum handling fee for travel exchange is around 4%[/scode]
If you don’t want to see the experience, you can directly transfer to the Tips where you can redeem traveler’s cheques at the end of the article!
During the Christmas holiday, I went to Europe with my roommates and a group of four on a DIY trip to 5 cities in Italy and Austria. Since the UK bank card has not been used for three months, it is not possible to apply for a visa by printing the record, so we chose another method-buying American Express’s Euro traveler’s cheque. As everyone knows, exchanging and using traveler’s checks is really a big pit.
According to the official website of traveler’s cheques, traveler’s cheques can be used directly in shops in many European cities. In this way, it’s definitely more cost-effective to spend it when traveling than to exchange it back in British pounds after returning to the UK. The British pound process requires a loss of 8%). Ran goose, we found through reading other people’s travel notes before departure that many stores in Europe cannot directly spend traveler’s checks (according to our actual travel situation later, we only saw the traveler’s check logo in several stores in Venice), so we When I decided to go, I changed all of them to Euros at the Red Marked Change at the airport.
But after I found the red Change at the first stop in Rome (pictured), I found that 700 euros could only give us more than 590 euros. This is really not the slightest loss. My subject checked the phone number of American Express on the spot. I called it and found that there is no location in Italy, but the other party suggested to change to the bank, saying that there is no loss (note that this is also a pit,,,). Since two people have already exchanged them, in order to stop the loss, we decided not to exchange the 700 Euro traveler’s cheques of the remaining two people, and kept them to the bank for exchange.
On the third day, we went to the Vatican to play. By the way, we went to the bank recommended by the staff of American Express nearby. We also called the Bank of China, but we were all told not to accept travel. How can this be neat?
At this time, I just found a bunch of changes around the Vatican, so I asked for a quote again. One of them originally only reported more than 590, but we heard that the other offered us a student discount of more than 610, and then it was a good deal and reported a 640. This is great, we are beginning to discover the doorway inside: there are actually no discounts, but I want to find an excuse to attract you. These changes are all profitable. You give them your travel, and they sell them to American Express elsewhere. There may be a little tax in the middle, but as long as they charge you at a lower price than the tax deducted If you buy it here, he will definitely make a profit (generally, he will make a lot of money), but it’s just the difference between earning more and less. And there are several changes in the local area. We mainly found the one with red change and the one with blue. If this family thinks that you are demanding and unacceptable, then the money will be made by others.
Therefore, at this time, if we want to get a higher offer, we have to pinpoint what is acceptable to others (it’s really too cruel to cut off people’s wealth, then it’s okay), and then let them have a sense of crisis. Increase the offer. You can ask a few companies first to see how much they generally give, and then tell him how much other companies give me a price. Next, this person may start to call the above to see what a higher price can be offered, and after a bunch of them, they will give you a slightly higher price. Haha, if you are not satisfied, you can ask another one. Ask (but be careful, if it is a different store in the same store, be careful, after all, there may be one person above them, maybe I will remember you). Generally speaking, if you say that the tax may be two or three percent, then you still have to earn a 20 or 30 pounds. (Of course, you can try to chop and chop again, but it may be more difficult. Big).
So our last two transactions were 640 Euros and 645 Euros respectively (645 Euros were replaced by a similar method).
The above is all the personal experiences and small tips about the exchange of travel expenses. Of course, these are just some things summarized based on our personal experience, we still need to analyze the specific situation. If you want to go out and play, you still want to walk around more to see how you feel. Therefore, it is not recommended that you waste too much time on this matter when economic conditions permit, as long as you feel that it is almost acceptable. Finally, I still want to say that if you don’t need traveler’s checks to play in Italy, you should not use it. After all, it is really troublesome and there are pits everywhere!
]]>一键激活win10家庭版,专业版,企业版,教育版 φ( ̄∇ ̄o)
Activate win10 Home Edition, Professional Edition, Enterprise Edition, Education Edition with one click φ( ̄∇ ̄o)
p.s. 如果不放心,请使用 方法二-源码安装
exe
程序->
仍然运行4
获取汉语翻译!!)脚本已发送到桌面
kms.bat
,如果不需要您可以删除它~
kms
或kms.bat
。->
仍然运行4
获取汉语翻译!!)您的激活码将保存在C:\Windows\kms.key
%temp%\kms.log
%temp%\kms.tried_keys
%temp%\kms.skms
%temp%\kms.ato
kms.bat
选择3
p.s. If you are not assured, please use Method Two-Source Installation
exe
program->
still running4
to get a Chinese translation!!)The script has been sent to the desktop
kms.bat
, you can delete it if you don’t need it~
kms
or kms.bat
in the run folder.->
still running4
to get a Chinese translation!!)Your activation code will be saved in C:\Windows\kms.key
%temp%\kms.log
%temp%\kms.tried_keys
on this machine%temp%\kms.skms
%temp%\kms.ato
kms.bat
and select 3
一分钟快速部署你自己的新型冠状病毒API ୧(๑•̀⌄•́๑)૭
Deploy your own new coronavirus API in one minute ୧(๑•̀⌄•́๑)૭
新型冠状病毒 实时数据 api
项目Git地址: iotcat/coro-api
项目npm地址: iotcat/coro-api
https://api.yimian.xyz/coro?province=山东
https://api.yimian.xyz/coro?city=泰安
https://api.yimian.xyz/coro?province=山东&city=泰安
nodeJS
支持express
任意版本git
任意版本1 | $ git clone https://github.com/iotcat/coro-api.git & cd coro-api |
1 | npm install |
1 | node index.js |
1 | http://localhost:17676 |
参数 | 描述 | 示例 |
---|---|---|
province | 省份(国家) | 山东 |
city | 城市 | 泰安 |
从index.js
第9行修改默认端口。
注释掉index.js
第13行。
1 | npm i -g pm2 |
将以下内容加入server{}
中
1 | location / { |
如果你不是从根目录映射,记得去index.js
中第11行app.get('/', f)
修改成你的路径。
爬虫使用coro-py, 请参考其文档。
本项目使用MIT协议,允许非署名商业非商业使用。武汉加油!中国加油!!❤
Novel coronavirus real-time data api
Project Git address: iotcat/coro-api
Project npm address: iotcat/coro-api
https://api.yimian.xyz/coro?province=Shandong
https://api.yimian.xyz/coro?city=泰安
https://api.yimian.xyz/coro?province=Shandong&city=Taian
nodeJS
supports any version of express
git
1 | $ git clone https://github.com/iotcat/coro-api.git & cd coro-api |
1 | npm install |
1 | node index.js |
1 | http://localhost:17676 |
Parameters | Description | Example |
---|---|---|
province | Province (Country) | Shandong |
city | city | Tai’an |
Modify the default port from line 9 of index.js
.
Comment out line 13 of index.js
.
1 | npm i -g pm2 |
Add the following content to server{}
1 | location / { |
If you are not mapping from the root directory, remember to go to the 11th line of index.js
and change app.get('/', f)
to your path.
The crawler uses coro-py, please refer to its documentation.
This project uses the MIT protocol, allowing non-signed commercial and non-commercial use. Go Wuhan! Go China! ! ❤
]]>自研香辣牛肉面做法~
Self-developed spicy beef noodle practice~
在英国留学,圣诞去欧洲旅游,DIY了意大利申根签证。现在游完归来,总结一份申根签攻略。
I studied in the UK, traveled to Europe on Christmas, and DIYed an Italian Schengen visa. Now come back from the tour, summarize a Schengen sign strategy.
Italy Consulate
joint travel confirmation letter
和护照复印件
joint travel confirmation letter
Booking Confirmation
上需要有paid
字样joint travel confirmation letter
和护照复印件
Booking
等知名网站订购最后展示一下我拿到的签证 ::aru:cheer::
Italy Consulate
joint travel confirmation letter
and a copy of passport
joint travel confirmation letter
paid
is required on Booking Confirmation
joint travel confirmation letter
and a copy of passport
Booking
Finally, let me show the visa I got~
先在这里留个空,以后慢慢填~
Leave a blank here first, then fill it in slowly~
φ( ̄∇ ̄o)
φ( ̄∇ ̄o)
]]>为了更清晰更直观的选择出明年居住的公寓,本文汇总了网络上对各公寓的评价信息,供决策参考。
In order to more clearly and intuitively choose the apartment to live in next year, this article summarizes the evaluation information of each apartment on the Internet for decision-making reference.
[scode type=”green”]大家积极在评论区补充哦,评论推荐使用qq邮箱[/scode]
[scode type=”yellow”]持续更新中…[/scode]
[scode type=”blue”]望大家能够补充更多房源,以便调查[/scode]
所有步行距离以Guild为中心!!
步行距离
: 8 min (西北)google地图
: Dover CourtOfficial Guide
: Dover Court优点
: 距Lidl近,安静,管理好,安全,定期有人清洁,social place好,楼下自习室很安静缺点
: 房间隔音一般,部分房间小,有的地方天花板低价格
: £155.54 pw (Last Year)步行距离
: 14 min (西)google地图
: Horizon Heights步行距离
: 13 min (西南)google地图
: St Luke’s View步行距离
: 11 min (西北)同学反映
: 不安静(老雷)步行距离
: 7 min (西北)步行距离
: 12 min (西)步行距离
: 12 min (南)步行距离
: 9 min (东)步行距离
: 9 min (东)步行距离
: 7 min (西)步行距离
: 9 min (西北) 步行距离
: 18 min (西南)步行距离
: 10 min (北)步行距离
: 10 min (西南)步行距离
: 13 min (西)步行距离
: 10 min (北)步行距离
: 18 min (西)步行距离
: 12 min (西北)其它
: 快递可以寄到Cambridge Court (梁斌)步行距离
: 8 min (南)google地图
: Cambridge Court缺点
: 隔音不好,地毯潮湿,条件差步行距离
: 21 min (西)缺点
: 一楼二楼隔音不好优点
: 回字形楼中间有一个小花园(娇娇,欣怡)[scode type=”green”] Everyone is actively adding in the comment area, comments recommend using qq mailbox[/scode]
[scode type=”yellow”]Continuously updating…[/scode]
[scode type=”blue”]I hope you can add more listings for investigation[/scode]
All walking distances are centered on Guild! !
walking distance
: 8 min (Northwest)google map
: Dover CourtOfficial Guide
: Dover CourtPros
: Close to Lidl, quiet, well managed, safe, cleaned regularly, good social place, quiet study room downstairsDisadvantages
: Room soundproofing is average, some rooms are small, and some places have low ceilingsPrice
: £155.54 pw (Last Year)walking distance
: 14 min (West)google map
: Horizon Heightswalking distance
: 13 min (southwest)google map
: St Luke’s ViewWalking distance
: 11 min (Northwest)Classmates' reflections
: Not quiet (Lao Lei)walking distance
: 7 min (Northwest)walking distance
: 12 min (West)Walking distance
: 12 min (South)walking distance
: 9 min (East)walking distance
: 9 min (East)walking distance
: 7 min (West)walking distance
: 9 min (Northwest)walking distance
: 18 min (southwest)walking distance
: 10 min (north)Walking distance
: 10 min (Southwest)walking distance
: 13 min (West)walking distance
: 10 min (north)walking distance
: 18 min (West)Walking distance
: 12 min (Northwest)Others
: Express can be sent to Cambridge Court (Liang Bin)walking distance
: 8 min (south)google map
: Cambridge CourtDisadvantages
: Poor sound insulation, damp carpets, poor conditionswalking distance
: 21 min (West)Disadvantages
: Sound insulation is not good on the first and second floorsAdvantages
: There is a small garden in the middle of Huizi Building (Jiaojiao, Xinyi)在英国留学与4个室友合租,为了更好的控制和监管公共支出,以及维持彼此之间的公共支出平衡,我利用迎新周三天时间设计并开发除了此ERP公共开支计划系统。希望此系统能够便捷接下来一年的生活,减少大家之间的矛盾,促使充满幸福感的公共支出项目持久化OωO
I studied in the UK and shared with 4 roommates. In order to better control and monitor public expenditures and maintain the balance of public expenditures between each other, I designed and developed this ERP public expenditure planning system during the welcome Wednesday. I hope that this system will make life easier for the next year, reduce conflicts between everyone, and promote the sustainability of public expenditure projects full of happiness OωO
前端基于一个网上找到的比特币网站平台模板,深度改造实现。值得一提的是,前端使用Ushio-js项目作为安全及日志插件,并得到了Ushio系统做背后支持。
后端使用php语言编写。提供5个接口,分别提供获取账户事件,获取内部流通信息,获取公共支出信息,获取周报表,操作的功能。
mail系统使用Yimian Mail API快速构建。
数据库使用yimian-db/mysql。构建了三个表,分别用于存储流水,公共支出详情,内部流通。
直接引用呓喵酱の图床代码,少量改写。
目前用额外网页简单实现,等待ushio-auth项目完成后统一整合。
没啥可说的,摆图,自己看
2020-03-22 更新
由于疫情原因,考虑到大家都已撤回中国。为节约服务器费用,停止提供服务。
结合过去半年运行状况,我做了一些分析总结:
2020-9-8 更新
基于Ushio用户系统,结合过去半年的运行情况和大家的需求变化,我重构并开发出了新一版的公共支出系统。
cp-acc现在已经对公众开放,您可以进入其网站进行体验。不过在体验前,您需要先通过ushio用户系统使用您的邮箱登录,以便接收账单消息。
The front end is based on a Bitcoin website platform template found on the Internet, and a deep transformation is realized. It is worth mentioning that the front end uses Ushio-js project as a security and logging plug-in, and got Ushio The system does behind the scenes.
The backend is written in php language. Provides 5 interfaces, which respectively provide the functions of obtaining account events, obtaining internal circulation information, obtaining public expenditure information, obtaining weekly statements, and operating.
The mail system is quickly constructed using Yimian Mail API.
The database uses yimian-db/mysql. Three tables are constructed, which are used to store flow, public expenditure details, and internal circulation.
Directly quote the code of 呓喵酱の图床 with a small amount of rewriting.
At present, it is simple to implement with additional web pages, waiting for the ushio-auth project to complete the unified integration.
2020-03-22 update
Due to the epidemic, considering that everyone has withdrawn to China. To save server costs, stop providing services.
Combining the operation status of the past six months, I have made some analysis and summary:
2020-9-8 update
Based on the Ushio user system, combined with the operation of the past six months and the changes in everyone’s needs, I reconstructed and developed a new version of the public expenditure system.
cp-acc is now open to the public, you can go to its website to experience it. But before the experience, you need to log in with your email address through the ushio user system in order to receive bill messages.
]]>这里是呓喵酱的语录API哦~
Hi~ This is the API of IoTcat’s Motto..
lang
: (可选)语言 e.g. lang
=en
(英语)/zh
(中文)1 | GET https://api.yimian.xyz/words/ |
1 | //随机获取一句中文语录 |
1 | 随机一句话 |
lang
: (optional) Language setting. e.g. lang
=en
(English)/zh
(Chinese)1 | GET https://api.yimian.xyz/words/ |
1 | //Get a random Chinese quotation |
1 | Random sentence.. |
封装好的网易云音乐API,欢迎大家调用━(`∀´)ノ亻!
The packaged NetEase Cloud Music API, welcome everyone to use ━(`∀´)ノ亻!
type
: (必填)模式类型 type
=single
单曲信息/playlist
歌单歌曲信息/url
获取歌曲/cover
获取封面/lrc
获取歌词id
: (必填,搭配type使用)歌单或歌曲id e.g. id
=198401123
random
: 仅对playlist有效,返回的歌曲是否打乱顺序,默认false
. e.g. random
=true
limit
: 返回歌单最大长度 e.g. limit
=10
歌单和歌曲的id可以从云音乐网页版获取。点开歌单或歌曲,查看浏览器地址栏,如下图:
1 | GET https://api.yimian.xyz/msc/ |
1 | //获取id为36308263的歌曲信息 |
single单曲模式:
1 | { |
playlist歌单模式:
1 | [ |
错误:
1 | {code: 500, err: "错误信息"} |
type
: (Required) Mode type type
=single
single information/playlist
song information/url
get song/cover
get cover/lrc
get lyricsid
: (Required, used with type) Playlist or song id e.g. id
=198401123
random
: Only valid for playlist, whether the returned songs are out of order, the default is false
. e.g. random
=true
limit
: return the maximum length of the playlist e.g. limit
=10
Playlist and song id can be obtained from Cloud Music Web Version. Click to open a playlist or song, and check the browser address bar, as shown below:
1 | GET https://api.yimian.xyz/msc/ |
1 | //Get song information with id 36308263 |
single mode:
1 | { |
Playlist playlist mode:
1 | [ |
Error:
1 | {code: 500, err: "error message"} |
基于Home Assisstant搭建综合家庭照明系统,多媒体系统,水流系统的智慧家庭。技术点:天猫精灵交互,LoRa通信,MQTT协议,frp内网穿透,NAS存储,拨动开关电路改造。
Based on Home Assisstant, build a smart home with integrated home lighting system, multimedia system and water flow system. Technical points: Tmall Genie interaction, LoRa communication, MQTT protocol, FRP intranet penetration, NAS storage, and toggle switch circuit transformation.
结合所学知识,运用前沿技术,造福生活,是我长期以来的不懈追求。为了让家人体验到更加稳定、舒适智能的生活方式,同时也为了巩固憨实先前在学校smartfarm项目和我自己的ushio系统中所积累的技术基础以及架构经验,我决定在出国前,使用20到23整天时间,重构家中老旧的物联网系统。采用分层架构和面向接口、面向测试、面向文档开发原则,以稳定性(Available),可靠性(Reliable)为最优先指标,搭建一个运行目标3年以上的高度模块化的,易于远程操控的,开源的家庭软件硬件智能传感控制系统。
大一上学期,初接触单片机,使用Arduino Uno搭建了一个宿舍中的智慧窗帘系统(细节可以参考这篇blog),积累了一定的经验。
大一暑假,开始尝试使用WiFiduino在家中控制一些物体,实现了对(坏了的)太阳能加水(通过电磁阀)的控制(修改了原先家里的管道,加入了电磁阀。跑了好多趟五金店,收获了不少关于水管的知识和实践经验。之后做surf的水泵也有用到。)以及对走廊灯(通过光电耦合器)的控制。找到一台废弃的10年前的我爸的IBM笔记本,装上了win server 2008, 并配置好了mysql数据库,并定期使用http从单片机采集数据。我用php写了一个简单的web界面,来展示相关信息,并实现网页控制。由于家里被分配的是中国移动分配的大NAT内网IP,因此使用frp来实现内网穿透,使外界可以访问家里服务器上的web网页。
大二寒假,改进先前的固件,使用wifiduino陆续实现了对厨房,客厅,餐厅的灯体的控制,并部署了一系列传感器,并接入网络。由于先前太阳能管道的单片机WiFi信号弱,于是在附近使用路由器做了桥接。值得一提的是,年三十晚上春晚开始前2分钟我还在家里停电施工,,不知道爸妈是什么感受⊙0⊙。。
大二暑假,基于本学期经验,重构系统。在服务器上,重装系统为Centos7使用home assistant 开源项目提供UI等服务,使用mqtt作为通信协议。使用nodeJS编写了灯控自动化和太阳能加水的控制逻辑。在单片机,更新了固件,支持ota远程更新固件(参考了部分wiot经验,但更加因地制宜)。此外,新增了两个流量计,以实现太阳能加水完全自动化(之前是通过网页设置加水时长)。由于流量计WiFi信号弱,我们使用了Arduino uno + LoRa作为通信手段。本次设计,结合爸妈的意见,充分考虑了整体系统的稳定性。比如,如何handle各种类型的错误和失联,如何在断电后丝滑得重启,如何在服务器无响应情况下保证单片机不紊乱,如何在系统失控后物理切回到手动(比如灯,和太阳能加水)。
大三暑假,基于过去积累的传感器数据,使用LSTM模型,通过keras+tensorflow训练神经网络,实现对灯控状态的预测。目前仍在持续优化中,预计9月前完成。此外,有计划接入天猫精灵的打算(仍在队列中,需等待ushio oauth系统的研发,ushio oauth系统需要等待ushio user系统研发,ushio user系统需要稳定的js-session作为支撑,js-session需要使用fp来精确识别用户设备。。目前fp仍处于第三测试阶段。所以,一步一步来吧,,)。
使用Arduino UNO作为计算单元。一方面,Arduino Uno拥有高可靠性,我之前的智慧窗帘系统使用Arduino Uno作为主控板,平稳运行1年半未出现硬件问题。另一方面,Arduino Uno拥有较大的RAM,无需为了争夺RAM而在单片机编程上煞费苦心。
Arduino UNO的缺陷主要是价格高,但是为保障长期稳定运行,这个成本是必要的。
使用ESP-01作为WiFi的通信模块。主要原因是之前学校课程使用过ESP-01搭建遥控小车,对其工作方式和性能比较了解,降低开发成本。
使用安信可 LORA RA-02 LORA作为LoRa节点和LoRa网关通信模块。原因是surf项目使用的就是这个模块,比较了解它。
智能音箱作为此物联网系统人机交互的最主要界面,发挥着举足轻重的作用。经研究,我使用天猫精灵方糖R作为家用智能音箱。一方面,天猫精灵的性价比摆在那里,非常便宜。第二,与小米开发小爱同学不同,阿里开发天猫精灵的目的是提供平台,它允许开发者以各种形式接入其网络,这一点对我至关重要。
初期设想: 单向控制+复位器。
实际实现:将原有单开改造为双开,一路与继电器串联,另一路与两个pin口相连。
采用WiFi+LoRa两种通信模式。在需要高速高质量通信的场景,如天猫精灵,手机,笔记本,使用WiFi作为通信手段。在WiFi信号不稳定的地方,使用LoRa进行通信。使用MQTT为应用层协议。
使用python3开源项目Home Assistant 为基础搭建本项目的主控系统。效果如下图:
多媒体主要由天猫精灵提供。此外,通过小米盒子,家庭网盘中的视频,图片,音乐实现了电视与音响上的播放。
dns.yimian.xyz提供dns解析服务。
通过挂载从老电脑上拆卸的闲置500G机械硬盘到老IBM服务器,实现存储系统的搭建。
对局域网内,由于家里都是win系统,使用smb作为共享协议实现文件传输,支持局域网内挂载。速度稳定,全网读写10MB/s左右。对外网访问,通过http,frp反代实现,但速度较慢。
以下是对网页界面的一个截屏:
2020.6 更新
基于先前积累的人体传感器数据,通过LSTM模型,使用keras训练神经网络,实现对开灯状态的预测。
2020.8 更新
自建了OAuth服务器,实现了天猫精灵的接入。
Combining the knowledge I have learned and using cutting-edge technology to benefit life has been my unremitting pursuit for a long time. In order to let my family experience a more stable, comfortable and intelligent lifestyle, and to consolidate the technical foundation and architecture experience accumulated in the school smartfarm project and my own ushio system, I decided to use 20 to 23 before going abroad. All day long, reconstruct the old IoT system at home. Adopt a layered architecture and interface-oriented, test-oriented, and document-oriented development principles, with Available and Reliable as the highest priority indicators to build an operational target 3. A highly modular, easy-to-remote control, open source home software and hardware intelligent sensor control system for more than years.
In the first semester of the freshman year, I was new to MCU and used Arduino Uno to build a smart curtain system in the dormitory (for details, please refer to this blog -on-wifiduino.html)), has accumulated a certain amount of experience.
Freshman summer vacation, I began to try to use WiFiduino to control some objects at home, and realized the control of (broken) solar water (through solenoid valve) (modified the original home pipes and added solenoid valves. I went to the hardware store many times. , I have gained a lot of knowledge and practical experience on water pipes. Later, I will also be useful to do surf pumps.) and control the corridor lights (through photocouplers). I found an abandoned IBM laptop of my dad 10 years ago, installed it with win server 2008, and configured the mysql database, and regularly used http to collect data from the microcontroller. I wrote a simple web interface in php to display relevant information and implement web control. Since the home is assigned a large NAT intranet IP allocated by China Mobile, frp is used to achieve intranet penetration, so that the outside world can access the web pages on the home server.
During the sophomore winter vacation, the previous firmware was improved, wifiduino was used to control the lights in the kitchen, living room, and dining room one after another, and a series of sensors were deployed and connected to the network. Because the WiFi signal of the single-chip microcomputer of the solar energy pipeline was weak, a router was used nearby to bridge. It is worth mentioning that on the night of New Year’s Eve, I was still at home with a power outage 2 minutes before the start of the Spring Festival Gala. I don’t know how my parents feel. .
Sophomore summer vacation, based on the experience of this semester, reconstruct the system. On the server, the reinstallation system provides UI and other services for Centos7 to use the home assistant open source project, using mqtt as the communication protocol. Use nodeJS to write the control logic of light control automation and solar water adding. In the single chip microcomputer, the firmware is updated, and the ota remote firmware update is supported (referring to some Wiot experience, but more tailored to local conditions). In addition, two new flow meters have been added to fully automate the solar water addition (previously, the water addition time was set through the web page). Due to the weak WiFi signal of the flowmeter, we used Arduino uno + LoRa as the communication means. This design, combined with the opinions of parents, fully considered the stability of the overall system. For example, how to handle various types of errors and loss of connection, how to restart after a power failure, how to ensure that the MCU is not disordered when the server is unresponsive, and how to physically switch back to manual after the system is out of control (such as lights, and Solar energy plus water).
In the summer vacation of the junior year, based on the sensor data accumulated in the past, the LSTM model is used to train the neural network through keras+tensorflow to realize the prediction of the light control state. The optimization is still ongoing and is expected to be completed before September. In addition, there are plans to connect to the Tmall Wizard (still in the queue, waiting for the development of the ushio oauth system, the ushio oauth system needs to wait for the development of the ushio user system, and the ushio user system needs stable js-session as support, js-session Need to use fp to accurately identify user equipment.. Currently fp is still in the third test stage. So, let’s do it step by step,,).
Use Arduino UNO as the calculation unit. On the one hand, Arduino Uno has high reliability. My previous smart curtain system used Arduino Uno as the main control board, and it ran smoothly for one and a half years without hardware problems. On the other hand, Arduino Uno has a larger RAM, so there is no need to bother to program the microcontroller in order to compete for RAM.
The main disadvantage of Arduino UNO is its high price, but this cost is necessary to ensure long-term stable operation.
Use ESP-01 as the WiFi communication module. The main reason is that the ESP-01 has been used to build a remote control car in the previous school courses, and I have a better understanding of its working methods and performance to reduce development costs.
Use Anxinke LORA RA-02 LORA as the communication module between LoRa node and LoRa gateway. The reason is that this module is used in the surf project, so I understand it better.
As the most important interface for human-computer interaction in this IoT system, smart speakers play a pivotal role. After research, I use Tmall Elf Sugar R as a home smart speaker. On the one hand, the price/performance ratio of Tmall Genie is very cheap. Second, unlike Xiaomi’s development of Xiao Ai, the purpose of Ali’s development of Tmall Genie is to provide a platform that allows developers to access its network in various forms, which is very important to me.
Initial idea: one-way control + reset device.
Actual realization: The original single-opening is transformed into double-opening, one is connected in series with the relay, and the other is connected with two pin ports.
Two communication modes of WiFi+LoRa are adopted. In scenarios that require high-speed and high-quality communication, such as Tmall Genie, mobile phones, and notebooks, use WiFi as a means of communication. In places where the WiFi signal is unstable, use LoRa for communication. Use MQTT as the application layer protocol.
Use the python3 open source project Home Assistant as the basis to build the main control system of this project. The effect is as follows:
Multimedia is mainly provided by Tmall Genie. In addition, through the Xiaomi box, the video, pictures, and music in the home network disk can be played on the TV and stereo.
dns.yimian.xyz provides dns resolution service.
By mounting the idle 500G mechanical hard disk removed from the old computer to the old IBM server, the storage system is built.
In the local area network, since the home is a win system, smb is used as a sharing protocol to realize file transfer and supports mounting in the local area network. The speed is stable, and the whole network reads and writes about 10MB/s. Access to the external network is realized through http and frp reverse generation, but the speed is slow.
The following is a screenshot of the web interface:
2020.6 update
Based on the previously accumulated human sensor data, the LSTM model is used to train the neural network using keras to realize the prediction of the light state.
2020.8 update
Self-built OAuth server has realized the access of Tmall Wizard.
]]>本文详细介绍了XJTLU大学2019暑期科研SmartFarming Proj物联网架构的设计思路,实施情况以及缺陷反思。
This article introduces in detail the design ideas, implementation status and defect reflections of the SmartFarming Proj IoT architecture of XJTLU University’s 2019 summer scientific research.
为了探究农业物联网技术的可行性,Alam Mohammed导师希望我们能够提供一个稳定(Available)并可靠(Reliable)的物联网系统,以实现对农田的智能监控和管理。这个系统将能够适时地探测土壤以及空气中与植物健康相关的参数,处理并存储这些数据(由Alam提出)。同时,自动化控制的灌溉功能(由Caleb提出)以及一些数据展示方法(由Alam提出的可选需求)也被期待由本系统提供。
由于是针对农业物联网设计的小型科研项目,项目的目标是对农业物联网的可行性进行探究,愿景是模拟最普遍的小型农业物联网应用场景。因此本架构的定位是适用于大部分具备感知,控制和展示功能的小型农业物联网工程。
MQTT
: MQTT消息队列遥测传输(Message Queuing Telemetry Transport)是ISO 标准(ISO/IEC PRF 20922)下基于发布/订阅范式的消息协议。它工作在 TCP/IP协议族上,是为硬件性能低下的远程设备以及网络状况糟糕的情况下而设计的发布/订阅型消息协议[1]。
LoRa
: LoRa是当前市场上的一种新兴技术,其在1 GHz以下的公共频段中运行,用于远距离低功耗通信[2]。
本架构功能性需求主要包括土地数据采集,气象数据采集,灌溉系统控制,与无人机小组系统进行交互,网页控制台(可查看实时和历史传感数据,指标数据;能够控制系统)。
通信范围(测试)
:半径不低于1km通信范围(生产)
:半径不低于3km延时
:平均小于1s超时率
:不超过5%资源占用
:节点RAM不超过2k运行周期
:1分 (测试) | 15分 (生产)节点名称 | 硬件设施 | 软件集群 |
土地节点 Ground Nodes | Arduino Nano | Arduino.h |
SX1278 LORA模块 | SPI.h | |
LM35DZ 温度传感 | LoRa.h | |
土壤湿度传感 | LoRa-Socket.h | |
四分电磁阀 | LoRa-mqtt.h | |
vector.h | ||
气象站节点 Air Station | Arduino Nano | Arduino.h |
SX1278 LORA模块 | SPI.h | |
BME280 温度,湿度,大气压强传感 | LoRa.h | |
GY-30 光强传感 | LoRa-Socket.h | |
MQ-135 空气质量传感 | LoRa-mqtt.h | |
MQ-7 一氧化碳传感 | vector.h | |
雨量传感 | ||
LoRa 网关 LoRa Gateway | SX1278 | Arduino.h |
SPI.h | ||
WiFi.h | ||
LoRa.h | ||
LoRa-Socket.h | ||
LoRa-mqtt.h | ||
vector.h | ||
PubSubClient.h | ||
内网控制器/MQTT代理 Controler/MQTT Proxy | 树莓派3B - RASPBIAN | Python3.7 |
直流变频水泵 | NodeJS | |
sf-mqtt-proxy@npm | ||
sf-pump@npm | ||
forever@npm | ||
云服务器 Cloud Server | 华为云主机 - Centos7.4 | Nginx/1.12.2 |
NodeJS/12.4.0 | ||
Redis/3.2.12 | ||
sf-mqtt-broker@npm | ||
sf-web-api@npm | ||
forever@npm | ||
数据库 Database | 华为云数据库 | MySQL 5.7.23 |
按照生产场景预估,每15分钟产生一组数据集合,一组数据集合约占用253-291字节。按照291计算,每天将新增27.93KB数据。
为了优先确保通信以及服务的稳定性和可拓展性,我们选取分层模型作为架构的设计模式。整个系统分成多个层级,层级之间具备必要的交互行为。每个层级都独立运行,崩溃时会迅速重启,具备高度的可靠性。
安全上,采取内外网隔离的方法。内网中考虑到部分设备计算资源稀缺,与内网服务器的交互采用不加密的通信模式。内网服务器通过SSL加密的方式与云服务器进行交互。为了确保客户端的资料安全,云服务器API只接受具备SSL加密的HTTP和WebSocket请求。
本架构的主要目的是提供一个稳定(Available)并可靠(Reliable)的物联网系统,通过采集农田中的实时数据,结合通过无人机采集的图片以及CNN判断的植物健康情况,实现对灌溉系统以及植物健康状况的智能管理。本架构理论上适用于大部分农场环境。测试环境半径2~5km(取决于天线)以内,风力3级以下。本系统通过传感器获取农田数据,通过晶体管电路,继电器等控制灌溉系统,通过网页与API与管理者进行交互。
此图展示了此架构的抽象层级结构。正如其所指出的,此分层架构可明确为感知层,网络层,应用层三个横向操作层以及一个纵向错误处理层。
其中,感知层又可细化为环境层以及硬件层。环境层中包含植物,土壤,空气,水流等我们要检测和控制的自然物体,硬件层通过传感器、控制器等人造电气设备为系统对自然要素的交互行为(检测,控制)提供了底层技术可行性。当感知层实现对自然信息的交互后,相应的数字信息被传往网络层进行通信。相应的,感知层也会从网络层接受相应的控制信息,并根据这些指令做出相应的控制行为。
网络层分为三层。其中最低一层为预处理层,它的主要任务是对感知层采集的数据进行打包处理,转变成网络流通所适合的形式,如套接字。因此,预处理层需要少量的计算存储资源,比如单片机,EEPROM等。经过预处理层的封装后,数据被传往物理层。基于物理层中的网关、路由器等设备,这些数据包得以被有秩序的分发和传递。通信层中的MQTT协议的应用,使得这些数据包分发的管理更加高效与便利。此外,通信层中QoS服务质量检测体系的实施也使得网络层的性能更加的容错和可靠。
应用层主要负责一些应用层面的服务于业务逻辑,比如数据分析,事件处理等。在应用层的最底端,服务层在长期的运转着。服务层是应用层中最近接网络层的部分,它的主要目的是实时处理从网络层传入的数据,并对相应的请求及错误事件进行快速响应。同时,服务层也负责将传感器采集的数据进行整理分析并传递到数据库层进行存储。为了保证服务的可靠性,服务层的实现程序被注册为系统服务并由专门的守护进程进行守护。与服务层的长期运行不同,业务层则是按需唤起。当界面层有新的请求传入或服务层发生特定的事件时,业务层将会被调用并处理它们。除了一些基础的数据分析外,业务层也有权限向AI层进行分析请求。AI层通过分析从无人机传回的图像数据后,会传回一个判断结果给业务层。根据请求的具体内容,业务层会将图像识别结果,历史传感器数据等进行整理,并传递到界面层。界面层则主要用来提供不同形式的接口,比如HTTP接口和WebSocket接口,以方便客户端调用。
从拓扑结构来看,如上图所示,整个系统物理上可划分为土地节点,气象节点,LoRa网关,内网服务器,云服务器,数据库和用户终端。
从功能机制上看,整个系统包含:传感器模块,LoRa通信模块,LoRa网关模块,MQTT-Proxy代理模块,水泵控制模块,MQTT+数据处理模块,web接口模块,守护进程模块和数据库模块。
土地节点
土地节点部署于不同区域的农田中,用于探测土壤温度,湿度参数,并能够提供对相应位置水流电磁阀的控制。土地节点使用Arduino Nano作为计算单元,使用LoRa作为通信方式连接LoRa网关(和其它节点),使用电池供电。其数量较多,工作环境恶劣,无线通信不稳定,是系统中最大的不确定性来源。
气象节点
气象节点部署于农田特定位置,用于探测空气温度,湿度,大气压,降雨量,光照,NH3浓度,CO浓度等气象参数。气象节点使用Arduino Nano作为计算单元,使用LoRa作为通信方式连接LoRa网关(和土地节点),使用电池或有线供电。其工作环境较为恶劣,无线通信质量一般。
LoRa网关
LoRa网关部署于室内,为扩大有效通信半径,其天线可延伸至室外。LoRa网关通过LoRa连接各土地节点和气象节点,通过WiFi连接内网服务器。LoRa网关能够将通过LoRa传入的socket包转换为mqtt消息并传递给内网服务器,以及将内网服务器传来的mqtt消息转换为socket包通过LoRa发送至指定节点。
内网服务器
内网服务器是一个树莓派3B,它包含三个功能模块:MQTT-Proxy代理模块,水泵控制模块以及守护进程模块。
MQTT-Proxy代理模块能够接收由LoRa网关通过WiFi发送的mqtt消息,对其进行SSL加密并转发至云服务器。同时,MQTT-Proxy代理模块也将接受指定的来自云服务器的mqtt消息,将其解密并转发至LoRa网关。
水泵控制模块通过树莓派的GPIO通过继电器控制水泵的状态。与水泵控制模块直接与云服务器进行mqtt通信,不经过MQTT-Proxy代理。
守护进程模块运行在Linux上,用于监视MQTT-Proxy代理模块和水泵控制模块。当探测到模块停止运行时,守护进程模块会及时重启这些模块,以确保服务的稳定性和连续性。
云服务器
云服务器运行在位于北京的华为云上,包含MQTT+数据处理模块,web接口模块和守护进程模块。
MQTT+数据处理模块包含了层级结构中的Service层和Business层。这个模块通过mqtt与内网进行通信,通过mqtt, redis与web接口模块(和AI模块)进行交互。当收到来自内网的各种散列的数据后,本模块会自动对它们进行聚合,整理成一条一条的数据,存入数据库,并通过redis推送给web接口模块。此外,本模块会定时向各节点发送请求以获取它们的数据,这些请求将被追踪以计算延时。
web接口模块提供一系列的HTTP和WebSocket接口。这些接口可用于获取数据,发送指令,刷新数据以及获取推送消息。
守护进程模块运行在Linux上,用于监视MQTT+数据处理模块和web接口模块。当探测到模块停止运行时,守护进程模块会及时重启这些模块,以确保服务的稳定性和连续性。
LoRa通信模块用于在单信道情况下实现稳定可靠的socket通信。本模块包含LoRa-socket和LoRa-mqtt。
LoRa-socket是在LoRa-Arduino的基础上进行了数据包的封装,实现了简单的udp和tcp通信,让传统的LoRa通信更加可靠。通过在数据包的head添加收发ip地址,以及在数据包的最后添加hash校验值,LoRa-socket支持点对点通信和广播通信,并且具有强大的噪音处理能力和数据防篡改能力。
项目地址:iotcat/LoRa-socket
LoRa-mqtt是在LoRa-socket基础上对mqtt协议进行的一个简单再现。基于udp和tcp,LoRa-mqtt支持qos为0和1的mqtt通信。
项目地址:iotcat/LoRa-mqtt
本模块运行在内网服务器,实现了对内网mqtt的加密转发。
项目地址:iotcat/sf-mqtt-proxy
本模块运行在内网服务器,实现了通过GPIO对继电器水泵的控制。
项目地址:iotcat/sf-pump
本模块运行在云服务器,实现了对来自底层mqtt消息的数据聚合,处理和存储。
项目地址:iotcat/sf-mqtt-broker
本模块运行在云服务器,实现了功能性接口的提供。
项目地址:iotcat/sf-web-api
上图展示了土地节点(左),气象节点(右),水泵(下)的延时统计折线图。由图可以看出,土地节点的平均延时在730ms左右,气象节点延时在900ms左右,水泵的延时较低,在45ms左右。
Reference List:
[1] OASIS, (2015,12.10). MQTT Version 3.1.1 Plus Errata 01 [Online]. Available: https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt-v3.1.1-errata01-os-complete.html
[2] Sinha, R.S., Wei, Y. and Hwang, S.H., “A survey on LPWA technology: LoRa and NB-IoT”, in Ict Express, 3(1), pp.14-21, 2017.
In order to explore the feasibility of agricultural Internet of Things technology, instructor Alam Mohammed hopes that we can provide a Available and Reliable Internet of Things system to realize intelligent monitoring and management of farmland. This system will be able to timely detect the parameters related to plant health in the soil and the air, process and store these data (proposed by Alam). At the same time, the automatic control irrigation function (proposed by Caleb) and some data display methods (optional requirements proposed by Alam) are also expected to be provided by this system.
As it is a small scientific research project designed for the agricultural Internet of Things, the goal of the project is to explore the feasibility of the agricultural Internet of Things, and the vision is to simulate the most common small-scale agricultural Internet of Things application scenarios. Therefore, the positioning of this architecture is applicable to most small agricultural IoT projects with sensing, control and display functions.
MQTT
: MQTT Message Queuing Telemetry Transport is a message protocol based on the publish/subscribe paradigm under the ISO standard (ISO/IEC PRF 20922). It works on the TCP/IP protocol suite and is a publish/subscribe message protocol designed for remote devices with low hardware performance and poor network conditions [1].
LoRa
: LoRa is an emerging technology in the current market, which operates in the public frequency band below 1 GHz for long-distance low-power communication [2].
The functional requirements of this architecture mainly include land data collection, weather data collection, irrigation system control, interaction with the drone group system, web console (can view real-time and historical sensor data, index data; be able to control the system).
Communication range (test)
: the radius is not less than 1kmCommunication range (production)
: the radius is not less than 3kmDelay
: average less than 1sTimeout rate
: no more than 5%Resource occupation
: Node RAM does not exceed 2kRun cycle
: 1 minute (test) | 15 minutes (production)Node name | Hardware facilities | Software cluster |
Ground Nodes Ground Nodes | Arduino Nano | Arduino.h |
SX1278 LORA module | SPI.h | |
LM35DZ temperature sensor | LoRa.h | |
土壤湿度传感 | LoRa-Socket.h | |
Four-point solenoid valve td> | LoRa-mqtt.h | |
vector.h | ||
weather station node Air Station | Arduino Nano | Arduino.h |
SX1278 LORA module | SPI.h | |
BME280 温度,湿度,大气压强传感 | LoRa.h | |
GY-30 light intensity sensor | LoRa-Socket.h | |
MQ-135 air quality sensor | LoRa-mqtt.h | |
MQ-7 carbon monoxide sensor< /a> | vector.h | |
rainfall sensor | ||
LoRa Gateway LoRa Gateway | SX1278 | Arduino.h |
SPI.h | ||
WiFi.h | ||
LoRa.h | ||
LoRa-Socket.h | ||
LoRa-mqtt.h | ||
vector.h | ||
PubSubClient.h | ||
Intranet Controller/MQTT Proxy Controler/MQTT Proxy | Raspberry Pi 3B-RASPBIAN | Python3.7 |
DC frequency conversion water pump | NodeJS | |
sf-mqtt-proxy@npm | ||
sf-pump@npm | ||
forever@npm | ||
Cloud Server Cloud Server | Huawei Cloud Host-Centos7.4 | Nginx/1.12.2 |
NodeJS/12.4.0 | ||
Redis/3.2.12 | ||
sf-mqtt-broker@npm | ||
sf-web-api@npm | ||
forever@npm | ||
Database Database | Huawei Cloud Database | MySQL 5.7.23 |
According to the production scenario, a data set is generated every 15 minutes, and a data set occupies about 253-291 bytes. According to 291 calculation, 27.93KB of data will be added every day.
In order to prioritize to ensure the stability and scalability of communication and services, we select layered model as the design mode of the architecture. The entire system is divided into multiple levels, with necessary interactions between levels. Each level runs independently, restarts quickly when it crashes, and has a high degree of reliability.
In terms of safety, the method of internal and external network isolation is adopted. Taking into account the scarcity of computing resources of some devices in the intranet, the interaction with the intranet server adopts an unencrypted communication mode. The intranet server interacts with the cloud server through SSL encryption. To ensure the security of the client’s data, the cloud server API only accepts HTTP and WebSocket requests with SSL encryption.
The main purpose of this architecture is to provide a stable (Available) and reliable Internet of Things system, which collects real-time data in farmland, combines pictures collected by drones and judged by CNN Plant health, realize intelligent management of irrigation system and plant health. This framework is theoretically suitable for most farm environments. The test environment is within a radius of 2~5km (depending on the antenna), and the wind is below level 3. This system acquires farmland data through sensors, controls the irrigation system through transistor circuits, relays, etc., and interacts with managers through web pages and APIs.
This figure shows the abstract hierarchy of this architecture. As pointed out, this layered architecture can be clearly defined as the perception layer, network layer, application layer, three horizontal operation layers, and a vertical error handling layer.
Among them, the perception layer can be further refined into environment layer and hardware layer. The environment layer contains plants, soil, air, water and other natural objects that we want to detect and control. The hardware layer provides the underlying technology for the system’s interactive behavior (detection, control) of natural elements through artificial electrical devices such as sensors and controllers. Sex. When the perception layer realizes the interaction of natural information, the corresponding digital information is transmitted to the network layer for communication. Correspondingly, the perception layer will also receive corresponding control information from the network layer, and make corresponding control actions according to these instructions.
Network layer is divided into three layers. The lowest layer is the preprocessing layer. Its main task is to package the data collected by the perception layer and transform it into a form suitable for network circulation, such as sockets. Therefore, the pre-processing layer requires a small amount of computing storage resources, such as a single-chip microcomputer, EEPROM, etc. After encapsulation by the preprocessing layer, the data is transmitted to the physical layer. Based on devices such as gateways and routers in the physical layer, these data packets can be distributed and transmitted in an orderly manner. The application of the MQTT protocol in the communication layer makes the management of these data packet distribution more efficient and convenient. In addition, the implementation of the QoS service quality detection system in the communication layer also makes the performance of the network layer more fault-tolerant and reliable.
Application layer is mainly responsible for some application-level services for business logic, such as data analysis, event processing, etc. At the bottom of the application layer, the service layer is running for a long time. The service layer is the closest part of the application layer to the network layer. Its main purpose is to process the incoming data from the network layer in real time and respond quickly to corresponding requests and error events. At the same time, the service layer is also responsible for sorting and analyzing the data collected by the sensors and passing it to the database layer for storage. In order to ensure the reliability of the service, the implementation program of the service layer is registered as a system service and guarded by a special daemon. Unlike the long-term operation of the service layer, the business layer is invoked on demand. When a new request comes in from the interface layer or a specific event occurs in the service layer, the business layer will be called and processed. In addition to some basic data analysis, the business layer also has the authority to make analysis requests to the AI layer. AI layer After analyzing the image data returned from the drone, it will send back a judgment result to the business layer. According to the specific content of the request, the business layer will organize the image recognition results, historical sensor data, etc., and pass them to the interface layer. Interface layer is mainly used to provide different forms of interfaces, such as HTTP interface and WebSocket interface, to facilitate client calls.
From the topological structure, as shown in the figure above, the entire system can be physically divided into land nodes, weather nodes, LoRa gateways, intranet servers, cloud servers, databases and user terminals.
From the perspective of functional mechanism, the entire system includes: sensor module, LoRa communication module, LoRa gateway module, MQTT-Proxy proxy module, water pump control module, MQTT+ data processing module, web interface module, daemon module and database module.
Land Node
Land nodes are deployed in farmland in different regions to detect soil temperature and humidity parameters, and can provide control of water flow solenoid valves at corresponding locations. The land node uses Arduino Nano as the computing unit, uses LoRa as the communication method to connect to the LoRa gateway (and other nodes), and uses battery power. Its large number, harsh working environment and unstable wireless communication are the biggest source of uncertainty in the system.
Weather Node
Meteorological nodes are deployed at specific locations in farmland to detect meteorological parameters such as air temperature, humidity, atmospheric pressure, rainfall, light, NH3 concentration, and CO concentration. The weather node uses Arduino Nano as the computing unit, uses LoRa as the communication method to connect to the LoRa gateway (and the land node), and uses battery or wired power. The working environment is harsh and the wireless communication quality is average.
LoRa Gateway
The LoRa gateway is deployed indoors. In order to expand the effective communication radius, its antenna can be extended outdoors. The LoRa gateway connects to various land nodes and weather nodes through LoRa, and connects to the intranet server through WiFi. The LoRa gateway can convert the socket packet incoming through LoRa into an mqtt message and pass it to the intranet server, and convert the mqtt message from the intranet server into a socket packet and send it to the designated node through LoRa.
Intranet server
The intranet server is a Raspberry Pi 3B, which contains three functional modules: MQTT-Proxy proxy module, water pump control module and daemon process module.
MQTT-Proxy proxy module can receive the mqtt message sent by the LoRa gateway via WiFi, encrypt it with SSL and forward it to the cloud server. At the same time, the MQTT-Proxy proxy module will also accept the specified mqtt message from the cloud server, decrypt it and forward it to the LoRa gateway.
Water pump control module The state of the water pump is controlled through a relay through the GPIO of the Raspberry Pi. The mqtt communication with the water pump control module directly communicates with the cloud server without passing through the MQTT-Proxy proxy.
Daemon module runs on Linux and is used to monitor the MQTT-Proxy proxy module and the water pump control module. When modules are detected to stop running, the daemon module will restart these modules in time to ensure the stability and continuity of services.
Cloud Server
The cloud server runs on Huawei Cloud located in Beijing and includes MQTT+ data processing module, web interface module and daemon module.
MQTT+data processing module includes the Service layer and the Business layer in the hierarchical structure. This module communicates with the intranet through mqtt, and interacts with the web interface module (and AI module) through mqtt and redis. After receiving various hashed data from the intranet, this module will automatically aggregate them, organize them into one piece of data, store it in the database, and push it to the web interface module through redis. In addition, this module will periodically send requests to each node to obtain their data, and these requests will be tracked to calculate the delay.
web interface module provides a series of HTTP and WebSocket interfaces. These interfaces can be used to get data, send instructions, refresh data, and get push messages.
Daemon module runs on Linux and is used to monitor MQTT+ data processing module and web interface module. When modules are detected to stop running, the daemon module will restart these modules in time to ensure the stability and continuity of services.
The LoRa communication module is used to realize stable and reliable socket communication in a single channel. This module includes LoRa-socket and LoRa-mqtt.
LoRa-socket encapsulates data packets on the basis of LoRa-Arduino, realizes simple udp and tcp communication, and makes traditional LoRa communication more reliable. By adding the sending and receiving ip address to the head of the data packet, and adding the hash check value at the end of the data packet, LoRa-socket supports point-to-point communication and broadcast communication, and has powerful noise processing capabilities and data tamper resistance.
Project address: iotcat/LoRa-socket
LoRa-mqtt is a simple reproduction of the mqtt protocol based on LoRa-socket. Based on udp and tcp, LoRa-mqtt supports mqtt communication with qos 0 and 1.
Project address: iotcat/LoRa-mqtt
This module runs on the intranet server and realizes the encrypted forwarding of the intranet mqtt.
Project address: iotcat/sf-mqtt-proxy
This module runs on the intranet server and realizes the control of the relay water pump through GPIO.
Project address: iotcat/sf-pump
This module runs on the cloud server and realizes the data aggregation, processing and storage of the underlying mqtt messages.
Project address: iotcat/sf-mqtt-broker
This module runs on the cloud server and realizes the provision of functional interfaces.
Project address: iotcat/sf-web-api
The figure above shows the line graphs of the delay statistics of the land node (left), the weather node (right), and the water pump (bottom). It can be seen from the figure that the average delay of the land node is about 730ms, the delay of the weather node is about 900ms, and the delay of the water pump is relatively low, about 45ms.
Click here to view the weather sensor data of 2019-7-31
Reference List:
[1] OASIS, (2015,12.10). MQTT Version 3.1.1 Plus Errata 01 [Online]. Available: https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt -v3.1.1-errata01-os-complete.html
[2] Sinha, R.S., Wei, Y. and Hwang, S.H., “A survey on LPWA technology: LoRa and NB-IoT”, in Ict Express, 3(1), pp.14-21, 2017.
]]>