A method and system for preventing accidental touches during front-end sensitive operations

By employing a front-end anti-accidental touch method based on risk grading and intent-based secondary confirmation, the problem of insufficient protection in existing technologies is solved, achieving a balance between efficient operational safety and user experience, and supporting multi-layered protection and operational auditing.

CN123114331APending Publication Date: 2026-11-17SHANGHAI QUZHI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611259352.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing front-end anti-accidental touch technology solutions lack a risk classification mechanism, adopt fixed delay duration and no intent verification, resulting in insufficient protection, poor user interaction experience, and inability to effectively prevent accidental touches of high-risk operations.

Method used

It adopts a risk-based classification strategy, monitors operation events in real time, matches differentiated delay durations and intent-based secondary confirmation verification, and combines visual countdown and status feedback to provide a global configuration center and non-intrusive access methods, thereby realizing a multi-layered protection mechanism.

Benefits of technology

It enables differentiated protection based on the level of operational risk, reduces the probability of accidental touches, enhances user safety awareness, reduces irreversible operational losses, and supports full-chain operation auditing, thereby reducing project transformation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114331A_ABST
    Figure CN123114331A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for preventing accidental touches of sensitive front-end operations. The invention pre-classifies operations into four levels of risk: low, medium, high, and extremely high, and matches them with differentiated delays and verification rules. It monitors page operations and loads corresponding strategies, initiates a tiered countdown, manages process concurrency through a globally unique state lock, and simultaneously displays visual feedback such as risk colors and countdown numbers. During the countdown phase, manual cancellation, route switching, and network interruption reset are supported. After the countdown ends, intent-based verifications such as keyword input and risk selection are performed; only after successful verification can sensitive operations be executed, and a full-process audit log is simultaneously retained. This invention configures a global rule center, providing a non-intrusive integration solution adapted to Vue and React, balancing smooth interaction with operational security, resulting in a low accidental touch rate for high-risk operations, and complete retention of operation records for easy auditing and review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of web front-end human-computer interaction security technology, specifically to a method and system for preventing accidental touches during sensitive front-end operations. Background Technology

[0002] Existing front-end interfaces commonly suffer from the problem of users accidentally touching sensitive operations. Current solutions block repeated clicks by determining the effective boundary of the button area, setting a fixed-duration anti-accidental-touch window, and limiting access for high-frequency operations. However, this solution can only block continuous clicks within a short period of time and has several inherent flaws: First, it only blocks single clicks and does not design strong confirmation verification processes for high-risk irreversible operations such as deletion, payment, and account cancellation. Second, it uses a globally uniform fixed delay duration, which cannot dynamically adjust the protection strategy according to the risk level of the operation. Low-risk operations cause interaction lag, while high-risk operations are not adequately protected. Third, it does not provide visual feedback with a countdown timer, so users cannot perceive the operation buffering status and are prone to misunderstandings. Fourth, it does not support combined protection of delay buffering, risk warnings, and secondary confirmation, limiting its coverage of business scenarios.

[0003] Meanwhile, industry-standard anti-shake tools can only limit repeated clicks, but cannot prevent accidental clicks or unintentional actions. Once sensitive operations are executed, irreversible losses will occur. Traditional pop-up confirmations only ask simple questions without intent verification mechanisms, making users prone to habitually clicking to confirm, resulting in a persistently high risk of accidental clicks. Existing solutions lack a unified configuration center, resulting in scattered and unreusable protection rules. Protection logic is deeply coupled with business code, leading to high costs for integration and modification. Furthermore, they do not retain complete operation event records, making it impossible to conduct audits and reviews after accidental operations occur.

[0004] Overall, existing front-end anti-accidental touch technologies are rigid, have a single level of protection, lack user awareness, and lack a three-layer linkage protection mechanism of buffering, confirmation, and blocking, making it difficult to balance the front-end interactive experience with the security of sensitive operation data. Summary of the Invention

[0005] To address this, the present invention provides a method and system for preventing accidental touches during sensitive front-end operations, which solves the problems of existing front-end accidental touch prevention solutions lacking risk classification, using fixed delays, lacking visual countdown and intent verification, and having insufficient protection.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for preventing accidental touches during front-end sensitive operations, comprising:

[0007] S1. Pre-configure front-end operation risk classification rules and corresponding anti-accidental touch strategies, classify risk levels into low risk, medium risk, high risk, and extremely high risk, and match delayed execution time and intent-based secondary confirmation verification rules for each level of risk.

[0008] S2. Monitor front-end page operation trigger events in real time, identify the risk level corresponding to the current triggered operation, and load the matching anti-accidental touch strategy;

[0009] S3. Trigger the graded delay lock process, start the corresponding countdown timer, simultaneously disable and lock the trigger operation button and display status feedback, and control the concurrent execution of the anti-accidental touch process through the status lock;

[0010] S4. During the countdown, maintain the operation lock state, open the interruption channel, respond to manual cancellation commands, page route jump events, and network abnormal events, trigger the interruption of the anti-accidental touch process and reset all anti-accidental touch states;

[0011] S5. After the countdown ends, perform the corresponding intention-based secondary confirmation verification according to the risk level. After the intention-based secondary confirmation verification passes, unlock the operation execution permission.

[0012] S6. Perform target-sensitive operations, collect all events of this operation, and generate operation audit logs for persistent storage.

[0013] As a preferred method for preventing accidental touches during sensitive front-end operations, in S1, the specific strategy for preventing accidental touches corresponding to the risk level is as follows:

[0014] The low-risk activities include page queries, list refreshes, and tag switching. These low-risk activities are delayed and do not require the intent-based secondary confirmation verification.

[0015] The medium-risk activities include modification, data editing, and form submission. The medium-risk delay time is 1 second, the execution button is locked, and there is no additional verification pop-up.

[0016] The high-risk events include payment, order submission, and data overwrite. The high-risk event has a 2-second delay, which is accompanied by a basic pop-up confirmation.

[0017] The extremely high risks include data deletion, account cancellation, configuration clearing, and forced offline. The delay time for the extremely high risks is 3 seconds, and the intent-based secondary confirmation verification is forcibly executed.

[0018] As a preferred solution for preventing accidental touches during sensitive front-end operations, in S3, the state lock manages process concurrency through a concurrency interception and determination model. The formula for the concurrency interception and determination model is:

[0019]

[0020] In the formula, The value is set to the allow flag for creating a new accidental touch prevention process. When creating a new process, the value is Intercepting new processes in real time; It is in a global lock state. Indicates an idle state. Indicates the occupied status.

[0021] As a preferred solution for preventing accidental touches during sensitive front-end operations, in S3, the delayed locking process configures the state lock, one of the anti-accidental touch processes runs on the same page at the same time, and is interrupted and reset when the page jumps, the route changes, or the network is abnormal, and provides manual cancellation, reset, and retry interfaces.

[0022] As a preferred solution for preventing accidental touches during sensitive front-end operations, in S3, the status feedback includes real-time display of countdown numbers on the button, a progress bar with a color scheme corresponding to the risk level, and disabling grayscale style;

[0023] The state feedback is generated through a color system mapping function, the formula of which is:

[0024]

[0025] In the formula, The display color values ​​for the button progress bar and background; This is a color system mapping function, and the mapping rule is: Set the button to its default primary color. It is yellow. Orange It is red.

[0026] As a preferred solution for preventing accidental touches during sensitive front-end operations, in S5, the intent-based secondary confirmation verification includes inputting preset keywords, checking the irreversible risk notification option, and sliding to unlock / long-press verification.

[0027] The intention-based secondary confirmation verification formula is as follows:

[0028]

[0029] In the formula, This is a flag indicating that the intent verification has passed; its value is... The time verification passed, and the value was taken as follows. The time verification failed; For the confirmation keywords entered by the user, Preset standard keywords for the global configuration center; The option to disclose irreversible risks is checked, and its value is [value missing]. This indicates that the option has been selected; This is a completion marker for slide-to-unlock / long-press verification, with a value of [value]. This indicates that the verification is complete.

[0030] As a preferred solution for preventing accidental touches during sensitive front-end operations, in S6, the operation audit log includes accidental clicks, interruptions, cancellations, successful verifications, and completed operations. The operation audit log is synchronized to the local cache and backend services.

[0031] As a preferred solution for preventing accidental touches in sensitive front-end operations, it adopts a non-intrusive integration method, providing custom directives for the Vue framework, higher-order component (HOC) / custom Hook for the React framework, and decorators for general scenarios, integrating with existing business execution code.

[0032] As a preferred solution for preventing accidental touches during sensitive front-end operations, a global configuration center is pre-built to uniformly maintain risk level classification standards, delay countdown durations for each level, confirmation keywords, interface prompt text, and risk display styles.

[0033] This invention also provides a front-end sensitive operation anti-accidental touch system, employing the above-described front-end sensitive operation anti-accidental touch method, comprising:

[0034] Risk grading strategy pre-configuration unit: used to pre-configure front-end operation risk grading rules and corresponding anti-accidental touch strategies, divide risk levels into low risk, medium risk, high risk and extremely high risk, and match delayed execution time and intent-based secondary confirmation verification rules for each level of risk;

[0035] Operation monitoring and strategy matching unit: used to monitor front-end page operation trigger events in real time, identify the risk level corresponding to the current triggered operation, and load the matching anti-accidental touch strategy;

[0036] Tiered Delay and Concurrency Control Unit: Used to trigger the tiered delay locking process, start the corresponding duration countdown, simultaneously disable and lock the trigger operation button and display status feedback, and control the concurrent execution of the anti-accidental touch process through the status lock;

[0037] Interruption control and status reset unit: During the countdown, it maintains the operation lock state, opens the interruption channel, responds to manual cancellation commands, page route jump events, network abnormal events, triggers the interruption of the anti-accidental touch process and resets all anti-accidental touch states;

[0038] Intent verification and permission unlocking unit: After the countdown ends, it performs the corresponding intent-based secondary confirmation verification according to the risk level. After the intent-based secondary confirmation verification is passed, the operation execution permission is unlocked.

[0039] Operation Execution and Audit Log Unit: Used to execute target-sensitive operations, collect all events of the operation process, and generate operation audit logs for persistent storage.

[0040] The present invention has the following advantages:

[0041] First, by matching differentiated delay durations and verification rules through a four-level risk classification, low-risk operations have no additional interaction obstacles, while high-risk operations have enhanced protection, taking into account both the front-end interactive experience and the security of sensitive operations.

[0042] Secondly, by combining visual countdown, risk color feedback, and intention-based secondary confirmation verification, the system avoids accidental clicks by users who habitually click to confirm, significantly reducing the probability of accidental touches in high-risk operations such as deletion, payment, and cancellation.

[0043] Third, configure a globally unique operation state lock, combined with manual cancellation and routing / network abnormal interruption mechanisms, to provide multi-layered protection for irreversible operations, including buffering, confirmation, and blocking. Operations can be undone at any time, effectively avoiding irreversible business losses.

[0044] Fourth, it provides a non-intrusive access solution that is compatible with multiple front-end frameworks, with high reusability and low project modification costs; it relies on a globally unified configuration center to centrally manage and control protection rules, with rules taking effect dynamically, facilitating system iteration and unified management.

[0045] Fifth, collect all operation events and generate audit logs, which are stored synchronously on the local machine and backend service. This fully records all behaviors such as accidental touches, interruptions, and executions, and supports post-event risk review and operation audit traceability. Attached Figure Description

[0046] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0047] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0048] Figure 1 This is a schematic diagram of a method for preventing accidental touches during front-end sensitive operations provided in Embodiment 1 of the present invention;

[0049] Figure 2 This is a technical roadmap for a front-end sensitive operation anti-accidental touch method provided in Embodiment 1 of the present invention;

[0050] Figure 3This is a layered architecture diagram of a front-end sensitive operation anti-accidental touch method provided in Embodiment 1 of the present invention;

[0051] Figure 4 This is an overall architecture diagram of a front-end sensitive operation anti-accidental touch method provided in Embodiment 1 of the present invention;

[0052] Figure 5 This is a schematic diagram of a front-end sensitive operation anti-accidental touch system architecture provided in Embodiment 1 of the present invention. Detailed Implementation

[0053] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Example 1

[0055] See Figure 1 and Figure 2 This invention provides a method for preventing accidental touches during front-end sensitive operations, comprising:

[0056] S1. Pre-configure front-end operation risk classification rules and corresponding anti-accidental touch strategies, classify risk levels into low risk, medium risk, high risk, and extremely high risk, and match delayed execution time and intent-based secondary confirmation verification rules for each level of risk.

[0057] S2. Monitor front-end page operation trigger events in real time, identify the risk level corresponding to the current triggered operation, and load the matching anti-accidental touch strategy;

[0058] S3. Trigger the graded delay lock process, start the corresponding countdown timer, simultaneously disable and lock the trigger operation button and display status feedback, and control the concurrent execution of the anti-accidental touch process through the status lock;

[0059] S4. During the countdown, maintain the operation lock state, open the interruption channel, respond to manual cancellation commands, page route jump events, and network abnormal events, trigger the interruption of the anti-accidental touch process and reset all anti-accidental touch states;

[0060] S5. After the countdown ends, perform the corresponding intention-based secondary confirmation verification according to the risk level. After the intention-based secondary confirmation verification passes, unlock the operation execution permission.

[0061] S6. Perform target-sensitive operations, collect all events of this operation, and generate operation audit logs for persistent storage.

[0062] Specifically, this method employs a multi-layered, interconnected protection mechanism that combines risk-level matching, delayed buffering and interception, strong intent verification, and end-to-end interruptibility. Unlike traditional front-end solutions that rely solely on debouncing and throttling to block repeated clicks, this approach provides differentiated protection strengths for operations with varying risk levels, balancing user experience and operational security. The overall process is based on a front-end event interception mechanism and a finite state machine flow. A pre-established rule base mapping operational risks to protection strategies is used. When a user triggers a sensitive operation, the original business logic is first intercepted via event listening, and the operation is redirected to the anti-accidental touch state machine. The state machine sequentially executes delayed locking, visual feedback, interruption listening, and intent verification. Only when all protection conditions are met is the original business operation allowed. Key events in the state transition are collected synchronously throughout the process for subsequent auditing and tracing. Through the combined design of pre-buffering and strong intent verification, accidental touch interception is upgraded from "click frequency limitation" to "active intent verification," fundamentally reducing the risk of irreversible operations caused by unintentional accidental touches or accidental clicks.

[0063] In one possible embodiment, in S1, the anti-accidental touch strategy corresponding to the risk level is specifically as follows:

[0064] The low-risk activities include page queries, list refreshes, and tag switching. These low-risk activities are delayed and do not require the intent-based secondary confirmation verification.

[0065] The medium-risk activities include modification, data editing, and form submission. The medium-risk delay time is 1 second, the execution button is locked, and there is no additional verification pop-up.

[0066] The high-risk events include payment, order submission, and data overwrite. The high-risk event has a 2-second delay, which is accompanied by a basic pop-up confirmation.

[0067] The extremely high risks include data deletion, account cancellation, configuration clearing, and forced offline. The delay time for the extremely high risks is 3 seconds, and the intent-based secondary confirmation verification is forcibly executed.

[0068] Specifically, based on the scope of business impact and the degree of data recoverability after an operation is triggered, front-end operations are divided into four tiers, each matched with an increasing level of protection to achieve a balance between user experience and operational security. Low-risk operations only involve data queries and view switching, without any changes to business data, so no additional protection logic is added to ensure smooth interaction. Medium-risk operations involve data modification but can be recovered through re-editing, so only a short 1-second delay and button locking are set to both prevent rapid repeated submissions and not disrupt the user's operation rhythm. High-risk operations involve major business changes such as funds and orders, and accidental touches can cause business process anomalies, so a 2-second buffer and pop-up confirmation are set to give users a brief time to think and change their minds. Extremely high-risk operations result in irrecoverable data and irreversible account status after being triggered, so a maximum 3-second delay and strong intent verification are set. Through dual protection, it is ensured that the operation is the user's active and explicit intention, thus preventing serious losses caused by accidental touches from a mechanism perspective.

[0069] In one possible embodiment, in S3, the state lock manages process concurrency through a concurrency interception determination model, the formula of which is:

[0070]

[0071] In the formula, The value is set to the allow flag for creating a new accidental touch prevention process. When creating a new process, the value is Intercepting new processes in real time; It is in a global lock state. Indicates an idle state. Indicates the occupied status.

[0072] Specifically, the concurrency interception and judgment model manages concurrent access to the anti-accidental touch process through a globally unique state variable, avoiding state chaos and duplicate execution issues caused by multiple sensitive operations triggering simultaneously. Its underlying logic is a Boolean state judgment mechanism, maintaining a unique lock state variable in the global scope, with a default value of idle. When a new operation triggers the anti-accidental touch process, the current lock state is first read. If the lock is idle, the new process is allowed, and the lock state is set to occupied, locking the process execution right. If the lock is occupied, the new operation request is directly intercepted, and the anti-accidental touch process is not triggered. Through this global state mutual exclusion mechanism, it is ensured that only one running anti-accidental touch process exists on the same page at any given time, avoiding interface chaos caused by multiple pop-ups and countdowns, and also preventing business logic conflicts caused by concurrent triggering of multiple operations.

[0073] In one possible embodiment, in S3, the delay locking process configures the state lock, one anti-accidental touch process runs on the same page at the same time, and is interrupted and reset when the page jumps, the route changes, or the network is abnormal, and provides manual cancellation, reset, and retry interfaces.

[0074] Specifically, based on full lifecycle management of state, a complete design is implemented for the state lock's effective period, interruption triggering conditions, and reset mechanism to ensure that the lock state will not deadlock or leave any residual issues due to abnormal scenarios. This is mainly divided into three parts: First, relying on the mutual exclusion characteristic of the global state lock, only one anti-accidental touch process runs at a time, avoiding interface and logic chaos caused by multiple operations overlapping; second, by listening to front-end route guards, page lifecycle hooks, and network status monitoring APIs, when scenarios such as the user leaving the current page, route switching, or network disconnection are detected, interruption logic is triggered to clear the countdown timer, unlock the button state, and release the global lock, preventing subsequent operations from being unable to be triggered due to process residue; third, the cancellation, reset, and retry logic are encapsulated into independent callable methods, exposed to the business layer for invocation, supporting process management in customized business scenarios and improving the flexibility of the solution. Through a dual interruption and reset mechanism, the state logic of the anti-accidental touch process is guaranteed to have no abnormal residue.

[0075] In one possible embodiment, in S3, the status feedback includes a button displaying a countdown number in real time, a progress bar with a color scheme corresponding to the risk level, and disabling the grayscale style;

[0076] The state feedback is generated through a color system mapping function, the formula of which is:

[0077]

[0078] In the formula, The display color values ​​for the button progress bar and background; This is a color system mapping function, and the mapping rule is: Set the button to its default primary color. It is yellow. Orange It is red.

[0079] Specifically, this approach uses multi-dimensional visual feedback to intuitively convey abstract protection processes and risk levels to users, solving the user confusion caused by the lack of feedback in traditional accidental touch prevention methods. It mainly consists of two parts: First, disabling buttons by graying them out visually prevents repeated clicks, while a countdown timer informs users of the remaining buffer time, and a progress bar dynamically displays the countdown progress, forming a triple visual cue of "status, value, and progress," avoiding user confusion due to unknown waiting times. Second, based on users' general color perception (yellow for alerts, orange for warnings, and red for danger), a mapping relationship is established between risk levels and colors. Low-risk levels use the default style without interfering with the user; medium-risk levels use yellow to indicate caution; high-risk levels use orange to warn of potential impact; and extremely high-risk levels use red to emphasize irreversible actions. The visual impact of colors strengthens the user's risk perception, further reducing the probability of accidental operation. This principle, through visual design, transforms the protection mechanism from "silent background interception" to "visible foreground perception," enhancing both user security and the effectiveness of accidental touch prevention.

[0080] In one possible embodiment, in S5, the intent-based secondary confirmation verification includes inputting preset keywords, checking the irreversible risk notification option, and sliding to unlock / long-pressing to verify.

[0081] The intention-based secondary confirmation verification formula is as follows:

[0082]

[0083] In the formula, This is a flag indicating that the intent verification has passed; its value is... The time verification passed, and the value was taken as follows. The time verification failed; For the confirmation keywords entered by the user, Preset standard keywords for the global configuration center; The option to disclose irreversible risks is checked, and its value is [value missing]. This indicates that the option has been selected; This is a completion marker for slide-to-unlock / long-press verification, with a value of [value]. This indicates that the verification is complete.

[0084] Specifically, unlike traditional pop-up windows that only require clicking a "confirm" button with weak validation, this system forces users to focus on the action by requiring them to actively input information, check boxes, and swipe / long press. This breaks the muscle memory of habitual clicking and fundamentally prevents accidental confirmations. Its main logic is an "OR logic judgment" validation mechanism; any one of the three validation methods is sufficient for a successful validation, adapting to different risk levels and business scenarios. Keyword input validation requires users to manually input the text corresponding to the action, such as "delete" or "logout," reinforcing the user's understanding of the consequences of the action through the thought process of text input. Risk notification check boxes require users to actively acknowledge that the action is irreversible, serving a dual purpose of risk notification and intent confirmation. Swipe to unlock / long press validation further filters unintentional clicks through continuous operations. This highly interactive validation design transforms "passive confirmation" into "active verification," significantly improving the accuracy of intercepting accidental clicks in high-risk operations.

[0085] In one possible embodiment, in S6, the operation audit log includes accidental clicks, interruptions, cancellations, successful verifications, and completed operation executions. The operation audit log is synchronized to the local cache and backend services.

[0086] Specifically, all major state transition events in the anti-accidental touch process are collected and stored to achieve traceability and replayability of operational behavior. Its main logic consists of two parts: First, it covers all major nodes in the entire process, from the user's initial click trigger (accidental click), interruption / cancellation during the process, successful verification, to the final completion of the operation, completely recording the user's operational behavior trajectory and process flow status, and fully reconstructing the stage where the accidental operation occurred; Second, local caching is implemented using the browser's LocalStorage or IndexedDB for fast front-end querying and offline scenario retention, while the back-end service asynchronously reports log data through an interface for centralized audit management, behavior analysis, and risk statistics. Through full-process log collection, not only is data evidence provided for post-event troubleshooting and responsibility determination, but log data analysis can also provide data support for optimizing subsequent protection strategies by analyzing high-incidence scenarios of accidental touches.

[0087] In one possible implementation, a non-intrusive access method is adopted, providing custom directives for the Vue framework, higher-order component (HOC) / custom Hook for the React framework, and decorators for general scenarios, to access the original business execution code.

[0088] Specifically, the system separates the accidental touch prevention logic from the business execution logic, enabling rapid integration by leveraging the native extension capabilities of various front-end frameworks without modifying the internal logic of the original business code. The main logic is as follows: For the Vue framework, its custom directive mechanism encapsulates the accidental touch prevention logic into directives such as `v-safe-click`. Integration is achieved simply by adding the directive attribute to the button tag. The directive intercepts click events, executes the protection logic, and ultimately calls the originally bound business method, requiring no changes to the business layer. For the React framework, the business button component is wrapped with a higher-order component (HOC), or the accidental touch prevention state and method are encapsulated using a custom Hook. Event interception and protection are completed at the component level, and the business component only needs to import the corresponding encapsulation without altering the original business logic. For native JS or general scenarios, the business execution function is wrapped using the decorator pattern, adding accidental touch prevention capabilities without modifying the original function's internal code. This principle achieves logical decoupling through the framework's native extension capabilities, significantly reducing the integration cost of the solution, supporting full project reuse, and avoiding the risk of failure caused by modifying business code.

[0089] In one possible implementation, a global configuration center is pre-built to uniformly maintain risk level classification standards, delay countdown durations for each level, confirmation keywords, interface prompts, and risk display styles.

[0090] Specifically, all configurable parameters in the accidental touch prevention solution are extracted from the business logic and centrally managed in a global configuration center, improving the maintainability and flexibility of the solution. The main logic is that the configuration center exists as an independent configuration file, centrally storing all protection rule parameters, including the mapping relationship between risk levels and operation types, the delay duration corresponding to each level, the keyword library for confirmation verification, the prompt text for pop-ups and buttons, and the color styles corresponding to different risks; all accidental touch prevention logic reads parameters from the global configuration center, without hard-coding rules. The advantage of this principle is that when the protection strategy needs to be adjusted, only the parameters in the configuration center need to be modified, without changing the business logic code, adapting to the personalized needs of different business systems; at the same time, unified rule configuration ensures consistent protection standards across the entire project, avoiding the problems of rule chaos and high maintenance costs caused by decentralized configuration.

[0091] See Figure 3 This diagram shows the layered architecture of a front-end sensitive operation anti-accidental touch system, which is divided into five layers along the control flow and data flow: user interaction layer, interaction control layer, core logic layer, security verification layer, and data persistence layer.

[0092] The top-level user interaction layer is the front-end interaction carrier that users directly interact with, comprising five parts: a sensitive operation trigger component, an operation intent recognition module, a delay countdown visualization component, a secondary confirmation pop-up component, and an operation result feedback component. The sensitive operation trigger component is the entry point for user operations, receiving click-triggered actions; the operation intent recognition module initially collects user operation behavior characteristics to help determine the true intent of the operation; the delay countdown visualization component presents the buffer duration and progress to the user; the secondary confirmation pop-up component carries risk notification and confirmation interaction; and the operation result feedback component is responsible for returning the final execution status of the operation. The entire user interaction layer is responsible for visually conveying the protection process to the user, while simultaneously collecting user confirmation, cancellation, and other interactive operations and passing them down to the next level.

[0093] The interaction control layer, located between the user interaction layer and the core logic layer, serves as an event relay and process scheduling mechanism. It includes event listeners and interceptors, operation state machine management, a countdown scheduler, and animation and transition effects. Event listeners and interceptors capture user clicks triggered by the user in the interaction control layer, intercept native business logic execution, and forward operation requests to the core logic layer. The operation state machine management maintains the overall state of the anti-accidental touch process and coordinates the state transitions between different parts. The countdown scheduler executes the timing, updating, and termination scheduling of the countdown based on the risk level and duration output by the core logic layer. The animation and transition effects module drives the visual animation rendering of the interaction control layer, making state changes smoother and improving user experience. The interaction control layer acts as a bridge, transforming user interactions into commands that the core logic layer can process, and simultaneously converting the core logic layer's decision results into visual interface feedback.

[0094] The core logic layer is the decision-making hub of the entire system, with the anti-accidental touch decision engine as its main component. It is responsible for state transitions and rule determination. Surrounding the anti-accidental touch decision engine are a sensitive operation classification engine, a risk level assessment algorithm, a dynamic delay calculation mechanism, and a cooldown period manager. The sensitive operation classification engine identifies operation types and matches them with corresponding risk grading dimensions. The risk level assessment algorithm calculates and determines the risk level of the current operation based on preset grading rules. The dynamic delay calculation matches the corresponding countdown duration based on the determined risk level and outputs it to the scheduling layer. The cooldown period manager manages the cooling-off period after operation execution to prevent repeated triggering of similar operations within a short period. The state transitions on the right side of the architecture form a complete state machine chain driven by the anti-accidental touch decision engine: initially in the IDLE state, after an operation is triggered, it enters the PENDING countdown buffer stage, after secondary confirmation, it enters the CONFIRM state, after successful verification, it enters the EXECUTE state, and finally transitions to the DONE / REVERT state. Each state is uniformly managed by the anti-accidental touch decision engine, forming a complete logic, with each state corresponding to different protection mechanisms.

[0095] The security verification layer provides additional security checks and reinforcements for high-risk and extremely high-risk operations. Triggered by the anti-accidental touch decision engine, it includes a secondary identity verification module, device fingerprint verification, behavioral biometric comparison, and operation log audit trail. The secondary identity verification module adds identity verification for high-risk operations to ensure the operator is the account holder. Device fingerprint verification verifies whether the operating device is a commonly used and trusted device, identifying risks associated with abnormal device operations. Behavioral biometric comparison verifies the authenticity of operations based on user operating habits and input characteristics, further filtering out unintentional accidental touches. The operation log audit trail collects all operation events throughout the process, preserving original data for subsequent auditing and traceability. This layer supplements the protection capabilities, further enhancing the verification level for high-risk operations and reducing the risk of accidental and unauthorized operations.

[0096] The bottom-level data persistence layer is responsible for the storage and persistence of the entire system's configuration, queues, logs, and keys, providing data support for the upper layers. This includes the operation queue IndexedDB, the configuration cache LocalStorage, server-side synchronization of audit logs, and session management of encryption keys. The operation queue stores pending tasks in IndexedDB, enabling local task persistence on the front end, ensuring task status is not lost even when the page is refreshed. The configuration cache stores global parameters such as risk classification rules, countdown durations, and style configurations in LocalStorage, enabling local caching and fast retrieval of configurations. Audit logs are synchronized to the server via an interface, achieving cloud-based persistence of operation logs and supporting centralized auditing and behavioral analysis. Encryption keys are managed and maintained through Session management to ensure session-level verification keys, guaranteeing data security during the security verification process.

[0097] The external services on the right side of the architecture provide external support capabilities for system integration, including a risk intelligence API, a behavior analysis SDK, and a notification push service. These services connect to the internal system through an interaction control layer and an operation result feedback component. The risk intelligence API provides external risk data support for risk level assessment, improving the accuracy of risk determination; the behavior analysis SDK collects user operation behavior data to assist in biometric comparison; and the notification push service is responsible for sending reminders to users when high-risk operations are triggered or completed, further strengthening operational safety prompts.

[0098] See Figure 4 This diagram shows the overall system architecture of the front-end sensitive operation delay execution and secondary confirmation anti-accidental touch mechanism. It is divided into five layers along the transmission direction of control flow and data flow: presentation layer, core control layer, access layer, business execution layer, and data layer.

[0099] The top layer is the presentation layer, which is the user interface and the front-end carrier for direct interaction between the user and the accidental touch prevention system. It includes button components, pop-up components, countdown components, and input confirmation boxes. Button components are the trigger entry points for sensitive operations, receiving user clicks and passing trigger signals downwards. Pop-up components display confirmation prompts and risk information for high-risk operations, carrying the basic pop-up confirmation interaction logic. The countdown component visually presents the remaining time and progress of the delayed execution, providing feedback to the user on the operation's buffering status and reducing user confusion during waiting. The input confirmation box is used for keyword input verification for extremely high-risk operations, carrying a strong verification interaction for intent-based secondary confirmation. The entire presentation layer, on the one hand, visualizes the entire accidental touch prevention process to the user, and on the other hand, collects user confirmation, cancellation, and other interactive operations, passing them downwards to the core control layer.

[0100] The second layer below is the core control layer, namely the accidental touch prevention engine, which coordinates the rule determination and state transition of the entire accidental touch prevention process. This layer includes a risk classification configurator, a delayed execution controller, an intent verification manager, a state lock manager, an interrupt / cancellation mechanism, and a visual feedback renderer. The risk classification configurator is responsible for maintaining the rules for classifying operational risk levels and the corresponding protection strategy configurations. It serves as the basis for graded protection rules and supports dynamic adjustment of protection standards. The delayed execution controller is responsible for initiating countdown control of the corresponding duration based on the matched risk level, and for delaying and scheduling the execution operation. The intent verification manager is responsible for managing the verification logic of secondary confirmation, verifying keyword input, risk notification check status, sliding verification results, etc., to determine whether the user's operation intent is genuine and valid. The state lock manager is responsible for maintaining a globally unique operation state lock, managing concurrent access to the anti-accidental touch process, ensuring that only one protection process runs at the same time, and avoiding logical conflicts and interface chaos caused by multiple concurrent operations. The interruption / cancellation mechanism is responsible for listening to various interruption events such as manual cancellation, page route jump, and network anomalies, triggering process reset and state rollback, realizing the interruptibility and cancellation of operations, and giving users room for error correction. The visual feedback renderer is responsible for driving the interface update of the upper display layer based on the current process status, realizing the visual rendering of countdown numbers, risk color progress, and button disabled status. The core control layer receives user interaction input from the presentation layer at the top and connects to business logic through the access layer at the bottom, serving as the scheduling brain for the entire anti-accidental touch mechanism.

[0101] The third layer below is the access layer, positioned as a non-intrusive adaptation layer. It is responsible for seamlessly integrating the accidental touch prevention capability with different front-end technology stacks, ensuring decoupling of the protection logic from business code at the architectural level. This layer provides four adaptation schemes, covering mainstream front-end development scenarios: For the Vue technology stack, it provides custom directives, allowing developers to quickly integrate the protection capability simply by adding directive attributes to button labels, conforming to Vue's development habits; for the React technology stack, it provides custom Hooks, encapsulating the accidental touch prevention logic through the Hook mechanism of functional components, adapting to the development model of the React ecosystem; the decorator / annotation scheme is geared towards general JavaScript / TypeScript development scenarios, wrapping business execution functions through the decorator pattern to add accidental touch prevention capabilities without modifying the original function's internal logic; and global utility functions provide the most basic universal calling methods, adapting to the integration needs of native JS and various niche front-end frameworks. Through these multi-faceted adaptation schemes, the access layer achieves low-intrusion, reusable integration of the accidental touch prevention capability, significantly reducing the cost of integration and modification for different projects.

[0102] The fourth layer downwards is the business execution layer, also known as the actual operation layer. This is the layer where business logic is finally executed after all accidental touch prevention checks have passed. It corresponds to various sensitive front-end operation scenarios that require protection. This layer includes four typical high-risk sensitive operations: deletion / cancellation (data deletion, account cancellation, configuration clearing, etc.) – extremely high-risk irreversible operations; payment / submission (order payment, form submission, order creation, etc.) – high-risk operations involving funds and business processes; overwrite / clear (data overwrite, batch configuration clearing, batch content replacement, etc.) – operations that easily cause batch data loss; and forced offline / password change (forced user offline, account password modification, etc.) – operations involving account security. All operations in the business execution layer must pass all checks in the upper-layer accidental touch prevention process before execution, intercepting accidental touch behavior at the operation entry point and ensuring the security of business operations.

[0103] The bottom layer is the data layer, namely the log and configuration layer, which is responsible for the storage of configuration and persistence of operational data for the entire system, providing data support for rule management, audit traceability, and problem investigation. This layer includes operation audit logs, risk level configurations, and execution result records. The operation audit logs are responsible for recording all major events in the entire process of preventing accidental touches, including operation triggering, process interruption, user cancellation, verification passing, and execution completion, completely retaining the user's operation behavior trajectory and supporting post-event auditing and problem review. The risk level configuration is responsible for persistently storing configuration parameters such as risk classification rules, the corresponding delay duration for each level, verification rules, confirmation keyword library, and interface prompt text, providing support for rule reading and dynamic updates for the upper core control layer, realizing configurable and adjustable protection rules. The execution result record is responsible for storing the final execution status and result data of the operation, used for subsequent problem investigation and operational data statistics. The data layer provides configuration data support to the core control layer above, while also accumulating the operational data of the entire process, realizing configurable protection rules and traceable operational behavior.

[0104] The following description is based on specific scenarios:

[0105] Scenario 1: Data deletion (extremely high risk)

[0106] The user clicks the delete button;

[0107] The button turns red when the 3-second countdown locks in.

[0108] A pop-up window asks for the word "delete".

[0109] Submission is only allowed after the input is correct and the countdown has ended;

[0110] You can still cancel before submitting to prevent accidental deletion.

[0111] Scenario 2: Placing an order and making a payment (high risk)

[0112] Click to submit your order;

[0113] A 2-second delay plus a disabled button are added to prevent duplicate submissions.

[0114] A pop-up window asks "Confirm payment?".

[0115] Execute the request after confirmation.

[0116] Scenario 3: System logout / forced offline

[0117] Click to log out;

[0118] 3-second countdown + keyword "Confirm Cancellation";

[0119] If no input is provided, the code will never be executed.

[0120] To avoid accidentally logging out.

[0121] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and the multiple devices will interact with each other to complete the aforementioned method for preventing accidental touches in sensitive front-end operations.

[0122] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0123] Example 2

[0124] See Figure 5 Embodiment 2 of the present invention also provides a front-end sensitive operation anti-accidental touch system, which adopts the above-mentioned front-end sensitive operation anti-accidental touch method, including:

[0125] Risk classification strategy pre-configuration unit 100: used to pre-configure front-end operation risk classification rules and corresponding anti-accidental touch strategies, classify risk levels into low risk, medium risk, high risk and extremely high risk, and match delayed execution time and intent-based secondary confirmation verification rules for each level of risk.

[0126] Operation monitoring and strategy matching unit 200: used to monitor front-end page operation trigger events in real time, identify the risk level corresponding to the current triggered operation, and load the matching anti-accidental touch strategy;

[0127] Tiered delay and concurrency control unit 300: used to trigger the tiered delay locking process, start the corresponding duration countdown, simultaneously disable and lock the trigger operation button and display status feedback, and control the concurrent execution of the anti-accidental touch process through the status lock;

[0128] Interruption control and status reset unit 400: During the countdown, it maintains the operation lock state, opens the interrupt channel, responds to manual cancellation commands, page route jump events, network abnormal events, triggers the interruption of the anti-accidental touch process and resets all anti-accidental touch states;

[0129] Intent verification and permission unlocking unit 500: After the countdown ends, it performs the corresponding intent-based secondary confirmation verification according to the risk level. After the intent-based secondary confirmation verification is passed, the operation execution permission is unlocked.

[0130] Operation Execution and Audit Log Unit 600: Used to execute target-sensitive operations, collect events throughout the entire operation process, and generate operation audit logs for persistent storage.

[0131] It should be noted that the information interaction and execution process between the various units of the above-mentioned device are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.

[0132] Example 3

[0133] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores program code for a front-end sensitive operation anti-accidental touch method, the program code including instructions for executing the front-end sensitive operation anti-accidental touch method of Embodiment 1 or any possible implementation thereof.

[0134] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0135] Example 4

[0136] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0137] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the front-end sensitive operation anti-accidental touch method of Embodiment 1 or any possible implementation thereof by calling the program instructions.

[0138] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0139] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0140] It will be apparent to those skilled in the art that the various units or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit units, or multiple units or steps can be fabricated as a single integrated circuit unit. Thus, the present invention is not limited to any particular hardware and software combination.

[0141] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for preventing accidental touches during front-end sensitive operations, characterized in that, include: S1. Pre-configure front-end operation risk classification rules and corresponding anti-accidental touch strategies, classify risk levels into low risk, medium risk, high risk, and extremely high risk, and match delayed execution time and intent-based secondary confirmation verification rules for each level of risk. S2. Monitor front-end page operation trigger events in real time, identify the risk level corresponding to the current triggered operation, and load the matching anti-accidental touch strategy; S3. Trigger the graded delay lock process, start the corresponding countdown timer, simultaneously disable and lock the trigger operation button and display status feedback, and control the concurrent execution of the anti-accidental touch process through the status lock; S4. During the countdown, maintain the operation lock state, open the interruption channel, respond to manual cancellation commands, page route jump events, and network abnormal events, trigger the interruption of the anti-accidental touch process and reset all anti-accidental touch states; S5. After the countdown ends, perform the corresponding intention-based secondary confirmation verification according to the risk level. After the intention-based secondary confirmation verification passes, unlock the operation execution permission. S6. Perform target-sensitive operations, collect all events of this operation, and generate operation audit logs for persistent storage.

2. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, In S1, the specific anti-accidental touch strategy corresponding to the risk level is as follows: The low-risk activities include page queries, list refreshes, and tag switching. These low-risk activities are delayed and do not require the intent-based secondary confirmation verification. The medium-risk activities include modification, data editing, and form submission. The medium-risk delay time is 1 second, the execution button is locked, and there is no additional verification pop-up. The high-risk events include payment, order submission, and data overwrite. The high-risk event has a 2-second delay, which is accompanied by a basic pop-up confirmation. The extremely high risks include data deletion, account cancellation, configuration clearing, and forced offline. The delay time for the extremely high risks is 3 seconds, and the intent-based secondary confirmation verification is forcibly executed.

3. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, In S3, the state lock manages process concurrency through a concurrency interception and determination model, the formula of which is: In the formula, The value is set to the allow flag for creating a new accidental touch prevention process. When creating a new process, the value is Intercepting new processes in real time; It is in a global lock state. Indicates an idle state. Indicates the occupied status.

4. The method for preventing accidental touches during front-end sensitive operations according to claim 3, characterized in that, In S3, the delayed locking process configures the state lock, and one of the anti-accidental touch processes runs on the same page at the same time. It is interrupted and reset when the page jumps, the route changes, or the network is abnormal, and provides manual cancellation, reset, and retry interfaces.

5. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, In S3 The status feedback includes a button displaying a countdown number in real time, a progress bar with a color scheme corresponding to the risk level, and disabling grayscale style; The state feedback is generated through a color system mapping function, the formula of which is: In the formula, The display color values ​​for the button progress bar and background; This is a color system mapping function, and the mapping rule is: Set the button to its default primary color. It is yellow. Orange It is red.

6. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, In S5, the intention-based secondary confirmation verification includes inputting preset keywords, checking the irreversible risk notification option, and sliding to unlock / long-pressing to verify. The intention-based secondary confirmation verification formula is as follows: In the formula, This is a flag indicating that the intent verification has passed; its value is... The time verification passed, and the value was taken as follows. The time verification failed; For the confirmation keywords entered by the user, Preset standard keywords for the global configuration center; The option to disclose irreversible risks is checked, and its value is [value missing]. This indicates that the option has been selected; This is a completion marker for slide-to-unlock / long-press verification, with a value of [value]. This indicates that the verification is complete.

7. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, In S6, the operation audit log includes accidental clicks, interruptions, cancellations, successful verifications, and completed operations. The operation audit log is synchronized to the local cache and backend services.

8. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, It adopts a non-intrusive integration approach, providing custom directives for the Vue framework, higher-order component (HOC) / custom Hook for the React framework, and decorators for general scenarios, enabling the integration of existing business execution code.

9. The method for preventing accidental touches during front-end sensitive operations according to claim 1, characterized in that, A global configuration center is pre-built to uniformly maintain risk level classification standards, delay countdown durations for each level, confirmation keywords, interface prompts, and risk display styles.

10. A front-end sensitive operation anti-accidental touch system, employing the front-end sensitive operation anti-accidental touch method according to any one of claims 1-9, characterized in that, include: Risk grading strategy pre-configuration unit: used to pre-configure front-end operation risk grading rules and corresponding anti-accidental touch strategies, divide risk levels into low risk, medium risk, high risk and extremely high risk, and match delayed execution time and intent-based secondary confirmation verification rules for each level of risk; Operation monitoring and strategy matching unit: used to monitor front-end page operation trigger events in real time, identify the risk level corresponding to the current triggered operation, and load the matching anti-accidental touch strategy; Tiered Delay and Concurrency Control Unit: Used to trigger the tiered delay locking process, start the corresponding duration countdown, simultaneously disable and lock the trigger operation button and display status feedback, and control the concurrent execution of the anti-accidental touch process through the status lock; Interruption control and status reset unit: During the countdown, it maintains the operation lock state, opens the interruption channel, responds to manual cancellation commands, page route jump events, network abnormal events, triggers the interruption of the anti-accidental touch process and resets all anti-accidental touch states; Intent verification and permission unlocking unit: After the countdown ends, it performs the corresponding intent-based secondary confirmation verification according to the risk level. After the intent-based secondary confirmation verification is passed, the operation execution permission is unlocked. Operation Execution and Audit Log Unit: Used to execute target-sensitive operations, collect all events of the operation process, and generate operation audit logs for persistent storage.