diff --git a/README-EN.md b/README-EN.md index 05b40f4..c47b468 100644 --- a/README-EN.md +++ b/README-EN.md @@ -44,10 +44,10 @@
-| [🎯 Core Features](#-core-features) | [🚀 Quick Start](#-quick-start) | [🐳 Docker Deployment](#-docker-deployment) | [🤖 AI Analysis](#-ai-analysis-deployment) | +| [🎯 Core Features](#-core-features) | [🚀 Quick Start](#-quick-start) | [⚙️ Configuration Guide](#-configuration-guide) | [🐳 Docker Deployment](#-docker-deployment) | |:---:|:---:|:---:|:---:| -| [📝 Changelog](#-changelog) | [🔌 MCP Clients](#-mcp-clients) | [❓ FAQ & Support](#-faq--support) | [⭐ Related Projects](#-related-projects) | -| [🔧 Custom Platforms](#custom-monitoring-platforms) | [📝 Keywords Config](#frequencywordstxt-configuration) | [🪄 Sponsors](#-sponsors) | | +| [🤖 AI Analysis](#-ai-analysis) | [🔌 MCP Clients](#-mcp-clients) | [📝 Changelog](#-changelog) | [❓ FAQ & Support](#-faq--support) | +| [⭐ Related Projects](#-related-projects) | [🪄 Sponsors](#-sponsors) | | |
@@ -56,11 +56,19 @@ - Thanks to **followers**, your interactions make the content more meaningful 😎
-👉 Click to view Acknowledgments (Current 🔥71🔥 supporters) +👉 Click to view Acknowledgments (Current 🔥72🔥 supporters) + +### Infrastructure Support + +Thanks to **GitHub** for providing free infrastructure, which is the biggest prerequisite for this project to run conveniently with **one-click fork**. ### Data Support -This project uses the API from [newsnow](https://github.com/ourongxing/newsnow) to fetch multi-platform data +This project uses the API from [newsnow](https://github.com/ourongxing/newsnow) to fetch multi-platform data. Special thanks to the author for providing this service. + +After communication, the author indicated no concerns about server pressure, but this is based on their goodwill and trust. Please everyone: +- **Visit the [newsnow project](https://github.com/ourongxing/newsnow) and give it a star** +- When deploying with Docker, please control the frequency reasonably and avoid being overly greedy ### Promotion Support @@ -73,6 +81,8 @@ This project uses the API from [newsnow](https://github.com/ourongxing/newsnow) ### Community Support > Thanks to **financial supporters**. Your generosity has transformed into snacks and drinks beside my keyboard, accompanying every iteration of this project +> +> **"One-yuan appreciation"** has been suspended. If you still want to support the author, please visit the [official account](#-faq--support) article and click "Like Author" at the bottom. | Supporter | Amount (CNY) | Date | Note | | :-------: | :----------: | :--: | :--: | @@ -120,53 +130,32 @@ This project uses the API from [newsnow](https://github.com/ourongxing/newsnow) Default monitoring of 11 mainstream platforms, with support for adding custom platforms. -
-👉 Click to expand: Custom Monitoring Platforms -
- -The news data comes from [newsnow](https://github.com/ourongxing/newsnow). You can visit the [website](https://newsnow.busiyi.world/) and click [More] to see if your desired platform is available. - -To add platforms, visit the [source code](https://github.com/ourongxing/newsnow/tree/main/server/sources), and modify the `platforms` configuration in `config/config.yaml`: - -```yaml -platforms: - - id: "toutiao" - name: "Toutiao" - - id: "baidu" - name: "Baidu Hot" - - id: "wallstreetcn-hot" - name: "Wallstreetcn" - # Add more platforms... -``` - -If you're unsure, you can copy from [community-shared configurations](https://github.com/sansan0/TrendRadar/issues/95). - -
+> 💡 For detailed configuration, see [Configuration Guide - Platform Configuration](#1-platform-configuration) ### **Smart Push Strategies** **Three Push Modes**: -| Mode | Target Users | Push Timing | Display Content | Use Case | -|------|--------------|-------------|-----------------|----------| -| **Daily Summary**
`daily` | 📋 Managers/Regular Users | Scheduled push (default: hourly) | All matched news of the day
+ New news section | Daily reports
Comprehensive trend overview | -| **Current Rankings**
`current` | 📰 Content Creators | Scheduled push (default: hourly) | Current ranking matches
+ New news section | Real-time hot topics
What's trending now | -| **Incremental Monitor**
`incremental` | 📈 Traders/Investors | Push only when new | Newly appeared matching news | Avoid duplicate info
High-frequency monitoring | +| Mode | Target Users | Push Feature | +|------|--------------|--------------| +| **Daily Summary** (daily) | Managers/Regular Users | Push all matched news of the day (includes previously pushed) | +| **Current Rankings** (current) | Content Creators | Push current ranking matches (continuously ranked news appear each time) | +| **Incremental Monitor** (incremental) | Traders/Investors | Push only new content, zero duplication | + +> 💡 **Quick Selection Guide:** +> - 🔄 Don't want duplicate news → Use `incremental` +> - 📊 Want complete ranking trends → Use `current` +> - 📝 Need daily summary reports → Use `daily` +> +> For detailed comparison and configuration, see [Configuration Guide - Push Mode Details](#3-push-mode-details) **Additional Feature - Push Time Window Control** (Optional): -This feature works independently with any push mode: +- Set push time range (e.g., 09:00-18:00), push only within specified time +- Configure multiple pushes within window or once per day +- Avoid notifications during non-work hours -- **Time Window Limit**: Set push time range (e.g., 09:00-18:00 or 20:00-22:00) -- **Push Frequency Control**: - - Multiple pushes within window: Push every execution - - Once per day: Only push once within window (suitable for daily/current modes) -- **Typical Scenarios**: - - Work hours push: Only receive messages during 09:00-18:00 on weekdays - - Evening summary: Receive summary at fixed evening time (e.g., 20:00-22:00) - - Do not disturb: Prevent notifications during non-work hours - -> Tip: This feature is disabled by default, enable it manually in `config/config.yaml` with `push_window.enabled` +> 💡 This feature is disabled by default, see [Quick Start](#-quick-start) for configuration ### **Precise Content Filtering** @@ -175,165 +164,8 @@ Set personal keywords (e.g., AI, BYD, Education Policy) to receive only relevant - Supports normal words, required words (+), and filter words (!) - Group-based management with independent statistics for different topics -> You can also skip filtering and receive all trending news. See v2.0.1 in [Changelog](#-changelog) - -
-👉 Click to expand: frequency_words.txt Configuration -
- -Configure monitoring keywords in `frequency_words.txt` with three syntax types and grouping features. - -Keywords at the top have higher priority. Adjust keyword order based on your interests. - -| Syntax Type | Symbol | Purpose | Example | Matching Logic | -|------------|--------|---------|---------|----------------| -| **Normal** | None | Basic matching | `Huawei` | Match any one | -| **Required** | `+` | Scope limiting | `+phone` | Must include both | -| **Filter** | `!` | Noise exclusion | `!ad` | Exclude if included | - -### 📋 Basic Syntax - -#### 1. **Normal Keywords** - Basic Matching -```txt -Huawei -OPPO -Apple -``` -**Effect:** News containing **any one** of these words will be captured - -#### 2. **Required Words** `+word` - Scope Limiting -```txt -Huawei -OPPO -+phone -``` -**Effect:** Must include both normal word **and** required word to be captured - -#### 3. **Filter Words** `!word` - Noise Exclusion -```txt -Apple -Huawei -!fruit -!price -``` -**Effect:** News containing filter words will be **excluded**, even if it contains keywords - -### 🔗 Group Feature - Importance of Empty Lines - -**Core Rule:** Use **empty lines** to separate different groups, each group is independently counted - -#### Example Configuration: -```txt -iPhone -Huawei -OPPO -+launch - -A-shares -Shanghai Index -Shenzhen Index -+fluctuation -!prediction - -World Cup -Euro Cup -Asian Cup -+match -``` - -#### Group Explanation and Matching Effects: - -**Group 1 - Phone Launches:** -- Keywords: iPhone, Huawei, OPPO -- Required: launch -- Effect: Must include phone brand name and "launch" - -**Matching Examples:** -- ✅ "iPhone 15 officially launched with pricing" ← Has "iPhone" + "launch" -- ✅ "Huawei Mate60 series launch livestream" ← Has "Huawei" + "launch" -- ✅ "OPPO Find X7 launch date confirmed" ← Has "OPPO" + "launch" -- ❌ "iPhone sales hit record high" ← Has "iPhone" but missing "launch" - -**Group 2 - Stock Market:** -- Keywords: A-shares, Shanghai Index, Shenzhen Index -- Required: fluctuation -- Filter: prediction -- Effect: Include stock-related words and "fluctuation", but exclude "prediction" - -**Matching Examples:** -- ✅ "A-shares major fluctuation analysis today" ← Has "A-shares" + "fluctuation" -- ✅ "Shanghai Index fluctuation reasons explained" ← Has "Shanghai Index" + "fluctuation" -- ❌ "Experts predict A-shares fluctuation trends" ← Has "A-shares" + "fluctuation" but contains "prediction" -- ❌ "A-shares trading volume hits new high" ← Has "A-shares" but missing "fluctuation" - -**Group 3 - Football Events:** -- Keywords: World Cup, Euro Cup, Asian Cup -- Required: match -- Effect: Must include cup name and "match" - -**Matching Examples:** -- ✅ "World Cup group stage match results" ← Has "World Cup" + "match" -- ✅ "Euro Cup final match time" ← Has "Euro Cup" + "match" -- ❌ "World Cup tickets on sale" ← Has "World Cup" but missing "match" - -### 🎯 Configuration Tips - -#### 1. **From Broad to Strict Strategy** -```txt -# Step 1: Start with broad keywords for testing -Artificial Intelligence -AI -ChatGPT - -# Step 2: After finding mismatches, add required words -Artificial Intelligence -AI -ChatGPT -+technology - -# Step 3: After finding noise, add filter words -Artificial Intelligence -AI -ChatGPT -+technology -!advertisement -!training -``` - -#### 2. **Avoid Over-Complexity** -❌ **Not Recommended:** Too many words in one group -```txt -Huawei -OPPO -Apple -Samsung -vivo -OnePlus -Meizu -+phone -+launch -+sales -!fake -!repair -!second-hand -``` - -✅ **Recommended:** Split into precise groups -```txt -Huawei -OPPO -+new product - -Apple -Samsung -+launch - -phone -sales -+market -``` - -
+> 💡 Keyword configuration tutorial: [Configuration Guide - Keyword Configuration](#2-keyword-configuration) +> 💡 You can also skip filtering and receive all trending news (leave frequency_words.txt empty) ### **Trending Analysis** @@ -346,64 +178,7 @@ Real-time tracking of news popularity changes helps you understand not just "wha - **Continuity Analysis**: Distinguishes between one-time hot topics and continuously developing news - **Cross-Platform Comparison**: Same news across different platforms, showing media attention differences -> Never miss the complete development of important news, from topic emergence to peak discussion - -
-👉 Click to expand: Push Format Explanation -
- -📊 Trending Keywords Stats - -🔥 [1/3] AI ChatGPT : 2 items - - 1. [Baidu Hot] 🆕 ChatGPT-5 officially launched [**1**] - 09:15 (1 time) - - 2. [Toutiao] AI chip concept stocks surge [**3**] - [08:30 ~ 10:45] (3 times) - -━━━━━━━━━━━━━━━━━━━ - -📈 [2/3] BYD Tesla : 2 items - - 1. [Weibo] 🆕 BYD monthly sales break record [**2**] - 10:20 (1 time) - - 2. [Douyin] Tesla price reduction promotion [**4**] - [07:45 ~ 09:15] (2 times) - -━━━━━━━━━━━━━━━━━━━ - -📌 [3/3] A-shares Stock Market : 1 item - - 1. [Wallstreetcn] A-shares midday review [**5**] - [11:30 ~ 12:00] (2 times) - -🆕 New Trending News (Total 2 items) - -**Baidu Hot** (1 item): - 1. ChatGPT-5 officially launched [**1**] - -**Weibo** (1 item): - 1. BYD monthly sales break record [**2**] - -Updated: 2025-01-15 12:30:15 - - -## **Message Format Explanation** - -| Format Element | Example | Meaning | Description | -| ------------- | ------- | -------- | ----------- | -| 🔥📈📌 | 🔥 [1/3] AI ChatGPT | Popularity Level | 🔥 High (≥10) 📈 Medium (5-9) 📌 Normal (<5) | -| [Number/Total] | [1/3] | Rank Position | Current group rank among all matches | -| Keyword Group | AI ChatGPT | Keyword Group | Group from config, title must contain words | -| : N items | : 2 items | Match Count | Total news matching this group | -| [Platform] | [Baidu Hot] | Source Platform | Platform name of the news | -| 🆕 | 🆕 ChatGPT-5 officially launched | New Mark | First appearance in this round | -| [**number**] | [**1**] | High Rank | Rank ≤ threshold, bold red display | -| [number] | [7] | Normal Rank | Rank > threshold, normal display | -| - time | - 09:15 | First Time | Time when news was first discovered | -| [time~time] | [08:30 ~ 10:45] | Duration | Time range from first to last appearance | -| (N times) | (3 times) | Frequency | Total appearances during monitoring | -| **New Section** | 🆕 **New Trending News** | New Topic Summary | Separately shows newly appeared topics | - -
- +> 💡 Push format reference: [Configuration Guide - Push Format Reference](#5-push-format-reference) ### **Personalized Trending Algorithm** @@ -413,42 +188,7 @@ No longer controlled by platform algorithms, TrendRadar reorganizes all trending - **Focus on Persistent Topics** (30%): Repeatedly appearing news is more important - **Consider Ranking Quality** (10%): Not just frequent, but consistently top-ranked -> Merge trending searches from各 platforms and re-sort by your interests. These three ratios can be adjusted for your scenarios. - -
-👉 Click to expand: Trending Weight Adjustment -
- -Current default configuration is balanced. - -### Two Core Scenarios - -**Real-Time Trending Type**: -```yaml -weight: - rank_weight: 0.8 # Mainly focus on ranking - frequency_weight: 0.1 # Less concern about continuity - hotness_weight: 0.1 -``` -**Target Users**: Content creators, marketers, users wanting to quickly understand current hot topics - -**In-Depth Topic Type**: -```yaml -weight: - rank_weight: 0.4 # Moderate ranking focus - frequency_weight: 0.5 # Emphasize sustained heat within the day - hotness_weight: 0.1 -``` -**Target Users**: Investors, researchers, journalists, users needing deep trend analysis - -### Adjustment Method -1. **Three numbers must sum to 1.0** -2. **Increase what's important**: Increase rank_weight for rankings, frequency_weight for continuity -3. **Suggest adjusting 0.1-0.2 at a time**, observe effects - -Core idea: Users pursuing speed and timeliness increase ranking weight, users pursuing depth and stability increase frequency weight. - -
+> 💡 Weight adjustment guide: [Configuration Guide - Advanced Configuration](#4-advanced-configuration---hotspot-weight-adjustment) ### **Multi-Channel Real-Time Push** @@ -476,7 +216,7 @@ AI conversational analysis system based on MCP (Model Context Protocol), enablin > - Project includes **November 1-15** test data for immediate experience > - Recommend deploying the project yourself to get more real-time data > -> See [AI Analysis Deployment](#-ai-analysis-deployment) for details +> See [AI Analysis](#-ai-analysis) for details ### **Zero Technical Barrier Deployment** @@ -806,7 +546,7 @@ frequency_words.txt file added **required word** feature, using + sign ## 🚀 Quick Start -> After configuration, news data updates after one hour. To accelerate, refer to [Step 4] to manually test configuration +> **📖 Reminder**: Fork users should first **[check the latest official documentation](https://github.com/sansan0/TrendRadar/blob/master/README.md)** to ensure the configuration steps are up to date. 1. **Fork this project** to your GitHub account @@ -1210,12 +950,36 @@ frequency_words.txt file added **required word** feature, using + sign > **💡 Beginner Quick Start Tip**: > - > For first deployment, suggest completing **GitHub Secrets** configuration first (choose one push platform), then jump to [Step 4] to test push success. + > For first deployment, suggest completing **GitHub Secrets** configuration first (choose one push platform), then jump to [Step 3] to test push success. > > **Don't modify** `config/config.yaml` and `frequency_words.txt` temporarily, adjust these configs after push test succeeds as needed. -3. **Configuration Notes:**: +3. **Manual Test News Push**: + + > 💡 **Complete Step 1-2 first, then test immediately!** Test success first, then adjust configuration (Step 4) as needed. + > + > ⚠️ **IMPORTANT: Enter your own forked project, not this project!** + + **How to find your Actions page**: + + - **Method 1**: Open your forked project homepage, click the **Actions** tab at the top + - **Method 2**: Direct access `https://github.com/YourUsername/TrendRadar/actions` + + **Example comparison**: + - ❌ Author's project: `https://github.com/sansan0/TrendRadar/actions` + - ✅ Your project: `https://github.com/YourUsername/TrendRadar/actions` + + **Testing steps**: + 1. Enter your project's Actions page + 2. Find **"Hot News Crawler"** and click in + - If you don't see this text, refer to [#109](https://github.com/sansan0/TrendRadar/issues/109) to solve + 3. Click **"Run workflow"** button on the right to run + 4. Wait about 1 minute, messages will be pushed to your configured platform + +4. **Configuration Notes (Optional)**: + + > 💡 Default configuration works normally, only adjust if you need personalization - **Push Settings**: Configure push mode and notification options in [config/config.yaml](config/config.yaml) - **Keyword Settings**: Add your interested keywords in [config/frequency_words.txt](config/frequency_words.txt) @@ -1223,13 +987,327 @@ frequency_words.txt file added **required word** feature, using + sign **Note**: Suggest only adjusting explicitly documented config items, other options mainly for author's development testing -4. **Manual Test News Push**: - Using my project as example, you should test in **your forked** project +## ⚙️ Configuration Guide - 1. **Enter Actions**: https://github.com/sansan0/TrendRadar/actions - 2. Find "Hot News Crawler" and click in. If you don't see this text, refer to [#109](https://github.com/sansan0/TrendRadar/issues/109) to solve - 3. Click "Run workflow" button to run, wait about 1 minute for data to arrive on your phone +> **📖 Reminder**: This chapter provides detailed configuration explanations. Suggest completing [Quick Start](#-quick-start) basic configuration first, then refer to detailed options here as needed. + +### 1. Platform Configuration + +
+👉 Click to expand: Custom Monitoring Platforms +
+ +This project's news data comes from [newsnow](https://github.com/ourongxing/newsnow). You can click the [website](https://newsnow.busiyi.world/), click [More], to see if there are platforms you want. + +For specific additions, visit [project source code](https://github.com/ourongxing/newsnow/tree/main/server/sources), based on the file names there, modify the `platforms` configuration in `config/config.yaml` file: + +```yaml +platforms: + - id: "toutiao" + name: "Toutiao" + - id: "baidu" + name: "Baidu Hot Search" + - id: "wallstreetcn-hot" + name: "Wallstreetcn" + # Add more platforms... +``` +If you don't know how to look, you can directly copy the partially organized [Platform Configuration](https://github.com/sansan0/TrendRadar/issues/95) + +
+ +### 2. Keyword Configuration + +
+👉 Click to expand: frequency_words.txt Configuration Tutorial +
+ +Configure monitoring keywords in `frequency_words.txt` with three syntax types and grouping features. + +Keywords at the top have higher priority. Adjust keyword order based on your interests. + +| Syntax Type | Symbol | Purpose | Example | Matching Logic | +|------------|--------|---------|---------|----------------| +| **Normal** | None | Basic matching | `Huawei` | Match any one | +| **Required** | `+` | Scope limiting | `+phone` | Must include both | +| **Filter** | `!` | Noise exclusion | `!ad` | Exclude if included | + +#### 📋 Basic Syntax + +##### 1. **Normal Keywords** - Basic Matching +```txt +Huawei +OPPO +Apple +``` +**Effect:** News containing **any one** of these words will be captured + +##### 2. **Required Words** `+word` - Scope Limiting +```txt +Huawei +OPPO ++phone +``` +**Effect:** Must include both normal word **and** required word to be captured + +##### 3. **Filter Words** `!word` - Noise Exclusion +```txt +Apple +Huawei +!fruit +!price +``` +**Effect:** News containing filter words will be **excluded**, even if it contains keywords + +#### 🔗 Group Feature - Importance of Empty Lines + +**Core Rule:** Use **empty lines** to separate different groups, each group is independently counted + +##### Example Configuration: +```txt +iPhone +Huawei +OPPO ++launch + +A-shares +Shanghai Index +Shenzhen Index ++fluctuation +!prediction + +World Cup +Euro Cup +Asian Cup ++match +``` + +##### Group Explanation and Matching Effects: + +**Group 1 - Phone Launches:** +- Keywords: iPhone, Huawei, OPPO +- Required: launch +- Effect: Must include phone brand name and "launch" + +**Matching Examples:** +- ✅ "iPhone 15 officially launched with pricing" ← Has "iPhone" + "launch" +- ✅ "Huawei Mate60 series launch livestream" ← Has "Huawei" + "launch" +- ✅ "OPPO Find X7 launch date confirmed" ← Has "OPPO" + "launch" +- ❌ "iPhone sales hit record high" ← Has "iPhone" but missing "launch" + +**Group 2 - Stock Market:** +- Keywords: A-shares, Shanghai Index, Shenzhen Index +- Required: fluctuation +- Filter: prediction +- Effect: Include stock-related words and "fluctuation", but exclude "prediction" + +**Matching Examples:** +- ✅ "A-shares major fluctuation analysis today" ← Has "A-shares" + "fluctuation" +- ✅ "Shanghai Index fluctuation reasons explained" ← Has "Shanghai Index" + "fluctuation" +- ❌ "Experts predict A-shares fluctuation trends" ← Has "A-shares" + "fluctuation" but contains "prediction" +- ❌ "A-shares trading volume hits new high" ← Has "A-shares" but missing "fluctuation" + +**Group 3 - Football Events:** +- Keywords: World Cup, Euro Cup, Asian Cup +- Required: match +- Effect: Must include cup name and "match" + +**Matching Examples:** +- ✅ "World Cup group stage match results" ← Has "World Cup" + "match" +- ✅ "Euro Cup final match time" ← Has "Euro Cup" + "match" +- ❌ "World Cup tickets on sale" ← Has "World Cup" but missing "match" + +#### 🎯 Configuration Tips + +##### 1. **From Broad to Strict Strategy** +```txt +# Step 1: Start with broad keywords for testing +Artificial Intelligence +AI +ChatGPT + +# Step 2: After finding mismatches, add required words +Artificial Intelligence +AI +ChatGPT ++technology + +# Step 3: After finding noise, add filter words +Artificial Intelligence +AI +ChatGPT ++technology +!advertisement +!training +``` + +##### 2. **Avoid Over-Complexity** +❌ **Not Recommended:** Too many words in one group +```txt +Huawei +OPPO +Apple +Samsung +vivo +OnePlus +Meizu ++phone ++launch ++sales +!fake +!repair +!second-hand +``` + +��� **Recommended:** Split into precise groups +```txt +Huawei +OPPO ++new product + +Apple +Samsung ++launch + +phone +sales ++market +``` + +
+ +### 3. Push Mode Details + +
+👉 Click to expand: Three Push Modes Detailed Comparison +
+ +#### Detailed Comparison Table + +| Mode | Target Users | Push Timing | Display Content | Typical Use Case | +|------|----------|----------|----------|--------------| +| **Daily Summary**
`daily` | 📋 Managers/Regular Users | Scheduled push (default hourly) | All matched news of the day
+ New news section | **Example**: Check all important news of the day at 6 PM
**Feature**: See full-day trend, don't miss any hot topic
**Note**: Will include previously pushed news | +| **Current Rankings**
`current` | 📰 Content Creators | Scheduled push (default hourly) | Current ranking matches
+ New news section | **Example**: Track "which topics are hottest now" hourly
**Feature**: Real-time understanding of current popularity ranking changes
**Note**: Continuously ranked news appear each time | +| **Incremental Monitor**
`incremental` | 📈 Traders/Investors | Push only when new | Newly appeared frequency word matches | **Example**: Monitor "Tesla", only notify when new news appears
**Feature**: Zero duplication, only see first-time news
**Suitable for**: High-frequency monitoring, avoid information disturbance | + +#### Actual Push Effect Example + +Assume you monitor "Apple" keyword, execute once per hour: + +| Time | daily Mode Push | current Mode Push | incremental Mode Push | +|-----|--------------|----------------|-------------------| +| 10:00 | News A, News B | News A, News B | News A, News B | +| 11:00 | News A, News B, News C | News B, News C, News D | **Only** News C | +| 12:00 | News A, News B, News C | News C, News D, News E | **Only** News D, News E | + +**Explanation**: +- `daily`: Cumulative display of all news of the day (A, B, C all retained) +- `current`: Display current ranking news (ranking changed, News D on list, News A off list) +- `incremental`: **Only push newly appeared news** (avoid duplicate disturbance) + +#### Common Questions + +> **💡 Encountered this problem?** 👉 "Execute once per hour, news output in first execution still appears in next hour execution" +> - **Reason**: You might have selected `daily` (Daily Summary) or `current` (Current Rankings) mode +> - **Solution**: Change to `incremental` (Incremental Monitor) mode, only push new content + +
+ +### 4. Advanced Configuration - Hotspot Weight Adjustment + +
+👉 Click to expand: Hotspot Weight Adjustment +
+ +Current default configuration is balanced. + +#### Two Core Scenarios + +**Real-Time Trending Type**: +```yaml +weight: + rank_weight: 0.8 # Mainly focus on ranking + frequency_weight: 0.1 # Less concern about continuity + hotness_weight: 0.1 +``` +**Target Users**: Content creators, marketers, users wanting to quickly understand current hot topics + +**In-Depth Topic Type**: +```yaml +weight: + rank_weight: 0.4 # Moderate ranking focus + frequency_weight: 0.5 # Emphasize sustained heat within the day + hotness_weight: 0.1 +``` +**Target Users**: Investors, researchers, journalists, users needing deep trend analysis + +#### Adjustment Method +1. **Three numbers must sum to 1.0** +2. **Increase what's important**: Increase rank_weight for rankings, frequency_weight for continuity +3. **Suggest adjusting 0.1-0.2 at a time**, observe effects + +Core idea: Users pursuing speed and timeliness increase ranking weight, users pursuing depth and stability increase frequency weight. + +
+ +### 5. Push Format Reference + +
+👉 Click to expand: Push Format Explanation +
+ +#### Push Example + +📊 Trending Keywords Stats + +🔥 [1/3] AI ChatGPT : 2 items + + 1. [Baidu Hot] 🆕 ChatGPT-5 officially launched [**1**] - 09:15 (1 time) + + 2. [Toutiao] AI chip concept stocks surge [**3**] - [08:30 ~ 10:45] (3 times) + +━━━━━━━━━━━━━━━━━━━ + +📈 [2/3] BYD Tesla : 2 items + + 1. [Weibo] 🆕 BYD monthly sales break record [**2**] - 10:20 (1 time) + + 2. [Douyin] Tesla price reduction promotion [**4**] - [07:45 ~ 09:15] (2 times) + +━━━━━━━━━━━━━━━━━━━ + +📌 [3/3] A-shares Stock Market : 1 item + + 1. [Wallstreetcn] A-shares midday review [**5**] - [11:30 ~ 12:00] (2 times) + +🆕 New Trending News (Total 2 items) + +**Baidu Hot** (1 item): + 1. ChatGPT-5 officially launched [**1**] + +**Weibo** (1 item): + 1. BYD monthly sales break record [**2**] + +Updated: 2025-01-15 12:30:15 + +#### Message Format Explanation + +| Format Element | Example | Meaning | Description | +| ------------- | ------- | -------- | ----------- | +| 🔥📈📌 | 🔥 [1/3] AI ChatGPT | Popularity Level | 🔥 High (≥10) 📈 Medium (5-9) 📌 Normal (<5) | +| [Number/Total] | [1/3] | Rank Position | Current group rank among all matches | +| Keyword Group | AI ChatGPT | Keyword Group | Group from config, title must contain words | +| : N items | : 2 items | Match Count | Total news matching this group | +| [Platform] | [Baidu Hot] | Source Platform | Platform name of the news | +| 🆕 | 🆕 ChatGPT-5 officially launched | New Mark | First appearance in this round | +| [**number**] | [**1**] | High Rank | Rank ≤ threshold, bold red display | +| [number] | [7] | Normal Rank | Rank > threshold, normal display | +| - time | - 09:15 | First Time | Time when news was first discovered | +| [time~time] | [08:30 ~ 10:45] | Duration | Time range from first to last appearance | +| (N times) | (3 times) | Frequency | Total appearances during monitoring | +| **New Section** | 🆕 **New Trending News** | New Topic Summary | Separately shows newly appeared topics | + +
## 🐳 Docker Deployment @@ -1433,7 +1511,7 @@ docker exec -it trend-radar ls -la /app/config/ ``` -## 🤖 AI Analysis Deployment +## 🤖 AI Analysis TrendRadar v3.0.0 added **MCP (Model Context Protocol)** based AI analysis feature, allowing natural language conversations with news data for deep analysis. @@ -1795,6 +1873,7 @@ Currently, major AI model prices are relatively affordable. Welcome to register - **GitHub Issues**: Suitable for targeted answers. Please provide complete info when asking (screenshots, error logs, system environment, etc.) - **WeChat Official Account**: Suitable for quick consultation. Suggest priority to communicate in public comment area of related articles. If private message, please use polite language 😉 +- 💡 Deployment successful? Welcome to leave comments and likes on our official account to share your experience~
@@ -1820,7 +1899,7 @@ Currently, major AI model prices are relatively affordable. Welcome to register ### 💰 302.AI New User Benefits -> The $1 credit can be used to call various AI models (such as Claude, GPT, etc.) +> The $1 credit can be used to call various AI models (such as Claude, GPT, etc.) > This project's AI analysis features require AI model integration. See [AI Analysis Deployment](#-ai-analysis-deployment) for configuration tutorial [![Register & Claim](https://img.shields.io/badge/Register_302.AI-Claim_$1_Free_Credit-FF6B6B?style=for-the-badge&logo=openai&logoColor=white)](https://share.302.ai/mEOUzG) diff --git a/README.md b/README.md index 3593a27..c43f177 100644 --- a/README.md +++ b/README.md @@ -39,27 +39,53 @@ > 本项目以轻量,易部署为目标 +
+⚠️ 点击展开:查看最新文档(Fork 用户必读) +
+ +最近有很多第一次接触 GitHub 的新用户使用本项目,因此特别补充这个说明。 + +**问题**:如果你是通过 **Fork** 使用本项目,你看到的可能是旧版文档。 + +**原因**:Fork 时会复制当时的文档版本,但原项目可能已更新。 + +**👉 [点击查看最新官方文档](https://github.com/sansan0/TrendRadar/blob/master/README.md)** + +**如何判断?** 看页面顶部的仓库地址: +- `github.com/你的用户名/TrendRadar` ← 你 fork 的版本 +- `github.com/sansan0/TrendRadar` ← 最新官方版本 + +
+ ## 📑 快速导航
-| [🎯 核心功能](#-核心功能) | [🚀 快速开始](#-快速开始) | [🐳 Docker部署](#-docker-部署) | [🤖 AI分析专区](#-ai-智能分析部署) | +| [🎯 核心功能](#-核心功能) | [🚀 快速开始](#-快速开始) | [⚙️ 配置详解](#-配置详解) | [🐳 Docker部署](#-docker-部署) | |:---:|:---:|:---:|:---:| -| [📝 更新日志](#-更新日志) | [🔌 MCP客户端](#-mcp-客户端) | [❓ 答疑与公益](#问题答疑与公益捐助) | [⭐ 项目相关](#项目相关) | -| [🔧 自定义监控平台](#自定义监控平台) | [📝 推送关键词配置](#frequencywordstxt-配置教程) | [🪄 赞助商](#-赞助商) | | +| [🤖 AI 智能分析](#-ai-智能分析) | [🔌 MCP客户端](#-mcp-客户端) | [📝 更新日志](#-更新日志) | [❓ 答疑与交流](#问题答疑与交流) | +| [⭐ 项目相关](#项目相关) | [🪄 赞助商](#-赞助商) | | |
- 感谢**耐心反馈 bug** 的贡献者,你们的每一条反馈让项目更加完善😉; - 感谢**为项目点 star** 的观众们,**fork** 你所欲也,**star** 我所欲也,两者得兼😍是对开源精神最好的支持; -- 感谢**关注[公众号](#问题答疑与公益捐助)** 的读者们,你们的留言、点赞、分享和推荐等积极互动让内容更有温度😎。 +- 感谢**关注[公众号](#问题答疑与交流)** 的读者们,你们的留言、点赞、分享和推荐等积极互动让内容更有温度😎。
-👉 点击查看致谢名单 (当前 🔥71🔥 位) +👉 点击展开:致谢名单 (当前 🔥72🔥 位) + +### 基础设施支持 + +感谢 **GitHub** 免费提供的基础设施,这是本项目得以**一键 fork**便捷运行的最大前提。 ### 数据支持 -本项目使用了 [newsnow](https://github.com/ourongxing/newsnow) 项目提供的 API 接口获取多平台数据 +本项目使用 [newsnow](https://github.com/ourongxing/newsnow) 项目的 API 获取多平台数据,特别感谢作者提供的服务。 + +经联系,作者表示无需担心服务器压力,但这是基于他的善意和信任。请大家: +- **前往 [newsnow 项目](https://github.com/ourongxing/newsnow) 点 star 支持** +- Docker 部署时,请合理控制推送频率,勿竭泽而渔 ### 推广助力 @@ -71,7 +97,9 @@ ### 观众支持 -> 感谢**给予资金支持** 的朋友们,你们的慷慨已化身为键盘旁的零食饮料,陪伴着项目的每一次迭代 +> 感谢**给予资金支持**的朋友们,你们的慷慨已化身为键盘旁的零食饮料,陪伴着项目的每一次迭代。 +> +> **"一元点赞"已暂停**,如仍想支持作者,可前往[公众号](#问题答疑与交流)文章底部点击"喜欢作者"。 | 点赞人 | 金额 | 日期 | 备注 | | :-------------------------: | :----: | :----: | :-----------------------: | @@ -166,334 +194,64 @@ 默认监控 11 个主流平台,也可自行增加额外的平台 -
-👉 点击展开:自定义监控平台 -
- -本项目的资讯数据来源于 [newsnow](https://github.com/ourongxing/newsnow) ,你可以点击[网站](https://newsnow.busiyi.world/),点击[更多],查看是否有你想要的平台。 - -具体添加可访问 [项目源代码](https://github.com/ourongxing/newsnow/tree/main/server/sources),根据里面的文件名,在 `config/config.yaml` 文件中修改 `platforms` 配置: - -```yaml -platforms: - - id: "toutiao" - name: "今日头条" - - id: "baidu" - name: "百度热搜" - - id: "wallstreetcn-hot" - name: "华尔街见闻" - # 添加更多平台... -``` -如果不会看的话,就直接复制他人整理好的部分[平台配置](https://github.com/sansan0/TrendRadar/issues/95) - -
+> 💡 详细配置教程见 [配置详解 - 平台配置](#1-平台配置) ### **智能推送策略** **三种推送模式**: -| 模式 | 适用人群 | 推送时机 | 显示内容 | 适用场景 | -|------|----------|----------|----------|----------| -| **当日汇总**
`daily` | 📋 企业管理者/普通用户 | 按时推送(默认每小时推送一次) | 当日所有匹配新闻
+ 新增新闻区域 | 日报总结
全面了解当日热点趋势 | -| **当前榜单**
`current` | 📰 自媒体人/内容创作者 | 按时推送(默认每小时推送一次) | 当前榜单匹配新闻
+ 新增新闻区域 | 实时热点追踪
了解当前最火的内容 | -| **增量监控**
`incremental` | 📈 投资者/交易员 | 有新增才推送 | 新出现的匹配频率词新闻 | 避免重复信息干扰
高频监控场景 | +| 模式 | 适用场景 | 推送特点 | +|------|---------|---------| +| **当日汇总** (daily) | 企业管理者/普通用户 | 按时推送当日所有匹配新闻(会包含之前推送过的) | +| **当前榜单** (current) | 自媒体人/内容创作者 | 按时推送当前榜单匹配新闻(持续在榜的每次都出现) | +| **增量监控** (incremental) | 投资者/交易员 | 仅推送新增内容,零重复 | + +> 💡 **快速选择指南:** +> - 🔄 不想看到重复新闻 → 用 `incremental`(增量监控) +> - 📊 想看完整榜单趋势 → 用 `current`(当前榜单) +> - 📝 需要每日汇总报告 → 用 `daily`(当日汇总) +> +> 详细对比和配置教程见 [配置详解 - 推送模式详解](#3-推送模式详解) **附加功能 - 推送时间窗口控制**(可选): -此功能独立于上述三种推送模式,可与任意模式搭配使用: +- 设定推送时间范围(如 09:00-18:00),只在指定时间内推送 +- 可配置窗口内多次推送或每天仅推送一次 +- 避免非工作时间打扰 -- **时间窗口限制**: 设定推送时间范围(如 09:00-18:00 或 20:00-22:00),只在指定时间内推送 -- **推送频率控制**: - - 窗口内多次推送: 时间窗口内每次执行都推送 - - 每天仅推送一次: 时间窗口内只推送一次(适合当日汇总或当前榜单模式) -- **典型场景**: - - 工作时间推送: 只在工作日 09:00-18:00 接收消息 - - 晚间汇总推送: 希望在晚上固定时间(如 20:00-22:00)收到汇总 - - 避免打扰: 防止非工作时间收到推送通知 - -> 提示: 此功能默认关闭,需在 `config/config.yaml` 中手动启用 `push_window.enabled` +> 💡 此功能默认关闭,配置方法见 [快速开始](#-快速开始) ### **精准内容筛选** 设置个人关键词(如:AI、比亚迪、教育政策),只推送相关热点,过滤无关信息 -- 支持普通词、必须词(+)、过滤词(!)三种语法,见【frequency_words.txt 配置教程】 +- 支持普通词、必须词(+)、过滤词(!)三种语法 - 词组化管理,独立统计不同主题热点 -> 也可以不做筛选,完整的推送所有热点,具体见【历史更新】中的 v2.0.1 - -
-👉 点击展开:frequency_words.txt 配置教程 -
- -在 `frequency_words.txt` 文件中配置监控的关键词,支持三种语法和词组功能。 - -关键词越靠前,新闻的优先级越高,你可以根据自己的关注度调整关键词顺序 - -| 语法类型 | 符号 | 作用 | 示例 | 匹配逻辑 | -|---------|------|------|------|---------| -| **普通词** | 无 | 基础匹配 | `华为` | 包含任意一个即可 | -| **必须词** | `+` | 限定范围 | `+手机` | 必须同时包含 | -| **过滤词** | `!` | 排除干扰 | `!广告` | 包含则直接排除 | - -### 📋 基础语法说明 - -#### 1. **普通关键词** - 基础匹配 -```txt -华为 -OPPO -苹果 -``` -**作用:** 新闻标题包含其中**任意一个词**就会被捕获 - -#### 2. **必须词** `+词汇` - 限定范围 -```txt -华为 -OPPO -+手机 -``` -**作用:** 必须同时包含普通词**和**必须词才会被捕获 - -#### 3. **过滤词** `!词汇` - 排除干扰 -```txt -苹果 -华为 -!水果 -!价格 -``` -**作用:** 包含过滤词的新闻会被**直接排除**,即使包含关键词 - -### 🔗 词组功能 - 空行分隔的重要作用 - -**核心规则:** 用**空行**分隔不同的词组,每个词组独立统计 - -#### 示例配置: -```txt -iPhone -华为 -OPPO -+发布 - -A股 -上证 -深证 -+涨跌 -!预测 - -世界杯 -欧洲杯 -亚洲杯 -+比赛 -``` - -#### 词组解释及匹配效果: - -**第1组 - 手机新品类:** -- 关键词:iPhone、华为、OPPO -- 必须词:发布 -- 效果:必须包含手机品牌名,同时包含"发布" - -**匹配示例:** -- ✅ "iPhone 15正式发布售价公布" ← 有"iPhone"+"发布" -- ✅ "华为Mate60系列发布会直播" ← 有"华为"+"发布" -- ✅ "OPPO Find X7发布时间确定" ← 有"OPPO"+"发布" -- ❌ "iPhone销量创新高" ← 有"iPhone"但缺少"发布" - -**第2组 - 股市行情类:** -- 关键词:A股、上证、深证 -- 必须词:涨跌 -- 过滤词:预测 -- 效果:包含股市相关词,同时包含"涨跌",但排除包含"预测"的内容 - -**匹配示例:** -- ✅ "A股今日大幅涨跌分析" ← 有"A股"+"涨跌" -- ✅ "上证指数涨跌原因解读" ← 有"上证"+"涨跌" -- ❌ "专家预测A股涨跌趋势" ← 有"A股"+"涨跌"但包含"预测" -- ❌ "A股成交量创新高" ← 有"A股"但缺少"涨跌" - -**第3组 - 足球赛事类:** -- 关键词:世界杯、欧洲杯、亚洲杯 -- 必须词:比赛 -- 效果:必须包含杯赛名称,同时包含"比赛" - -**匹配示例:** -- ✅ "世界杯小组赛比赛结果" ← 有"世界杯"+"比赛" -- ✅ "欧洲杯决赛比赛时间" ← 有"欧洲杯"+"比赛" -- ❌ "世界杯门票开售" ← 有"世界杯"但缺少"比赛" - -### 🎯 配置技巧 - -#### 1. **从宽到严的配置策略** -```txt -# 第一步:先用宽泛关键词测试 -人工智能 -AI -ChatGPT - -# 第二步:发现误匹配后,加入必须词限定 -人工智能 -AI -ChatGPT -+技术 - -# 第三步:发现干扰内容后,加入过滤词 -人工智能 -AI -ChatGPT -+技术 -!广告 -!培训 -``` - -#### 2. **避免过度复杂** -❌ **不推荐:** 一个词组包含太多词汇 -```txt -华为 -OPPO -苹果 -三星 -vivo -一加 -魅族 -+手机 -+发布 -+销量 -!假货 -!维修 -!二手 -``` - -✅ **推荐:** 拆分成多个精确的词组 -```txt -华为 -OPPO -+新品 - -苹果 -三星 -+发布 - -手机 -销量 -+市场 -``` - -
- +> 💡 关键词配置教程见 [配置详解 - 关键词配置](#2-关键词配置) +> 💡 也可以不做筛选,完整推送所有热点(将 frequency_words.txt 留空) ### **热点趋势分析** 实时追踪新闻热度变化,让你不仅知道"什么在热搜",更了解"热点如何演变" - **时间轴追踪**:记录每条新闻从首次出现到最后出现的完整时间跨度 -- **热度变化**:统计新闻在不同时间段的排名变化和出现频次 +- **热度变化**:统计新闻在不同时间段的排名变化和出现频次 - **新增检测**:实时识别新出现的热点话题,用🆕标记第一时间提醒 - **持续性分析**:区分一次性热点话题和持续发酵的深度新闻 - **跨平台对比**:同一新闻在不同平台的排名表现,看出媒体关注度差异 -> 不再错过重要新闻的完整发展过程,从话题萌芽到高峰热议,全程掌握 - -
-👉 点击展开:推送格式说明 -
- -📊 热点词汇统计 - -🔥 [1/3] AI ChatGPT : 2 条 - - 1. [百度热搜] 🆕 ChatGPT-5正式发布 [**1**] - 09时15分 (1次) - - 2. [今日头条] AI芯片概念股暴涨 [**3**] - [08时30分 ~ 10时45分] (3次) - -━━━━━━━━━━━━━━━━━━━ - -📈 [2/3] 比亚迪 特斯拉 : 2 条 - - 1. [微博] 🆕 比亚迪月销量破纪录 [**2**] - 10时20分 (1次) - - 2. [抖音] 特斯拉降价促销 [**4**] - [07时45分 ~ 09时15分] (2次) - -━━━━━━━━━━━━━━━━━━━ - -📌 [3/3] A股 股市 : 1 条 - - 1. [华尔街见闻] A股午盘点评分析 [**5**] - [11时30分 ~ 12时00分] (2次) - -🆕 本次新增热点新闻 (共 2 条) - -**百度热搜** (1 条): - 1. ChatGPT-5正式发布 [**1**] - -**微博** (1 条): - 1. 比亚迪月销量破纪录 [**2**] - -更新时间:2025-01-15 12:30:15 - - -## **消息格式说明** - -| 格式元素 | 示例 | 含义 | 说明 | -| ------------- | --------------------------- | ------------ | --------------------------------------- | -| 🔥📈📌 | 🔥 [1/3] AI ChatGPT | 热度等级 | 🔥高热度(≥10条) 📈中热度(5-9条) 📌普通热度(<5条) | -| [序号/总数] | [1/3] | 排序位置 | 当前词组在所有匹配词组中的排名 | -| 频率词组 | AI ChatGPT | 关键词组 | 配置文件中的词组,标题必须包含其中词汇 | -| : N 条 | : 2 条 | 匹配数量 | 该词组匹配的新闻总数 | -| [平台名] | [百度热搜] | 来源平台 | 新闻所属的平台名称 | -| 🆕 | 🆕 ChatGPT-5正式发布 | 新增标记 | 本轮抓取中首次出现的热点 | -| [**数字**] | [**1**] | 高排名 | 排名≤阈值的热搜,红色加粗显示 | -| [数字] | [7] | 普通排名 | 排名>阈值的热搜,普通显示 | -| - 时间 | - 09时15分 | 首次时间 | 该新闻首次被发现的时间 | -| [时间~时间] | [08时30分 ~ 10时45分] | 持续时间 | 从首次出现到最后出现的时间范围 | -| (N次) | (3次) | 出现频率 | 在监控期间出现的总次数 | -| **新增区域** | 🆕 **本次新增热点新闻** | 新话题汇总 | 单独展示本轮新出现的热点话题 | - -
- +> 💡 推送格式说明见 [配置详解 - 推送格式参考](#5-推送格式参考) ### **个性化热点算法** 不再被各个平台的算法牵着走,TrendRadar 会重新整理全网热搜: - **看重排名高的新闻**(占60%):各平台前几名的新闻优先显示 -- **关注持续出现的话题**(占30%):反复出现的新闻更重要 +- **关注持续出现的话题**(占30%):反复出现的新闻更重要 - **考虑排名质量**(占10%):不仅多次出现,还经常排在前列 -> 把分散在各个平台的热搜合并起来,按照你关心的热度重新排序,这三个比例可以选择适合自己的场景进行调整 - -
-👉 点击展开:热点权重调整 -
- -当前默认的配置是平衡性配置 - -### 两个核心场景 - -**追实时热点型**: -```yaml -weight: - rank_weight: 0.8 # 主要看排名 - frequency_weight: 0.1 # 不太在乎持续性 - hotness_weight: 0.1 -``` -**适用人群**:自媒体博主、营销人员、想快速了解当下最火话题的用户 - -**追深度话题型**: -```yaml -weight: - rank_weight: 0.4 # 适度看排名 - frequency_weight: 0.5 # 重视当天内的持续热度 - hotness_weight: 0.1 -``` -**适用人群**:投资者、研究人员、新闻工作者、需要深度分析趋势的用户 - -### 调整的方法 -1. **三个数字加起来必须等于 1.0** -2. **哪个重要就调大哪个**:在乎排名就调大 rank_weight,在乎持续性就调大 frequency_weight -3. **建议每次只调 0.1-0.2**,观察效果 - -核心思路:追求速度和时效性的用户提高排名权重,追求深度和稳定性的用户提高频次权重。 - -
+> 💡 这三个比例可以调整,详见 [配置详解 - 热点权重调整](#4-热点权重调整) ### **多渠道实时推送** @@ -521,7 +279,7 @@ weight: > - 项目自带 **11月1-15日** 测试数据,可立即体验 > - 建议自行部署运行项目,获取更实时的数据 > -> 详见 [AI 智能分析部署](#-ai-智能分析部署) +> 详见 [AI 智能分析](#-ai-智能分析) ### **零技术门槛部署** @@ -550,9 +308,10 @@ GitHub 一键 Fork 即可使用,无需编程基础。 ## 📝 更新日志 >**升级说明**: -- **提示**:不要通过 **Sync fork** 更新本项目, 建议查看【历史更新】,明确具体的【升级方式】和【功能内容】 -- **小版本更新**:从 v2.x 升级到 v2.y, 用本项目的 `main.py` 代码替换你 fork 仓库中的对应文件 -- **大版本升级**:从 v1.x 升级到 v2.y, 建议删除现有 fork 后重新 fork,这样更省力且避免配置冲突 +- **📌 查看最新更新**:**[原仓库更新日志](https://github.com/sansan0/TrendRadar/blob/master/README.md#-更新日志)** +- **提示**:不要通过 **Sync fork** 更新本项目,建议查看【历史更新】,明确具体的【升级方式】和【功能内容】 +- **小版本更新**:从 v2.x 升级到 v2.y,用本项目的 `main.py` 代码替换你 fork 仓库中的对应文件 +- **大版本升级**:从 v1.x 升级到 v2.y,建议删除现有 fork 后重新 fork,这样更省力且避免配置冲突 ### 2025/11/12 - v3.0.5 @@ -570,7 +329,7 @@ GitHub 一键 Fork 即可使用,无需编程基础。
-👉 点击展开:历史更新 +👉 点击展开:历史更新 ### 2025/10/26 - mcp-v1.0.1 @@ -843,7 +602,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号 ## 🚀 快速开始 -> 配置完成后,新闻数据一小时后才会更新,如想加快,可参照【第4步】手动测试配置效果 +> **📖 提醒**:Fork 用户建议先 **[查看最新官方文档](https://github.com/sansan0/TrendRadar/blob/master/README.md)**,确保配置步骤是最新的。 1. **Fork 本项目**到你的 GitHub 账户 @@ -872,7 +631,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- 👉 点击展开:企业微信机器人(配置最简单最迅速) + 👉 点击展开:企业微信机器人(配置最简单最迅速)
**GitHub Secret 配置(⚠️ Name 名称必须严格一致):** @@ -893,7 +652,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- 👉 点击展开:飞书机器人(消息显示最友好) + 👉 点击展开:飞书机器人(消息显示最友好)
**GitHub Secret 配置(⚠️ Name 名称必须严格一致):** @@ -982,7 +741,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- 👉 点击展开:钉钉机器人 + 👉 点击展开:钉钉机器人
**GitHub Secret 配置(⚠️ Name 名称必须严格一致):** @@ -1012,7 +771,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- 👉 点击展开:Telegram Bot + 👉 点击展开:Telegram Bot
**GitHub Secret 配置(⚠️ Name 名称必须严格一致):** @@ -1051,7 +810,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- 👉 点击展开:邮件推送(支持所有主流邮箱) + 👉 点击展开:邮件推送(支持所有主流邮箱)
- 注意事项:为防止邮件群发功能被**滥用**,当前的群发是所有收件人都能看到彼此的邮箱地址。 @@ -1131,7 +890,7 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- 👉 点击展开:ntfy 推送(开源免费,支持自托管) + 👉 点击展开:ntfy 推送(开源免费,支持自托管)
**两种使用方式:** @@ -1249,28 +1008,359 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
- > **💡 新手快速上手建议**: - > - > 第一次部署时,建议先完成 **GitHub Secrets** 配置(选择一个推送平台即可),然后直接跳到【第4步】测试推送是否成功。 - > - > **暂时不要修改** `config/config.yaml` 和 `frequency_words.txt`,等推送测试成功后再根据需要调整这些配置。 +3. **手动测试新闻推送**: + > 💡 **完成第1-2步后,请立即测试!** 测试成功后再根据需要调整配置(第4步)。 + > + > ⚠️ **重要提醒:请进入你自己 fork 的项目,不是本项目!** -3. **配置说明:**: + **如何找到你的 Actions 页面**: + + - **方法一**:打开你 fork 的项目主页,点击顶部的 **Actions** 标签 + - **方法二**:直接访问 `https://github.com/你的用户名/TrendRadar/actions` + + **示例对比**: + - ❌ 作者的项目:`https://github.com/sansan0/TrendRadar/actions` + - ✅ 你的项目:`https://github.com/你的用户名/TrendRadar/actions` + + **测试步骤**: + 1. 进入你项目的 Actions 页面 + 2. 找到 **"Hot News Crawler"** 点进去 + - 如果看不到该字样,参照 [#109](https://github.com/sansan0/TrendRadar/issues/109) 解决 + 3. 点击右侧的 **"Run workflow"** 按钮运行 + 4. 等待 1 分钟左右,消息会推送到你配置的平台 + +4. **配置说明(可选)**: + + > 💡 默认配置已可正常使用,如需个性化调整,可参考以下选项 - **推送设置**:在 [config/config.yaml](config/config.yaml) 中配置推送模式和通知选项 - **关键词设置**:在 [config/frequency_words.txt](config/frequency_words.txt) 中添加你关心的关键词 - **推送频率调整**:在 [.github/workflows/crawler.yml](.github/workflows/crawler.yml) 请谨慎调整,别贪心 **注意**:建议只调整文档中明确说明的配置项,其他选项主要供作者开发时测试使用 - -4. **手动测试新闻推送**: - 我这里是拿我的项目举例,你要去你**fork**的项目做测试 - 1. **进入 Actions**:https://github.com/sansan0/TrendRadar/actions - 2. 找到 "Hot News Crawler" 的点进去,如果看不到该字样,那么参照[#109](https://github.com/sansan0/TrendRadar/issues/109)解决 - 3. 点击 "Run workflow" 按钮运行,等待 1 分钟左右数据到你手机上 +## ⚙️ 配置详解 + +> **📖 提醒**:本章节提供详细的配置说明,建议先完成 [快速开始](#-快速开始) 的基础配置,再根据需要回来查看详细选项。 + +### 1. 平台配置 + +
+👉 点击展开:自定义监控平台 +
+ +本项目的资讯数据来源于 [newsnow](https://github.com/ourongxing/newsnow) ,你可以点击[网站](https://newsnow.busiyi.world/),点击[更多],查看是否有你想要的平台。 + +具体添加可访问 [项目源代码](https://github.com/ourongxing/newsnow/tree/main/server/sources),根据里面的文件名,在 `config/config.yaml` 文件中修改 `platforms` 配置: + +```yaml +platforms: + - id: "toutiao" + name: "今日头条" + - id: "baidu" + name: "百度热搜" + - id: "wallstreetcn-hot" + name: "华尔街见闻" + # 添加更多平台... +``` +如果不会看的话,就直接复制他人整理好的部分[平台配置](https://github.com/sansan0/TrendRadar/issues/95) + +
+ +### 2. 关键词配置 + +
+👉 点击展开:frequency_words.txt 配置教程 +
+ +在 `frequency_words.txt` 文件中配置监控的关键词,支持三种语法和词组功能。 + +关键词越靠前,新闻的优先级越高,你可以根据自己的关注度调整关键词顺序 + +| 语法类型 | 符号 | 作用 | 示例 | 匹配逻辑 | +|---------|------|------|------|---------| +| **普通词** | 无 | 基础匹配 | `华为` | 包含任意一个即可 | +| **必须词** | `+` | 限定范围 | `+手机` | 必须同时包含 | +| **过滤词** | `!` | 排除干扰 | `!广告` | 包含则直接排除 | + +#### 📋 基础语法说明 + +##### 1. **普通关键词** - 基础匹配 +```txt +华为 +OPPO +苹果 +``` +**作用:** 新闻标题包含其中**任意一个词**就会被捕获 + +##### 2. **必须词** `+词汇` - 限定范围 +```txt +华为 +OPPO ++手机 +``` +**作用:** 必须同时包含普通词**和**必须词才会被捕获 + +##### 3. **过滤词** `!词汇` - 排除干扰 +```txt +苹果 +华为 +!水果 +!价格 +``` +**作用:** 包含过滤词的新闻会被**直接排除**,即使包含关键词 + +#### 🔗 词组功能 - 空行分隔的重要作用 + +**核心规则:** 用**空行**分隔不同的词组,每个词组独立统计 + +##### 示例配置: +```txt +iPhone +华为 +OPPO ++发布 + +A股 +上证 +深证 ++涨跌 +!预测 + +世界杯 +欧洲杯 +亚洲杯 ++比赛 +``` + +##### 词组解释及匹配效果: + +**第1组 - 手机新品类:** +- 关键词:iPhone、华为、OPPO +- 必须词:发布 +- 效果:必须包含手机品牌名,同时包含"发布" + +**匹配示例:** +- ✅ "iPhone 15正式发布售价公布" ← 有"iPhone"+"发布" +- ✅ "华为Mate60系列发布会直播" ← 有"华为"+"发布" +- ✅ "OPPO Find X7发布时间确定" ← 有"OPPO"+"发布" +- ❌ "iPhone销量创新高" ← 有"iPhone"但缺少"发布" + +**第2组 - 股市行情类:** +- 关键词:A股、上证、深证 +- 必须词:涨跌 +- 过滤词:预测 +- 效果:包含股市相关词,同时包含"涨跌",但排除包含"预测"的内容 + +**匹配示例:** +- ✅ "A股今日大幅涨跌分析" ← 有"A股"+"涨跌" +- ✅ "上证指数涨跌原因解读" ← 有"上证"+"涨跌" +- ❌ "专家预测A股涨跌趋势" ← 有"A股"+"涨跌"但包含"预测" +- ❌ "A股成交量创新高" ← 有"A股"但缺少"涨跌" + +**第3组 - 足球赛事类:** +- 关键词:世界杯、欧洲杯、亚洲杯 +- 必须词:比赛 +- 效果:必须包含杯赛名称,同时包含"比赛" + +**匹配示例:** +- ✅ "世界杯小组赛比赛结果" ← 有"世界杯"+"比赛" +- ✅ "欧洲杯决赛比赛时间" ← 有"欧洲杯"+"比赛" +- ❌ "世界杯门票开售" ← 有"世界杯"但缺少"比赛" + +#### 🎯 配置技巧 + +##### 1. **从宽到严的配置策略** +```txt +# 第一步:先用宽泛关键词测试 +人工智能 +AI +ChatGPT + +# 第二步:发现误匹配后,加入必须词限定 +人工智能 +AI +ChatGPT ++技术 + +# 第三步:发现干扰内容后,加入过滤词 +人工智能 +AI +ChatGPT ++技术 +!广告 +!培训 +``` + +##### 2. **避免过度复杂** +❌ **不推荐:** 一个词组包含太多词汇 +```txt +华为 +OPPO +苹果 +三星 +vivo +一加 +魅族 ++手机 ++发布 ++销量 +!假货 +!维修 +!二手 +``` + +✅ **推荐:** 拆分成多个精确的词组 +```txt +华为 +OPPO ++新品 + +苹果 +三星 ++发布 + +手机 +销量 ++市场 +``` + +
+ +### 3. 推送模式详解 + +
+👉 点击展开:三种推送模式详细对比 +
+ +#### 详细对比表格 + +| 模式 | 适用人群 | 推送时机 | 显示内容 | 典型使用场景 | +|------|----------|----------|----------|------------| +| **当日汇总**
`daily` | 📋 企业管理者/普通用户 | 按时推送(默认每小时推送一次) | 当日所有匹配新闻
+ 新增新闻区域 | **案例**:每天下午6点查看今天所有重要新闻
**特点**:看全天完整趋势,不漏掉任何热点
**提醒**:会包含之前推送过的新闻 | +| **当前榜单**
`current` | 📰 自媒体人/内容创作者 | 按时推送(默认每小时推送一次) | 当前榜单匹配新闻
+ 新增新闻区域 | **案例**:每小时追踪"哪些话题现在最火"
**特点**:实时了解当前热度排名变化
**提醒**:持续在榜的新闻每次都会出现 | +| **增量监控**
`incremental` | 📈 投资者/交易员 | 有新增才推送 | 新出现的匹配频率词新闻 | **案例**:监控"特斯拉",只在有新消息时通知
**特点**:零重复,只看首次出现的新闻
**适合**:高频监控、避免信息打扰 | + +#### 实际推送效果举例 + +假设你监控"苹果"关键词,每小时执行一次: + +| 时间 | daily 模式推送 | current 模式推送 | incremental 模式推送 | +|-----|--------------|----------------|-------------------| +| 10:00 | 新闻A、新闻B | 新闻A、新闻B | 新闻A、新闻B | +| 11:00 | 新闻A、新闻B、新闻C | 新闻B、新闻C、新闻D | **仅**新闻C | +| 12:00 | 新闻A、新闻B、新闻C | 新闻C、新闻D、新闻E | **仅**新闻D、新闻E | + +**说明**: +- `daily`:累积展示当天所有新闻(A、B、C 都保留) +- `current`:展示当前榜单的新闻(排名变化,新闻D上榜,新闻A掉榜) +- `incremental`:**只推送新出现的新闻**(避免重复干扰) + +#### 常见问题 + +> **💡 遇到这个问题?** 👉 "每个小时执行一次,第一次执行完输出的新闻,在下一个小时执行时还会出现" +> - **原因**:你可能选择了 `daily`(当日汇总)或 `current`(当前榜单)模式 +> - **解决**:改用 `incremental`(增量监控)模式,只推送新增内容 + +
+ +### 4. 热点权重调整 + +
+👉 点击展开:热点权重调整 +
+ +当前默认的配置是平衡性配置 + +#### 两个核心场景 + +**追实时热点型**: +```yaml +weight: + rank_weight: 0.8 # 主要看排名 + frequency_weight: 0.1 # 不太在乎持续性 + hotness_weight: 0.1 +``` +**适用人群**:自媒体博主、营销人员、想快速了解当下最火话题的用户 + +**追深度话题型**: +```yaml +weight: + rank_weight: 0.4 # 适度看排名 + frequency_weight: 0.5 # 重视当天内的持续热度 + hotness_weight: 0.1 +``` +**适用人群**:投资者、研究人员、新闻工作者、需要深度分析趋势的用户 + +#### 调整的方法 +1. **三个数字加起来必须等于 1.0** +2. **哪个重要就调大哪个**:在乎排名就调大 rank_weight,在乎持续性就调大 frequency_weight +3. **建议每次只调 0.1-0.2**,观察效果 + +核心思路:追求速度和时效性的用户提高排名权重,追求深度和稳定性的用户提高频次权重。 + +
+ +### 5. 推送格式参考 + +
+👉 点击展开:推送格式说明 +
+ +#### 推送示例 + +📊 热点词汇统计 + +🔥 [1/3] AI ChatGPT : 2 条 + + 1. [百度热搜] 🆕 ChatGPT-5正式发布 [**1**] - 09时15分 (1次) + + 2. [今日头条] AI芯片概念股暴涨 [**3**] - [08时30分 ~ 10时45分] (3次) + +━━━━━━━━━━━━━━━━━━━ + +📈 [2/3] 比亚迪 特斯拉 : 2 条 + + 1. [微博] 🆕 比亚迪月销量破纪录 [**2**] - 10时20分 (1次) + + 2. [抖音] 特斯拉降价促销 [**4**] - [07时45分 ~ 09时15分] (2次) + +━━━━━━━━━━━━━━━━━━━ + +📌 [3/3] A股 股市 : 1 条 + + 1. [华尔街见闻] A股午盘点评分析 [**5**] - [11时30分 ~ 12时00分] (2次) + +🆕 本次新增热点新闻 (共 2 条) + +**百度热搜** (1 条): + 1. ChatGPT-5正式发布 [**1**] + +**微博** (1 条): + 1. 比亚迪月销量破纪录 [**2**] + +更新时间:2025-01-15 12:30:15 + +#### 消息格式说明 + +| 格式元素 | 示例 | 含义 | 说明 | +| ------------- | --------------------------- | ------------ | --------------------------------------- | +| 🔥📈📌 | 🔥 [1/3] AI ChatGPT | 热度等级 | 🔥高热度(≥10条) 📈中热度(5-9条) 📌普通热度(<5条) | +| [序号/总数] | [1/3] | 排序位置 | 当前词组在所有匹配词组中的排名 | +| 频率词组 | AI ChatGPT | 关键词组 | 配置文件中的词组,标题必须包含其中词汇 | +| : N 条 | : 2 条 | 匹配数量 | 该词组匹配的新闻总数 | +| [平台名] | [百度热搜] | 来源平台 | 新闻所属的平台名称 | +| 🆕 | 🆕 ChatGPT-5正式发布 | 新增标记 | 本轮抓取中首次出现的热点 | +| [**数字**] | [**1**] | 高排名 | 排名≤阈值的热搜,红色加粗显示 | +| [数字] | [7] | 普通排名 | 排名>阈值的热搜,普通显示 | +| - 时间 | - 09时15分 | 首次时间 | 该新闻首次被发现的时间 | +| [时间~时间] | [08时30分 ~ 10时45分] | 持续时间 | 从首次出现到最后出现的时间范围 | +| (N次) | (3次) | 出现频率 | 在监控期间出现的总次数 | +| **新增区域** | 🆕 **本次新增热点新闻** | 新话题汇总 | 单独展示本轮新出现的热点话题 | + +
## 🐳 Docker 部署 @@ -1474,7 +1564,7 @@ docker exec -it trend-radar ls -la /app/config/ ``` -## 🤖 AI 智能分析部署 +## 🤖 AI 智能分析 TrendRadar v3.0.0 新增了基于 **MCP (Model Context Protocol)** 的 AI 分析功能,让你可以通过自然语言与新闻数据对话,进行深度分析。 @@ -1506,7 +1596,7 @@ AI 分析功能**不是**直接查询网络实时数据,而是分析你**本 Cherry Studio 提供 GUI 配置界面, 5 分钟快速部署, 复杂的部分是一键安装的。 -**图文部署教程**:现已更新到我的[公众号](#问题答疑与公益捐助),回复 "mcp" 即可 +**图文部署教程**:现已更新到我的[公众号](#问题答疑与交流),回复 "mcp" 即可 **详细部署教程**:[README-Cherry-Studio.md](README-Cherry-Studio.md) @@ -1533,7 +1623,7 @@ TrendRadar MCP 服务支持标准的 Model Context Protocol (MCP) 协议,可 - 保存后记得重启
-👉 点击展开:Claude Desktop +👉 点击展开:Claude Desktop #### 配置文件方式 @@ -1570,7 +1660,7 @@ TrendRadar MCP 服务支持标准的 Model Context Protocol (MCP) 协议,可
-👉 点击展开:Cursor +👉 点击展开:Cursor #### 方式一:HTTP 模式 @@ -1630,7 +1720,7 @@ TrendRadar MCP 服务支持标准的 Model Context Protocol (MCP) 协议,可
-👉 点击展开:VSCode (Cline/Continue) +👉 点击展开:VSCode (Cline/Continue) #### Cline 配置 @@ -1703,7 +1793,7 @@ TrendRadar MCP 服务支持标准的 Model Context Protocol (MCP) 协议,可
-👉 点击展开:Claude Code CLI +👉 点击展开:Claude Code CLI #### HTTP 模式配置 @@ -1735,7 +1825,7 @@ claude "对比知乎和微博平台对'比特币'的关注度"
-👉 点击展开:MCP Inspector(调试工具) +👉 点击展开:MCP Inspector(调试工具)
MCP Inspector 是官方调试工具,用于测试 MCP 连接: @@ -1768,7 +1858,7 @@ MCP Inspector 是官方调试工具,用于测试 MCP 连接:
-👉 点击展开:其他支持 MCP 的客户端 +👉 点击展开:其他支持 MCP 的客户端
任何支持 Model Context Protocol 的客户端都可以连接 TrendRadar: @@ -1814,17 +1904,17 @@ MCP Inspector 是官方调试工具,用于测试 MCP 连接:
-## ☕问题答疑与公益捐助 +## ☕问题答疑与交流 > 如果你想支持本项目,可通过微信搜索**腾讯公益**,对里面的**助学计划**随心捐助~ -> +> > 我还在为信息过载而焦虑,而他们却在信息荒漠中挣扎,他们比我更需要支持。
-👉 点击展开:作者有话说 +👉 点击展开:作者有话说
-感谢各位支持!因获得赞助商的赞助,现已移除我个人的**一元点赞**打赏码。 +感谢各位支持!因获得[赞助商](#-赞助商)的赞助,现已移除我个人的**一元点赞**打赏码。 之前参与**一元点赞**的朋友已收录至顶部**致谢名单**。 @@ -1833,6 +1923,7 @@ MCP Inspector 是官方调试工具,用于测试 MCP 连接: - **GitHub Issues**:适合针对性强的解答。提问时请提供完整信息(截图、错误日志、系统环境等)。 - **公众号交流**:适合快速咨询。建议优先在相关文章下的公共留言区交流,如私信,请文明礼貌用语😉 +- 💡 部署成功了?欢迎来公众号留言点赞,分享你的使用体验~
@@ -1857,13 +1948,13 @@ MCP Inspector 是官方调试工具,用于测试 MCP 连接: ### 💰 302.AI 新用户福利 -> 领取的 1 美元可用于调用各种 AI 大模型(如 Claude、GPT 等) -> 本项目 AI 分析功能需配置大模型使用,配置教程详见 [AI智能分析部署](#-ai-智能分析部署) +> 领取的 1 美元可用于调用各种 AI 大模型(如 Claude、GPT 等) +> 本项目 AI 分析功能需配置大模型使用,配置教程详见 [AI 智能分析](#-ai-智能分析) [![注册领取](https://img.shields.io/badge/注册_302.AI-领取_1_美元免费测试额度-FF6B6B?style=for-the-badge&logo=openai&logoColor=white)](https://share.302.ai/mEOUzG)