Method, terminal and server for operation undo for collaborative editing scenario
Patent Information
- Application Number
- CN202611110341.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
撤销效率低
[0022] According to the technical solution of this application, when a continuous sliding operation originating from a preset hot zone is detected, the displacement of the continuous sliding operation is determined, and the target semantic cluster index is determined based on the determined displacement. When an end indication of the continuous sliding operation is detected, a cancellation transaction corresponding to the continuous sliding operation is submitted. A response result for the continuous sliding operation determined by the server based on the submitted cancellation transaction is received, and a response to the continuous sliding operation is made based on the received response result. In this way, cancellation processing is realized. Moreover, when processing cancellation, processing is based on continuous sliding operations, and many operations can be processed at once, improving cancellation efficiency.
Smart Images

Figure CN122924645A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and more specifically, to an operation undo method, terminal, and server for collaborative editing scenarios. Background Technology
[0002] Currently, in online education and smart classroom scenarios, collaborative teaching products such as Classin provide collaborative editing capabilities such as shared whiteboards, courseware annotation, and grouped image pasting on various terminals including classroom large screens, teacher computers, and student tablets. Users can write, annotate, and edit on the canvas using input methods such as hardware pens, fingers, and mice.
[0003] Existing undo functions mostly employ either a "single-step click undo" or a "global linear undo stack" approach: each undo operation triggers the history pointer to rewind one atomic operation. While this approach may meet the needs of single-user, small-screen, low-concurrency editing scenarios, it is unsuitable for collaborative classroom scenarios like those targeted by Classin, exhibiting significant drawbacks. Undo efficiency is low. A semantically complete editing action (such as a continuous stroke, a batch paste, or continuous adjustment of the same parameters) is often broken down into multiple fine-grained steps in the operation log, requiring users to click multiple times to reach the desired undo position, disrupting the teaching rhythm.
[0004] Therefore, how to improve the efficiency of reversal has become a technical problem that needs to be solved in this field. Summary of the Invention
[0005] In view of this, this application proposes an operation undo method, terminal, and server for collaborative editing scenarios to improve undo efficiency.
[0006] In a first aspect, this application provides a method for undoing operations in a collaborative editing scenario executed by a terminal. The method includes: upon detecting a continuous sliding operation originating from a preset hotspot, determining the displacement of the continuous sliding operation; based on the determined displacement, determining a target semantic cluster index, wherein the target semantic cluster is the semantic cluster reached by the continuous sliding operation; upon detecting an end indication of the continuous sliding operation, submitting an undo transaction corresponding to the continuous sliding operation, wherein the undo transaction includes: a target semantic cluster index, an initiator, and a scope; receiving a response result for the continuous sliding operation determined by a server based on the submitted undo transaction; and responding to the continuous sliding operation based on the received response result.
[0007] Optionally, the operation cancellation method further includes: displaying a preview state after cancellation based on the target semantic cluster index during the duration of the continuous swipe gesture.
[0008] Optionally, before submitting the undo transaction corresponding to the continuous sliding operation, the operation undo method further includes: determining whether the determined displacement exceeds a preset displacement threshold, wherein the condition for submitting the undo transaction corresponding to the continuous sliding operation is that the determined displacement exceeds the preset displacement threshold.
[0009] Optionally, the target semantic cluster index is determined based on the determined displacement, including: determining the target semantic cluster index based on the determined displacement and a nonlinear mapping function of the displacement and the cluster index.
[0010] Optionally, the combined nonlinear mapping function is determined based on context information of the continuous sliding operation, wherein the context information includes at least one of the following: terminal type, initiator role, and preset hot zone.
[0011] Secondly, this application also provides a terminal, comprising: a first determining module, configured to determine the displacement of a continuous sliding operation when a continuous sliding operation originating from a preset hot zone is detected; a second determining module, configured to determine a target semantic cluster index based on the determined displacement, wherein the target semantic cluster is the semantic cluster reached by the continuous sliding operation; a submitting module, configured to submit a reversal transaction corresponding to the continuous sliding operation when an end indication of the continuous sliding operation is detected, wherein the reversal transaction includes: a target semantic cluster index, an initiator, and a scope; a first receiving module, configured to receive a response result for the continuous sliding operation determined by a server based on the submitted reversal transaction; and a response module, configured to respond to the continuous sliding operation based on the received response result.
[0012] Optionally, the operation cancellation device further includes a display module for displaying a preview state after cancellation based on the target semantic cluster index during the duration of the continuous swipe gesture.
[0013] Optionally, the operation cancellation device further includes: a judgment module, used to determine whether the determined displacement exceeds a preset displacement threshold before submitting the cancellation transaction corresponding to the continuous sliding operation, wherein the condition for submitting the cancellation transaction corresponding to the continuous sliding operation is that the determined displacement exceeds the preset displacement threshold.
[0014] Optionally, the target semantic cluster index is determined based on the determined displacement, including: determining the target semantic cluster index based on the determined displacement and a nonlinear mapping function of the displacement and the cluster index.
[0015] Optionally, the combined nonlinear mapping function is determined based on context information of the continuous sliding operation, wherein the context information includes at least one of the following: terminal type, initiator role, and preset hot zone.
[0016] Thirdly, this application also provides a method for undoing operations in a collaborative editing scenario executed by a server. The method includes: receiving an undo transaction submitted by a terminal corresponding to a continuous sliding operation, wherein the undo transaction includes: a target semantic cluster index, an initiator, and a scope, the target semantic cluster index being determined based on the displacement of the continuous sliding operation, the continuous sliding operation originating from a preset hotspot; determining a response result for the continuous sliding operation based on the received undo transaction; and sending the determined response result to the terminal.
[0017] Optionally, based on the received cancellation transaction, the response result for the continuous sliding operation is determined, including: based on the received cancellation transaction, determining which of the following cancellation operations the corresponding cancellation operation is: fully undeletable, partially undeletable, or entirely irrevocable; if the corresponding cancellation operation is fully undeletable, the response result is determined to execute the complete cancellation operation; if the corresponding cancellation operation is partially undeletable, the response result is determined to execute the partial cancellation operation; if the corresponding cancellation operation is entirely irrevocable, the response result is determined to not execute the cancellation operation.
[0018] Fourthly, this application also provides a server, which includes: a second receiving module, configured to receive a cancellation transaction submitted by a terminal corresponding to a continuous sliding operation, wherein the cancellation transaction includes: a target semantic cluster index, an initiator, and a scope, the target semantic cluster index being determined based on the displacement of the continuous sliding operation, the continuous sliding operation originating from a preset hot zone; a third determining module, configured to determine a response result for the continuous sliding operation based on the received cancellation transaction; and a sending module, configured to send the determined response result to the terminal.
[0019] Optionally, the third determining module determines the response result for the continuous sliding operation based on the received cancellation transaction, including: determining which of the following is the corresponding cancellation operation: fully undeletable, partially undeletable, or entirely irrevocable; if the corresponding cancellation operation is fully undeletable, determining the response result to execute the complete cancellation operation; if the corresponding cancellation operation is partially undeletable, determining the response result to execute the partial cancellation operation; and if the corresponding cancellation operation is entirely irrevocable, determining the response result to not execute the cancellation operation.
[0020] Fifthly, this application also provides a machine-readable storage medium storing instructions that cause a machine to perform the above-described operation reversal method.
[0021] Sixthly, this application also provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the above-described operation undo method.
[0022] According to the technical solution of this application, when a continuous sliding operation originating from a preset hot zone is detected, the displacement of the continuous sliding operation is determined, and the target semantic cluster index is determined based on the determined displacement. When an end indication of the continuous sliding operation is detected, a cancellation transaction corresponding to the continuous sliding operation is submitted. A response result for the continuous sliding operation determined by the server based on the submitted cancellation transaction is received, and a response to the continuous sliding operation is made based on the received response result. In this way, cancellation processing is realized. Moreover, when processing cancellation, processing is based on continuous sliding operations, and many operations can be processed at once, improving cancellation efficiency.
[0023] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description
[0024] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application, and the illustrative embodiments and descriptions thereof are used to explain this application. In the drawings: Figure 1 This is a flowchart of an operation undo method for a collaborative editing scene according to a preferred embodiment of this application; Figure 2 This is a schematic diagram of semantic clustering and personally revocable subgraphs according to a preferred embodiment of this application; Figure 3 This is a schematic diagram of a nonlinear mapping function according to a preferred embodiment of this application; Figure 4 This is a schematic diagram of the overall architecture of the operation cancellation system according to a preferred embodiment of this application; Figure 5 This is a schematic diagram of the teacher's slide-to-undo preview interface on a large screen according to a preferred embodiment of this application; Figure 6 This is a schematic diagram of the magnetic locking area of the student tablet and the shrinkage of the personal revocable sub-graph range according to a preferred embodiment of this application; Figure 7 This is a timing diagram of the undo time T_undo embedding point according to the preferred embodiment of this application; Figure 8 This is a structural block diagram of a terminal according to a preferred embodiment of this application. Detailed Implementation
[0025] The technical solution of this application will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] Firstly, embodiments of this application provide a method for undoing operations in a collaborative editing scenario. For example, the collaborative editing scenario could be a collaborative teaching scenario.
[0027] Figure 1 This is a flowchart of an operation undo method for a collaborative editing scenario according to a preferred embodiment of this application. Figure 1 As shown, the operation cancellation method can include the following.
[0028] In step S10, if a continuous sliding operation originating from a preset hot zone is detected, the displacement of the continuous sliding operation is determined. For example, it can be accumulated along the sliding direction from the start point to the end point of the continuous sliding operation, that is, the displacement is determined by integrating according to the sliding speed. Furthermore, in this embodiment, the preset hot zone is a pre-set area on the terminal's screen associated with the undo operation, which can be determined according to specific circumstances and is not limited thereto. For example, the preset hot zone can be such as the edge of the toolbar or the safe area on the side of the canvas. Specifically, the continuous sliding gesture initiated by the user in the preset hot zone (such as the edge of the toolbar or the safe area on the side of the canvas) can be detected in the canvas interface of the Classin collaboration session. On a classroom large screen, sliding gestures can be initiated by a hardware pen, finger, or back of the hand touching the screen; on a teacher's computer, they can be initiated by mouse dragging, touchpad sliding, or hardware pen operation; on a student tablet, they can be initiated by finger or stylus sliding. All terminals share the same set of semantic cluster history models and conflict resolution rules, and the mapping parameters are adaptively configured according to the terminal form.
[0029] In step S11, the target semantic cluster index is determined based on the determined displacement. The target semantic cluster is the semantic cluster reached by the continuous sliding operation.
[0030] In this application embodiment, the operation log entry includes at least: operation identifier, author / participant identifier, scope (layer identifier, region identifier), lock token, semantic group identifier, list of other dependent operation identifiers, and content digest or hash.
[0031] Semantic clusters consist of several operations that satisfy preset clustering conditions. These conditions include, but are not limited to, stroke, batch paste, continuous parameter adjustment, graphics, annotations, time, and author. 1) Stroke Cluster: Operations with the same stroke identifier, or consecutive sampling points before lifting the pen, or adjacent points with a time interval less than threshold τ and a spatial distance less than threshold ε, belong to the same stroke cluster. 2) Batch Paste Cluster: Multiple insertions generated by the same clipboard transaction identifier belong to the same batch paste cluster. 3) Continuous Parameter Adjustment Cluster: Operations using the same control, the same gesture session identifier, and without switching tools or losing focus during the process, belong to the same continuous parameter adjustment cluster.
[0032] The history stack uses semantic clusters as compressed index units, and the stack sequence is C1, C2, ..., Ck, ..., Cn. For example... Figure 2 As shown. Each semantic cluster corresponds to a cluster index, used to identify and distinguish different semantic clusters. Fine-grained operations are reserved within the cluster for conflict pruning and synchronous replay. Each participant maintains a personal undo cursor, which projects onto the "personal undo subgraph" rather than a global linear pointer.
[0033] In step S12, upon detecting an end indication of a continuous sliding operation, a reversal transaction corresponding to the continuous sliding operation is committed. The reversal transaction includes: the target semantic cluster index, the initiator, and the scope.
[0034] In step S13, the response result for the continuous sliding operation, determined by the server based on the submitted reversal transaction, is received.
[0035] In step S14, a response is made to the continuous sliding operation based on the received response results.
[0036] Optionally, in this embodiment, the operation cancellation method further includes the following: During the duration of the continuous swipe gesture, a preview state after cancellation is displayed according to the target semantic cluster index.
[0037] Specifically, a snapshot of the current canvas or an incremental diff layer is copied in memory. Indexed by the target semantic cluster, a preview of the simulated undo state is displayed as a ghost layer / semi-transparent preview layer. It also shows summary information about the target semantic cluster boundary if the undo reaches (number of affected objects, range reduction, whether the locked area was touched), helping the user determine "what will happen after releasing the button, and whether it's safe." This preview state is not the actual canvas state that has been committed and persisted. It is not written to the collaboration server or broadcast to other terminals until the user confirms the undo; the server and other terminals are unaffected. This is preview auxiliary information, existing alongside the ghost layer, used for decision-making, not contradictory. Furthermore, the number of affected objects refers to the number of canvas elements that will be rolled back if the undo is committed according to the target semantic cluster index, such as the number of strokes, textures / graphics, text boxes, and other independently identifiable editable objects, allowing the user to intuitively perceive the scope of the undo's impact.
[0038] Optionally, in this embodiment, before submitting the undo transaction corresponding to the continuous sliding operation, the operation undo method may further include the following: determining whether the determined displacement exceeds a preset displacement threshold. The condition for submitting the undo transaction corresponding to the continuous sliding operation is that the determined displacement exceeds the preset displacement threshold. In this embodiment, the preset displacement threshold can be determined according to specific circumstances, and there is no limitation thereto.
[0039] If the determined displacement does not exceed the preset displacement threshold, the undo transaction will not be committed.
[0040] Furthermore, in this embodiment, if it is determined that the determined displacement does not exceed a preset displacement threshold when the preview state is displayed, the preview state is canceled.
[0041] Optionally, when the preview state is displayed, if the corresponding undo operation is a partial undo, the interface can bounce back to the nearest valid cluster boundary and display the reason.
[0042] Optionally, when the preview state is displayed, if the corresponding undo operation is completely irreversible, the interface can bounce back to the actual canvas state before the swipe started.
[0043] Optionally, in this embodiment, determining the target semantic cluster index based on the determined displacement can be done by combining the determined displacement with a nonlinear mapping function of the displacement and the cluster index.
[0044] Optionally, in this embodiment, the combined nonlinear mapping function is determined based on the context information of the continuous sliding operation, wherein the context information includes at least one of the following: terminal type, initiator role, and preset hot zone.
[0045] like Figure 3 As shown, as an exemplary implementation, the target semantic cluster index k can be determined based on the context information ctx and the displacement d, using the nonlinear mapping function f(d, ctx) → k. The context information ctx includes at least the terminal form (large screen / PC / tablet), screen size category, preset hot zone, and the initiator's role mode (teacher / student). The preset hot zone is the hot zone from which continuous sliding operations begin. Furthermore, the context information may also include the number of revocable clusters n, the width of the hot zone, the lock zone distance, and the cooperative lock state.
[0046] Optionally, the nonlinear mapping function includes a dead zone, an acceleration zone, and a magnetic attraction zone. In the dead zone, small displacements do not move the cluster index, reducing accidental touches; in the acceleration zone, long slides quickly cross multiple clusters; in the magnetic attraction zone, deceleration and magnetic attraction occur near cluster boundaries, attracting the user to the safe cluster boundary and avoiding crossing into locked areas or other people's content clusters.
[0047] Specifically, a first preset displacement value and a second preset displacement value can be set for each nonlinear mapping function to distinguish between dead zones, acceleration zones, and magnetic attraction zones. The first preset displacement value is less than the second preset displacement value.
[0048] When the displacement is less than the first preset displacement value, the cluster index remains unchanged. When the displacement is greater than or equal to the first preset displacement value and less than the second preset displacement value, the increment of the displacement and the step size of the cluster index have a non-linear relationship, with long sliding quickly traversing multiple clusters. When the displacement is greater than or equal to the second preset displacement value, if the distance between the displacement and the semantic cluster boundary at the boundary of the personal revocable subgraph is less than the first preset snapping displacement threshold, the displacement is decelerated or snapped to the semantic cluster boundary at that boundary; that is, the determined target semantic cluster index is the index of the semantic cluster at that boundary. When the displacement is greater than or equal to the second preset displacement value, if the distance between the displacement and the boundary of a lock zone is less than the second preset snapping displacement threshold, the displacement is forcibly snapped to the nearest legal cluster boundary outside that lock zone; that is, the determined target semantic cluster index is the index of the nearest legal cluster outside that lock zone. For a legal cluster, the dependency closures of its operations are all within the current participant's G_allow (personal revocable subgraph). Furthermore, legal clusters can also be limited to not violating lock zone and permission policies.
[0049] Optionally, in this embodiment, the response results of continuous sliding operations are synchronized to other online terminals to update the personal_undo_cursor and canvas rendering status of each terminal.
[0050] Figure 4 This is a schematic diagram of the overall architecture of the operation cancellation system according to a preferred embodiment of this application. The operation cancellation method provided in this application can be based on this operation cancellation system. In this exemplary embodiment, the operation cancellation system is described exemplarily based on the Classin collaborative teaching product. The operation cancellation method runs on terminals such as classroom interactive screens, teacher computers, and student tablets; it covers multi-person real-time collaborative editing scenarios such as shared whiteboards, courseware annotation, and grouped canvases. The terminals keep the canvas state synchronized with the operation log through a collaborative session service.
[0051] like Figure 4 As shown, the system adopts a layered design to achieve functional decoupling and high scalability. As an optional implementation, the architecture may include a user terminal layer, a human-computer interaction layer, a semantic history layer, and a collaborative constraint layer.
[0052] The user terminal layer encompasses a variety of electronic devices used for collaboration. For example, in the embodiments of this application, the classroom large screen used by teachers, other teacher personal computers that may participate in collaboration, student tablets, etc.
[0053] The human-computer interaction layer, as the direct interface between the user and the system, is responsible for capturing user input (such as the continuous sliding operation, which is the core of this application), and parsing the continuous sliding operation using a non-linear mapping function of displacement and cluster index. In the preview state, it displays the target cluster boundary to which the user will roll back. After the user releases the button to confirm, the user submits the undo transaction and outputs a complete rollback (all undone), a partial pruning rollback (partially undone), or a rejection result (all irreversible).
[0054] The semantic history layer aggregates fine-grained operation logs into semantic clusters, each corresponding to a complete editing intent (such as stroke clusters, batch paste clusters, continuous parameter adjustment clusters, etc.). It maintains a historical view by participant, layer, and locked area branch, and establishes dependencies between clusters. For each collaborating user, it dynamically generates a personalized reversible subgraph, where nodes represent the user's reversible fine-grained operations, and edges represent chronological order and dependencies.
[0055] The collaboration constraint layer defines the rules for the entire collaboration environment, including maintaining participant identifiers (teachers / students), role permission policies, layer ownership (whiteboard layer, courseware layer, group pasting layer, etc.), locked areas (geometric range, owner, read-only / append-only / delete-prohibited policies, etc.), and concurrent version information, providing input for revocable boundary determination for undoing transactions.
[0056] For large screens for teachers, such as Figure 5 As shown, the preset hot zone is located on the standing accessible side, with a larger dead zone and significant acceleration in the middle section. Magnetic attraction prioritizes alignment with the boundaries of the whiteboard cluster, and the default scope is the whiteboard layer and the teacher authorization layer. For teacher computers, the cluster granularity can be finer, the mapping curve is near linear, the dead zone is smaller, and it supports precise rollback to the parameter adjustment cluster. For student tablets, the dead zone is larger to reduce accidental palm touches, and by default, only the user's own semantic cluster can be undone. The sliding range is automatically shrunk by the classroom mode strategy table, such as... Figure 6 As shown.
[0057] A strategy engine that integrates with Classin's classroom mode. When a teacher locks a region or enables the "students only edit textures for their own group" mode, the strategy engine dynamically shrinks the personal_allowed_subgraph; the student terminal's f(d, ctx) is enhanced with magnetic attraction and deceleration at the boundaries. After network jitter or offline segment reconnection, semantic grouping identifiers are relabeled based on the server's merging results to ensure consistent cluster boundaries.
[0058] The beneficial effects of the technical solution provided by the embodiments of this application will be explained below through a comparative experiment. The comparative experiment was conducted based on the Classin collaborative teaching product.
[0059] On the interactive large classroom screen, teacher's computer, and student tablet terminals of the Classin collaborative teaching product, repeatable controlled experiments are conducted using the same collaborative session and identical courseware / whiteboard materials. The experiments are carried out separately in a controlled laboratory environment and a real classroom trial environment, with no less than one set of control tests for each terminal form. The control group enables the traditional step-by-step undo interaction (each undo rolls back one fine-grained atomic operation); the experimental group enables the semantic cluster sliding undo scheme described in the present invention (continuous sliding gesture + nonlinear mapping + preview confirmation + conflict clipping). Except for the undo interaction method, the remaining network conditions, number of collaborating users, lock area strategy, and materials remain consistent.
[0060] (1) Test task design No less than three types of standardized tasks are designed, and each type of task is repeatedly performed N times (N≥20 is recommended, determined by the test plan) to cover typical scenarios in collaborative classrooms: Task A (efficiency type). Complete continuous writing containing M fine-grained operations but only K semantic clusters (K<M) and one batch paste on the canvas (for example, M=15, K=3), and it is required to roll back to the specified semantic cluster boundary C_target. Record the total time consumption of the entire process from the user expressing the undo intention to the canvas reaching the target state.
[0061] Task B (collaborative accidental injury type). Two participants (teacher + student, or student + student) edit in adjacent areas at the same time; the student initiates an undo, and the target cluster is close to the boundary of the teacher's lock area. Record whether cross-domain accidental undo occurs, whether clipping or rejection is triggered, and whether the user needs additional recovery operations.
[0062] Task C (misoperation type). On the large classroom screen and student tablets, induce "unintended sliding" in standing / handheld scenarios respectively (for example, natural sliding at the end of writing, palm touching the edge), and count the number of times of accidentally entering the preview state and accidentally submitting a transaction.
[0063] (2) Indicator definition and collection method (2.1) Undo time consumption T_undo (unit: second). Definition: the time interval from the start moment t0 of the undo intention to the moment t1 when the canvas state stably reaches the target cluster boundary and all collaborating ends are synchronized and consistent, T_undo = t1 - t0, as shown Figure 7 in the figure.
[0064] Judgment of the intention start point t0 (unified rules for the experimental group and the control group respectively): - Control group: the moment when the user first clicks or taps the "Undo" control; - Experimental group: The moment when the user starts continuous swipe gestures within the undo hot zone (or the moment when the system detects a valid swipe start point and |d|>d0 crosses the dead zone, whichever is predetermined in the experimental scheme).
[0065] Determination of endpoint t1: The time when the collaborative session service confirms the successful submission of the reversal transaction and the first frame is displayed after the local canvas rendering frame completes the rollback of the target cluster (based on the client-side event tracking timestamp).
[0066] Synchronous data collection: Events and timestamps such as gesture_start, preview_enter, preview_exit, transaction_commit, and render_stable are recorded by embedded points on each terminal client; when necessary, screen recordings are used to manually review disputed samples.
[0067] Statistics: median T_undo_p50 and 90th percentile T_undo_p90 for each subject and each task report; comparisons between groups were performed using the Mann-Whitney U test or paired t-test (when normality was satisfied), with a significance level of α=0.05.
[0068] (2.2) False touch rate R_fp (unit: times / hour or percentage) Definition: The percentage of unintentionally triggered cancellation-related events within a unit test duration or unit number of valid gestures.
[0069] Detailed definition: - R_fp_preview: Number of times unintentional swipes caused entry into preview state (preview_enter) but were not submitted / total test duration; - R_fp_commit: Number of times unintentional sliding led to erroneous transaction commits (transaction_commit, which were subsequently marked as "erroneous operations" by the subjects) / total test duration; - R_fp_rate: The number of erroneous submissions mentioned above / the total number of valid swipe gestures.
[0070] The experimental group can further compare the difference in R_fp between enabling dead zone + magnetic attraction parameters (this scheme) and linear mapping only (ablation control) to illustrate the technical contributions of nonlinear mapping and magnetic attraction.
[0071] (2.3) Cross-domain pruning trigger rate R_crop (unit: percentage) Definition: In Task B and scenarios involving locked areas / multi-person collaboration, the number of times a sliding rollback transaction T is determined by the conflict resolution module to be "partially rollbackable (pruned)" or "rejected and feedback" is the proportion of the total number of rollback commit attempts in this type of scenario.
[0072] R_crop = N_partial_or_reject / N_submit_attempt Where N_partial_or_reject is the number of transactions that output a pruned or rejected status, and N_submit_attempt is the total number of transactions that exceeded the confirmation threshold and attempted to commit (excluding slides that only previewed the uncommitted ones).
[0073] Supplementary records (used to explain the effects of the technology rather than as a rate indicator alone): - Full rollback ratio R_full = N_full / N_submit_attempt; - User satisfaction after the cut or whether a second reversal is needed (optional questionnaire / interview, as supplementary explanation).
[0074] (3) Experimental control variables The following variables were fixed or recorded to ensure comparability with controls: terminal type and screen size, number of online collaborators, locking zone geometry and strategy, semantic clustering threshold (τ, ε), mapping function parameter set f(d,ctx), network round-trip time (RTT), and participant role (teacher / student). Practice rounds of the same task performed before each experiment were not included in the statistics.
[0075] (4) Expected technical effects and results description (example) Based on the above testing methods, the following trends are expected to be observed relative to the control group: - T_undo_p50 and T_undo_p90 decrease in task A, especially when M / K is large (more fine-grained operations and fewer semantic clusters), indicating that semantic cluster navigation and one-slide cross-cluster can shorten the undo path; - R_fp_commit was lower in the experimental group than in the control group and the linear mapping ablation group, indicating that dead zone, preview confirmation and magnetic attraction have a suppressive effect on accidental submission; - In Task B, the experimental group reduced cross-domain false cancellation events by using personal revocable subgraphs and lock-area magnetization; R_crop may be higher than the control group (because the control group lacks a pruning mechanism and is prone to hidden false positives), but with rejection / bounce and reason codes, the cross-domain false positive rate (events that require post-event recovery or complaint marking) is expected to decrease.
[0076] In summary, the technical solution provided by this application mainly includes the following aspects: 1) Coupling of personal undotable subgraphs with semantic cluster history under collaborative constraints. Unlike the global linear undo stack, a personal_undo_cursor projection is established using semantic clusters as navigation units on the historical structure based on participants, layers, and locked areas, achieving conflict pruning and minimum undotable set submission by "rolling back only local intent reachable changes". 2) Nonlinear mapping and magnetic attraction between continuous swipe gestures and semantic cluster boundaries. Unlike "swiping distance = fixed undo steps" or simple step-by-step tap undo, dead zones, acceleration, and magnetic attraction are adaptively configured according to Classin terminal form, hot zones, and role modes, enabling a single swipe to cross multiple semantic clusters and stably dock at the legal cluster boundary, reducing the probability of accidental touches and damage to other people's content on large screens. 3) A transactional undo interaction integrating preview, confirmation, and bounce. The sliding process only previews the cluster boundary summary and the scope of influence; releasing the finger confirms the transaction and commits. If it cannot be completely undone, it bounces back to the nearest valid cluster boundary and provides a reason code, reducing the risk of accidental undo in collaborative classrooms from the interaction mechanism. 4) A unified model for multiple terminals with adaptive parameters for each terminal. The same semantic cluster and conflict resolution rules are implemented across classroom screens, teacher PCs, and student tablets. Mapping functions and strategy tables are differentiated by terminal, solving the consistency problem of "one-stop editing, multi-terminal synchronization, and decentralized undo" in classroom scenarios. 5) Unlike previous "continuous gesture undo" and "drag along history strip" technologies, this application emphasizes cluster-level navigation on collaborative subgraphs, locking area magnets, dependency closure pruning, and Classin classroom strategy linkage, rather than single-person global timeline drag selection.
[0077] The beneficial effects of the technical solution provided in this application mainly include the following aspects: 1) Improved undo efficiency. Users can reach the target boundary by traversing multiple semantic clusters with a single continuous swipe, reducing the number of times the undo button is repeatedly pressed during the teaching process; the median undo time T_undo and P90 in the control experiment are expected to be lower than the gradual undo scheme. 2) Reduced collaborative errors. When multiple people are editing at the same time, the event of undoing to unauthorized content of others is reduced by personal undoable subgraphs and conflict pruning; the magnetic attraction of the locked area boundary reduces the probability of cross-domain false previews; the cross-domain error-related events are expected to be reduced compared to the control group, and the pruning / rejection mechanism can be quantified by R_crop (cross-domain false judgment reduction rate). 3) Improved usability of large screens. Combining hot zones, dead zones and non-linear acceleration, it is adapted to stand-up long-distance operation on classroom large screens, improving the accessibility of the undo entry point; the false touch rate R_fp (especially R_fp_commit) is expected to be lower than the control group and the linear mapping ablation control. 4) Enhanced controllability and understandability. Cluster boundary preview and bounce strategy allow users to clearly understand the scope of the impact of revocation before submission, which is beneficial for predictable interaction in classroom scenarios; the number of preview entries can be counted separately to distinguish between "reversible exploration" and "accidental submission". 5) Technical scalability. Semantic clustering rules and mapping functions can be extended to more editing types (graphics, textures, formulas, etc.), and the strategy table can be configured with classroom mode, facilitating iteration within the Classin product line; the testing methods can be reused for parameter tuning and multi-terminal regression verification in new versions.
[0078] Secondly, this application also provides a terminal.
[0079] Figure 8 This is a structural block diagram of a terminal according to a preferred embodiment of this application. Figure 8 As shown, the operation cancellation device includes a first determining module 10, a second determining module 20, a submitting module 30, a first receiving module 40, and a response module 50. The first determining module 10 determines the displacement of a continuous sliding operation when a continuous sliding operation originating from a preset hot zone is detected. The second determining module 20 determines a target semantic cluster index based on the determined displacement, wherein the target semantic cluster is the semantic cluster reached by the continuous sliding operation. The submitting module 30 submits a cancellation transaction corresponding to the continuous sliding operation when an end indication of the continuous sliding operation is detected, wherein the cancellation transaction includes: the target semantic cluster index, the initiator, and the scope. The first receiving module 40 receives a response result for the continuous sliding operation determined by the server based on the submitted cancellation transaction. The response module 50 responds to the continuous sliding operation based on the received response result.
[0080] Optionally, the operation cancellation device further includes a display module for displaying a preview state after cancellation based on the target semantic cluster index during the duration of the continuous swipe gesture.
[0081] Optionally, the operation cancellation device further includes: a judgment module, used to determine whether the determined displacement exceeds a preset displacement threshold before submitting the cancellation transaction corresponding to the continuous sliding operation, wherein the condition for submitting the cancellation transaction corresponding to the continuous sliding operation is that the determined displacement exceeds the preset displacement threshold.
[0082] Optionally, the target semantic cluster index is determined based on the determined displacement, including: determining the target semantic cluster index based on the determined displacement and a nonlinear mapping function of the displacement and the cluster index.
[0083] Optionally, the combined nonlinear mapping function is determined based on context information of the continuous sliding operation, wherein the context information includes at least one of the following: terminal type, initiator role, and preset hot zone.
[0084] The specific working principle and benefits of the terminal provided in this application embodiment are similar to the specific working principle and benefits of the operation undo method for collaborative editing scenes executed by the terminal provided in this application embodiment, and will not be repeated here.
[0085] Thirdly, embodiments of this application also provide a method for undoing operations in a collaborative editing scenario executed by a server. The method includes: receiving an undo transaction submitted by a terminal corresponding to a continuous sliding operation, wherein the undo transaction includes: a target semantic cluster index, an initiator, and a scope, the target semantic cluster index being determined based on the displacement of the continuous sliding operation, the continuous sliding operation originating from a preset hot zone; determining a response result for the continuous sliding operation based on the received undo transaction; and sending the determined response result to the terminal.
[0086] Optionally, in embodiments of this application, determining the response result for a continuous sliding operation based on the received reversal transaction may include the following:
[0087] Based on the received reversal transaction, determine which of the following reversal operations applies: fully reversible, partially reversible, or entirely irreversible. If the corresponding reversal operation is fully reversible, the response will determine that the complete reversal operation is performed. If the corresponding reversal operation is partially reversible, the response will determine that the partial reversal operation is performed. If the corresponding reversal operation is entirely irreversible, the response will determine that no reversal operation is performed.
[0088] It should be noted that the terminal's response to the continuous swipe operation based on the received response result may include the following: When the response result is to perform a complete undo operation, the terminal performs a complete undo operation; when the response result is to perform a partial undo operation, the terminal performs a partial undo operation; when the response result is not to perform an undo operation, the terminal does not perform an undo operation.
[0089] Furthermore, in this embodiment, when the corresponding reversal operation is partially reversible or entirely irreversible, the server may also return a reason code. For example, the reason code may include area lock, unauthorized operation dependency, or classroom mode prohibition.
[0090] Optionally, in the embodiments of this application, the branching dimension of the operation may include branching by participant (by default, it only applies to the subsequence of operations where the author is the author, or a subset authorized by the teacher), branching by layer / object domain, and branching by locked area (operations by others within the locked area are irreversible for non-owners).
[0091] Optionally, in this application embodiment, based on the received revocation transaction, determining which of the following revocation operations is appropriate: fully revocable, partially revocable, or fully irrevocable, may include the following:
[0092] Based on the received reversible transactions, establish a minimum set of reversible transactions. Based on the established minimum set of reversible transactions, determine which of the following reversal operations is appropriate: fully reversible, partially reversible, or entirely irreversible.
[0093] Optionally, a minimum set of revocable transactions can be established based on the received revocable transactions.
[0094] Specifically, the reversal process includes the target semantic cluster index, initiator (e.g., participant_id), scope (e.g., layer / region), initiator's role, and the current personal undo cursor. For example, a minimal set of reversible operations can be established based on the following: Extract the sequence of clusters to be rolled back from the target semantic cluster index Ck to the current personal undo cursor. Merge the fine-grained operations within each cluster to obtain a candidate operation set Ops_candidate. Perform constraint filtering on each candidate operation op in the candidate operation set, for example, based on whether the operation's author is the initiator, whether the operation is in a locked area, whether the operation is in an allowed layer, and whether dependent operations are located in a personal reversible subgraph, to obtain an allowed operation set Ops_allowed. Perform dependency closure expansion on the allowed operation set Ops_allowed. Specifically, if reversing an operation op_a requires first reversing its dependent operation op_b, then operation op_b is included in the allowed operation set Ops_allowed. Furthermore, op_b must also pass permission verification; otherwise, the dependency relationship is truncated. For example, if the initiator's role is that of a student, the check would verify whether `op_b` falls within the student's permission scope. In this application, different roles correspond to different permission scopes. The final set of allowed operations, `Ops_allowed`, is the minimum revocable set.
[0095] Optionally, for the extracted cluster sequence to be rolled back, the fine-grained operations within each cluster are merged to obtain a candidate operation set Ops_candidate, which may include the following:
[0096] The semantic cluster sequence to be rolled back is retrieved from the target semantic cluster index Ck and the current personal_undo_cursor and labeled as {Ck, Ck+1, ..., Ccursor}. For each semantic cluster in the sequence, the list of fine-grained operations (stroke points, pasted sub-items, parameter adjustment sampling, etc.) already retained within it is read. These fine-grained operations are merged into the same candidate operation set Ops_candidate according to their operation identifiers (the same op_id is only kept once to complete deduplication). For example, if semantic cluster Ck contains stroke fine-grained operations {op1, op2} and semantic cluster Ck+1 contains batch paste fine-grained operations {op3, op4, op5}, then Ops_candidate = {op1, op2, op3, op4, op5}. It should be noted that the semantic cluster itself is already an intent-level compressed index. The "merging" here is to return to a verifiable and pruneable operation-level candidate set after cluster-level navigation, so as to perform author / lock zone / layer / dependency filtering, rather than to compress and merge the operation semantics.
[0097] Based on the established minimum revocable set, determine which of the following is the appropriate cancellation operation: fully revocable, partially revocable, or entirely irrevocable. This can include the following: If the minimum revocable set is exactly the same as the candidate operation set Ops_candidate, then the corresponding cancellation operation is fully revocable. If the minimum revocable set is a proper subset of the candidate operation set Ops_candidate, then the corresponding cancellation operation is partially revocable. If the minimum revocable set is empty, then the corresponding cancellation operation is entirely irrevocable.
[0098] In this application implementation, "only local intents can be rolled back" is implemented through a personal undoable subgraph. During the sliding process, only the position of the personal_undo_cursor on the personal_allowed_subgraph is moved. When committing, the minimum undoable set is calculated and applied in a transactional manner.
[0099] Optionally, in this embodiment, determining which of the following revocation operations—fully revocable, partially revocable, or entirely irrevocable—is based on the received revocation transaction can be done based on the received revocation transaction and the individual revocable subgraph. Specifically, this can include the following:
[0100] The reversal of a transaction includes the target semantic cluster index, the initiator, the scope, and the role of the initiator.
[0101] Retrieve the sequence of clusters to be rolled back from the target semantic cluster index Ck to the current personal reversal cursor. Merge the fine-grained operations within each cluster to obtain the candidate operation set Ops_candidate. Determine whether the dependency closure of each operation in the candidate operation set Ops_candidate is located within the personal reversible subgraph corresponding to the initiator.
[0102] If the dependency closure of each operation in the candidate operation set Ops_candidate lies within the initiator's corresponding personal revocable subgraph, then the corresponding revocable operation is fully revocable. For a given operation, its dependency closure is the operation itself and the set of operations it depends on.
[0103] If an operation in the candidate operation set Ops_candidate has a dependent closure that is not located within the initiator's corresponding personal revocable subgraph, then the corresponding revocation operation is either partially revocable or completely irrevocable. This is determined by disassembling the candidate operation set Ops_candidate.
[0104] For each operation in the candidate operation set Ops_candidate, perform the following verifications: whether the operation's author is the initiator, whether the operation falls within an allowed layer or a locked area, and whether all its dependent closures are within the initiator's corresponding personal revocable subgraph. If the conditions are met, the operation is assigned to the first subset; otherwise, it is assigned to the second subset. If both the first and second subsets are not empty, the corresponding revocation operation is partially revoked. If the first subset is empty but the second subset is not empty, the corresponding revocation operation is completely irrevocable.
[0105] Optionally, in this embodiment, when determining whether a corresponding reversal operation is fully reversible, partially reversible, or entirely irreversible based on the received reversal transaction and the personal reversible subgraph, it can also be determined whether the corresponding operation is fully reversible based on the following: Specifically, dependency verification is performed based on the personal reversible subgraph corresponding to the initiator. For each operation in the candidate operation set Ops_candidate, the following are verified: whether the corresponding author is within the set of authors allowed to perform reversal operations; whether the operation is within the layer / region allowed to perform reversal operations; whether reversing the operation violates the locking policy; and whether all the dependent closures corresponding to the operation are within the candidate operation set.
[0106] If the corresponding undo operation is fully revocable, all operations in the candidate operation set Ops_candidate can be undone. If the corresponding undo operation is partially revocable, undoing continues to the boundary of the nearest valid cluster. The nearest valid cluster is the first fully revocable semantic cluster traced back from the current individual undo cursor; that is, the dependency closures of the operations within it are all within the current participant's G_allow (individual revocable subgraph). This allows for the pruning of undo operations.
[0107] Fourthly, embodiments of this application also provide a server, the server comprising: a second receiving module, configured to receive a cancellation transaction submitted by a terminal corresponding to a continuous sliding operation, wherein the cancellation transaction includes: a target semantic cluster index, an initiator, and a scope, the target semantic cluster index being determined based on the displacement of the continuous sliding operation, the continuous sliding operation originating from a preset hot zone; a third determining module, configured to determine a response result for the continuous sliding operation based on the received cancellation transaction; and a sending module, configured to send the determined response result to the terminal.
[0108] Optionally, the third determining module determines the response result for the continuous sliding operation based on the received cancellation transaction, including: determining which of the following cancellation operations the corresponding cancellation operation is: fully undeletable, partially undeletable, or entirely irrevocable; if the corresponding cancellation operation is fully undeletable, determining the response result to execute the complete cancellation operation; if the corresponding cancellation operation is partially undeletable, determining the response result to execute the partial cancellation operation; and if the corresponding cancellation operation is entirely irrevocable, determining the response result to not execute the cancellation operation.
[0109] The specific working principle and benefits of the server provided in this application embodiment are similar to the specific working principle and benefits of the operation undo method for collaborative editing scenes executed by the server provided in this application embodiment, and will not be repeated here.
[0110] Fifthly, this application also provides a machine-readable storage medium storing instructions that cause a machine to perform the above-described operation reversal method.
[0111] Sixthly, this application also provides an electronic device comprising: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the executable instructions to implement the above-described operation cancellation method.
[0112] The preferred embodiments of this application have been described in detail above. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solution of this application, and these simple modifications all fall within the protection scope of this application.
[0113] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not describe the various possible combinations separately.
[0114] Furthermore, various different implementations of this application can be combined in any way, as long as they do not violate the spirit of this application, they should also be regarded as the content disclosed in this application.
Claims
1. A method for undoing operations in a collaborative editing scenario, executed by a terminal, characterized in that, The methods to undo this operation include: If a continuous sliding operation originating from a preset hot zone is detected, the displacement of the continuous sliding operation is determined; Based on the determined displacement, the target semantic cluster index is determined, where the target semantic cluster is the semantic cluster reached by the continuous sliding operation; Upon detecting an end indication of a continuous sliding operation, a reversal transaction corresponding to the continuous sliding operation is committed, wherein the reversal transaction includes: the target semantic cluster index, the initiator, and the scope; Receive the response result for the continuous sliding operation, determined by the server based on the submitted reversal transaction; Based on the received response, respond to the continuous sliding operation.
2. The operation cancellation method according to claim 1, characterized in that, The method for undoing this operation also includes: During the duration of the continuous swipe gesture, a preview state after cancellation is displayed according to the target semantic cluster index.
3. The operation cancellation method according to claim 1, characterized in that, Before committing the undo transaction corresponding to the continuous sliding operation, the undo method of this operation also includes: Determine whether the determined displacement exceeds a preset displacement threshold. The condition for submitting a reversal transaction corresponding to a continuous sliding operation is that the determined displacement exceeds a preset displacement threshold.
4. The operation cancellation method according to claim 1, characterized in that, Based on the determined displacement, the target semantic cluster index is determined, including: Based on the determined displacement, the target semantic cluster index is determined by combining the displacement and the nonlinear mapping function of the cluster index. Preferably, the combined nonlinear mapping function is determined based on context information of the continuous sliding operation, wherein the context information includes at least one of the following: terminal type, initiator role, and preset hot zone.
5. A terminal, characterized in that, The terminal includes: The first determining module is used to determine the displacement of the continuous sliding operation when a continuous sliding operation originating from a preset hot zone is detected. The second determining module is used to determine the target semantic cluster index based on the determined displacement, wherein the target semantic cluster is the semantic cluster reached by the continuous sliding operation; The submission module is used to submit a reversal transaction corresponding to the continuous sliding operation when an end indication of the continuous sliding operation is detected. The reversal transaction includes: target semantic cluster index, initiator, and scope. The first receiving module is used to receive the response result for the continuous sliding operation determined by the server based on the submitted reversal transaction; The response module is used to respond to continuous sliding operations based on the received response results.
6. A method for undoing operations in a collaborative editing scene, executed by a server, characterized in that, The methods to undo this operation include: Receive a cancellation transaction submitted by the terminal corresponding to a continuous sliding operation, wherein the cancellation transaction includes: a target semantic cluster index, an initiator, and a scope, wherein the target semantic cluster index is determined based on the displacement of the continuous sliding operation, and the continuous sliding operation originates from a preset hot zone; Based on the received reversal transactions, determine the response result for the continuous sliding operation; Send the determined response result to the terminal.
7. The operation cancellation method according to claim 6, characterized in that, Based on the received reversal transaction, determine the response result for the continuous sliding operation, including: Based on the received reversal transaction, determine which of the following reversal operations is appropriate: fully reversible, partially reversible, or fully irreversible; If the corresponding undo operation is fully undone, the response result will be determined as executing the complete undo operation; If the corresponding undo operation is partially undone, the response result will be determined as executing the partial undo operation; If the corresponding undo operation is completely irreversible, the response will be determined as not performing the undo operation.
8. A server, characterized in that, The server includes: The second receiving module is used to receive a cancellation transaction corresponding to a continuous sliding operation submitted by the terminal. The cancellation transaction includes: a target semantic cluster index, an initiator, and a scope. The target semantic cluster index is determined based on the displacement of the continuous sliding operation, which originates from a preset hot zone. The third determining module is used to determine the response result for continuous sliding operations based on the received reversal transactions; The sending module is used to send the determined response result to the terminal.
9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the operation cancellation method of any one of claims 1-4 or the operation cancellation method of claim 6.
10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the operation cancellation method according to any one of claims 1-4 or the operation cancellation method according to claim 6.