An agent os architecture-based virtual world agent system and a full-stack control method thereof

CN122886336APending Publication Date: 2026-10-09HEFEI LINGZHI GALAXY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610676352.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-17
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

1. 虚拟自治实体行为机械重复:现有虚拟自治实体仅支持预编程的有限行为序列,缺乏自主认知与决策能力,行为模式单一且可预测

Benefits of technology

| 技术维度 | 现有技术缺陷 | 本发明效果 | 核心技术手段 |

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence and virtual world simulation, and discloses a virtual world intelligent agent system based on an intelligent agent OS architecture and its full-stack control method. The system adopts a two-layer architecture of cloud-based policy coordination and client-based autonomy (logical layering, deployment not limited). The cloud is responsible for world rules, while the client runs a multi-stage virtual autonomous entity behavior cycle (environmental perception → cognitive processing → behavioral decision-making → behavioral execution). The system supports pluggable module expansion, uses procedural generation and a consistency engine to ensure content self-consistency, constructs a social network to drive group emergence, achieves multi-level security protection and dynamic resource balancing, and supports offline autonomy and cross-platform synchronization. This invention endows virtual autonomous entities with powerful capabilities such as intelligent autonomous behavior, unlimited content generation, group emergence, economic self-balancing, security protection, and continuous offline operation, making it suitable for all scenarios including virtual life, virtual games, metaverse, digital twins, educational simulations, and training environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and virtual world simulation technology, and in particular to a virtual world intelligent agent system (an intelligent system that can simulate the operation of real-world society, drive the autonomous behavior of virtual autonomous entities and support deep user interaction, covering all scenarios such as virtual life, virtual games, metaverse, virtual science fiction, and virtual universe simulation) and its full-stack control method based on an intelligent agent OS architecture. It is applicable to the perception-cognition-decision-execution closed-loop control of various virtual world scenarios such as virtual life simulation, open-world RPG, metaverse platform, virtual science fiction world, virtual universe simulation, multiplayer online social virtual world, digital twin simulation, and education / training virtual simulation. Background Technology

[0002] Existing technological defects Current virtual world systems (including virtual life, virtual games, metaverse, etc.) have the following fundamental flaws: 1. Repetitive and mechanical behavior of virtual autonomous entities: Existing virtual autonomous entities only support a limited sequence of pre-programmed behaviors, lack autonomous cognition and decision-making capabilities, and exhibit singular and predictable behavioral patterns. 2. Limited World Content: Virtual worlds rely on manual design, and their content scale is limited by development resources, lacking the ability to generate infinitely and expand adaptively. 3. Disruption in narrative logic: The lack of consistency between procedurally generated content and the main narrative thread easily leads to logical conflicts and self-contradictions. 4. Superficial Social Interaction: The lack of realistic social network modeling between virtual autonomous entities prevents the generation of group emergent behavior, resulting in superficial social simulation. 5. Economic system imbalance: The virtual economy lacks a self-balancing mechanism, and after long-term operation, inflation or deflation is inevitable, damaging the user experience. 6. Content security risks: AI-generated content lacks tiered security protection and may contain inappropriate dialogue, harmful behavior, or other harmful content. 7. Loss of offline experience: When the internet connection is lost, the virtual world ceases to function, virtual autonomous entities stop moving autonomously, and the world loses its vitality. 8. Difficulty in cross-device synchronization: The virtual world state lacks an effective synchronization mechanism across multiple devices, leading to frequent save file conflicts. Technical bottlenecks - The contradiction between intelligence and real-time performance of virtual autonomous entities: High-quality virtual autonomous entity behavior requires complex cognitive reasoning (time-consuming), while real-time interaction requires frame-level response (meeting the latency budget of the target frame rate). - The contradiction between unlimited content generation and narrative consistency: procedural generation pursues diversity, while narrative experience requires logical consistency and causal coherence. - The contradiction between group emergence and controllable behavior: Real social emergence requires freedom of self-organization, but it must operate in a controllable manner within safe boundaries. Summary of the Invention

[0003] Purpose of the invention This invention aims to provide a virtual world intelligent agent system and its full-stack control method based on a cloud-based policy coordination engine and client-side autonomy. Through an innovative two-layer architecture of "cloud-based policy coordination engine + client-side autonomy," a multi-stage virtual autonomous entity behavior loop (environmental perception → cognitive processing → behavioral decision-making → behavioral execution), a procedural world generation and narrative consistency engine, a multi-agent social network and group emergence behavior system, a virtual world capability module mechanism, a multi-level content security and virtual economic governance system, offline play, and cross-platform state synchronization, it achieves the following: 1. Authenticity of Virtual Autonomous Entity Behavior: The client independently runs a multi-stage behavioral closed loop, completing a full cycle of perception-cognition-decision-execution in each frame. 2. Infinite World Content: Generated procedurally based on a combination of multiple algorithms, ensuring the narrative logic remains consistent. 3. Emergent Group Behavior: Social Network Dynamics Modeling, Real Social Phenomena Generated by the Self-Organization of Virtual Autonomous Entities 4. Virtual economic self-balancing: The tap / pool model, combined with real-time economic indicator monitoring, automatically adjusts economic parameters. 5. Multi-level content security: A four-tiered protection system from system-level filtering to cloud-based auditing. 6. Continuous Offline Operation: When the network is disconnected, the client continues to drive the world using a deterministic rule engine. 7. Seamless cross-platform synchronization: Version vector clock and CRDT mechanism ensure consistency of state across multiple platforms. Deployment Description: The cloud-based policy coordination engine and client autonomy described above form a logically layered architecture, without limitation on physical deployment. The two layers can be deployed separately on a remote server and a local client (cloud-separated mode), or simultaneously on the same device (local integrated mode). Communication between modules is achieved via network protocols in the separated mode and via local inter-process communication in the integrated mode, with completely consistent functional logic and security measures. Technical solution

[0004] This invention provides a complete virtual world intelligent agent system, comprising the following core technology modules (a combination of several modules can be selected according to the application scenario): Module 1: A two-tiered collaborative architecture of cloud-based policy coordination engine and client-side autonomy, resolving the contradiction between the intelligence and real-time interaction of virtual autonomous entities. Module 2: Multi-segment Virtual Autonomous Entity Behavior Loop and Multi-strategy Behavior Engine, Achieving Frame-Level Autonomous Behavior Module 3: Unified Management and AI Hosting Model for Heterogeneous Entities, Supporting Seamless Coexistence of Human and AI Entities Module Four: A procedural world generation and narrative consistency engine that enables infinite world content with logical self-consistency. Module 5: Multi-agent Collaboration and Emergent Behavior Systems, Achieving Group Self-Organization Based on Social Network Dynamics Module Six: Virtual World Capability Module and Extension Matrix, enabling hot-swappable virtual world capabilities. Module Seven: Multi-level Security Governance and Dynamic Balancing System for Virtual Resources, Building a Complete Governance Chain from System-level to Cloud-based Auditing Module 8: Offline autonomous operation and cross-platform state synchronization, using deterministic rules and CRDT mechanisms to ensure availability during network outages and consistency across multiple platforms. --- Module 1: Cloud-based policy coordination engine and client-side autonomous two-tier collaborative architecture 1.1 Architecture Design Innovation: A dual-layer control architecture of "cloud-based policy coordination engine + client-side autonomy" is proposed to resolve the contradiction between the intelligence and real-time interaction of virtual autonomous entities. The "dual-layer" refers to logical architecture layering, without limiting the physical deployment topology: the two layers can be deployed on different physical nodes (separate mode) or on the same device (integrated mode), with communication methods adaptively switching between network protocols or local inter-process calls.

[0005] ``` ┌─────────────────────────────────────────────────────────┐ │ Cloud Strategy Coordination Layer │ │ ┌──────────────┬──────────────┬──────────────┬──────────────┐ │ │ │ Strategy │ Economy │ Safety │ Model │ │ │ │ Coordination │ Balancer │ Kernel │ Gateway │ │ │ │ Engine │ (Economic Balance) │ (Content Security) │ (Model Gateway) │ │ │ │ (Strategy Coordination Engine) │ │ │ │ │ │ └──────────────┴──────────────┴──────────────┴──────────────┘ │ │ Responsibilities: │ │ • Distributing Narrative Strategies and World Rules │ │ • Monitor the state of the world (population / economy / social / event indicators) │ │ • Content security audit and economic intervention │ └─────────────────────────────────────────────────────────┘ ↕ WebSocket / HTTP (Second-level narrative event synchronization) ┌─────────────────────────────────────────────────────────┐ Client Autonomous Layer (AIL) │ ┌──────────────────────────────────────────────────────┐ │ Virtual-Agent (Virtual World Agent) │ │ ┌────────────┬──────────┬──────────┬──────────┬───────┐ │ │ │ │ │ Plugin Registry │ Behavior Queue │ Session Management │ Policy Cache │ Access │ │ │ │ │ │ │ │ │ Control │ │ │ │ │ └────────────┴──────────┴──────────┴──────────┴───────┘ │ │ │ │ ┌──────────────────────────────────────────────────┐ │ │ │ │ │ Virtual Autonomous Entity Behavior Loop (Separate Thread, Meeting Target Frame Rate Latency Budget) │ │ │ │ │ │ PERCEIVE→THINK→DECIDE→ACT Four-stage closed loop │ │ │ │ │ └──────────────────────────────────────────────────┘ │ │ │ │ ┌──────────────────────────────────────────────────┐ │ │ Content security daemon thread (independent of the behavior loop) │ │ │ Content Filtering | Behavioral Restrictions | Conversation Security | Anti-Fraud Measures | │ │ └──────────────────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────┘ Virtual Environment Abstraction Layer (Game Engine / Rendering / Physics Engine) ┌─────────────────────────────────────────────────────────┐ Virtual Environment Layer │ ┌──────────────┬──────────┬──────────┬──────────┬──────────┐ │ Virtual Autonomous Entities | Environmental Objects | Weather Systems | Economic Systems | Social Networks | │ └──────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘ │ └─────────────────────────────────────────────────────────┘ ``` 1.2 Responsibility Division Matrix | Dimensions | Cloud-based narrative engine layer | Client-side autonomy layer | |------|-------------|-----------| | Decision Granularity | Narrative Level ("Triggering a town crisis plot," "Adjusting global prices") | Behavioral Level (Virtual autonomous entity's per-frame perception-decision-action loop) | | Communication Frequency | Low Frequency (second-level world state synchronization) | High Frequency (30-60fps behavior loop) | | Latency Requirements | Tolerate high latency (seconds) | Require low latency (meeting target frame rate) | | Network outage behavior | Waiting for world state synchronization after recovery | Virtual autonomous entities continue to operate using local policy caching | | Security Responsibilities | Narrative content moderation, economic balance, privacy protection | Local behavior filtering, conversation security, anti-cheating | 1.3 Data Flow ``` Players / External Systems ↓ Player actions and interaction requests Client-side Autonomous Layer (Virtual-Agent) ├─ PERCEIVE: Scans for entities / events / social signals within the field of view. ├─ THINK: Memory Retrieval + Affective Computation + Intent Reasoning ├─ DECIDE: Goal Selection + Behavioral Planning + Prioritization └─ ACT: Animation playback + dialogue + interaction + world state modification ↓ World State Summary Report (in seconds) Cloud-based narrative engine layer ├─ Narrative Planning: Advancing the plot based on the state of the world ├─ Economic Balance: Detecting inflation / deflation and adjusting parameters └─ Strategy Deployment: New Narrative Events / Rule Updates ↓ Strategy and rule issuance (seconds) Client-side autonomy layer (receives and caches policies, driving the next round of behavior loop) ``` --- Module 2: Multi-stage Virtual Autonomous Entity Behavior Loop (typically implemented as a four-stage PERCEIVE→THINK→DECIDE→ACT) 2.1 Multi-stage Behavioral Loop Architecture Innovation: The virtual autonomous entity independently runs a multi-stage behavioral closed loop on the client side, realizing a functional pipeline of "environmental perception → cognitive processing → behavioral decision-making → behavioral execution" (the following uses a four-stage PERCEIVE→THINK→DECIDE→ACT as a typical example, without limiting the specific number and naming of functional stages). Each frame completes a full loop, and the total latency budget meets the target frame rate requirements, achieving frame-level autonomous behavior rather than relying on step-by-step instructions from the cloud. Regardless of whether the above functional pipeline is divided into three, four, five, or more stages, as long as the overall system achieves equivalent perception-cognition-decision-execution closed-loop control, it falls within the protection scope of this module.

[0006] ``` ┌──────────────────────────────────────────────────────────┐ │ Virtual Autonomous Entity Behavior Loop (Saving the target frame rate latency budget, configurable frame rate) │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ PERCEIVE │ ──→│ THINK │ ──→│ DECIDE │ ──→│ ACT │ │ │ │ Environmental Perception │ │ Cognitive Processing │ │ Behavioral Decision Making │ │ Action Execution │ │ │ │ ~15% │ │ ~30% │ │ ~30% │ │ ~25% │ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ ↑ │ │ │ └───────────────── Closed-loop feedback───────────────────┘ │ │ ┌─────────────────────────────────────────────────────┐ │ Security Guardian Layer (Separate Thread, Highest Priority) │ │ Content Filtering | Behavioral Controls | Conversation Security | Anti-Fraud Measures | Privacy Protection | │ └─────────────────────────────────────────────────────┘ │ └──────────────────────────────────────────────────────────┘ ``` 2.2 Delay Budget and Responsibilities for Each Segment | Phase | Delayed Budget | Responsibilities | Degradation Strategy | |------|---------|------|---------| | PERCEIVE | Approximately 15% of total budget | Environmental scanning, AOI filtering, entity detection | Reduce the number of sensed entities | | THINK | Approximately 30% of the total budget | Memory retrieval, sentiment computing, intent reasoning | Skip deep reasoning, use cached sentiment | | DECIDE | Approximately 30% of the total budget | Behavior selection, prioritization, conflict resolution | Degradation to behavior tree / rule engine | | ACT | Approximately 25% of the total budget | Behavior execution, state updates, event broadcasting | Simplified animations, delayed dialogue generation | | Overall Closed Loop | 100% (Target Frame Rate Meets Target) | Complete Behavior Loop | Reduce Frame Rate | 2.3 Multi-strategy Behavior Engine The behavioral decision-making phase supports the combination and dynamic switching of multiple decision-making strategies: - Rule Engine: Rapid decision-making based on condition-action rules, suitable for daily behavior and safety constraints. - Behavior Tree: A structured, hierarchical behavior selection tool suitable for structured behaviors such as patrolling, working, and resting. - GOAP (Goal-Oriented Planning): Automatically plans a sequence of actions based on the current world state and target conditions, suitable for complex, multi-step objectives. - ML Inference: Local lightweight model inference, suitable for complex social / creative scenarios. The ML inference strategy includes a timeout fallback mechanism: when the inference time exceeds the preset delay budget, it automatically switches to a backup decision strategy.

[0007] 2.4 Virtual Autonomous Entity Personality and Memory Model Each virtual autonomous entity possesses an independent personality model, memory system, and emotional state: The personality model adopts the Big Five personality dimensions (openness, conscientiousness, extraversion, agreeableness, and neuroticism). The parameters of each dimension are determined when the virtual autonomous entity is created and drift slowly with the life course, directly affecting the weight of behavioral decisions.

[0008] | Personality Dimensions | High-Scoring Performance | Low-Scoring Performance | Influencing Behavioral Decisions | |---------|---------|---------|----------| | Openness | Proactively exploring new areas and trying new activities | Preferring familiar environments and repetitive routines | Exploration vs. schedule weight | | Conscientiousness | Strict adherence to schedules, strong planning skills | Spontaneous, prone to procrastination | Task completion rate, punctuality | | Extraversion | Proactively initiates social interactions and participates in activities | Enjoys solitude and avoids crowds | Frequency of social interaction and participation in activities | | Agreeableness | Helpful, avoids conflict | Competitive, may be provocative | Cooperative vs. competitive | | Neuroticism | High mood swings, prone to anxiety | Emotional stability, resilient to stress | Rate of emotional change, conflict response | The emotional system employs a multi-dimensional emotional vector model (including basic emotions such as happiness, sadness, anger, fear, surprise, disgust, trust, and expectation, as well as complex emotions generated by their combinations). Emotional states change in real time and influence the behavioral choices of virtual autonomous entities. Basic emotions can be combined to generate complex emotions (e.g., happiness + trust = love, fear + surprise = awe), and complex emotions influence deeper behavioral patterns.

[0009] The memory system is divided into long-term memory and working memory: Long-term memory includes episodic memory (specific events and experiences), semantic memory (knowledge and rules), and emotional memory (strong emotional experiences). A forgetting curve model is used to control memory retention; memories with high importance and strong emotional impact decay more slowly, and each recall reduces the forgetting rate. - Working memory has limited capacity (configurable), storing current tasks and recent events; when capacity is exceeded, events are evicted based on importance. - The memory retrieval algorithm comprehensively considers relevance weight, importance weight, and retention rate weight to perform multi-factor scoring and ranking. 2.5 Behavioral Cyclic Degeneration and Equivalent Forms The multi-stage behavior loop includes its degenerate form and equivalent implementation. In actual virtual world systems, the behavior-driving mechanism of virtual entities may be presented in various simplified or variant forms, but its functional essence is equivalent to the behavior loop described in this patent: Degenerate Form 1: Pure Rule-Triggered Behavior (if-then rule set) The behavior of virtual entities is entirely driven by predefined condition-action rules, such as "run away if an enemy is detected" or "find food if the hunger value is below the threshold". This form is essentially a compressed loop of "environmental perception (condition detection) → behavior decision (rule matching) → behavior execution (action triggering)", implicitly integrating the cognitive processing stage into the condition judgment logic.

[0010] Degeneracy Form 2: Event-Driven Response Virtual entities do not actively poll the environment, but passively listen for events (such as collision events, dialogue events, time events, etc.). Upon receiving an event, they execute the corresponding processing logic. This form is essentially an implicit loop that uses events as the input for perception. When an event arrives, it triggers the complete process of "perception (event reception) → processing (event parsing and decision-making) → execution (response action)". The driving source of the loop changes from active polling to passive triggering, but the function is equivalent.

[0011] Degeneracy Form 3: State Machine Driven The behavior of virtual entities is controlled by finite state machines (FSMs) or hierarchical state machines (HFSMs). Entities switch between predefined states (such as patrolling, fighting, resting, socializing, etc.) based on transition conditions. This form is essentially an encoding of the various stages of the behavior cycle by state transitions: state transition conditions correspond to environmental perception, state transition logic corresponds to cognitive processing and behavioral decision-making, and behavior within a state corresponds to behavior execution.

[0012] Degenerate Form 4: Single Reasoning as Action Virtual entities input environmental information into the reasoning model (such as large language models, neural networks, etc.) all at once, directly output and execute behavioral instructions, without explicit multi-stage processing. This form essentially compresses the multi-stage processes of perception, cognition, decision-making, and execution into a single step, an extreme degradation, with the equivalent multi-stage processing implicitly completed within the reasoning model.

[0013] Behavioral Loop Equivalence Declaration: Any mechanism that enables virtual entities to generate autonomous behavior, regardless of whether it is explicitly encoded as a loop structure, whether it employs active polling or passive triggering, and whether the processing stages are explicitly separated or implicitly merged, as long as its function is equivalent to the process of "receiving environmental information → internal processing → generating behavioral output," is considered an implementation of the multi-stage behavioral loop described in this patent. The above list of degenerate forms is a non-exhaustive example; other equivalent implementations not listed also fall within the scope of protection of this patent.

[0014] --- Module 3: Unified Management and AI-Host Model for Heterogeneous Entity Clusters 3.1 Heterogeneous Entity Cluster Architecture Innovation: In the virtual world, entities with multiple driving types exist simultaneously. The system uses a unified entity management framework to perform undifferentiated scheduling and interactive management of all entities, making it impossible to distinguish the underlying driving type of any external entity.

[0015] ``` ┌─────────────────────────────────────────────────────────┐ │ Unified Management Framework for Heterogeneous Entity Clusters in the Virtual World │ │ ┌─────────────────────────────────────────────────────┐ │ Unified Entity Interface Layer (Consistent external behavior, transparent to underlying drivers) │ └─────────────────────────────────────────────────────┘ │ │ │ │ │ │ │ ┌─────────┐ ┌────────────┐ ┌────────────┐ │ │ │ Pure AI Autonomous │ │ Human Control │ │ Hybrid Mode │ │ │ │ Entity │ │ Entity │ │ Entity │ │ │ ├─────────┤ ├────────────┤ ├────────────┤ │ │ │ Behavior Loop │ │ Real-time User Input │ │ Online → User │ │ │ │ Full-time drive │ │ Direct control │ │ Offline → AI takeover │ │ │ └─────────┘ └────────────┘ └────────────┘ │ └─────────────────────────────────────────────────────────┘ ``` 3.2 Entity Types and Driving Modes | Entity Type | Driver Source | Behavior Cycle State | Typical Scenarios | |---------|------|-----------|--------| | Pure AI Autonomous Entity | Multi-stage Behavior Cycle Driven All Time | Always Active | Virtual Autonomous Entity, Virtual Residents, Simulated Population | | Real-time user-controlled entities | Direct user input for control | Pause / Standby | Player avatars, user avatars | | Hybrid Mode Entity | Manually controlled when users are online, AI takes over when offline / delegated | Dynamically switching | Metaverse Avatar, Virtual Human on Social Platforms | 3.3 AI Hosted Mode Workflow ``` User online: The avatar is controlled by the user in real time → The behavior loop is in standby mode. │ │ User offline / Active delegation / No action timed out ↓ Trigger AI-managed switch: ├─ Load user-preset personality model (personality parameters, behavioral preferences, social strategies) ├─ Activate multi-stage behavior loops (using the same architecture as pure AI entities) ├─ During the foster care period, participants will engage in autonomous activities, maintain social relationships, and participate in world events. │ │ User re-login ↓ Seamless switchback: ├─ AI behavior cycle releases control ├─ Show users a summary of the status during the hosting period (events that occurred, relationship changes, items acquired, etc.) └─ All status changes during the user's inheritance of managed accounts will be reversed, and manual control will be restored. ``` 3.4 Guarantee of Entity Type Transparency The system ensures that entity types are transparent to external parties through the following mechanisms: - Unified behavior output interface: Regardless of whether the underlying system uses user input or AI behavior loop output, the behavior format displayed externally remains completely consistent. - Undifferentiated interaction protocols: The same set of interaction protocols is used between virtual autonomous entities and real-person avatars, between virtual autonomous entities, and between real people. - Unified modeling of social networks: All entities participate in relationship modeling as nodes in the social graph, regardless of the driving type. - Equal participation in the economic system: All entities can trade, produce, and consume, and follow the same economic rules. --- Module 4: Procedural World Generation and Narrative Consistency Engine 4.1 Programmatic Generation Architecture Innovation: The system generates infinite worlds based on a combination of multiple algorithms, and combines narrative consistency checks to ensure that the generated content is logically consistent.

[0016] ``` ┌─────────────────────────────────────────────────────────┐ │ Procedural World Generation Architecture │ │ │ │ ┌──────────────┐ ┌──────────────┐┌──────────────┐ │ │ Terrain Generator │ Building Generator │ Quest Generator │ Multilayer noise + Wavefunction collapse + Template library + │ │ Erosion Simulation │ │ Formal Syntax │ │ AI Mutation │ │ │ └──────┬───────┘ └──────┬───────┘└──────┬───────┘ │ │ ↓ ↓ ↓ │ │ ┌───────────────────────────────────────────────────┐ │ │ │ Narrative Consistency Engine (Unified Validation Layer) │ │ │ │ Event Causal Graph | World State Constraints | Role Motivation Consistency Check │ │ │ └───────────────────────────────────────────────────┘ │ │ ↓ │ │ ┌───────────────────────────────────────────────────┐ │ │ │ Generate content and inject it into the world (takes effect after consistency check) │ │ │ └───────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────┘ ``` Terrain generation: A multi-layer noise superposition and erosion simulation algorithm is used to divide biological communities (forest / desert / permafrost / plain / mountain / ocean / swamp) by parameters of height, humidity and temperature. Deterministic seeds ensure repeatable generation.

[0017] Building generation: The spatial layout constraint is solved using the wave function collapse algorithm, and the vegetation and road network is generated by combining the formal grammar system. The architectural style is parameterized and configurable (medieval / modern / fantasy / science fiction / oriental).

[0018] Task generation: Based on a combination of template library and AI mutation, the template defines the task structure skeleton (gathering / killing / escorting / exploration / crafting / social / puzzle solving), and the AI ​​fills in the content and mutates according to the current world state and character relationships. The mutation intensity is configurable and supports automatic adjustment of difficulty based on player level.

[0019] 3.2 Narrative Consistency Guarantee Mechanism The narrative consistency engine includes three safeguards: - Event Causal Graph: Maintains a directed acyclic graph of global event causal relationships. When a new event is generated, it is checked whether it conflicts with an existing causal chain. If a conflict occurs, the event is rejected or automatically corrected. - World State Constraints: Define a set of world logic rules (such as "dead characters cannot appear in new events", "destroyed buildings cannot be used as gathering places"). All generated content must undergo constraint checks before it takes effect. - Character Motivation Consistency Check: Verifies whether the behavior of the virtual autonomous entity in the new narrative event is consistent with its personality, memories, and current emotional state. Inconsistencies trigger behavioral correction or provide a reasonable narrative of motivational shift. 4.3 Event Causal Graph The event causal graph adopts a directed acyclic graph structure, where nodes represent world events and edges represent causal relationships, including: event occurrence time, participants, preconditions, subsequent effects, and logical constraints. The graph supports querying the cause-and-effect chain of any event and performs consistency checks when a new event is inserted. It supports the coexistence of multiple parallel causal chains, as well as the forking and merging of causal chains.

[0020] --- Module 5: Multi-Virtual Autonomous Entity Collaboration and Group Emergent Behavior System 5.1 Social Network Modeling Innovation: Constructing a complete social network graph among virtual autonomous entities, and driving group emergence behavior through relationship dynamics.

[0021] ``` ┌─────────────────────────────────────────────────────────┐ │ Multi-virtual autonomous entity social networks and group emergence architecture │ │ │ │ ┌──────────────────────────────────────────────────────┐ │ │ │ Social Network Graph Layer │ │ Virtual Autonomous Entity Nodes─── Relationship Edges (Favorability / Trust / Influence / Intimacy) │ │ │ └──────────────────────────────────────────────────────┘ │ │ ↓ │ │ ┌──────────────────────────────────────────────────────┐ │ │ │ Population Dynamics Engine │ │ Opinion propagation model | Conformity effect | Group polarization | Collaborative behavior | │ └──────────────────────────────────────────────────────┘ │ │ ↓ │ │ ┌──────────────────────────────────────────────────────┐ │ │ │ Self-organization of the economic ecosystem │ │ Supply and demand balance | Price discovery | Market cycle | Scarcity control | │ └──────────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────┘ ``` Social network graphs use virtual autonomous entities as nodes and relationships as edges, with each relationship edge containing multi-dimensional attributes: | Attribute Dimensions | Value Range | Influencing Factors | Functions | |---------|---------|---------|------| | Favorability | -1.0~1.0 | Interaction frequency, help / harm events | Affect willingness to interact | | Trust Level | 0~1.0 | Fulfillment of Promises, Betrayal Events | Impact on Depth of Cooperation | | Influence | 0~1.0 | Social status, persuasion success rate | Influence on the dissemination of opinions | | Intimacy Level | 0~1.0 | Time Spent Together, Sharing Secrets | Influences Relationship Type Upgrade | Relationship types include, but are not limited to: family relationships, friendships, competitive relationships, mentor-apprentice relationships, transactional relationships, and adversarial relationships. Different relationship types have different attribute weights and evolution rules. Relationships can dynamically upgrade or downgrade over time and with events.

[0022] 5.2 Algorithm for Emerging Group Behavior The group emergence behavior is based on a social network dynamics model: - Opinion dissemination: A dissemination model is used to simulate the diffusion of information / opinions in social networks. Virtual autonomous entities decide whether to accept new viewpoints based on the dissemination probability and their own resistance (related to the neuroticism dimension of personality). - Herd mentality: When a preset proportion or more of the associated virtual autonomous entities around a virtual autonomous entity hold the same viewpoint or behavior, a herd mentality decision is triggered. The herd mentality threshold is configurable. - Group polarization: The continuous reinforcement of opinions within a homogeneous group creates an echo chamber effect. When the degree of extremism exceeds a preset threshold, it triggers group events (such as mass protests, migration, strikes). - Group Collaboration: Multiple virtual autonomous entities spontaneously form temporary teams based on a common goal to collaboratively complete complex tasks. 5.3 Self-organization of the virtual economic ecosystem The economic system adopts a supply and demand equilibrium model: commodity prices are dynamically adjusted according to the quantity supplied and the quantity demanded, and the price elasticity parameter is configurable; the market has a response delay, forming a natural price fluctuation cycle (prosperity period → recession period → recovery period cycle).

[0023] Economic indicator monitoring system: | Monitoring Indicators | Calculation Method | Early Warning Triggering Conditions | Control Measures | |---------|---------|------------|--------| Inflation rate | Changes in money supply / time window | Exceeding preset upper limit threshold | Add water to the pool, reduce water taps | | Deflation rate | Change in money supply / time window | Below preset lower threshold | Increase taps, decrease pools | | Gini coefficient | Lorenz curve calculation | Exceeding the preset warning value | Income-increasing measures for impoverished virtual autonomous entities | | Liquidity Ratio | Circulating Currency / Total Currency | Below Healthy Threshold | Transaction Incentives | Market Activity | Number of Transactions per Unit Time | Continued Sluggishness | Market Stimulus Events | Items are controlled by a tiered scarcity system: common items have unlimited supply, rare items have limited generation probability and quantity, and legendary items are unique across the entire server. Scarcity directly affects the market price multiplier.

[0024] --- Module Six: Virtual World Ability Modules and Extension Matrix 6.1 Virtual World Capability Module Architecture All virtual world capabilities are implemented as independent pluggable modules, and each module is scheduled according to priority.

[0025] | Priority | Capability Module | Namespace | Function Description | |--------|-----------|---------|---------| | P0 | Virtual Autonomous Entity Behavior Control | entity.behavior.* | Multi-stage Behavior Loop | | P0 | World Simulation Engine | world.simulation.* | Time System, Event-Driven | | P0 | Content Security Protection | content.safety.* | Content Filtering, Behavioral Constraints | | P1 | Narrative Generation | narrative.* | Story Engine, Task Generation | | P1 | Social Networks | social.* | Relationship Graphs, Group Behavior | | P1 | Virtual Economy | economy.* | Market Engine, Trading System | | P1 | Affective Computing | emotion.* | Affective Models, Empathy Engines | | P1 | Memory Personality | memory.personality.* | Long-term memory, learning preference | | P2 | Procedural generation | procedural.* | Terrain / building / item generation | | P2 | Physics Simulation | physics.* | Weather, Fluids, Particles | | P2 | Ecosystem Evolution | ecosystem.* | Species Evolution, Civilization Development | | P2 | Multiplayer Collaboration | multiplayer.* | World Sharding, State Synchronization | | P2 | Creative Workshop | creative.* | MOD loading, UGC validation | | P2 | AI Director | director.* | Rhythm Control, Dynamic Difficulty | 6.2 Runtime Management of Virtual World Capability Modules Virtual world capability modules are scheduled in a hierarchical manner according to priority: - Real-time control modules (such as virtual autonomous entity behavior control): high priority, run in an independent thread, with strict latency limits (to meet real-time requirements). - Security protection modules (such as content security protection): highest priority, independent thread, no queuing required. - World simulation modules (such as physics simulation, ecological evolution): medium priority, batch execution - Assistive generation modules (such as programmatic generation, workshop): low priority, asynchronous execution. Each module declares its running priority and maximum latency limit, and the scheduler dynamically allocates execution time slices based on the declared latency budget and the current frame rate margin.

[0026] --- Module Seven: Multi-level Content Security and Virtual Economy Governance System 7.1 Multi-level security protection architecture Innovation: Constructing a four-tiered, in-depth security protection system from system-level hard rules to cloud-based auditing. Each layer has clearly defined responsibilities, operates independently, and collaborates in depth.

[0027] ``` ┌─────────────────────────────────────────────────┐ Level 0: System-level content filtering (cannot be bypassed, highest priority) │ Sensitive word filtering | Illegal content detection | Violence and pornography filtering | Politically sensitive content │ ├─────────────────────────────────────────────────┤ │ Level 1: Behavioral Constraints of Virtual Autonomous Entities │ │ Behavioral boundary checks | Dialogue security filtering | Interaction restrictions | Violence level control │ ├─────────────────────────────────────────────────┤ │ Level 2: Economic Security │ │ Anti-fraud detection | Anti-cheating mechanism | Economic balance monitoring | Abnormal transaction alerts │ ├─────────────────────────────────────────────────┤ │ Level 3: Cloud-based Content Audit │ │ UGC Review | Report Handling | Compliance Check | Security Incident Tracing │ └─────────────────────────────────────────────────┘ ``` 7.2 Virtual Economic Equilibrium Mechanism The virtual economy governance adopts a tap / pool balance model: ``` ┌─────────────────────────────────────────────────────┐ │ Virtual Economy Governance Architecture │ │ │ | Faucet (Currency Generation) Pool (Currency Consumption) | │ ┌───────────────┐ ┌───────────────┐ │ │ │ Task Rewards │ │ Shop Purchases │ │ │ │ Resource Collection │ │ Repair Costs │ │ │ │ Transaction Tax Refund │ │ Taxation │ │ Daily Login | Shipping Costs | │ └───────────────┘ └───────────────┘ │ │ ↓ ↓ │ │ ┌───────────────────────────────────┐ │ Automatic Balancing Controller Inflation rate exceeds threshold → Increase water tank / Reduce taps│ Deflation rate exceeds threshold → Add more taps / reduce water level in the sink │ │ │ Gini coefficient exceeds threshold → Income-increasing measures for impoverished virtual autonomous entities │ │ │ └───────────────────────────────────┘ │ └─────────────────────────────────────────────────────┘ ``` The automatic balancing controller periodically monitors economic indicators (inflation rate, deflation rate, Gini coefficient, velocity of money) and automatically adjusts the flow parameters of the faucet and the sink when they exceed preset thresholds. All thresholds are configurable and do not require hardcoding specific values.

[0028] 7.3 Behavioral Boundaries and Compliance Checks Each virtual autonomous entity's actions undergo a compliance check pipeline before execution: 1. Check if the behavior is on the allowed list (whitelist mechanism). 2. Check if the action object is legitimate (the target entity exists and is interactive). 3. Check whether the intensity of the behavior is within a safe range (level of violence, content of the conversation). 4. Check whether the behavior conforms to the age classification requirements of the current scenario. Violations trigger tiered handling: minor violations are replaced with safe behaviors, moderate violations are interrupted and alarms are recorded, and serious violations trigger the freezing of virtual autonomous entity behaviors and are reported to the cloud for auditing.

[0029] --- Module 8: Offline Play and Cross-Platform Status Synchronization 8.1 Offline Autonomy Strategy Innovation: When the network is disconnected, the client switches to deterministic rule mode to continue running the world simulation. The virtual autonomous entities continue to operate autonomously, and the world will not "die" due to the network disconnection.

[0030] ``` ┌──────────────────────────────────────────────────────┐ │ Offline Play and Cross-Platform Synchronization Architecture │ │ │ │ ┌──────────────┐ ┌──────────────┐┌──────────────┐ │ │ │ Online Mode │ │ Offline Mode │ │ Synchronous Recovery │ │ │ │ • Complete four-part structure │ │ • Deterministic rules │ │ • Version vector │ │ │ │ • AI generation enabled │ │ • Local rule engine │ │ • CRDT merging │ │ │ │ • Cloud-based narrative synchronization │ │ • Policy caching │ │ • Conflict resolution │ │ │ │ • Full-capacity operation │ │ • Conservative security constraints │ │ • Incremental transmission │ │ │ └──────────────┘ └──────────────┘└──────────────┘ │ │ │ │ │ │ │ └─────────────────┴─────────────────┘ │ │ ↓ │ │ ┌──────────────────────────────────────┐ │ Cross-platform archive management (hash verification + multiple versions + rollback) │ │ │ └──────────────────────────────────────┘ │ └──────────────────────────────────────────────────────┘ ``` Offline constraints: - Disable AI-generated content (capabilities that require cloud models, such as dialogue generation and narrative mutation). - Drive the behavior of virtual autonomous entities using only a local rules engine and behavior tree. - Continue running the world using locally cached narrative strategies and economic parameters. - Impose conservative security constraints to limit the scope of behavior of virtual autonomous entities (to avoid extreme events). - New events are generated only through conditional triggering (not AI generation). Comparison of offline and online modes: | Capability Dimensions | Online Mode | Offline Mode | Degradation Strategy | |---------|---------|---------|--------| | Virtual Autonomous Entity Behavior Loop | Complete Four-Stage Structure | Simplified Rule-Driven | Omitted ML Inference Stage | | Narrative Generation | AI Dynamic Generation | Disable, Use Cached Story | Local Template Trigger | | Dialogue System | LLM for Dialogue Generation | Disable, Use Pre-built Dialogue Tree | Limited Branch Selection | | Economic System | Complete Supply and Demand Model | Simplified Parameter Operation | Fixed Parameter Operation | Content security | Four-level defense in depth | Local rule filtering | Conservative strategy preferred | | Event Triggering | Condition + AI Combination | Condition Triggering Only | Reduce Event Density | In offline mode, world time continues to pass, virtual autonomous entities operate according to their daily routines, and the economic system operates according to local cache parameters.

[0031] Version 8.2 Vector Clock and Conflict Resolution Execute status synchronization after network recovery: ``` Network restored ↓ Version vector clock comparison (cause detection) ├─ No conflict → Directly merge incremental states ├─ Automatic merging available → Automatic merging via CRDT mechanism └─ Cannot be automatically merged → Solve according to priority Priority 1: Cloud Authority Status Priority 2: Last Writer └─ Priority 3: Player manual selection ↓ Synchronization complete, local version vector updated. ``` Each client maintains an independent logical clock, and concurrent modifications are merged through CRDT (Conflict-Free Replicated Data Type) to ensure eventual consistency.

[0032] 8.3 Cross-platform archive synchronization mechanism Cross-platform synchronization process: Local save file generates a hash checksum → compares it with the cloud save file hash → calculates the incremental difference if inconsistencies occur → transmits incremental data → applies the increment and resolves conflicts → updates the hash value. Save files support multiple version retention and rollback, allowing players to restore to any historical save point at any time.

[0033] --- Invention Effects Compared with the prior art, the technical solution of the present invention has the following advantages: | Technical Dimensions | Existing Technology Deficiencies | Effects of the Invention | Core Technical Means | |---------|------------|---------|----------| | Authenticity of Virtual Autonomous Entity Behavior | Preprogrammed finite sequences, predictable | Frame-level autonomous behavior, unpredictable | Four-stage behavioral cycle + personality model | | Global content scale | Human-designed, limited content | Unlimited procedural generation | Multiple algorithm combinations + narrative consistency | | Social Depth | Surface Interactions, No Emergence | Group Self-Organizing Emergent Behavior | Social Network Dynamics | | Economic balance | Manual parameter adjustment, long-term imbalance | Automatic balance, long-term stability | Faucet / reservoir + Gini coefficient | Content security | Lack of tiered protection | Four-level defense in depth | Multi-layered, independently operating security system | Offline Experience | Stops upon Disconnection | Continues Running Even When Disconnected | Deterministic Rules + CRDT Synchronization | --- Detailed Implementation

[0034] Example 1: Virtual Life Simulation Scenario (The Sims Class) Application scenarios: Simulating real social life, virtual autonomous entities possess independent personalities, routines, social interactions, and professions. Workflow: 1. The cloud-based narrative engine issues the following world rules: "Virtual autonomous entities must work on weekdays, social activities increase on weekends, and special events are triggered during seasonal holidays." 2. The client-side Virtual-Agent runs a four-stage behavior loop for each virtual autonomous entity: - PERCEIVE: Scan surrounding neighbors, environmental conditions (time / weather), social invitations - THINK: Retrieves memories of relationships with neighbors and calculates current emotions (being alone for too long → increased loneliness). - DECIDE: Selective Behavior (High Extraversion → Proactively visit neighbors; High Conscientiousness → Complete work first, then socialize) - ACT: Perform social interactions and update relationship attributes and sentiment status. 3. Group Emergence: Multiple virtual autonomous entities within the community spontaneously form social circles, leading to phenomena such as the spread of rumors and collective activities. 4. Economic System: Virtual autonomous entities earn income through work, consume goods and services, and the economic system automatically balances itself. 5. Offline Scenario: After network disconnection, the virtual autonomous entity continues to operate according to the rule engine's daily routine. Technical effects: - Virtual autonomous entities exhibit diverse behavioral patterns based on personality differences. - Social networks have evolved naturally, giving rise to real-world community dynamics. - The economic system maintains a long-term balance. - Ensure compliance of virtual autonomous entities' behavior through multi-level security protection. Example 2: Open-world RPG scenario (Skyrim class) Application scenario: Large-scale open-world adventure games, where virtual autonomous entities possess independent living and quest systems. Workflow: 1. A procedural generation engine creates infinite worlds: terrain (noise + erosion), towns (wave function collapse), and quests (templates + AI mutation). 2. The narrative consistency engine maintains an event causal graph to ensure logical consistency in the task chain. 3. Virtual autonomous entities live autonomously through a four-stage behavioral cycle (activities are triggered immediately, not waited for player intervention): - The blacksmith works as a blacksmith during the day, goes to the tavern in the evening, and goes home to rest at night. - When encountering a bandit attack, switch to combat behavior (GOAP planning: pick up weapon → fight → heal → report to guards). 4. The AI ​​director system monitors the player experience tension curve and dynamically adjusts event density and difficulty. 5. Virtual Autonomous Entity Behavior LOD System: Virtual autonomous entities near the player execute a complete four-stage loop, while distant virtual autonomous entities are processed in a simplified manner. Technical effects: - The world contains infinite content and is logically consistent. - Virtual autonomous entities behave realistically and naturally, and their activities are triggered by non-players. - Game difficulty and pace automatically adjust to player skill level - The LOD system supports the concurrent operation of thousands of virtual autonomous entities. Example 3: Multiplayer Online Social Virtual World (Metaverse) Application scenario: Large-scale multiplayer online virtual social spaces Workflow: 1. Manage global world state and sharding strategy in the cloud, and allocate service nodes by region. 2. Each client independently runs the behavior loop of the virtual autonomous entity in its local area, reducing the amount of synchronized data through AOI filtering. 3. The multi-user collaboration module is responsible for cross-client state synchronization (incremental synchronization + version vector clock). 4. Social networks model cross-player and virtual autonomous entities, generating large-scale group emergence behavior. 5. The virtual economic system operates across all servers, with automatic balancing of the tap / pool. 6. The Workshop supports user-generated content (UGC), which can be published after undergoing a Level 4 security review. Technical effects: - Supports large-scale concurrent user online interaction - Virtual autonomous entities and players form a unified social network - UGC content enriches the world and is secure and controllable Cross-platform state synchronization ensures a consistent experience across multiple devices. Example 4: Virtual Simulation Scenario for Education / Training Application scenarios: historical scene restoration, vocational skills training, social skills training Workflow: 1. Configure teaching objectives and scenario parameters in the cloud (e.g., "simulating a market trading scenario in Chang'an during the Tang Dynasty"). 2. The procedural generation engine creates a simulation environment that meets the teaching objectives (architectural style, virtual autonomous entity professions, and item type matching historical settings). 3. The virtual autonomous entity operates in a loop according to the role settings, responding to learner operations and providing feedback appropriate to the role. 4. The AI ​​director adjusts the scene difficulty and guidance strategy based on the learner's performance. 5. The narrative consistency engine ensures that historical scenes are logically consistent (character dialogues and event logic conform to the historical context). 6. Offline mode supports training in environments without network access (classroom / laboratory scenarios). Technical effects: Immersive learning experiences enhance knowledge absorption efficiency. - Scenes can be repeatedly generated with slight variations each time to avoid rote memorization. - Supports offline training, suitable for environments with limited network access. - Interactive feedback from virtual autonomous entities is superior to traditional one-way teaching. Deployment morphology variants The "cloud-based narrative engine" and "client-side autonomy" described in this patent are logical functional layering concepts, without limiting the physical deployment form. The following are typical deployment variations, all of which are logically equivalent: Variant A: Classic Cloud-Endpoint Separation Deployment The narrative engine is deployed on a cloud server or data center, while the client-side autonomous module runs on user terminal devices (PCs, game consoles, mobile devices, VR headsets, etc.). The two layers communicate via network protocols (WebSocket / HTTP). This is the most typical deployment model and is suitable for large-scale multiplayer online scenarios.

[0035] Variant B: Fully Centralized Deployment The narrative engine and the client-side autonomous module run on the same server or server cluster, exchanging data between the two layers through local inter-process communication (IPC) or memory sharing. Users access the system through thin clients (browsers, streaming media clients, etc.). This variant is suitable for scenarios such as cloud gaming and cloud rendering, where all computation is centralized on the server side.

[0036] Variant C: Fully Edged / Decentralized Deployment The narrative engine and client-side autonomous modules both run on the user's local device or distributed across nodes in a P2P peer-to-peer network, eliminating the need for a centralized server. The narrative engine runs locally as an independent process or thread, cooperating with the autonomous modules through local calls. This variant is suitable for single-player games, offline-first scenarios, or decentralized virtual worlds.

[0037] Variant D: Hybrid Resilient Deployment The narrative engine and client-side autonomous module can dynamically migrate between any computing nodes, automatically scheduling deployment locations based on factors such as network conditions, computing load, and user distribution. Under low load, the two layers can be merged and run on the same node; under high load, they are automatically split across different nodes. This variant is suitable for large-scale virtual world platforms requiring elastic scaling.

[0038] Deployment equivalence declaration: Regardless of the physical deployment topology mentioned above, or any combination and evolution of the above variations, as long as the system logically achieves the functional separation and collaborative control of the "narrative strategy generation" functional layer and the "autonomous behavior execution" functional layer, it is considered to have implemented the "cloud-based narrative engine and client-side autonomous two-layer collaborative architecture" described in this patent. Physical deployment location, communication methods (network protocols / inter-process communication / memory sharing / function calls, etc.), and process boundary division do not affect the determination of the implementation of the technical solution of this patent. Implementation

[0039] This patent is based on the intelligent agent OS architecture, with the core paradigm being "cloud-based policy coordination engine (with the narrative engine as a typical scenario example) + client-side autonomous virtual agent", which forces the separation of narrative policy and virtual autonomous entity behavior execution, cloud and client collaboration, and closed-loop controllability.

[0040] Terminology Definitions: The following terms used in this patent are defined by their functional nature and are not limited to their literal meanings: - "Virtual Autonomous Entity": The core protected object of this patent, generally referring to all entities in the virtual world with autonomous behavior capabilities, including but not limited to game NPCs, virtual residents of the metaverse, digital twins, simulated populations, virtual traffic participants, virtual device agents, AI digital humans, virtual assistants, etc. NPC is its common name in game / entertainment scenarios; "virtual autonomous entity" and "NPC" can be used interchangeably throughout this patent and both refer to the same protected object; - "Virtual Life / Virtual Game System": refers to all virtual world systems driven by intelligent virtual entities, including but not limited to virtual life simulation, virtual games, metaverse platforms, virtual science fiction worlds, virtual universe simulations, digital twin simulations, virtual social worlds, immersive education platforms, virtual training environments, etc., without limiting the specific type, name or commercial positioning of the virtual world. - "Player": refers to any user or external system that interacts with the virtual world, including but not limited to game players, platform users, visitors, operators, external API callers, etc. - "Global Strategy Coordination Engine" (also referred to as "Cloud Narrative Engine" in this patent): refers to the functional layer in the virtual world responsible for global rule generation, strategy distribution and state coordination. In entertainment / narrative scenarios, it manifests as a narrative engine (generating plot and issuing narrative strategies), in digital twin scenarios as a simulation coordinator (issuing simulation parameters and synchronization rules), in industrial scenarios as a scheduling planner (issuing production strategies and resource scheduling schemes), and in scientific research simulation scenarios as an experimental parameter controller. The specific implementation form and scenario naming are not limited. - "Virtual Resource Dynamic Balancing System" (also referred to as "Virtual Economy Governance" in this patent): refers to a mechanism for dynamically balancing the injection and consumption of any type of resources in the virtual world. The resources include, but are not limited to, virtual currency, energy, matter, information, computing power, traffic capacity, ecological indicators, etc. "Virtual economy" is a typical example of it in a scenario with a monetary system. - "Heterogeneous Entity Cluster": refers to a collection of multiple types of entities that coexist in the virtual world, including pure AI autonomous entities (driven by behavior loops at all times), real-person controlled entities (virtual avatars controlled by real users in real time), and hybrid-mode entities (controlled by users when real people are online, and automatically taken over by AI behavior loops when offline or delegated). The system uses a unified entity management framework to perform undifferentiated scheduling and interactive management of all types of entities. From the perspective of other entities, there is no need to distinguish or distinguish which type of driving they belong to. - "AI Hosted Mode": This refers to the virtual avatar of a real user automatically switching to an AI autonomous behavior cycle-driven operating state when the user is offline, temporarily away, or actively delegated. During the hosting period, the avatar acts autonomously according to the user's preset personality model, behavioral preferences, and social strategies. When the user logs back online, the system seamlessly switches back to manual control mode and inherits all state changes during the hosting period.

[0041] The intelligent agent OS provides multi-dimensional fundamental capabilities, and the full-stack control of the virtual world intelligent agent system is built upon some or all of these capabilities. The table below lists typical dimensions (including but not limited to). Each dimension is defined by its functional essence. Regardless of the specific naming, implementation form, or dimensional division method used, systems that achieve equivalent functional effects are considered to provide the same dimension of fundamental capabilities: | Dimension | OS Primitives | Essence | |------|---------|------| | Perception | Orchestrator + Intent Classification + Channel Access | Understanding All Input | | Cognition | Agent Loop + Goal Decomposition + World State | Understanding Problem Structure | | Planning | Planning Kernel + GoalGraph DAG | Transforming Goals into Action Paths | | Execution | Execution kernel + Skill sandbox + Worker | Do things safely | | Memory | Memory system + multi-channel recall + preference | Accumulated experience | | Knowledge | RAG + Evidence Chain + Hybrid Retrieval | Utilizing Existing Knowledge | | Collaboration | Multi-Agent orchestration + debate + federation | Multi-role collaboration | | Governance | Changeset + Approval + Gray Scale + RBAC / ABAC | Controlled Evolution | | Connectivity | Device runtime + Connectors + Channel gateways | Reaching the physical / digital world | | Modeling | Schema + Metadata + General CRUD | Describing Everything | This patent does not protect the intelligent agent OS infrastructure itself, but only the virtual world intelligent agent system and its control methods implemented based on this architecture, including: cloud-based policy coordination engine and client-side autonomous collaboration, multi-stage virtual autonomous entity behavior loop (hereinafter, PERCEIVE→THINK→DECIDE→ACT is used as a typical example for naming, and each functional stage is based on its actual function), procedural world generation and narrative consistency engine, multi-agent collaboration and group emergence behavior, virtual world capability module expansion, multi-level content security and virtual economic governance, offline play and cross-platform state synchronization. The scope of protection for the above control methods is also based on the functional essence, and the principle of equivalence applies. Regardless of the specific naming (e.g., naming PERCEIVE "Observation", "Scanning" or "Perception", etc.), the method of dividing the number of stages (e.g., merging multiple functional stages into fewer stages, or splitting a single functional stage into more sub-stages), or the specific implementation form of each functional stage of the virtual autonomous entity behavior loop, as long as its functional pipeline as a whole achieves the closed-loop control effect of "environmental perception → cognitive processing → behavioral decision-making → behavioral execution", it is considered to have implemented an equivalent virtual autonomous entity behavior loop.

Claims

1. A virtual world intelligent agent system based on an intelligent agent OS architecture (covering virtual world scenarios such as virtual life, virtual games, metaverse, virtual science fiction, virtual universe simulation, and digital twins), characterized in that, include: A cloud-based narrative engine and client-side autonomous dual-layer collaborative module, wherein the cloud-based narrative engine and client-side autonomous module are logically layered and not limited to physical deployment; the two layers can be deployed on different physical nodes or on the same device. The dual-layer collaborative module includes: - The cloud-based narrative engine module is used to distribute narrative strategies and world rules, perform economic balance regulation and content security auditing, transmit narrative events and rule parameters to the client autonomous module through a communication interface, monitor the world's operating status, and provide content intervention capabilities in case of anomalies; the communication frequency of the cloud-based narrative engine module is on the order of seconds, and it tolerates network latency; - The client-side autonomous module (Virtual-Agent), including a plugin registry, behavior priority queue, and policy cache, receives narrative strategies from the cloud-based narrative engine module and drives the behavior of virtual autonomous entities. It executes a multi-stage behavior loop within an independent execution context (the independent execution context includes, but is not limited to, independent threads, coroutines, fibers, asynchronous tasks, or other concurrent execution mechanisms). This behavior loop comprises multiple functional stages, covering at least four categories: environmental perception, cognitive processing, behavioral decision-making, and behavioral execution (each functional stage is based on its actual function, without specific naming, implementation language, or stage number restrictions; the above functions can be merged into fewer stages or split into more sub-stages), enabling frame-level autonomous behavior of virtual autonomous entities. The client-side autonomous module supports managing heterogeneous entity groups, including AI autonomous entities, human-controlled entities, and hybrid-mode entities, exhibiting consistent behavior through a unified entity interface layer. The client-side autonomous module supports continuing operation using local policy caches even when the network is disconnected. - Virtual World Capability Module Layer: All virtual world capabilities are implemented in the form of pluggable modules. These capability modules include, but are not limited to, at least one of the following: virtual autonomous entity behavior control, world simulation engine, content security protection, narrative generation, social network, virtual economy, affective computing, memory personality, procedural generation, physics simulation, ecological evolution, multi-person collaboration, creative workshop, and AI director. Each capability module declares its running priority and maximum latency limit. The scheduler dynamically allocates execution time slices based on the declared latency budget and the current frame rate margin.

2. The system according to claim 1, characterized in that, The cloud-based narrative engine module and the client-side autonomous module are logically functionally layered and can be deployed in any topology within the same physical device, process, distributed server cluster, or edge computing network, including but not limited to: classic cloud-edge separation deployment (cloud server and terminal device are separate), fully centralized deployment (narrative engine and autonomous module run on the same server or cluster), fully edge-based or decentralized deployment (all modules run on the user's local device or peer-to-peer network), and hybrid elastic deployment (modules can migrate between any computing nodes based on dynamic load scheduling). The communication methods between the two layers include but are not limited to any one or a combination of network protocols, inter-process communication, memory sharing, or function calls. Regardless of the physical deployment topology and communication method used, as long as the functional separation and coordination of narrative strategy generation and autonomous behavior execution are logically achieved, it is considered to have implemented the two-layer collaborative architecture described in this patent.

3. The system according to claim 1, characterized in that, The functional stages of the multi-segment virtual autonomous entity behavior loop include: the environment perception stage performs virtual environment scanning and AOI region interest filtering; the cognitive processing stage performs memory retrieval, emotion computing, and intent reasoning; the behavior decision stage performs target selection, behavior planning, and priority ranking; and the behavior execution stage performs behavior actions, state updates, and event broadcasting. The above functional stages can be implemented in combination or further divided into more sub-stages. The latency budget for each segment is configurable, and the total closed-loop latency meets the frame rate requirements.

4. The system according to claim 3, characterized in that, The multi-stage behavior loop includes its degenerate forms and equivalent implementations. The degenerate forms include, but are not limited to: pure rule-triggered behavior, which is driven by a set of condition-action rules to drive the behavior of virtual entities, essentially a compressed loop of perception, decision-making, and execution; event-driven response, which is an implicit loop with events as perception input; state machine driven, which uses the state transitions of a finite state machine or hierarchical state machine to encode each stage of the behavior loop; single-step reasoning as action, which is an extreme degenerate form that compresses multi-stage processing into single-step reasoning; any mechanism that enables virtual entities to generate autonomous behavior, whether explicitly encoded as a loop structure, whether actively polling or passively triggered, whether the processing stages are explicitly separated or implicitly merged, as long as it is functionally equivalent to the process of receiving environmental information, internal processing, and generating behavioral output, is considered an implementation form of the behavior loop described in this patent.

5. The system according to claim 3, characterized in that, The cognitive processing stage includes a multi-strategy cognitive engine, which comprises: a memory retrieval module, which retrieves memory fragments related to the current perceptual context from the long-term memory of the virtual autonomous entity and ranks them by multi-factor scoring based on relevance, importance, and retention rate; an emotion computing module, which maintains a multi-dimensional emotion vector and updates it in real time based on perceptual input; and an intention reasoning module, which infers the behavioral intention of the virtual autonomous entity based on a personality model and the current emotion.

6. The system according to claim 3, characterized in that, The behavioral decision-making stage supports the combination and dynamic switching of multiple decision-making strategies, including at least one or a combination of rule engine, behavior tree, GOAP goal-oriented behavior planning, and ML inference. The ML inference strategy includes a timeout rollback mechanism, which automatically switches to a backup decision-making strategy when the inference time exceeds the preset delay budget.

7. The system according to claim 1, characterized in that, Each virtual autonomous entity has an independent personality model and memory system. The personality model contains multi-dimensional personality parameters, which are determined when the virtual autonomous entity is created and drift slowly with the life course. The memory system includes long-term memory and working memory. Long-term memory includes episodic memory, semantic memory and emotional memory. The forgetting curve model is used to control memory retention and decay. The working memory has a limited capacity and supports dynamic replacement.

8. The system according to claim 1, characterized in that, It also includes a procedural world generation module, which adopts a combination of multiple algorithms for world generation. Terrain generation adopts multi-layer noise superposition and erosion simulation, building generation adopts constraint solving algorithm, and task generation adopts a combination of template and AI mutation. The parameters of each generation algorithm are configurable and deterministic seeds are used to ensure repeatable generation.

9. The system according to claim 8, characterized in that, It also includes a narrative consistency engine, which comprises: an event causal graph, which maintains a directed graph structure of global event causal relationships (typically implemented as a directed acyclic graph, but other causal relationship graph structures are not excluded), and checks whether new events conflict with existing causal chains when they are generated; world state constraints, which define a set of world logic rules to constrain and check all generated content; and role motivation consistency checks, which verify whether the behavior of virtual autonomous entities is consistent with their personality, memory, and current emotional state.

10. The system according to claim 1, characterized in that, It also includes a multi-virtual autonomous entity social network modeling module, which constructs a social network graph with virtual autonomous entities as nodes and relationships as edges. Each relationship edge contains at least two attributes among favorability, trust, influence, and intimacy. The attribute values ​​are dynamically updated with the interaction events of virtual autonomous entities. The relationship types include at least one of family relationships, friendship relationships, competitive relationships, and transactional relationships.

11. The system according to claim 10, characterized in that, The social network supports group emergence behaviors, including: opinion dissemination, which uses a propagation model to simulate the diffusion of information in the social network; the bandwagon effect, which triggers bandwagon decisions when a preset proportion or more of the associated virtual autonomous entities around a virtual autonomous entity hold the same view; and group polarization, where the continuous reinforcement of views within a homogeneous group forms an echo chamber effect, and when the degree of extreme polarization exceeds a preset threshold, a group event is triggered.

12. The system according to claim 1, characterized in that, It also includes a virtual economy self-balancing module, which adopts a tap / pool balancing model. The tap is the source of money generation, and the pool is the channel for money consumption. The automatic balancing controller periodically detects economic indicators. When the inflation rate exceeds a preset threshold, the pool is increased or the tap is decreased. When the deflation rate exceeds a preset threshold, the tap is increased or the pool is decreased. When the Gini coefficient exceeds a preset threshold, income-increasing measures for impoverished virtual autonomous entities are triggered.

13. The system according to claim 1, characterized in that, It also includes a multi-level content security protection module, which includes at least two of the following layers: a system-level content filtering layer, a virtual autonomous entity behavior constraint layer, an economic security layer, and a cloud-based content auditing layer. These layers form a deep and collaborative protection system. The system-level filtering intercepts content before it is output as a decision on the behavior of the virtual autonomous entity, and rejects and records alarms for any violations.

14. The system according to claim 13, characterized in that, The economic security layer includes a virtual economy anti-fraud module, which includes: transaction frequency limit, setting an upper limit on the number of transactions and the amount of a single transaction within a unit of time; abnormal transaction detection, monitoring transaction patterns to identify abnormal behavior; and economic indicator monitoring, tracking at least two of the following indicators in real time: inflation rate, Gini coefficient, velocity of money, and liquidity ratio.

15. The system according to claim 1, characterized in that, It also includes a Virtual Autonomous Entity Behavior LOD system, which classifies virtual autonomous entities according to their distance or importance to players: close or important virtual autonomous entities execute complete multi-stage behavior loops, medium-distance virtual autonomous entities execute simplified cognition and decision-making, and far-distance virtual autonomous entities only execute basic routine rules, thereby supporting the concurrent operation of large-scale virtual autonomous entities.

16. The system according to claim 1, characterized in that, It also includes an AI director system, which comprises: a tension curve management module that monitors the player's current experience tension and compares it with the target curve; a dynamic difficulty adjustment module that automatically adjusts the challenge difficulty based on the player's performance; and a rhythm control module that controls the event density and interval to ensure a reasonable experience rhythm, with the timing and intensity of event arrangement dynamically configured based on player profile analysis.

17. The system according to claim 1, characterized in that, The offline play module includes: when a network interruption is detected, the client switches to a deterministic rule mode, disables AI-generated content that requires cloud models, uses only the local rule engine and behavior tree to drive the behavior of virtual autonomous entities, and continues to run the world simulation using locally cached narrative strategies and economic parameters.

18. The system according to claim 17, characterized in that, It also includes a cross-platform state synchronization module. After the network is restored, a logical clock mechanism (including but not limited to version vector clock, Lamport clock or other causal order tracing mechanism) is used to track the causal relationship of the world state of each platform. Concurrent modifications are merged through a conflict-free data merging mechanism (including but not limited to CRDT, operation transformation or other concurrent merging algorithm). Conflicts that cannot be automatically merged are resolved in priority order, which is: cloud authoritative state first, last writer second, and player manually selected last.

19. The system according to claim 1, characterized in that, It also includes a virtual world capability module priority scheduling module. This scheduling module performs real-time scheduling based on the declared running priority and maximum latency limit of each capability module. Specifically, it includes: dividing capability modules into multiple priority levels (including at least real-time control, security protection, world simulation, and auxiliary generation); security protection modules have the highest scheduling priority and are not limited by the frame budget; real-time control modules are executed first within each frame budget, and are downgraded to simplified behavior if they time out; world simulation and auxiliary generation modules are executed in batches or asynchronously within the remaining frame budget time; when multiple modules with the same priority compete for execution time, they are dynamically sorted according to entity importance and player distance.

20. The system according to claim 1, characterized in that, It also includes a unified management module for heterogeneous entity groups. In the virtual world, there are three or more types of entities: pure AI autonomous entities, human-controlled entities, and hybrid entities. The pure AI autonomous entities are driven by multi-stage behavior cycles all the time. The human-controlled entities are directly controlled by the user in real time. The hybrid entities are controlled by the user when the user is online and automatically switch to AI behavior cycle drive when the user is offline or delegated. The system performs undifferentiated scheduling and interactive management of all types of entities through a unified entity interface layer. From the perspective of any external entity, it is impossible to distinguish which type of drive the other party belongs to. During the AI ​​hosting period, the hybrid entities act autonomously according to the user's preset personality model and behavioral preferences. When the user goes back online, they seamlessly switch back to human control and inherit all state changes during the hosting period.

21. A full-stack control method for virtual world intelligent agents based on a cloud-based narrative engine and client-side autonomy, characterized in that, The cloud-based narrative engine and client-side autonomy form a layered logical architecture without being limited by physical deployment, including the following steps: The cloud-based narrative engine module generates narrative strategies and world rule parameters; the narrative strategies are transmitted to the client-side autonomy module through a communication interface; the client-side autonomy module drives the behavior of virtual autonomous entities according to the narrative strategies; a multi-stage behavior loop is executed in an independent execution context, sequentially executing environmental perception, cognitive processing, behavior decision-making, and behavior execution; the content security protection execution context runs in parallel, detecting and blocking illegal content in real time; when the network is interrupted, it switches to offline deterministic rule mode to continue running; after the network is restored, the logical clock state is synchronized; the world state is periodically reported to the cloud-based narrative engine for global monitoring and adjustment.

22. A method for cyclical control of the behavior of an intelligent agent in a virtual world, characterized in that, The system includes the following functional phases (each phase is based on its actual function, without specific naming or number of phases, and phases can be merged or further split): The environmental perception phase scans entities, events, and social signals within the field of view in the virtual environment and optimizes the perception range through AOI area interest management; The cognitive processing phase performs memory retrieval, emotional state updating, and intention reasoning, and memory retrieval is ranked by multi-factor scoring based on relevance, importance, and retention rate. In the behavior decision-making phase, the optimal behavior scheme is selected based on the multi-strategy behavior engine. It supports at least one strategy combination among rule engine, behavior tree, GOAP goal-oriented planning, and ML inference. When the ML inference times out, it automatically falls back to the backup strategy. In the behavior execution phase, the selected behavior is executed and the world state and the virtual autonomous entity's own state are updated. The method is applicable to both pure AI autonomous entities and AI-managed states of hybrid-mode entities. It supports behavior LOD classification and selects behavior loops with different precision based on entity importance and distance.

23. A method for ensuring consistency between procedural world generation and narrative, characterized in that, Includes the following steps: The world content is generated by combining multiple algorithms. The terrain is generated by multi-layer noise superposition and erosion simulation, the buildings are generated by constraint solving algorithms, and the tasks are generated by combining templates and AI mutation. The generated content is verified by a narrative consistency engine. The verification includes: checking whether new events conflict with existing causal chains in the event causal graph, comparing the world state constraint rule set, and verifying the consistency of character motivations. Content that fails verification will be rejected or automatically corrected and then re-verified.

24. A method for controlling the emergent behavior of a group of multiple virtual autonomous entities, characterized in that, Includes the following steps: A social network graph of virtual autonomous entities is constructed, with all virtual autonomous entities (including pure AI entities and hybrid entities) as nodes and multi-dimensional relationship attributes as edges. The diffusion and spread of information and opinions in the social network are simulated through a propagation model. When a preset proportion or more of the associated virtual autonomous entities around a virtual autonomous entity hold the same opinion, a herd effect is triggered. The internal viewpoints of homogeneous groups are strengthened, forming group polarization. The economic system adopts a supply and demand balance model to automatically adjust commodity prices. An automatic balance controller monitors economic indicators and implements adjustment measures when they exceed the threshold.

25. A method for offline operation and state synchronization of a virtual world intelligent agent, characterized in that, This includes the following steps: When a network outage is detected, the client switches to deterministic rule mode; AI-generated content requiring cloud-based models is disabled, and the behavior of virtual autonomous entities is driven solely by a local rules engine and behavior tree; world time continues to pass, and virtual autonomous entities perform daily behaviors according to a caching strategy. After network recovery, version vector clocks are used to track the causal relationships of the states of each endpoint; concurrent state modifications are merged through the CRDT mechanism; and conflicts that cannot be automatically merged are resolved according to a preset priority order. Cross-platform archive synchronization uses a hash check and incremental transmission mechanism, supporting multiple version retention and rollback.