A role conversation switching and role growth management method and system based on entity card recognition
Patent Information
- Application Number
- CN202610751622.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0006]本发明的目的是解决现有技术中语音交互差、会话切换乱、无角色成长机制的问题,而提出的一种基于实体卡牌识别的角色会话切换与角色成长管理方法及系统
本发明通过实体卡牌身份建立对应角色会话状态,使不同实体卡牌能够分别对应独立角色上下文,减少角色切换过程中的历史会话混乱和角色错配问题。
Smart Images

Figure CN122643684A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent interactive device technology, and in particular to a method and system for role session switching and role growth management based on physical card recognition. Background Technology
[0002] Existing physical cards are usually mainly used for collection, display or simple game battles, lacking the ability to continuously interact with users and making it difficult to achieve character voice companionship, contextual memory and long-term interactive experience.
[0003] With the development of AI voice interaction technology, some smart devices are able to achieve voice acquisition and character voice response. However, existing solutions usually operate in a fixed character or single conversation mode, making it difficult to automatically establish or switch corresponding character conversations based on the connection status of different physical cards. When users frequently change physical cards, problems such as character context confusion, historical conversation mismatch, and poor continuity of voice interaction can easily occur.
[0004] While some existing card recognition solutions can obtain card identity information through NFC, image recognition, or touch recognition, most of them are only used to trigger preset audio, animation, or display content. They lack a session state management mechanism for the process of inserting and removing physical cards. Especially when the character's voice has not finished playing, if the user removes the current card and inserts a new card, the existing solutions are prone to interrupting the current voice playback or subsequent user input errors that bind to the original character's session, affecting the continuity and accuracy of the interactive experience.
[0005] In addition, existing interactive card products usually lack a character growth management mechanism based on long-term interactive behavior, making it difficult to generate differentiated character growth data based on user interaction duration, number of interactions, or task behavior, and also making it difficult to further apply to character ranking, interactive competition, or game linkage scenarios. Summary of the Invention
[0006] The purpose of this invention is to solve the problems of poor voice interaction, chaotic conversation switching, and lack of role growth mechanism in the prior art, and to propose a method and system for role conversation switching and role growth management based on physical card recognition.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for role-based session switching and role growth management based on physical card recognition, applied to an intelligent interactive device having a card connection structure, a card recognition module, a voice interaction module, and a session management module, comprising the following steps: S1: In response to the establishment of a physical connection between the physical card and the smart interactive device, the card identity information is obtained through the card recognition module; S2: Read the character configuration data based on the card identity information, establish a character session cache area, and establish or restore the character session state; S3: Collect user input information, encapsulate the user input information, the card identity information, the character configuration data and the character session state into an AI interaction request and send it to the AI model, and generate character voice based on the results returned by the AI model; S4: In response to the physical card being disconnected, the current character's session state is associated with and saved with the current card's identity information, and the current character's voice is kept playing until completion; S5: When the first physical card is disconnected and the second physical card is connected, establish or restore the second role session state according to the card identity information of the second physical card, and bind the subsequent user input information to the second role session state; S6: Collect data on user interaction with physical card characters, update character growth data based on the interaction data, and determine character interaction parameters, leaderboard ranking parameters, player PK calculation parameters, or in-game character attribute parameters based on the character growth data.
[0008] This invention also provides a character session switching and character growth management system based on physical card recognition, including: The card identity acquisition module is used to acquire the card identity information corresponding to the physical card when a physical connection is established between the physical card and the smart interactive device; The character session management module is used to establish a corresponding character session cache area based on the card identity information, and to establish or restore the corresponding character session state; The AI interaction module is used to generate AI interaction requests based on user input information, character configuration data, and character conversation status, and to generate character voice based on the results returned by the AI model. The session switching control module is used to keep the current character's voice playing after the physical card is disconnected, and to establish or restore the corresponding character's session state when a new physical card is connected; The task scheduling module is used to independently schedule character voice playback tasks and character conversation switching tasks; The lighting feedback module is used to output corresponding lighting effects when physical cards are detected to be connected or disconnected, or when character voices are played. The character growth management module is used to update character growth data based on user interaction behavior data, and to determine character interaction parameters, leaderboard ranking parameters, player PK calculation parameters, or in-game character attribute parameters based on the character growth data.
[0009] The beneficial effects of the technical solution provided by this invention include at least the following: This invention establishes corresponding role conversation states through physical card identities, enabling different physical cards to correspond to independent role contexts, reducing historical conversation confusion and role mismatch issues during role switching.
[0010] This invention continues to play the current character's voice even after the physical card is removed, ensuring that the character's voice is not immediately interrupted by the card removal operation, thus improving the continuity and integrity of the character's interaction process.
[0011] This invention establishes a corresponding new character session state after a new physical card is connected, and binds subsequent user input to the new character session, thereby achieving accurate switching of character sessions during the rapid switching process of physical cards.
[0012] This invention can also update character growth data based on user interaction behavior and use the character growth data for character ranking, interactive competition parameter calculation, or in-game character attribute linkage, thereby improving the interactivity, fun, and user stickiness of physical cards. Attached Figure Description
[0013] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a flowchart of a method for role session switching and role growth management based on physical card recognition provided in an embodiment of the present invention; Figure 2 This is a structural block diagram of the role session switching and role growth management system provided in an embodiment of the present invention. Detailed Implementation
[0015] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a role-based session switching and role-based growth management method and system based on physical card recognition proposed in accordance with the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0016] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0017] The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0018] The following description, in conjunction with the accompanying drawings, details the specific solution of the method and system for role session switching and role growth management based on physical card recognition provided by the present invention. The present invention aims to: accurately establish, save, and restore the role session state during the insertion, removal, and replacement of physical cards, enable unfinished role voice messages to continue playing, accurately bind new inputs to the role session corresponding to the newly connected card, and update role growth data based on user interaction behavior.
[0019] Please see Figures 1 to 2 This invention illustrates a method for role-based session switching and role growth management based on physical card recognition, applicable to an intelligent interactive device having a card connection structure, a card recognition module, a voice interaction module, and a session management module. The method includes the following steps: S1: In response to the establishment of a physical connection between the physical card and the smart interactive device, the card identity information is obtained through the card recognition module.
[0020] In step S1, the card identity information is obtained by the card recognition module through NFC recognition, image recognition, touch recognition, voice recognition, or based on the mapping relationship between preset card identifiers and role IDs.
[0021] Specifically, physical cards refer to card carriers that can be used with smart interactive devices. These can be paper cards, plastic cards, card tray cards, cards with built-in NFC tags, cards with QR codes or graphic logos, or cards with conductive pads, coded resistors, or contact coding areas.
[0022] Intelligent interactive devices refer to electronic devices that can recognize physical cards and perform voice interaction. They may include intelligent card heads, main control boards, card connection structures, card recognition modules, voice interaction modules, session management modules, storage modules, communication modules, and light feedback modules.
[0023] The card connection structure is used to form a physical connection between a physical card and a smart interactive device. The physical connection includes insertion, snap-fitting, clamping, adsorption, sliding, bonding, or contact.
[0024] Card identity information is used to distinguish different physical cards. It can be card ID, NFC tag number, QR code code, image recognition result, touch point code value, role ID, or backend binding number.
[0025] It is worth noting that after the physical card establishes a physical connection with the smart interactive device, a card connection event can be generated by a detection switch, Hall element, contact conduction status, or card slot positioning signal set at the card connection structure. After the card connection event is generated, the card recognition module then executes the card identity information acquisition process. Thus, the system does not continuously and randomly recognize cards, but rather the identity recognition is triggered by the card insertion action. Different recognition methods can be used individually or in combination. For example, when NFC reading fails, further recognition can be performed through image recognition or background binding relationship; when the contact recognition result is inconsistent with the background binding relationship, the system can prompt the user to reinsert the card or rebind it.
[0026] In one specific implementation, the user inserts the first physical card into the smart interactive device along the slot. The detection switch in the slot is pressed, and the smart interactive device generates a first card connection event. Subsequently, the card recognition module reads the NFC tag in the first physical card to obtain the first card's identity information, Card-A. The smart interactive device writes Card-A into the currently connected card field and sends a "Card-A connected" event notification to the session management module. If the physical card does not have an NFC tag, the card recognition module can obtain the role ID corresponding to Card-A by photographing the card's QR code, reading the contact code, or querying the mapping relationship between preset card identifiers and role IDs.
[0027] When executing step S1, the system can execute the following steps in sequence: detecting connection events, reading card identity information, verifying identity information, and generating the current card record. If no valid card identity information is read within a preset time, the system can output a recognition failure indicator light effect or sound and keep the current character session state unchanged. If the card identity information is successfully obtained, the card identity information will be used as the index basis for subsequent character session state establishment, AI interaction request generation, and character growth data update.
[0028] S2: Read character configuration data based on card identity information, establish a character session cache, and establish or restore character session state.
[0029] In step S2, the character configuration data includes character identifier, character setting parameters, prompt word parameters, voice parameters, lighting effect configuration parameters, initial attribute data or conversation memory index; Character conversation status includes historical interaction content, context summary, conversation round, character emotional state, character growth status, or incomplete voice playback status.
[0030] In step S2, independent character session caches are established based on the identity information of different cards; Save the corresponding character's session context when the physical card is disconnected; Restore the corresponding character's session context when the corresponding physical card is reconnected.
[0031] Specifically, character configuration data is the basic data of the character corresponding to the physical card, used to determine how the character performs in AI interaction, voice playback, lighting effect feedback, and growth management.
[0032] The character identifier is used to identify a specific character; the character profile parameters are used to define the character's personality, background, speaking style, and interaction boundaries; the prompt word parameters are used to generate character prompts in AI interaction requests; the voice parameters are used to generate or select the corresponding character's voice; the lighting effect configuration parameters are used to determine the lighting effect when connecting, disconnecting, or playing voice messages; the initial attribute data is used to determine the initial state of the character's level, intimacy, energy value, health value, skill value, or overall combat power value; and the conversation memory index is used to find the character's historical dialogues, context summaries, or long-term memories.
[0033] The character conversation cache is a data storage area corresponding to the card's identity information or character ID, used to store the conversation data of the physical card character. The character conversation cache can store historical interaction content, recent rounds of dialogue, context summary, conversation round, recent interaction time, character emotional state, character growth status, and incomplete voice playback status. Different physical cards can correspond to different character conversation caches to avoid the mixing of contexts between multiple cards.
[0034] It is worth noting that the character session cache can be established locally on the smart interactive device, on the backend server, or through local caching and cloud synchronization. For physical cards connected for the first time, the system can create a new character session cache and write the initial attribute data in the character configuration data. For physical cards that have been connected before, the system can find the existing character session cache based on the card's identity information and restore the historical interaction content, context summary, and character growth status. If the same character is used by different users, the system can determine the cache based on the user account, card identity information, and character ID to avoid data confusion between different users.
[0035] In one specific implementation, when the first physical card Card-A is inserted for the first time, the system reads the character configuration data based on Card-A, including the character name "Star Spirit", voice parameter Voice-A, initial intimacy level of 10, initial energy value of 50, and session memory index Memory-A. The session management module creates a first character session cache, Session-A, for Card-A and writes the above initial data into Session-A. When the user removes Card-A, the system saves the historical interaction content, context summary, session rounds, and character growth status in Session-A. The next time the user inserts Card-A, the system does not create a new session, but instead reads Session-A and restores the first character session state.
[0036] When executing step S2, the system can first determine whether there is a character session cache corresponding to the current card identity information; if not, a new character session cache is created and the character configuration data is written to the cache; if it exists, the system reads the historical interaction content and context summary in the cache and restores the current character session state according to the most recent interaction time, session round and character growth status; in order to avoid the AI request being too long, the system can only retain the most recent few rounds of complete dialogue and compress the earlier historical interaction content into a context summary.
[0037] S3: Collect user input information, encapsulate user input information, card identity information, character configuration data and character conversation state into AI interaction requests and send them to the AI model, and generate character voice based on the results returned by the AI model.
[0038] In step S3, a corresponding context summary is generated based on the current role's session state, and the context summary and user input information are encapsulated together into an AI interaction request.
[0039] Specifically, user input information can be user voice information, voice-recognized text, key input, mini-program input, or task selection instructions.
[0040] The voice interaction module can capture user voice through a microphone and obtain user voice text through local or cloud-based voice recognition.
[0041] AI interaction requests are data packets sent to the AI model. They include at least user input information and may further include card identity information, character configuration data, character session state, context summary, character prompts, user account identifiers, and security filtering parameters.
[0042] The results returned by the AI model may include response text, response voice, voice synthesis parameters, or character response control information.
[0043] Character voice is the voice content generated or called based on the results returned by the AI model and the current character's timbre parameters.
[0044] It is worth noting that the AI interaction request is not simply sending user input to the AI model, but rather binding the user input to the character's conversation state corresponding to the current physical card before sending it. In this way, the response content generated by the AI model can be consistent with the character's personality, historical dialogues, and growth status. If the historical interaction content in the current character's conversation state is long, the system can generate a context summary and encapsulate the context summary and user input information together into an AI interaction request to reduce the request length and retain key conversation information.
[0045] In one specific implementation, after the user inserts the first physical card, Card-A, and says "Chat with me for a while today," the voice interaction module collects the voice and recognizes it as text. The session management module reads the first character configuration data corresponding to Card-A and the context summary in Session-A, such as "The user has interacted with the Celestial Spirit for the past three consecutive days, the current intimacy level is 18, and the recent topic is academic pressure." Subsequently, the AI interaction module encapsulates the user's voice text, Card-A, character settings parameters, voice parameters, and context summary into an AI interaction request and sends it to the AI model. After the AI model returns a response text, the system generates the first character's voice based on Voice-A and adds it to the voice playback task queue.
[0046] When performing step S3, the system can determine the identity information of the currently activated card before generating the AI interaction request. Only the character session state corresponding to the identity information of the currently activated card will be used to encapsulate the AI interaction request. After the AI model returns the result, the system can perform security filtering, length control and character consistency verification on the reply content, and then generate the character voice. The generated character voice is marked with the corresponding card identity information, character session cache area identifier and playback task identifier, so that the voice can still be identified as belonging to which character during the subsequent insertion and removal process.
[0047] S4: In response to the physical card being disconnected, the current character's session state is associated with and saved with the current card's identity information, and the current character's voice is kept playing until completion.
[0048] Specifically, physical card disconnection refers to the physical card being pulled out of the card connection structure of the smart interactive device, detached from the buckle, released from magnetic attraction, leaving the NFC reading area, or having its contacts disconnected or detection switch reset.
[0049] The current character's session state is the session state corresponding to this entity card at the time the disconnection event occurred.
[0050] Associated saving refers to writing the current character's session state into the character session cache area corresponding to the current card's identity information.
[0051] The current character voice refers to the character voice that was generated, started playing, or entered the voice playback task queue before the disconnection event occurred.
[0052] It is worth noting that when the present invention detects that the physical card is disconnected, it does not immediately stop the current character's voice, but keeps the current character's voice playing until it is completed. At this time, the system separates the "voice playback task" and the "card connection status": even if the physical card has been disconnected, as long as the voice was generated based on the conversation state of the character corresponding to the card before the disconnection, the system still allows the voice to be played to completion. This can avoid the character's voice being suddenly interrupted by the card removal action and improve the integrity of voice interaction.
[0053] In one specific implementation, the total duration of the first character's voice corresponding to the first physical card Card-A is 8 seconds. When the voice plays for 3 seconds, the user pulls out Card-A. After the detection switch is reset, the system generates a card disconnection event. The session management module immediately associates and saves the first character's session state with Card-A, including the current session round, context summary, character growth status, and the playback task information of the first character's voice. At the same time, the voice playback module does not stop the voice, but continues to play the remaining 5 seconds until the first character's voice is played.
[0054] When performing step S4, the system can record the playback task identifier, playback progress, remaining duration, and card identity information of the current character's voice. If no character's voice is playing when the disconnection event occurs, the system only saves the character's session state. If the character's voice is playing when the disconnection event occurs, the system marks the character's voice as a "playback task to be completed" and keeps the task in the voice playback task queue to continue execution. After the voice playback is completed, the system releases the playback task but retains the corresponding character session cache so that the session can be restored when the physical card is reconnected.
[0055] S5: When the first physical card is disconnected and the second physical card is connected, establish or restore the second role's session state based on the card identity information of the second physical card, and bind subsequent user input information to the second role's session state.
[0056] In step S5, the character voice playback task and the character conversation switching task correspond to independent task queues. The character voice playback task continues to be executed according to the generation time or playback priority, and the character conversation switching task is executed according to the card identity information corresponding to the newly connected physical card.
[0057] In step S5, if new user input information is received before the voice of the character corresponding to the first physical card is played, the new user input information is bound to the second character's conversation state, and a subsequent AI interaction request is generated based on the second character's conversation state.
[0058] Specifically, the first physical card refers to the physical card that is connected when the current character's voice is generated, and the second physical card refers to the physical card that is newly connected after the first physical card is disconnected.
[0059] The second role's session state is a session state established or restored based on the card identity information of the second entity card.
[0060] Subsequent user input information refers to the user input collected after the second physical card is connected.
[0061] Binding to the second character's session state means writing the input, the corresponding AI interaction request, and the subsequent AI response to the character's session cache corresponding to the second physical card, rather than writing them to the cache corresponding to the first physical card.
[0062] The character voice playback task queue is used to manage the character voice playback tasks that have already been generated; the character session switching task queue is used to manage tasks such as card connection, disconnection, new character session establishment and restoration; the two run independently of each other, so that when the first character voice continues to play, the second character session can still be established or restored in a timely manner.
[0063] It is worth noting that the key to step S5 is that the switching is not blocked during playback and the playback is not interrupted during switching. When the voice of the character corresponding to the first physical card is still playing, the connection event of the second physical card can still trigger the establishment or restoration of the second character's session state. If the user continues to input new voice information at this time, the input will not enter the first character's session context because the first character's voice is still playing. Instead, it will be bound to the second character's session state according to the currently activated physical card. Thus, the present invention can avoid session mismatch in the case of forced plugging and unplugging.
[0064] In one specific implementation, after the first physical card Card-A is disconnected, the first character's voice continues to play. Subsequently, the user immediately inserts the second physical card Card-B. The card recognition module reads the card identity information of Card-B and triggers a session switching task. The session management module reads the character configuration data corresponding to Card-B and establishes or restores the second character's session cache area Session-B. At this time, even if the first character's voice has not finished playing, the system has already updated the currently active card to Card-B. When the user says "Who are you now?", the voice interaction module collects the input, the task scheduling module routes the input to Session-B, and generates a new AI interaction request based on the second character's session state. The first character's voice continues to play until completion, and the second character's reply voice is queued according to the task queue rules or played after the first voice finishes.
[0065] When executing step S5, the task scheduling module can retain the first character's voice playback task when the first physical card is disconnected, and immediately create a second character's session switching task when the second physical card is connected. The session switching task does not wait for the first character's voice playback to finish, but directly establishes or restores the second character's session state based on the second card's identity information. The system can maintain a "current input binding object" field, which is updated to the second character's session state after the second physical card is connected and successfully recognized. Therefore, user input after the second physical card is connected enters the second character's session buffer. If the first character's voice and the second character's voice playback time conflict, the system can queue them according to a preset playback strategy to avoid confusion caused by the simultaneous output of the two characters' voices.
[0066] Specific Interaction Flow Example In a specific interaction process, the user first inserts the first physical card, Card-A, into the smart interaction device. After the smart interaction device detects the card insertion event, it reads Card-A through the card recognition module and loads the first role configuration data and the first role session cache, Session-A. Subsequently, the user sends voice input to the first role. The AI interaction module generates an AI interaction request based on Session-A and generates the first role's voice based on the results returned by the AI model.
[0067] If the user unplugs Card-A before the first character's voice has finished playing, the smart interaction device will detect that Card-A is disconnected and save the current context, session turn, character emotional state, and incomplete voice playback status in Session-A. At this time, the first character's voice is not interrupted, but continues to play in the voice playback task queue.
[0068] Subsequently, the user inserts the second physical card, Card-B. After the smart interaction device detects the Card-B connection, it reads the card identity information corresponding to Card-B and loads the second role configuration data and the second role session cache, Session-B. At this time, the first role's voice may still be playing, but the system has already updated the current input binding object to Session-B.
[0069] If a user issues a new voice input before the first character's voice playback is complete, the input is written to Session-B, and a new AI interaction request is generated based on the second character's configuration data and the second character's session state. Instead, it is not written to Session-A. After the first character's voice playback is complete, the system releases the voice playback task. The second character's AI response voice continues to be output according to the playback queue. In this way, the system realizes a strong plug-and-play control process that ensures the complete playback of old voices, timely establishment of new sessions, and accurate binding of new inputs.
[0070] State switching example In one specific implementation, the role session state includes an idle state, a session active state, a voice playback state, a disconnected hold state, and a session resumed state.
[0071] The smart interactive device is in an idle state when no physical card connection is detected.
[0072] When a physical card is detected being inserted and the card's identity information is successfully obtained, the system switches from an idle state to a session-active state.
[0073] Once the user's input information is collected and the character's voice is generated, the system enters the voice playback state.
[0074] When a physical card is disconnected and the character's voice has not finished playing, the system enters a disconnect hold state, which saves the character's conversation state and continues to play the unfinished character's voice.
[0075] When the corresponding physical card is reconnected, the system restores the character session cache based on the card's identity information and switches to either session recovery or session activation state.
[0076] When a new physical card is connected, the system establishes or restores a new character session state based on the new card's identity information, and binds subsequent inputs to the new character session state.
[0077] Through the above state switching, the system can clearly distinguish between the two states of "whether the voice playback is complete" and "which character's conversation should the current input be bound to", avoiding conversation context confusion caused by card insertion and removal.
[0078] Task scheduling examples In one specific implementation, the task scheduling module establishes a voice playback task queue and a role conversation switching task queue, respectively.
[0079] Once the AI model returns the results and generates the character's voice, the system adds the character's voice to the voice playback task queue and records its corresponding card identity information, character conversation cache identifier, playback duration, and generation time.
[0080] When the physical card is disconnected, the system does not delete the voice playback task, but marks it as a pending playback task and continues to execute it in the original playback order.
[0081] When a new physical card is connected, the system adds the session creation or restoration operation corresponding to the new card to the character session switching task queue and executes the task immediately.
[0082] The voice playback task queue and the character session switching task queue are independent of each other. Therefore, the voice playback task will not block the establishment of a new character session state, and the character session switching task will not forcibly interrupt the old character voice that is being played.
[0083] In a specific example, the first character's voice has 5 seconds left to play. At this time, the second physical card has been inserted. The system continues to execute the first character's voice in the voice playback task queue, and executes the second character's conversation recovery task in the character conversation switching task queue. If the second character's AI reply voice is generated before the first character's voice finishes playing, the second character's voice can enter the voice playback task queue and wait for the first character's voice to finish playing before playing.
[0084] Input binding example In one specific implementation, the system establishes an input binding relationship based on the currently activated physical card, which can be determined by the physical card that was most recently successfully identified and is still in a connected state.
[0085] When the first physical card is connected, the current input binding object is the first role's session state. The user input information is written to the first role's session cache, and an AI interaction request is generated based on the first role's session state.
[0086] When the first physical card is disconnected and the second physical card is successfully connected, the current input binding object is updated to the second character's session state. Even if the voice of the character corresponding to the first physical card is still playing, subsequent user input information will no longer enter the first character's session cache area, but will enter the second character's session cache area.
[0087] If the recognition of the second physical card fails, the current input binding object can remain empty, or remain in the state of the most recently successfully connected role session and prevent the generation of new AI interaction requests to avoid incorrect input attribution.
[0088] Through the above input binding method, the system can ensure that new user input is written to the correct role session cache when voice playback tasks and session switching tasks are executed in parallel.
[0089] Session caching examples In one specific implementation, the character session cache is used to store historical interaction content, context summary, recent interaction time, session round, character emotional state, character growth state, unfinished task state, and unfinished voice playback state.
[0090] Historical interaction content is used to save the dialogue records between the user and the character; context summary is used to extract key content when the historical interaction content is long; recent interaction time is used to determine whether the conversation needs to be resumed or reinitialized; conversation round is used to record the number of interactions performed by the current character; character emotional state is used to influence the subsequent AI response style; character growth status is used to record the character level, intimacy, energy value or overall combat power value; incomplete task status is used to save the character tasks that the user has not yet completed; incomplete voice playback status is used to record the character voice tasks that have not been played when the card is interrupted.
[0091] When the corresponding physical card is reconnected, the system locates the character's conversation cache based on the card's identity information and restores the context summary, character growth status, and unfinished task status. Thus, when the user inserts the same physical card again, the character can continue the previous dialogue content, growth status, and task progress.
[0092] S6: Collect data on user interaction with physical card characters, update character growth data based on the interaction data, and determine character interaction parameters, leaderboard ranking parameters, player PK calculation parameters, or in-game character attribute parameters based on the character growth data.
[0093] In step S6, the interaction behavior data includes cumulative interaction duration, number of interactions, number of consecutive interaction days, number of tasks completed, task completion level, or game result data. Character growth data includes level, intimacy, energy, health, skill points, or overall combat power. When updating character growth data based on interaction behavior data, calculate the interaction growth increment based on the cumulative interaction time, calculate the task growth increment based on the number of tasks completed or the task completion level, and update the character growth data based on the interaction growth increment and the task growth increment. Character growth data is used to update the initial attribute data or character interaction parameters in the character configuration data.
[0094] Specifically, interactive behavior data refers to the behavioral records generated by users when using physical card characters, including the duration of dialogue between users and characters, the number of dialogues, the number of consecutive days of use, the number of tasks completed, the task completion level, or game result data.
[0095] Character growth data is continuously updated character data based on interaction behavior data, including level value, intimacy value, energy value, health value, skill value, or overall combat power value.
[0096] Character interaction parameters can be data that influences AI's response style, the openness of the response content, the character's tone, character task recommendations, or the character's ability performance.
[0097] The ranking parameters, player PK calculation parameters, and in-game character attribute parameters are all technical parameters derived from character growth data.
[0098] It is worth noting that this invention does not limit specific gameplay, PK rules, or win / loss rules, but rather limits how character growth data is updated based on interaction behavior data, and how it serves as a source of parameters in subsequent interactions or applications. Character growth data is not simply a numerical display, but can be used to update the initial attribute data or character interaction parameters in the character configuration data. For example, when intimacy increases, the character's prompt words can be adjusted to a more familiar tone; when energy values increase, the character can unlock more task recommendations or interactive content; when overall combat power increases, it can be used as part of the ranking parameters or player PK calculation parameters.
[0099] In one specific implementation, users interact with the corresponding character of Card-A via voice every day and complete character tasks in the mini-program. The backend server accumulates the user's interaction time with Card-A and the number of tasks completed. For example, for every 10 minutes increase in accumulated interaction time, the intimacy level increases by 1 point; completing a normal task increases energy by 2 points; and completing a high-level task increases skill by 5 points. The backend server updates the growth data of the corresponding character of Card-A based on the above increments and writes the updated intimacy level, energy value, and skill value into the character's conversation cache or character configuration data. When the user inserts Card-A again later, the AI interaction module can generate a character response that is more in line with the current growth status based on the updated character growth data.
[0100] When executing step S6, the system can calculate the interaction growth increment based on the cumulative interaction time, and calculate the task growth increment based on the number of tasks completed or the task completion level. The interaction growth increment and the task growth increment are then added to the character growth data. To prevent a single user from abnormally accumulating growth data in a short period of time, a daily growth limit, a single task growth limit, or abnormal behavior filtering rules can be set. After the character growth data is updated, it can be synchronized to the backend server, the mini-program, or the local cache of the smart interactive device for use in determining subsequent character interaction parameters, leaderboard sorting parameters, player PK calculation parameters, or in-game character attribute parameters.
[0101] The intelligent interactive device also has a light feedback module, and the method also includes: When a physical card connection is detected, the control light feedback module outputs a connection prompt light effect; When a physical card is detected to be disconnected, the control light feedback module outputs a disconnection prompt light effect or turns off the light effect; During the character's voice playback, the control lighting feedback module outputs voice-synchronized lighting effects.
[0102] Specifically, the lighting feedback module can be LED beads, LED strips, multi-color light groups, breathing lights, or ring light effect components. The connection prompt lighting effect can be a brief illumination, flashing, gradual brightening, or a character-specific color lighting effect; the disconnection prompt lighting effect can be a brief flashing, gradual dimming, or turning off; the voice synchronization lighting effect can be continuously lit when the character's voice is played, change brightness according to breathing changes, or change brightness according to voice volume changes.
[0103] It is worth noting that the lighting feedback is preferably triggered by local multimodal feedback rules, rather than relying on the AI model to issue lighting effect commands in real time. In other words, the smart interactive device can directly call the local lighting effect rules based on card connection events, card disconnection events, and character voice playback status. In this way, even if there is a network communication delay or the AI model returns slowly, physical card connection, disconnection, and voice playback can still receive timely lighting feedback.
[0104] In one specific implementation, after the user inserts a physical card, the light feedback module outputs a connection prompt light effect for 1 second; after the user removes the physical card, the light feedback module flashes briefly and then turns off; when the character's voice is playing, the light feedback module enters the voice playback light effect state, and returns to standby state after the voice playback is completed. The light feedback is only used to indicate the device status and enhance the interactive experience, and does not change the binding relationship of the character's conversation state.
[0105] The present invention also provides a role session switching and role growth management system based on physical card recognition, for implementing the above-mentioned role session switching and role growth management method based on physical card recognition.
[0106] include: Card identity acquisition module 1 is used to acquire the card identity information corresponding to the physical card when a physical card establishes a physical connection with the smart interactive device; The character session management module 2 is used to establish a corresponding character session cache area based on the card identity information, and to establish or restore the corresponding character session state; AI interaction module 3 is used to generate AI interaction requests based on user input information, character configuration data and character conversation status, and generate character voice based on the results returned by the AI model; The session switching control module 4 is used to keep the current character's voice playing after the physical card is disconnected, and to establish or restore the corresponding character's session state when a new physical card is connected. Task scheduling module 5 is used to independently schedule character voice playback tasks and character conversation switching tasks; Lighting feedback module 6 is used to output corresponding lighting effects when physical cards are detected to be connected or disconnected, or when character voice is played. The Character Growth Management Module 7 is used to update character growth data based on user interaction behavior data, and to determine character interaction parameters, leaderboard ranking parameters, player PK calculation parameters, or in-game character attribute parameters based on the character growth data.
[0107] Specifically, the above system can be implemented by using a combination of local devices, a backend server, and a mini-program.
[0108] The local intelligent interactive device is responsible for detecting physical card connection events, reading card identity information, collecting user voice, playing character voice, and performing light feedback; the backend server is responsible for storing character configuration data, character session cache, and character growth data; the mini-program is used to display character growth data, task status, and leaderboard ranking results.
[0109] Data associations are established between modules through card identity information, role ID, user account, and session cache identifier.
[0110] It is worth noting that the above modules do not need to all be set up in the same hardware. For example, the card identity acquisition module 1, the voice interaction module, and the light feedback module 6 can be set up locally on the smart interactive device; the character conversation management module 2 and the character growth management module 7 can be set up on the backend server; the AI interaction module 3 can be implemented through a cloud-based AI model; and the mini-program can be used by users to view character growth data and trigger tasks. Different deployment methods do not affect the core process of this invention for conversation switching and growth data management based on card identity.
[0111] In one specific implementation, after a user inserts Card-A, the local intelligent interaction device reads Card-A and requests role configuration data and the session cache (Session-A) from the backend server. After the user initiates voice input, the local device sends the user input and the context summary in Session-A to the AI model. After the AI model returns a response, the local device generates and plays the first character's voice. If the user removes Card-A and inserts Card-B before the voice has finished playing, the local device continues playing the first character's voice, while the backend server restores Session-B. If the user subsequently continues to input voice, the local device binds that input to Session-B. After the user completes the interaction, the backend server updates the corresponding character growth data in Card-B based on the interaction duration and task completion status. This process fully embodies the card recognition, session caching, forced insertion / removal scheduling, input binding, and character growth update mechanisms of this invention.
[0112] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for role-based conversation switching and role growth management based on physical card recognition, applied to an intelligent interactive device having a card connection structure, a card recognition module, a voice interaction module, and a conversation management module, characterized in that, Includes the following steps: S1: In response to the establishment of a physical connection between the physical card and the smart interactive device, the card identity information is obtained through the card recognition module; S2: Read the character configuration data based on the card identity information, establish a character session cache area, and establish or restore the character session state; S3: Collect user input information, encapsulate the user input information, the card identity information, the character configuration data, and the character session state into an AI interaction request and send it to the AI model, and generate character voice based on the results returned by the AI model; S4: In response to the physical card being disconnected, the current character's session state is associated with and saved with the current card's identity information, and the current character's voice is kept playing until completion; S5: When the first physical card is disconnected and the second physical card is connected, establish or restore the second role session state according to the card identity information of the second physical card, and bind the subsequent user input information to the second role session state; S6: Collect data on user interaction with physical card characters, update character growth data based on the interaction data, and determine character interaction parameters, leaderboard ranking parameters, player PK calculation parameters, or in-game character attribute parameters based on the character growth data.
2. The method for role session switching and role growth management based on physical card recognition according to claim 1, characterized in that: In step S1, the card identity information is obtained by the card recognition module through NFC recognition, image recognition, touch recognition, voice recognition, or based on the mapping relationship between preset card identifiers and role IDs.
3. The method for character session switching and character growth management based on physical card recognition according to claim 1, characterized in that: In step S2, the character configuration data includes character identifier, character setting parameters, prompt word parameters, voice parameters, lighting effect configuration parameters, initial attribute data, or conversation memory index; The character's conversation state includes historical interaction content, context summary, conversation round, character's emotional state, character's growth state, or incomplete voice playback state.
4. The method for role session switching and role growth management based on physical card recognition according to claim 1, characterized in that: In step S2, independent character session caches are established based on the identity information of different cards; Save the corresponding character's session context when the physical card is disconnected; Restore the corresponding character's session context when the corresponding physical card is reconnected.
5. The method for role session switching and role growth management based on physical card recognition according to claim 1, characterized in that: In step S3, a corresponding context summary is generated based on the current role's session state, and the context summary and user input information are encapsulated together into the AI interaction request.
6. The method for role session switching and role growth management based on physical card recognition according to claim 1, characterized in that: The intelligent interactive device also has a light feedback module, and the method further includes: When a physical card connection is detected, the control light feedback module outputs a connection prompt light effect; When the physical card is detected to be disconnected, the control light feedback module outputs a disconnection prompt light effect or turns off the light effect; During the character's voice playback, the control lighting feedback module outputs voice-synchronized lighting effects.
7. The method for character session switching and character growth management based on physical card recognition according to claim 1, characterized in that: In step S5, the character voice playback task and the character conversation switching task each correspond to an independent task queue. The character voice playback task continues to be executed according to the generation time or playback priority, and the character conversation switching task is executed according to the card identity information corresponding to the newly connected physical card.
8. The method for character session switching and character growth management based on physical card recognition according to claim 1, characterized in that: In step S5, if new user input information is received before the voice of the character corresponding to the first physical card is played, the new user input information is bound to the second character's conversation state, and a subsequent AI interaction request is generated based on the second character's conversation state.
9. The method for character session switching and character growth management based on physical card recognition according to claim 1, characterized in that: In step S6, the interactive behavior data includes cumulative interaction duration, number of interactions, number of consecutive interaction days, number of tasks completed, task completion level, or game result data. The character growth data includes level value, intimacy value, energy value, health value, skill value, or overall combat power value; When updating character growth data based on the interaction behavior data, the interaction growth increment is calculated based on the cumulative interaction time, the task growth increment is calculated based on the number of tasks completed or the task completion level, and the character growth data is updated based on the interaction growth increment and the task growth increment. The character growth data is used to update the initial attribute data or character interaction parameters in the character configuration data.
10. A system for implementing the character session switching and character growth management method based on physical card recognition as described in any one of claims 1 to 9, characterized in that, include: Card identity acquisition module (1) is used to acquire card identity information corresponding to the physical card when the physical card establishes a physical connection with the smart interactive device; The role session management module (2) is used to establish a corresponding role session cache area based on the card identity information, and to establish or restore the corresponding role session state; The AI interaction module (3) is used to generate AI interaction requests based on user input information, role configuration data and role conversation status, and generate role voice based on the results returned by the AI model; The session switching control module (4) is used to keep the current character's voice playing after the physical card is disconnected, and to establish or restore the corresponding character's session state when a new physical card is connected. The task scheduling module (5) is used to independently schedule the character voice playback task and the character conversation switching task; The lighting feedback module (6) is used to output corresponding lighting effects when the physical card is connected, disconnected, or when the character's voice is played. The character growth management module (7) is used to update character growth data based on user interaction behavior data, and to determine character interaction parameters, leaderboard ranking parameters, player PK calculation parameters or in-game character attribute parameters based on the character growth data.