# opennova-cloudshare **Repository Path**: next-share/opennova-cloudshare ## Basic Information - **Project Name**: opennova-cloudshare - **Description**: 用于资源的采集、交换和价值评定 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-06 - **Last Updated**: 2026-09-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # opennova-cloudshare 本工具受产业共性资源分布式云端共享与智能管控机制(2023YFB3308702)支持,重点解决数字孪生/智能控制/智能物流/智能检测/智能管控/智能决策/ 绿色双碳等产业技术共性资源云端接入与集成共享、管理类工业 软件云化等问题。 本工具是在[团队前期工作](https://gitee.com/syswu/crawler)基础上开发,并形成正式交付物。 # 1. 快速使用 ## 1.1 产业技术共性资源云端接入 ### 1.1.1 工业协议支持与资源采集 #### 1.1.1.1 MQTT ```启动MQTT协议 docker run -d \ --name mosquitto \ --restart always \ -p 1883:1883 \ -p 9001:9001 \ docker.m.daocloud.io/eclipse-mosquitto:2.0.21 \ sh -c ' # 生成mosquitto配置 echo "listener 1883 0.0.0.0 listener 9001 0.0.0.0 protocol websockets allow_anonymous false password_file /tmp/passwd" > /tmp/mosquitto.conf # 创建用户admin,密码Admin@123 mosquitto_passwd -b -c /tmp/passwd admin Admin@123 # 关键:给mosquitto用户可读权限 chmod 644 /tmp/passwd # 启动mosquitto,加载这个内存里的临时配置 exec mosquitto -c /tmp/mosquitto.conf ' ``` ```angular2html # Windows cloudshare.bat generate --type mqtt --lang python --knowledges configs/knowl/code.txt --config configs/system/mqtt.config # Linux/Mac ./cloudshare.sh generate --type mqtt --lang python --knowledges configs/knowl/code.txt --config configs/system/mqtt.config ``` #### 1.1.1.2 Modbus ```angular2html # Windows cloudshare.bat generate --type modbus --lang python --knowledges configs/knowl/code.txt --config configs/system/modbus.config # Linux/Mac ./cloudshare.sh generate --type modbus --lang python --knowledges configs/knowl/code.txt --config configs/system/modbus.config ``` #### 1.1.1.3 EtherCAT ```angular2html # Windows cloudshare.bat generate --type ethercat --lang python --knowledges configs/knowl/code.txt --config configs/system/ethercat.config # Linux/Mac ./cloudshare.sh generate --type ethercat --lang python --knowledges configs/knowl/code.txt --config configs/system/ethercat.config ``` #### 1.1.1.4 CC-Link ``` docker run -d \ --name cc-link-slmp-server \ --restart always \ -p 8000:8000 \ protoforge:latest ``` ```angular2html # Windows cloudshare.bat generate --type cc-link --lang python --knowledges configs/knowl/code.txt --config configs/system/cc-link.config # Linux/Mac ./cloudshare.sh generate --type cc-link --lang python --knowledges configs/knowl/code.txt --config configs/system/cc-link.config ``` ## 1.2 云资源接入 ## 1.3 产业技术共性资源集成共享 ### 1.3.1 资源集成 #### 1.3.1.1 资源分类识别 ```angular2html # Windows cloudshare.bat share --type tag --config configs/database/tag.config --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --name="服装鞋帽款式设计软件" --knowledges configs/knowl/label.txt --destination terminal # Linux/Mac ./cloudshare.sh share --type tag --config configs/database/tag.config --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --name="服装鞋帽款式设计软件" --knowledges configs/knowl/label.txt --destination terminal ``` 流程:连接 `--source` 数据库,在 `table` 指定表中按 `--name` 定位记录,读取 `return` 列描述并在终端输出详细信息,调用大模型按 `configs/knowl/label.txt` 打标,最后将标签结果更新到 `update` 指定的列。 #### 1.3.1.2 资源精确查询 ```angular2html # Windows # 按行业分类精确匹配 cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy precise --table product_data --item catalog --value 服装鞋帽 # 按 JSONB 字段精确匹配 cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy precise --table product_data --item process_node --value 5nm # Linux/Mac # 按行业分类精确匹配 ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy precise --table product_data --item catalog --value 服装鞋帽 # 按 JSONB 字段精确匹配 ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy precise --table product_data --item process_node --value 5nm ``` ``` SQL: SELECT * FROM product_data WHERE catalog = '服装鞋帽' SQL: SELECT * FROM product_data WHERE data->>'process_node' = '5nm' ``` #### 1.3.1.3 资源模糊查询 ```angular2html # Windows # 在材质字段中模糊搜索 cotton cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy fuzzy --table product_data --item material --value cotton # 在款式字段中模糊搜索 shirt cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy fuzzy --table product_data --item style --value shirt # Linux/Mac # 在材质字段中模糊搜索 cotton ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy fuzzy --table product_data --item material --value cotton # 在款式字段中模糊搜索 shirt ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy fuzzy --table product_data --item style --value shirt ``` ``` SQL: SELECT * FROM product_data WHERE data->>'material' LIKE '%cotton%' SQL: SELECT * FROM product_data WHERE data->>'style' LIKE '%shirt%' ``` #### 1.3.1.4 资源时间范围查询 ```angular2html # Windows # 按创建时间范围筛选 cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy range --table product_data --item create_time --value 2026-01-01,2026-06-30 # 按集成电路良率范围筛选(数值字段) cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy range --table product_data --item yield_rate --value 90,100 # 按发电效率范围筛选 cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy range --table product_data --item efficiency --value 20,35 # Linux/Mac # 按创建时间范围筛选 ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy range --table product_data --item create_time --value 2026-01-01,2026-06-30 # 按集成电路良率范围筛选(数值字段) ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy range --table product_data --item yield_rate --value 90,100 # 按发电效率范围筛选 ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy range --table product_data --item efficiency --value 20,35 ``` ``` SQL: SELECT * FROM product_data WHERE create_time BETWEEN '2026-01-01' AND '2026-06-30' ORDER BY create_time DESC SQL: SELECT * FROM product_data WHERE (data->>'yield_rate')::numeric BETWEEN 90 AND 100 ``` #### 1.3.1.5 资源聚合查询 ```angular2html # Windows # 服装鞋帽行业中奢侈品牌的记录(统计 + 明细) cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy union --table product_data --item catalog --value "服装鞋帽;brand_tier=luxury" # 集成电路行业中 5nm 工艺且良率 >= 90% 的记录 cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy union --table product_data --item catalog --value "集成电路;process_node=5nm;yield_rate>=90" # 发电状态中运行中的电站且效率 >= 25% cloudshare.bat share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy union --table product_data --item catalog --value "发电状态;status=running;efficiency>=25" # Linux/Mac # 服装鞋帽行业中奢侈品牌的记录(统计 + 明细) ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy union --table product_data --item catalog --value "服装鞋帽;brand_tier=luxury" # 集成电路行业中 5nm 工艺且良率 >= 90% 的记录 ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy union --table product_data --item catalog --value "集成电路;process_node=5nm;yield_rate>=90" # 发电状态中运行中的电站且效率 >= 25% ./cloudshare.sh share --type query --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --policy union --table product_data --item catalog --value "发电状态;status=running;efficiency>=25" ``` ``` SQL: WHERE catalog='服装鞋帽' AND data->>'brand_tier'='luxury' → 先输出 COUNT 总数,再输出前 20 条明细 SQL: WHERE catalog='集成电路' AND data->>'process_node'='5nm' AND (data->>'yield_rate')::numeric>=90 ``` ### 1.3.2 区块链共享 ```angular2html docker build . -t opennova/cloudshare:latest docker-compose -f docker/blockchain/docker-compose.yml build docker compose up -d docker compose down -v ``` ## 1.4 管理工具云化 ### 1.4.1 ERP/MES/PLM 工业软件容器化 | 类型 | 名称 | 地址 | |------|-----------|---------------------------------------------------| | ERP | idempiere | https://gitee.com/next-share/idempiere.git | | MES | OpenMES | https://gitee.com/next-share/OpenMes.git | | PLM | bluePLM | https://gitee.com/next-share/bluePLM.git | ```angular2html # Windows # ERP 系统(iDempiere) cloudshare.bat cloud --type erp --source https://gitee.com/next-share/idempiere.git # MES 系统(OpenMES) cloudshare.bat cloud --type mes --source https://gitee.com/next-share/OpenMes.git # PLM 系统(bluePLM) cloudshare.bat cloud --type plm --source https://gitee.com/next-share/bluePLM.git # Linux/Mac # ERP 系统(iDempiere) ./cloudshare.sh cloud --type erp --source https://gitee.com/next-share/idempiere.git # MES 系统(OpenMES) ./cloudshare.sh cloud --type mes --source https://gitee.com/next-share/OpenMes.git # PLM 系统(bluePLM) ./cloudshare.sh cloud --type plm --source https://gitee.com/next-share/bluePLM.git ``` 执行完成后,进入项目目录启动服务: ```bash cd cloud-workspace/ docker compose up -d ``` ### 1.4.2 云化效果评估 ```angular2html # Windows cloudshare.bat evaluate --type sql --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --network="服装鞋帽产业协同价值网·运动服饰组网1" --destination terminal # Linux/Mac ./cloudshare.sh evaluate --type sql --source "postgresql://postgres:Onceas@2026@39.104.66.93:5432/industrysd" --network="服装鞋帽产业协同价值网·运动服饰组网1" --destination terminal ```