Method for obtaining training of personality-driven and interactive dynamic design-based large language model agent

CN122987997APending Publication Date: 2026-10-27BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611113346.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-26
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]针对现有基于有限状态机或分支剧本的需求工程教学仿真系统中,NPC 回复受预置路径限制、难以支持自由追问,NPC 配合程度与需求披露难以随交互动态变化,以及大语言模型开放式对话易偏离教学场景与角色设定等问题,本发明提供一种基于人格驱动与交互动态设计的大语言模型智能体需求获取训练严肃游戏,适用于软件需求获取阶段的开放式对话训练

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122987997A_ABST
    Figure CN122987997A_ABST
Patent Text Reader

Abstract

The application discloses a big language model intelligent agent acquisition training method based on personality driving and interactive dynamic design, and belongs to the technical field of software engineering and educational informatization. First, a hierarchical simulation system architecture including a performance layer, a conversation layer and a data layer is constructed; second, a double-layer psychological modeling is established for a virtual NPC, a personality layer adopts an OCEAN five-factor model to depict stable personality traits, and an emotion layer adopts a PAD three-dimensional emotion space to represent dynamic emotion states; third, based on the four-layer structured modeling, system prompt words are constructed, and a big language model is called to generate dynamic replies consistent with role setting and current states; finally, demand entry management and training process record, full state serialization archiving and recovery functions are realized. The application considers teaching controllability and training evaluability by means of structured prompt word constraints and process log records, so that learners can obtain more realistic demand acquisition dialogue training experience in a simulation environment, and effectively improve communication ability and problem identification ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of software engineering and educational informatization, specifically to the application of artificial intelligence human-computer interaction technology based on large language models in software engineering teaching and training. It proposes a serious game for training intelligent agents based on personality-driven and interactive dynamic design to acquire the needs of large language models. Background Technology

[0002] In software engineering education, the cultivation of requirements gathering skills has long faced the dilemma of "disconnect between theoretical teaching and engineering practice." The success of a software project highly depends on the quality of requirements work, and requirements gathering, as the starting point of requirements engineering, directly affects the success or failure of subsequent development activities. However, traditional requirements engineering teaching mainly relies on classroom lectures and textbook cases, leaving students with few opportunities to repeatedly practice communication and negotiation in dynamic, highly realistic scenarios. Serious games, as a simulation teaching tool, have been gradually introduced into software engineering education in recent years. These games simulate real project scenarios, allowing students to interact with virtual characters in a virtual environment, thereby gaining practical experience in requirements gathering. However, existing serious games generally suffer from rigid interaction modes and fixed character behaviors in their technical implementation. Although attempts have been made to introduce large language models, these solutions focus on having students identify errors in AI-generated content rather than simulating open dialogues between real clients and requirements analysts.

[0003] The fundamental reason why the above-mentioned solutions fail to meet the actual needs of demand engineering teaching lies in the highly dynamic and unpredictable nature of human communication. In real-world demand acquisition scenarios, customers' demands are often incomplete, inconsistent, or even contradictory. Their emotions, attitudes, and willingness to cooperate change continuously as the conversation progresses. Demand analysts need to flexibly adjust their questioning strategies in open-ended dialogues to identify, clarify, and extract effective demands from customers' impromptu expressions. This cognitive process based on dynamic interaction is difficult to simulate using existing solutions based on preset branches or state machines. Furthermore, existing solutions generally lack the ability to model the emotions and attitudes of different roles, making it difficult to realistically reproduce phenomena such as avoidance, resistance, or demand changes caused by fluctuations in customer emotions during the demand acquisition process.

[0004] To address the aforementioned issues, this invention proposes a serious game for training intelligent agents to acquire needs based on personality-driven and interactive dynamic design using a large language model. This serious game centers on intelligent dialogue technology driven by a large language model, systematically modeling virtual NPCs by constructing a structured character personality modeling system. Furthermore, the system introduces a dynamic emotion update mechanism in each round of dialogue, allowing the NPC's emotional state to dynamically shift as the dialogue progresses, thereby influencing their responses and willingness to cooperate. Through these technical means, this invention aims to simulate more realistic needs-acquiring dialogue scenarios, enabling learners to improve their communication and problem-identification abilities through repeated practice. Summary of the Invention

[0005] To address the problems in existing requirement engineering teaching simulation systems based on finite state machines or branching scripts, such as NPC responses being limited by preset paths, difficulty in supporting free follow-up questions, difficulty in dynamically changing NPC cooperation and requirement disclosure with interaction, and the tendency for open-ended dialogues based on large language models to deviate from the teaching scenario and role settings, this invention provides a serious game for training requirement elicitation using a large language model intelligent agent based on personality-driven and interactive dynamic design. This game is suitable for open-ended dialogue training in the software requirement elicitation stage. The method uses large language model-driven intelligent dialogue technology as its core, constructing a virtual customer role with dynamic emotional response capabilities. Learners then engage in open-ended requirement elicitation dialogue training in a simulation environment. By simulating the impact of changes in customer attitude on the communication process during real requirement elicitation through emotional state transfer, the method enhances learners' communication and problem identification abilities in the requirement elicitation stage.

[0006] The technical solution adopted in this invention is a method for training a large language model intelligent agent based on personality-driven and interactive dynamic design to acquire needs, comprising the following steps:

[0007] Step (1) Construct a hierarchical simulation system architecture:

[0008] A client-side game engine is used to build a requirement acquisition training simulation environment. The overall architecture is divided into a presentation layer, a session layer, and a data layer from top to bottom. The presentation layer is responsible for scene rendering and user interface interaction, the session layer is responsible for intelligent NPC dialogue, requirement management, and training process control, and the data layer is responsible for session state persistence. Each layer communicates with the manager module through an event mechanism.

[0009] Step (2) Implement intelligent NPC dialogue and emotion updates based on OCEAN personality and PAD emotion space:

[0010] Step (2.1) Establish a two-layer psychological model and state object for NPCs: Maintain a state object for each NPC that includes basic attributes, emotional state, interaction history and disclosure willingness; among them, the personality layer uses the OCEAN model to characterize the stable personality parameters of the NPC in the conversation, which is used to generate system prompt words and determine the PAD emotional baseline and emotional increment sensitivity; the emotion layer uses the PAD three-dimensional emotion space to represent the current continuous emotional state of the NPC and map it to the observable interactive emotional state;

[0011] Step (2.2) Perform OCC→PAD emotion update and disclosure willingness calculation before each round of dialogue: After the player submits input in each round and before the NPC responds, the system performs the following processing: First, according to the decay rate determined by the OCEAN personality traits, the current PAD vector is slightly regressed to the personality baseline; then, the player input, the NPC's OCEAN parameters, role goals, communication norms, and dialogue context are submitted to the large language model, and the PAD increment is output based on the OCC cognitive evaluation framework; then, the increment is corrected for personality sensitivity according to the OCEAN dimensions, superimposed on the current PAD and clipped to the effective range, and the new interactive emotional state is determined based on the updated PAD; finally, the NPC's willingness to disclose needs is calculated.

[0012] Step (2.3) Constructing structured prompts and generating dynamic responses: Construct system prompts based on the four-layer structured modeling of each NPC. The four-layer modeling includes character settings, background story, OCEAN five-dimensional personality parameters and emotion / interaction state configuration. After injecting the current PAD coordinates, interactive emotional state and disclosure constraints into the prompts, the large language model is called in combination with the player input and the history of the most recent N rounds of dialogue to generate dynamic responses consistent with the character settings and current state.

[0013] Step (3) Implement requirements management and training process recording:

[0014] The system maintains a global requirement record in the simulation session, supports the addition, editing, and deletion of requirement items, and associates each requirement with the corresponding NPC. The requirement management interface provides a list of NPCs that have been talked to and a function to view the dialogue history. The system also exports the dialogue record, requirement items, NPC PAD change trajectory, interaction state transition record, and timestamped operation log as structured text.

[0015] Step (4) Implement full state archiving and restoration:

[0016] The scene identifiers, NPC state objects, global dialogue history, list of requirements, and player character and location information are serialized into JSON structured data and persistently stored locally. When loading the save file, the above data is deserialized and written back to the session manager and global state object, so that the simulation training progress is restored to the save point.

[0017] Further, in step (2.2), the disclosure intention is represented by a continuous intention score obtained by weighted summation of the personality baseline item, the cumulative PAD status item, and the current round of OCC evaluation item, expressed as:

[0018]

[0019] In the formula, This represents the baseline contribution to personality determined by the OCEAN personality parameters. This represents the cumulative contribution of PAD states. This indicates the contribution to the OCC evaluation in this round. The weighting coefficients are used; each item is normalized before summation; whether a demand item is disclosed is determined by whether the product of the interaction state gating function g(s) and the willingness score w reaches a preset threshold τ. That is, when g(s)·w≥τ, demand item disclosure is allowed, thus demand disclosure depends on the accumulated interaction state in the session.

[0020] Furthermore, in step (2.2), the PAD state update rule is expressed as follows:

[0021]

[0022] Where s(t) and s(t-1) are the three-dimensional state vectors of PAD in the current round and the previous round, respectively; θ is the OCEAN personality parameter; Decay(s(t-1),θ) represents the regression of PAD to the personality baseline s~base~(θ) with a decay rate λ(θ); Δp~t~ is the PAD increment vector after OCC evaluation and OCEAN correction; Clip(·) represents clipping each dimension to the effective value range.

[0023] Furthermore, in step (2.3), if the player is talking to the NPC for the first time, the system will first generate an observation description based on the NPC's settings and the current PAD mapping interaction state, and then enter the normal dialogue process.

[0024] Furthermore, in step (1), the core module of the system includes:

[0025] An intelligent NPC module based on large language model-driven dialogue generation;

[0026] A requirements management module that supports requirements item management and log export;

[0027] An archive module that enables full-state serialization storage and recovery;

[0028] A user interface module that unifies the management of the interface lifecycle;

[0029] The scene and character performance module provides an entry point for exploring scenes and interacting with characters.

[0030] Furthermore, in step (2.3), the four-layer structured modeling of the system prompts is organized in JSON or hierarchical text form and the current PAD coordinates, interactive emotional state and disclosure constraints are injected; the OCEAN personality parameters remain unchanged in a single training session, and the PAD and interactive state are updated before each round of dialogue before the prompts are injected.

[0031] Furthermore, in step (3), the first layer of the demand management interface displays a list of NPCs that have been talked to. After selecting an NPC, the second layer interface is entered, where the complete dialogue history with the NPC can be viewed, and the relevant demands of the NPC can be added, deleted, or modified to realize the traceability of the demand source and context.

[0032] Furthermore, in step (4), the save interface lists existing save entries. Each summary includes at least the character's nickname, the number of NPCs who have been talked to, the number of recorded requests, the game duration, and the save time. The learner selects any entry to load and continue training.

[0033] Furthermore, in step (2.1), the dimensions of the OCEAN personality model are quantified within the range of 0 to 10, including five dimensions: openness, conscientiousness, extraversion, agreeableness, and neuroticism; the values ​​of each dimension of the PAD three-dimensional emotional space are in the range of [-1,1], including three dimensions: pleasure, arousal, and dominance.

[0034] A serious game for training demand acquisition of intelligent agents based on personality-driven and interactive dynamic design of large language models is implemented using the method described above. The serious game takes intelligent dialogue technology driven by large language models as its core, systematically models virtual NPCs by constructing a structured character personality modeling system, and introduces an emotion dynamic update mechanism in each round of dialogue, so that the emotional state of the NPCs dynamically changes with the progress of the dialogue, thereby affecting their response content and willingness to cooperate, so as to simulate demand acquisition dialogue scenarios for learners to train. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the overall architecture of the present invention.

[0036] Figure 2 This is a flowchart of the dialogue processing of the present invention.

[0037] Figure 3 This is a schematic diagram of the NPC psychological modeling and disclosure willingness determination principle of the present invention.

[0038] Figure 4 This is the demand management panel of the present invention.

[0039] Figure 5 This is the dialog panel interface of the present invention. Detailed Implementation

[0040] A brief overview of the invention is given below to provide a basic understanding of certain aspects of it. It should be understood that this overview is not an exhaustive summary of the invention. It is not intended to identify key or essential parts of the invention, nor is it intended to limit the scope of the invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to the more detailed description that follows.

[0041] This invention includes the following steps:

[0042] Step (1) Construct a hierarchical simulation system architecture:

[0043] A client-side game engine is used to build a requirement acquisition training simulation environment. The overall architecture is divided into a presentation layer, a session layer, and a data layer from top to bottom. The presentation layer is responsible for scene rendering and user interface interaction, the session layer is responsible for intelligent NPC dialogue, requirement management and training process control, and the data layer is responsible for session state persistence. Each layer communicates with the manager module through an event mechanism.

[0044] The core modules of the system include: an intelligent NPC module that drives dialogue generation based on a large language model; a requirement management module that supports requirement item management and log export; an archive module that realizes full-state serialization storage and recovery; a user interface module that unifies the management of the interface lifecycle; and a scene and character performance module that provides explorable scene and character interaction entry points.

[0045] Step (2) Implement intelligent NPC dialogue and emotion updates based on OCEAN personality and PAD emotion space:

[0046] This step can be broken down into the following three sub-steps:

[0047] Step (2.1) Establishing a two-layer psychological model and state object for the NPC:

[0048] For each NPC, a state object is maintained, including basic attributes, emotional state, interaction history, and disclosure willingness. Among them, the personality layer uses the OCEAN model to characterize the stable personality parameters of the NPC within the conversation, which are used to generate system prompt words and determine the PAD emotional baseline and emotional increment sensitivity. The emotion layer uses the PAD three-dimensional emotion space to represent the NPC's current continuous emotional state and maps it to observable interactive emotional states.

[0049] Step (2.2) Perform OCC→PAD sentiment update and disclosure willingness calculation before each round of dialogue:

[0050] After each player submits input, before generating a response from the NPC for that round, the system performs the following processing: First, based on the decay rate determined by the OCEAN personality traits, the current PAD vector is slightly regressed towards the personality baseline; then, the player input, the NPC's OCEAN parameters, role goals, communication norms, and dialogue context are submitted to the large language model, and then the PAD increment is output based on the OCC cognitive evaluation framework; next, the increment is corrected for personality sensitivity according to the OCEAN dimensions, superimposed on the current PAD and clipped to the effective range, and a new interactive emotional state is determined based on the updated PAD; finally, the NPC's willingness to disclose needs is calculated.

[0051] The willingness to disclose is represented by a continuous willingness score obtained by weighted summation of the personality baseline item, the cumulative PAD status item, and the current round of OCC evaluation items, which can be expressed as:

[0052]

[0053] In the formula, This represents the baseline contribution to personality determined by the OCEAN personality parameters. This represents the cumulative contribution of PAD states. This indicates the contribution to the OCC evaluation in this round. , where is the weighting coefficient; each term is normalized before summation. Whether a demand item is disclosed is determined by whether the product of the interaction state gating function g(s) and the willingness score w reaches a preset threshold τ, thus making demand disclosure dependent on the accumulated interaction state within the session, rather than a single isolated input.

[0054] Step (2.3) Construct structured prompts and generate dynamic responses:

[0055] The system constructs prompts based on a four-layer structured model of each NPC. This four-layer model includes character settings, backstory, OCEAN five-dimensional personality parameters, and emotional / interaction state configurations. After injecting the current PAD coordinates, interactive emotional state, and disclosure constraints into the prompts, the system combines player input and the most recent N rounds of dialogue history to call a large language model, generating a dynamic response consistent with the character settings and current state. If the player is interacting with the NPC for the first time, the system prioritizes generating an observational description based on the NPC's settings and the current PAD's mapping interaction state before proceeding with the regular dialogue flow.

[0056] Step (3) Implement requirements management and training process recording:

[0057] The system maintains a global requirement record in the simulation session, supporting the addition, editing, and deletion of requirement items, and associating each requirement with a corresponding NPC. The requirement management interface provides a list of NPCs with whom the dialogue has taken place and a linked view of the dialogue history, making it easy for learners to trace the source and context of the requirements. The system also exports dialogue records, requirement items, NPC PAD change trajectories, interaction state transition records, and timestamped operation logs as structured text for teaching analysis and feedback.

[0058] Step (4) Implement full state archiving and restoration:

[0059] The scene identifiers, NPC state objects (including OCEAN personality parameters, current PAD coordinates, interactive emotional state, emotional intensity, and interaction history), global dialogue history, list of requirement items, and player character and location information are serialized into JSON structured data and persistently stored locally. When loading the save file, the above data is deserialized and written back to the session manager and global state objects, so that the simulation training progress is restored to the save point, supporting learners to complete the requirement acquisition training task in stages.

[0060] Through the above steps, this invention maintains the openness of the large language model dialogue, supports NPC behavior consistency with OCEAN stable personality and PAD continuous emotional state, supports interactive dynamism with OCC-driven emotion update and disclosure willingness mechanism, and balances teaching controllability and training assessability through structured cue word constraints and process log recording.

[0061] Example

[0062] The overall architecture for training serious games using a large language model agent based on personality-driven and interactive dynamic design is as follows: Figure 1 As shown. It can be seen that the method of the present invention can be divided into four main parts: step (1) constructing a hierarchical simulation system architecture, step (2) realizing intelligent NPC dialogue and emotion update based on OCEAN personality and PAD emotion space, step (3) realizing demand management and training process recording, and step (4) realizing full state archiving and recovery.

[0063] Step (1) Constructing a hierarchical simulation system architecture

[0064] This patent uses the Unity game engine as the client development environment. The overall architecture is divided into a top-down structure: a presentation layer, a session layer, and a data layer. The presentation layer is responsible for 2D scene rendering, user interface display, and interactive control responses; the session layer is responsible for intelligent NPC dialogue generation, emotion state updates, requirement item management, and training process control; and the data layer is responsible for persistent reading and writing of session state, dialogue history, and archived data. The layers communicate with each other through an event mechanism and a singleton manager module to reduce coupling between modules.

[0065] like Figure 1 As shown, the core modules of the system include:

[0066] (1) Intelligent NPC module: Based on the large language model to drive NPC dialogue generation; the OCEAN model is used to characterize the stable personality parameters of NPCs in the conversation, the PAD model is used to maintain the dynamic emotional state of NPCs, and the emotional update is realized in each round through the LLM-driven OCC→PAD transfer mechanism.

[0067] (2) Requirements Management Module: Supports adding, editing, deleting requirements items and exporting process logs.

[0068] (3) Archive module: realizes the serialization storage and retrieval of core state data during training.

[0069] (4) User interface module: Unified management of the lifecycle and interaction logic of each functional window.

[0070] (5) Scene and Role Performance Module: Provides an explorable two-dimensional simulation scene and NPC interaction entry point, providing a space for demand acquisition dialogue training.

[0071] Step (2) Implement intelligent NPC dialogue and emotion update based on OCEAN personality and PAD emotion space.

[0072] This step is the core of the invention, and its implementation process is as follows: Figure 2 and Figure 3 As shown, this invention employs a two-layer structure for NPC psychological modeling: the personality layer uses the OCEAN model to characterize the stable personality of the NPC; the emotion layer uses the PAD three-dimensional emotion space to represent the current continuous emotional state of the NPC, and drives PAD updates and demand disclosure determination through OCC cognitive evaluation.

[0073] This step can be broken down into the following sub-steps.

[0074] Step (2.1) Establish NPC two-layer psychological model and state object

[0075] Each NPC maintains a state object in the system, which contains at least the following information: basic attributes, NPC identifier, scene, and preset character personality parameters based on the OCEAN five-factor model; emotional state, current PAD coordinates, emotional intensity, and name of the interactive emotional state; interaction history, the historical dialogue records between the NPC and the learner, as part of the context of the large language model; and disclosure willingness, the NPC's tendency to disclose required information, which is jointly determined by the current PAD state, OCEAN parameters, the increment of the current OCC evaluation, and the interactive emotional state.

[0076] The meanings of each dimension of the OCEAN personality model are shown in Table 1. Each dimension can be quantified and configured within the range of 0 to 10, and remains unchanged within a single training session.

[0077] Table 1. Explanation of the dimensions of the OCEAN Five Factor Personality Model

[0078] O (Openness) Reflects the NPC's receptiveness to new viewpoints and information. C (Due Diligence) Reflects the degree to which NPCs adhere to rules, plans, and responsibilities. E (Extraversion) Reflecting the initiative and expressive tendencies of NPCs in social interactions A (Agreeableness) Reflects the cooperative and collaborative tendencies of NPCs in communication. N (neuroticism) It reflects the NPC's sensitivity to negative stimuli and their tendency to experience emotional fluctuations.

[0079] The meanings of each dimension of the PAD three-dimensional emotion space are shown in Table 2. In one embodiment, the values ​​of each dimension, P, A, and D, are in the range of [-1, 1], which are used to represent the current continuous emotional state of the NPC.

[0080] Table 2. Explanation of the Dimensions of the PAD Three-Dimensional Emotional Space

[0081] P (pleasure level) Indicates the current positive or negative emotional tendencies of the NPC. A (Wakefulness) Indicates the current activation or tension level of the NPC. D (Dominance) This indicates the degree of control or dominance that NPCs perceive during dialogue.

[0082] The OCEAN parameter is used to determine the PAD emotional baseline, emotional decay rate, and personality sensitivity correction coefficient of OCC increment for each NPC, thereby ensuring that different NPCs produce differentiated emotional responses to the same stimuli.

[0083] Step (2.2) Perform OCC→PAD emotion update and disclosure willingness calculation before each round of dialogue.

[0084] like Figure 2 As shown, when a learner triggers a dialogue with an NPC and submits text input, the system performs the following processes sequentially before generating a response from the NPC in this round:

[0085] (1) PAD decay regression. The emotion engine uses the decay rate determined by the OCEAN personality traits to make the NPC's current PAD vector slightly regress to the NPC's personality baseline, thus obtaining the decayed previous PAD state.

[0086] (2) OCC Cognitive Evaluation. The system submits the learner's current input, the NPC's OCEAN parameters, role goals, communication norms, sensitive topic configurations, and the context of the most recent rounds of dialogue to the large language model. The model then outputs the PAD increments ΔP, ΔA, and ΔD for this round based on the OCC cognitive evaluation framework. These increments are returned in the form of structured data (such as JSON).

[0087] (3) Personality sensitivity correction. The system corrects the PAD increment in this round based on the dimensions of neuroticism, agreeableness, and conscientiousness in OCEAN.

[0088] (4) PAD state update. The corrected PAD increment is superimposed onto the decayed PAD state, and the result is clipped to the valid value range to obtain the updated PAD state s(t). The update rule can be expressed as:

[0089]

[0090] Where s(t) and s(t-1) are the PAD three-dimensional state vectors of the current round and the previous round, respectively; θ is the OCEAN personality parameter; Decay(s(t-1), θ) represents the PAD's shift towards the personality baseline. Regression based on the decay rate λ(θ); Δp t This is the PAD increment vector after evaluation by OCC and correction by OCEAN; Clip(·) indicates that each dimension is clipped to [-1, 1].

[0091] (5) Interactive emotional state mapping. Based on the updated PAD coordinates, determine the current interactive emotional state of the NPC in the preset PAD state anchor point or interactive state machine, and generate the corresponding tone or behavioral constraints.

[0092] (6) Calculation of willingness to disclose. For example... Figure 3 As shown, the system further calculates the NPC's willingness to disclose needs score w, which can be expressed as:

[0093]

[0094] In the formula, This represents the baseline personality contribution determined by the OCEAN personality parameters. This represents the cumulative contribution of PAD status. This indicates the contribution items in this round of OCC evaluation. These are the weighting coefficients; each term is normalized before summation.

[0095] Whether a demand item is disclosed is determined by whether the product of the interaction state gating function g(s) and the willingness score w reaches a preset threshold τ. That is, when g(s)·w ≥ τ, the disclosure of the corresponding demand item from the NPC demand pool is allowed; otherwise, the system adds constraints to the prompt to restrict or refuse to start a demand discussion. Thus, demand disclosure depends on the accumulated interaction state within the session, rather than a single isolated input.

[0096] When the interactive emotional state is in a low cooperation state such as resistance or being disturbed, g(s) approaches zero. Even if the OCC evaluation is high in this round, it is difficult to trigger the disclosure of needs on its own, thus ensuring that the training process guides continuous and good communication.

[0097] Step (2.3) Construct structured prompts and generate dynamic responses

[0098] After the PAD and interaction state are updated, the system constructs a large language model system prompts based on the structured modeling of each NPC. The structured modeling includes at least the following four levels:

[0099] (1) Character settings: including character name, job title, scope of responsibilities and professional knowledge background, etc., used to limit the NPC's right to speak and information boundaries in the dialogue;

[0100] (2) Background story: including the character's experience, professional background, current position and potential motivations, etc., to support the narrative consistency of the NPC's responses;

[0101] (3) OCEAN five-dimensional personality parameters: quantitatively define the personality differences of each NPC, which affect their language style, information disclosure tendency and emotional sensitivity;

[0102] (4) Emotion and interaction state configuration: including PAD state anchors, interaction state machines and tone or behavior constraints in different states; dynamic migration is determined by OCC→PAD increment, state anchor mapping and state machine triggers, while OCEAN only affects PAD baseline, decay rate and increment sensitivity.

[0103] The aforementioned four layers of modeling information are organized in system prompts in JSON or hierarchical text format. The system prompts also include the current PAD coordinates, interactive emotional state, and disclosure constraints, as well as project background knowledge and response format requirements (e.g., not providing all requirements at once, only outputting character dialogue, limiting response length, etc.). User messages include the learner's current input and the history of the last N rounds of dialogue (N is a configurable system parameter).

[0104] It should be noted that before generating the NPC response in this round, the system had already completed the PAD emotion update based on the learner's current input; therefore, the OCEAN description in the system prompts, along with the PAD and the interaction state injection, all reflect the emotional state that had been updated before generating this round of responses.

[0105] Initial dialogue observation description. If a learner is having their first dialogue with an NPC, the system will first generate an observation description based on the NPC's settings and the current PAD mapping interaction state to help the learner understand the NPC's current attitude before proceeding to a regular multi-turn dialogue.

[0106] Response generation and presentation. The system sends the constructed prompts to the DeepSeekAPI (Deep Language Model Service) and presents the model-generated response text in the dialog interface. For example... Figure 5 As shown, the dialogue panel includes NPC name / avatar, dialogue history display area, learner text input box, send control, and observation description area for the first dialogue.

[0107] Step (2.4) NPC Status Synchronization

[0108] After the PAD and interaction state are updated in each round of dialogue, the system synchronizes the NPC state object to the global state manager for subsequent archiving and log export.

[0109] Step (3) Implement requirements management and training process recording

[0110] like Figure 4 As shown, learners can record identified requirement items through the requirement management panel during or after dialogues with NPCs. The specific implementation of this module includes:

[0111] (1) Global requirement record. Maintain a requirement list during the game session lifecycle. Each requirement must include at least the content text and the associated NPC identifier.

[0112] (2) Add, delete and modify operations. The requirements panel provides add, delete and edit functions: learners can create blank requirements items, delete unreasonable items, or click on existing items to modify their content.

[0113] (3) Historical dialogue linkage. For example, Figure 4 As shown, the first layer of the requirements management panel displays a list of NPCs with whom you have already had conversations; after selecting an NPC, you will enter the second layer of the interface, where you can view the complete conversation history with that NPC and add, delete, or modify the requirements related to that NPC, making it easy to trace the source and context of the requirements.

[0114] (4) Log export. After the log export is triggered, the system will combine the local dialogue records, the list of requirements, the PAD change trajectory of NPCs, the interaction state transition records (including PAD values ​​and interaction state names before and after state switching), and the operation log with timestamps into a structured text file for teachers to conduct learning path analysis and teaching feedback.

[0115] Step (4) Implement full-state archiving and restoration

[0116] The save screen lists existing save entries. Each entry summary includes at least the character's nickname, the number of NPCs interacted with, the number of recorded requests, the game duration, and the save time. Learners can select any entry to load and continue training.

[0117] When loading the archive, the system deserializes the data and writes it back to the session manager and global state object, restoring the simulation training progress to the archived time and supporting learners to complete the required training tasks in stages.

[0118] Step (5) Scene and Character Performance

[0119] In one embodiment, the system uses the Unity engine to construct a two-dimensional tilemap scene, and the learner controls the character to move in the scene via the keyboard; when the character approaches an interactive NPC, a dialogue prompt is displayed, and after the learner confirms, the dialogue process described in step (2) is entered. The appearance and basic animation of the NPC and the learner character are driven by Unity animation components to enhance the immersive experience of the scene. This module provides a spatial interaction entry point for the requirement acquisition simulation, and the core training logic is implemented by the intelligent NPC module and the requirement management module in the conversation layer.

[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design, characterized in that, Includes the following steps: Step (1) Construct a hierarchical simulation system architecture: A client-side game engine is used to build a requirement acquisition training simulation environment. The overall architecture is divided into a presentation layer, a session layer, and a data layer from top to bottom. The presentation layer is responsible for scene rendering and user interface interaction, the session layer is responsible for intelligent NPC dialogue, requirement management, and training process control, and the data layer is responsible for session state persistence. Each layer communicates with the manager module through an event mechanism. Step (2) Implement intelligent NPC dialogue and emotion updates based on OCEAN personality and PAD emotion space: Step (2.1) Establish a two-layer psychological model and state object for NPCs: Maintain a state object for each NPC that includes basic attributes, emotional state, interaction history and disclosure willingness; among them, the personality layer uses the OCEAN model to characterize the stable personality parameters of the NPC in the conversation, which is used to generate system prompt words and determine the PAD emotional baseline and emotional increment sensitivity; the emotion layer uses the PAD three-dimensional emotion space to represent the current continuous emotional state of the NPC and map it to the observable interactive emotional state; Step (2.2) Perform OCC→PAD emotion update and disclosure willingness calculation before each round of dialogue: After the player submits input in each round and before the NPC responds, the system performs the following processing: First, according to the decay rate determined by the OCEAN personality traits, the current PAD vector is slightly regressed to the personality baseline; then, the player input, the NPC's OCEAN parameters, role goals, communication norms, and dialogue context are submitted to the large language model, and the PAD increment is output based on the OCC cognitive evaluation framework; then, the increment is corrected for personality sensitivity according to the OCEAN dimensions, superimposed on the current PAD and clipped to the effective range, and the new interactive emotional state is determined based on the updated PAD; finally, the NPC's willingness to disclose needs is calculated. Step (2.3) Constructing structured prompts and generating dynamic responses: Construct system prompts based on the four-layer structured modeling of each NPC. The four-layer modeling includes character settings, background story, OCEAN five-dimensional personality parameters and emotion / interaction state configuration. After injecting the current PAD coordinates, interactive emotional state and disclosure constraints into the prompts, the large language model is called in combination with the player input and the history of the most recent N rounds of dialogue to generate dynamic responses consistent with the character settings and current state. Step (3) Implement requirements management and training process recording: The system maintains a global requirement record in the simulation session, supports the addition, editing, and deletion of requirement items, and associates each requirement with the corresponding NPC. The requirement management interface provides a list of NPCs that have been talked to and a function to view the dialogue history. The system also exports the dialogue record, requirement items, NPC PAD change trajectory, interaction state transition record, and timestamped operation log as structured text. Step (4) Implement full state archiving and restoration: The scene identifiers, NPC state objects, global dialogue history, list of requirements, and player character and location information are serialized into JSON structured data and persistently stored locally. When loading the save file, the above data is deserialized and written back to the session manager and global state object, so that the simulation training progress is restored to the save point.

2. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (2.2), the disclosure intention is represented by a continuous intention score obtained by weighted summation of the personality baseline item, the cumulative PAD status item, and the current round of OCC evaluation item, expressed as: ; In the formula, This represents the baseline contribution to personality determined by the OCEAN personality parameters. This represents the cumulative contribution of PAD states. This indicates the contribution to the OCC evaluation in this round. The weighting coefficients are used; each item is normalized before summation; whether a demand item is disclosed is determined by whether the product of the interaction state gating function g(s) and the willingness score w reaches a preset threshold τ. That is, when g(s)·w≥τ, demand item disclosure is allowed, thus demand disclosure depends on the accumulated interaction state in the session.

3. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (2.2), the PAD state update rule is expressed as follows: ; Where s(t) and s(t-1) are the three-dimensional state vectors of PAD in the current round and the previous round, respectively; θ is the OCEAN personality parameter; Decay(s(t-1),θ) represents the regression of PAD to the personality baseline s~base~(θ) with a decay rate λ(θ); Δp~t~ is the PAD increment vector after OCC evaluation and OCEAN correction; Clip(·) represents clipping each dimension to the effective value range.

4. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (2.3), if the player is talking to the NPC for the first time, the system will first generate an observation description based on the NPC's settings and the current PAD mapping interaction state, and then enter the normal dialogue process.

5. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (1), the core module of the system includes: An intelligent NPC module based on large language model-driven dialogue generation; A requirements management module that supports requirements item management and log export; An archive module that enables full-state serialization storage and recovery; A user interface module that unifies the management of the interface lifecycle; The scene and character performance module provides an entry point for exploring scenes and interacting with characters.

6. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (2.3), the four-layer structured modeling of the system prompts is organized in JSON or hierarchical text form and the current PAD coordinates, interactive emotional state and disclosure constraints are injected; the OCEAN personality parameters remain unchanged in a single training session, and the PAD and interactive state are updated before each round of dialogue before the prompts are injected.

7. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (3), the first layer of the demand management interface displays a list of NPCs that have been talked to. After selecting an NPC, you can enter the second layer interface to view the complete dialogue history with that NPC and add, delete, or modify the relevant demands of that NPC, so as to realize the backtracking of the source and context of the demand.

8. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (4), the save interface lists the existing save entries. Each summary includes at least the character's nickname, the number of NPCs who have been talked to, the number of recorded requests, the game duration, and the save time. The learner selects any entry to load and continue training.

9. The method for acquiring and training the needs of a large language model intelligent agent based on personality-driven and interactive dynamic design according to claim 1, characterized in that, In step (2.1), the dimensions of the OCEAN personality model are quantified within the range of 0 to 10, including five dimensions: openness, conscientiousness, extraversion, agreeableness, and neuroticism; the values ​​of each dimension of the PAD three-dimensional emotional space are in the range of [-1,1], including three dimensions: pleasure, arousal, and dominance.

10. A serious game for training a large language model intelligent agent based on personality-driven and interactive dynamic design to acquire and process needs, characterized in that... The serious game is implemented by any one of the methods described in claims 1 to 9. The serious game takes intelligent dialogue technology driven by a large language model as its core, systematically models virtual NPCs by constructing a structured character personality modeling system, and introduces an emotion dynamic update mechanism in each round of dialogue so that the emotional state of the NPCs dynamically changes with the progress of the dialogue, thereby affecting their response content and willingness to cooperate, so as to simulate the needs to obtain dialogue scenarios for learners to train.