展开菜单
首页 精品内容 本月促销 装机必备 Windows PDF教程 macOS软件 IOS软件 Android AI 专题
全部分类

当前位置:

首页 > 编程开发 > redis中的分布式锁有哪些特点

redis中的分布式锁有哪些特点

Redis Assistant
Redis Assistant

Redis Assistant 是一款为Redis设计的高效可视化管理与监控工具,提供多种操作模式,高效处理服务器数据。日常使用里的持续防护和信息管理会更突出,适合把安全控制放进长期使用流程中的场景。

¥19
Windows/macOS/Linux 2026-08-22
正版软件 Windows macOS软件 Linux 数据库管理工具
立即下载

分布式锁的特点1.独占性不论在任何情况下都只能有一个线程持有锁。2.高可用redis集群环境不能因为某一个节点宕机而出现获取锁或释放锁失败。3.防死锁必须有超时控制机制或者撤销操作。4.不乱抢自己加锁,自己释放。不能释放别人加的锁。5.重入性同一线程可以多次加锁。redis单机怎么实现一般情况下都是使用setnx+lua脚本实现。直接贴代码packagecom.fandf.test.redis;importcn.hutool.core.util.IdUtil;importcn.hutool.core.ut

本文目录

    分布式锁的特点

    • 1.独占性

    不论在任何情况下都只能有一个线程持有锁。

    • 2.高可用

    redis集群环境不能因为某一个节点宕机而出现获取锁或释放锁失败。

    • 3.防死锁

    必须有超时控制机制或者撤销操作。

    • 4.不乱抢

    自己加锁,自己释放。不能释放别人加的锁。

    • 5.重入性

    同一线程可以多次加锁。

    redis单机怎么实现

    一般情况下都是使用setnx+lua脚本实现。

    直接贴代码

    package com.fandf.test.redis;
    
    import cn.hutool.core.util.IdUtil;
    import cn.hutool.core.util.RandomUtil;
    import lombok.extern.slf4j.Slf4j;
    import org.springframework.data.redis.core.RedisTemplate;
    import org.springframework.data.redis.core.script.DefaultRedisScript;
    import org.springframework.stereotype.Service;
    
    import javax.annotation.Resource;
    import java.util.Collections;
    import java.util.concurrent.TimeUnit;
    
    /**
     * redis 单机锁
     *
     * @author fandongfeng
     * @date 2023/3/29 06:52
     */
    @Slf4j
    @Service
    public class RedisLock {
    
        @Resource
        RedisTemplate redisTemplate;
    
        private static final String SELL_LOCK = "kill:";
    
        /**
         * 模拟秒杀
         *
         * @return 是否成功
         */
        public String kill() {
    
            String productId = "123";
            String key = SELL_LOCK + productId;
            //锁value,解锁时 用来判断当前锁是否是自己加的
            String value = IdUtil.fastSimpleUUID();
            //加锁 十秒钟过期 防死锁
            Boolean flag = redisTemplate.opsForValue().setIfAbsent(key, value, 10, TimeUnit.SECONDS);
            if (!flag) {
                return "加锁失败";
            }
            try {
                String productKey = "good123";
                //获取商品库存
                Integer stock = (Integer) redisTemplate.opsForValue().get(productKey);
                if (stock == null) {
                    //模拟录入数据, 实际应该加载时从数据库读取
                    redisTemplate.opsForValue().set(productKey, 100);
                    stock = 100;
                }
                if (stock <= 0) {
                    return "卖完了,下次早点来吧";
                }
                //扣减库存, 模拟随机卖出数量
                int randomInt = RandomUtil.randomInt(1, 10);
                redisTemplate.opsForValue().decrement(productKey, randomInt);
                // 修改db,可以丢到队列里慢慢处理
                return "成功卖出" + randomInt + "个,库存剩余" + redisTemplate.opsForValue().get(productKey) + "个";
            } finally {
    
    //            //这种方法会存在删除别人加的锁的可能
    //            redisTemplate.delete(key);
    
    //            if(value.equals(redisTemplate.opsForValue().get(key))){
    //                //因为if条件的判断和 delete不是原子性的,
    //                //if条件判断成功后,恰好锁到期自己解锁
    //                //此时别的线程如果持有锁了,就会把别人的锁删除掉
    //                redisTemplate.delete(key);
    //            }
    
                //使用lua脚本保证判断和删除的原子性
                String luaScript =
                        "if (redis.call('get',KEYS[1]) == ARGV[1]) then " +
                                "return redis.call('del',KEYS[1]) " +
                                "else " +
                                "return 0 " +
                                "end";
                redisTemplate.execute(new DefaultRedisScript<>(luaScript, Boolean.class), Collections.singletonList(key), value);
            }
        }
    
    
    }

    进行单元测试,模拟一百个线程同时进行秒杀

    package com.fandf.test.redis;
    
    import org.junit.jupiter.api.DisplayName;
    import org.junit.jupiter.api.RepeatedTest;
    import org.junit.jupiter.api.Test;
    import org.junit.jupiter.api.parallel.Execution;
    import org.springframework.boot.test.context.SpringBootTest;
    
    import javax.annotation.Resource;
    
    import static org.junit.jupiter.api.parallel.ExecutionMode.CONCURRENT;
    
    /**
     * @Description:
     * @author: fandongfeng
     * @date: 2023-3-24 16:45
     */
    @SpringBootTest
    class SignServiceTest {
    
      
        @Resource
        RedisLock redisLock;
    
    
        @RepeatedTest(100)
        @Execution(CONCURRENT)
        public void redisLock() {
            String result = redisLock.kill();
            if("加锁失败".equals(result)) {
    
            }else {
                System.out.println(result);
            }
        }
    }

    只有三个线程抢到了锁

    成功卖出5个,库存剩余95个
    成功卖出8个,库存剩余87个
    成功卖出7个,库存剩余80个

    redis锁有什么问题?

    总的来说有两个:

    • 1.无法重入。

    • 2.我们为了防止死锁,加锁时都会加上过期时间,这个时间大部分情况下都是根据经验对现有业务评估得出来的,但是万一程序阻塞或者异常,导致执行了很长时间,锁过期就会自动释放了。此时如果别的线程拿到锁,执行逻辑,就有可能出现问题。

    那么这两个问题有没有办法解决呢?有,接下来我们就来讲讲Redisson

    Redisson实现分布式锁

    Redisson是什么?

    Redisson是一个在Redis的基础上实现的Java驻内存数据网格(In-Memory Data Grid)。它不仅提供了一系列的分布式的Java常用对象,还提供了许多分布式服务。其中包括(BitSet, Set, Multimap, SortedSet, Map, List, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, AtomicLong, CountDownLatch, Publish / Subscribe, Bloom filter, Remote service, Spring cache, Executor service, Live Object service, Scheduler service) Redisson提供了使用Redis的最简单和最便捷的方法。Redisson的宗旨是促进使用者对Redis的关注分离(Separation of Concern),从而让使用者能够将精力更集中地放在处理业务逻辑上。

    springboot集成Redisson

    集成很简单,只需两步

    1. pom引入依赖

    
        org.redisson
        redisson-spring-boot-starter
    
    1. application.yml增加redis配置

    spring:
      application:
        name: test
      redis:
        host: 127.0.0.1
        port: 6379

    使用也很简单,只需要注入RedissonClient即可

    package com.fandf.test.redis;
    
    import lombok.extern.slf4j.Slf4j;
    import org.redisson.api.RLock;
    import org.redisson.api.RedissonClient;
    import org.springframework.stereotype.Component;
    
    import javax.annotation.Resource;
    
    /**
     * @author fandongfeng
     */
    @Component
    @Slf4j
    public class RedissonTest {
    
        @Resource
        RedissonClient redissonClient;
    
        public void test() {
            RLock rLock = redissonClient.getLock("anyKey");
            //rLock.lock(10, TimeUnit.SECONDS);
            rLock.lock();
            try {
                // do something
            } catch (Exception e) {
                log.error("业务异常", e);
            } finally {
                rLock.unlock();
            }
    
        }
        
    }

    可能不了解redisson的小伙伴会不禁发出疑问。
    what?加锁时不需要加过期时间吗?这样会不会导致死锁啊。解锁不需要判断是不是自己持有吗?
    哈哈,别着急,我们接下来一步步揭开redisson的面纱。

    Redisson lock()源码跟踪

    我们来一步步跟着lock()方法看下源码(本地redisson版本为3.20.0)

    //RedissonLock.class
    
    @Override
    public void lock() {
        try {
            lock(-1, null, false);
        } catch (InterruptedException e) {
            throw new IllegalStateException();
        }
    }

    查看lock(-1, null, false);方法

    private void lock(long leaseTime, TimeUnit unit, boolean interruptibly) throws InterruptedException {
            //获取当前线程id
            long threadId = Thread.currentThread().getId();
            //加锁代码块, 返回锁的失效时间
            Long ttl = tryAcquire(-1, leaseTime, unit, threadId);
            // lock acquired
            if (ttl == null) {
                return;
            }
    
            CompletableFuture future = subscribe(threadId);
            pubSub.timeout(future);
            RedissonLockEntry entry;
            if (interruptibly) {
                entry = commandExecutor.getInterrupted(future);
            } else {
                entry = commandExecutor.get(future);
            }
    
            try {
                while (true) {
                    ttl = tryAcquire(-1, leaseTime, unit, threadId);
                    // lock acquired
                    if (ttl == null) {
                        break;
                    }
    
                    // waiting for message
                    if (ttl >= 0) {
                        try {
                            entry.getLatch().tryAcquire(ttl, TimeUnit.MILLISECONDS);
                        } catch (InterruptedException e) {
                            if (interruptibly) {
                                throw e;
                            }
                            entry.getLatch().tryAcquire(ttl, TimeUnit.MILLISECONDS);
                        }
                    } else {
                        if (interruptibly) {
                            entry.getLatch().acquire();
                        } else {
                            entry.getLatch().acquireUninterruptibly();
                        }
                    }
                }
            } finally {
                unsubscribe(entry, threadId);
            }
    //        get(lockAsync(leaseTime, unit));
        }

    我们看下它是怎么上锁的,也就是tryAcquire方法

    private Long tryAcquire(long waitTime, long leaseTime, TimeUnit unit, long threadId) {
        //真假加锁方法 tryAcquireAsync
        return get(tryAcquireAsync(waitTime, leaseTime, unit, threadId));
    }
    public RedissonLock(CommandAsyncExecutor commandExecutor, String name) {
        super(commandExecutor, name);
        this.commandExecutor = commandExecutor;
        this.internalLockLeaseTime = commandExecutor.getServiceManager().getCfg().getLockWatchdogTimeout();
        this.pubSub = commandExecutor.getConnectionManager().getSubscribeService().getLockPubSub();
    }
    
    private  RFuture tryAcquireAsync(long waitTime, long leaseTime, TimeUnit unit, long threadId) {
        RFuture ttlRemainingFuture;
        if (leaseTime > 0) {
            ttlRemainingFuture = tryLockInnerAsync(waitTime, leaseTime, unit, threadId, RedisCommands.EVAL_LONG);
        } else {
            //waitTime和leaseTime都是-1,所以走这里   
            //过期时间internalLockLeaseTime初始化的时候赋值commandExecutor.getServiceManager().getCfg().getLockWatchdogTimeout();
            //跟进去源码发现默认值是30秒, private long lockWatchdogTimeout = 30 * 1000;
            ttlRemainingFuture = tryLockInnerAsync(waitTime, internalLockLeaseTime,
                    TimeUnit.MILLISECONDS, threadId, RedisCommands.EVAL_LONG);
        }
        CompletionStage s = handleNoSync(threadId, ttlRemainingFuture);
        ttlRemainingFuture = new CompletableFutureWrapper<>(s);
        //加锁成功,开启子线程进行续约
        CompletionStage f = ttlRemainingFuture.thenApply(ttlRemaining -> {
            // lock acquired
            if (ttlRemaining == null) {
                if (leaseTime > 0) {
                    //如果指定了过期时间,则不续约
                    internalLockLeaseTime = unit.toMillis(leaseTime);
                } else {
                    //没指定过期时间,或者小于0,在这里实现锁自动续约
                    scheduleExpirationRenewal(threadId);
                }
            }
            return ttlRemaining;
        });
        return new CompletableFutureWrapper<>(f);
    }

    上面代码里面包含加锁和锁续约的逻辑,我们先来看看加锁的代码

     RFuture tryLockInnerAsync(long waitTime, long leaseTime, TimeUnit unit, long threadId, RedisStrictCommand command) {
        return evalWriteAsync(getRawName(), LongCodec.INSTANCE, command,
                "if ((redis.call('exists', KEYS[1]) == 0) " +
                            "or (redis.call('hexists', KEYS[1], ARGV[2]) == 1)) then " +
                        "redis.call('hincrby', KEYS[1], ARGV[2], 1); " +
                        "redis.call('pexpire', KEYS[1], ARGV[1]); " +
                        "return nil; " +
                    "end; " +
                    "return redis.call('pttl', KEYS[1]);",
                Collections.singletonList(getRawName()), unit.toMillis(leaseTime), getLockName(threadId));
    }

    这里就看的很明白了吧,redisson使用了lua脚本来保证了命令的原子性。
    redis.call('hexists', KEYS[1], ARGV[2])   查看 key value 是否存在。

    Redis Hexists 命令用于查看哈希表的指定字段是否存在。
    如果哈希表含有给定字段,返回 1 。 如果哈希表不含有给定字段,或 key 不存在,返回 0 。

    127.0.0.1:6379> hexists 123 uuid
    (integer) 0
    127.0.0.1:6379> hincrby 123 uuid 1
    (integer) 1
    127.0.0.1:6379> hincrby 123 uuid 1
    (integer) 2
    127.0.0.1:6379> hincrby 123 uuid 1
    (integer) 3
    127.0.0.1:6379> hexists 123 uuid
    (integer) 1
    127.0.0.1:6379> hgetall 123
    1) "uuid"
    2) "3"
    127.0.0.1:6379>

    当key不存在,或者已经含有给定字段(也就是已经加过锁了,这里是为了实现重入性),直接对字段的值+1
    这个字段的值,也就是ARGV[2], 取得是getLockName(threadId)方法,我们再看看这个字段的值是什么

        protected String getLockName(long threadId) {
            return id + ":" + threadId;
        }
    
        public RedissonBaseLock(CommandAsyncExecutor commandExecutor, String name) {
            super(commandExecutor, name);
            this.commandExecutor = commandExecutor;
            this.id = commandExecutor.getServiceManager().getId();
            this.internalLockLeaseTime = commandExecutor.getServiceManager().getCfg().getLockWatchdogTimeout();
            this.entryName = id + ":" + name;
        }
    
        //commandExecutor.getServiceManager() 的id默认值
        private final String id = UUID.randomUUID().toString();

    这里就明白了,字段名称是 uuid + : + threadId

    接下来我们看看锁续约的代码scheduleExpirationRenewal(threadId);

    protected void scheduleExpirationRenewal(long threadId) {
        ExpirationEntry entry = new ExpirationEntry();
        //判断该实例是否加过锁
        ExpirationEntry oldEntry = EXPIRATION_RENEWAL_MAP.putIfAbsent(getEntryName(), entry);
        if (oldEntry != null) {
            //重入次数+1
            oldEntry.addThreadId(threadId);
        } else {
            //第一次加锁
            entry.addThreadId(threadId);
            try {
                //锁续约核心代码
                renewExpiration();
            } finally {
                if (Thread.currentThread().isInterrupted()) {
                    //如果线程异常终止,则关闭锁续约线程
                    cancelExpirationRenewal(threadId);
                }
            }
        }
    }

    我们看看renewExpiration()方法

    private void renewExpiration() {
        ExpirationEntry ee = EXPIRATION_RENEWAL_MAP.get(getEntryName());
        if (ee == null) {
            return;
        }
        //新建一个线程执行
        Timeout task = commandExecutor.getServiceManager().newTimeout(new TimerTask() {
            @Override
            public void run(Timeout timeout) throws Exception {
                ExpirationEntry ent = EXPIRATION_RENEWAL_MAP.get(getEntryName());
                if (ent == null) {
                    return;
                }
                Long threadId = ent.getFirstThreadId();
                if (threadId == null) {
                    return;
                }
                //设置锁过期时间为30秒
                CompletionStage future = renewExpirationAsync(threadId);
                future.whenComplete((res, e) -> {
                    if (e != null) {
                        log.error("Can't update lock {} expiration", getRawName(), e);
                        EXPIRATION_RENEWAL_MAP.remove(getEntryName());
                        return;
                    }
                    //检查锁是还否存在
                    if (res) {
                        // reschedule itself 10后调用自己
                        renewExpiration();
                    } else {
                        //关闭续约
                        cancelExpirationRenewal(null);
                    }
                });
            }
        }, internalLockLeaseTime / 3, TimeUnit.MILLISECONDS);
        //注意上行代码internalLockLeaseTime / 3,
        //internalLockLeaseTime默认30s,那么也就是10s检查一次
        ee.setTimeout(task);
    }
    
    //设置锁过期时间为internalLockLeaseTime  也就是30s  lua脚本保证原子性
    protected CompletionStage renewExpirationAsync(long threadId) {
        return evalWriteAsync(getRawName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN,
                "if (redis.call('hexists', KEYS[1], ARGV[2]) == 1) then " +
                        "redis.call('pexpire', KEYS[1], ARGV[1]); " +
                        "return 1; " +
                        "end; " +
                        "return 0;",
                Collections.singletonList(getRawName()),
                internalLockLeaseTime, getLockName(threadId));
    }

    OK,分析到这里我们已经知道了,lock(),方法会默认加30秒过期时间,并且开启一个新线程,每隔10秒检查一下,锁是否释放,如果没释放,就将锁过期时间设置为30秒,如果锁已经释放,那么就将这个新线程也关掉。

    我们写个测试类看看

    package com.fandf.test.redis;
    
    import org.junit.jupiter.api.Test;
    import org.redisson.api.RLock;
    import org.redisson.api.RedissonClient;
    import org.springframework.boot.test.context.SpringBootTest;
    
    import javax.annotation.Resource;
    
    /**
     * @Description:
     * @author: fandongfeng
     * @date: 2023-3-2416:45
     */
    @SpringBootTest
    class RedissonTest {
    
        @Resource
        private RedissonClient redisson;
    
    
        @Test
        public void watchDog() throws InterruptedException {
            RLock lock = redisson.getLock("123");
            lock.lock();
            Thread.sleep(1000000);
        }
    }

    查看锁的过期时间,及是否续约

    127.0.0.1:6379> keys *
    1) "123"
    127.0.0.1:6379> ttl 123
    (integer) 30
    127.0.0.1:6379> ttl 123
    (integer) 26
    127.0.0.1:6379> ttl 123
    (integer) 24
    127.0.0.1:6379> ttl 123
    (integer) 22
    127.0.0.1:6379> ttl 123
    (integer) 21
    127.0.0.1:6379> ttl 123
    (integer) 20
    127.0.0.1:6379> ttl 123
    (integer) 30
    127.0.0.1:6379> ttl 123
    (integer) 28
    127.0.0.1:6379>

    我们再改改代码,看看是否可重入和字段名称是否和我们预期一致

    package com.fandf.test.redis;
    
    import org.junit.jupiter.api.Test;
    import org.redisson.api.RLock;
    import org.redisson.api.RedissonClient;
    import org.springframework.boot.test.context.SpringBootTest;
    
    import javax.annotation.Resource;
    
    /**
     * @Description:
     * @author: fandongfeng
     * @date: 2023-3-24 16:45
     */
    @SpringBootTest
    class RedissonTest {
    
        @Resource
        private RedissonClient redisson;
    
    
        @Test
        public void watchDog() throws InterruptedException {
            RLock lock = redisson.getLock("123");
            lock.lock();
            lock.lock();
            lock.lock();
            //加了三次锁,此时重入次数为3
            Thread.sleep(3000);
            //解锁一次,此时重入次数变为3
            lock.unlock();
            Thread.sleep(1000000);
        }
    }
    127.0.0.1:6379> keys *
    1) "123"
    127.0.0.1:6379>
    127.0.0.1:6379> ttl 123
    (integer) 24
    127.0.0.1:6379> hgetall 123
    1) "df7f4c71-b57b-455f-acee-936ad8475e01:12"
    2) "3"
    127.0.0.1:6379>
    127.0.0.1:6379> hgetall 123
    1) "df7f4c71-b57b-455f-acee-936ad8475e01:12"
    2) "2"
    127.0.0.1:6379>

    我们加锁了三次,重入次数是3,字段值也是 uuid+:+threadId,和我们预期结果是一致的。

    Redlock算法

    redisson是基于Redlock算法实现的,那么什么是Redlock算法呢?

    假设当前集群有5个节点,那么运行redlock算法的客户端会一次执行下面步骤

    • 1.客户端记录当前系统时间,以毫秒为单位

    • 2.依次尝试从5个redis实例中,使用相同key获取锁
      当redis请求获取锁时,客户端会设置一个网络连接和响应超时时间,避免因为网络故障等原因导致阻塞。

    • 3.客户端使用当前时间减去开始获取锁时间(步骤1的时间),得到获取锁消耗的时间
      只有当半数以上redis节点加锁成功,并且加锁消耗的时间要小于锁失效时间,才算锁获取成功

    • 4.如果获取到了锁,key的真正有效时间等于锁失效时间 减去 获取锁消耗的时间

    • 5.如果获取锁失败,所有的redis实例都会进行解锁
      防止因为服务端响应消息丢失,但是实际数据又添加成功导致数据不一致问题

    这里有下面几个点需要注意:

    • 1.我们都知道单机的redis是cp的,但是集群情况下redis是ap的,所以运行Redisson的节点必须是主节点,不能有从节点,防止主节点加锁成功未同步从节点就宕机,而客户端却收到加锁成功,导致数据不一致问题。

    • 2.为了提高redis节点宕机的容错率,可以使用公式2N(n指宕机数量)+1,假设宕机一台,Redisson还要继续运行,那么至少要部署2*1+1=3台主节点。

    本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系bd@zhengruan.com
    作者最新文章
    编程开发
    相关文章 更多
    精品专题 更多
    装机必备

    正软商城装机必备专区,精选办公、浏览器、安全防护、影音播放、压缩解压、设计创作和系统工具等电脑常用正版软件,帮助用户快速完成新电脑软件配置。

    Windows

    正软商城Windows软件专区,汇集适用于Windows电脑的办公、设计、安全防护、影音播放、开发工具和系统优化软件,提供软件介绍、系统要求、正版授权及购买下载服务。

    PDF教程

    正软商城PDF教程频道提供PDF编辑、转换、合并、拆分、压缩及格式处理方法,同时介绍常用PDF软件和工具的使用技巧。

    macOS软件

    正软商城macOS软件专区,精选适用于Mac电脑的办公、设计、影音、效率、开发和系统工具,提供软件功能介绍、macOS兼容版本、正版授权及购买下载服务。

    IOS软件

    正软商城iOS软件专区,精选适用于iPhone和iPad的办公、学习、影音、设计、效率及AI应用,提供功能介绍、适用设备、系统要求和正版获取方式等信息。

    AI

    正软商城AI软件专区,汇集AI写作、AI绘画、AI视频、AI办公、AI编程、AI翻译、智能客服和数据分析等人工智能工具,提供功能介绍、适用平台、收费方式及正版购买信息。

    Mac软件 更多
    Adobe Acrobat Pro macOS版
    Adobe Acrobat Pro macOS版

    Adobe Acrobat Pro 是面向办公、法务、财务、教育及出版用户的专业PDF处理软件,可在Mac上创建、编辑、转换、合并和保护文档,并提供OCR文字识别、表单、批注、内容比较、敏感信息遮盖及电子签名功能。

    Blender
    Blender

    Blender 是一款免费开源、跨平台的专业 3D 创作软件,集建模、动画、渲染、视频编辑与视觉合成等功能于一体,广泛应用于影视动画、游戏设计和建筑可视化等领域。软件支持 Cycles 物理渲染器与 Eevee 实时渲染引擎,并提供多边形建模、骨骼绑定、物理模拟等专业工具。Blender 兼容 Windows、macOS 和 Linux 系统,安装包轻巧、运行流畅,依托活跃的全球开发者社区持续更新,是从初学者到专业创作者都值得选择的正版 3D 创作工具。

    Shapr3D macOS版
    Shapr3D macOS版

    Shapr3D是一款面向工业设计、机械工程、建筑概念和三维打印工作流的CAD软件。Mac版采用Parasolid建模内核,支持草图约束、实体建模、工程图、可视化渲染及常见CAD格式交换,并可通过账户在多台设备之间同步项目。

    Adobe Illustrator macOS版
    Adobe Illustrator macOS版

    Adobe Illustrator 是 Adobe 推出的专业矢量图形设计软件,适合在 Mac 上制作标志、图标、插画、包装、信息图及印刷版面。它以路径和锚点构建可无损缩放的图形,并提供钢笔、形状、文字、图像描摹、渐变、画板及生成式功能。

    Adobe InDesign macOS版
    Adobe InDesign macOS版

    Adobe InDesign 是面向印刷品与数字出版物的专业版面设计软件,可在 Mac 上制作书籍、杂志、宣传册、海报、报告及交互式文档。它提供精细的文字样式、网格、母版、长文档管理和印前输出能力。

    Affinity Designer macOS版
    Affinity Designer macOS版

    Affinity Designer 的矢量设计能力现已整合进 Affinity by Canva,可在 Mac 上进行标志、图标、插画、界面原型及印刷品设计。个人用户使用免费 Canva 账户即可使用完整的矢量、像素和版面工具。

    Archicad macOS版
    Archicad macOS版

    Archicad是Graphisoft推出的建筑信息模型设计软件,可在Mac上完成概念设计、参数化建模、图纸编制、工程量统计、渲染展示及团队协同。模型与平立剖面、明细表和布局保持关联,适合建筑师、室内设计师、BIM团队及相关专业学生使用。

    AutoCAD LT macOS版
    AutoCAD LT macOS版

    AutoCAD LT是Autodesk推出的专业二维CAD设计与文档编制软件,Mac版本提供原生界面、多点触控及分屏查看体验。用户可精确创建和编辑DWG图形,完成图层管理、尺寸标注、表格、PDF参考、外部参照及打印输出。

    AutoCAD macOS版
    AutoCAD macOS版

    AutoCAD for Mac 是 Autodesk 面向 macOS 提供的专业计算机辅助设计软件,支持精确的二维绘图、标注、布局输出以及实体、曲面和网格建模。软件采用适配 Mac 操作习惯的界面,可处理 DWG 图纸。

    Autodesk Fusion macOS版
    Autodesk Fusion macOS版

    Autodesk Fusion 是面向产品设计与制造的一体化云连接平台,在 Mac 上提供参数化建模、自由曲面、装配、工程图、仿真、PCB 设计和 CAM 加工等工具。它适合机械工程师、工业设计师、创客及制造团队使用。

    Autodesk Maya macOS版
    Autodesk Maya macOS版

    Autodesk Maya是一套面向影视动画、游戏开发和视觉特效制作的专业三维创作软件,集多边形与曲面建模、角色绑定、关键帧动画、动力学模拟、程序化特效及Arnold渲染于一体,并提供脚本、插件和开放式制作管线支持。

    Blender macOS版
    Blender macOS版

    Blender是一款免费开源的综合三维创作软件,可在Mac上完成建模、数字雕刻、材质制作、角色绑定、动画、物理模拟、渲染、合成及视频剪辑。软件提供Cycles与Eevee渲染工具,并支持几何节点、蜡笔绘制和Python扩展。

    WINDOWS 更多
    AutoCAD Windows版
    AutoCAD Windows版

    AutoCAD 是 Autodesk 推出的专业计算机辅助设计软件,Windows 版支持精确二维绘图、三维实体与曲面建模、图纸标注、布局发布和任务自动化,并包含多套行业专业化工具组合,适用于建筑、机械、电气、工程建设及制造设计人员。

    Adobe Acrobat Pro Windows版
    Adobe Acrobat Pro Windows版

    Adobe Acrobat Pro 是面向专业 PDF 工作的综合解决方案,可在 Windows 中创建、编辑、转换、比较、整理和保护文档,并支持表单、电子签名、扫描件文字识别及敏感信息永久遮盖。订阅还包含网页、移动服务和云端协作能力,

    Blender
    Blender

    Blender 是一款免费开源、跨平台的专业 3D 创作软件,集建模、动画、渲染、视频编辑与视觉合成等功能于一体,广泛应用于影视动画、游戏设计和建筑可视化等领域。软件支持 Cycles 物理渲染器与 Eevee 实时渲染引擎,并提供多边形建模、骨骼绑定、物理模拟等专业工具。Blender 兼容 Windows、macOS 和 Linux 系统,安装包轻巧、运行流畅,依托活跃的全球开发者社区持续更新,是从初学者到专业创作者都值得选择的正版 3D 创作工具。

    3dmax(3ds max)
    3dmax(3ds max)

    Autodesk 3ds Max 是一款专业的三维建模、动画与渲染软件,广泛应用于建筑可视化、游戏开发、影视动画、广告设计和产品展示等领域。

    Adobe InDesign Windows版
    Adobe InDesign Windows版

    Adobe InDesign 是面向印刷与数字出版的专业页面排版工具,可制作书籍、杂志、宣传册、海报、交互式 PDF 和电子书。它提供精细的文字样式、多页面管理、印前检查及多格式输出能力,并能与 Photoshop、Illustrator

    Adobe Illustrator Windows版
    Adobe Illustrator Windows版

    Adobe Illustrator 是用于绘制矢量图形、插画、图标、徽标和版式的专业设计工具。它以路径和锚点为核心,作品放大后仍能保持清晰,并提供画板、文字、渐变、图像描摹及精确变换等功能,适合品牌视觉、印刷物料、数字界面和商业插画创作。

    Figma Windows版
    Figma Windows版

    Figma 是面向产品设计与开发团队的云端协作平台,可在 Windows 桌面客户端中完成界面绘制、组件管理、交互原型、评论评审和开发交付。文件保存在云端,多名成员能够同步编辑并共享设计系统;官方同时提供免费 Starter 方案及按席位计

    Affinity Designer Windows版
    Affinity Designer Windows版

    Affinity Designer 是面向矢量图形、数字插画和界面设计的专业创作工具,可在矢量、像素与导出工作区之间快速切换。它提供曲线编辑、形状构建、画板、排版、图层和专业色彩管理,并支持常见设计文件的导入及多种印刷、网页格式输出。

    Cinema 4D Windows版
    Cinema 4D Windows版

    Cinema 4D是Maxon推出的专业三维创作软件,将建模、动画、MoGraph动态图形、粒子与动力学模拟、材质灯光及Redshift渲染整合在统一工作环境中,适用于广告包装、影视特效、产品和建筑可视化、游戏素材等制作场景。

    Blender Windows版
    Blender Windows版

    Blender 是免费开源的三维创作套件,在 Windows 上提供建模、雕刻、材质、动画、物理模拟、合成、跟踪、视频剪辑及 Cycles、EEVEE 渲染工具。它适合个人创作者、学生和小型工作室,

    Autodesk Maya Windows版
    Autodesk Maya Windows版

    Autodesk Maya 是面向影视、电视、动画和游戏行业的专业三维制作软件,集多边形与 NURBS 建模、角色绑定、关键帧和动作捕捉动画、Bifrost 特效模拟、材质开发及 Arnold 渲染于一体,

    SketchUp Pro Windows版
    SketchUp Pro Windows版

    SketchUp Pro 是面向建筑、室内、景观、施工和产品设计等专业场景的三维建模工具,提供桌面建模、LayOut 二维文档、模型资源库、扩展程序及云端协作能力。其操作逻辑直观,适合从概念推敲、空间规划到图纸表达和方案汇报的完整工作流程。

    即将离开本站
    您即将前往第三方网站,请确认是否继续?