search
HomeDatabaseMysql Tutorial拣阅一:缘由和系统设计_MySQL

个人平时比较喜欢看些新闻资讯,比如科技类的huxiu, 36kr,体育新闻等,对相关的APP也有用到,今日头条做的很不错,周围很多人在用,但是在用了一段时间之后发现很多APP都有以下特点:

1. 信息多而且杂,即使我只订阅或者关注了某些类别,推送的消息首先是太多其次是不相关。太多的信息我消费不了,不相关的信息我比较反感。

2. 现在的APP号称可以进行精准和个性化的推荐,头条做的还行,但是感觉不能及时的捕捉用户的兴趣变化,推荐的结果变化也小, 惊喜度不够。

3. 聚合类的新闻资讯有很多重复性的内容,而且很多只是简单的抓取和展现,对阅读的方式和体验都没有太大改善。

以上大概是用过之后感觉有些不便的地方,之前做过一段时间的推荐和文本处理相关的事情,加上自己有些想法,就想实现一个简单的系统,拿自己做个试验试试,也好验证下自己的想法,针对以上问题,个人的想法是1. 每天给用户展现一定数量的有价值的新闻,即限制推送给用户新闻的数量,相关性方面需要针对用户的特征建模,预期效果不太明显,只能通过一些策略来控制,比如最热和相关结合,某个事件或者某个类别展现一条新闻等策略实现。2. 针对用户的行为及时更新用户的特征权重,及让变化更实时一点。3. 很多人看文章只是看文章的大意,很少通读全文的,如果能对文章进行摘要,对APP类的应该会比较好,但是现在对中文貌似没有好的摘要方法,只能不断的进行尝试改进,我会用之前文章介绍的摘要算法进行实验,结合中文的词法和语义做些尝试。

以上纯粹是个人的观点和看法,肯定有不妥的地方,这方面有想法的可以在一起交流下。

目前开发工作已经进行了一些,之前一直用java来做web相关的服务和设计,奈何一般的云服务器跑java的话费用较高,故采用了python来进行相关的开发工作。系统的简单设计如下:

系统主要分为OnLine Service, OffLine Service, 其中OnLine 部分主要进行以下操作:

    a).  Fetcher利用UA和PA来获取推荐展示的新闻数据,首先会向redis请求相关数据计算,然后到MySql获取数据,目前假定MySql可以满足一定量的并发请求,以后可以考虑按照数据类型在MySql前面再加一层缓存。 

    b). Updater主要是根据用户行为来更新缓存中的UA权重,这样下次就可以根据用户的最新行为进行推荐展示。

     

    目前采用的方式是tornado 框架来提供web服务,redis作为缓存存储数据,mysql作为底层数据存储, rabbitmq 来作为消息队列,jieba分词器来进行中文分词,redis + mysql 目前已经实现,web主要剩下页面的设计和实现,特征提取和摘要正在进行,由于事情比较多,可能最后实现的跟文章中说的会有很大区别,接下来会讲部分想法的实现过程和效果, 具体取决于进度和工作了,如果有兴趣可以一起交流。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

MySQL's Role: Databases in Web ApplicationsMySQL's Role: Databases in Web ApplicationsApr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

MySQL: Building Your First DatabaseMySQL: Building Your First DatabaseApr 17, 2025 am 12:22 AM

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL: A Beginner-Friendly Approach to Data StorageMySQL: A Beginner-Friendly Approach to Data StorageApr 17, 2025 am 12:21 AM

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use