← 返回列表

⚠ 本文为英文原文,暂无中文版。

量化系统介绍

OpenClaw Sentiment Assistant Work Report

OpenClaw-based social-media sentiment monitoring: conversational operation end-to-end, news collection, Zhipu embedding-2 semantic clustering (Leader algorithm, threshold 0.85), popularity ranking and Feishu push — Python standard library only, zero external dependencies.

#Sentiment Monitoring#NLP#OpenClaw

Work report for the OpenClaw Public Opinion Assistant — an AI-driven, automated sentiment monitoring and analysis system. Report date: March 17, 2026.

I. System Overview

1.1 Positioning

The OpenClaw Sentiment Assistant enables end-to-end operations — news collection, semantic clustering, trend ranking — through natural-language dialogue.

Core value:

  • No programming required; conversational operation;
  • Automatic deduplication to avoid duplicated-information interference;
  • Popularity ranking for quick identification of trending topics.

1.2 Architecture & Data Flow

Data collection → semantic analysis (Zhipu Embed) → vector-based deduplication & clustering → clustering statistics → SQLite storage → popularity ranking → Feishu group push.

II. Core Technology Selection

2.1 Why the Web-Pilot Search Skill?

CriteriaWeb-PilotTraditional crawler
Anti-scrapingHandled automaticallyManual maintenance
Dynamic contentSupports JS renderingStatic pages only
Maintenance costLow (service-level)High (code changes per page update)
DeploymentPlug-and-playEnvironment configuration required

As a search skill inside the OpenClaw ecosystem, Web-Pilot works out of the box and stays stable under anti-scraping measures.

2.2 Why Zhipu Embedding-2?

  • Original plan: local BERT model (sentence-transformers);
  • Issue: dependency conflicts inside the container (incompatible PyTorch / safetensors versions);
  • Re-evaluation: Zhipu Embedding-2 provides an API of equivalent capability;
  • Final choice: the API route — lower operating cost, better stability.

Technical specifications: model embedding-2 (BERT series), vector dimension 1024, cosine similarity.

2.3 Why the Leader Clustering Algorithm?

AlgorithmStrengthsWeaknessesFit
K-MeansFastNeeds predefined K; iterative convergenceKnown cluster count
DBSCANArbitrary shapes, handles noiseParameter-sensitive (eps, minPts)Spatial clustering
HierarchicalDendrograms, visualizationO(n³) complexitySmall datasets
Leader (used here)Simple and fast; order-dependent—Real-time clustering, news dedup

Leader algorithm: traverse data sequentially; each unvisited point becomes a “leader”, and points similar to the leader join its cluster.

III. System Features

3.1 Conversational Interface

Users trigger analysis with a natural-language message in a Feishu group:

User: @openclaw Sentiment Assistant, analyze public sentiment. System: automatically performs data collection → clustering → ranking → report generation.

3.2 Output Example

[Today's Top Sentiment Rankings 2026-03-17]
[Ranked by topic popularity (number of related news items)]

No. 1  Crypto trading firm BlockFills files for bankruptcy
       Related news: 2 items | Popularity: 100
No. 2  Institutions showed 'diamond hands' during Bitcoin's 50% pullback
       Related news: 2 items | Popularity: 100

[Statistics] Original news: 27 | Merged topics: 24 | Top topics: 2
Model: Zhipu embedding-2 | Threshold: 0.85

3.3 Core Computation

For each incoming news item, compute cosine similarity against existing items; similarity ≥ 0.85 joins the same topic; remaining unclassified items are re-processed as new leaders. Topics are ranked by the number of member news items (popularity).

IV. Technical Implementation

4.1 Component Specifications

ComponentChoice
AI platformOpenClaw conversational AI control center
Vector modelZhipu embedding-2
StorageSQLite
LanguagePython 3 standard library — zero dependencies, easy to deploy

4.2 Code Characteristics

  • Zero external dependencies: only urllib, json, sqlite3 from the standard library;
  • In-house vector math: pure-Python dot product, norm and cosine similarity;
  • Container-friendly: no pip install; runs directly.

V. Application Scenarios

  • Daily sentiment briefing: scheduled collection, analysis and push;
  • Trending event tracking: hottest topics by news count;
  • Competitor monitoring: aggregate news by specific keywords.

VI. Next Steps

PhaseContentStatus
MVPCollection + clustering + ranking; Feishu testing & conversational validationCompleted
In progressScheduled tasks (cron automation)Configuring
PlannedExpand sources to Weibo, Twitter/X, RedditIn development

VII. Summary

The OpenClaw Sentiment Assistant achieves zero-threshold sentiment monitoring through three core capabilities: conversational AI, semantic clustering and popularity ranking. Replacing local BERT with Zhipu Embedding-2 significantly reduces deployment and maintenance cost.

System documentation for research purposes; not investment advice.