Interaction rollback control method and device based on off-line online cooperation, equipment and medium

CN122601470BActive Publication Date: 2026-09-22BEIJING QIBU QIBU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611071895.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-09-22
Estimated Expiration
2046-07-20

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于提供基于离在线协同的交互回退控制方法、装置、设备及介质,旨在解决现有技术中离线与在线切换时难以确保交互连续性和输出内容可靠性的问题

Benefits of technology

[0009]有益效果:本发明公开了基于离在线协同的交互回退控制方法、装置、设备及介质,相比于现有技术,本发明实施例通过持续采集多维度的网络参数,根据所述多维度的网络参数确定当前网络为在线状态或离线状态;当接收到交互请求时,确定在当前交互节点执行所述交互请求所需的最小执行资源在本地是否可用,若在本地不可用、且当前网络为离线状态,则进入回退模式;在回退模式下,基于本地缓存中各缓存条目的综合价值指数以及不同交互节点之间的状态转移概率和角色一致性,从本地缓存中选择目标缓存条目作为所述交互请求中目标交互节点的回退响应; 当网络恢复为在线状态后,根据离线状态下的回退响应历史生成待补全记录列表,并根据所述待补全记录列表从云端获取对应的完整交互内容对会话上下文进行同步修正。通过在网络状态较差且本地资源有限时对交互请求进行回退控制与响应,降低因网络异常导致的交互错乱,确保交互连续性和输出内容可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601470B_ABST
    Figure CN122601470B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence and discloses an interaction rollback control method, device and equipment based on off-line cooperation and a medium. The method comprises the following steps: determining whether a current network is in an online state or an offline state; when an interaction request is received, if the minimum execution resource required for executing the interaction request at a current interaction node is unavailable locally and the current network is in the offline state, the method enters a rollback mode; based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes, a target cache entry is selected as a rollback response of a target interaction node; after the online state is restored, a to-be-completed record list is generated according to the rollback response history, complete interaction content corresponding to the to-be-completed record list is obtained from the cloud, and the session context is synchronously corrected. Through rollback control and response of the interaction request when the network state is poor and the local resource is limited, the interaction confusion caused by network abnormalities is reduced, and the interaction continuity and output content reliability are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to interactive rollback control methods, devices, equipment and media based on online and offline collaboration. Background Technology

[0002] Currently, smart companion devices typically rely heavily on cloud models and resources for character recognition, storyline generation, and content playback during human-computer interaction. However, in poor network conditions, devices may frequently experience issues such as failed character switching, inability to enter storylines, interrupted song playback, or prolonged periods of unresponsiveness, leading to decreased interaction continuity and poor device usability.

[0003] While existing solutions typically configure local caching during interruptions, the cached content is usually just a fixed basic template. This leads to inconsistencies such as disconnection from the current storyline context or character confusion when calling local content for interaction, making it difficult to ensure the reliability and stability of the interactive feedback content. Summary of the Invention

[0004] The main objective of this invention is to provide an interactive rollback control method, apparatus, device, and medium based on online-offline collaboration, aiming to solve the problem in the prior art that it is difficult to ensure the continuity of interaction and the reliability of output content when switching between offline and online.

[0005] The technical solution of the present invention is as follows: The first aspect of this invention provides an interactive rollback control method based on online / offline collaboration, comprising: Continuously collect multi-dimensional network parameters, and determine whether the current network is online or offline based on the multi-dimensional network parameters; When an interaction request is received, it is determined whether the minimum execution resources required to execute the interaction request on the current interaction node are available locally. If they are not available locally and the current network is offline, then the fallback mode is entered. In rollback mode, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes, the target cache entry is selected from the local cache as the rollback response of the target interaction node in the interaction request. Once the network returns to online status, a list of records to be completed is generated based on the rollback response history from the offline state. The corresponding complete interaction content is then retrieved from the cloud based on the list of records to be completed to synchronously correct the session context.

[0006] A second aspect of the present invention provides an interactive rollback control device based on online / offline collaboration, comprising: The network detection module is used to continuously collect multi-dimensional network parameters and determine whether the current network is online or offline based on the multi-dimensional network parameters. The rollback control module is used to determine whether the minimum execution resources required to execute the interaction request on the current interaction node are available locally when an interaction request is received. If they are not available locally and the current network is offline, the rollback mode is entered. The rollback response module is used to select a target cache entry from the local cache as the rollback response of the target interaction node in the interaction request, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes in the rollback mode. The synchronization correction module is used to generate a list of records to be completed based on the rollback response history in the offline state after the network is restored to online status, and to obtain the corresponding complete interaction content from the cloud based on the list of records to be completed to synchronize and correct the session context.

[0007] A third aspect of the present invention provides a computer device including at least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the above-described interactive rollback control method based on online / offline collaboration.

[0008] A fourth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the above-described interactive rollback control method based on offline-to-online collaboration.

[0009] Beneficial Effects: This invention discloses an interaction rollback control method, apparatus, device, and medium based on online / offline collaboration. Compared to existing technologies, this invention continuously collects multi-dimensional network parameters to determine whether the current network is online or offline. When an interaction request is received, it determines whether the minimum execution resources required to execute the interaction request at the current interaction node are available locally. If they are not available locally and the current network is offline, a rollback mode is entered. In rollback mode, based on the comprehensive value index of each cached entry in the local cache, as well as the state transition probability and role consistency between different interaction nodes, a target cached entry is selected from the local cache as the rollback response for the target interaction node in the interaction request. When the network returns to online status, a list of records to be completed is generated based on the rollback response history in the offline state, and the corresponding complete interaction content is retrieved from the cloud based on the list of records to be completed to synchronously correct the session context. By controlling and responding to interaction requests when the network condition is poor and local resources are limited, interaction errors caused by network anomalies are reduced, ensuring interaction continuity and the reliability of output content. Attached Figure Description

[0010] To more clearly illustrate the solutions in this invention, the accompanying drawings used in the description of the embodiments of this invention will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0011] Figure 1 A schematic diagram of an application environment for the interactive rollback control method based on offline-online collaboration provided in an embodiment of the present invention; Figure 2 A flowchart of an interactive rollback control method based on offline-online collaboration provided in an embodiment of the present invention; Figure 3 A schematic diagram of the functional modules of the interactive rollback control device based on offline-online collaboration provided in an embodiment of the present invention; Figure 4 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0012] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The embodiments of the invention are described below in conjunction with the accompanying drawings.

[0013] The interactive rollback control method based on online / offline collaboration provided in this invention can be applied to environments such as smart companion devices, children's interactive toys, smart speakers, and edge computing terminals. The terminal device communicates with a cloud server via a network. The cloud server stores complete interactive resources and generative capability services, while the terminal device has pre-configured basic cache resources locally. When the network is normal, the terminal retrieves dynamically cached content from the cloud according to a hotspot strategy; when the network is abnormal, the terminal maintains the continuity of role interaction based on local caching and a rollback control strategy. Specifically, it can be applied to applications such as... Figure 1 The illustrated intelligent agent interaction scenario with a hardware carrier includes a terminal device 101, a hardware carrier 102 bound to the target intelligent agent, a network 103, and a server 104. The network 103 serves as a medium to provide a communication link between the terminal device 101, the hardware carrier 102, and the server 104. The network 103 can include various connection types, such as wired and / or wireless communication links (e.g., Bluetooth, Wi-Fi, NFC, etc.).

[0014] Users can interact with server 104 via network 103 using terminal device 101 and hardware carrier 102 to receive or send messages, etc. Terminal device 101 may have a client installed that supports virtual scenarios. For example, when the virtual scenario is pet companionship, the client could be a virtual pet application. Users can log in to the client to view, edit, or control the interactions of the bound target intelligent agent in the virtual scenario (this is just an example). Terminal device 101 can be various electronic devices with a display screen and web browsing support, including but not limited to smartphones, tablets, and desktop computers.

[0015] The hardware carrier 102, bound to the target intelligent agent, serves as a real-world interaction medium between the user and the target intelligent agent. It can sense the user's close-range touch, shaking, movement, and other real-world activities in real time and associate them with corresponding interactive events. The hardware carrier 102 can be a plush toy, smart wearable accessory, desktop smart ornament, smart speaker, etc., integrating motion sensing and near-field communication recognition functions. Furthermore, the hardware carrier 102 can also come into contact with physical plot triggering media, such as plot badges, plot base modules, plot keychains, or any automatically recognizable plot triggering device, to read plot-related information stored in the physical medium. This allows the interaction mode with the intelligent agent to switch from ordinary chat mode to plot mode, realizing an immersive plot interaction scenario.

[0016] Server 104 can be a server that provides various services, such as a backend server that supports the content browsed by the user using terminal device 101 and hardware carrier 102 (this is just an example). The backend server can analyze and process data such as received user requests, and feed the processing results back to the user through terminal device 101 and hardware carrier 102. Server 104 can be a cloud server, a server of a distributed system, or a server combined with blockchain.

[0017] It should be understood that the number of terminal devices 101, hardware carriers 102, networks 103, and servers 104 mentioned above is merely illustrative. Depending on the implementation needs, there can be any number of terminal devices 101, hardware carriers 102, networks 103, and servers 104. For example, a single user can correspond to one terminal device 101 and one hardware carrier 102, and multiple users can achieve interactive linkage between target intelligent agents through the network.

[0018] like Figure 2 As shown, the interactive rollback control method based on online / offline collaboration provided in this embodiment of the invention specifically includes the following steps: S201. Continuously collect multi-dimensional network parameters, and determine whether the current network is online or offline based on the multi-dimensional network parameters.

[0019] In this embodiment, accurate network status determination is achieved by continuously collecting multi-dimensional network parameters, thereby realizing online / offline collaborative control. Specific network parameters include at least round-trip time (RTT), consecutive request failures, packet loss rate, and download speed. These parameters are collected by a background probe thread sending heartbeat packets or probe requests to the cloud at preset intervals. RTT is obtained by recording the time difference between sending a request and receiving a response; the number of consecutive request failures is obtained by counting the cumulative number of times a correct response was not received within the most recent preset window period; the packet loss rate is obtained by comparing the ratio of the number of sent packets to the number of acknowledgments; and the download speed is obtained by monitoring the amount of effective data actually received per unit time. After acquiring the multi-dimensional network parameters, a multi-indicator weighted scoring mechanism is used to map the four parameters to a unified scoring range and perform a weighted sum. The total network score is then compared with a preset threshold to mark the current network as online or offline. The offline state includes two sub-states: weak network and network outage, both of which are considered abnormal states requiring the activation of local resources.

[0020] Preferably, to prevent frequent switching between online and fallback modes due to network jitter, a hysteresis rule is pre-set where the entry threshold and exit threshold are inconsistent. Specifically, when the network score drops from the online range to the offline range, the entry threshold must be reached before the state switch is triggered; while when the network score rises from the offline range back to the online range, a higher exit threshold must be reached before the online mode is restored. Furthermore, it can be set to require the network score to remain stable in the offline or online range for a number of consecutive preset detection cycles before the mode switch is executed, better avoiding repeated jumps caused by instantaneous recovery or deterioration.

[0021] For example, in the scenario of a children's smart story machine, when the smart device is placed in a corner of the family living room, the WiFi signal intermittently weakens. By continuously collecting RTT and packet loss rate, it was found that the RTT increased from a stable 50 milliseconds to 800 milliseconds and the packet loss rate reached 15%. It was in the offline range for three consecutive detection cycles, so it was marked as offline.

[0022] This embodiment achieves reliable determination of network status through continuous collection of multi-dimensional network parameters and hysteresis rules. Compared with the single threshold determination method, the comprehensive scoring of multiple indicators reduces the probability of misjudgment caused by instantaneous noise, provides a reliable basis for network status for subsequent rollback control and synchronization correction, and improves the interactive stability of the device in weak network edge environments.

[0023] S202. When an interaction request is received, determine whether the minimum execution resources required to execute the interaction request on the current interaction node are available locally. If they are not available locally and the current network is offline, then enter the fallback mode.

[0024] In this embodiment, when a user triggers an interaction request via voice, touch, or physical medium, the request type is first identified, and it is determined whether the minimum execution resources required to execute the request at the current interaction node are available locally. Request types include at least three categories: character switching requests, plot trigger requests, and song playback requests. Different request types correspond to different minimum execution resource determination rules.

[0025] In practice, when the interaction request is a role switching request, it is determined whether the target role's basic parameters and verification capability parameters exist locally. The target role's basic parameters include role identifier, role voiceprint template, role broadcast tone parameters, and role behavior constraint rules, etc.; the verification capability parameters include role identity verification algorithm and role switching security policy, etc. If the above parameters are available locally, it is considered to meet the minimum execution resources for role switching, and role recognition and switching can be completed locally.

[0026] When the interaction request is a plot trigger request, it is determined whether the target plot index and safe node template exist locally. The target plot index includes plot node identifiers, plot prerequisites, plot branch entry points, and plot-related audio indexes, etc.; the safe node template includes fallback dialogue when the plot is interrupted, plot jump prompts, etc. If the above indexes and templates are available locally, it is considered that the minimum execution resources for plot triggering are met, and the corresponding plot flow can be entered locally.

[0027] When the interaction request is a song playback request, it is determined whether the target audio index, audio segment, and / or default playback template exist locally. The audio index includes audio identifier, audio duration, audio encoding format, and audio storage path, etc.; the audio segment is a local cache of the actual audio data; and the default playback template is a general prompt used to replace missing audio. If any of the above audio-related resources are available locally, the minimum execution resources required for song playback are confirmed.

[0028] In one implementation, the determination of the minimum execution resources can be achieved through a local resource inventory table. Specifically, the resource inventory table is loaded at startup, recording the identifier, type, storage location, and availability flag of each resource item. When an interaction request is received, availability is quickly determined by looking up the table, avoiding delays.

[0029] If the minimum execution resources required for a given request type are unavailable locally and the current network is offline, fallback mode is triggered. For example, if a child requests to play a song exclusive to the cloud, but the target audio index, audio segment, or default playback template is not cached locally, the minimum execution resources are determined to be unavailable. Combined with the current offline status, fallback mode is triggered to achieve collaborative interactive control between online and offline environments.

[0030] This embodiment achieves refined resource management for different types of interaction requests by using differentiated minimum execution resource determination rules. Compared with a unified determination method, the type-based determination can accurately identify the minimum resource boundaries of various requests, so as to avoid excessive rollback or excessive reliance on the cloud. While ensuring the continuity of interaction, it maximizes the utilization efficiency of local resources and improves the request response coverage of the device in offline state.

[0031] S203. In rollback mode, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes, a target cache entry is selected from the local cache as the rollback response of the target interaction node in the interaction request.

[0032] In this embodiment, after entering fallback mode, the most suitable alternative content is selected from the local cache for the interactive response. Specifically, the comprehensive value of each cached entry in the local cache is first evaluated to obtain the corresponding comprehensive value index. Then, the state transition probability and role consistency between different interactive nodes are combined to determine the most matching target cached entry as the fallback response for the target interactive node in the interactive request. Specifically, a state transition matrix of interactive nodes can be constructed based on historical interactive data, and the association value of different interactive nodes can be calculated. Simultaneously, multi-dimensional attributes of each cached entry are collected and combined with the association value of the interactive nodes associated with each cached entry to construct a multi-attribute decision matrix. The comprehensive value index of each cached entry is calculated using the entropy weight method and the approximation ideal solution sorting method.

[0033] In one implementation, the selection process for target cache entries can be implemented through a pipeline architecture, where each stage is executed sequentially, and the output of the previous stage is directly used as the input of the next stage, ensuring consistent data format and controllable timing.

[0034] In another implementation, some intermediate results can be pre-calculated and cached before entering rollback mode. For example, in the online state, the state transition matrix and associated values ​​are updated periodically in the background. After each cache eviction or update, the comprehensive value index of each cached entry is recalculated. This allows only lightweight rollback substitution score calculation and sorting selection to be performed when entering rollback mode, thereby significantly reducing rollback response latency.

[0035] For example, in the scenario of a children's smart story machine, when a child inputs a plot trigger request at the current interaction node "Simba the Lion King - Framed", but goes offline due to poor network and the target plot index is missing locally, the system enters rollback mode. It calculates the comprehensive value index of each cached item, as well as the state transition probability and role consistency between different interaction nodes, and obtains the rollback replacement score of each cached item. Finally, the cached item with the highest score, "Simba Learns Hakuna Matata", is selected as the target cached item, and the plot dialogue of this item is output as the rollback response. This rollback response process is completed locally without cloud involvement, ensuring the continuity of interaction and role consistency in the offline state.

[0036] This embodiment makes joint decisions based on the comprehensive value index of each cached entry, the state transition probability between different interaction nodes, and role consistency. This allows the rollback response to take into account factors such as plot coherence, role consistency, and resource value. Compared with fixed greeting rollback or random rollback, it can maintain high semantic coherence and role consistency even under local resource constraints, thereby improving device availability and interaction quality in offline mode.

[0037] S204. When the network returns to online status, a list of records to be completed is generated based on the rollback response history in the offline state, and the corresponding complete interaction content is obtained from the cloud based on the list of records to be completed to synchronously correct the session context.

[0038] In this embodiment, when the network returns to online status, a list of records to be completed is generated based on the accumulated rollback response history in the offline state. The corresponding complete interaction content is retrieved from the cloud in the time order of the rollback response, and the session context is synchronously corrected.

[0039] In one implementation, synchronous correction can adopt an immediate execution mode. The immediate execution mode is suitable for scenarios where the current session is still in progress, the user is still in the same role and mode, and the completed content will directly affect the next round of interaction. This allows the completion process to be started immediately after the network is restored, and corrections are made while fetching content, ensuring that the next round of interaction can be based on the latest complete content.

[0040] In another implementation, synchronous correction can be performed in a background batch execution mode. This mode is suitable for scenarios where the session has ended, there are many records to be completed, or the completed content is only used to improve historical records and update the cache. For example, the list of records to be completed can be temporarily stored in a temporary rollback area, and batch retrieval and correction can be initiated during idle periods or when the device is charging, reducing interference with the current interaction.

[0041] This embodiment generates a corresponding list of records to be completed by rolling back the response history and synchronously corrects the session context. After the network is restored, it can reliably achieve a smooth transition between offline rollback and online full capability, improving the stability of local and cloud collaboration and the continuity of user experience.

[0042] In the above embodiments, this invention discloses an interaction rollback control method based on online / offline collaboration. By continuously collecting multi-dimensional network parameters, the current network status (online or offline) is determined based on these parameters. When an interaction request is received, it is determined whether the minimum execution resources required to execute the interaction request at the current interaction node are available locally. If they are unavailable locally and the current network is offline, a rollback mode is entered. In rollback mode, based on the comprehensive value index of each cached entry in the local cache, as well as the state transition probability and role consistency between different interaction nodes, a target cached entry is selected from the local cache as the rollback response for the target interaction node in the interaction request. When the network returns to online status, a list of records to be completed is generated based on the rollback response history in the offline state, and the corresponding complete interaction content is retrieved from the cloud based on the list of records to be completed to synchronously correct the session context. By implementing rollback control and response for interaction requests when the network status is poor and local resources are limited, interaction errors caused by network anomalies are reduced, ensuring interaction continuity and the reliability of output content.

[0043] In one embodiment, step S203 includes: Acquire historical interaction data, construct a state transition matrix for interaction nodes based on the historical interaction data, and calculate the association value of different interaction nodes based on the state transition matrix; Collect multi-dimensional attributes of each cache entry, and calculate the comprehensive value index of each cache entry based on the multi-dimensional attributes and the association value of the interaction nodes associated with each cache entry. The fallback replacement score for each cache entry is calculated based on the comprehensive value index of each cache entry, the state transition probability between different interaction nodes in the state transition matrix, and the role consistency. The cache entry with the highest fallback replacement score is determined as the target cache entry, and the target cache entry is output as the fallback response of the target interaction node in the interaction request.

[0044] In this embodiment, after entering rollback mode, the target cache entry is selected and output from all locally cached entries through four sequentially connected steps to respond to the interaction request. Specifically, historical interaction data is first acquired, and the number of transitions between different interaction nodes is counted based on the historical interaction data to construct a state transition matrix for the interaction nodes. Based on this matrix, the probability of reaching other nodes within n steps from the current interaction node is calculated, and the association value of different interaction nodes is calculated in combination with the role consistency coefficient. By constructing the state transition matrix, the continuity of the plot is quantified, and the association value of different interaction nodes is obtained by combining role consistency, providing plot-dimensional input for the subsequent value evaluation of cached entries.

[0045] Then, the access frequency, time decay, role coverage and missing loss of each cache entry are collected. Based on the multi-dimensional attributes and the association value of the interaction nodes associated with each cache entry, the comprehensive value index of each cache entry is calculated. This realizes the objective quantification and comprehensive ranking of cache entries in terms of multi-dimensional attributes, so that the output comprehensive value index can directly reflect the actual importance of cache entries in role interaction scenarios.

[0046] Based on the constructed state transition matrix, the state transition probabilities from the current interaction node to the interaction nodes associated with each cache entry are extracted. The role consistency between the associated node of each cache entry and the target interaction node is determined. Then, the fallback replacement score of each cache entry is calculated by comprehensively considering the three factors of the comprehensive value index, state transition probability and role consistency. This score takes into account the value of cached data, the coherence of the plot context and the role boundary constraints, thus providing a comprehensive quantitative basis for the final selection.

[0047] Finally, the local cached entry set is traversed, and the entry with the highest rollback replacement score is selected as the target cached entry. The associated audio clips, playback templates, or dialogue from plot nodes are read and output as feedback to the user. Simultaneously, metadata about this rollback response is recorded, including the target interaction node identifier, the actual cached entry identifier rolled back, the rollback type, timestamp, and the reason for the rollback, providing a data foundation for subsequent synchronization correction after network recovery.

[0048] This embodiment calculates the association value of nodes by constructing a state transition matrix and obtains a comprehensive value index by combining the multi-dimensional attributes of each cached entry. This allows the calculation of the fallback replacement score to take into account factors such as plot coherence, character consistency, and resource value. It avoids the problems of plot jumps and character confusion caused by manually setting fallbacks or random selections. This ensures that the fallback response can still maintain high semantic coherence and character consistency in offline mode, improving the continuity of interaction and the reliability of output content.

[0049] In one embodiment, acquiring historical interaction data, constructing a state transition matrix for interaction nodes based on the historical interaction data, and calculating the association value of different interaction nodes based on the state transition matrix includes: Acquire historical interaction data and count the number of transitions between different interaction nodes in the historical interaction data; The state transition probability between different interactive nodes is calculated based on the number of transitions between different interactive nodes and the total number of transitions, and a state transition matrix is ​​constructed. Calculate the probability of reaching other nodes within n steps from the current interaction node based on the state transition matrix; The association value of different interaction nodes is calculated based on the probability of reaching the node and the role consistency between the current interaction node and other nodes.

[0050] In this embodiment, when calculating the association value of different interaction nodes, historical interaction data is first obtained to count the number of transitions between different interaction nodes. For example, historical interaction data can be obtained from the session logs accumulated in the online state. The logs record the node identifier, node type, trigger time, subsequent jump node, and user feedback for each interaction. The number of transitions between different interaction nodes is counted using a sliding time window or full accumulation method. Nu Transfer to interaction node Nv Historical number Huv ,in u,v ∈{1,2,…,M}, where M is the total number of interacting nodes.

[0051] Based on the statistical count of transitions, the state transition probability is calculated according to the number of transitions between different interaction nodes and the total number of transitions. Specifically, from the interaction nodes... Nu To the interaction node Nv State transition probability Puv Calculate using the following formula:

[0052] A state transition matrix of dimension M×M is constructed based on the state transition probabilities. Each row of this matrix represents the probability distribution of all possible subsequent interaction nodes starting from a certain interaction node.

[0053] After obtaining the state transition matrix, the probability of reaching other nodes within n steps from the current interaction node is further calculated. Specifically, the current interaction node is... Nc From the current node Nc After n steps, the node is reached. Nv The probability of reaching is , where P n The state transition matrix n Power of 1 The state transition matrix n The power of the first power c Line 1 v Column elements.

[0054] After obtaining the probability of reaching the target node, the association value of different interaction nodes is calculated by combining the role consistency between the current interaction node and other nodes. The role consistency between the current interaction node and other nodes is determined by a consistency coefficient. ρ ( Nv , Nc ) representation, when interactive nodes Nv With the current interaction node Nc When belonging to the same role ρ ( Nv , Nc If )=1, otherwise 0, and finally each interactive node Nv Related value Vplot ( Nv )for:

[0055] in, N max The maximum number of look-ahead steps is preset, and λ∈(0,1) is the discount factor. By combining the reach probability and role consistency, the association value of the interaction node is calculated to ensure that the interaction node with the same role as the current node and is easier to reach on the interaction link will obtain a higher association value. Even if the interaction link is reachable, the interaction node across roles will be rejected because the role consistency coefficient is 0, thus ensuring the consistency of roles during the interaction process.

[0056] This embodiment constructs a state transition matrix based on historical interaction data and calculates the association value, which can better adapt to the interaction habits and path preferences of different users, thereby dynamically updating the node association value and making the selection of fallback replacement content more in line with the actual interaction context.

[0057] In one embodiment, the step of collecting multi-dimensional attributes of each cached entry and calculating a comprehensive value index for each cached entry based on the multi-dimensional attributes and the association value of the interaction nodes associated with each cached entry includes: Collect the access frequency, time decay, role coverage and missing loss of each cache entry, and construct a multi-attribute decision matrix by combining the association value of the interaction nodes associated with each cache entry. Calculate the entropy weight of each attribute in the multi-attribute decision matrix, and obtain a weighted standardized matrix by weighting the multi-attribute decision matrix using the entropy weight; Determine the positive and negative ideal solutions of the weighted normalization matrix, and calculate the Euclidean distance between each cache entry and the positive and negative ideal solutions; The comprehensive value index of each cache entry is calculated based on the Euclidean distance between each cache entry and the positive and negative ideal solutions.

[0058] In this embodiment, when calculating the comprehensive value index, the cached entries are first collected with multi-dimensional attributes, including access frequency, time decay, role coverage, and missing value loss. Access frequency is the cumulative number of times a cached entry has been requested in historical interactions; time decay is the decay effect of the time interval between the last access on the current value, which can be calculated using a number decay function; role coverage is the number of roles that a cached entry can serve, and the more roles it covers, the higher the resource reuse value; missing value loss is the risk level of interaction interruption caused by the cached entry being evicted in an offline state.

[0059] Combining the above four attributes with the association value of the interaction nodes associated with each cached entry, a multi-attribute decision matrix is ​​constructed. Where K is the number of cache entries in the local cache. d ∈{1,2,3,4,5} represents the attribute dimensions, where the first dimension is... X k1 The value is the first k Cache entries Ek Associated interaction nodes Nvk Related value Vplot ( Nvk ); 2nd dimension X k2 For access frequency; 3rd dimension X k3 This represents the time decay value; the 4th dimension. X k4 For character coverage; 5th dimension X k5 This is a loss due to missing information.

[0060] After constructing the multi-attribute decision matrix, it is standardized to eliminate differences in the dimensions and orders of magnitude of different attributes, resulting in a standardized matrix. , For the standardized first k The cache entry in the _th d The attribute values ​​of the first dimension can be standardized using vector normalization. Then, the objective weights of each attribute are determined using the entropy weight method, avoiding subjective bias from manually setting weights. First, the first... d Information entropy of each attribute ed Specifically:

[0061] in, For the first k The cache entry in the _th d The proportion on the dimension is calculated based on the information entropy. d The objective weights of each attribute are entropy weights. :

[0062] Measuring the first by information entropy d The degree of dispersion of a certain attribute's values ​​across all cached entries; if a certain attribute's values ​​across all entries... Significant differences (e.g., some close to 1, some close to 0) indicate that the attribute has strong discriminative power, resulting in low information entropy and a high corresponding entropy weight. Conversely, if an attribute has high discriminative power across different items... If all values ​​are relatively balanced, it indicates that the attribute has weak distinguishing ability. In this case, its information entropy is large, and the corresponding entropy weight is small.

[0063] After obtaining the entropy weights, the multi-attribute decision matrix is ​​weighted using these entropy weights to obtain the weighted standardized matrix, i.e. ,in , for the first k The cache entry in the _th d The weighted standardized values ​​of the dimension are then used. The approximation ideal solution ranking method is then employed to determine the positive and negative ideal solutions of the weighted standardized matrix. Specifically, the optimal and worst values ​​are extracted from each column of the weighted standardized matrix. The positive ideal solution is characterized by the highest plot relevance, most frequent visits, smallest time decay, widest character coverage, and largest missing value. The negative ideal solution is the opposite: lowest plot relevance, almost never visited, largest time decay, narrowest character coverage, and smallest missing value.

[0064] Calculate the Euclidean distance between each cached entry and the positive and negative ideal solutions. and Finally, the comprehensive value index of each cached entry is obtained based on the two Euclidean distances. :

[0065] The value range is [0,1]. The closer it is to 1, the closer the cache entry is to the ideal optimal solution and the higher its overall value. The closer it is to 0, the lower its value and the more likely it is to be removed in the cache eviction decision.

[0066] This embodiment collects multi-dimensional cached item attributes and uses entropy weights to characterize the distinguishing ability of each attribute. It can automatically assign weights based on the dispersion of the data itself, avoiding the subjective bias of manually setting weights. At the same time, it calculates the comprehensive value index after determining the positive and negative ideal solutions by combining the approximation ideal solution ranking method. It comprehensively considers the performance of each cached item in multi-dimensional attributes, realizes the objective quantification and comprehensive ranking of the value of cached items, and enables the comprehensive value index to truly reflect the actual importance of cached items in role interaction scenarios. This provides a reliable quantitative basis for subsequent rollback and replacement selection and elimination decisions.

[0067] In one embodiment, the calculation of the fallback replacement score for each cached entry based on the comprehensive value index of each cached entry, the state transition probability between different interaction nodes in the state transition matrix, and role consistency includes: Extract the first state transition probability from the current interaction node to the interaction node associated with each cache entry from the state transition matrix; Based on the roles of different interaction nodes, determine the consistency of the roles of the interaction nodes associated with each cache entry and the target interaction node; The fallback replacement score for each cache entry is calculated based on the comprehensive value index of each cache entry, the first state transition probability, and the role consistency between the interaction node associated with each cache entry and the target interaction node.

[0068] In this embodiment, when calculating the fallback replacement score for each cached entry, the score from the current interaction node is first extracted from the state transition matrix. Nc Transfer to each cache entry Ek Associated interaction nodes Nvk First state transition probability The state transition probability is directly derived from the c-th row of the constructed state transition matrix P. vk The column element represents the likelihood that, within the current story context, user interaction will naturally flow to the interaction node associated with the cached entry.

[0069] Then, based on the role attributes of different interaction nodes, the interaction nodes associated with each cache entry are determined. Nvk The target interaction node of the current request. Nt Role consistency, which is determined by the role consistency coefficient. ρ ( Nvk , Nt ) indicates that when Nvk and Nt When belonging to the same role, ρ ( Nvk , Nt )=1; When belonging to different roles, ρ ( Nvk , Nt The coefficient is set to 0, which acts as a veto mechanism to ensure that the reverted content does not cross the role boundary, thus fundamentally avoiding role confusion.

[0070] Finally, the overall value index of each cached entry will be calculated. First state transition probability and role consistency coefficient ρ ( Nvk , NtMultiplying these three factors together yields the backsliding substitution score. S k = Among them, the comprehensive value index Used to measure the overall retention value of a cached entry itself. Used to measure the coherence between interactive nodes. ρ ( Nvk , Nt This serves as a role consistency gating mechanism, thereby obtaining a comprehensive replacement score for each cached entry in order to select the most appropriate rollback response.

[0071] This embodiment achieves precise selection of fallback replacement content through the product of three factors: comprehensive value index, plot transition probability, and character consistency. This allows the calculation of fallback replacement score to simultaneously consider the value of cached resources, contextual coherence, and character boundary constraints, avoiding plot jumps or character confusion caused by single-factor decisions. This ensures that the fallback response can maintain high interaction quality and user experience even under local resource constraints.

[0072] In one embodiment, step S204 includes: Once the network is restored to online status, the rollback response history in the offline state is traversed, and the target interaction node, rollback type and timestamp are extracted from the rollback response history to generate a list of records to be completed. Retrieve complete interaction content corresponding to the target interaction node and rollback type from the cloud according to the timestamp order, and verify the compatibility of the complete interaction content with the current session; If compatible, the complete interactive content will be written into the session state table, story progress table, and / or playback state table to correct the session context; if incompatible, expired content will be discarded.

[0073] In this embodiment, after the network returns to online status, the accumulated rollback response history during the offline state is traversed. This history records the response metadata for each entry into rollback mode during the offline period, including the target interaction node identifier, the actual rollback type, and the timestamp of the rollback occurrence. After extracting the aforementioned key information from the rollback response history, the records are sorted in ascending order of timestamp to generate a corresponding list of records to be completed. Each record in this list corresponds to an interaction event that needs to be completed in the cloud.

[0074] After generating the list of records to be completed, the complete interaction content corresponding to the target interaction node and fallback type is retrieved from the cloud according to the timestamp order. That is, records with earlier timestamps are processed first to ensure that the correction order of the session context is consistent with the original interaction sequence. Specifically, for each record to be completed, a request containing the target interaction node identifier, fallback type, and current session identifier is sent to the cloud. The cloud returns the complete generated content corresponding to the interaction node based on the request, including complete dialogue, high-definition audio resources, character animation parameters, or complete song tracks.

[0075] After retrieving the complete interactive content from the cloud, further compatibility checks are performed. These checks include: character version compatibility (checking if the character version identifier in the cloud-returned content matches the character version in the current session); story version compatibility (checking if the story version identifier in the cloud-returned content matches the story progress version in the current session); and resource version compatibility (checking if the resource version number in the cloud-returned content is compatible with the version in the locally cached base configuration area). If all compatibility checks pass, the system is considered compatible; if any check fails, it is considered incompatible.

[0076] If the verification result is compatible, the complete interaction content is written to the corresponding session data table to correct the session context. The specific writing target can be determined based on the rollback type. For example, if the rollback type is a story replacement, the complete story content is written to the story progress table and the current story node and branch status are updated; if the rollback type is a song playback rollback, the complete audio resource is written to the playback status table and the playback queue and progress are updated; if the rollback type is a character switching rollback, the complete character parameters are written to the session status table and the character context is updated. After the writing is completed, the local cache is also updated synchronously, and the completed content or index is stored in the hot resource index area or recent session area as needed to improve the efficiency of subsequent access.

[0077] If the verification result is incompatible, it indicates that the content returned by the cloud conflicts with the current session state. Directly writing to it may cause character confusion or plot deviations. In this case, only the state correction result is retained, and outdated complete interactive content is discarded to avoid injecting old versions or conflicting content into the current session. A version conflict log can also be generated for backend maintenance personnel to analyze version synchronization strategies.

[0078] This embodiment generates a list of records to be completed and retrieves complete interactive content from the cloud in an orderly manner before performing compatibility checks. It can perform accurate completion and version compatibility checks based on the rollback response history, avoiding the repeated output of completed local rollback content and preventing content mismatch caused by version conflicts. It achieves a smooth transition between offline rollback and online complete capabilities, improving the stability of local and cloud collaboration and the continuity of user experience.

[0079] It should be noted that there is no necessary order between the above steps. Those skilled in the art will understand from the description of the embodiments of the present invention that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.

[0080] Further reference Figure 3 As a response to the above Figure 2 The present invention provides an embodiment of an interactive rollback control device based on offline-online collaboration, which implements the method shown. Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0081] like Figure 3 As shown, the interactive rollback control device 30 based on online / offline collaboration described in this embodiment includes: Network detection module 301 is used to continuously collect multi-dimensional network parameters and determine whether the current network is online or offline based on the multi-dimensional network parameters; The rollback control module 302 is used to determine whether the minimum execution resources required to execute the interaction request at the current interaction node are available locally when an interaction request is received. If they are not available locally and the current network is offline, the rollback mode is entered. The rollback response module 303 is used to select a target cache entry from the local cache as the rollback response of the target interaction node in the interaction request, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes in the rollback mode. The synchronization correction module 304 is used to generate a list of records to be completed based on the rollback response history in the offline state after the network is restored to online state, and to obtain the corresponding complete interaction content from the cloud based on the list of records to be completed to synchronize and correct the session context.

[0082] The module referred to in this invention is a series of computer program instruction segments capable of performing specific functions. It is more suitable than a program for describing the execution process of interactive rollback control based on online and offline collaboration. For specific implementation methods of each module, please refer to the corresponding method embodiments described above, which will not be repeated here.

[0083] In one embodiment, the rollback control module 302 is specifically used for: When the interaction request is a role switching request, determine whether the target role's basic parameters and verification capability parameters exist locally; When the interaction request is a plot trigger request, determine whether the target plot index and security node template exist locally; When the interaction request is a song playback request, determine whether the target audio index, audio segment and / or default playback template exist locally.

[0084] In one embodiment, the fallback response module 303 includes: The association value calculation unit is used to acquire historical interaction data, construct a state transition matrix of interaction nodes based on the historical interaction data, and calculate the association value of different interaction nodes based on the state transition matrix. The comprehensive value calculation unit is used to collect multi-dimensional attributes of each cached entry and calculate the comprehensive value index of each cached entry based on the multi-dimensional attributes and the associated value of the interaction nodes associated with each cached entry. The rollback scoring unit is used to calculate the rollback replacement score of each cache entry based on the comprehensive value index of each cache entry, the state transition probability between different interaction nodes in the state transition matrix, and role consistency. The rollback response unit is used to determine the cache entry with the highest rollback replacement score as the target cache entry and output the target cache entry as the rollback response of the target interaction node in the interaction request.

[0085] In one embodiment, the associated value calculation unit is specifically used for: Acquire historical interaction data and count the number of transitions between different interaction nodes in the historical interaction data; The state transition probability between different interactive nodes is calculated based on the number of transitions between different interactive nodes and the total number of transitions, and a state transition matrix is ​​constructed. Calculate the probability of reaching other nodes within n steps from the current interaction node based on the state transition matrix; The association value of different interaction nodes is calculated based on the probability of reaching the node and the role consistency between the current interaction node and other nodes.

[0086] In one embodiment, the comprehensive value calculation unit is specifically used for: Collect the access frequency, time decay, role coverage and missing loss of each cache entry, and construct a multi-attribute decision matrix by combining the association value of the interaction nodes associated with each cache entry. Calculate the entropy weight of each attribute in the multi-attribute decision matrix, and obtain a weighted standardized matrix by weighting the multi-attribute decision matrix using the entropy weight; Determine the positive and negative ideal solutions of the weighted normalization matrix, and calculate the Euclidean distance between each cache entry and the positive and negative ideal solutions; The comprehensive value index of each cache entry is calculated based on the Euclidean distance between each cache entry and the positive and negative ideal solutions.

[0087] In one embodiment, the backoff scoring unit is specifically used for: Extract the first state transition probability from the current interaction node to the interaction node associated with each cache entry from the state transition matrix; Based on the roles of different interaction nodes, determine the consistency of the roles of the interaction nodes associated with each cache entry and the target interaction node; The fallback replacement score for each cache entry is calculated based on the comprehensive value index of each cache entry, the first state transition probability, and the role consistency between the interaction node associated with each cache entry and the target interaction node.

[0088] In one embodiment, the synchronization correction module 304 includes: The traversal unit is used to traverse the rollback response history in the offline state after the network is restored to online state, extract the target interaction node, rollback type and timestamp from the rollback response history, and generate a list of records to be completed. A compatibility verification unit is used to retrieve complete interaction content corresponding to the target interaction node and rollback type from the cloud according to the order of the timestamps, and verify the compatibility of the complete interaction content with the current session. The synchronization correction unit is used to write the complete interactive content into the session state table, plot progress table, and / or playback state table to correct the session context if it is compatible, and to discard expired content if it is incompatible.

[0089] In the above embodiments, this invention discloses an interaction rollback control device based on online / offline collaboration. It continuously collects multi-dimensional network parameters to determine whether the current network is online or offline. When an interaction request is received, it determines whether the minimum execution resources required to execute the request at the current interaction node are available locally. If they are unavailable locally and the current network is offline, it enters rollback mode. In rollback mode, based on the comprehensive value index of each cached entry in the local cache, the state transition probability between different interaction nodes, and role consistency, a target cached entry is selected from the local cache as the rollback response for the target interaction node in the interaction request. When the network returns to online status, a list of records to be completed is generated based on the rollback response history in the offline state, and the corresponding complete interaction content is retrieved from the cloud based on the list of records to be completed to synchronously correct the session context. By controlling and responding to interaction requests when the network condition is poor and local resources are limited, it reduces interaction errors caused by network anomalies, ensuring interaction continuity and the reliability of output content.

[0090] Specific limitations regarding the interactive rollback control device based on online / offline collaboration can be found in the limitations of the interactive rollback control method based on online / offline collaboration described above, and will not be repeated here. Each module in the aforementioned interactive rollback control device based on online / offline collaboration can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0091] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0092] Another embodiment of the present invention provides a computer device, such as... Figure 4 As shown, computer device 40 includes: One or more processors 401 and memory 402, Figure 4 The following section uses a processor 401 as an example. The processor 401 and the memory 402 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0093] The processor 401 is used to perform various control logics of the computer device 40. It can be any conventional processor, microprocessor, state machine, general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), microcontroller, ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0094] The memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions corresponding to the interactive rollback control method based on offline-online collaboration in this embodiment of the invention. The processor 401 executes various functional applications and data processing of the computer device 40 by running the non-volatile software programs, instructions, and units stored in the memory 402, thereby implementing the interactive rollback control method based on offline-online collaboration in the above method embodiment.

[0095] Another embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by one or more processors, perform the steps of the interactive rollback control method based on offline-online collaboration in any of the above method embodiments.

[0096] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0097] Based on the above description of the embodiments, those skilled in the art will understand that the methods described in the embodiments can be implemented using software plus necessary general-purpose hardware platforms. Of course, they can also be implemented using hardware, but in many cases, the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0098] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The computer program can be stored in a non-volatile, computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, floppy disk, flash memory, optical storage, etc.

[0099] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0100] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 the present invention, and should all be included within the protection scope of the present invention.

Claims

1. An interactive rollback control method based on online / offline collaboration, characterized in that, include: Continuously collect multi-dimensional network parameters, and determine whether the current network is online or offline based on the multi-dimensional network parameters; When an interaction request is received, it is determined whether the minimum execution resources required to execute the interaction request on the current interaction node are available locally. If they are not available locally and the current network is offline, then the fallback mode is entered. In rollback mode, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes, the target cache entry is selected from the local cache as the rollback response of the target interaction node in the interaction request. Once the network is restored to online status, a list of records to be completed is generated based on the rollback response history in the offline state, and the corresponding complete interaction content is retrieved from the cloud based on the list of records to be completed to synchronously correct the session context; In the fallback mode, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes, the target cache entry is selected from the local cache as the fallback response of the target interaction node in the interaction request, including: Acquire historical interaction data, construct a state transition matrix for interaction nodes based on the historical interaction data, and calculate the association value of different interaction nodes based on the state transition matrix; Collect multi-dimensional attributes of each cache entry, and calculate the comprehensive value index of each cache entry based on the multi-dimensional attributes and the association value of the interaction nodes associated with each cache entry. The fallback replacement score for each cache entry is calculated based on the comprehensive value index of each cache entry, the state transition probability between different interaction nodes in the state transition matrix, and the role consistency. The cache entry with the highest fallback replacement score is determined as the target cache entry, and the target cache entry is output as the fallback response of the target interaction node in the interaction request.

2. The interactive rollback control method based on online / offline collaboration according to claim 1, characterized in that, Determining whether the minimum execution resources required to execute the interaction request at the current interaction node are available locally specifically includes: When the interaction request is a role switching request, determine whether the target role's basic parameters and verification capability parameters exist locally; When the interaction request is a plot trigger request, determine whether the target plot index and security node template exist locally; When the interaction request is a song playback request, determine whether the target audio index, audio segment and / or default playback template exist locally.

3. The interactive rollback control method based on online / offline collaboration according to claim 1, characterized in that, The steps of acquiring historical interaction data, constructing a state transition matrix for interaction nodes based on the historical interaction data, and calculating the association value of different interaction nodes based on the state transition matrix include: Acquire historical interaction data and count the number of transitions between different interaction nodes in the historical interaction data; The state transition probability between different interactive nodes is calculated based on the number of transitions between different interactive nodes and the total number of transitions, and a state transition matrix is ​​constructed. Calculate the probability of reaching other nodes within n steps from the current interaction node based on the state transition matrix; The association value of different interaction nodes is calculated based on the probability of reaching the node and the role consistency between the current interaction node and other nodes.

4. The interactive rollback control method based on online / offline collaboration according to claim 1, characterized in that, The process involves collecting multi-dimensional attributes of each cached entry, and calculating a comprehensive value index for each cached entry based on these attributes and the association value of the interaction nodes associated with each cached entry. This index includes: Collect the access frequency, time decay, role coverage and missing loss of each cache entry, and construct a multi-attribute decision matrix by combining the association value of the interaction nodes associated with each cache entry. Calculate the entropy weight of each attribute in the multi-attribute decision matrix, and obtain a weighted standardized matrix by weighting the multi-attribute decision matrix using the entropy weight; Determine the positive and negative ideal solutions of the weighted normalization matrix, and calculate the Euclidean distance between each cache entry and the positive and negative ideal solutions; The comprehensive value index of each cache entry is calculated based on the Euclidean distance between each cache entry and the positive and negative ideal solutions.

5. The interactive rollback control method based on online / offline collaboration according to claim 1, characterized in that, The fallback replacement score for each cached entry is calculated based on its comprehensive value index, the state transition probability between different interaction nodes in the state transition matrix, and role consistency. This includes: Extract the first state transition probability from the current interaction node to the interaction node associated with each cache entry from the state transition matrix; Based on the roles of different interaction nodes, determine the consistency of the roles of the interaction nodes associated with each cache entry and the target interaction node; The fallback replacement score for each cache entry is calculated based on the comprehensive value index of each cache entry, the first state transition probability, and the role consistency between the interaction node associated with each cache entry and the target interaction node.

6. The interactive rollback control method based on online / offline collaboration according to claim 1, characterized in that, When the network returns to online status, a list of records to be completed is generated based on the rollback response history from the offline state. Then, the corresponding complete interaction content is retrieved from the cloud based on this list to synchronously correct the session context, including: Once the network is restored to online status, the rollback response history in the offline state is traversed, and the target interaction node, rollback type and timestamp are extracted from the rollback response history to generate a list of records to be completed. Retrieve complete interaction content corresponding to the target interaction node and rollback type from the cloud according to the timestamp order, and verify the compatibility of the complete interaction content with the current session; If compatible, the complete interactive content will be written into the session state table, story progress table, and / or playback state table to correct the session context; if incompatible, expired content will be discarded.

7. An interactive rollback control device based on online / offline collaboration, characterized in that, include: The network detection module is used to continuously collect multi-dimensional network parameters and determine whether the current network is online or offline based on the multi-dimensional network parameters. The rollback control module is used to determine whether the minimum execution resources required to execute the interaction request on the current interaction node are available locally when an interaction request is received. If they are not available locally and the current network is offline, the rollback mode is entered. The rollback response module is used, in rollback mode, to select a target cache entry from the local cache as the rollback response of the target interaction node in the interaction request, based on the comprehensive value index of each cache entry in the local cache and the state transition probability and role consistency between different interaction nodes. The synchronization correction module is used to generate a list of records to be completed based on the rollback response history in the offline state after the network is restored to online state, and to obtain the corresponding complete interaction content from the cloud based on the list of records to be completed to synchronize and correct the session context. The rollback response module includes: The association value calculation unit is used to acquire historical interaction data, construct a state transition matrix of interaction nodes based on the historical interaction data, and calculate the association value of different interaction nodes based on the state transition matrix. The comprehensive value calculation unit is used to collect multi-dimensional attributes of each cached entry and calculate the comprehensive value index of each cached entry based on the multi-dimensional attributes and the associated value of the interaction nodes associated with each cached entry. The rollback scoring unit is used to calculate the rollback replacement score of each cache entry based on the comprehensive value index of each cache entry, the state transition probability between different interaction nodes in the state transition matrix, and role consistency. The rollback response unit is used to determine the cache entry with the highest rollback replacement score as the target cache entry and output the target cache entry as the rollback response of the target interaction node in the interaction request.

8. A computer device, characterized in that, Includes at least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the interactive rollback control method based on offline-online collaboration as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the interactive rollback control method based on offline-to-online collaboration as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Intelligent agent system optimization method and device based on intelligent fault analysis and cross-generation knowledge inheritance

    CN121187845A

  • Multi-mode AI offline interaction and cache synchronization method and system in weak connection environment

    CN121842207A