告别徕卡,华为开启全新时代!网友:小米......

小米12S系列发布会大家都看了吧,此次重点宣传了和徕卡的合作。从水印到原生画质再到专业光学镜头,徕卡可谓是全面提供,可见小米和徕卡的合作很深入。

e8cef5ad00736e9df0b5358bc8b2ee54.jpeg

大家都知道,此前徕卡是一直和华为合作,也是华为手机的一大亮点。如今小米已经和徕卡密切合作,这就让许多华为用户坐不住了。

但就在此时,转折点来了!华为正式发布了全新品牌——华为影像 XMAGE。将是华为移动影像的专属标志,未来华为将自研影像品牌。

222676fd6139a7b254e7d1024c97530f.jpeg

华为与徕卡结束了长达6年的合作,而XMAGE的发布也意味着,华为不再依赖于国际相机巨头合作赋能,XMAGE将在光学设计、机械结构、光电转换、图像算法和图像效果,五个层面进一步发挥技术优势。

不仅意味着华为影像正式从商标变成了注册商标,更意味着华为告别徕卡迈向了全新的XMAGE时代,并彻底和还在与影像品牌联名的其它厂商拉开了差距。

7dc76256e5ad0982fb24b3319e81fa5d.jpeg

在发布视频中,华为终端 BG 首席运营官还说了很有意思的一句话:在移动摄影探索初期,华为希望吸收传统行业的经验,于是有了和徕卡的合作.....

而且随着传统影像的进步与发展,来自传统行业的经验与技术,已经无法满足进一步突破的需要。于是有了华为影像 XMAGE 的诞生。

对手机行业、移动影像领域不了解的人或许会疑惑,凭什么华为能再次引领行业,发布属于自己的影像品牌?事实上,这是华为在移动影像领域多年如一日持续投入和发展所凝结的成果,代表着华为从光学系统、成像技术、图像处理等维度,构建起了完善且独一无二的移动影像技术体系,更代表华为在移动影像领域,实现了从影像技术到用户体验,再到影像文化的广袤生态建设。

c3a4a4e028e8b0e9865cdd258317d1c9.jpeg

在影像技术方面,华为开创了多摄像头系统、自由曲面镜头、潜望式长焦镜头等光学系统,有效拓宽了移动影像的使用场景,并带来了RYYB超感光传感器、全像素八核对焦、多光谱传感器等成像技术,让移动影像体验得到了质的飞跃。在图像处理方面,华为带来了AI摄影、实时HDR融合、XD Fusion Pro等领先技术,打破了移动影像的物理边界,让手机照片的画质不再受限于硬件。

在用户体验方面,华为带来的多光谱传感器、原色引擎等技术,让移动影像系统实现了更接近真实世界的色彩还原,做到所见即所得等。

从华为P9系列的双摄系统到华为P10系列的人像,从华为P20系列的超级夜景到华为P30系列的潜望式长焦,从华为P40系列的全时段、全焦段超清影像,再到华为P50系列的计算光学,华为作为移动影像领域的开拓者,每一次创新都带动了移动影像领域的进步与发展。

030d32174e216d81523bc3492178c64d.jpeg

可以预见,烙刻上“XMAGE”华为移动影像专属标识的下一代华为旗舰手机,还将继续以用户需求为导向、技术突破为抓手,不断为用户带来业界领先的移动影像体验,将手机摄影推向一个全新的高度。

不过,影像领域现在十分内卷,发力的也不仅仅只有华为。

OPPO自主设计和研发了影像专用NPU芯片 — 马里亚纳MariSilicon X,据爆料,OPPO将于晚些时候把马里亚纳MariSilicon X下放给realme和一加。

vivo与蔡司建立了“vivo蔡司联合影像实验室”,组织各自的技术专家进行联合研发,致力于解决移动影像领域的一系列技术瓶颈

e9b1fd55051fd54ddffd5db538a7f53b.jpeg

7月4日,努比亚也发布了自己的移动影像品牌 — NEOVISION,预计也会很快带来全新升级。

8b40102dd70601ffd3b8cb88ab6b2e0f.jpeg

尽管华为手机在今年的销售榜单中已经跌出前五名,但从华为今年的终端上新频率来看,供应链确实在逐步恢复。

而即将在8月发布的华为Mate 50就使用自研影像技术,并且首发华为鸿蒙OS 3.0系统,敬请期待吧!

-------- End --------

73ff541a23322172aa865260c8609b35.jpeg
精选内容
5f31a6c0b2920c6b990b4e68fb1ea292.jpeg 75bfd21c27da95513c947c0220d4b132.jpeg
from flask import Flask, render_template, request, jsonify from flask_sqlalchemy import SQLAlchemy from datetime import datetime import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import linear_kernel import numpy as np import random app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///ecommerce.db' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) # 模型定义 class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(80), unique=True, nullable=False) email = db.Column(db.String(120), unique=True, nullable=False) class Product(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(200), nullable=False) description = db.Column(db.Text) price = db.Column(db.Float, nullable=False) category = db.Column(db.String(100)) brand = db.Column(db.String(100)) image_url = db.Column(db.String(200)) rating = db.Column(db.Float) reviews_count = db.Column(db.Integer) def to_dict(self): return { 'id': self.id, 'name': self.name, 'price': self.price, 'image_url': self.image_url, 'category': self.category, 'brand': self.brand } class UserBehavior(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) product_id = db.Column(db.Integer, db.ForeignKey('product.id'), nullable=False) action = db.Column(db.String(20), nullable=False) # 'view', 'search', 'buy', 'add_to_cart' timestamp = db.Column(db.DateTime, default=datetime.utcnow) class SearchHistory(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) query = db.Column(db.String(200), nullable=False) timestamp = db.Column(db.DateTime, default=datetime.utcnow) # 搜索建议API - 基于协同过滤 @app.route('/api/suggestions', methods=['GET']) def get_suggestions(): query = request.args.get('query', '').strip().lower() user_id = request.args.get('user_id', 1, type=int) # 实际项目中应从会话获取 if len(query) < 2: return jsonify([]) # 1. 基于内容的搜索建议 content_based_suggestions = get_content_based_suggestions(query) # 2. 基于协同过滤的搜索建议 collaborative_suggestions = get_collaborative_filtering_suggestions(user_id, query) # 3. 基于用户历史的搜索建议 # history_suggestions = get_history_based_suggestions(user_id, query) # 合并结果并去重 suggestions = [] suggestion_set = set() # 优先添加协同过滤建议 for suggestion in collaborative_suggestions: if suggestion['value'].lower() not in suggestion_set: suggestion_set.add(suggestion['value'].lower()) suggestions.append(suggestion) # 添加内容建议 for suggestion in content_based_suggestions: if suggestion['value'].lower() not in suggestion_set: suggestion_set.add(suggestion['value'].lower()) suggestions.append(suggestion) # # 添加历史建议 # for suggestion in history_suggestions: # if suggestion['value'].lower() not in suggestion_set: # suggestion_set.add(suggestion['value'].lower()) # suggestions.append(suggestion) return jsonify(suggestions[:5]) # 基于内容的搜索建议 def get_content_based_suggestions(query): products = Product.query.filter( (Product.name.ilike(f'%{query}%')) | (Product.description.ilike(f'%{query}%')) ).limit(5).all() return [ { 'type': 'product', 'value': product.name, 'data': product.to_dict() } for product in products ] # 基于协同过滤的搜索建议 def get_collaborative_filtering_suggestions(user_id, query): # 获取用户最近的行为 recent_behaviors = UserBehavior.query.filter( UserBehavior.user_id == user_id ).order_by(UserBehavior.timestamp.desc()).limit(10).all() if not recent_behaviors: return [] # 获取相似用户喜欢的商品 similar_user_products = get_similar_users_products(user_id) # 从相似用户喜欢的商品中筛选与查询相关的 relevant_products = [] for product in similar_user_products: if query.lower() in product.name.lower() or query.lower() in (product.description or '').lower(): relevant_products.append(product) return [ { 'type': 'collaborative', 'value': product.name, 'data': product.to_dict() } for product in relevant_products[:3] ] # 获取相似用户喜欢的商品 def get_similar_users_products(user_id): # 这里实现协同过滤算法 # 获取所有用户行为数据 behaviors = UserBehavior.query.all() # 构建用户-商品交互矩阵 user_item_matrix = {} for behavior in behaviors: if behavior.user_id not in user_item_matrix: user_item_matrix[behavior.user_id] = {} # 不同行为赋予不同权重 if behavior.action == 'buy': weight = 3 elif behavior.action == 'add_to_cart': weight = 2 elif behavior.action == 'view': weight = 1 else: # search weight = 1.5 user_item_matrix[behavior.user_id][behavior.product_id] = weight # 如果没有足够的数据,返回热门商品 if len(user_item_matrix) < 2 or user_id not in user_item_matrix: return Product.query.order_by(Product.reviews_count.desc()).limit(5).all() # 计算当前用户与其他用户的相似度 target_user = user_item_matrix[user_id] similarities = [] for other_user_id, items in user_item_matrix.items(): if other_user_id == user_id: continue # 计算余弦相似度 dot_product = 0 target_norm = 0 other_norm = 0 for item_id, weight in items.items(): if item_id in target_user: dot_product += target_user[item_id] * weight other_norm += weight ** 2 for item_id, weight in target_user.items(): target_norm += weight ** 2 if target_norm == 0 or other_norm == 0: similarity = 0 else: similarity = dot_product / (np.sqrt(target_norm) * np.sqrt(other_norm)) similarities.append((other_user_id, similarity)) # 按相似度排序 similarities.sort(key=lambda x: x[1], reverse=True) # 获取最相似的前3个用户 top_similar_users = similarities[:3] # 从相似用户喜欢的商品中推荐 recommended_products = set() for similar_user_id, _ in top_similar_users: for product_id in user_item_matrix[similar_user_id]: if product_id not in target_user: product = Product.query.get(product_id) if product: recommended_products.add(product) return list(recommended_products) # 基于用户历史的搜索建议 def get_history_based_suggestions(user_id, query): history_suggestions = SearchHistory.query.filter( SearchHistory.user_id == user_id, SearchHistory.query.ilike(f'%{query}%') ).order_by(SearchHistory.timestamp.desc()).limit(3).all() return [ { 'type': 'history', 'value': history.query, 'data': {'query': history.query} } for history in history_suggestions ] # 搜索功能 @app.route('/search', methods=['GET']) def search(): query = request.args.get('query', '') category = request.args.get('category') brand = request.args.get('brand') min_price = request.args.get('min_price', type=float) max_price = request.args.get('max_price', type=float) # 记录搜索历史 user_id = 1 # 假设已登录用户 if query: search_history = SearchHistory(user_id=user_id, query=query) db.session.add(search_history) # 记录用户搜索行为 products = Product.query.filter( (Product.name.ilike(f'%{query}%')) | (Product.description.ilike(f'%{query}%')) ).limit(3).all() for product in products: behavior = UserBehavior( user_id=user_id, product_id=product.id, action='search' ) db.session.add(behavior) db.session.commit() # 执行搜索 products = search_products(query, category, brand, min_price, max_price) return render_template('search_results.html', products=products, query=query) # 搜索商品的辅助函数 def search_products(query, category=None, brand=None, min_price=None, max_price=None): query = query.strip() base_query = Product.query if query: base_query = base_query.filter( (Product.name.ilike(f'%{query}%')) | (Product.description.ilike(f'%{query}%')) ) if category: base_query = base_query.filter(Product.category == category) if brand: base_query = base_query.filter(Product.brand == brand) if min_price is not None: base_query = base_query.filter(Product.price >= min_price) if max_price is not None: base_query = base_query.filter(Product.price <= max_price) # 按相关性和销量排序 return base_query.order_by(Product.reviews_count.desc()).all() # 首页 @app.route('/') def index(): # 获取热门商品 trending_products = Product.query.order_by(Product.reviews_count.desc()).limit(8).all() # 获取推荐商品 user_id = 1 # 假设已登录用户 user_recs = get_user_recommendations(user_id) return render_template('base.html', trending=trending_products, user_recs=user_recs) # 获取用户推荐 def get_user_recommendations(user_id): # 使用协同过滤获取推荐商品 recommended_products = get_similar_users_products(user_id) # 如果推荐不足,补充热门商品 if len(recommended_products) < 4: hot_products = Product.query.order_by(Product.reviews_count.desc()).all() for product in hot_products: if product not in recommended_products: recommended_products.append(product) if len(recommended_products) >= 4: break return recommended_products[:4] # 初始化示例数据 def init_sample_data(): if Product.query.count() == 0: # 添加示例产品 sample_products = [ { 'name': '苹果 iPhone 14 Pro 256GB', 'description': '6.1英寸超视网膜XDR显示屏,A16仿生芯片,4800万像素主摄', 'price': 7999.0, 'category': '手机', 'brand': '苹果', 'image_url': 'https://picsum.photos/seed/iphone14/400/400', 'rating': 4.8, 'reviews_count': 1204 }, { 'name': '华为 Mate 50 Pro 256GB', 'description': '6.74英寸OLED屏幕,骁龙8+ 4G芯片,超光变摄像头苹果', 'price': 6799.0, 'category': '手机', 'brand': '华为', 'image_url': 'https://picsum.photos/seed/mate50/400/400', 'rating': 4.7, 'reviews_count': 987 }, { 'name': '小米 13 Pro 256GB', 'description': '6.73英寸2K屏幕,骁龙8 Gen2芯片,徕卡三摄', 'price': 5999.0, 'category': '手机', 'brand': '小米', 'image_url': 'https://picsum.photos/seed/xiaomi13/400/400', 'rating': 4.6, 'reviews_count': 856 }, { 'name': '三星 Galaxy S23 Ultra 256GB', 'description': '6.8英寸2K AMOLED屏幕,骁龙8 Gen2芯片,2亿像素主摄', 'price': 8999.0, 'category': '手机', 'brand': '三星', 'image_url': 'https://picsum.photos/seed/s23ultra/400/400', 'rating': 4.7, 'reviews_count': 732 }, { 'name': 'Apple Watch Series 8', 'description': '45毫米铝金属表壳,全天候视网膜显示屏,血氧检测', 'price': 3199.0, 'category': '智能手表', 'brand': '苹果', 'image_url': 'https://picsum.photos/seed/aw8/400/400', 'rating': 4.6, 'reviews_count': 1120 }, { 'name': '华为 Watch GT 3 Pro', 'description': '46毫米钛金属表壳,圆形屏幕,精准心率监测', 'price': 2499.0, 'category': '智能手表', 'brand': '华为', 'image_url': 'https://picsum.photos/seed/gt3pro/400/400', 'rating': 4.5, 'reviews_count': 980 }, { 'name': '小米 Watch S1 Pro', 'description': '1.43英寸AMOLED屏幕,117种运动模式,50米防水', 'price': 1299.0, 'category': '智能手表', 'brand': '小米', 'image_url': 'https://picsum.photos/seed/miw1/400/400', 'rating': 4.4, 'reviews_count': 760 }, { 'name': 'AirPods Pro 2', 'description': '主动降噪,通透模式,自适应均衡,IP54防水防尘', 'price': 1899.0, 'category': '耳机', 'brand': '苹果', 'image_url': 'https://picsum.photos/seed/airpods2/400/400', 'rating': 4.7, 'reviews_count': 1540 }, { 'name': '华为 FreeBuds Pro 2', 'description': '主动降噪,高解析度音频,双单元设计', 'price': 1199.0, 'category': '耳机', 'brand': '华为', 'image_url': 'https://picsum.photos/seed/hwbuds2/400/400', 'rating': 4.6, 'reviews_count': 1230 }, { 'name': '小米 Buds 4 Pro', 'description': '主动降噪,HiFi音质,通透模式,无线充电', 'price': 799.0, 'category': '耳机', 'brand': '小米', 'image_url': 'https://picsum.photos/seed/xmbuds4/400/400', 'rating': 4.5, 'reviews_count': 980 } ] for product_data in sample_products: product = Product(**product_data) db.session.add(product) db.session.commit() # 添加示例用户 user = User(username='test_user', email='test@example.com') db.session.add(user) db.session.commit() # 添加示例用户行为 user_id = user.id product_ids = [p.id for p in Product.query.all()] # 用户1的行为 for i, product_id in enumerate(product_ids[:5]): actions = ['view', 'search', 'add_to_cart', 'buy', 'view'] for action in actions: behavior = UserBehavior( user_id=user_id, product_id=product_id, action=action ) db.session.add(behavior) # 添加一些其他用户的行为,用于协同过滤 for other_user_id in range(2, 6): other_user = User(username=f'user{other_user_id}', email=f'user{other_user_id}@example.com') db.session.add(other_user) db.session.commit() # 每个用户随机喜欢一些商品 liked_products = random.sample(product_ids, random.randint(3, 6)) for product_id in liked_products: action = random.choice(['view', 'add_to_cart', 'buy']) behavior = UserBehavior( user_id=other_user_id, product_id=product_id, action=action ) db.session.add(behavior) db.session.commit() if __name__ == '__main__': with app.app_context(): db.create_all() # 初始化一些示例数据 init_sample_data() app.run(debug=True) 这是代码 需要改什么吗
07-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值