当前位置: 首页 > news >正文

SpringCloud学习笔记 - @SentinelResource的fallbackblockHandler配置详解 - sentinel

1. sentinel服务负载均衡测试

sentinel默认开启了负载均衡的轮询模式,为了测试sentinel服务负载均衡的效果,需要先创建两个服务提供者和一个服务消费者。

1.1. 分别创建两个服务提供者-支付服务9003、9004

1. 添加pom依赖: 提供者只需要将自己注册到服务注册中心即可,因此只需要添加spring-cloud-starter-alibaba-nacos-discovery。

	<dependencies><!--自定义api--><dependency><groupId>com.atguigu.springboot</groupId><artifactId>cloud-api-commons</artifactId><version>1.0-SNAPSHOT</version></dependency><!--nacos服务发现--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!--springboot web--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><!--日常通用jar包--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies>

2. 编写yaml配置文件: 注意给两个服务分配不同的端口9003、9004

server:port: 9003spring:application:name: nacos-payment-providercloud:nacos:discovery:server-addr: localhost:8848management:endpoints:web:exposure:include: "*"

3. 创建主启动类

@SpringBootApplication
@EnableDiscoveryClient
public class PaymentMain9003 {public static void main(String[] args) {SpringApplication.run(PaymentMain9003.class,args);}
}

4. 创建业务类

package com.atguigu.alibaba.controller;import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;import java.util.HashMap;/*** @author 强浩* @version 1.0.0* Copyright(c) YTANG All Rights Reserved* @className* @project 管理系统* @date 2022年09月14日*/
@RestController
@Slf4j
public class PaymentController {@Value("${server.port}")private String serverPort;//模拟数据库public static HashMap<Long, Payment> hashMap = new HashMap<>();static {hashMap.put(1L, new Payment(1L,"28a8c1e3bc2742d8848569891fb42181"));hashMap.put(2L,new Payment(2L,"bba8c1e3bc2742d8848569891ac32182"));hashMap.put(3L,new Payment(3L,"6ua8c1e3bc2742d8848569891xt92183"));}//传入id获取数据@GetMapping(value = "/paymentSQL/{id}")public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id){Payment payment = hashMap.get(id);CommonResult<Payment> commonResult = new CommonResult(200, "from mysql,serverPort:  " + serverPort, payment);return commonResult;}
}

2. 创建服务消费者-订单服务84

1. 添加pom依赖: 因为之后需要使用sentinel进行限流,所以需要添加sentinel的依赖

    <dependencies><dependency><groupId>com.atguigu.springboot</groupId><artifactId>cloud-api-commons</artifactId><version>1.0-SNAPSHOT</version></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies>

2. 配置application.yaml文件:

server:port: 84spring:application:name: nacos-order-consumercloud:nacos:discovery:server-addr: localhost:8848sentinel:transport:dashboard: localhost:8080port: 8719server_url:payment_provider: http://nacos-payment-provider

3. 创建主启动类:

@SpringBootApplication
@EnableDiscoveryClient
public class OrderMain84 {public static void main(String[] args) {SpringApplication.run(OrderMain84.class,args);}
}

4. 创建RestTemplate服务调用配置类:

package com.atgugui.alibaba.config;import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;/*** @author 强浩* @version 1.0.0* Copyright(c) YTANG All Rights Reserved* @className* @project 管理系统* @date 2022年09月14日*/
@Configuration
public class ApplicationContextConfig {@Bean@LoadBalancedpublic RestTemplate getRestTemplate(){return new RestTemplate();}
}

5. 创建业务类: 注入RestTemplate进行远程服务调用

package com.atgugui.alibaba.controller;import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;import javax.annotation.Resource;/*** @author 强浩* @version 1.0.0* Copyright(c) YTANG All Rights Reserved* @className* @project 管理系统* @date 2022年09月14日*/
@RestController
@Slf4j
public class CircleBreakerController {public static final String SERVER_URL = "http://nacos-payment-provider";@Resourceprivate RestTemplate restTemplate;@GetMapping("/consumer/fallback/{id}")public CommonResult<Payment> fallback(@PathVariable("id") Long id){CommonResult<Payment> result = restTemplate.getForObject(SERVER_URL + "/paymentSQL/" + id, CommonResult.class, id);if(id == 4){throw new IllegalArgumentException ("IllegalArgumentException,非法参数异常....");}else if(result.getData() == null){throw new NullPointerException ("NullPointerException,该ID没有对应记录,空指针异常");}return result;}
}

5. 测试访问: 查看负载均衡的轮询效果
访问 http://localhost:84/consumer/fallback/1,多次访问,通过观察端口号可以发现,对支付服务进行了轮询访问。

2. fallback-业务错误处理

fallback只负责业务异常

1. 添加@SentinelResource注解,并配置fallback参数,指定服务降级处理方法

    @GetMapping("/consumer/fallback/{id}")@SentinelResource(value = "fallback", fallback = "handlerFallback")//指定fallback服务降级处理方法public CommonResult<Payment> fallback(@PathVariable("id") Long id){CommonResult<Payment> result = restTemplate.getForObject(SERVER_URL + "/paymentSQL/" + id, CommonResult.class, id);if(id == 4){throw new IllegalArgumentException ("IllegalArgumentException,非法参数异常....");}else if(result.getData() == null){throw new NullPointerException ("NullPointerException,该ID没有对应记录,空指针异常");}return result;}public CommonResult<Payment> handlerFallback(@PathVariable Long id,Throwable e){Payment payment = new Payment(id,"null");return new CommonResult<>(444,"兜底异常handlerFallback,exception内容  "+e.getMessage(),payment);}

2. 测试: http://localhost:84/consumer/fallback/5,在没有降级处理的时候会直接报错,添加了fallback后进入降级处理方法。
在这里插入图片描述

3. blockHandler-限流规则处理

blockHandler处理违反了限流规则的请求

1. 给fallback方法资源添加限流规则
在这里插入图片描述

2. 配置@SentinelResource的blockHandler参数指定流控服务降级方法

    @GetMapping("/consumer/fallback/{id}")@SentinelResource(value = "fallback", blockHandler = "blockHandler")public CommonResult<Payment> fallback(@PathVariable("id") Long id){CommonResult<Payment> result = restTemplate.getForObject(SERVER_URL + "/paymentSQL/" + id, CommonResult.class, id);if(id == 4){throw new IllegalArgumentException ("IllegalArgumentException,非法参数异常....");}else if(result.getData() == null){throw new NullPointerException ("NullPointerException,该ID没有对应记录,空指针异常");}return result;}public CommonResult<Payment> blockHandler(@PathVariable Long id, BlockException blockException){Payment payment = new Payment(id,"null");return new CommonResult<>(445,"blockHandler-sentinel限流,无此流水: blockException  "+blockException.getMessage(),payment);}

3. 测试:http://localhost:84/consumer/fallback/5
在这里插入图片描述

4. 服务熔断fallback和blockHandler同时配置

blockHandler和fallback 都进行了配置,则被限流降级而抛出BlockException时只会进入blockHandler处理逻辑。也就是说会优先处理服务限流,保证高可用,不要卡死服务器。

@RestController
@Slf4j
public class CircleBreakerController {public static final String SERVER_URL = "http://nacos-payment-provider";@Resourceprivate RestTemplate restTemplate;@GetMapping("/consumer/fallback/{id}")@SentinelResource(value = "fallback", blockHandler = "blockHandler", fallback = "handlerFallback")public CommonResult<Payment> fallback(@PathVariable("id") Long id){CommonResult<Payment> result = restTemplate.getForObject(SERVER_URL + "/paymentSQL/" + id, CommonResult.class, id);if(id == 4){throw new IllegalArgumentException ("IllegalArgumentException,非法参数异常....");}else if(result.getData() == null){throw new NullPointerException ("NullPointerException,该ID没有对应记录,空指针异常");}return result;}public CommonResult handlerFallback(@PathVariable  Long id,Throwable e) {Payment payment = new Payment(id,"null");return new CommonResult<>(444,"兜底异常handlerFallback,exception内容  "+e.getMessage(),payment);}public CommonResult<Payment> blockHandler(@PathVariable Long id, BlockException blockException){Payment payment = new Payment(id,"null");return new CommonResult<>(445,"blockHandler-sentinel限流,无此流水: blockException  "+blockException.getMessage(),payment);}
}

5. exceptionsToIgnore忽略指定异常

@RestController
@Slf4j
public class CircleBreakerController {public static final String SERVER_URL = "http://nacos-payment-provider";@Resourceprivate RestTemplate restTemplate;@GetMapping("/consumer/fallback/{id}")@SentinelResource(value = "fallback", blockHandler = "blockHandler", fallback = "handlerFallback",exceptionsToIgnore = IllegalArgumentException.class)public CommonResult<Payment> fallback(@PathVariable("id") Long id){CommonResult<Payment> result = restTemplate.getForObject(SERVER_URL + "/paymentSQL/" + id, CommonResult.class, id);if(id == 4){throw new IllegalArgumentException ("IllegalArgumentException,非法参数异常....");}else if(result.getData() == null){throw new NullPointerException ("NullPointerException,该ID没有对应记录,空指针异常");}return result;}public CommonResult handlerFallback(@PathVariable  Long id,Throwable e) {Payment payment = new Payment(id,"null");return new CommonResult<>(444,"兜底异常handlerFallback,exception内容  "+e.getMessage(),payment);}public CommonResult<Payment> blockHandler(@PathVariable Long id, BlockException blockException){Payment payment = new Payment(id,"null");return new CommonResult<>(445,"blockHandler-sentinel限流,无此流水: blockException  "+blockException.getMessage(),payment);}}

设置了忽略IllegalArgumentException异常,当出现该异常时不会进入降级逻辑。
在这里插入图片描述

6. sentinel整合openFeign实现服务熔断降级

一般在消费端添加feign组件实现服务降级:在84消费端添加openFeign的依赖,实现服务的熔断降级。

1. 引入openFeign的pom依赖: 这里因为版本冲突问题,需要将devtools组件取消掉,目前具体冲突原因还不知道。

<dependencies><dependency><groupId>com.atguigu.springboot</groupId><artifactId>cloud-api-commons</artifactId><version>1.0-SNAPSHOT</version></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!--添加openFeign依赖--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-openfeign</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId><version>0.2.2.RELEASE</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><!--<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency>--><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies>

2. 修改yaml文件,添加fegin对sentinel的支持:

server:port: 84spring:application:name: nacos-order-consumercloud:nacos:discovery:server-addr: localhost:8848sentinel:transport:dashboard: localhost:8080port: 8719server_url:payment_provider: http://nacos-payment-providerfeign:sentinel:enabled: true

3. 在主启动类开启openFeign:

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class OrderMain84 {public static void main(String[] args) {SpringApplication.run(OrderMain84.class,args);}
}

4. 编写业务类: 使用@FeignClient注解,指定要进行访问的微服务名称,和发生熔断时所要调用的fallback方法

@FeignClient(value = "nacos-payment-provider",fallback = PaymentFallbackServiceImpl.class)
public interface PaymentService {@GetMapping(value = "/paymentSQL/{id}")public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id);
}

5. 服务降级方法实现类: 相当于给PaymentService增加了一个实现类,在发生熔断的情况下自动调用方法的fallback实现,来快速返回结果,防止系统卡死。

@Service
public class PaymentFallbackServiceImpl implements PaymentService {@Overridepublic CommonResult<Payment> paymentSQL(Long id) {return new CommonResult<>(44444,"服务降级返回,---PaymentFallbackService",new Payment(id,"errorSerial"));}
}

6. 现在就可以使用openFeign进行远程服务调用,我们只需要像之前一样将服务接口注入到controller层中,即可实现无感的远程服务调用了:

@RestController
@Slf4j
public class CircleBreakerController {//注入openFeign远程调用接口@Resourceprivate PaymentService paymentService;@GetMapping(value = "/consumer/paymentSQL/{id}")public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id){CommonResult<Payment> result = paymentService.paymentSQL(id);return result;}
}

7. 测试: 访问 http://localhost:84/consumer/paymentSQL/2,此时将9003服务提供者断开,84消费侧自动降级,不会被耗死。
在这里插入图片描述

7. 各熔断框架比较

SentinelHystrixresilience4j
隔离策略信号量隔离(并发线程数限流)线程池隔商/信号量隔离信号量隔离
熔断降级策略基于响应时间、异常比率、异常数基于异常比率基于异常比率、响应时间
实时统计实现滑动窗口(LeapArray)滑动窗口(基于RxJava)Ring Bit Buffer
动态规则配置支持多种数据源支持多种数据源有限支持
拓展性多个扩展点插件的形式接口的形式
基于注解的支持支持支持支持
限流基于QPS,支持基于调用关系的限流有限的支持Rate Limiter
流量整形支持预热模式匀速器模式、预热排队模式不支持简单的Rate Limiter模式
系统自适应保护支持不支持不支持
控制台提供开箱即用的控制台,可配置规则、查看秒级监控,机器发观等简单的监控查看不提供控制台,可对接其它监控系统

相关文章:

SpringCloud学习笔记 - @SentinelResource的fallbackblockHandler配置详解 - sentinel

1. sentinel服务负载均衡测试 sentinel默认开启了负载均衡的轮询模式&#xff0c;为了测试sentinel服务负载均衡的效果&#xff0c;需要先创建两个服务提供者和一个服务消费者。 1.1. 分别创建两个服务提供者-支付服务9003、9004 1. 添加pom依赖&#xff1a; 提供者只需要将…...

华为OD机试题 - 静态扫描最优成本(JavaScript)

最近更新的博客 2023新华为OD机试题 - 斗地主(JavaScript)2023新华为OD机试题 - 箱子之形摆放(JavaScript)2023新华为OD机试题 - 考古学家(JavaScript)2023新华为OD机试题 - 相同数字的积木游戏 1(JavaScript)2023新华为OD机试题 - 最多等和不相交连续子序列(JavaScri…...

mysql大数据量批量提交

DROP PROCEDURE IF EXISTS test.insert_bacth_commit_test1;CREATE PROCEDURE test.insert_bacth_commit_test1()begindeclare start_num int default 0; -- 初始设置起始行数declare end_num int default 5;-- 初始设施结束行数declare cnt_srouce int default 0; -- 定义源表…...

IP SAN组网配置

目录一、确认网络连接畅通二、服务器端ISCSI启动器配置1.以root身份登录2.验证是否已安装iSCSI启动器3.安装iSCSI启动器4.启动iSCSI服务5.给iSCSI启动器命名6.扫描目标器7.登录目标器8.将登录目标器行为设置为自启动三、主机多路径配置四、存储配置五、主机挂载背景&#xff1a…...

面试7分看能力,3分靠嘴皮,剩下90分就靠这份Java面试八股文

有句话说的好&#xff0c;面试中7分靠能力&#xff0c;3分靠嘴皮刚开始面试的时候&#xff0c;介绍项目一般都是凸显我们技能的重中之重&#xff0c;它对一次面试的成败可以说具有决定性作用&#xff0c;这就涉及到我们的表达能力了&#xff0c;有人说我其实水平都在线&#xf…...

api接口如何对接?

对于很多产品小白或求职者而言&#xff0c;API接口是一个产品和研发领域的专业术语&#xff0c;大家可能在文章或者PRD中都已经有接触过API接口的概念。 实际上&#xff0c;接口的应用已经非常广泛和成熟&#xff0c;这个概念主要活跃在公司内部的各系统之间的衔接和对接以及公…...

毕业2年不到选择跳槽,居然拿到25K的薪资,简直了···

本人本科就读于某普通院校&#xff0c;毕业后通过同学的原因加入软件测试这个行业&#xff0c;角色也从测试小白到了目前的资深工程师&#xff0c;从功能测试转变为测试开发&#xff0c;并顺利拿下了某二线城市互联网企业的Offer&#xff0c;年薪 30W 。 选择和努力哪个重要&am…...

Java反序列化漏洞——CommonsCollections3链分析

一、原理CC1链中我们是通过调用Runtime.getRuntime.exec()来执行系统命令&#xff0c;而另一个方向我们可以通过TemplatesImpl加载字节码的类&#xff0c;通过调⽤其newTransformer() 方法&#xff0c;即可执⾏这段字节码的类构造器&#xff0c;我们在类构造器中加入恶意代码&a…...

英文论文(sci)解读复现【NO.5】让RepVGG再次变得更强大:一种量化感知方法

此前出了目标检测算法改进专栏&#xff0c;但是对于应用于什么场景&#xff0c;需要什么改进方法对应与自己的应用场景有效果&#xff0c;并且多少改进点能发什么水平的文章&#xff0c;为解决大家的困惑&#xff0c;此系列文章旨在给大家解读发表高水平学术期刊中的SCI论文&am…...

hive学习(仅供参考)

hive搭建Hive什么是hiveHive的优势和特点hive搭建解压、改名修改环境变量添加hive-site.xml将maven架包拷贝到hive替换一下gua包使环境变量生效初始化安装成功Hive 什么是hive 将结构化的数据文件映射为数据库表 提供类sql的查询语言HQL(Hive Query Language) Hive让更多的人…...

新生儿住月子中心20天患败血症 什么是败血症?有哪些危害

12月7日&#xff0c;四川眉山市民唐先生说&#xff0c;他刚出生的儿子在妇产医院分娩中心住了20天后感染了败血症。据唐先生介绍&#xff0c;哈子出院时各项指标正常。他在分娩中心住了半个月左右&#xff0c;孩子喝牛奶异常易怒&#xff0c;第二天开始发烧。当天&#xff0c;在…...

2023年美赛赛题A题赛题公布

问题A:遭受旱灾的植物群落背景不同种类的植物对压力的反应方式不同。例如&#xff0c;草原是相当的对干旱敏感。干旱发生的频率和严重程度各不相同。大量的观察表明&#xff0c;不同物种的数量在一个物种如何生长的过程中起着重要作用植物群落在连续几代的干旱周期中适应。在一…...

交互式前端开发最好用的WebGL框架

JavaScript是创建Web最有用的编程语言之一&#xff0c;尤其是在WebGL库的支持下。有了WebGL&#xff0c;可以很方便地使用 HTML5 Canvas 元素动态生成图形。因此&#xff0c;设计师和开发人员很容易创建流畅的2D和3D效果。WebGL是JavaScript API或基于OpenGL的库&#xff0c;它…...

【Java 面试合集】包装类的缓存问题

包装类的缓存问题1. 概述 嗨&#xff0c;大家好&#xff0c;【Java 面试合集】每日一题又来了。今天我们分享的内容是&#xff1a;包装类的缓存问题。 我们下面的案例以Integer 为例 2. 表现 public class TestCache {public static void main(String[] args) {Integer i 127…...

JAVA PYTHONGOLANG在STR LIST MAP 等数据结构的一些底层设计

一、列表和扩容机制 JAVA的列表主要分为list和vector,list是线程不安全的。list又主要分为ArrayList和LinkedList,ArrayList底层通过object数组实现,可以实现快速查找,LinkedList底层通过双向列表实现。java常用的列表实现类为ArrayList,ArrayList的主要源码如下: publi…...

SpringMVC处理ajax请求

RequestBodyRequestBody:将请求体中的内容和控制器方法的形参进行绑定。使用RequestBody注解将json格式请求参数转换为java对象。条件&#xff1a;1. 导入jackson依赖 (默认调用jackson功能实现的)2. 在springmvc的配置文件中设置开启<mvc:annotation-driven/>3. 在处理请…...

Spire.Office 8.2.2 for NET 开年之喜

Spire.Office for .NET对文档的操作包括打开&#xff0c;创建&#xff0c;修改&#xff0c;转换&#xff0c;打印&#xff0c;浏览 Word、Excel、PowerPoint 和 PDF 文档&#xff0c;以及将数据从数据源导出为常用的文档格式&#xff0c;如&#xff1a;Word&#xff0c;Excel&a…...

python中的.nc文件处理 | 04 利用矢量边界提取NC数据

利用矢量边界提取.nc数据 import osimport numpy as np import pandas as pd import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.feature as cfeature import seaborn as sns import geopandas as gpd import earthpy as et import xarray as xr # …...

使用 PyNeuraLogic 超越 Transformers

展示神经符号编程的力量neuro-symbolic1. 简介 在过去的几年里&#xff0c;我们看到了基于 Transformer 的模型的兴起&#xff0c;并在自然语言处理或计算机视觉等许多领域取得了成功的应用。在本文[1]中&#xff0c;我们将探索一种简洁、可解释和可扩展的方式来表达深度学习模…...

微信点金计划(服务商角度)

时间&#xff1a;2023/2/17 背景&#xff1a;微信在推出点金计划后&#xff0c;原本window.WeixinJSBridge.invoke方法的回调失效了&#xff0c;需要在微信支付服务商平台&#xff5c;平台开放更多能力&#xff0c;与服务商一起成长这里进行配置&#xff0c;配置流程跟着官方给…...

Step3-VL-10B内网穿透应用:安全远程模型调用方案

Step3-VL-10B内网穿透应用&#xff1a;安全远程模型调用方案 1. 场景需求与痛点分析 很多企业和机构在内部部署了强大的多模态AI模型&#xff0c;比如Step3-VL-10B这样的视觉语言模型&#xff0c;能够处理图像和文本的复杂任务。但这些模型通常运行在内网环境中&#xff0c;外…...

Pixel Aurora Engine效果展示:像素极光视觉系统渲染的星际战舰系列

Pixel Aurora Engine效果展示&#xff1a;像素极光视觉系统渲染的星际战舰系列 1. 像素极光引擎简介 Pixel Aurora Engine是一款基于AI扩散模型的高端绘图工作站&#xff0c;专为像素艺术创作而设计。它采用独特的复古像素游戏风格界面&#xff0c;通过先进的AI技术将文字描述…...

OFA模型在零售行业的视觉问答应用案例

OFA模型在零售行业的视觉问答应用案例 1. 引言 走进任何一家现代零售商店&#xff0c;你都会看到成千上万的商品整齐地陈列在货架上。但对于店员来说&#xff0c;要快速准确地回答"这个品牌的洗发水有没有无硅油版本&#xff1f;"或者"这款饼干是否含有坚果成…...

Ku频段相控阵天线避坑指南:从G/T骤降到EIRP波动,这些实测数据你要知道

Ku频段相控阵天线性能衰减实测&#xff1a;60离轴角下的G/T与EIRP工程修正策略 相控阵天线在卫星通信领域正经历从实验室到工程应用的跨越式发展。当无人机以60离轴角追踪卫星时&#xff0c;实测数据显示天线增益可能骤降4.5dB——这个数字足以让精心计算的链路预算彻底失效。在…...

nlp_gte_sentence-embedding_chinese-large保姆级教程:免配置镜像启动+Web界面使用详解

nlp_gte_sentence-embedding_chinese-large保姆级教程&#xff1a;免配置镜像启动Web界面使用详解 你是不是经常遇到这样的问题&#xff1a;手里有一堆文档&#xff0c;想快速找到和某个问题最相关的内容&#xff0c;却只能靠关键词搜索&#xff0c;结果要么漏掉&#xff0c;要…...

革命性本地AI聊天应用ChatRTX:基于TensorRT-LLM和RAG的完整指南

革命性本地AI聊天应用ChatRTX&#xff1a;基于TensorRT-LLM和RAG的完整指南 【免费下载链接】trt-llm-rag-windows 项目地址: https://gitcode.com/gh_mirrors/tr/trt-llm-rag-windows ChatRTX是一款革命性的本地AI聊天应用程序&#xff0c;它基于NVIDIA的TensorRT-LLM…...

Venera开源漫画阅读工具:构建个性化漫画内容生态系统指南

Venera开源漫画阅读工具&#xff1a;构建个性化漫画内容生态系统指南 【免费下载链接】venera A comic app 项目地址: https://gitcode.com/gh_mirrors/ve/venera 副标题&#xff1a;如何通过模块化漫画源配置解决多平台阅读碎片化难题 价值定位&#xff1a;重新定义漫…...

PCIe 4.0 vs 内存总线:为什么你的NVMe SSD速度上不去?

PCIe 4.0与内存总线带宽博弈&#xff1a;揭开NVMe SSD性能瓶颈的真相 当你花大价钱购入一块标称读取速度7000MB/s的高端NVMe SSD&#xff0c;实际测试却发现速度只有标称值的一半时&#xff0c;这种落差感就像买了跑车却只能在市区堵车。问题往往不在SSD本身&#xff0c;而是隐…...

高效图像浏览:解锁90+格式的轻量级解决方案

高效图像浏览&#xff1a;解锁90格式的轻量级解决方案 【免费下载链接】ImageGlass &#x1f3de; A lightweight, versatile image viewer 项目地址: https://gitcode.com/gh_mirrors/im/ImageGlass 在数字时代&#xff0c;我们每天都要与各种图像格式打交道&#xff0…...

终极指南:Ledger会计系统数据备份与灾难恢复策略

终极指南&#xff1a;Ledger会计系统数据备份与灾难恢复策略 【免费下载链接】ledger Double-entry accounting system with a command-line reporting interface 项目地址: https://gitcode.com/gh_mirrors/le/ledger Ledger作为一款强大的复式记账系统&#xff0c;其核…...