Commit fd927cab authored by frank.chen's avatar frank.chen

fgggger

parent e492a937
## 概述
- 非 dsp 广告才执行该过滤。
- 根据广告位和包名,设置是否执行过滤。
- 有新旧两个库(redis hash)来存放已安装app。
## 广告位和包名
- redis
```
ssp:pos:app:filter:installed
```
## 旧库
- 周期更新
- redis
```
redis 名称 userApps
key userapps:[uid]
字符串类型,json格式
例如:
redis-cnlft3byb4ipoiubz.redis.ivolces.com:6379> get userapps:NmFjYWI1NmEwNWFhYWRiNTQ0YjgwODVmMTQzOTAzNDgxYTU0N2YyM2E3NjhhM2NkYzVhNTBmZjZjZThiZTE1NA==
{"apps":["18564","18565","19038","16769","17662","20583","9964","17731","19088","17085","13484","12589","18026","10993","11436","6274","14058"]}
```
- 存的是 appid,程序读出来后,生成 appid列表 和包名列表,包名列表会去重。
- 判定已安装时,两个列表都检查。
## 新库
- 实时更新
```
redis 名称 userApps
key InTime_INST_APP_[uid]
hash 类型,
例如:
redis-cnlft3byb4ipoiubz.redis.ivolces.com:6379> hgetall InTime_INST_APP_ZGM3MzYwN2NjZTFlZDA5MDgwZjY0MGY1YTM5YzMxMDJhOGI2YjgzZWYzNmFlYTgyMzVhMTUyMTg5MGE5NDYxOQ==
com.phoenix.read
1761738250782
com.baidu.searchbox
1761738362220
com.dragon.read
1761739686423
值为安装时间戳。
```
- 3天内已存在安装记录,会过滤。
## 概述 ## 概述
- cron的使用,可以参考:`https://www.runoob.com/w3cnote/linux-crontab-tasks.html` - cron的使用,可以参考:`https://www.runoob.com/w3cnote/linux-crontab-tasks.html`
- `sudo ls -l /var/spool/cron/ /etc/cron.d` - ` sudo ls -l /var/spool/cron/ /etc/cron.d `
- 查看调度任务:crontab -l //列出当前的所有调度任务 - 查看调度任务:crontab -l //列出当前的所有调度任务
1. crontab -e直接进入vi模式添加。此任务保存至/var/spool/cron 里面对应的用户名文件 1. crontab -e直接进入vi模式添加。此任务保存至/var/spool/cron 里面对应的用户名文件
......
...@@ -22,6 +22,7 @@ export GOPROXY=https://goproxy.cn,direct ...@@ -22,6 +22,7 @@ export GOPROXY=https://goproxy.cn,direct
``` ```
### .bash_profile ### .bash_profile
- 疑问:这里是不是 .bashrc 更好?
``` ```
GOPATH=~/go GOPATH=~/go
export GOPATH export GOPATH
......
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
- 用户 home 下确保存在 .ssh,没有就创建 - 用户 home 下确保存在 .ssh,没有就创建
- mkdir ~/.ssh && chmod 700 ~/.ssh && cd .ssh - mkdir ~/.ssh && chmod 700 ~/.ssh && cd .ssh
- vi authorized_keys 并 增加 adx-stg 的 pub key - vi authorized_keys 并 增加 adx-stg 的 pub key
- chmod 600 authorized_keys - chmod 600 authorized_keys
\ No newline at end of file - 生成 密钥 ssh-keygen -t rsa
## 概述
- 新买服务器时,用的 root,还需要增加 adminuser,某些机器可能还要加 adx-user
## adminuser
```
加用户
groupadd adminuser && useradd -g adminuser adminuser
设置密码,一般为 Chsjd2024!!@#%*
passwd adminuser
设置 密钥 .ssh
su adminuser
```
\ No newline at end of file
...@@ -10,4 +10,8 @@ ...@@ -10,4 +10,8 @@
adx-stg 180.184.56.136 adx-stg 180.184.56.136
ngx-stg 180.184.61.244 ngx-stg 180.184.61.244
ssp、adx。其中adx的stg服务器,还会发给合作伙伴,dsp、广告预测 ssp、adx。其中adx的stg服务器,还会发给合作伙伴,dsp、广告预测
\ No newline at end of file
## 需要加白的合作者
- 三星研究院,广告预测
- 得物,rta (2025-11-10 说可以去掉白名单机制)
\ No newline at end of file
锚点:^ 指定开头,$ 指定结尾
. 句号匹配任意单个字符除了换行符。
[ ] 字符种类。匹配方括号内的任意字符。
[^ ] 否定的字符种类。匹配除了方括号里的任意字符
* 匹配>=0个重复的在*号之前的字符。
+ 匹配>=1个重复的+号前的字符。
? 标记?之前的字符为可选.
{n,m} 匹配num个大括号之前的字符或字符集 (n <= num <= m).
(xyz) 字符集,匹配与 xyz 完全相等的字符串.
| 或运算符,匹配符号前或后的字符.
\ 转义字符,用于匹配一些保留的字符 [ ] ( ) { } . * + ? ^ $ \ |
^ 从开始行开始匹配.
$ 从末端开始匹配.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment