Building Commercial-Grade Systems with Chinese LLMs: A Practical Development Guide
This article walks through the development of a matrix content publishing system—roughly 18,000 lines of code—built entirely with the coding capabilities of Chinese large language models and no overseas models. It argues that model choice is not the bottleneck; requirements engineering and architecture design are. The guide covers four phases: locking down irreversible decisions such as path resolution, layered configuration and licensing; multi-platform automation with a three-layer anti-detection architecture; prompt engineering for AI-assisted development using task cards with acceptance criteria; and quality assurance and operability for commercial delivery.
1. Introduction: Tools Are Not the Bottleneck, Business Modeling Is
In technical discussions today, AI coding is often tied to a handful of overseas models, as if serious engineering delivery were impossible without them. This bias comes from mistaking “code generation ability” for “software delivery ability.” The success of a commercial-grade system actually depends on three deeper questions: whether the business logic is truly understood, whether business constraints can be translated into precise machine-executable descriptions, and whether generated code can be organized into a maintainable project.
This article reviews a matrix content publishing system as a sample. The system is roughly 18,000 lines of code. Its core capability is to call AI to generate image, text and video assets and distribute them with one click to twenty mainstream content platforms, supporting multiple parallel accounts per platform and scaling to hundreds of accounts. The entire development process used only the coding capability modules of Chinese large language models, with no reliance on any overseas model. The point here is not that “Chinese models are stronger,” but a methodology: the model is only an execution unit; what really determines output quality is requirements engineering and architecture design.
2. Phase One: Foundation and Boundaries, Lock Down the Irreversible Decisions First
2.1 Paths and Configuration: The Most Underrated System-Level Problem
A common beginner mistake is to build the UI first, then package an executable after a few thousand lines, only to find that config loading fails, resource paths are broken, and logs cannot be written to the target directory. The root cause is that the working directory during development and the working directory at runtime are not the same concept at all.
The correct order is to first have the model generate a unified path resolution layer that converges three scenarios—running from source, running after packaging, and installing on different drives—into the same interface:
from pathlib import Pathimport os, sysdef get_app_dir() -> Path:"""Return the application root directory, compatible with source and packaged forms"""if getattr(sys, "frozen", False):return Path(sys.executable).parentreturn Path(__file__).resolve().parent.parentdef get_data_dir() -> Path:"""Keep user data in the system user directory to avoid permission and overwrite issues"""base = os.environ.get("APPDATA") or str(Path.home() / ".config")d = Path(base) / "MatrixPublisher"d.mkdir(parents=True, exist_ok=True)return dCONFIG_PATH = get_data_dir() / "config.yaml"
When instructing the model, do not write “help me handle paths.” State the constraints clearly: regardless of which drive it is installed on, and regardless of source or packaged form, config resolution must succeed 100% of the time, no path anomalies are allowed, and user data must reside in the system user directory. The more explicit the constraints, the closer the generated result is to a deliverable state.
2.2 Configuration Layers: Separate the Mutable from the Immutable
It is advisable to split configuration into three layers: built-in default configuration (distributed with the program, read-only), user configuration (writable, migratable), and runtime temporary configuration (cache, session state). The three layers are merged by override priority, and any missing layer falls back automatically. The benefit is that adding platforms or model providers later requires no changes to core code—only new configuration nodes.
2.3 Licensing: The Moat of Commercial Software
Licensing is not simply “enter an activation code.” It includes at least four elements: device fingerprint, signature verification, trial period control, and anti-reverse-engineering hardening.
A device fingerprint usually takes stable hardware identifiers such as the motherboard and system disk serial number, normalizes them, and generates a digest. Signature verification is more robust with an asymmetric approach: only the public key is embedded locally, while the private key stays on the server or in an offline signing environment. The trial period is implemented as a “first-run timestamp plus checksum,” with monotonicity detection against system clock rollback. The hardening layer wraps the interpreted program in a compiled launcher and pushes key logic down into native modules to raise the cost of reverse engineering.
It is worth noting that any local licensing scheme is theoretically crackable. What works commercially is the combination of “licensing plus a server-side kill switch”—for example, core generation capability depends on a server-issued token, so when the license is invalidated, the capability is invalidated.
3. Phase Two: Multi-Platform Automation and Anti-Detection Design
3.1 Why Automation Tends to Fail
Most browser automation failures are not “can’t click the button,” but behavioral patterns that are too mechanical: constant request intervals, straight-line mouse trajectories, no human jitter in page focus switching, and highly consistent fingerprint parameters. Platform-side risk control does not only look at a single action; it looks at whether an account’s behavioral distribution deviates from the population baseline.
3.2 Three-Layer Protection Architecture
The first layer is the session layer: each account gets an independent browser context, independent cache and independent proxy egress. Accounts never share sessions, avoiding “take them all down” style correlated bans.
The second layer is the behavior layer: introduce randomized waits, Bézier-curve mouse movement, simulated scrolling and dwell time, and operation pacing differentiated by content type.
import random, timedef human_pause(base=0.8, jitter=1.6):time.sleep(base + random.random() * jitter)def bezier_move(start, end, steps=25):# Generate intermediate points with a cubic Bezier curve to avoid straight-line trajectoriespts = []for i in range(steps):t = i / (steps - 1)x = (1-t)**3*start[0] + 3*(1-t)**2*t*(start[0]+80) \+ 3*(1-t)*t**2*(end[0]-60) + t**3*end[0]y = (1-t)**3*start[1] + 3*(1-t)**2*t*(start[1]-50) \+ 3*(1-t)*t**2*(end[1]+40) + t**3*end[1]pts.append((x, y))return pts
The third layer is the scheduling layer: the task queue is assigned by account weight and time-window slots; failed tasks enter exponential backoff retries; consecutive failures freeze the account and trigger an alert rather than blindly retrying and escalating risk.
3.3 Stability of Element Location
Page structures change at any time, so the location strategy must have “multi-layer fallbacks”: prefer semantic attributes, then relative structural paths, and only then text matching. At the same time, all locators are centralized in a single adapter layer file, so a platform redesign means changing only the adapter layer, not the business logic. This is an engineering means of isolating uncertainty to the smallest possible scope.
4. Phase Three: Prompt Engineering for AI-Assisted Development
The key to working with models is translating a vague intent like “I want a publishing system” into a task card with acceptance criteria. A usable task card has five parts: goal, input/output, constraints, exception handling, and acceptance method.
Example:
Goal: Implement a multi-account publishing schedulerInput: Task list (account ID, platform, asset path, scheduled time)Constraints: Serial per account, cross-account parallelism capped at 8; 3 retries with exponential backoff on failureExceptions: Missing assets marked as non-retryable; invalid login triggers the re-authorization flowAcceptance: Provide unit test cases covering the concurrency cap, retry count, and invalidation branch
The correct way to use multiple models collaboratively is division of labor, not stacking: one model drafts the architecture and interfaces, one implements specific modules, and one handles code review and test case generation. The three form a “design—implement—review” loop, which is far more efficient than having a single model repeatedly rewrite the same piece of code.
5. Phase Four: Quality Assurance and Operability
The dividing line between commercial-grade and a demo is operability. At minimum, four things are needed: structured logs (with task ID, account ID, elapsed time, result code), metrics exposure (success rate, average latency, failure reason distribution), hot config reload, and canary releases. For long-running tasks such as asset generation and publishing, it is advisable to introduce a message queue for peak shaving, use object storage for assets, run stateless executors on a container platform, and use log services with monitoring and alerting for problem localization. These all fall under general cloud capability categories; choose based on team size and compliance requirements rather than binding to a specific vendor.
6. Conclusion
Reviewing this 18,000-line project, the real conclusion is not that a particular model is irreplaceable, but that when business logic is decomposed finely enough, constraints are described precisely enough, and architecture isolates uncertainty to a small enough scope, a combination of Chinese models is fully capable of supporting commercial-grade delivery. The core competitiveness of developers is shifting from “writing code” to “defining problems and acceptance criteria.”
