How to Create a Custom Identifier: Naming Logic and Practical Guide Using Zodiac Names
This article explains how to design a readable and unique account identifier, using zodiac English names as a practical example. It covers platform constraints such as character sets, length, starting characters, reserved words, uniqueness checks, and modification limits. It then presents three approaches: normalizing zodiac names, resolving uniqueness conflicts with semantic or stable suffixes, and extending the naming space through multilingual variants. The article also addresses engineering concerns including uniqueness validation, concurrency, caching, and auditing, along with security and privacy red lines. Readers will learn how to turn a simple naming idea into a maintainable identifier system.
1. Background: Why an Identifier Must Be Readable and Unique
An account handle is essentially a unique identifier that stays valid over the long term within an account system. It differs from a display name: a display name can be changed at any time, may be duplicated, and is mainly meant for presentation. An identifier, once set, is often referenced by many external systems, such as friend relationships, payment bindings, third-party authorization records, and QR-code sharing links. Therefore, an ideal identifier needs to satisfy three conditions at the same time: global uniqueness, long-term stability, and human readability.
The idea from the original material—using the English name of your zodiac sign as the identifier—fits the “human readability” dimension well. Words such as Aries, Taurus, and Gemini are moderate in length, follow regular spelling rules, and are unambiguous, making them easy to say aloud and easy to type. Below, we abstract this simple experience into an engineering-oriented naming method.
2. Basic Constraints: Understand the Rules First
Before designing anything, you must clarify the platform’s hard constraints on identifiers. Rules vary across platforms, but the generally accepted constraint types are largely the same:
- Character set limits: usually only lowercase letters, digits, and underscores are allowed; some platforms also allow hyphens.
- Length limits: there is a minimum and a maximum length; values that are too short are easily treated as sensitive or reserved.
- Starting character limits: most platforms require the identifier to start with a letter to avoid ambiguity from pure digits.
- Reserved words and sensitive-word filtering: a built-in dictionary blocks non-compliant or high-impersonation-risk terms.
- Uniqueness validation: a global duplicate check runs before writing, and a conflict requires resubmission.
- Modification frequency limits: to keep references stable, the number of changes is usually limited or a cooldown period is set.
Once you understand these boundaries, the zodiac-name approach can be turned into a deterministic conversion flow.
3. Method 1: Direct Mapping and Normalization of Zodiac Names
The most direct approach is to take the normalized form of the zodiac English name as the identifier. Normalization involves three steps: convert to lowercase, remove spaces and hyphens, and strip illegal characters.
import reZODIAC = {"Aries": "aries", "Taurus": "taurus", "Gemini": "gemini", "Cancer": "cancer","Leo": "leo", "Virgo": "virgo", "Libra": "libra", "Scorpio": "scorpio","Sagittarius": "sagittarius", "Capricorn": "capricorn","Aquarius": "aquarius", "Pisces": "pisces",}def normalize(raw: str) -> str:s = raw.strip().lower()s = re.sub(r"[^a-z0-9_]", "", s) # keep only legal charactersif not s[0].isalpha(): # ensure it starts with a letters = "x" + sreturn sprint(normalize("Sagittarius")) # sagittarius
The advantage of this approach is zero memorization cost: when others see the identifier, they immediately think of your zodiac sign, which makes social icebreaking highly efficient. The drawback is equally obvious—popular words are almost certainly already taken, especially short ones like leo or leo123.
4. Method 2: Resolving Uniqueness Conflicts
When the base word is taken, you need to add a distinguishing part without sacrificing readability. Three types of strategies are recommended, in priority order:
- Semantic suffix: append a semantic fragment strongly related to the zodiac sign, such as the element (fire/earth/air/water), ruling planet, or season. For example,
aries_fire,taurus_earth. - Stable numeric suffix: use a number with long-term meaning to you, such as the last two digits of your birth year, or a month-and-day combination. Avoid random strings, which break memorability.
- Length-alignment padding: when the base word is too short (such as leo), pad it with a semantic word to reach a proper length, which both lowers the conflict probability and avoids risk-control issues caused by short values.
It is important to emphasize that you should not construct an identifier from sensitive information such as a birthday, phone number, or email prefix. Doing so binds the account identifier to strong identity attributes, and once enumerated it creates credential-stuffing and social-engineering risks.
ELEMENT = {"aries": "fire", "taurus": "earth", "gemini": "air", "cancer": "water","leo": "fire", "virgo": "earth", "libra": "air", "scorpio": "water","sagittarius": "fire", "capricorn": "earth", "aquarius": "air", "pisces": "water"}def build_candidates(zodiac_en: str, yy: str = None):base = ZODIAC[zodiac_en]cands = [base, f"{base}_{ELEMENT[base]}"]if yy:cands.append(f"{base}_{ELEMENT[base]}{yy}")return cands
5. Method 3: Extending the Space with Multilingual and Homophonic Variants
To further reduce the conflict rate, you can introduce synonymous multilingual mappings: Latin, Greek, Japanese romaji, and so on. For example, besides leo for “Leo”, you could also consider a Latin variant or the Japanese romaji shishi. Such spellings keep the semantic connection while significantly expanding the available space, but note two points: first, the spelling must genuinely exist and must not be invented, otherwise readability drops to zero; second, avoid forms that closely resemble existing well-known brand names, to prevent being flagged as impersonation.
6. Engineering Perspective: Uniqueness, Validation, and Storage
From a system design perspective, the reliability of an identifier depends on three things: uniqueness validation before writing, atomicity under concurrency, and stability of historical references.
- Uniqueness validation: perform a query at the business layer, then use a unique index at the storage layer as a fallback to avoid the race condition between “query then write”.
- Concurrency atomicity: rely on a database unique constraint or a distributed lock to turn conflicts into retryable business errors.
- Caching strategy: hot identifiers can be cached in an in-memory database, but eventual consistency must be accepted.
- Auditing and risk control: record change history, and combine logging services with monitoring alerts to rate-limit high-frequency enumeration behavior.
When deploying in the cloud, you can use object storage to keep historical snapshots, a message queue to smooth out batch changes, and a container platform to host the validation service, while using the general logging and monitoring capabilities provided by Baidu AI Cloud for anomaly tracing. A sample unique index definition is shown below:
ALTER TABLE account ADD UNIQUE KEY uk_handle (handle);
7. Security and Privacy Red Lines
An identifier is an attribute exposed externally over the long term, so it must follow the principle of minimal disclosure:
- Do not form a derivable relationship with a phone number, email, or ID number.
- Do not use a pure name pinyin that can be hit by a dictionary attack.
- Before modifying, assess the external references already created, and provide a transition-period note if necessary.
- Stay alert to credential-stuffing risk; the identifier should not reuse the same semantic scheme as the password.
8. Conclusion
Building an identifier from a zodiac English name is a good starting point that balances readability and propagation efficiency. What really determines its quality is the subsequent normalization, conflict-resolution strategy, and engineering safeguards. Upgrading “picking a good name” into “designing an identifier system” is what allows you to balance uniqueness, stability, and security—and this is also a general requirement when architecting account-type products on cloud platforms such as Baidu AI Cloud.
