如何生成像“aX4j9Z”这样的短uid (JS 中)

发布于 2024-11-14 03:40:29 字数 252 浏览 1 评论 0原文

对于我的网络应用程序(在 JavaScript 中),我想生成简短的 guid(对于不同的对象 - 实际上是不同的类型 - 字符串和字符串数组),

我想要像“aX4j9Z”这样的东西作为我的 uids(guid)。

因此,这些 uid 对于 Web 传输和 js 字符串处理来说应该足够轻量,并且对于不庞大的结构(不超过 10k 元素)来说非常独特。我所说的“非常独特”是指在生成 uid 后,我可以检查该 uid 是否已存在于结构中,如果存在则重新生成它。

For my web application (in JavaScript) I want to generate short guids (for different objects - that are actually different types - strings and arrays of strings)

I want something like "aX4j9Z" for my uids (guids).

So these uids should be lightweight enough for web transfer and js string processing and quite unique for not a huge structure (not more than 10k elements). By saying "quite unique" I mean that after the generation of the uid I could check whether this uid does already exist in the structure and regenerate it if it does.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

终陌 2024-11-21 03:40:30

获取一个简单的计数器,从 100000000 开始,将数字转换为基数 36。

(100000000).toString(36);  //1njchs

(2100000000).toString(36); //yqaadc

您可以轻松拥有 20 亿个优雅的唯一 ID,就像 YouTube 一样

Get a simple counter to start from 100000000, convert the number into radix 36.

(100000000).toString(36);  //1njchs

(2100000000).toString(36); //yqaadc

You can comfortably have 2 billion elegant unique ids, just like YouTube

那些过往 2024-11-21 03:40:30

以下生成 62^3 (238,328) 个 3 个字符的唯一值,前提是区分大小写是唯一的并且所有位置都允许使用数字。如果需要不区分大小写,请从 chars 字符串中删除大写或小写字符,它将生成 35^3 (42,875) 个唯一值。

可以很容易地进行调整,以便第一个字符始终是一个字母或所有字母。

毫无疑问,它可以被优化,并且在达到限制时也可以拒绝返回 id。

var nextId = (function() {
  var nextIndex = [0,0,0];
  var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
  var num = chars.length;

  return function() {
    var a = nextIndex[0];
    var b = nextIndex[1];
    var c = nextIndex[2];
    var id = chars[a] + chars[b] + chars[c];

    a = ++a % num;

    if (!a) {
      b = ++b % num; 

      if (!b) {
        c = ++c % num; 
      }
    }
    nextIndex = [a, b, c]; 
    return id;
  }
}());

The following generates 62^3 (238,328) unique values of 3 characters provided case sensitivity is unique and digits are allowed in all positions. If case insensitivity is required, remove either upper or lower case characters from chars string and it will generate 35^3 (42,875) unique values.

Can be easily adapted so that first char is always a letter, or all letters.

No dobut it can be optimised, and could also refuse to return an id when the limit is reached.

var nextId = (function() {
  var nextIndex = [0,0,0];
  var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
  var num = chars.length;

  return function() {
    var a = nextIndex[0];
    var b = nextIndex[1];
    var c = nextIndex[2];
    var id = chars[a] + chars[b] + chars[c];

    a = ++a % num;

    if (!a) {
      b = ++b % num; 

      if (!b) {
        c = ++c % num; 
      }
    }
    nextIndex = [a, b, c]; 
    return id;
  }
}());
明月松间行 2024-11-21 03:40:30

考虑到 ES6 功能的实际威力,我们可以在 JavaScript 中生成哈希 ID,而无需依赖第三方库。

我使用 JavaScript 目前为我们提供的内置函数实现了一个非常简单的生成器。此实现使用 Crypto.getRandomValues()Uint8Array ()如下代码所示:

const hashID = size => {
  const MASK = 0x3d
  const LETTERS = 'abcdefghijklmnopqrstuvwxyz'
  const NUMBERS = '1234567890'
  const charset = `${NUMBERS}${LETTERS}${LETTERS.toUpperCase()}`.split('')

  const bytes = new Uint8Array(size)
  crypto.getRandomValues(bytes)

  return bytes.reduce((acc, byte) => `${acc}${charset[byte & MASK]}`, '')
}

console.log({id: hashID(6)})

此实现使用这些字符:[AZ]、[az]、[0-9] 如果我们添加,总共有 62 个字符_- 最多可完成 64 个字符,如下所示:

const hashID = size => {
  const MASK = 0x3d
  const LETTERS = 'abcdefghijklmnopqrstuvwxyz'
  const NUMBERS = '1234567890'
  const charset = `${NUMBERS}${LETTERS}${LETTERS.toUpperCase()}_-`.split('')

  const bytes = new Uint8Array(size)
  crypto.getRandomValues(bytes)

  return bytes.reduce((acc, byte) => `${acc}${charset[byte & MASK]}`, '')
}

console.log(`id: ${hashID(6)}`)

注意:

每小时生成 1000 个 ID 长度为 6 个字符的 ID,大约需要 2 天时间才能有 1% 的概率发生至少 1 次冲突。将其实施到您的项目中时请记住这一点。

Considering the actual power of ES6 features we can generate hash IDs in JavaScript without relying on third-party libraries.

I implemented a very simple generator using the build-in functions that JavaScript offers to us these days. This implementation uses Crypto.getRandomValues() and Uint8Array() as shown in the code below:

const hashID = size => {
  const MASK = 0x3d
  const LETTERS = 'abcdefghijklmnopqrstuvwxyz'
  const NUMBERS = '1234567890'
  const charset = `${NUMBERS}${LETTERS}${LETTERS.toUpperCase()}`.split('')

  const bytes = new Uint8Array(size)
  crypto.getRandomValues(bytes)

  return bytes.reduce((acc, byte) => `${acc}${charset[byte & MASK]}`, '')
}

console.log({id: hashID(6)})

This implementation uses these characters: [A-Z], [a-z], [0-9] in total they are 62 characters, if we add _ and - it will complete up to 64 characters like this:

const hashID = size => {
  const MASK = 0x3d
  const LETTERS = 'abcdefghijklmnopqrstuvwxyz'
  const NUMBERS = '1234567890'
  const charset = `${NUMBERS}${LETTERS}${LETTERS.toUpperCase()}_-`.split('')

  const bytes = new Uint8Array(size)
  crypto.getRandomValues(bytes)

  return bytes.reduce((acc, byte) => `${acc}${charset[byte & MASK]}`, '')
}

console.log(`id: ${hashID(6)}`)

Note:

It will take around 2 days in order to have a 1% probability of at least one collision for 1000 IDs generated per hour with ID length of 6 characters. Keep this in mind when it is implemented into your project.

梦与时光遇 2024-11-21 03:40:30
var letters = 'abcdefghijklmnopqrstuvwxyz';
var numbers = '1234567890';
var charset = letters + letters.toUpperCase() + numbers;

function randomElement(array) {
    with (Math)
        return array[floor(random()*array.length)];
}

function randomString(length) {
    var R = '';
    for(var i=0; i<length; i++)
        R += randomElement(charset);
    return R;
}
var letters = 'abcdefghijklmnopqrstuvwxyz';
var numbers = '1234567890';
var charset = letters + letters.toUpperCase() + numbers;

function randomElement(array) {
    with (Math)
        return array[floor(random()*array.length)];
}

function randomString(length) {
    var R = '';
    for(var i=0; i<length; i++)
        R += randomElement(charset);
    return R;
}
乜一 2024-11-21 03:40:30

这将生成一系列唯一值。它通过在所有值都用尽时增加字符串长度来改进 RobG 的答案。

var IdGenerator = (function () {

    var defaultCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_-+=[]{};:?/.>,<|".split("");

    var IdGenerator = function IdGenerator(charset) {
        this._charset = (typeof charset === "undefined") ? defaultCharset : charset;
        this.reset();
    };

    IdGenerator.prototype._str = function () {
        var str = "",
            perm = this._perm,
            chars = this._charset,
            len = perm.length,
            i;
        for (i = 0; i < len; i++) {
            str += chars[perm[i]];
        }
        return str;
    };

    IdGenerator.prototype._inc = function () {
        var perm = this._perm,
            max = this._charset.length - 1,
            i;
        for (i = 0; true; i++) {
            if (i > perm.length - 1) {
                perm.push(0);
                return;
            } else {
                perm[i]++;
                if (perm[i] > max) {
                    perm[i] = 0;
                } else {
                    return;
                }
            }
        }
    };

    IdGenerator.prototype.reset = function () {
        this._perm = [];
    };

    IdGenerator.prototype.current = function () {
        return this._str();
    };

    IdGenerator.prototype.next = function () {
        this._inc();
        return this._str();
    };

    return IdGenerator;

}).call(null);

用法:

var g = new IdGenerator(),
    i;

for (i = 0; i < 100; i++) {
   console.log(g.next());
}

此要点包含上述实现和递归版本。

This will generate a sequence of unique values. It improves on RobG's answer by growing the string length when all values have been exhaused.

var IdGenerator = (function () {

    var defaultCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_-+=[]{};:?/.>,<|".split("");

    var IdGenerator = function IdGenerator(charset) {
        this._charset = (typeof charset === "undefined") ? defaultCharset : charset;
        this.reset();
    };

    IdGenerator.prototype._str = function () {
        var str = "",
            perm = this._perm,
            chars = this._charset,
            len = perm.length,
            i;
        for (i = 0; i < len; i++) {
            str += chars[perm[i]];
        }
        return str;
    };

    IdGenerator.prototype._inc = function () {
        var perm = this._perm,
            max = this._charset.length - 1,
            i;
        for (i = 0; true; i++) {
            if (i > perm.length - 1) {
                perm.push(0);
                return;
            } else {
                perm[i]++;
                if (perm[i] > max) {
                    perm[i] = 0;
                } else {
                    return;
                }
            }
        }
    };

    IdGenerator.prototype.reset = function () {
        this._perm = [];
    };

    IdGenerator.prototype.current = function () {
        return this._str();
    };

    IdGenerator.prototype.next = function () {
        this._inc();
        return this._str();
    };

    return IdGenerator;

}).call(null);

Usage:

var g = new IdGenerator(),
    i;

for (i = 0; i < 100; i++) {
   console.log(g.next());
}

This gist contains the above implementation and a recursive version.

动听の歌 2024-11-21 03:40:30

只是随机生成一些字符串:

function getUID(len){
    var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
          out = '';

    for(var i=0, clen=chars.length; i<len; i++){
       out += chars.substr(0|Math.random() * clen, 1);
    }

    // ensure that the uid is unique for this page
    return getUID.uids[out] ? getUID(len) : (getUID.uids[out] = out);
}
getUID.uids = {};

just randomly generate some strings:

function getUID(len){
    var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
          out = '';

    for(var i=0, clen=chars.length; i<len; i++){
       out += chars.substr(0|Math.random() * clen, 1);
    }

    // ensure that the uid is unique for this page
    return getUID.uids[out] ? getUID(len) : (getUID.uids[out] = out);
}
getUID.uids = {};
绝不放开 2024-11-21 03:40:30

您可以将 GUID 缩短为 20 个可打印 ASCII 字符,而不会丢失 GUID 的信息或唯一性。

杰夫·阿特伍德(Jeff Atwood)几年前在博客中谈到了这一点:
装备我们的 ASCII Armor

You can shorten a GUID to 20 printable ASCII characters without losing information or the uniqueness of the GUID.

Jeff Atwood blogged about that years ago:
Equipping our ASCII Armor

秋心╮凉 2024-11-21 03:40:30

该解决方案将 Math.random() 与计数器结合起来。

Math.random() 应该给出大约 53 位的熵(与 UUIDv4 的 128 位相比),但是当与计数器结合使用时,应该为临时 ID 提供足够的唯一性。

let _id_counter = 0
function id() {
  return '_' + (_id_counter++).toString(36) + '_' + Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(36)
}

console.log(Array.from({length: 100}).map(() => id()))

特点:

  • 实现简单
  • 输出约 13 个字符
  • 不区分大小写
  • 可以安全地用作 HTML id 和 React key
  • 不适合数据库存储

This solution combines Math.random() with a counter.

Math.random() should give about 53 bits of entropy (compared with UUIDv4's 128), but when combined with a counter should give plenty enough uniqueness for a temporary ID.

let _id_counter = 0
function id() {
  return '_' + (_id_counter++).toString(36) + '_' + Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(36)
}

console.log(Array.from({length: 100}).map(() => id()))

Features:

  • Simple implementation
  • Output of about 13 chars
  • Case-insensitive
  • Safe for use as HTML id and React key
  • Not suitable for database storage
少女的英雄梦 2024-11-21 03:40:30

您可以使用 md5 算法生成随机字符串。 md5 是节点包,

 var randomChars = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
 var shortUrl = md5(originalUrl + randomChars + new Date()).substring(0, 5).toString();
 console.log(shortUrl);

每次都会生成唯一的字符串。

You can use the md5 algorithm for generating a random string. md5 is the node package

 var randomChars = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
 var shortUrl = md5(originalUrl + randomChars + new Date()).substring(0, 5).toString();
 console.log(shortUrl);

This will generate unique string every time.

睫毛溺水了 2024-11-21 03:40:30

我使用此 TypeScript 函数在数据库中创建比 UUID 更具可读性的唯一标识符。请注意,插入记录时,我捕获重复键异常并使用新 ID 重试。

const idChars: string = 'ABCDEFGHJKMNPQRSTUVWXYZ'

export function generateId(): string {
  const now: Date = new Date()
  let id = now.getUTCFullYear().toString()
  id += now.getUTCMonth().toString().padStart(2, '0')
  id += now.getUTCDay().toString().padStart(2, '0')
  for (let i = 0; i < 6; i++) id += idChars[Math.floor(Math.random() * idChars.length)]
  return id
}

它生成类似 20230506VJDMQD 的 ID。

日期前缀对唯一性有很大帮助,特别是当您在数据库中长期创建数千条记录时。它对于客户编号或发票编号等内容也非常有帮助,其中日期部分提供了附加信息,而不仅仅是唯一性。

可以很容易地将其适应您喜欢的任何字符集,如果您不需要日期前缀,则可以轻松地从代码中删除该部分。

如果您每天需要生成数百万个 ID,那么您可以将循环计数从 6 增加到更大的数字,但在某些时候您也可能只使用 UUID。

如果你真的只想要 6 个字符,那么 JavaScript 中的简化版本是

const idChars = 'ABCDEFGHJKMNPQRSTUVWXYZ'

function generateId() {
  let id = ''
  for (let i = 0; i < 6; i++) id += idChars[Math.floor(Math.random() * idChars.length)]
  return id
}

I use this TypeScript function to create unique identifiers in my database that are much more readable than UUIDs. Note that when inserting records I catch the duplicate key exception and retry with a new ID.

const idChars: string = 'ABCDEFGHJKMNPQRSTUVWXYZ'

export function generateId(): string {
  const now: Date = new Date()
  let id = now.getUTCFullYear().toString()
  id += now.getUTCMonth().toString().padStart(2, '0')
  id += now.getUTCDay().toString().padStart(2, '0')
  for (let i = 0; i < 6; i++) id += idChars[Math.floor(Math.random() * idChars.length)]
  return id
}

It generates ids like 20230506VJDMQD.

The date prefix helps a lot with uniqueness, especially if you create thousands of records in the database over a long period of time. It's also super helpful for things like customer numbers or invoice numbers, where the date part provides additional information, not just uniqueness.

It's very easy to adapt this to any set of characters you prefer, and if you don't want the date prefix it's easy to remove that part from the code.

If you need to make millions of IDs per day, then you could increase the loop count from 6 to a bigger number, but at some point you might as well just use UUIDs.

If you really want just 6 characters, then the simplified version in JavaScript is

const idChars = 'ABCDEFGHJKMNPQRSTUVWXYZ'

function generateId() {
  let id = ''
  for (let i = 0; i < 6; i++) id += idChars[Math.floor(Math.random() * idChars.length)]
  return id
}

初见 2024-11-21 03:40:29

有关预打包解决方案,请参阅 @Mohamed 的回答shortid)。如果您没有特殊要求,请首选该解决方案,而不是本页上的任何其他解决方案。


6 个字符的字母数字序列足以随机索引 10k 集合(366 = 22 亿和 363 = 46656)。

function generateUID() {
    // I generate the UID from two parts here 
    // to ensure the random number provide enough bits.
    var firstPart = (Math.random() * 46656) | 0;
    var secondPart = (Math.random() * 46656) | 0;
    firstPart = ("000" + firstPart.toString(36)).slice(-3);
    secondPart = ("000" + secondPart.toString(36)).slice(-3);
    return firstPart + secondPart;
}

随机生成的UID在生成~√N个数字后会发生冲突(生日悖论),因此需要6位数字才能安全生成而不进行检查(旧版本仅生成4位数字,如果不检查则在1300个ID后会发生冲突) 。

如果进行碰撞检查,位数可以减少 3 或 4,但请注意,当生成越来越多的 UID 时,性能会线性下降。

var _generatedUIDs = {};
function generateUIDWithCollisionChecking() {
    while (true) {
        var uid = ("0000" + ((Math.random() * Math.pow(36, 4)) | 0).toString(36)).slice(-4);
        if (!_generatedUIDs.hasOwnProperty(uid)) {
            _generatedUIDs[uid] = true;
            return uid;
        }
    }
}

如果您需要唯一性而不是不可预测性,请考虑使用顺序生成器(例如 user134_item1user134_item2...)。您可以“散列”顺序生成的字符串以恢复不可预测性。

使用 Math.random 生成的 UID 并不安全(无论如何您都不应该信任客户端)。在关键任务中不要依赖其独特性或不可预测性。

See @Mohamed's answer for a pre-packaged solution (the shortid package). Prefer that instead of any other solutions on this page if you don't have special requirements.


A 6-character alphanumeric sequence is pretty enough to randomly index a 10k collection (366 = 2.2 billion and 363 = 46656).

function generateUID() {
    // I generate the UID from two parts here 
    // to ensure the random number provide enough bits.
    var firstPart = (Math.random() * 46656) | 0;
    var secondPart = (Math.random() * 46656) | 0;
    firstPart = ("000" + firstPart.toString(36)).slice(-3);
    secondPart = ("000" + secondPart.toString(36)).slice(-3);
    return firstPart + secondPart;
}

UIDs generated randomly will have collision after generating ~ √N numbers (birthday paradox), thus 6 digits are needed for safe generation without checking (the old version only generates 4 digits which would have a collision after 1300 IDs if you don't check).

If you do collision checking, the number of digits can be reduced 3 or 4, but note that the performance will reduce linearly when you generate more and more UIDs.

var _generatedUIDs = {};
function generateUIDWithCollisionChecking() {
    while (true) {
        var uid = ("0000" + ((Math.random() * Math.pow(36, 4)) | 0).toString(36)).slice(-4);
        if (!_generatedUIDs.hasOwnProperty(uid)) {
            _generatedUIDs[uid] = true;
            return uid;
        }
    }
}

Consider using a sequential generator (e.g. user134_item1, user134_item2, …) if you require uniqueness and not unpredictability. You could "Hash" the sequentially generated string to recover unpredictability.

UIDs generated using Math.random is not secure (and you shouldn't trust the client anyway). Do not rely on its uniqueness or unpredictability in mission critical tasks.

蔚蓝源自深海 2024-11-21 03:40:29

08/2020 更新:

shortid 已被弃用,取而代之的是更小的 nanoid更快:

  • 。 108 字节(缩小并压缩)。没有依赖性。大小限制控制大小。
  • 。它比 UUID 快 40%。
  • 安全。它使用加密的强随机 API。可以在集群中使用。
  • 紧凑。它使用比 UUID (A-Za-z0-9_-) 更大的字母表。因此 ID 大小从 36 个符号减少到 21 个符号。
  • 便携式。 Nano ID 已移植到 14 种编程语言。
import { nanoid } from 'nanoid'

// 21 characters (default)
// ~149 billion years needed, in order to have a 1% probability of at least one collision.
console.log(nanoid()) //=> "V1StGXR8_Z5jdHi6B-myT"

// 11 characters
// ~139 years needed, in order to have a 1% probability of at least one collision.
console.log(nanoid(11)) //=> "bdkjNOkq9PO"

更多信息请参见:https://zelark.github.io/nano-id-cc/


旧答案

还有一个很棒的npm包:shortid

非常短的非连续 URL 友好的唯一 ID 生成器。

ShortId 创建令人惊讶的短非连续 url 友好的唯一 ID。非常适合 url 缩短器、MongoDB 和 Redis id,以及用户可能看到的任何其他 id。

  • 默认为 7-14 个网址友好字符:AZ、az、0-9、_-
  • 非连续性,因此不可预测。
  • 支持集群(自动)、自定义种子、自定义字母表。
  • 可以生成任意数量且不重复的 ID,甚至每天数百万个。
  • 非常适合游戏,特别是如果您担心作弊,因此不想使用容易被猜到的 ID。
  • 应用可以重新启动任意次数,而不会出现重复 ID 的情况。
  • Mongo ID/Mongoose ID 的热门替代品。
  • 适用于 Node、io.js 和网络浏览器。
  • 包括 Mocha 测试。

用法

var shortid = require('shortid');
console.log(shortid.generate()); //PPBqWA9

Update 08/2020:

shortid has been deprecated in favor of nanoid which is smaller and faster:

  • Small. 108 bytes (minified and gzipped). No dependencies. Size Limit controls the size.
  • Fast. It is 40% faster than UUID.
  • Safe. It uses cryptographically strong random APIs. Can be used in clusters.
  • Compact. It uses a larger alphabet than UUID (A-Za-z0-9_-). So ID size was reduced from 36 to 21 symbols.
  • Portable. Nano ID was ported to 14 programming languages.
import { nanoid } from 'nanoid'

// 21 characters (default)
// ~149 billion years needed, in order to have a 1% probability of at least one collision.
console.log(nanoid()) //=> "V1StGXR8_Z5jdHi6B-myT"

// 11 characters
// ~139 years needed, in order to have a 1% probability of at least one collision.
console.log(nanoid(11)) //=> "bdkjNOkq9PO"

More info here : https://zelark.github.io/nano-id-cc/


Old answer

There is also an awesome npm package for this : shortid

Amazingly short non-sequential url-friendly unique id generator.

ShortId creates amazingly short non-sequential url-friendly unique ids. Perfect for url shorteners, MongoDB and Redis ids, and any other id users might see.

  • By default 7-14 url-friendly characters: A-Z, a-z, 0-9, _-
  • Non-sequential so they are not predictable.
  • Supports cluster (automatically), custom seeds, custom alphabet.
  • Can generate any number of ids without duplicates, even millions per day.
  • Perfect for games, especially if you are concerned about cheating so you don't want an easily guessable id.
  • Apps can be restarted any number of times without any chance of repeating an id.
  • Popular replacement for Mongo ID/Mongoose ID.
  • Works in Node, io.js, and web browsers.
  • Includes Mocha tests.

Usage

var shortid = require('shortid');
console.log(shortid.generate()); //PPBqWA9
十年不长 2024-11-21 03:40:29

这是一个单行,但它只给出小写字母和数字:

var uuid = Math.random().toString(36).slice(-6);

console.log(uuid);

Here is a one liner, but it gives only lowercase letters and numbers:

var uuid = Math.random().toString(36).slice(-6);

console.log(uuid);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文